/* =========================================================================
   Alice Murrell - Portfolio site styles
   Built on the Alice Designs design system tokens. Dark ink canvas,
   Cormorant display, Figtree UI, one signal green. Editorial & restrained.
   ========================================================================= */

:root {
  /* Teammate note (Alice): remove JetBrains Mono everywhere. Override the DS
     mono token so every var(--font-mono) reference resolves to Figtree -
     Figtree (Light) is now the only non-serif voice on the site. */
  --font-mono: var(--font-sans);

  /* Teammate note (Alice): the muted type read too gold (sand-500). Use the
     lighter, less-saturated sand-400 for all secondary/caption typography. */
  --text-muted: var(--sand-400);

  /* Teammate note: wider page margins - raise the gutter cap to 176px. */
  --gutter: clamp(2.5rem, 7vw, 11rem);

  /* Wider desktop container for more presence. */
  --container-max: 1440px;

  /* Teammate note: drop all hairline dividers - they read as templated/"AI".
     This neutralises every var(--hairline) border (section rules, list-row
     separators, image-frame outlines, nav underline) in one place. Control
     outlines use --border-default/strong, so buttons & inputs are unaffected. */
  --hairline: transparent;

  /* Single source of truth for button height - nav CTA and all .btn share it
     so they can never drift out of alignment (per Alice's note). */
  --btn-h: 38px;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  overflow-x: clip;
  font-weight: 300; /* Figtree Light as the sans default */
}
#root { min-height: 100vh; }

/* Lenis smooth scroll baseline ------------------------------------------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Lucide icon default ---------------------------------------------------- */
.icon { width: 1em; height: 1em; stroke-width: 1.6; display: inline-block; vertical-align: -0.125em; }

/* Layout ----------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap-wide { max-width: 1440px; }

/* Section rhythm */
.section { padding-block: clamp(96px, 15vh, 220px); }
.section-tight { padding-block: clamp(72px, 10vh, 150px); }

/* Type helpers ----------------------------------------------------------- */
/* All headings render in Cormorant Light, per the design system. */
h1, h2, h3, h4, h5, h6 { font-weight: var(--weight-light); }
.display {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
.italic { font-style: italic; font-weight: 300; }
/* Cormorant Light (300) on display titles incl. italic emphasis - the DS
   sets .display .italic/em/i to 400; keep all title type at 300. */
.display em, .display i, .display .italic { font-weight: 300; }
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-weight: 300;
}
/* DS eyebrow used on pages - keep it Figtree Light too. */
.ad-eyebrow { font-weight: 300; }
/* Eyebrows & small labels use sand-300 (#E0D5BD), per the design system. */
.ad-eyebrow, .eyebrow, .bio-label, .mono, .count { color: var(--sand-300); }
.lead {
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--text-body);
  text-wrap: pretty;
}
.muted { color: var(--text-muted); }

/* Links with the editorial underline ------------------------------------- */
.link-underline {
  color: var(--text-strong);
  text-decoration: none;
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform var(--dur-base) var(--ease-out);
}
.link-underline:hover::after { transform-origin: left; transform: scaleX(1); }

/* =========================================================================
   Scroll reveal
   ========================================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Line-mask reveal for big display type */
.reveal-line { overflow: hidden; display: block; }
.reveal-line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.05s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-line.is-in > span { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .reveal-line > span { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================================
   Custom cursor
   ========================================================================= */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--sand-50);
}
.cursor-ring {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid var(--sand-50);
  transition: width var(--dur-base) var(--ease-out), height var(--dur-base) var(--ease-out),
              margin var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
  display: flex; align-items: center; justify-content: center;
}
.cursor-ring .cursor-label {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-900);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  mix-blend-mode: normal;
}
body.cursor-hover .cursor-ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
body.cursor-view .cursor-ring {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  background: var(--green-400); border-color: var(--green-400);
  mix-blend-mode: normal;
}
body.cursor-view .cursor-ring .cursor-label { opacity: 1; }
body.cursor-view .cursor-dot { opacity: 0; }
body.cursor-hidden .cursor-dot, body.cursor-hidden .cursor-ring { opacity: 0; }

