/* =========================================================================
   LIZAR A.I.A. — v3 editorial cinematic
   Dirección de arte: grafito / plata metálica, tipografía display monumental,
   render de marca como pieza central, secuencia storyboard ligada al scroll.
   ========================================================================= */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-italic-var.woff2') format('woff2');
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('assets/fonts/general-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('assets/fonts/general-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('assets/fonts/general-sans-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink-0:   #0b0e12;
  --ink-1:   #0e1117;
  --ink-2:   #141922;
  --ink-3:   #1b212b;
  --line:    rgba(200, 214, 230, 0.12);
  --line-2:  rgba(200, 214, 230, 0.22);

  --text:    #e9e3d6;   /* warm ivory body */
  --muted:   #a2a196;
  --faint:   #6b6a60;

  --ivory:   #f4ede0;   /* headline cream */
  --silver-1: #f2f6fb;
  --silver-2: #c6d0dc;
  --silver-3: #8b96a3;
  --glow:     #b7d2e4;

  --champagne:   #d9c49a;  /* warm accent */
  --champagne-2: #c9b184;
  --champagne-ink: #241d10;

  --maxw: 1320px;
  --pad: clamp(1.25rem, 5vw, 5rem);

  --fast: 200ms;
  --mid: 420ms;
  --slow: 800ms;
  --expo: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-text: 'General Sans', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-text);
  font-weight: 400;
  color: var(--text);
  background: var(--ink-1);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--silver-1); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0.6rem; left: 0.6rem; z-index: 999;
  transform: translateY(-160%);
  background: var(--silver-1); color: var(--ink-0);
  padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: transform var(--fast) var(--expo);
}
.skip-link:focus { transform: none; }

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

/* =========================================================================
   ATMOSPHERE
   ========================================================================= */
