/* ============================================================
   MotionPotion — Editorial Flat
   Palette: Tiger Flame / Sunflower Gold / Maya Blue / Electric
   Sapphire / Ink / Paper. Flat only, no gradients.
   ============================================================ */

:root {
  --flame: #FE6237;
  --gold: #FFB62E;
  --sky: #7CC3FF;
  --sapphire: #4164FF;
  --ink: #0A0A0A;
  --paper: #F4F1E9;        /* warm editorial off-white */
  --paper-pure: #FFFFFF;
  --line: #0A0A0A;
  --line-soft: rgba(10, 10, 10, 0.14);

  /* active accent — recolored per recipe by JS */
  --accent: var(--flame);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1320px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--paper); }

/* Lenis smooth-scroll (official) — only active when JS adds .lenis */
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; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Native smooth fallback only when Lenis is NOT running */
html:not(.lenis) { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }

p { margin: 0; text-wrap: pretty; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

sup { font-size: 0.4em; vertical-align: super; font-weight: 700; }

/* ---- Faint column grid (Dropbox-brand cue) ---- */
.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.grid-lines span { border-left: 1px solid var(--line-soft); }
.grid-lines span:last-child { border-right: 1px solid var(--line-soft); }
@media (max-width: 760px) { .grid-lines { display: none; } }

/* ---- Scroll progress (flat bar) ---- */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 4px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  z-index: 60;
  transition: background 400ms var(--ease);
  will-change: transform;
}

.skip-link {
  position: fixed;
  left: 1rem; top: 1rem;
  z-index: 80;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.85rem, 2vw, 1.3rem) var(--gutter);
  background: transparent;
  transition: background 280ms var(--ease), box-shadow 280ms var(--ease);
}
.nav.is-stuck {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: clamp(40px, 5.5vw, 62px);
  width: auto;
}
.footer-logo {
  height: clamp(48px, 8vw, 84px);
  filter: brightness(0) invert(1); /* black artwork -> white on dark footer */
}
.brand-glyph {
  width: clamp(34px, 4vw, 44px);
  height: clamp(34px, 4vw, 44px);
  background: var(--accent);
  border-radius: 10px;
  position: relative;
  flex: none;
  transition: background 400ms var(--ease);
}
.brand-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 38%;
  height: 50%;
  border: 3px solid var(--ink);
  border-top-width: 7px;
  border-radius: 3px 3px 8px 8px;
  transform: rotate(-12deg);
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.brand-word span { color: var(--accent); transition: color 400ms var(--ease); }
.brand-word sup { color: var(--ink); }

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  font-weight: 700;
  font-size: 0.95rem;
}
.nav-links a { text-decoration: none; position: relative; padding: 0.2rem 0; }
.nav-spell-sep { font-size: 0.95em; }
.nav-spell-sub {
  color: rgba(10,10,10,0.45);
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-end { display: flex; align-items: center; gap: 0.8rem; }
.nav-cta {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1.55rem;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0 9px;
}
.nav-burger span {
  display: block;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 240ms var(--ease), opacity 200ms var(--ease);
}
.nav.is-open .nav-burger span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.nav.is-open .nav-burger span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: var(--gutter);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 11vw, 3.6rem);
  letter-spacing: -0.03em;
  transform: translateY(-100%);
  transition: transform 420ms var(--ease);
  visibility: hidden;
}
.mobile-nav.is-open { transform: translateY(0); visibility: visible; }
.mobile-nav a { text-decoration: none; padding: 0.3rem 0; }
.mobile-nav a:active { color: var(--accent); }
.mobile-nav .mobile-cta { color: var(--gold); }

/* ============================================================
   SHAPES (reusable flat graphics)
   ============================================================ */
.shape { display: inline-block; flex: none; }
.shape-sq { border-radius: 4px; }
.shape-circle { border-radius: 50%; }
.shape-tri {
  width: 0 !important; height: 0 !important;
  background: transparent !important;
  border-left: 0.5em solid transparent;
  border-right: 0.5em solid transparent;
  border-bottom: 0.9em solid currentColor;
  border-radius: 0;
}
.shape-half {
  border-radius: 999px 999px 0 0;
}

