/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark theme (default) */
  --bg-0: #141415;
  --bg-1: #1e1e1f;
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-quaternary: rgba(255, 255, 255, 0.4);
  --border-subtle: rgba(255, 255, 255, 0.02);
  --green: #FFA03C;
  --green-bg: rgba(255, 160, 60, 0.06);
  --header-bg: rgba(20, 20, 21, 0.85);
  --back-btn-hover: #2a2a2b;
  --card-title-color: white;
  --creator-card-bg: linear-gradient(90deg, rgba(255, 160, 60, 0.06), rgba(255, 160, 60, 0.06)),
                     linear-gradient(90deg, rgb(24, 24, 27), rgb(24, 24, 27));
  --creator-card-border: rgba(255, 160, 60, 0.06);

  /* Aliases for backward compat */
  --white-90: var(--text-primary);
  --white-70: var(--text-secondary);
  --white-50: var(--text-tertiary);
  --white-40: var(--text-quaternary);

  --content-max: 1104px;
  --text-max: 712px;
  --mobile-pad: 16px;
  --section-gap: 120px;

  --radius-card: 12px;
  --radius-img: 8px;
  --card-padding: 40px;
}

/* Light theme */
[data-theme="light"] {
  --bg-0: #FFFFFF;
  --bg-1: #F3F3F3;
  --text-primary: rgba(0, 0, 0, 1);
  --text-secondary: rgba(0, 0, 0, 0.8);
  --text-tertiary: rgba(0, 0, 0, 0.6);
  --text-quaternary: rgba(0, 0, 0, 0.5);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --green: #B85800;
  --green-bg: rgba(184, 88, 0, 0.06);
  --header-bg: rgba(255, 255, 255, 0.85);
  --back-btn-hover: #e8e8e8;
  --card-title-color: rgba(0, 0, 0, 0.9);
  --creator-card-bg: linear-gradient(90deg, rgba(184, 88, 0, 0.06), rgba(184, 88, 0, 0.06)),
                     linear-gradient(90deg, #faf3ec, #faf3ec);
  --creator-card-border: rgba(184, 88, 0, 0.08);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-0);
  color: var(--white-70);
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--white-90);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: var(--header-bg);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 clamp(40px, calc((100vw - 1080px) / 2), 180px);
}

.logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.085px;
  color: var(--white-90);
  white-space: nowrap;
  flex-shrink: 0;
  width: 184px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.nav-links a {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.085px;
  color: var(--white-50);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--white-90);
}

.nav-links a.is-active {
  color: var(--white-90);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.header-right a {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.085px;
  color: var(--white-50);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-right a:hover {
  color: var(--white-90);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--white-50);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  color: var(--white-90);
}

.icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: block;
}

/* ===== Mobile Header Avatar ===== */
.header-avatar-link {
  display: none;
  flex-shrink: 0;
}

.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ===== Burger Button ===== */
.burger-button {
  display: none;
  position: relative;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: var(--white-50);
  transition: color 0.2s ease;
}

.burger-button:hover {
  color: var(--white-90);
}

.burger-bar {
  position: absolute;
  left: 4px;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: top 0.3s ease, transform 0.3s ease;
}

.burger-bar:first-child {
  top: 7px;
}

.burger-bar:last-child {
  top: 15px;
}

.burger-button.is-open .burger-bar:first-child {
  top: 11px;
  transform: rotate(45deg);
}

.burger-button.is-open .burger-bar:last-child {
  top: 11px;
  transform: rotate(-45deg);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: none;
}

/* ===== Snake Game ===== */
.snake-canvas {
  display: none;
}

/* ===== Layout ===== */
.case-study {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 164px;
}

.section {
  margin-bottom: var(--section-gap);
}

.text-block {
  max-width: var(--text-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0;
}

/* ===== Hero Section ===== */

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-1);
  border-radius: var(--radius-card);
  color: var(--white-50);
  transition: background 0.2s ease, color 0.2s ease;
  margin-bottom: 64px;
}

.back-button:hover {
  background: var(--back-btn-hover);
  color: var(--white-90);
}