.atmosphere { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.atmosphere::before {
  /* organic blurred-render fog + volumetric graphite grading */
  content: ''; position: absolute; inset: -10%;
  background:
    radial-gradient(120% 80% at 50% -12%, rgba(160, 186, 210, 0.18), transparent 55%),
    radial-gradient(80% 55% at 82% 6%, rgba(217, 196, 154, 0.07), transparent 60%),
    radial-gradient(140% 120% at 50% 122%, #05080c 0%, transparent 58%),
    linear-gradient(180deg, rgba(13,16,22,0.82) 0%, rgba(16,20,27,0.7) 45%, rgba(10,13,18,0.86) 100%),
    url('assets/img/bg-fog-900.webp') center 12% / cover no-repeat;
  background-color: #0b0e13;
}
.atmosphere::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05; mix-blend-mode: overlay;
}
#dust { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(0.9rem, 2vw, 1.4rem) var(--pad);
  transition: background var(--mid) var(--expo), border-color var(--mid), backdrop-filter var(--mid);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(11, 14, 18, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line);
}
.nav-brand {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500; font-size: 1.32rem;
  font-variation-settings: 'opsz' 40, 'wght' 500;
  letter-spacing: 0.01em; color: var(--ivory);
}
.nav-brand img { width: 24px; height: 24px; opacity: 0.85; align-self: center; }
.nav-brand-sub { font-family: var(--font-text); font-weight: 600; font-size: 0.5em; letter-spacing: 0.28em; color: var(--champagne); margin-left: 0.35em; text-transform: uppercase; }
.nav-links { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); }
.nav-links a {
  font-size: 0.85rem; font-weight: 500; color: var(--muted);
  letter-spacing: 0.01em; position: relative; padding-block: 0.3rem; transition: color var(--fast);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--silver-2); transition: width var(--mid) var(--expo);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--silver-1);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0.6rem 1.15rem; white-space: nowrap;
  transition: border-color var(--fast), background var(--fast), color var(--fast), transform var(--fast);
}
.nav-cta:hover { border-color: var(--silver-2); background: rgba(198, 208, 220, 0.08); transform: translateY(-1px); }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  --btn-pad: 0.85rem 1.5rem;
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-text); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em; padding: var(--btn-pad); border-radius: 999px; cursor: pointer;
  transition: transform var(--fast) var(--expo), box-shadow var(--mid), background var(--fast), border-color var(--fast), color var(--fast);
  border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(180deg, #e6d3ab, var(--champagne-2)); color: var(--champagne-ink); box-shadow: 0 10px 30px -12px rgba(217, 196, 154, 0.45); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -14px rgba(217, 196, 154, 0.62); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--silver-2); background: rgba(198, 208, 220, 0.06); transform: translateY(-2px); }
.btn-lg { --btn-pad: 1.05rem 2rem; font-size: 1.05rem; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { position: relative; overflow-x: clip; }
.hero-grid { position: relative; max-width: var(--maxw); margin-inline: auto; padding: clamp(7.5rem, 15vh, 12rem) var(--pad) clamp(2.5rem, 6vh, 4.5rem); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-text); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver-2);
  padding: 0.5rem 1rem 0.5rem 0.85rem; border: 1px solid var(--line-2);
  border-radius: 999px; margin-bottom: clamp(1.6rem, 4vh, 3rem);
  background: rgba(217, 196, 154, 0.04);
}
.hero-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--champagne); box-shadow: 0 0 10px 1px rgba(217,196,154,0.7); }
.hero-stage { position: relative; min-height: min(58vh, 560px); display: flex; align-items: center; }
.hero-figure { position: absolute; inset: -6% -3% -6% auto; right: -2%; display: flex; align-items: center; justify-content: flex-end; pointer-events: none; z-index: 1; }
.hero-figure img {
  width: min(60vw, 700px); height: auto;
  -webkit-mask-image: radial-gradient(66% 68% at 52% 46%, #000 34%, rgba(0,0,0,0.55) 64%, transparent 96%);
          mask-image: radial-gradient(66% 68% at 52% 46%, #000 34%, rgba(0,0,0,0.55) 64%, transparent 96%);
  filter: drop-shadow(0 40px 90px rgba(0,0,0,0.7));
  animation: heroFloat 12s ease-in-out infinite alternate;
}
@keyframes heroFloat { from { transform: translateY(-8px) scale(1.0); } to { transform: translateY(8px) scale(1.02); } }
.hero-circuit { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--silver-2); opacity: 0.22; z-index: 3; pointer-events: none; }
.hero-circuit .ckt-lines path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s var(--expo) forwards; }
.hero-circuit .ckt-pads circle { opacity: 0; animation: fadeDot 0.6s ease 2.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeDot { to { opacity: 1; } }
.hero-title {
  position: relative; z-index: 2; margin: 0;
  font-family: var(--font-display); font-weight: 340;
  font-variation-settings: 'opsz' 144, 'wght' 340;
  font-size: clamp(2.9rem, 7.6vw, 7rem); line-height: 1.06; letter-spacing: -0.012em;
  color: var(--ivory); text-shadow: 0 4px 50px rgba(0,0,0,0.6);
}
.hero-title .hl { display: block; }
.hero-title .accent { font-style: italic; font-variation-settings: 'opsz' 144, 'wght' 420; color: var(--champagne); }
.hero-foot {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end; margin-top: clamp(1.5rem, 4vh, 3rem);
  padding-top: clamp(1.5rem, 3vh, 2.4rem); border-top: 1px solid var(--line);
}
.hero-lede { font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); max-width: 42ch; }
.hero-claim { font-size: 1.02rem; color: var(--text); max-width: 40ch; padding-left: 1rem; border-left: 2px solid var(--silver-3); }
.hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--faint);
}
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--silver-3), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--silver-1); animation: cue 1.8s var(--expo) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%,100% { transform: translateY(340%); } }

/* =========================================================================
   MARQUEE
   ========================================================================= */
.marquee {
  overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line);
  padding-block: clamp(0.9rem, 2vw, 1.4rem); background: rgba(8, 11, 15, 0.4);
  -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: 1.6rem; animation: marquee 34s linear infinite; will-change: transform; }