.c-flame { background: var(--flame); color: var(--flame); }
.c-gold { background: var(--gold); color: var(--gold); }
.c-sky { background: var(--sky); color: var(--sky); }
.c-sapphire { background: var(--sapphire); color: var(--sapphire); }

.c-flame-text { color: var(--flame); }
.c-gold-text { color: var(--gold); }
.c-sky-text { color: var(--sky); }
.c-sapphire-text { color: var(--sapphire); }

/* Floating decorative shapes scattered across the page */
.floaty {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.fl {
  display: block;
  width: var(--s, 32px);
  height: var(--s, 32px);
  animation: floatY 6s var(--ease) infinite;
}
.fl.sq { border-radius: 7px; }
.fl.circle { border-radius: 50%; }
.fl.ring { background: transparent !important; border: 6px solid currentColor; border-radius: 50%; }
.fl.tri { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.fl.half { border-radius: 999px 999px 0 0; }
.fl.spark {
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 4.5s var(--ease) infinite;
}

/* ── After Effects keyframe icons — the site's signature decor ──
   Rendered from the SVG sprite (mp-app.js) so corners stay softly rounded. */
.kf-ic, .kf-dot { background: none !important; transform-box: fill-box; transform-origin: center; }   /* never paint the SVG box; scale from each shape's centre */
.kf-ic {
  display: block;
  width: var(--s, 32px);
  height: var(--s, 32px);
  color: var(--accent);
  animation: floatY 6s var(--ease) infinite;
}
.kf-ic.c-flame { color: var(--flame); }
.kf-ic.c-gold { color: var(--gold); }
.kf-ic.c-sky { color: var(--sky); }
.kf-ic.c-sapphire { color: var(--sapphire); }

@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.78; }
  50% { transform: scale(1.22) rotate(45deg); opacity: 1; }
}

/* lift section content above the floaties */
.hero-tagline, .hero-title, .hero-lower, .hero-seal-row, .stage,
.curse-head, .curse-list,
.spellbook-head, .lab,
.proof-head, .proof-steps,
.cta-inner { position: relative; z-index: 1; }
.rail-label { z-index: 2; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(7rem, 13vw, 11rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  letter-spacing: -0.01em;
}
.hero-tagline .fl { flex: none; }

/* 2-col layout: title left, lede right */
.hero-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
  position: relative;
  z-index: 1;
}
.hero-left { display: grid; gap: clamp(0.6rem, 1.2vw, 1rem); align-content: start; }
.hero-cta { margin-top: clamp(0.4rem, 0.8vw, 0.8rem); justify-self: start; }
.hero-right { justify-content: start; }

.hero-title {
  font-size: min(13vw, 11.4rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
}
.hero-title .word { display: block; }
.hero-title .fill { color: var(--accent); transition: color 400ms var(--ease); }

/* kf-flow decorative strip — absolute, behind hero content, centered */
.kf-flow-hero {
  position: absolute;
  left: calc(50% - 50vw);
  top: 50%;
  transform: translateY(-50%);
  width: 100vw;
  height: clamp(240px, 26vw, 340px);
  z-index: 0;
  pointer-events: none;
}
.kf-flow-hero canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 760px) {
  .hero-cols { grid-template-columns: 1fr; align-items: start; }
  .hero-right { padding-bottom: 0; }
}

/* Vimeo autoplay video */
.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--ink);
}
.hero-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-lede {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), background 200ms var(--ease), color 200ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-fill { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-fill:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--paper); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn:focus-visible,
.nav-links a:focus-visible,
.nav-cta:focus-visible,
.chip:focus-visible,
.lab-tab:focus-visible,
.lab-recast:focus-visible,
.nav-burger:focus-visible {
  outline: 3px solid var(--sapphire);
  outline-offset: 3px;
}

/* Hero stats */
/* "Done in seconds" — spinning circular seal, top-right of the header */
.hero-seal {
  position: absolute;
  top: clamp(5.2rem, 10vw, 8rem);
  right: var(--gutter);
  width: clamp(108px, 12vw, 148px);
  aspect-ratio: 1;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-seal-wizard {
  position: absolute;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  z-index: 1;
}
.hero-seal-ring { width: 100%; height: 100%; animation: sealSpin 22s linear infinite; }
.hero-seal-ring text {
  font-family: var(--font-body);
  font-size: 14px; font-weight: 800;
  text-transform: uppercase;
  /* fill comes from the animated #seal-grad gradient on the <text> element */
}
@keyframes sealSpin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .hero-seal { width: 96px; top: 4.6rem; } }