.hero-info {
  margin-bottom: 64px;
}

.hero-info h1 {
  font-size: 37px;
  font-weight: 600;
  color: var(--white-90);
  letter-spacing: -0.74px;
  line-height: 1;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.21px;
  color: var(--white-50);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 19px;
  letter-spacing: -0.03px;
  color: var(--white-90);
}

.meta-value {
  font-size: 15px;
  font-weight: 600;
  line-height: 19px;
  letter-spacing: -0.03px;
  color: var(--white-50);
}

/* ===== Image Cards ===== */
.image-card {
  background: var(--bg-1);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  overflow: hidden;
}

.image-card img,
.image-card video {
  border-radius: var(--radius-img);
  width: 100%;
  height: auto;
}

/* Hero slider uses wider cards */
.slider-container--hero .slider-card--wide {
  width: 1160px;
}

.image-with-caption {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(var(--text-max) + var(--card-padding) * 2);
  margin: 0 auto;
  padding: 0;
}

.image-with-caption .image-card {
  width: 100%;
}

.image-with-caption > .image-caption {
  padding: 0 40px;
}

.image-caption {
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: -0.03px;
  color: var(--white-70);
}

/* ===== Testimonial ===== */
.testimonial-card {
  background: var(--bg-1);
  box-shadow: 0 0 0 6px var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px;
}

.testimonial-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.testimonial-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-90);
}

.testimonial-role {
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: -0.03px;
  color: var(--white-50);
}

.testimonial-linkedin {
  padding: 4px;
  color: var(--white-40);
  transition: color 0.2s ease;
}

.testimonial-linkedin:hover {
  color: var(--white-70);
}

.testimonial-text {
  font-size: 17px;
  font-weight: 400;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-50);
}

/* ===== Section Titles ===== */
.section-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.21px;
  color: var(--white-90);
  margin-bottom: 24px;
}

.section-title--large {
  font-size: 31px;
  letter-spacing: -0.465px;
  line-height: 1;
  margin-bottom: 16px;
}

/* ===== Body Text ===== */
.body-text {
  font-size: 17px;
  font-weight: 400;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-70);
}

.body-text + .body-text {
  margin-top: 16px;
}

.body-text + .bullet-list {
  margin-top: 16px;
}

.body-text--small {
  font-size: 15px;
  line-height: 23px;
  letter-spacing: -0.03px;
}

.text-green {
  color: var(--green);
}

.text-green--bold {
  font-weight: 600;
}

.text-strong {
  color: var(--white-90);
  font-weight: 600;
}

/* ===== User Type Cards ===== */
.user-types {
  margin-top: 16px;
  padding-top: 16px;
}

.user-types > .body-text {
  margin-bottom: 16px;
}

.user-cards {
  display: flex;
  gap: 24px;
}

.user-card {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 6px var(--border-subtle);
}

.user-card--fans {
  background: var(--bg-1);
}

.user-card--creators {
  background: var(--creator-card-bg);
  box-shadow: 0 0 0 6px var(--creator-card-border);
}

.user-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--card-title-color);
  margin-bottom: 12px;
}

.user-card-title--green {
  color: var(--green);
}

.user-card-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: -0.03px;
  color: var(--white-70);
}

/* ===== Challenge Section ===== */
.challenge-section .text-block {
  margin-bottom: 24px;
}

.challenge-section .image-with-caption {
  margin-bottom: 24px;
}

.task-statement {
  padding-top: 24px;
}

/* ===== Flow Diagram ===== */
.flow-diagram {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 16px 0;
  margin-bottom: 16px;
}

.flow-step {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-1);
  box-shadow: 0 0 0 6px var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 12px 16px;
}

.flow-step p {
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: -0.03px;
  color: var(--white-70);
}

.flow-arrow {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 12px;
  color: var(--white-50);
}

/* ===== Subsection Titles ===== */
.subsection-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.21px;
  color: var(--white-90);
  margin-bottom: 16px;
}

/* ===== Comparison Cards ===== */
.comparison-cards {
  display: flex;
  gap: 24px;
  padding: 8px 0;
}