.marquee-track span { font-family: var(--font-text); font-weight: 600; font-size: clamp(1rem, 2vw, 1.55rem); text-transform: uppercase; letter-spacing: 0.16em; color: var(--silver-2); }
.marquee-track i { font-style: normal; color: var(--champagne); font-size: clamp(0.9rem, 1.6vw, 1.3rem); opacity: 0.85; font-family: var(--font-text); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================================================================
   SECTIONS (generic)
   ========================================================================= */
.section { max-width: var(--maxw); margin-inline: auto; padding: clamp(4.5rem, 10vh, 9rem) var(--pad); }
.eyebrow { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--silver-3); margin-bottom: 1.1rem; }
.display-lg { font-family: var(--font-display); font-weight: 380; font-variation-settings: 'opsz' 144, 'wght' 380; font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: 1.08; letter-spacing: -0.005em; color: var(--ivory); }
.display-md { font-family: var(--font-display); font-weight: 400; font-variation-settings: 'opsz' 110, 'wght' 400; font-size: clamp(1.8rem, 3.8vw, 3rem); line-height: 1.12; letter-spacing: -0.004em; color: var(--ivory); }
.lede { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 56ch; }

/* Slab */
.slab { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.slab-flip { grid-template-columns: 1fr minmax(140px, 220px); }
.slab-flip .slab-index { order: 2; text-align: right; }
.slab-index { position: sticky; top: 30vh; }
.slab-index span { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.slab-index em { font-style: normal; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--silver-3); display: block; margin-top: 0.6rem; }
.slab-body .lede { margin-top: 1.4rem; }

/* =========================================================================
   CHAPTER OPENER ("03 · Por qué LIZAR A.I.A.") — grid-breaking editorial
   moment: full-bleed section (escapes .section's max-width on purpose), a
   monumental embossed numeral bleeding off the left edge, an asymmetric
   headline layered on top, and a circuit-tree crop overlapping both.
   ========================================================================= */
.chapter-open { position: relative; overflow: hidden; width: 100%; min-height: 78vh; display: flex; align-items: center; padding-block: clamp(4.5rem, 9vh, 7rem); }
.chapter-numeral {
  position: absolute; left: -4vw; top: 50%; transform: translateY(-56%);
  font-family: var(--font-display); font-weight: 700; line-height: 0.78;
  font-size: clamp(10rem, 30vw, 24rem);
  /* Barely-there embossed fill (6% contrast against the graphite ground) with a
     thin champagne stroke tracing the glyph edge — not a full colored duplicate,
     which would read as solid gold instead of a watermark behind the headline. */
  color: rgba(233, 227, 214, 0.045);
  -webkit-text-stroke: 1px rgba(217, 196, 154, 0.32);
  text-shadow: -3px 8px 26px rgba(0, 0, 0, 0.5);
  z-index: 0; pointer-events: none; -webkit-user-select: none; user-select: none;
}
.chapter-wire { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; color: var(--silver-2); opacity: 0.24; pointer-events: none; }
.chapter-wire path { fill: none; stroke: currentColor; stroke-width: 0.18; }
.chapter-wire circle { fill: currentColor; }
.chapter-orb {
  position: absolute; right: clamp(0.5rem, 5vw, 3.5rem); top: 50%; transform: translateY(-46%);
  width: clamp(13rem, 27vw, 25rem); aspect-ratio: 1 / 1; z-index: 1; pointer-events: none;
}
.chapter-orb img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  -webkit-mask-image: radial-gradient(56% 52% at 50% 48%, #000 26%, rgba(0,0,0,0.45) 56%, rgba(0,0,0,0.14) 74%, transparent 88%);
          mask-image: radial-gradient(56% 52% at 50% 48%, #000 26%, rgba(0,0,0,0.45) 56%, rgba(0,0,0,0.14) 74%, transparent 88%);
  filter: drop-shadow(0 20px 60px rgba(0,0,0,0.6));
}
.chapter-orb::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.08; mix-blend-mode: overlay;
}
.chapter-inner { position: relative; z-index: 2; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); width: 100%; }
.chapter-eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--silver-3); margin-bottom: 1rem; }
.chapter-title { max-width: 30rem; margin-left: clamp(1rem, 11vw, 8rem); }
/* Copy sits clear of the numeral's densest stroke area (it bleeds heaviest
   lower-left, under the title) so body text never fights the watermark for
   contrast. */