/* Wizard seal inside the CTA block — override absolute positioning */
.cta-seal {
  position: relative;
  top: auto;
  right: auto;
  width: clamp(96px, 11vw, 132px);
}

/* ============================================================
   STAGE — flat After Effects mock
   ============================================================ */
.stage {
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-pure);
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
}
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.82rem;
}
.stage-file { letter-spacing: 0.02em; }
.stage-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.stage-status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.stage-body {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: 0;
}

/* Plugin panel */
.panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.7rem;
  padding: 1rem;
  border-right: 2px solid var(--ink);
  background: var(--paper);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}
.panel-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); transition: background 400ms var(--ease); }
.panel-search {
  border: 1.5px solid var(--line-soft);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(10,10,10,0.5);
  background: var(--paper-pure);
}
.panel-recipes { display: grid; align-content: start; gap: 0.45rem; }
.chip {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  background: var(--paper-pure);
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease), transform 200ms var(--ease);
}
.chip b { font-size: 0.9rem; font-weight: 800; }
.chip i { font-style: normal; font-size: 0.74rem; font-weight: 600; color: rgba(10,10,10,0.55); }
.chip:hover { transform: translateX(3px); }
.chip.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--paper-pure)); }
.panel-cast {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  min-height: 48px;
  cursor: pointer;
  transition: background 400ms var(--ease), transform 160ms var(--ease);
}
.panel-cast:hover { transform: translateY(-2px); }

