/* =====================================================================
   STUDIO BAOBAB — Website v2 · Global stylesheet
   ---------------------------------------------------------------------
   Source of truth: Homepage-v2 prototype (Sept launch) + Brand System.
   Reference design width: 1700px. All sizes are fluid around it.
   This sheet is the base for every future page of the site.
   ===================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face { font-family: 'Epilogue'; font-weight: 400; font-style: normal; src: url('../assets/fonts/Epilogue-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Epilogue'; font-weight: 500; font-style: normal; src: url('../assets/fonts/Epilogue-Medium.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Figtree'; font-weight: 300; font-style: normal; src: url('../assets/fonts/Figtree-Light.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Figtree'; font-weight: 400; font-style: normal; src: url('../assets/fonts/Figtree-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Figtree'; font-weight: 500; font-style: normal; src: url('../assets/fonts/Figtree-Medium.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Figtree'; font-weight: 600; font-style: normal; src: url('../assets/fonts/Figtree-SemiBold.ttf') format('truetype'); font-display: swap; }

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (Figma tokens) */
  --ink:          #252E37;   /* deep slate — dark bands, hero, footer */
  --ink-soft:     #3A434C;
  --paper:        #FBF8F6;   /* warm off-white (footer text) */
  --lime:         #E9FFA9;   /* signature accent */
  --orange:       #FFA05B;   /* arrows, ticks, chevrons — punctuation only */

  /* v2 interface colours (sampled from the prototype) */
  --bg:           #FFFFFF;
  --bg-band:      #F3F1EF;   /* approach band */
  --text:         #000000;   /* body & headings on light surfaces */
  --text-muted:   #999999;   /* resting state of collapsed work rows */
  --text-on-dark: #FFFFFF;
  --line:         rgba(0, 0, 0, 0.16);
  --line-strong:  rgba(0, 0, 0, 0.42);
  --line-on-dark: rgba(255, 255, 255, 0.35);

  /* Type */
  --font-heading: 'Epilogue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-sans: 'Figtree', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --header-text-size: clamp(0.8125rem, 0.94vw, 1rem);
  --ls-eyebrow: 0.16em;
  --ls-label:   0.08em;

  /* Layout */
  --container-pad: clamp(20px, 4.7vw, 80px);
  --container-max: 1760px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-quick:  160ms;
  --t-base:   300ms;
  --t-slow:   600ms;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  html.is-step-scrolling {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.6vw + 0.75rem, 1.1875rem);  /* ≈19px at 1700 */
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

main {
  isolation: isolate;
}

main > section {
  background: var(--bg);
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
}

main > section > * {
  min-width: 0;
}

@supports (height: 100dvh) {
  main > section { min-height: 100dvh; }
}

h1, h2, h3, h4, h5, h6, p, ul, dl, dd, figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
h1 strong, h2 strong, h3 strong, h4 strong, h5 strong, h6 strong { font-weight: 500; }
p { line-height: 1.4; }
ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong { font-weight: 600; }

::selection { background: var(--lime); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 0.35vw + 0.6rem, 0.875rem);
  font-weight: 400;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}

.br-desktop { display: none; }
@media (min-width: 720px) { .br-desktop { display: inline; } }

.obj-left  { object-position: 0% 50%; }
.obj-right { object-position: 100% 50%; }

/* ---------- Buttons (pill CTAs) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 15px 44px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  transition: background-color var(--t-quick) var(--ease-out),
              color var(--t-quick) var(--ease-out),
              transform var(--t-quick) var(--ease-out);
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: none; opacity: 0.85; }

.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #EFFFC0; }

.btn--ink { background: var(--ink); color: var(--text-on-dark); }
.btn--ink:hover { background: var(--ink-soft); }

/* Inline links with the orange ↗ mark */
.arrow-link { white-space: nowrap; }
.arrow-link__icon {
  display: inline-block;
  vertical-align: -0.08em;
  margin-right: 0.25em;
  color: var(--orange);
}
.arrow-link a {
  transition: color var(--t-quick) var(--ease-out);
}
.arrow-link a:hover { color: var(--orange); }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(20px, 2.4vw, 40px) var(--container-pad);
  color: var(--text-on-dark);
  transform: translate3d(0, 0, 0);
  transition: color var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
  will-change: transform;
}

.site-header.is-on-light { color: var(--ink); }
.site-header.is-hidden {
  transform: translate3d(0, calc(-100% - 16px), 0);
}

.site-header__tagline {
  font-size: var(--header-text-size);
  font-weight: 400;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
}

.site-header__logo { position: relative; z-index: 30; }
.site-header__logo img { width: clamp(120px, 9.4vw, 160px); height: auto; }

.site-header__nav { justify-self: end; }

.nav-list {
  display: flex;
  gap: clamp(20px, 2.2vw, 38px);
}