.chapter-copy { margin-top: 1.4rem; margin-left: clamp(0.5rem, 9vw, 6.5rem); max-width: 40ch; }
.chapter-copy + .chapter-copy { margin-top: 1rem; }

@media (max-width: 960px) {
  .chapter-open { min-height: 0; padding-block: clamp(3.5rem, 9vh, 5rem); }
  .chapter-numeral { left: -8vw; top: 8%; transform: none; font-size: clamp(8rem, 50vw, 16rem); }
  .chapter-orb { display: none; }
  .chapter-wire { display: none; }
  .chapter-title { margin-left: 0; max-width: none; margin-top: 5.5rem; }
  .chapter-copy { margin-left: 0; }
}

/* =========================================================================
   SEQUENCE (scrollytelling)
   ========================================================================= */
.sequence { position: relative; height: 300vh; }
.sequence-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.seq-frames { position: absolute; inset: 0; }
.seq-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; will-change: opacity, transform; }
.seq-frame img {
  width: min(64vh, 82vw, 700px); height: auto; aspect-ratio: 1/1; object-fit: cover;
  /* Fade reaches full transparency at 88% of the gradient ray; every edge midpoint
     of the square plate sits beyond it (top 48/52=.92, sides 50/56=.89, bottom 1.0),
     so no rectangular border can survive — verified at 375 and 1440. */
  -webkit-mask-image: radial-gradient(56% 52% at 50% 48%, #000 26%, rgba(0,0,0,0.45) 56%, rgba(0,0,0,0.14) 74%, transparent 88%);
          mask-image: radial-gradient(56% 52% at 50% 48%, #000 26%, rgba(0,0,0,0.45) 56%, rgba(0,0,0,0.14) 74%, transparent 88%);
  filter: drop-shadow(0 30px 80px rgba(0,0,0,0.7));
}
/* Grain over the plates so no fade edge or banding survives the mask. */
.sequence-stage::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07; mix-blend-mode: overlay;
}
/* nudge the plate right of centre for an editorial, asymmetric composition */
@media (min-width: 961px) { .seq-frames { transform: translateX(14%); } }
.seq-frame.is-active { opacity: 1; }
.seq-captions { position: absolute; left: var(--pad); top: 50%; transform: translateY(-50%); max-width: 26rem; z-index: 4; min-height: 16rem; }
/* Crossfade staggered so the two captions never ghost over each other:
   the outgoing one is gone (<0.15) before the incoming one starts rising. */
.seq-cap { position: absolute; left: 0; top: 50%; transform: translateY(-40%); opacity: 0; transition: opacity 160ms ease-out, transform 240ms var(--expo); pointer-events: none; }
.seq-cap.is-active { opacity: 1; transform: translateY(-50%); transition: opacity 340ms var(--expo) 190ms, transform 420ms var(--expo) 190ms; }
.seq-step { font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--silver-3); display: block; margin-bottom: 0.7rem; }
.seq-cap h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.3rem); letter-spacing: -0.01em; color: var(--silver-1); }
.seq-cap p { margin-top: 0.7rem; color: var(--muted); font-size: 1.02rem; max-width: 34ch; }
.seq-progress { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); width: 2px; height: 42vh; background: var(--line); z-index: 4; }
.seq-progress i { position: absolute; top: 0; left: 0; width: 100%; height: 0; background: linear-gradient(var(--glow), var(--silver-1)); }

/* =========================================================================
   CASE
   ========================================================================= */
.case-inner { max-width: 62rem; position: relative; }
/* Pull-quote lifted from the card copy below, set large in italic Fraunces and
   pulled down over the card's top border via negative margin — paints above
   the card (higher z-index) so the lettering visibly crosses the border line
   instead of sitting politely inside it. */