/* Monitor */
.monitor {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--ink);
  overflow: hidden;
  min-height: 0;
}
.monitor-art {
  position: relative;
  width: min(70%, 440px);
  aspect-ratio: 16 / 9;
}
.m-shape { position: absolute; display: block; }
.m-a { top: 18%; right: 8%; width: 46%; height: 22%; background: var(--flame); border-radius: 6px; }
.m-b { top: 46%; left: 6%; width: 64%; height: 16%; background: var(--sky); border-radius: 6px; }
.m-c { top: 70%; right: 16%; width: 32%; height: 12%; background: var(--gold); border-radius: 6px; }
.m-d { top: 12%; left: 9%; width: 16%; aspect-ratio: 1; border: 7px solid var(--sapphire); border-radius: 50%; }
.monitor-meta {
  position: absolute;
  left: 1rem; bottom: 1rem;
  display: grid;
  gap: 0.2rem;
  color: var(--paper);
}
.monitor-meta small {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.monitor-meta strong { font-family: var(--font-display); font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1; }
.monitor-meta span { font-size: 0.72rem; font-weight: 600; color: rgba(244,241,233,0.7); }

/* Timeline — styled like the After Effects timeline panel */
.track {
  position: relative;
  border-top: 2px solid var(--ink);
  background: var(--paper);
  padding: 0 0 0.6rem;
}
/* time ruler */
.track-ruler {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.35rem var(--gutter) 0.35rem 1rem;
  border-bottom: 1.5px solid var(--line-soft);
  background: color-mix(in srgb, var(--ink) 5%, var(--paper));
}
.track-ruler .ruler-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(10,10,10,0.45);
}
.track-ticks {
  position: relative;
  height: 14px;
  background-image: repeating-linear-gradient(
    to right, var(--line-soft) 0 1.5px, transparent 1.5px 10%);
}
.track-ticks::after {
  content: "00:00  ·  00:05  ·  00:11";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.04em;
  color: rgba(10,10,10,0.4);
}
.track-rows { display: grid; padding-top: 0.5rem; }
.track-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem var(--gutter) 0.4rem 1rem;
}
.track-row span {
  position: relative;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 1.2rem;
}
/* AE-style stopwatch toggle before each layer name */
.track-row span::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 9px; height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 35%, transparent);
  transition: background 400ms var(--ease), border-color 400ms var(--ease);
}
.clip {
  position: relative;
  height: 14px;
  border-radius: 4px;
  transform-origin: left;
}
/* keyframe diamonds riding the clip ends — the AE tell */
.clip::before, .clip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 2px;
}
.clip::before { left: -6px; }
.clip::after  { right: -6px; }
.k0 { background: var(--flame); width: 78%; }
.k1 { background: var(--sapphire); width: 54%; margin-left: 12%; }
.k2 { background: var(--gold); width: 40%; margin-left: 30%; }
.k3 { background: var(--sky); width: 64%; }
.k4 { background: var(--ink); width: 88%; }
.k4::before, .k4::after { background: var(--paper); }
.playhead {
  position: absolute;
  top: 0; bottom: 0;
  left: 28%;
  width: 2px;
  background: var(--accent);
  transition: background 400ms var(--ease);
  z-index: 2;
}
.playhead::before {
  content: "";
  position: absolute;
  top: -1px; left: -5px;
  width: 12px; height: 9px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Import animation */
.stage[data-workbench] .clip { animation: none; }
.stage.is-importing .clip {
  animation: clipWipe 700ms var(--ease) both;
}
.stage.is-importing .k0 { animation-delay: 60ms; }
.stage.is-importing .k1 { animation-delay: 160ms; }
.stage.is-importing .k2 { animation-delay: 260ms; }
.stage.is-importing .k3 { animation-delay: 360ms; }
.stage.is-importing .k4 { animation-delay: 460ms; }
.stage.is-importing .playhead { animation: playSweep 1300ms var(--ease) both; }
.stage.is-importing .track-row span { animation: rowIn 600ms var(--ease) both; }
.stage.is-importing .track-row:nth-child(1) span { animation-delay: 60ms; }
.stage.is-importing .track-row:nth-child(2) span { animation-delay: 160ms; }
.stage.is-importing .track-row:nth-child(3) span { animation-delay: 260ms; }
.stage.is-importing .track-row:nth-child(4) span { animation-delay: 360ms; }
.stage.is-importing .track-row:nth-child(5) span { animation-delay: 460ms; }
.stage.is-importing .m-shape { animation: popIn 600ms var(--ease) both; }
.stage.is-importing .m-a { animation-delay: 120ms; }
.stage.is-importing .m-b { animation-delay: 220ms; }
.stage.is-importing .m-c { animation-delay: 320ms; }
.stage.is-importing .m-d { animation-delay: 60ms; }

@keyframes clipWipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes playSweep { from { left: 6%; } to { left: 72%; } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   THE CURSE — black section
   ============================================================ */
.curse {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}
.rail-label {
  position: absolute;
  top: clamp(4rem, 9vw, 8rem);
  right: clamp(0.4rem, 1.5vw, 1.1rem);
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}
.curse-head, .proof-head, .spellbook-head, .cta-inner, .curse-list, .proof-steps, .lab {
  max-width: var(--maxw);
  margin-inline: auto;
}
.curse-head { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.curse h2, .proof h2, .spellbook h2 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  text-transform: none;
  max-width: 16ch;
  margin-top: 0.6rem;
}

.curse-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid rgba(244,241,233,0.25); }
.curse-row {
  display: grid;
  grid-template-columns: clamp(60px, 8vw, 120px) minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: baseline;
  padding: clamp(1.6rem, 3.5vw, 2.8rem) 0;
  border-bottom: 2px solid rgba(244,241,233,0.25);
}
.curse-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  color: var(--flame);
  line-height: 0.8;
}
.curse-row h3 { font-size: clamp(1.4rem, 2.6vw, 2.4rem); }
.curse-row p { color: rgba(244,241,233,0.78); font-size: clamp(0.98rem, 1.3vw, 1.15rem); max-width: 42ch; }

/* ============================================================
   THE SPELLBOOK
   ============================================================ */
.spellbook {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}
.spellbook-head { margin-bottom: clamp(2.2rem, 5vw, 4rem); }
.spellbook h2 { max-width: 18ch; margin-top: 0.6rem; }
.spellbook-sub {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 500;
  max-width: 52ch;
}