.nav-list__link {
  font-size: var(--header-text-size);
  font-weight: 400;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  padding-block: 6px;
  transition: color var(--t-quick) var(--ease-out);
}
.nav-list__link:hover { color: var(--lime); }
.site-header.is-on-light .nav-list__link:hover { color: var(--orange); }

.site-header__menu-toggle {
  display: none;
  justify-self: end;
  width: 44px; height: 44px;
  position: relative;
  z-index: 30;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out);
}
.menu-icon { top: calc(50% - 1px); }
.menu-icon::before { left: 0; right: 0; top: -7px; }
.menu-icon::after  { left: 0; right: 0; top: 7px; }
.site-header__menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.site-header__menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.site-header__menu-toggle[aria-expanded="true"] .menu-icon::after  { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--text-on-dark);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(120px, 12.6vw, 215px) var(--container-pad) clamp(64px, 5vw, 96px);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 820px;
}

.hero__title {
  font-size: clamp(2.25rem, 3.53vw, 3.75rem);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: 0;
}

.hero__accent { color: var(--lime); }

.hero__intro {
  --hero-intro-measure: clamp(32ch, 48vw, 50ch);
  position: relative;
  margin-top: clamp(36px, 3.6vw, 62px);
  margin-right: auto;
  margin-left: auto;
  max-width: var(--hero-intro-measure);
  font-size: clamp(1rem, 1.29vw, 1.375rem);
  font-weight: 300;
  line-height: 1.4;
  display: block;
}
.hero__intro-final {
  display: block;
  max-width: var(--hero-intro-measure);
}

.hero__cta { margin-top: 10px; }
.hero__cta-line {
  display: block;
  width: 1px;
  height: clamp(56px, 5.4vw, 92px);
  margin: 10px auto 26px;
  background: linear-gradient(180deg, var(--orange) 0%, rgba(255, 108, 31, 0) 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero.is-narration-ready .hero__cta-line,
  .hero.is-narration-ready .hero__cta .btn {
    opacity: 0;
  }

  .hero.is-narration-ready .hero__intro-final {
    opacity: 0;
    transform: translateY(8px);
  }

  .hero.is-narrating .hero__intro-final {
    animation: heroIntroFadeIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .hero.is-narration-complete .hero__intro-final {
    opacity: 1;
    transform: none;
  }

  .hero.is-narration-complete .hero__cta-line {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    animation: heroCtaLine 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
  }

  .hero.is-narration-complete .hero__cta .btn {
    opacity: 0;
    animation: heroCtaButton 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.48s forwards;
  }
}

@keyframes heroIntroFadeIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroCtaLine {
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes heroCtaButton {
  to {
    opacity: 1;
  }
}

/* --- Hero showcase --- */
.hero__collage {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: clamp(300px, 30vw, 520px);
  --hero-card-large-w: clamp(236px, 15.5vw, 264px);
  --hero-card-large-h: clamp(392px, 57.5svh, 718px);
  --hero-card-small-w: clamp(176px, 12.5vw, 212px);
  --hero-card-small-h: clamp(324px, 47.3svh, 590px);
  --hero-card-large-top: clamp(176px, 22.6svh, 282px);
  --hero-card-small-top: clamp(214px, 27.7svh, 346px);
  perspective: 1100px;
  pointer-events: none;
}

.hero__collage--left  { left: 0; }
.hero__collage--right { right: 0; }

.hero__collage::before {
  content: none;
}

.hero__card {
  --hero-card-enter-x: 0px;
  --hero-card-enter-y: 18px;
  --hero-card-depth: 0px;
  --hero-card-tilt: 0deg;
  --hero-card-settle-tilt: 0deg;
  position: absolute;
  overflow: hidden;
  border-radius: 5px;
  background: #d9d9d2;
  transform-origin: center;
}

.hero__card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.12));
  mix-blend-mode: multiply;
}

.hero__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__card--tall {
  z-index: 3;
  width: var(--hero-card-large-w);
  height: var(--hero-card-large-h);
}

.hero__card:not(.hero__card--tall) {
  z-index: 1;
  top: var(--hero-card-small-top);
  width: var(--hero-card-small-w);
  height: var(--hero-card-small-h);
}

.hero__card:not(.hero__card--tall)::after {
  mix-blend-mode: normal;
}

.hero__collage--left .hero__card--tall {
  --hero-card-enter-x: -112px;
  --hero-card-enter-y: 20px;
  --hero-card-depth: 52px;
  --hero-card-tilt: 5deg;
  --hero-card-settle-tilt: -1deg;
  left: clamp(-8px, -0.35vw, -6px);
  top: var(--hero-card-large-top);
  box-shadow:
    32px 0 48px rgba(0, 0, 0, 0.35),
    12px 28px 58px rgba(0, 0, 0, 0.32);
}