.case-pull {
  /* Forced two-line break (see index.html) keeps the crossing proportion
     predictable at every width. Sibling margins collapse: case-card keeps its
     own margin-top: 2rem, and this bottom margin (in em, so it scales with the
     quote's own responsive font-size) lands roughly the bottom third of the
     second line inside the card's top border once the collapse resolves. */
  position: relative; z-index: 3; margin: 1.7rem 0 -2.1em; max-width: 22rem;
  padding-left: clamp(0.2rem, 2vw, 0.6rem);
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-variation-settings: 'opsz' 90, 'wght' 500;
  font-size: clamp(1.55rem, 3.6vw, 2.5rem); line-height: 1.08;
  color: var(--champagne);
}
.case-card { margin-top: 2rem; padding: clamp(1.6rem, 4vw, 2.8rem); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line); border-radius: 18px; position: relative; overflow: hidden; }
.case-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(var(--glow), transparent); }
.case-card p { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.case-card p + p { margin-top: 1rem; }
.case-tag { margin-top: 1.6rem !important; color: var(--silver-2) !important; font-style: italic; }

/* =========================================================================
   CAPABILITIES
   ========================================================================= */
.cap-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vh, 3.5rem); }
.cap-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.cap-item { display: flex; align-items: baseline; gap: 1rem; padding: clamp(1.2rem, 2.5vw, 1.8rem) clamp(0.5rem, 1.5vw, 1.4rem); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); transition: background var(--fast); }
.cap-item:hover { background: rgba(183, 210, 228, 0.04); }
.cap-num { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--glow); letter-spacing: 0.05em; }
.cap-item p { font-size: 1.08rem; color: var(--text); font-weight: 500; }
.cap-note { margin-top: 1.8rem; color: var(--muted); max-width: 46ch; }

/* =========================================================================
   FAQ
   ========================================================================= */