.lab {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: start;
}
.lab-tabs { display: grid; gap: 0.8rem; }
.lab-tab {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "no title" "no desc";
  column-gap: 1rem;
  row-gap: 0.3rem;
  text-align: left;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: clamp(1rem, 2vw, 1.4rem);
  background: var(--paper-pure);
  cursor: pointer;
  transition: background 220ms var(--ease), transform 200ms var(--ease), box-shadow 220ms var(--ease);
}
.lab-tab-no {
  grid-area: no;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1;
  color: rgba(10,10,10,0.35);
}
.lab-tab b { grid-area: title; font-size: clamp(1.2rem, 2vw, 1.6rem); font-family: var(--font-display); font-weight: 800; line-height: 1; }
.lab-tab small { grid-area: desc; font-size: 1rem; font-weight: 500; line-height: 1.4; color: rgba(10,10,10,0.7); }
.lab-tab:hover { transform: translate(3px, -3px); box-shadow: -3px 3px 0 var(--ink); }
.lab-tab.is-active {
  background: var(--accent);
  box-shadow: -5px 5px 0 var(--ink);
  transform: translate(3px, -3px);
}
.lab-tab.is-active .lab-tab-no { color: rgba(10,10,10,0.55); }
.lab-tab.is-active small { color: rgba(10,10,10,0.85); }