.comparison-card {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 6px var(--border-subtle);
}

.comparison-card--neutral {
  background: var(--bg-1);
}

.comparison-card--green {
  background: var(--creator-card-bg);
  box-shadow: 0 0 0 6px var(--creator-card-border);
}

.comparison-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-70);
  margin-bottom: 12px;
}

.comparison-card-title--green {
  color: var(--green);
}

.comparison-card-text {
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: -0.03px;
  color: var(--white-70);
}



/* ===== Bullet Lists ===== */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bullet-list li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
  letter-spacing: -0.03px;
  color: var(--white-70);
}

.bullet-list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white-50);
  margin-top: 8px;
}

.bullet-list--body {
  margin-top: 16px;
  margin-bottom: 16px;
}

.bullet-list--body li {
  font-size: 17px;
  line-height: 25px;
  letter-spacing: -0.085px;
}

/* ===== Solutions Section ===== */
.solutions-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

.solutions-section .text-block {
  margin-bottom: 64px;
}

.solutions-section--ch2 .text-block {
  margin-bottom: 64px;
}

/* Compact flow steps (for closed loop diagram) */
.flow-step--compact {
  flex: none;
  padding: 16px 22px;
  text-align: center;
}

.flow-step--compact p {
  white-space: nowrap;
}

/* ===== Slider ===== */
.slider-section {
  margin-bottom: 64px;
}

.slider-container {
  /* Break out of .case-study (max-width 1440px) to full viewport width
     so cards can scroll all the way to the screen edge */
  margin-left: calc(-50vw + 50%);
  width: 100vw;
  /* padding-left aligns first card image with text guideline */
  padding-left: calc(max(0px, (100vw - 1440px) / 2) + clamp(40px, calc((100vw - 1080px) / 2), 180px) + 184px - var(--card-padding));
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.slider-container::-webkit-scrollbar {
  display: none;
}

.slider-container:active {
  cursor: grabbing;
}

.slider-track {
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: max-content;
  /* Right padding so last card ends at text guideline right edge */
  padding-right: calc(max(0px, (100vw - 1440px) / 2) + clamp(40px, calc((100vw - 1080px) / 2), 180px) + 184px - var(--card-padding));
}

.slider-card {
  flex-shrink: 0;
  width: 792px;
  display: flex;
  flex-direction: column;
}

.slider-card img {
  flex: 1;
  min-height: 0;
  object-fit: cover;
}

.slider-card--narrow {
  width: 537px;
}

.slider-card--search {
  width: 350px;
}

.slider-section .text-block {
  margin-top: 8px;
}

.slider-section .image-caption {
  margin-top: 12px;
}

.slider-section .bullet-list {
  margin-top: 8px;
}

/* Hero slider alignment — image aligns with logo (180px from page edge at 1440px) */
.slider-container--hero {
  padding-left: calc(max(0px, (100vw - 1440px) / 2) + clamp(0px, calc((100vw - 1080px) / 2 - var(--card-padding)), calc(180px - var(--card-padding))));
}

.slider-container--hero .slider-track {
  padding-right: calc(max(0px, (100vw - 1440px) / 2) + clamp(0px, calc((100vw - 1080px) / 2 - var(--card-padding)), calc(180px - var(--card-padding))));
}

/* Last image section */
.solutions-section > .image-with-caption {
  max-width: calc(var(--text-max) + var(--card-padding) * 2);
  margin-bottom: 64px;
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Blur Reveal ===== */
.blur-reveal .char {
  display: inline-block;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter;
}

.blur-reveal .char.is-revealed {
  opacity: 1;
  filter: blur(0px);
}

.blur-reveal .char-space {
  width: 0.3em;
}

/* ===== Theme Transition ===== */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.4s ease,
              color 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease !important;
}

/* ===== Dividers ===== */
.section-divider {
  max-width: var(--text-max);
  margin: 0 auto;
  padding: 64px 0;
  position: relative;
}

.section-divider::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* Zero out ALL margins around dividers so padding controls spacing */
:is(.slider-section, .text-block, .image-with-caption):has(+ .section-divider) {
  margin-bottom: 0 !important;
}
.slider-section:has(+ .section-divider) > :last-child {
  margin-bottom: 0 !important;
}

[data-theme="light"] .section-divider::after {
  background: rgba(0, 0, 0, 0.08);
}

/* ===== Results Cards ===== */
.results-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0;
}