.faq { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.faq-head { position: sticky; top: 18vh; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { padding: clamp(1.2rem, 3vw, 1.8rem) 0; border-bottom: 1px solid var(--line); }
.faq-item dt { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--silver-1); letter-spacing: -0.01em; }
.faq-item dd { margin-top: 0.7rem; color: var(--muted); font-size: 1.02rem; max-width: 60ch; }

/* =========================================================================
   FINALE
   ========================================================================= */
.finale { position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center; text-align: center; padding: clamp(4rem, 10vh, 8rem) var(--pad); }
.finale-glow { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(1100px, 130vw); z-index: 0; pointer-events: none; }
.finale-glow img { width: 100%; height: auto; opacity: 0.6; -webkit-mask-image: radial-gradient(60% 80% at 50% 40%, #000 30%, transparent 78%); mask-image: radial-gradient(60% 80% at 50% 40%, #000 30%, transparent 78%); }
.finale-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.finale-caption {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
  /* Legible over the bright canopy: champagne luminance + stacked dark halo
     + feathered graphite scrim (no hard box) behind the lettering. */
  color: var(--champagne);
  text-shadow: 0 1px 2px rgba(6, 8, 12, 0.95), 0 0 10px rgba(6, 8, 12, 0.9), 0 2px 20px rgba(6, 8, 12, 0.8);
  padding: 0.75rem 2.2rem;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(8, 11, 16, 0.72) 0%, rgba(8, 11, 16, 0.42) 58%, rgba(8, 11, 16, 0) 100%);
}
/* Faster, earlier fade than the shared .reveal timing (800ms): the finale
   section is exactly one viewport tall, so the caption only starts entering
   the intersection root once the wordmark is nearly settled. A quicker ramp
   (plus the wider rootMargin in reveal.js) means it reads clearly well before
   the settle point instead of catching mid-fade over the copa. */
.finale-caption.reveal { transition-duration: 320ms; }
.wordmark { position: relative; line-height: 0.86; }
.wm-main, .wm-sub {
  font-family: var(--font-display); text-transform: uppercase;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.28)) drop-shadow(0 -1px 1px rgba(0,0,0,0.6)) drop-shadow(0 16px 30px rgba(0,0,0,0.55));
}
.wm-main {
  display: block; font-weight: 560; font-variation-settings: 'opsz' 144, 'wght' 560;
  letter-spacing: 0.005em; font-size: clamp(4.4rem, 18vw, 13.5rem);
  background-image:
    linear-gradient(115deg, transparent 34%, rgba(255,255,255,0.92) 46%, transparent 58%),
    linear-gradient(180deg, #f4f6f9 0%, #c9cfd7 20%, #868e98 42%, #eef1f5 53%, #6e747d 70%, #b6bdc5 86%, #e9edf2 100%);
  background-size: 300% 100%, 100% 100%; background-repeat: no-repeat;
  animation: sheen 5.5s ease-in-out infinite;
}
.wm-sub { display: block; font-weight: 500; font-variation-settings: 'opsz' 80, 'wght' 500; letter-spacing: 0.42em; margin-top: 0.15em; margin-left: 0.42em; font-size: clamp(1.3rem, 4.4vw, 2.6rem); background-image: linear-gradient(180deg, #eef1f5 0%, #bcc3cc 40%, #7b828b 60%, #d3d8de 100%); }
@keyframes sheen { 0%, 100% { background-position: 150% 0, 0 0; } 50% { background-position: -50% 0, 0 0; } }
.finale-line { color: var(--muted); font-size: 1.05rem; margin-top: 0.4rem; }

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact-inner { max-width: 60rem; }
.contact-inner .lede { margin-top: 1rem; }
.contact-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 2.2rem; }
.contact-btn {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; row-gap: 0.15rem; align-items: center;
  padding: 1.3rem 1.5rem; border: 1px solid var(--line-2); border-radius: 16px; background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  transition: transform var(--fast) var(--expo), border-color var(--fast), box-shadow var(--mid);
}
.contact-btn svg { grid-row: 1 / 3; width: 30px; height: 30px; color: var(--silver-2); }
.contact-btn.is-wa svg { color: #4fbf7d; }
.contact-btn .cb-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver-3); }
.contact-btn .cb-value { font-size: 1.05rem; font-weight: 500; color: var(--text); }
.contact-btn:hover { transform: translateY(-3px); border-color: var(--silver-2); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.8); }
.contact-btn.is-wa:hover { box-shadow: 0 20px 44px -20px rgba(79, 191, 125, 0.45); }
.contact-note { margin-top: 1.6rem; color: var(--faint); font-size: 0.95rem; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { max-width: var(--maxw); margin-inline: auto; padding: clamp(2.5rem, 6vh, 4rem) var(--pad) clamp(3rem, 8vh, 5rem); border-top: 1px solid var(--line); display: grid; gap: 0.8rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; color: var(--silver-1); letter-spacing: 0.02em; }
.foot-brand em { font-style: normal; font-size: 0.62em; letter-spacing: 0.26em; color: var(--silver-3); }
.foot-desc { color: var(--muted); max-width: 60ch; font-size: 0.98rem; }
.foot-contact { display: flex; gap: 0.6rem; flex-wrap: wrap; color: var(--faint); }
.foot-contact a { color: var(--silver-2); transition: color var(--fast); }
.foot-contact a:hover { color: var(--text); }
.foot-legal { color: var(--faint); font-size: 0.85rem; margin-top: 0.6rem; }

/* =========================================================================
   REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--slow) var(--expo), transform var(--slow) var(--expo); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 60ms; }
.reveal:nth-child(3) { transition-delay: 120ms; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-figure { position: relative; inset: auto; right: auto; justify-content: center; margin-bottom: -8%; }
  .hero-figure img { width: min(78vw, 460px); }
  .hero-stage { flex-direction: column; min-height: 0; gap: 0.5rem; }
  .hero-title { text-align: center; }
  .hero-circuit { display: none; }
  .hero-foot { grid-template-columns: 1fr; gap: 1.4rem; }
  .hero-claim { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }
  .slab, .slab-flip { grid-template-columns: 1fr; }
  .slab-flip .slab-index { order: 0; text-align: left; }
  .slab-index { position: static; display: flex; align-items: baseline; gap: 1rem; }
  .slab-index span { font-size: 2.6rem; }
  .slab-index em { margin-top: 0; }
  .faq { grid-template-columns: 1fr; }
  .faq-head { position: static; }

  /* Tighter vertical rhythm: less dead air between stacked sections so a slow
     scrub never coasts through a mostly-empty screen between two headlines. */
  .section { padding-top: clamp(2.75rem, 7vh, 4.25rem); padding-bottom: clamp(2.75rem, 7vh, 4.25rem); }

  /* Shorten the pinned sequence's scrub runway. Native position:sticky always
     "coasts" for exactly one viewport height while it releases (the section is
     taller than the sticky stage by design) — that coast is unavoidable, but a
     shorter section means less total scroll is spent reaching it. */
  .sequence { height: 230vh; }

  .seq-captions { left: var(--pad); right: var(--pad); max-width: none; top: 55%; }
  .seq-progress { display: none; }
  /* A taller (portrait) crop instead of the desktop square: the plate now
     covers well over half the stage's height, so entering/leaving the pin
     (both take a full viewport height of scroll — see sequence.js/reveal.js
     comments) always shows a sizeable slice of image, never just fog, no
     matter which moment of the crossfade or the pin's entry/release a slow
     scrub lands on. */
  .seq-frame img { width: min(84vw, 360px); aspect-ratio: 1 / 1.5; object-fit: cover; }
  .seq-cap { padding: 1.3rem 1.4rem 1.5rem; }
  .seq-cap::before {
    content: ''; position: absolute; inset: -3.5rem -3rem; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(11, 14, 18, 0.8) 0%, rgba(11, 14, 18, 0.5) 52%, rgba(11, 14, 18, 0) 94%);
  }
  .seq-cap h3, .seq-cap p { text-shadow: 0 1px 2px rgba(8, 11, 15, 0.9), 0 0 14px rgba(8, 11, 15, 0.75); }
}