/* Lab preview card */
.lab-preview { display: grid; gap: clamp(1rem, 2vw, 1.6rem); }
.lab-card {
  border: 2px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper-pure);
}
.lab-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
}
.lab-card-bar strong { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.lab-recast {
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.lab-recast:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.lab-card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lab-monitor {
  position: relative;
  background: var(--ink);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.lab-monitor .m-shape { position: absolute; display: block; }
.lab-monitor small {
  position: absolute;
  left: 0.8rem; bottom: 0.8rem;
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.lab-layers { list-style: none; margin: 0; padding: 0.8rem; display: grid; align-content: center; gap: 0.55rem; border-left: 2px solid var(--ink); }
.lab-layers li { display: grid; gap: 0.3rem; }
.lab-layers span { font-size: 0.78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-layers .bar { height: 10px; border-radius: 3px; transform-origin: left; }
.b0 { background: var(--flame); width: 80%; }
.b1 { background: var(--sapphire); width: 55%; }
.b2 { background: var(--gold); width: 38%; }
.b3 { background: var(--sky); width: 66%; }
.b4 { background: var(--ink); width: 90%; }

.lab-copy { align-self: start; }
.lab-copy h3 { font-size: clamp(1.5rem, 3vw, 2.4rem); max-width: 18ch; }
.lab-copy p { margin-top: 0.9rem; font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 48ch; color: rgba(10,10,10,0.78); }

/* recipe swap animation */
.lab-preview.is-swapping .lab-layers li { animation: rowIn 460ms var(--ease) both; }
.lab-preview.is-swapping .lab-layers li:nth-child(2) { animation-delay: 70ms; }
.lab-preview.is-swapping .lab-layers li:nth-child(3) { animation-delay: 140ms; }
.lab-preview.is-swapping .lab-layers li:nth-child(4) { animation-delay: 210ms; }
.lab-preview.is-swapping .lab-layers li:nth-child(5) { animation-delay: 280ms; }
.lab-preview.is-swapping .lab-monitor .m-shape { animation: popIn 500ms var(--ease) both; }
.lab-preview.is-swapping .bar { animation: clipWipe 520ms var(--ease) both; }

/* ============================================================
   PROOF
   ============================================================ */
.proof {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}
.proof-head { margin-bottom: clamp(2.8rem, 6vw, 5rem); }
.proof h2 { max-width: 20ch; margin-top: 0; }

/* Timeline-track 4-step layout */
.proof-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
}

/* Horizontal AE-ruler line connecting the keyframe icon centers */
.proof-steps::before {
  content: "";
  position: absolute;
  top: 27px;          /* half of 54px proof-kf-wrap height */
  left: 12.5%;        /* center of first column */
  right: 12.5%;       /* center of last column  */
  height: 1.5px;
  background: rgba(244, 241, 233, 0.18);
  pointer-events: none;
  z-index: 0;
}

.proof-step {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 0 clamp(0.8rem, 2vw, 1.4rem) clamp(1.4rem, 3vw, 2.4rem);
}
.proof-step:first-child { padding-left: 0; }
.proof-step:last-child  { padding-right: 0; }

/* Keyframe icon row — centered so the ruler passes through each icon center */
.proof-kf-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 54px;
  position: relative;
  z-index: 1;
}
.proof-kf-wrap .kf-ic {
  animation: none;
  transition: transform 280ms var(--ease), color 280ms var(--ease),
              filter 280ms var(--ease);
}
.proof-step:hover .proof-kf-wrap .kf-ic {
  transform: translateY(-5px) scale(1.16);
  filter: drop-shadow(0 0 10px currentColor);
}

/* AE-style timecode label */
.proof-tc {
  display: block;
  text-align: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(244, 241, 233, 0.36);
}

.proof-step h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  margin-top: 0.3rem;
}
.proof-step p {
  color: rgba(244, 241, 233, 0.7);
  font-size: 0.95rem;
  max-width: 22ch;
}

/* staggered entrance via --step-d inline CSS variable */
.js .proof-step.reveal {
  transition: opacity 700ms var(--ease) var(--step-d, 0s),
              transform 700ms var(--ease) var(--step-d, 0s);
}

/* ============================================================
   CONVERSION — color block
   ============================================================ */
.cta-block {
  position: relative;
  z-index: 1;
  background: var(--sapphire);
  color: var(--ink);
  padding: clamp(4.5rem, 11vw, 9rem) var(--gutter);
  overflow: hidden;
}
.cta-inner { position: relative; display: grid; gap: 1.4rem; justify-items: start; text-align: left; }
.cta-shapes { display: flex; gap: 0.8rem; }
.cta-shapes .shape { width: 36px; height: 36px; }
.cta-shapes .shape-tri { font-size: 36px; }
.cta-block h2 {
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  max-width: 16ch;
  color: var(--paper);
}
.cta-block p { font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 500; max-width: 52ch; color: var(--paper); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.6rem; }
.cta-block .btn-ink { border-color: var(--paper); }
.cta-block .btn-ghost { border-color: var(--paper); color: var(--paper); }
.cta-block .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
}
.footer-brand .brand-word { font-size: clamp(1.8rem, 4vw, 3rem); }
.footer-brand .brand-word span { color: var(--gold); }
.footer-brand .brand-word sup { color: var(--paper); }
.footer-brand p { margin-top: 0.6rem; color: rgba(244,241,233,0.7); max-width: 32ch; }
.footer-back {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.2rem;
}

/* ============================================================
   REVEAL + MOTION (Lenis-era reveal toolkit)
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Hero title spread animation — fully JS-driven (see initHeroReveal in experience.js) */

/* Word-mask reveal for section headings (.split) */
.js .split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.js .split .w-in {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 720ms var(--ease);
  transition-delay: var(--d, 0s);
}
.js .split.is-visible .w-in { transform: none; }

/* clip-path wipe for blocks (Floema media cue) */
.js .clip-reveal { clip-path: inset(0 100% 0 0); transition: clip-path 950ms var(--ease); }
.js .clip-reveal.is-visible { clip-path: inset(0 0 0 0); }

/* floaty fade in/out as they scroll into view */
.js .floaty { opacity: 0; transition: opacity 800ms var(--ease); }
.js .floaty.is-visible { opacity: 1; }

/* parallax */
[data-parallax] { will-change: transform; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .stage-body { grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); }
  .curse-row { grid-template-columns: clamp(50px, 10vw, 90px) 1fr; }
  .curse-row p { grid-column: 1 / -1; max-width: 60ch; }
  .lab { grid-template-columns: 1fr; }
  .proof-steps { grid-template-columns: repeat(2, 1fr); }
  .proof-steps::before { display: none; }
  .proof-step { padding: 0 clamp(0.8rem, 2vw, 1.2rem) clamp(1.4rem, 3vw, 2.4rem); }
  .proof-step:first-child, .proof-step:nth-child(3) { padding-left: 0; }
  .proof-step:last-child, .proof-step:nth-child(2) { padding-right: 0; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .hero-lede { max-width: 44ch; }
  .hero-stats { grid-template-columns: 1fr; gap: 0; }
  .hero-stats li { padding: clamp(0.9rem, 3vw, 1.2rem) 0; }
  .hero-stats li + li { border-top: 2px solid var(--line-soft); }

  .stage-body { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 2px solid var(--ink); grid-template-rows: auto auto auto auto; }
  .panel-recipes { grid-auto-flow: row; }
  .monitor { min-height: 240px; }
  .track-row { grid-template-columns: 120px minmax(0, 1fr); }

  .lab-card-body { grid-template-columns: 1fr; }
  .lab-layers { border-left: 0; border-top: 2px solid var(--ink); }

  .proof-steps { grid-template-columns: 1fr; }
  .proof-step, .proof-step:first-child, .proof-step:last-child,
  .proof-step:nth-child(2), .proof-step:nth-child(3) {
    padding: 0 0 clamp(1.2rem, 4vw, 2rem);
  }
  .proof-kf-wrap { justify-content: flex-start; }
  .proof-tc { text-align: left; }

  .rail-label { display: none; }
}

@media (max-width: 480px) {
  .btn { width: 100%; }
  .hero-actions { width: 100%; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; }
}

/* ============================================================
   LIVE IMPORT STAGE v2 — Client_Opener.aep
   ============================================================ */
/* After Effects app-icon badge (rounded square · indigo · lavender "Ae") */
.ae-badge {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: #2A0E4F;
  color: #C9B6FF;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1.5px rgba(201, 182, 255, 0.5);
}
.ae-badge-lg {
  width: 1.5em; height: 1.5em;
  border-radius: 0.34em;
  font-size: 1.24em;
  vertical-align: -0.28em;
  margin-left: 0.18em;
  box-shadow: inset 0 0 0 2px rgba(201, 182, 255, 0.5);
}
.stage-file { display: inline-flex; align-items: center; gap: 0.55rem; }

/* status: idle / casting / done */
.stage-status .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  transition: background 0.3s var(--ease);
}
.stage-status em { font-style: normal; }
.stage[data-state="idle"] .stage-status { color: rgba(244,241,233,0.6); }
.stage[data-state="idle"] .status-dot { background: rgba(244,241,233,0.45); }
.stage[data-state="casting"] .stage-status { color: var(--gold); }
.stage[data-state="casting"] .status-dot { background: var(--gold); animation: dotPulse 1s infinite; }
.stage[data-state="done"] .stage-status { color: #57D98E; }
.stage[data-state="done"] .status-dot { background: #57D98E; }
@keyframes dotPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: 0.4; } }