/* Hide native cursor only when custom cursor active (fine pointer) */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button,
  body.has-cursor [data-cursor], body.has-cursor .magnetic { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================================
   Navigation
   ========================================================================= */
.nav {
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  width: 100%;
  background: var(--surface-page);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow var(--dur-base) var(--ease-out), transform 0.4s var(--ease-out);
}
.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 112px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav.is-scrolled { box-shadow: var(--shadow-sm); }
.nav.is-hidden { transform: none; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-wordmark { font-family: var(--font-display); font-size: 19px; color: var(--text-strong); letter-spacing: -0.01em; white-space: nowrap; }
.nav-wordmark b { font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-ui); font-size: 14.5px; font-weight: 300;
  color: var(--text-muted); text-decoration: none;
  padding: 9px 15px; border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--text-strong); }
.nav-links a.is-active { color: var(--text-strong); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 300; letter-spacing: 0.01em;
  height: var(--btn-h); padding: 0 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--accent); color: var(--text-on-accent); text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-menu-btn { display: none; }
.nav-mobile { display: none; }

@media (max-width: 720px) {
  .nav-inner { height: 72px; }
  .nav-logo { height: 40px; }
  .nav-links, .nav .nav-cta { display: none; }
  .nav-menu-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: none; color: var(--text-strong);
    font-family: var(--font-ui); font-size: 14px; font-weight: 300;
    padding: 10px 12px; cursor: pointer;
  }
  .nav-mobile {
    position: fixed; inset: 0; z-index: 99;
    background: var(--surface-page);
    display: flex; flex-direction: column; justify-content: center;
    padding: var(--gutter);
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease-out);
  }
  .nav-mobile.is-open { transform: none; }
  .nav-mobile a {
    font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 8vw, 3rem);
    color: var(--text-strong); text-decoration: none; padding: 10px 0;
    border-bottom: 1px solid var(--hairline); letter-spacing: -0.02em;
  }
}

/* =========================================================================
   Buttons (site-level, mirrors DS primitives for plain anchors)
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 300; letter-spacing: 0.01em;
  height: var(--btn-h); padding: 0 22px;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--sand-300); color: var(--ink-900); }
.btn-primary:hover { background: var(--sand-400); }
.btn-secondary { background: transparent; color: var(--text-strong); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-sunken); border-color: var(--sand-300); }
.btn-ghost { background: transparent; color: var(--text-strong); padding-inline: 4px; }
.btn .icon { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .icon[data-arrow] { transform: translate(3px, -3px); }
.btn:hover .icon[data-down] { transform: translateY(3px); }

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  background: #EDE8DF;
  border-top: 1px solid color-mix(in srgb, var(--ink-900) 12%, transparent);
  --text-strong: var(--ink-900);
  --text-body:   var(--ink-700);
  --text-muted:  var(--ink-500);
  --hairline: color-mix(in srgb, var(--ink-900) 12%, transparent);
}
.footer .footer-logo--ondark { display: none; }
.footer .footer-logo--onlight { display: block; }
.footer .eyebrow, .footer .mono { color: var(--ink-500); }
.footer-cta {
  font-family: var(--font-display); font-weight: 300; letter-spacing: -0.035em;
  font-size: clamp(2.6rem, 8vw, 6.4rem); line-height: 1.0; color: var(--text-strong);
  text-decoration: none; display: inline-block; text-wrap: balance;
}
.footer-cta .arrow { transition: transform var(--dur-base) var(--ease-out); display: inline-block; }
.footer-cta:hover .arrow { transform: translateX(0.12em); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 24px 60px; justify-content: space-between; align-items: flex-end; }
.footer-col h4 { font-family: var(--font-ui); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-muted); font-weight: 300; margin: 0 0 14px; }
.footer-col a, .footer-col p { font-family: var(--font-ui); font-size: 15px; color: var(--text-body); text-decoration: none; margin: 0 0 6px; display: block; }
.footer-col a:hover { color: var(--text-strong); }
.footer-brand { margin-right: auto; align-self: flex-start; }
.social-row { display: flex; gap: 18px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-body);
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.social-row a:hover { color: var(--text-strong); }

/* =========================================================================
   Work tiles / index
   ========================================================================= */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.work-tile { text-decoration: none; display: block; }
.work-tile .frame {
  position: relative; overflow: hidden; border-radius: 0;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
}
.work-tile image-slot { display: block; width: 100%; border-radius: 0; transition: transform 1.1s var(--ease-out); }
.work-tile:hover image-slot { transform: scale(1.04); }
.work-tile .frame::after {
  content: ""; position: absolute; inset: 0; border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--hairline); pointer-events: none;
}
.work-meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 18px; gap: 16px; }
.work-meta .t { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--text-strong); letter-spacing: -0.02em; line-height: 1.1; }
.work-meta .k { font-family: var(--font-ui); font-size: 14px; color: var(--text-muted); }
.work-meta .y { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--sand-300); }