@media (max-width: 560px) {
  .nav-cta { display: none; }
  .hero-title { font-size: clamp(2.5rem, 13vw, 3.6rem); }
  .cap-list { grid-template-columns: 1fr; }
  .cap-item { border-right: none; }
  .contact-actions { grid-template-columns: 1fr; }
  .sequence { height: 210vh; }
}

/* Desktop/tablet port of the ≤960px seam fix above: the same pin-coast and
   stacked-padding dead bands surface at 1440 — mildly at ~45% (post-pin slab)
   and worst between the finale and contact (93-97%). Trim only the flagged
   seams; the wide editorial air elsewhere is intentional. */
@media (min-width: 961px) {
  .sequence { height: 270vh; }
  .slab-flip { padding-top: clamp(3rem, 6vh, 4.5rem); }
  .contact { padding-top: clamp(3rem, 6.5vh, 5rem); }
}

/* Tablet shows the same finale→contact hollow as desktop (its ≤960px section
   padding is already tight, but the 100vh centered finale still leaves ~20vh
   of slack below the wordmark on release). 768px inclusive: iPad portrait is
   exactly 768 wide and was the worst offender. */
@media (min-width: 768px) {
  .finale { min-height: 88vh; padding-block: clamp(2.5rem, 6vh, 5rem); }
}

/* =========================================================================
   REDUCED MOTION / NO-JS STATIC FALLBACK
   ========================================================================= */
.motion-reduced .hero-figure img,
.motion-reduced .marquee-track,
.motion-reduced .scroll-cue i::after,
.motion-reduced .wm-main,
.motion-reduced .hero-circuit .ckt-lines path,
.motion-reduced .hero-circuit .ckt-pads circle { animation: none !important; }
.motion-reduced .hero-circuit .ckt-lines path { stroke-dashoffset: 0; }
.motion-reduced .hero-circuit .ckt-pads circle { opacity: 1; }
.motion-reduced .reveal { opacity: 1; transform: none; transition: none; }
.motion-reduced #dust { display: none; }

.motion-reduced .sequence { height: auto; }
.motion-reduced .sequence-stage { position: static; height: auto; display: block; padding: 0 var(--pad) clamp(3rem,8vh,6rem); }
.motion-reduced .sequence-stage::after { content: none; }
.motion-reduced .seq-frames { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.motion-reduced .seq-frame { position: static; opacity: 1; }
.motion-reduced .seq-frame img { width: 100%; }
.motion-reduced .seq-captions { position: static; margin-top: 2rem; max-width: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.motion-reduced .seq-cap { position: static; opacity: 1; transform: none; }
.motion-reduced .seq-progress { display: none; }