.hero__collage--left .hero__card:not(.hero__card--tall) {
  --hero-card-enter-x: -84px;
  --hero-card-enter-y: 14px;
  --hero-card-depth: -34px;
  --hero-card-tilt: 3.5deg;
  --hero-card-settle-tilt: -0.7deg;
  left: clamp(148px, 13.2vw, 224px);
}

.hero__collage--left .hero__card:not(.hero__card--tall)::after {
  background:
    linear-gradient(90deg,
      rgba(37, 46, 55, 0.1) 0%,
      rgba(37, 46, 55, 0.42) 58%,
      var(--ink) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18));
}

.hero__collage--left .hero__card--tall img {
  object-position: 50% 50%;
}

.hero__collage--left .hero__card:not(.hero__card--tall) img {
  object-position: 50% 50%;
}

.hero__collage--right .hero__card:not(.hero__card--tall) {
  --hero-card-enter-x: 84px;
  --hero-card-enter-y: 14px;
  --hero-card-depth: -34px;
  --hero-card-tilt: -3.5deg;
  --hero-card-settle-tilt: 0.7deg;
  right: clamp(204px, 13.7vw, 234px);
}

.hero__collage--right .hero__card:not(.hero__card--tall)::after {
  background:
    linear-gradient(90deg,
      var(--ink) 0%,
      rgba(37, 46, 55, 0.42) 42%,
      rgba(37, 46, 55, 0.1) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18));
}

.hero__collage--right .hero__card--tall {
  --hero-card-enter-x: 112px;
  --hero-card-enter-y: 20px;
  --hero-card-depth: 52px;
  --hero-card-tilt: -5deg;
  --hero-card-settle-tilt: 1deg;
  right: clamp(-22px, -1.1vw, -18px);
  top: var(--hero-card-large-top);
  box-shadow:
    -32px 0 48px rgba(0, 0, 0, 0.35),
    -12px 28px 58px rgba(0, 0, 0, 0.32);
}

.hero__collage--right .hero__card:not(.hero__card--tall) img {
  object-position: 46% 50%;
}

.hero__collage--right .hero__card--tall img {
  object-position: 48% 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero.is-showcase-ready .hero__card {
    opacity: 0;
    transform:
      translate3d(var(--hero-card-enter-x), var(--hero-card-enter-y), var(--hero-card-depth))
      scale(0.945)
      rotateY(var(--hero-card-tilt));
    filter: saturate(0.9) brightness(0.86);
    will-change: opacity, transform, filter;
  }

  .hero.is-showcase-animated .hero__card {
    animation: heroProjectCardIn 1.18s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  }

  .hero.is-showcase-animated .hero__card--tall {
    animation-delay: 0.08s;
  }

  .hero.is-showcase-animated .hero__card:not(.hero__card--tall) {
    animation-delay: 0.62s;
  }
}

@keyframes heroProjectCardIn {
  0% {
    opacity: 0;
    transform:
      translate3d(var(--hero-card-enter-x), var(--hero-card-enter-y), var(--hero-card-depth))
      scale(0.945)
      rotateY(var(--hero-card-tilt));
    filter: saturate(0.9) brightness(0.86);
  }

  56% {
    opacity: 1;
    transform:
      translate3d(calc(var(--hero-card-enter-x) * -0.025), -2px, 6px)
      scale(1.006)
      rotateY(var(--hero-card-settle-tilt));
    filter: saturate(1.01) brightness(1.015);
  }

  82% {
    opacity: 1;
    transform:
      translate3d(calc(var(--hero-card-enter-x) * -0.006), -0.5px, 1px)
      scale(1.001)
      rotateY(0deg);
    filter: saturate(1) brightness(1.004);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateY(0deg);
    filter: saturate(1) brightness(1);
  }
}

/* =====================================================================
   INTRO STATEMENT + CLIENTS
   ===================================================================== */
.intro {
  display: grid;
  align-content: center;
  padding-top: clamp(88px, 14.1vw, 240px);
  padding-bottom: clamp(88px, 10vw, 170px);
  text-align: center;
}

.intro__statement {
  width: 100%;
  max-width: 1500px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
  font-size: clamp(1.375rem, 2.45vw, 2.625rem);
  font-weight: 400;
  line-height: 1.5;
}

.clients {
  width: 100%;
  min-width: 0;
  margin-top: clamp(72px, 9vw, 160px);
}

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

.clients__marquee {
  width: 100%;
  min-width: 0;
  margin-top: clamp(40px, 4.4vw, 76px);
  overflow: hidden;
}

.clients__track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 7vw, 120px);
  width: max-content;
  max-width: none;
  min-width: 100%;
  padding-inline: clamp(24px, 3.5vw, 60px);
}