/* Index list (studio-rotate style row) */
.index-list { border-top: 1px solid var(--hairline); }
.index-row {
  display: grid; grid-template-columns: 64px 1.4fr 1fr auto;
  align-items: center; gap: 24px;
  padding: clamp(20px, 3vw, 34px) 8px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none; position: relative;
  transition: padding-left var(--dur-base) var(--ease-out);
}
.index-row:hover { padding-left: 24px; }
.index-row .ix { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--sand-300); }
.index-row .nm { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.8rem, 4vw, 3.2rem); color: var(--text-strong); letter-spacing: -0.03em; line-height: 1; transition: color var(--dur-base) var(--ease-out); }
.index-row .nm .italic { font-weight: 300; }
.index-row:hover .nm { color: var(--text-strong); }
.index-row .sc { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); }
.index-row .go { color: var(--text-muted); transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.index-row:hover .go { color: var(--text-strong); transform: translate(4px, -4px); }
@media (max-width: 720px) {
  .index-row { grid-template-columns: 40px 1fr auto; }
  .index-row .sc { display: none; }
}

/* Marquee for client names ---------------------------------------------- */
.marquee { overflow: hidden; white-space: nowrap; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; align-items: center; gap: clamp(72px, 6.5vw, 128px); animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-display); font-weight: 300; font-style: italic; font-size: clamp(1.8rem, 4vw, 3rem); color: var(--text-muted); }
.marquee-track .dot { font-style: normal; color: var(--sand-500); font-size: 1rem; }
.marquee-track .oval-sep { display: inline-block; width: 7px; height: 10px; background: var(--sand-400); border-radius: 999px; vertical-align: middle; flex-shrink: 0; }
/* Client logo lockups - white knockout logos, uniform-width box, contained. */
.client-logo { flex: 0 0 auto; width: clamp(184px, 17.2vw, 234px); height: 68px; object-fit: contain; object-position: center; display: block; }
.client-logo.is-lg { width: clamp(222px, 20.6vw, 281px); height: 83px; }
.client-logo.is-sm { width: clamp(147px, 13.8vw, 187px); height: 54px; }
/* Oval separator - echoes the capsule of the AD logo mark. */
.oval-sep { flex: 0 0 auto; width: 8px; height: 8.75px; border-radius: 999px; background: var(--sand-400); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }


/* Stat block */
.stats { display: flex; flex-wrap: wrap; gap: clamp(32px, 6vw, 80px); }
.stat .n { font-family: var(--font-display); font-weight: 300; font-size: clamp(3rem, 6vw, 5rem); line-height: 0.95; color: var(--text-strong); }
.stat .l { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--sand-300); letter-spacing: 0.04em; margin-top: 10px; text-transform: uppercase; }

/* generic image slot framing */
image-slot { --is-bg: var(--surface-card); }

/* The AD seal - sand-capsule reversed version on the dark editorial canvas,
   dark-capsule version on the light Atelier paper. Both carry the green dot. */
.nav-logo { height: 50px; width: auto; display: block; transition: transform var(--dur-base) var(--ease-out); }
.footer-logo { height: 70px; width: auto; display: block; }
.nav-logo--onlight, .footer-logo--onlight { display: none; }
html.theme-atelier .nav-logo--ondark, html.theme-atelier .footer-logo--ondark { display: none; }
html.theme-atelier .nav-logo--onlight, html.theme-atelier .footer-logo--onlight { display: block; }

/* =========================================================================
   ATELIER theme - warm paper to match the AD seal
   A tonal inversion of the editorial dark default: the sand capsule logo sets
   the key. Cream paper canvas, warm ink type, ink (not green) as the single
   signal - the same relationship the monogram has with its capsule. Applied
   site-wide via html.theme-atelier (toggled by the Portfolio style tweak and
   persisted, so every page matches).
   ========================================================================= */
html.theme-atelier {
  --surface-page:   var(--sand-50);
  --surface-raised: var(--sand-100);
  --surface-card:   var(--sand-100);
  --surface-sunken: var(--sand-200);
  --surface-inverse: var(--ink-900);
}