.result-card {
  padding: 16px;
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 6px var(--border-subtle);
  background: var(--bg-1);
}

.result-card--green {
  background: var(--creator-card-bg);
  box-shadow: 0 0 0 6px var(--creator-card-border);
}

.result-card-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.21px;
  color: var(--white-70);
  margin-bottom: 12px;
}

.result-card-title--green {
  color: var(--green);
}

.result-card--green .bullet-list li::before {
  background: var(--green);
}

.solutions-section .bullet-list li::before {
  background: var(--green);
}

/* ===== External Link ===== */
.link-external {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: #8585FF;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-external:hover {
  color: #9e9eff;
}

[data-theme="light"] .link-external:hover {
  color: #6262e0;
}

/* ===== Hero Description Block ===== */
.hero-description-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== Base Flow Image ===== */
.base-flow-image {
  width: 100%;
  border-radius: 4px;
  display: block;
}

/* ===== Wide Image Card ===== */
.image-with-caption--wide {
  max-width: 1160px;
}

.image-with-caption--wide .text-block {
  margin-top: 8px;
}

/* ===== Phone Grid ===== */
.phone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 16px;
  row-gap: 0;
  max-width: 1160px;
  margin: 0 auto;
}

.phone-grid-card {
  padding: var(--card-padding);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.phone-grid-card img {
  width: 100%;
  display: block;
  border-radius: var(--radius-img);
}

/* ===== Experience Page ===== */
.experience-content {
  max-width: calc(var(--text-max) + var(--card-padding) * 2);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-bottom: 100px;
}

.experience-entry {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.experience-entry .subsection-title {
  margin-bottom: 0;
}

.subsection-title .link-external {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.experience-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .experience-divider {
  background: rgba(0, 0, 0, 0.08);
}

/* ===== Footer ===== */
.site-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 0 64px;
}

.footer-inner {
  max-width: var(--text-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.footer-links a {
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-50);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--white-90);
}

.top-button {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-50);
  padding: 0;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.top-button:hover {
  color: var(--white-90);
}


/* ===== Home Page ===== */
.home-page {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 164px;
}

.home-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.home-bio {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-gallery-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-gallery-header .section-title--large {
  margin-bottom: 0;
}

/* Action button (Experience, View More) */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 8px 8px 10px 14px;
  background: var(--bg-1);
  border-radius: var(--radius-card);
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-50);
  transition: color 0.2s ease, background 0.2s ease;
  width: fit-content;
}

.action-button:hover {
  color: var(--white-90);
}

.action-button svg {
  flex-shrink: 0;
}

.action-button--primary {
  background: var(--green);
  color: rgba(0, 0, 0, 0.9);
}

.action-button--primary:hover {
  background: color-mix(in srgb, var(--green) 85%, white);
  color: rgba(0, 0, 0, 0.9);
}

.action-button--primary svg {
  width: 20px;
  height: 20px;
}

[data-theme="light"] .action-button--primary {
  color: #fff;
}

[data-theme="light"] .action-button--primary:hover {
  color: #fff;
}

/* Case study cards (home page slider) */
.case-card {
  flex-shrink: 0;
  width: 572px;
  border-radius: var(--radius-card);
  overflow: clip;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 40px 24px;
  background: #1e1e1f;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.case-card--craftify {
  padding-bottom: 6px;
}

/* Background image layer */
.case-card-bg {
  position: absolute;
  inset: 0;
  overflow: clip;
}

.case-card-bg img {
  position: absolute;
  max-width: none;
  object-fit: cover;
  transition: transform 0.8s ease;
}

/* TopZaklad bg: horizontally flipped, offset right */
.case-card--tz .case-card-bg img {
  --bg-transform: translate(-50%, -50%) scaleX(-1);
  width: 863px;
  height: 666px;
  left: calc(50% + 115px);
  top: 61.15%;
  transform: var(--bg-transform);
}

/* Fan Reviews bg: offset right */
.case-card--fr .case-card-bg img {
  --bg-transform: translate(-50%, -50%);
  height: 109.64%;
  width: auto;
  left: calc(50% + 39px);
  top: 49.6%;
  transform: var(--bg-transform);
}

/* Craftify bg: rotated, centered offset */
.case-card--craftify .case-card-bg img {
  --bg-transform: translate(-50%, -50%) rotate(-3.87deg);
  width: 1078px;
  height: 1078px;
  left: calc(50% + 31px);
  top: 107.47%;
  transform: var(--bg-transform);
}

/* Hover: scale bg image 10% */
.case-card:hover .case-card-bg img {
  transform: var(--bg-transform) scale(1.1);
}

/* Card content (title + description) — always white, ignores theme */
.case-card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.case-card-title {
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.465px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.case-card-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e1e1f;
  border-radius: 8px;
  backdrop-filter: blur(2px);
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.case-card-arrow svg {
  transform: translateY(-1px);
}

/* Hover: arrow icon gets brighter */
.case-card:hover .case-card-arrow {
  color: rgba(255, 255, 255, 0.9);
}

.case-card-desc {
  font-size: 15px;
  font-weight: 600;
  line-height: 19px;
  letter-spacing: -0.03px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Mockup image */
.case-card-mockup {
  position: relative;
}

.case-card-mockup img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-img);
  display: block;
}

/* Home hero content wrapper */
.home-hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Gallery section — vertical stack */
.home-gallery {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.home-gallery > .text-block:last-of-type {
  margin-top: 16px;
}

.gallery-page-section {
  padding-top: 0;
}

.gallery-item {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}


/* Gallery horizontal row — two items side by side */
.gallery-row {
  display: flex;
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}

.gallery-row .gallery-item {
  flex: 1;
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
}

.gallery-row .gallery-image-card {
  max-width: none;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image-card {
  max-width: 1160px;
}


/* Mobile screenshots row — contain images, don't stretch */
.gallery-row--mobile .gallery-image-card {
  height: auto;
  max-height: 520px;
}

.gallery-row--mobile .gallery-image-card img {
  width: auto;
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* 404 Error Page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 0 16px;
}

.error-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.error-title {
  font-size: 37px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.74px;
  color: var(--white-90);
}

.error-subtitle {
  font-size: 17px;
  font-weight: 400;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-70);
  margin: 0;
}

@media (max-width: 768px) {
  .error-title {
    font-size: 28px;
    letter-spacing: -0.56px;
  }
}

@media (max-width: 400px) {
  .error-title {
    font-size: 24px;
    letter-spacing: -0.48px;
  }
}

/* Typing glow border */
.typing-glow {
  --glow-color: #FFA03C;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  box-shadow: inset 0 0 54px 9px color-mix(in srgb, var(--glow-color) 45%, transparent),
              inset 0 0 18px 2px color-mix(in srgb, var(--glow-color) 30%, transparent);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.typing-glow.is-active {
  animation: glowBreathe 3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.typing-glow.is-fading {
  animation: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

/* Typing cursor animation */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--white-70);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

@keyframes glowBreathe {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}


/* Email copy button */
.email-copy-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 25px;
  letter-spacing: -0.085px;
  color: var(--white-50);
  padding: 0;
  transition: color 0.2s ease;
}

.email-copy-btn:hover {
  color: var(--white-90);
}

.email-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-1);
  color: var(--white-90);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.email-tooltip.is-visible {
  opacity: 1;
}

.email-tooltip--below {
  bottom: auto;
  top: calc(100% + 8px);
  text-align: center;
}

/* Gallery text blocks — prevent flex shrink-to-content */
.home-gallery > .text-block {
  min-width: min(var(--text-max), 100%);
}

/* Gallery caption (Caption/Regular) */
.gallery-caption {
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0.065px;
  color: var(--white-50);
  margin-top: 12px;
  padding-left: var(--card-padding);
}

/* Gallery slideshow */
.gallery-slideshow {
  position: relative;
}

.gallery-slideshow .slideshow-img {
  position: absolute;
  top: var(--card-padding);
  left: var(--card-padding);
  width: calc(100% - var(--card-padding) * 2);
  height: calc(100% - var(--card-padding) * 2);
  object-fit: cover;
  border-radius: var(--radius-img);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-slideshow .slideshow-img:first-child {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: auto;
}

.gallery-slideshow .slideshow-img.is-active {
  opacity: 1;
}

/* Gallery caption row with button */
.gallery-caption-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-left: var(--card-padding);
  padding-right: var(--card-padding);
}

.gallery-caption-row .gallery-caption {
  padding-left: 0;
  margin-top: 0;
}

.wip-badge {
  color: var(--green);
  font-weight: 600;
}

/* Gallery item visibility — home shows last 5 */
.gallery-item.gallery-item--hidden {
  display: none;
}

/* ===== Browse creators fixed-height cards ===== */
.slider-card--fixed-h {
  height: 525px;
  overflow: hidden;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1200px) {
  /* Tablet grid: match header padding, align content to "Works" guideline */
  .case-study,
  .home-page {
    padding-left: clamp(40px, calc((100vw - 1080px) / 2), 180px);
    padding-right: clamp(40px, calc((100vw - 1080px) / 2), 180px);
  }

  .text-block {
    max-width: var(--text-max);
    margin-left: 184px;
    margin-right: 0;
  }

  .image-with-caption {
    max-width: calc(var(--text-max) + var(--card-padding) * 2);
    margin-left: 144px;
    margin-right: 0;
  }

  .experience-content {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .case-study {
    padding-top: 120px;
  }

  .gallery-page-section {
    padding-top: 0;
  }

  :root {
    --section-gap: 80px;
  }

  /* Slider becomes vertical stack on tablet */
  .slider-container {
    margin-left: 144px;
    width: calc(100% - 144px);
    max-width: calc(var(--text-max) + var(--card-padding) * 2);
    padding-left: 0;
    overflow-x: hidden;
  }

  .slider-track {
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding-right: 0;
  }

  .home-cases-section .slider-container {
    margin-left: 0;
    width: 100%;
    max-width: none;
  }

  .home-cases-section .slider-track {
    gap: 16px;
  }

  .slider-card {
    width: 100% !important;
    flex-shrink: 0;
  }

  .slider-card img {
    flex: none;
    min-height: auto;
    object-fit: contain;
    width: 100%;
    height: auto;
  }

  /* Portrait images at 50% width, centered */
  .slider-card img.img--portrait {
    width: 50%;
    margin: 0 auto;
    display: block;
  }

  .slider-container--hero {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding-left: 0;
  }

  .slider-container--hero .slider-track {
    padding-right: 0;
  }

  .slider-card--fixed-h {
    height: auto;
  }

  /* Home page — case cards stack vertically */
  .case-card {
    width: 100% !important;
  }

  .case-card-title {
    font-size: 24px;
    letter-spacing: -0.36px;
  }

  /* Tablet/mobile: bg images cover full card, anchored top-left */
  .case-card--tz .case-card-bg img,
  .case-card--fr .case-card-bg img,
  .case-card--craftify .case-card-bg img {
    --bg-transform: none;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    transform: none;
  }

  .case-card:hover .case-card-bg img {
    transform: scale(1.1);
    transform-origin: left top;
  }

  .home-page {
    padding-top: 120px;
  }

  .gallery-item {
    max-width: 100%;
  }

  .gallery-image-card {
    max-width: 100%;
  }

  /* Phone grid becomes single column on tablet */
  .phone-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    row-gap: 4px;
    column-gap: 0;
  }

  .phone-grid-card img {
    width: 50%;
    margin: 0 auto;
  }

  .phone-grid-card {
    border-radius: 0;
  }

  /* Wide image card — aligns with logo, not Works */
  .image-with-caption--wide {
    max-width: 100%;
    margin-left: 0;
  }
}

/* Mobile header — burger menu breakpoint */
@media (max-width: 900px) {
  .logo {
    display: none;
  }

  .header-right {
    display: none;
  }

  .burger-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    justify-content: flex-start;
  }

  /* Reset tablet grid alignment — logo hidden, no logo-based offset */
  .header-inner {
    padding: 0 16px;
  }

  .case-study,
  .home-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .text-block {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    padding: 0 var(--mobile-pad);
  }

  .image-with-caption {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .slider-container {
    margin-left: 0;
    width: 100%;
  }

  /* Mobile menu */
  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-0);
    z-index: 99;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .mobile-menu.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 48px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  [data-theme="light"] .mobile-menu-inner {
    border-top-color: rgba(0, 0, 0, 0.08);
  }

  .mobile-menu-inner > * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
  }

  .mobile-menu.is-open .mobile-menu-inner > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
  .mobile-menu.is-open .mobile-menu-inner > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
  .mobile-menu.is-open .mobile-menu-inner > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
  .mobile-menu.is-open .mobile-menu-inner > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }

  .mobile-menu-inner a,
  .mobile-menu-inner .email-copy-btn {
    font-size: 21px;
    font-weight: 600;
    line-height: 28px;
    letter-spacing: -0.21px;
    color: var(--white-50);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
  }

  .mobile-menu-inner a:hover,
  .mobile-menu-inner .email-copy-btn:hover {
    color: var(--white-90);
  }

  .mobile-menu-inner .theme-toggle {
    color: var(--white-50);
  }

  .mobile-menu-inner .theme-toggle:hover {
    color: var(--white-90);
  }

  .mobile-menu-inner .email-tooltip {
    font-size: 13px;
    font-weight: 400;
  }

  .mobile-menu-inner {
    flex: 1;
    position: relative;
  }

  .game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-height: 310px;
    margin-top: 24px;
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .mobile-menu.is-open .game-wrapper {
    opacity: 1;
    transition-delay: 1s;
  }

  .snake-canvas {
    display: block;
    width: 100%;
    flex: 1;
  }

  .game-caption {
    font-size: 17px;
    font-weight: 600;
    line-height: 25px;
    letter-spacing: -0.085px;
    color: var(--white-50);
    margin-top: 8px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 16px;
  }

  .case-study {
    padding-top: 128px;
  }

  :root {
    --section-gap: 60px;
    --card-padding: 16px;
  }

  /* Reset tablet grid alignment for mobile */
  .case-study,
  .home-page {
    padding-left: 0;
    padding-right: 0;
  }

  .text-block {
    padding: 0 var(--mobile-pad);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Image cards go full-width on mobile */
  .image-card {
    border-radius: 0;
  }


  .image-with-caption {
    max-width: 100%;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
  }

  .image-with-caption > .image-caption {
    padding: 0 var(--mobile-pad);
  }

  /* Hide avatar in mobile header, left-align nav */
  .header-avatar-link {
    display: none;
  }

  .nav-links {
    justify-content: flex-start;
  }

  /* Burger icon 28px */
  .burger-button {
    width: 28px;
    height: 28px;
  }

  .burger-bar {
    left: 4px;
    width: 20px;
  }

  .burger-bar:first-child {
    top: 8px;
  }

  .burger-bar:last-child {
    top: 18px;
  }

  .burger-button.is-open .burger-bar:first-child {
    top: 13px;
  }

  .burger-button.is-open .burger-bar:last-child {
    top: 13px;
  }

  .hero-info h1 {
    font-size: 28px;
  }

  .section-title--large {
    font-size: 24px;
  }

  /* 21px text becomes 19px on mobile */
  .hero-description {
    font-size: 19px;
    line-height: 26px;
    letter-spacing: -0.19px;
  }

  .section-title {
    font-size: 19px;
    line-height: 26px;
    letter-spacing: -0.19px;
  }

  .subsection-title {
    font-size: 19px;
    line-height: 26px;
    letter-spacing: -0.19px;
  }

  /* Meta row stacks on mobile */
  .meta-row {
    flex-direction: column;
    gap: 16px;
  }

  /* User cards stack on mobile */
  .user-cards {
    flex-direction: column;
    gap: 16px;
  }

  /* Flow diagram stacks vertically */
  .flow-diagram {
    flex-direction: column;
    gap: 8px;
  }

  .flow-step {
    width: 100% !important;
    flex: 1 !important;
    justify-content: center;
    text-align: center;
  }

  .flow-step--compact p {
    white-space: normal;
  }

  .flow-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }

  /* Comparison cards stack on mobile */
  .comparison-cards {
    flex-direction: column;
    gap: 16px;
  }

  /* Slider — vertical stack on mobile */
  .slider-container {
    margin-left: 0;
    width: 100%;
    padding-left: 0;
    overflow-x: hidden;
  }

  .slider-track {
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding-right: 0;
  }

  .slider-card {
    width: 100% !important;
    border-radius: 0;
    padding: var(--mobile-pad);
  }

  .slider-card img {
    flex: none;
    min-height: auto;
    object-fit: contain;
    width: 100%;
    height: auto;
  }

  .slider-card img.img--portrait {
    width: 50%;
    margin: 0 auto;
    display: block;
  }

  /* Compact flow goes vertical on mobile */
  .flow-diagram--compact {
    flex-direction: column;
    gap: 8px;
  }

  .flow-diagram--compact .flow-step {
    width: 100%;
  }

  .flow-diagram--compact .flow-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }

  /* Edge slider (chat) — override portrait 50% width */
  .slider-container--edge .slider-card img {
    width: 100%;
  }

  .slider-section {
    margin-bottom: 48px;
  }

  .solutions-section .text-block {
    margin-bottom: 48px;
  }

  .solutions-section--ch2 .text-block {
    margin-bottom: 48px;
  }

  .slider-section .text-block {
    padding: 0 var(--mobile-pad);
  }

  /* Solutions last image */
  .solutions-section > .image-with-caption {
    max-width: 100%;
    padding: 0;
    margin-bottom: 48px;
  }

  .solutions-section > .image-with-caption .image-caption {
    padding: 0 var(--mobile-pad);
  }

  .section-divider {
    padding: 48px 0;
    margin: 0 var(--mobile-pad);
    max-width: none;
  }

  .footer-inner {
    padding: 0 var(--mobile-pad);
    max-width: 100%;
    flex-wrap: wrap;
    gap: 24px;
  }

  .footer-links {
    gap: 16px;
  }

  .top-button {
    width: auto;
  }

  .back-button {
    margin-bottom: 32px;
  }

  .hero-info {
    margin-bottom: 32px;
  }


  .experience-content {
    gap: 48px;
    padding-bottom: 72px;
  }

  .home-page {
    padding-top: 128px;
  }

  .gallery-page-section {
    padding-top: 0;
  }

  .case-card {
    width: 100% !important;
    border-radius: 0;
    margin-bottom: 4px;
    padding: 16px;
    padding-bottom: 12px;
    gap: 24px;
  }

  .case-card--craftify {
    padding-bottom: 4px;
  }

  .gallery-image-card {
    border-radius: 0;
  }


  .gallery-row {
    flex-direction: column;
    gap: 32px;
  }

  .home-gallery {
    gap: 56px;
  }

  .gallery-caption {
    padding: 0 var(--mobile-pad);
  }

  .gallery-caption-row {
    flex-direction: column;
    padding: 0 var(--mobile-pad);
  }

  .gallery-caption-row .gallery-caption {
    padding: 0;
  }

  /* Phone grid on mobile */
  .phone-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    row-gap: 4px;
    column-gap: 0;
  }

  .phone-grid-card {
    border-radius: 0;
    padding: var(--mobile-pad);
  }

  .phone-grid-card img {
    width: 50%;
    margin: 0 auto;
  }

  /* Wide image card on mobile */
  .image-with-caption--wide {
    max-width: 100%;
  }

  .image-with-caption--wide .text-block {
    padding: 0 var(--mobile-pad);
  }
}

/* Small mobile */
@media (max-width: 400px) {
  .hero-info h1 {
    font-size: 24px;
  }

  .section-title--large {
    font-size: 21px;
  }
}