/* JS duplicates the logo set and adds .is-animated for the marquee */
.clients__track.is-animated {
  justify-content: flex-start;
  animation: marquee 36s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.clients__track li { flex-shrink: 0; }

.clients__track img {
  height: clamp(28px, 2.8vw, 48px);
  width: auto;
  filter: grayscale(1);
  opacity: 0.85;
}

/* =====================================================================
   WORK
   ===================================================================== */
.work {
  padding-top: clamp(112px, 9vw, 156px);
  padding-bottom: clamp(72px, 8vw, 136px);
}

.work__heading {
  text-align: center;
  font-size: clamp(1.625rem, 2.7vw, 2.875rem);
  font-weight: 400;
  line-height: 1.3;
  padding-inline: var(--container-pad);
  margin-bottom: clamp(48px, 6.2vw, 105px);
}

.work__list {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.work-row {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(14px, 1vw, 17px);
  transition: padding var(--t-slow) var(--ease-out);
}
.work-row:first-child { border-top: 0; }
.work-row--active {
  padding-top: clamp(18px, 1.4vw, 24px);
  padding-bottom: clamp(32px, 3vw, 52px);
}

.work-row__link {
  display: grid;
  grid-template-columns: minmax(0, 32fr) minmax(0, 68fr);
  gap: clamp(24px, 2.5vw, 44px);
  align-items: center;
  min-width: 0;
}

.work-row__link:focus-visible {
  outline-offset: 10px;
}

.work-row__title {
  font-size: clamp(1.375rem, 1.91vw, 2.03125rem);
  font-weight: 500;
  line-height: 1.25;
  transition: color var(--t-base) var(--ease-out);
}

.work-row__description {
  margin-top: 0;
  max-width: 34em;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: clamp(0.9375rem, 0.4vw + 0.7rem, 1.125rem);
  font-weight: 400;
  line-height: 1.4;
  transform: translateY(-4px);
  transition:
    margin-top var(--t-slow) var(--ease-out),
    max-height var(--t-slow) var(--ease-out),
    opacity var(--t-base) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}

.work-row--active .work-row__description {
  margin-top: clamp(16px, 1.8vw, 30px);
  max-height: 8em;
  opacity: 1;
  transform: translateY(0);
}

.work-row__tags {
  margin-top: clamp(16px, 1.8vw, 30px);
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(16px, 1.8vw, 30px);
  font-size: clamp(0.6875rem, 0.3vw + 0.55rem, 0.8125rem);
  font-weight: 400;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

.work-row__media {
  display: flex;
  justify-content: flex-end;
  gap: clamp(8px, 0.75vw, 13px);
  width: 100%;
  min-width: 0;
  transition: opacity var(--t-slow) var(--ease-out), filter var(--t-slow) var(--ease-out);
}

.work-row__img,
.work-row__placeholder {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: clamp(96px, 8.8vw, 150px);
  border-radius: 3px;
  overflow: hidden;
  transition: height var(--t-slow) var(--ease-out), opacity var(--t-slow) var(--ease-out);
}

.work-row__img img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.work-row--active .work-row__img,
.work-row--active .work-row__placeholder {
  height: clamp(200px, 20vw, 340px);
}

.work-row__placeholder {
  background: linear-gradient(180deg, #D2D2D2 0%, #F4F4F4 100%);
}

.work-row--active.work-row--featured .work-row__img:first-child { flex: 0 1 36%; }
.work-row--active.work-row--featured .work-row__img:last-child  { flex: 0 1 62.7%; }

.work-row__img::after,
.work-row__placeholder::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 72%;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 1;
  transition: opacity var(--t-slow) var(--ease-out);
}

.work-row--active .work-row__img::after,
.work-row--active .work-row__placeholder::after {
  opacity: 0;
}

/* Resting state: collapsed rows sit quietly until hovered/focused */
.work-row:not(.work-row--active) .work-row__title { color: var(--text-muted); }
.work-row:not(.work-row--active) .work-row__tags  { color: var(--text-muted); }
.work-row:not(.work-row--active) .work-row__media { opacity: 0.5; }

.work__cta {
  text-align: center;
  margin-top: clamp(56px, 5.9vw, 100px);
  padding-inline: var(--container-pad);
}

@media (hover: hover) and (pointer: fine) {
  .work.has-work-cursor .work__list,
  .work.has-work-cursor .work-row__link {
    cursor: none;
  }

  .work-row__link:hover .work-row__title {
    color: var(--text);
  }

  .work-cursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 90;
    display: grid;
    align-content: center;
    justify-items: center;
    row-gap: 2px;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 160, 91, 0.8);
    color: var(--ink);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(var(--work-cursor-x, -120px), var(--work-cursor-y, -120px), 0) translate(-50%, -50%) scale(0.72);
    transition: opacity var(--t-quick) var(--ease-out),
                transform var(--t-base) var(--ease-out);
  }

  .work-cursor::before {
    content: "View";
  }

  .work-cursor.is-visible {
    opacity: 1;
    transform: translate3d(var(--work-cursor-x, -120px), var(--work-cursor-y, -120px), 0) translate(-50%, -50%) scale(1);
  }
}

/* =====================================================================
   EXPERTISE (dark stats band)
   ===================================================================== */
.expertise {
  min-height: auto;
  margin-top: 0;
  background: var(--ink);
  color: var(--text-on-dark);
  padding: clamp(40px, 4.2vw, 72px) var(--container-pad) clamp(40px, 4.2vw, 72px);
  display: block;
}

.expertise__eyebrow {
  max-width: var(--container-max);
  margin-inline: auto;
  text-align: center;
  color: var(--text-on-dark);
}

.expertise__stats {
  max-width: var(--container-max);
  margin: clamp(28px, 3.4vw, 56px) auto 0;
  padding-inline: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 0;
}

.stat { display: grid; grid-template-rows: subgrid; grid-row: span 2; }

.expertise__stats { grid-template-rows: auto auto; }

.stat__value {
  grid-row: 1;
  align-self: end;
  padding-right: clamp(16px, 2vw, 40px);
  padding-bottom: clamp(12px, 1.3vw, 22px);
  border-bottom: 1px solid var(--line-on-dark);
  color: var(--lime);
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 2.76vw, 2.9375rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.stat__label {
  grid-row: 2;
  padding-top: clamp(14px, 1.6vw, 28px);
  padding-right: clamp(16px, 2vw, 40px);
  max-width: 12em;
  font-size: clamp(0.875rem, 0.5vw + 0.6rem, 1.25rem);
  font-weight: 400;
  line-height: 1.4;
}

/* =====================================================================
   AUDIENCES (we work with / delivering)
   ===================================================================== */
.audiences {
  min-height: auto;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(84px, 8vw, 144px) var(--container-pad);
  display: grid;
  grid-template-columns: minmax(0, 54fr) minmax(0, 46fr);
  gap: clamp(28px, 2.4vw, 40px);
  align-content: center;
}

.audiences__col {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 3vw, 52px);
  align-items: start;
}

.audiences__eyebrow {
  padding-top: 0.7em;
  color: var(--text);
  min-width: clamp(110px, 9vw, 155px);
}

.audiences__col--delivering { grid-template-columns: auto 1fr; }
.audiences__col--delivering .audiences__eyebrow { min-width: clamp(96px, 7vw, 120px); }
.audiences__col--delivering { gap: clamp(20px, 2.3vw, 40px); }

.audiences__list {
  font-size: clamp(1.375rem, 2.41vw, 2.5625rem);
  font-weight: 400;
  line-height: 1.42;
}

.audiences__wheel {
  overflow: hidden;
}

.audiences__list--wheel {
  --wheel-y: 0px;
  transform: translate3d(0, var(--wheel-y), 0);
}

.audiences__list--wheel.is-animating {
  transition: transform 1100ms var(--ease-out);
}

.audiences__list--wheel li {
  opacity: 0.18;
  transition: opacity 700ms var(--ease-out),
              font-weight 700ms var(--ease-out);
}

.audiences__list--wheel li:nth-child(1) { opacity: 1; font-weight: 500; }
.audiences__list--wheel li:nth-child(2) { opacity: 0.62; }
.audiences__list--wheel li:nth-child(3) { opacity: 0.42; }
.audiences__list--wheel li:nth-child(4) { opacity: 0.26; }

.audiences__audience-button {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}

.audiences__audience-button:hover,
.audiences__audience-button:focus-visible {
  color: var(--orange);
}

.audiences__list--ruled {
  border-left: 1.5px solid var(--text);
  padding-left: clamp(20px, 1.6vw, 28px);
  font-size: clamp(1.25rem, 2.24vw, 2.375rem);
  font-weight: 400;
  line-height: 1.38;
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
}

.audiences__list--ruled li {
  animation: deliveringCurtain 560ms var(--ease-out) both;
  animation-delay: var(--deliver-delay, 0ms);
  transform-origin: top;
}

.audiences__list--ruled.is-changing {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
}

@keyframes deliveringCurtain {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translate3d(0, -0.7em, 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .audiences__list--ruled li {
    animation: none;
  }
}

/* =====================================================================
   APPROACH
   ===================================================================== */
.approach {
  background: var(--bg-band);
  padding: clamp(80px, 8.2vw, 140px) var(--container-pad) clamp(72px, 7.5vw, 128px);
  display: grid;
  align-content: center;
  text-align: center;
}

.approach__heading {
  font-size: clamp(1.625rem, 2.6vw, 2.75rem);
  font-weight: 400;
  line-height: 1.3;
}

.approach__intro {
  margin: clamp(24px, 2.6vw, 45px) auto 0;
  max-width: 46em;
  font-size: clamp(1rem, 1.29vw, 1.375rem);
  font-weight: 400;
  line-height: 1.4;
}

.approach__pillars {
  max-width: 1560px;
  margin: clamp(64px, 5.8vw, 104px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(36px, 4.5vw, 80px);
  text-align: left;
}

.pillar {
  display: flex;
  align-items: center;
  gap: clamp(18px, 1.7vw, 30px);
}

.pillar__icon {
  width: clamp(72px, 6.5vw, 110px);
  height: auto;
  flex-shrink: 0;
}

.pillar__text {
  font-size: clamp(1rem, 1.35vw, 1.4375rem);
  font-weight: 500;
  line-height: 1.4;
  max-width: 21em;
}

.approach__cta { margin-top: clamp(56px, 6.3vw, 108px); }

/* =====================================================================
   CASE STUDY TEMPLATE
   ===================================================================== */
.case-study {
  background: var(--bg);
}

.case-study-hero {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(112px, 8.8vw, 150px) var(--container-pad) clamp(56px, 6vw, 104px);
}

.case-study-hero__media {
  position: relative;
  aspect-ratio: 16 / 7.15;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-band);
}

.case-study-hero__media img,
.case-study-row__media img,
.case-study-pair__item img,
.case-study-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-study-hero__intro {
  margin-top: clamp(48px, 4.8vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 40fr) minmax(22ch, 26fr) minmax(26ch, 32fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}

.case-study-hero__title {
  font-size: clamp(2.375rem, 4.2vw, 4.5rem);
  font-weight: 500;
  line-height: 1.04;
}

.case-study-hero__summary {
  max-width: 33em;
  font-size: clamp(1rem, 0.55vw + 0.78rem, 1.1875rem);
  line-height: 1.35;
}

.case-study-meta {
  display: grid;
  gap: clamp(12px, 1vw, 17px);
  font-size: clamp(0.8125rem, 0.28vw + 0.68rem, 0.9375rem);
  line-height: 1.35;
}

.case-study-meta__row {
  display: grid;
  grid-template-columns: minmax(70px, 0.36fr) minmax(0, 1fr);
  gap: clamp(14px, 1.2vw, 20px);
}

.case-study-meta dt,
.case-study-row__heading {
  color: var(--ink-soft);
}

.case-study-meta dt {
  font-size: 0.78em;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

.case-study-meta dd {
  margin: 0;
  font-weight: 500;
}

.case-study-row {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(18px, 1.8vw, 30px) var(--container-pad);
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  gap: clamp(32px, 5vw, 92px);
  align-items: center;
}

.case-study-row + .case-study-row {
  border-top: 1px solid var(--line);
}

.case-study-row__copy {
  max-width: 38em;
}

.case-study-row__heading {
  margin-bottom: clamp(24px, 3.4vw, 58px);
  font-weight: 600;
}

.case-study-row__copy p {
  font-size: clamp(0.9375rem, 0.38vw + 0.72rem, 1.125rem);
  line-height: 1.35;
}

.case-study-row__media,
.case-study-pair__item,
.case-study-gallery__item {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-band);
}

.case-study-row__media {
  aspect-ratio: 16 / 8.8;
}

.case-study-row__media--dark {
  background: var(--ink);
}

.case-study-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.48fr);
  gap: clamp(12px, 1vw, 18px);
}

.case-study-pair__item {
  aspect-ratio: 1 / 1;
}

.case-study-pair__item:first-child {
  aspect-ratio: 1.28 / 1;
}

.case-study-gallery {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(16px, 1.4vw, 24px) var(--container-pad) clamp(100px, 10vw, 180px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1vw, 18px);
}

.case-study-gallery__item {
  min-height: clamp(220px, 28vw, 480px);
  grid-column: span 3;
}

.case-study-gallery__item--large {
  grid-column: span 3;
  grid-row: span 2;
}

.case-study-gallery__item--portrait {
  grid-column: span 2;
}

.case-study-gallery__item--large img {
  object-position: 50% 42%;
}

.case-study-gallery__credit {
  grid-column: 1 / -1;
  margin-top: clamp(8px, 1vw, 16px);
  font-size: clamp(0.8125rem, 0.32vw + 0.68rem, 0.9375rem);
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact {
  max-width: var(--container-max);
  margin-inline: auto;
  min-height: calc(100svh - clamp(66px, 4.8vw, 76px));
  padding: clamp(36px, 2.8vw, 52px) var(--container-pad) clamp(42px, 4vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 44fr);
  column-gap: clamp(48px, 9vw, 160px);
  align-items: start;
  align-content: center;
}

@supports (height: 100dvh) {
  .contact { min-height: calc(100dvh - clamp(66px, 4.8vw, 76px)); }
}

@media (min-width: 1400px) {
  .contact {
    padding-top: clamp(56px, 4.1vw, 70px);
  }
}

.contact__heading {
  font-size: clamp(1.875rem, 3.15vw, 3.4375rem);
  font-weight: 400;
  line-height: 1.12;
}

.contact__help {
  margin-top: clamp(32px, 3.6vw, 62px);
  font-size: clamp(1rem, 1.29vw, 1.375rem);
  line-height: 1.4;
}

.contact-form__lead {
  font-size: clamp(1rem, 1.29vw, 1.375rem);
  line-height: 1.4;
}
.contact-form__lead-heading {
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

.contact-form__fields {
  margin-top: clamp(32px, 3.6vw, 58px);
  display: grid;
  gap: clamp(16px, 1.35vw, 23px);
}

.form-field { margin: 0; position: relative; }

.form-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 2.6vw, 44px);
}

.form-field__input {
  display: block;
  width: 100%;
  padding: 4px 2px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text);
  transition: border-color var(--t-quick) var(--ease-out);
}
.form-field__input:focus {
  outline: none;
  border-bottom-color: var(--orange);
}
.form-field__input::placeholder {
  color: var(--text);
  opacity: 0.85;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

/* Selects: mimic the placeholder look until an option is chosen */
.form-field--select .form-field__input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 36px;
  letter-spacing: 0;
  text-transform: none;
}
.form-field--select .form-field__input:invalid {
  letter-spacing: var(--ls-label);
  text-transform: none;
}
.form-field--select .form-field__input option {
  letter-spacing: 0;
  text-transform: none;
}
.form-field--select .form-field__input option[value=""] {
  letter-spacing: var(--ls-label);
  text-transform: none;
}
.form-field--select::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 6px;
  width: 14px; height: 14px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 5l4.5 4.5L11.5 5' fill='none' stroke='%23FFA05B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.form-field--textarea {
  margin-top: clamp(12px, 1.9vw, 32px);
}
.form-field--textarea .form-field__input {
  height: 42px;
  min-height: 42px;
  padding-top: 14px;
  padding-bottom: 8px;
  resize: vertical;
}