/* Paper tones - the Atelier canvas. Each sets a harmonised page/card/sunken
   trio. Chosen by the "Paper" tweak (persisted as a paper-* class). */
html.theme-atelier.paper-porcelain { --surface-page:#F6F4EF; --surface-raised:#EFEBE2; --surface-card:#EFEBE2; --surface-sunken:#E7E1D5; }
html.theme-atelier.paper-oat       { --surface-page:#EFE9DC; --surface-raised:#E7DFCD; --surface-card:#E7DFCD; --surface-sunken:#DCD2BC; }
html.theme-atelier.paper-greige    { --surface-page:#E9E5DC; --surface-raised:#E1DCD0; --surface-card:#E1DCD0; --surface-sunken:#D5CEBF; }
html.theme-atelier.paper-cloud     { --surface-page:#EEEEEA; --surface-raised:#E6E6E0; --surface-card:#E6E6E0; --surface-sunken:#DADAD2; }

html.theme-atelier {

  --text-strong: var(--ink-900);
  --text-body:   var(--ink-700);
  --text-muted:  var(--ink-400);
  --text-faint:  var(--sand-600);
  --text-on-dark: var(--sand-100);
  --text-on-light: var(--ink-900);
  --text-on-accent: var(--sand-50);

  --border-subtle:  var(--sand-300);
  --border-default: var(--sand-400);
  --border-strong:  var(--ink-600);
  --hairline: color-mix(in srgb, var(--ink-900) 12%, transparent);

  /* Ink is the accent - quiet, gilded, tonal. */
  --accent:       var(--ink-900);
  --accent-hover: var(--ink-700);
  --accent-press: var(--ink-600);
}

/* Eyebrows, meta & indices read sand-300 on dark - too pale on paper.
   Warm them into ink so the editorial labelling keeps its presence. */
html.theme-atelier .ad-eyebrow,
html.theme-atelier .eyebrow,
html.theme-atelier .bio-label,
html.theme-atelier .mono,
html.theme-atelier .count,
html.theme-atelier .disc-row .ix,
html.theme-atelier .index-row .ix,
html.theme-atelier .work-meta .y,
html.theme-atelier .stat .l,
html.theme-atelier .hero-foot .item .k { color: var(--ink-500); }

/* Primary action inverts to ink-on-cream - the monogram-in-capsule relationship
   read as a button. */
html.theme-atelier .btn-primary { background: var(--ink-900); color: var(--sand-50); }
html.theme-atelier .btn-primary:hover { background: var(--ink-700); }
html.theme-atelier .nav-cta { color: var(--sand-50); }
html.theme-atelier .nav-cta:hover { background: var(--ink-700); }

/* White knockout client logos disappear on paper - flatten them to ink. */
html.theme-atelier .client-logo { filter: brightness(0); opacity: 0.78; }

/* Capsule separators carry the accent (now ink) - keep them legible, warm. */
html.theme-atelier .oval-sep { background: var(--ink-900); }

/* Custom cursor: swap the green "view" bubble for ink so it stays tonal. */
html.theme-atelier .cursor-dot { background: var(--ink-900); }
html.theme-atelier .cursor-ring { border-color: var(--ink-900); }
html.theme-atelier body.cursor-view .cursor-ring {
  background: var(--ink-900); border-color: var(--ink-900);
}
html.theme-atelier .cursor-ring .cursor-label { color: var(--sand-50); }

/* Work-tile frames want a touch more definition on the lighter card. */
html.theme-atelier .work-tile .frame { border-color: var(--sand-400); }

/* =========================================================================
   Selected work - full-bleed 3:4 carousel (shared by home + about)
   ========================================================================= */
.feat-section { padding-top: clamp(72px, 10vh, 140px); padding-bottom: clamp(56px, 8vh, 110px); }
.feat-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; margin-bottom: 40px; }
.feat-head-r { display: flex; align-items: center; gap: 28px; }
.feat-body-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.feat-body-cta .ad-eyebrow-body { margin: 0; }
.feat-head .ad-eyebrow-body { font-size: var(--text-lead); line-height: 1.55; }
.feat-nav { display: flex; gap: 8px; }
.feat-arrow {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--text-strong); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.feat-arrow:hover { background: var(--surface-sunken); border-color: var(--border-strong); }
.feat-arrow:active { transform: translateY(1px); }

.feat-rail {
  display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
}
.feat-rail::-webkit-scrollbar { display: none; }
.feat-slide {
  flex: 0 0 clamp(260px, 31vw, 460px); scroll-snap-align: start; text-decoration: none; display: block;
}
.feat-slide .frame { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border: none; border-radius: 0; background: var(--surface-card); }
.feat-slide .frame::after { content: none; }
.feat-slide image-slot { width: 100%; height: 100%; }
.feat-slide .frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.1s var(--ease-out); }
.feat-slide:hover .frame img { transform: scale(1.04); }
.feat-slide::after { content: none; }
.feat-cap { padding: 16px 0 0 20px; }
.feat-ix { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.08em; color: var(--sand-300); }
.feat-title { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.3rem, 1.8vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.05; color: var(--text-strong); margin: 8px 0 0; }
.feat-blurb {
  font-family: var(--font-ui); font-weight: 300; font-size: 14.5px; line-height: 1.5; color: var(--text-muted);
  margin: 8px 0 0; max-width: 34ch; text-wrap: pretty;
}
@media (max-width: 760px) {
  :root { --gutter: clamp(1.25rem, 6vw, 2.5rem); }
  .feat-slide { flex-basis: 78vw; }
  .feat-head { flex-direction: column; gap: 14px; margin-bottom: 28px; }
  .feat-eyebrow.ad-eyebrow-row { grid-template-columns: 1fr; gap: 10px; }
  .feat-body-cta .ad-eyebrow-body { font-size: 18px; line-height: 1.6; }
  .feat-nav { display: none; }
  .section { padding-block: clamp(48px, 7vh, 72px); }
  .section-tight { padding-block: clamp(44px, 6vh, 64px); }
  h1.display { font-size: clamp(3.4rem, 10vw, 4.6rem) !important; }
  .footer-cta { font-size: 3.4rem; }
  .lead { font-size: 18px; line-height: 1.6; }
  .feat-title { font-size: 1.5rem; }
  .feat-blurb { font-size: 13.5px; }
}

/* =========================================================================
   Case study key areas list - hidden globally
   ========================================================================= */
.cs2-key-areas { display: none; }

/* =========================================================================
   Case study titles - all use full display scale
   ========================================================================= */
body .cs2-title--rich { font-size: var(--text-display); letter-spacing: -0.03em; line-height: 0.95; }

/* =========================================================================
   Case study parallax hero - 3:1 on desktop, 16:9 on mobile, across all pages
   ========================================================================= */
body .cs2-parallax-hero { aspect-ratio: 3 / 1; }
@media (max-width: 760px) { body .cs2-parallax-hero { aspect-ratio: 16 / 9; } }

/* =========================================================================
   Case study mobile image sizing
   Contained layout uses inline maxWidth calc that collapses to ~63px on mobile.
   !important needed to override the inline style.
   ========================================================================= */
@media (max-width: 820px) {
  /* Contained images: inline maxWidth calc collapses to ~63px on mobile */
  body .section-tight > [data-reveal] { max-width: 100% !important; margin-left: 0 !important; }
  /* Stagger: collapse to single column at same breakpoint as chapters */
  body .stagger { grid-template-columns: 1fr; }
  body .stagger > :nth-child(2) { margin-top: 0; }
}

@media (max-width: 680px) {
  body .cs2-next-img { aspect-ratio: 3 / 1; }
}

/* =========================================================================
   Case study mobile type hierarchy
   body prefix raises specificity above per-page <style> blocks
   ========================================================================= */
@media (max-width: 760px) {
  body .cs2-title { font-size: clamp(3.5rem, 22vw, 5.5rem); line-height: 0.92; }
  body .cs2-title--rich { font-size: 3rem; }
  body .cs2-lead { font-size: clamp(1.3rem, 5.5vw, 1.6rem); }
  body .cs2-hero-desc { font-size: 18px; line-height: 1.6; }
  body .cs2-role-stmt { font-size: 18px; line-height: 1.6; }
  body .chapter-num { font-size: clamp(5rem, 22vw, 10rem); margin-top: 2px; }
  body .chapter-body p { font-size: 18px; line-height: 1.6; }
  body .pullquote { font-size: clamp(2rem, 8.5vw, 2.8rem); }
  body .cs2-meta .v,
  body .cs2-meta-val { font-size: var(--text-base); }
  body .deliv-row .nm { font-size: clamp(1.5rem, 6vw, 1.9rem); }
  body .cs2-next .nm { font-size: clamp(1.7rem, 6.5vw, 2.4rem); }
}