/* plugin panel */
.panel-label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(10,10,10,0.42);
}
.chip i { display: block; }
.panel-cast-wrap { display: grid; gap: 0.55rem; align-self: end; }
.panel-cast { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.cast-glyph { font-size: 0.95rem; }
.stage[data-state="casting"] .panel-cast {
  background: color-mix(in srgb, var(--accent) 42%, var(--ink));
  color: var(--paper); cursor: wait;
}
.cast-progress { height: 4px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.cast-progress i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.05s linear; }

/* monitor preview — composition art per recipe */
.monitor-art { position: absolute; inset: 0; width: auto; aspect-ratio: auto; }
.monitor-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(244,241,233,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,241,233,0.05) 1px, transparent 1px);
  background-size: 11% 16%;
}
.sh {
  position: absolute; display: block; border-radius: 6px;
  opacity: 0; transform: scale(0.6);
  animation: shPop 0.5s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.08s + 0.1s);
}
.sh-dot { border-radius: 50%; aspect-ratio: 1; }
.sh.c-paper { background: #ECE6D6; }
@keyframes shPop { to { opacity: 1; transform: scale(1); } }

/* timeline ruler */
.track-ruler {
  display: flex; align-items: center; justify-content: space-between;
  grid-template-columns: none;
}
.ruler-label, .ruler-tc {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.72rem; font-weight: 600;
}
.ruler-label { color: rgba(10,10,10,0.5); }
.ruler-tc { color: var(--ink); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }

/* timeline rows (JS-rendered on cast) */
.track-rows { position: relative; min-height: 204px; padding: 0.55rem 0; }
.track-empty {
  position: absolute; inset: 0; margin: 0;
  display: grid; place-items: center; text-align: center;
  font-size: 0.82rem; font-weight: 600; color: rgba(10,10,10,0.38);
}
.trk-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  align-items: center; gap: 0.8rem;
  height: 34px; padding: 0 var(--gutter) 0 1rem;
  opacity: 0; animation: rowIn 0.4s var(--ease) forwards; animation-delay: var(--d);
}
.trk-name {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.74rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trk-swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.trk-lane { position: relative; height: 16px; }
.trk-bar {
  position: absolute; top: 2px; height: 13px;
  border-radius: 5px; box-shadow: inset 0 -2px 0 rgba(10,10,10,0.12);
  transform: scaleX(0); transform-origin: left;
  animation: barGrow 0.5s var(--ease) forwards; animation-delay: var(--d);
}
.kf-dot {
  position: absolute; top: 1px; width: 13px; height: 13px; z-index: 2;
  color: #FFFFFF;                                   /* clean solid white markers, no outline */
  opacity: 0; transform: scale(0);
  animation: kfPop 0.3s var(--ease) forwards; animation-delay: var(--d);
}
.c-ink { background: var(--ink); color: var(--ink); }
@keyframes barGrow { to { transform: scaleX(1); } }
@keyframes kfPop { to { opacity: 1; transform: scale(1); } }
@keyframes rowIn { to { opacity: 1; } }

/* footer caption */
.stage-foot {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1.1rem;
  border-top: 2px solid var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, var(--paper));
  font-size: 0.74rem; font-weight: 600; color: rgba(10,10,10,0.55);
}
.stage-foot .foot-mark {
  width: 9px; height: 9px; flex: none;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transition: background 0.3s var(--ease);
}