.contact-form__error {
  margin-top: 20px;
  font-size: 0.875rem;
  color: #C24E1D;
}

.contact-form__submit { margin-top: clamp(28px, 2.4vw, 40px); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: none;
  padding: clamp(14px, 1vw, 17px) var(--container-pad);
}

.site-footer__logo img { width: clamp(110px, 8.2vw, 140px); height: auto; }

.site-footer__legal {
  text-align: center;
  font-size: clamp(0.75rem, 0.3vw + 0.6rem, 0.875rem);
  font-weight: 300;
}
.site-footer__legal strong { font-weight: 600; }
.site-footer__legal a {
  font-weight: 600;
  transition: color var(--t-quick) var(--ease-out);
}
.site-footer__legal a:hover { color: var(--lime); }

.site-footer__social {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-footer__social a {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  color: var(--lime);
  transition: color var(--t-quick) var(--ease-out);
}
.site-footer__social a:hover { color: var(--text-on-dark); }

/* =====================================================================
   REVEAL ON SCROLL (subtle, disabled with reduced motion)
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  main > section.is-scroll-panel {
    z-index: var(--panel-index, 1);
  }

  main > section.is-scroll-tall {
    z-index: var(--panel-index, 1);
  }

  main > section.is-snap-sequence {
    z-index: var(--panel-index, 1);
  }

  main > section.is-combined-block {
    z-index: var(--panel-index, 1);
  }

  .hero__content,
  .hero__collage,
  .intro__statement,
  .clients,
  .work__heading,
  .work-row,
  .work__cta,
  .expertise__eyebrow,
  .expertise__stats,
  .audiences__col,
  .approach__heading,
  .approach__intro,
  .approach__pillars,
  .approach__cta,
  .contact__pitch,
  .contact-form {
    --parallax-y: 0px;
  }

  .is-scroll-panel .hero__content,
  .is-scroll-panel .hero__collage,
  .is-scroll-panel .intro__statement,
  .is-scroll-panel .clients,
  .is-scroll-panel .work__heading,
  .is-scroll-panel .work-row,
  .is-scroll-panel .work__cta,
  .is-scroll-panel .expertise__eyebrow,
  .is-scroll-panel .expertise__stats,
  .is-scroll-panel .audiences__col,
  .is-scroll-panel .approach__heading,
  .is-scroll-panel .approach__intro,
  .is-scroll-panel .approach__pillars,
  .is-scroll-panel .approach__cta,
  .is-scroll-panel .contact__pitch,
  .is-scroll-panel .contact-form {
    transform: translate3d(0, var(--parallax-y), 0);
    will-change: transform;
  }

  .reveal {
    --reveal-y: 26px;
    opacity: 0;
    transform: translate3d(0, calc(var(--reveal-y) + var(--parallax-y, 0px)), 0);
    transition: opacity var(--t-slow) var(--ease-out),
                transform var(--t-slow) var(--ease-out);
  }
  .reveal.is-visible {
    opacity: 1;
    --reveal-y: 0px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients__track.is-animated { animation: none; }
  .btn:hover { transform: none; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* --- Laptop / small desktop --- */
@media (max-width: 1750px) {
  .hero__title {
    font-size: clamp(2.25rem, 3.3vw, 3.5rem);
  }
}

@media (max-width: 1200px) {
  .work-row__link { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }
}

/* --- Tablet --- */
@media (max-width: 980px) {
  .hero { padding-top: 150px; }

  .hero__collage { width: 280px; }
  .hero__collage--left  { left: -48px; }
  .hero__collage--right { right: -48px; }

  .case-study-hero__intro {
    grid-template-columns: 1fr;
    gap: clamp(24px, 4vw, 40px);
  }

  .case-study-meta {
    max-width: 620px;
  }

  .case-study-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .case-study-row__heading {
    margin-bottom: 18px;
  }

  .expertise__stats {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    row-gap: clamp(24px, 4vw, 40px);
  }
  .stat { display: flex; flex-direction: column; }
  .stat__value { order: -1; }
  .site-header__tagline { display: none; }
  .site-header { grid-template-columns: auto 1fr; }
  .site-header__logo { justify-self: start; }

  .audiences {
    grid-template-columns: 1fr;
    row-gap: clamp(32px, 5vw, 52px);
  }

  .approach__pillars {
    grid-template-columns: 1fr;
    max-width: 560px;
    gap: clamp(28px, 5vw, 44px);
  }

  .contact {
    grid-template-columns: 1fr;
    row-gap: clamp(56px, 8vw, 80px);
  }
  .contact-form { max-width: 640px; }
}

/* --- Mobile nav + stacked layouts --- */
@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }
  .site-header__tagline { display: none; }
  .site-header__logo { justify-self: start; }
  .site-header__menu-toggle { display: block; }

  .site-header__nav {
    position: fixed;
    inset: 0;
    justify-self: stretch;
    z-index: 25;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: var(--text-on-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base) var(--ease-out),
                visibility 0s linear var(--t-base);
  }
  .site-header__nav.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 36px;
  }
  .nav-list__link { font-size: 1.25rem; }

  /* Hero: text only, collage hidden to keep the message legible */
  .hero { padding-top: 130px; }
  .hero__collage { display: none; }

  .work-row__link {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .work-row {
    padding-block: 28px;
  }
  .work-row__media { justify-content: flex-start; }
  .work-row__description {
    margin-top: 16px;
    max-height: none;
    opacity: 1;
    transform: none;
  }
  .work-row__img,
  .work-row__placeholder,
  .work-row--active .work-row__img,
  .work-row--active .work-row__placeholder {
    height: clamp(108px, 28vw, 180px);
  }
  .work-row--active.work-row--featured .work-row__img:first-child,
  .work-row--active.work-row--featured .work-row__img:last-child {
    flex: 1 1 0;
  }

  .case-study-hero {
    padding-top: 112px;
  }

  .case-study-hero__media,
  .case-study-row__media {
    aspect-ratio: 4 / 3;
  }

  .case-study-pair,
  .case-study-gallery {
    grid-template-columns: 1fr;
  }

  .case-study-pair__item,
  .case-study-pair__item:first-child,
  .case-study-gallery__item,
  .case-study-gallery__item--large,
  .case-study-gallery__item--portrait {
    grid-column: auto;
    aspect-ratio: 4 / 3;
    min-height: auto;
  }

  .case-study-gallery__item--portrait {
    aspect-ratio: 1 / 1.1;
  }

  /* Touch devices: rows readable by default */
  .work-row:not(.work-row--active) .work-row__media { opacity: 0.75; }
  .work-row:not(.work-row--active) .work-row__title { color: var(--text); }
  .work-row:not(.work-row--active) .work-row__tags  { color: var(--text); }

  .audiences__col { grid-template-columns: 1fr; gap: 20px; }
  .audiences__eyebrow { padding-top: 0; }

  .pillar { align-items: flex-start; }

  .form-field-row { grid-template-columns: 1fr; gap: clamp(28px, 2.6vw, 44px); }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 18px;
    text-align: center;
    padding-block: 32px;
  }
  .site-footer__social { justify-self: center; }
}

/* --- Small mobile --- */
@media (max-width: 420px) {
  .btn { width: 100%; padding-inline: 24px; }
  .work-row__img,
  .work-row__placeholder,
  .work-row--active .work-row__img,
  .work-row--active .work-row__placeholder { height: 84px; }
}