/* ============================================================
   STAGE — dark After Effects interface
   ============================================================ */
.stage { background: #16140F; }
.stage-bar { background: #0D0C0A; border-bottom: 1px solid rgba(255,255,255,0.07); }
.panel { background: #1A1813; border-right: 1px solid rgba(255,255,255,0.07); }
.panel-head { color: #F4F1E9; }
.panel-label { color: rgba(244,241,233,0.42); }
.chip {
  background: #221F19;
  border-color: rgba(255,255,255,0.10);
  color: #CFC7B5;
}
.chip b { color: #F4F1E9; }
.chip i { color: rgba(244,241,233,0.5); }
.chip:hover { background: #2A261F; }
.chip.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, #1A1813); }
.chip.is-active b { color: var(--accent); }
.cast-progress { background: rgba(255,255,255,0.10); }
.monitor { background: #0B0A08; }
.track { background: #16140F; border-top: 1px solid rgba(255,255,255,0.07); }
.track-ruler { background: #0D0C0A; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ruler-label { color: rgba(244,241,233,0.5); }
.ruler-tc { color: #E9E2D2; }
.track-empty { color: rgba(244,241,233,0.4); }
.trk-name { color: #D9D2C1; }
.stage-foot {
  background: #0D0C0A;
  border-top: 1px solid rgba(255,255,255,0.07);
  color: rgba(244,241,233,0.55);
}
.trk-bar { box-shadow: inset 0 -2px 0 rgba(0,0,0,0.28); }
/* keep the black / ink layers visible on the dark timeline */
.stage .c-ink { background: #A39B86; color: #A39B86; }
/* kf-dot icons use currentColor — ink color is too dark to see; restore to paper */
.stage .kf-dot.c-ink { color: rgba(244, 241, 233, 0.82); }

/* ============================================================
   WATCH DEMO BUTTON
   ============================================================ */
.btn-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.watch-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.6rem;
  padding-left: 2px;          /* optical centering of ▶ */
  flex: none;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.btn-watch:hover .watch-play {
  background: var(--flame);
  color: var(--ink);
}

/* ============================================================
   VIMEO MODAL
   ============================================================ */
.vimeo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  opacity: 0;
  transition: opacity 280ms var(--ease);
}
.vimeo-modal:not([hidden]) { opacity: 1; }
.vimeo-modal[hidden] { display: none; }

.vimeo-frame-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
}
.vimeo-frame {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border-radius: 12px;
}
.vimeo-close {
  position: absolute;
  top: clamp(0.8rem, 2vw, 1.4rem);
  right: clamp(0.8rem, 2vw, 1.4rem);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
  z-index: 1;
}
.vimeo-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}
.vimeo-close:focus-visible {
  outline: 3px solid var(--sapphire);
  outline-offset: 3px;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .split .w-in { transform: none !important; }
  .js .clip-reveal { clip-path: none !important; }
  .js .floaty { opacity: 1 !important; }
  [data-parallax] { transform: none !important; }
}
