/* ==========================================================================
   Maestro — maestrostud.io
   Design system + marketing site styles
   ========================================================================== */

:root {
  --bg: #0c111d;
  --bg-2: #121a2b;
  --bg-3: #1b2438;
  --line: rgba(226, 231, 237, 0.08);
  --line-strong: rgba(226, 231, 237, 0.16);
  --ink: #eef1f6;
  --ink-dim: #9ba5b6;
  --ink-faint: #5f6a7e;
  --peri: #8fa9e2;
  --gold: #d4dbe5;
  --sky: #5e7fbe;
  --indigo-deep: #232c44;
  --grad-glow: linear-gradient(120deg, #8fa9e2 0%, #d4dbe5 100%);
  --grad-aurora: linear-gradient(120deg, #5e7fbe 0%, #8fa9e2 55%, #d4dbe5 100%);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --radius: 14px;
  --radius-lg: 22px;
  --pad: clamp(20px, 4vw, 56px);
  --maxw: 1280px;
  --ease-out: cubic-bezier(0.2, 0.6, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(143, 169, 226, 0.35); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Reading progress
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 300;
  background: transparent;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--grad-aurora);
  transform: scaleX(0);
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12, 17, 29, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.015em;
}
.nav-brand .mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 8px rgba(143, 169, 226, 0.4)); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.nav-links a { position: relative; transition: color 0.25s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--grad-glow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  padding: 10px 22px;
  border-radius: 100px;
  background: var(--grad-glow);
  color: #101623;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(143, 169, 226, 0.35);
}
.nav-cta::after { display: none; }
@media (max-width: 900px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* --------------------------------------------------------------------------
   Chapter rail (desktop scroll-spy)
   -------------------------------------------------------------------------- */
.rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.rail.visible { opacity: 1; pointer-events: auto; }
.rail a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 16px;
}
.rail a i {
  order: 2;
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.55;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.rail a span {
  order: 1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.rail a:hover span { opacity: 1; transform: none; }
.rail a:hover i { opacity: 1; }
.rail a.active i {
  background: var(--gold);
  opacity: 1;
  transform: scale(1.35);
  box-shadow: 0 0 10px rgba(201, 209, 220, 0.7);
}
.rail a.active span { opacity: 1; transform: none; color: var(--gold); }
@media (max-width: 1180px) { .rail { display: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px var(--pad) 80px;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.hero-glow.g1 {
  width: 55vw; height: 55vw;
  top: -20vw; right: -15vw;
  background: radial-gradient(circle, rgba(94, 127, 190, 0.22), transparent 65%);
}
.hero-glow.g2 {
  width: 45vw; height: 45vw;
  bottom: -18vw; left: -12vw;
  background: radial-gradient(circle, rgba(143, 169, 226, 0.16), transparent 65%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  /* scroll scrub (set by JS): fades + drifts as you scroll past */
  opacity: calc(1 - var(--hero-p, 0));
  transform: translateY(calc(var(--hero-p, 0) * -46px));
  will-change: opacity, transform;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 209, 220, 0.25);
  border-radius: 100px;
  padding: 8px 18px;
  margin-bottom: 36px;
  background: rgba(201, 209, 220, 0.05);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--peri);
  box-shadow: 0 0 12px var(--peri);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 6.6vw, 88px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  font-weight: 600;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 32px;
  max-width: 56ch;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 300;
  color: var(--ink-dim);
  line-height: 1.65;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }
.hero-ctas {
  margin-top: 44px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--grad-glow);
  color: #101623;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(143, 169, 226, 0.4);
}
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: rgba(201, 209, 220, 0.5);
  background: rgba(201, 209, 220, 0.06);
  transform: translateY(-2px);
}
.hero-meta {
  margin-top: 56px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.hero-meta span b { color: var(--ink-dim); font-weight: 500; }

.scroll-cue {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 42px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  display: flex;
  justify-content: center;
}
.scroll-cue::before {
  content: "";
  width: 3px; height: 8px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--gold);
  animation: cue 2s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Films — cinematic video slots (and their placeholders)
   -------------------------------------------------------------------------- */
.film-hero {
  padding: 0 var(--pad) clamp(40px, 6vw, 90px);
  margin-top: clamp(-40px, -3vw, -20px);
  position: relative;
  z-index: 3;
}
.film-hero .film { max-width: min(1120px, 100%); margin: 0 auto; }

.film { margin: 0; }
.block .film { margin-top: clamp(44px, 5vw, 70px); }

.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) + 4px);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 20% 0%, rgba(94, 127, 190, 0.10), transparent 55%),
    radial-gradient(120% 130% at 85% 100%, rgba(143, 169, 226, 0.12), transparent 55%),
    linear-gradient(160deg, var(--bg-3), var(--bg-2));
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.5);
  /* scroll scrub (set by JS): settles from 0.94 → 1 as it enters */
  transform: scale(calc(0.94 + 0.06 * var(--p, 1)));
  will-change: transform;
}
.film-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Placeholder content inside a film frame — delete along with the frame's
   .vp div when the real <video class="film-video"> goes in. */
.vp {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.vp::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px dashed rgba(226, 231, 237, 0.14);
  border-radius: var(--radius-lg);
  pointer-events: none;
}
.vp-glow {
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 169, 226, 0.14), rgba(201, 209, 220, 0.05) 45%, transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}
.vp-badge {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 209, 220, 0.3);
  background: rgba(201, 209, 220, 0.06);
  border-radius: 100px;
  padding: 5px 14px;
}
.vp-what {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 27px);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.vp-spec {
  position: relative;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  max-width: 62ch;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 22px 0;
  background: rgba(18, 26, 43, 0.5);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.marquee-track span { display: flex; align-items: center; gap: 56px; }
.marquee-track i {
  font-style: normal;
  color: var(--peri);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Chapter sections
   -------------------------------------------------------------------------- */
section.block {
  padding: clamp(90px, 12vw, 170px) var(--pad);
  position: relative;
}
section.block.tint-sky { background: linear-gradient(180deg, transparent, rgba(94, 127, 190, 0.04) 35%, transparent); }
section.block.tint-peri { background: linear-gradient(180deg, transparent, rgba(143, 169, 226, 0.035) 40%, transparent); }
.block-inner { max-width: var(--maxw); margin: 0 auto; }

.kicker {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--peri);
  margin-bottom: 26px;
}
.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(143, 169, 226, 0.4), transparent);
}
.block h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.9vw, 50px);
  line-height: 1.16;
  letter-spacing: -0.005em;
  max-width: 24ch;
}
.block h2 em {
  font-style: normal;
  font-weight: 600;
  background: var(--grad-glow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.block-lede {
  margin-top: 26px;
  max-width: 62ch;
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 300;
  color: var(--ink-dim);
}
.block-lede strong { color: var(--ink); font-weight: 500; }
.mono-gold { font-family: var(--font-mono); font-size: 0.9em; color: var(--gold); }

/* Word-by-word headline reveal (spans injected by JS on [data-words]) */
h2 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--wd, 0s);
}
h2.in-view .w { opacity: 1; transform: none; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
  margin-top: 70px;
}
.split.rev { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
@media (max-width: 960px) {
  .split, .split.rev { grid-template-columns: 1fr; }
}

.feature-list { list-style: none; margin-top: 34px; display: grid; gap: 4px; }
.feature-list li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-dim);
  font-weight: 300;
}
.feature-list li:first-child { border-top: 1px solid var(--line); }
.feature-list li b { color: var(--ink); font-weight: 500; }
.feature-list .fl-icon {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  color: var(--gold);
}
.feature-list li code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--gold);
}
/* Two-up layout under a film */
.feature-list.cols {
  margin-top: clamp(36px, 4vw, 56px);
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(36px, 5vw, 80px);
  row-gap: 0;
}
.feature-list.cols li:nth-child(2) { border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .feature-list.cols { grid-template-columns: 1fr; }
  .feature-list.cols li:nth-child(2) { border-top: none; }
}

/* Panel — glass card (format section, docs pages) */
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(27, 36, 56, 0.85), rgba(18, 26, 43, 0.9));
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(201, 209, 220, 0.25), transparent 30%, transparent 70%, rgba(94, 127, 190, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.panel-bar .dots { display: flex; gap: 6px; margin-right: 8px; }
.panel-bar .dots i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
}
.panel-bar .dots i:first-child { background: rgba(143, 169, 226, 0.6); border-color: transparent; }

/* --------------------------------------------------------------------------
   Sync stats
   -------------------------------------------------------------------------- */
.sync-stats {
  margin-top: clamp(44px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--bg-2);
  padding: 26px 28px 24px;
}
.stat .stat-n {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--grad-glow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .stat-l {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-dim);
  font-weight: 300;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Feature grid
   -------------------------------------------------------------------------- */
.grid-cards {
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.gcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  background: rgba(18, 26, 43, 0.6);
  transition: border-color 0.35s ease, transform 0.35s ease, background 0.35s ease;
  position: relative;
  overflow: hidden;
}
.gcard::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-aurora);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gcard:hover {
  border-color: var(--line-strong);
  background: rgba(27, 36, 56, 0.85);
  transform: translateY(-4px);
}
.gcard:hover::before { opacity: 1; }
.gcard .gc-icon {
  width: 30px; height: 30px;
  color: var(--gold);
  margin-bottom: 20px;
}
.gcard h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}
.gcard p {
  font-size: 14.5px;
  font-weight: 300;
  color: var(--ink-dim);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Code / format section
   -------------------------------------------------------------------------- */
.code-panel {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 24px 26px;
  overflow-x: auto;
  color: var(--ink-dim);
}
.code-panel .k { color: var(--gold); }
.code-panel .s { color: #9dedc7; }
.code-panel .n { color: #8ad8ff; }
.code-panel .c { color: var(--ink-faint); font-style: italic; }

/* --------------------------------------------------------------------------
   Docs teaser
   -------------------------------------------------------------------------- */
.docs-cards {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.dcard {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px 26px;
  background: linear-gradient(170deg, rgba(27, 36, 56, 0.75), rgba(18, 26, 43, 0.9) 60%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
/* gradient hairline sweeps across the top on hover */
.dcard::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
/* steel halo rising from the corner */
.dcard::after {
  content: "";
  position: absolute;
  top: -70px; right: -70px;
  width: 210px; height: 210px;
  background: radial-gradient(circle, rgba(143, 169, 226, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.dcard:hover {
  border-color: rgba(143, 169, 226, 0.5);
  transform: translateY(-6px);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.45);
}
.dcard:hover::before { transform: scaleX(1); }
.dcard:hover::after { opacity: 1; }
.dcard .dc-num {
  position: absolute;
  top: 24px; right: 26px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-faint);
  opacity: 0.7;
  transition: color 0.3s ease, opacity 0.3s ease;
}
.dcard:hover .dc-num { color: var(--peri); opacity: 1; }
.dcard .dc-kicker {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--peri);
  background: rgba(143, 169, 226, 0.1);
  border: 1px solid rgba(143, 169, 226, 0.22);
  padding: 4px 11px;
  border-radius: 999px;
}
.dcard h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.005em;
}
.dcard p { font-size: 14.5px; font-weight: 300; color: var(--ink-dim); flex: 1; line-height: 1.6; }
.dcard p code { font-family: var(--font-mono); font-size: 0.9em; color: var(--ink); }
.dcard .dc-arrow {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.08em;
  transition: transform 0.3s ease, color 0.3s ease;
}
.dcard:hover .dc-arrow { transform: translateX(6px); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .dcard, .dcard::before, .dcard::after, .dcard .dc-arrow, .dcard .dc-num { transition: none; }
}

/* --------------------------------------------------------------------------
   Final CTA + footer
   -------------------------------------------------------------------------- */
.final-cta {
  text-align: center;
  padding: clamp(110px, 14vw, 190px) var(--pad);
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: "";
  position: absolute;
  left: 50%; top: 55%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(143, 169, 226, 0.14), rgba(94, 127, 190, 0.08) 45%, transparent 70%);
  pointer-events: none;
}
.final-cta .cta-mark {
  position: relative;
  width: 132px; height: 132px;
  margin: 0 auto 34px;
  /* the macOS icon carries its own rounded-square shape and padding;
     drop-shadow follows the alpha instead of masking to a circle */
  filter: drop-shadow(0 0 34px rgba(143, 169, 226, 0.55))
          drop-shadow(0 0 90px rgba(201, 209, 220, 0.3));
}
.final-cta h2 {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.8vw, 62px);
  line-height: 1.14;
  letter-spacing: -0.005em;
}
.final-cta h2 em {
  font-style: normal;
  font-weight: 600;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.final-cta p {
  position: relative;
  margin: 28px auto 0;
  max-width: 50ch;
  color: var(--ink-dim);
  font-weight: 300;
  font-size: 18px;
}
.final-cta .hero-ctas { justify-content: center; position: relative; }

footer {
  border-top: 1px solid var(--line);
  padding: 60px var(--pad) 44px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.015em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand .mark { width: 30px; height: 30px; }
.footer-tag {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-dim);
}
.footer-cols { display: flex; gap: clamp(40px, 6vw, 90px); flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--ink-dim);
  padding: 5px 0;
  font-weight: 300;
  transition: color 0.25s ease;
}
.footer-col a:hover { color: var(--gold); }
.footer-base {
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, h2 .w { opacity: 1; transform: none; }
  .hero-inner { opacity: 1; transform: none; }
  .film-frame { transform: none; }
}

/* ============ ChapterScript guest band ============
   Deliberately styled after chapterscript.com (dark slate + mint + mono),
   a visual handshake with the sister site. Colors are that site's tokens,
   hardcoded on purpose; don't blend them into the Maestro palette. */
.cs-band {
  position: relative;
  background: #0b0e14;
  border-block: 1px solid rgba(255, 255, 255, .08);
  padding: clamp(80px, 12vh, 130px) 24px;
  overflow: hidden;
}
.cs-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000 30%, transparent 80%);
}
.cs-inner { position: relative; max-width: 760px; margin: 0 auto; text-align: center; }
.cs-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: #56d4a0; margin-bottom: 22px;
}
.cs-wordmark {
  font-family: var(--font-mono);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 500; letter-spacing: -0.01em;
  color: #e6edf3; margin-bottom: 22px;
}
.cs-wordmark span { color: #56d4a0; }
.cs-copy { color: #8b98a9; font-size: 17px; line-height: 1.75; }
.cs-copy code, .cs-copy strong { color: #e6edf3; font-weight: 600; }
.cs-copy code { font-family: var(--font-mono); font-weight: 400; font-size: .92em; }
.cs-flow {
  font-family: var(--font-mono); font-size: 13px; color: #5b6675;
  background: #11161f; border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px; display: inline-block;
  padding: 10px 18px; margin: 28px 0 6px; white-space: nowrap; max-width: 100%;
  overflow-x: auto;
}
.cs-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.cs-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
  padding: 11px 20px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #e6edf3; background: #11161f;
  transition: border-color .15s, background .15s;
}
.cs-btn:hover { border-color: #56d4a0; }
.cs-btn-primary { background: #56d4a0; border-color: #56d4a0; color: #0b1712; }
.cs-btn-primary:hover { background: #6be0af; border-color: #6be0af; }

/* ---- Founding apps strip (Chapter 09) ---- */
.fapps { margin-top: 72px; }
.fapps-label {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 34px;
}
.fapps-label i {
  flex: 0 1 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-faint));
  opacity: .5;
}
.fapps-label i:last-child { background: linear-gradient(270deg, transparent, var(--ink-faint)); }
.fapps-row {
  display: flex; justify-content: center;
  gap: clamp(16px, 2.6vw, 28px); flex-wrap: wrap;
}
.fapp {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 216px; padding: 30px 20px 24px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid rgba(226, 231, 237, .09);
  border-radius: 20px;
  color: var(--ink); text-align: center;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.22,.8,.24,1), border-color .35s, box-shadow .35s;
}
a.fapp:hover {
  transform: translateY(-6px);
  border-color: rgba(143, 169, 226, .55);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
}
.fapp-halo {
  position: absolute; top: -46px; left: 50%; width: 190px; height: 150px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(143, 169, 226, .32), transparent 68%);
  opacity: .55; transition: opacity .35s;
  pointer-events: none;
}
a.fapp:hover .fapp-halo { opacity: 1; }
.fapp-arrow {
  position: absolute; top: 14px; right: 18px;
  font-size: 15px; color: var(--ink-faint);
  transition: color .3s, transform .3s;
}
a.fapp:hover .fapp-arrow { color: var(--peri); transform: translate(2px, -2px); }
.fapp img {
  position: relative;
  width: 88px; height: 88px; border-radius: 50%;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(226, 231, 237, .12);
  margin-bottom: 16px;
  transition: transform .35s cubic-bezier(.22,.8,.24,1);
}
a.fapp:hover img { transform: scale(1.07) rotate(-2deg); }
.fapp b { font-weight: 600; font-size: 15.5px; }
.fapp-tag {
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .07em;
  color: var(--peri);
  background: rgba(143, 169, 226, .12);
  border: 1px solid rgba(143, 169, 226, .25);
  padding: 4px 11px; border-radius: 999px;
}
.fapp-tag-soon {
  color: var(--gold);
  background: rgba(201, 209, 220, .1);
  border-color: rgba(201, 209, 220, .28);
}
@media (prefers-reduced-motion: reduce) {
  .fapp, .fapp img, .fapp-arrow, .fapp-halo { transition: none; }
}

/* ---- The ask (Chapter 08): open, centered ---- */
.ask {
  margin: 16px auto 0;
  max-width: 620px;
  text-align: center;
}
.ask-line {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  font-weight: 300;
  color: var(--ink-dim);
}
.ask-line em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}
.ask-ctas { margin-top: 26px; justify-content: center; }

/* ---- Founding passes (Chapter 08): ticket-stub trio, unique to this section ---- */
.fpasses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 8px 0 44px;
}
.fpass {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 26px 0;
  background: linear-gradient(170deg, rgba(27, 36, 56, 0.85), rgba(18, 26, 43, 0.95) 65%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  /* ticket corner cut */
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  /* punched notches where the perforation meets the edges */
  -webkit-mask-image:
    radial-gradient(circle 10px at 0 calc(100% - 53px), transparent 9px, #000 10px),
    radial-gradient(circle 10px at 100% calc(100% - 53px), transparent 9px, #000 10px);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 10px at 0 calc(100% - 53px), transparent 9px, #000 10px),
    radial-gradient(circle 10px at 100% calc(100% - 53px), transparent 9px, #000 10px);
  mask-composite: intersect;
  transition: transform 0.35s var(--ease-out), border-color 0.35s ease;
}
.fpass:nth-child(2) { transform: rotate(0.35deg); }
.fpass:nth-child(3) { transform: rotate(-0.3deg); }
.fpass:hover { transform: translateY(-6px) rotate(-0.6deg); border-color: rgba(143, 169, 226, 0.55); }
.fpass:nth-child(2):hover { transform: translateY(-6px) rotate(0.6deg); }
/* folded-corner glint */
.fpass::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  background: linear-gradient(225deg, transparent 46%, rgba(201, 209, 220, 0.5) 50%, transparent 74%);
  z-index: 2;
}
/* foil sheen sweeping across on hover */
.fpass::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(226, 231, 237, 0.09) 50%, rgba(143, 169, 226, 0.07) 54%, transparent 62%);
  background-size: 320% 100%;
  background-position: 110% 0;
  transition: background-position 0.9s var(--ease-out);
  pointer-events: none;
}
.fpass:hover::after { background-position: -35% 0; }
.fpass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fpass-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--peri);
}
.fpass-icon { width: 22px; height: 22px; color: var(--ink-faint); transition: color 0.3s ease; }
.fpass:hover .fpass-icon { color: var(--gold); }
.fpass h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  padding-right: 20px;
}
.fpass p {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-dim);
  line-height: 1.6;
  flex: 1;
  padding-right: 20px;
  padding-bottom: 16px;
}
/* vertical serial along the right edge */
.fpass-serial {
  position: absolute;
  top: 54px;
  right: 9px;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0.55;
}
/* the stub: fixed height so the perforation lines up with the notches */
.fpass-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 53px;
  margin-top: auto;
  border-top: 1.5px dashed rgba(226, 231, 237, 0.22);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
/* barcode: two layered rhythms read as pseudo-random bars */
.fpass-foot i {
  flex: 1;
  height: 18px;
  background-image:
    repeating-linear-gradient(90deg, rgba(226, 231, 237, 0.4) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(226, 231, 237, 0.32) 0 3px, transparent 3px 9px);
  opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  .fpass, .fpass::after, .fpass-icon { transition: none; }
  .fpass:nth-child(2), .fpass:nth-child(3) { transform: none; }
}

/* ---- Tear-here rule above the founding passes ---- */
.tear-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 30px;
  color: var(--ink-faint);
}
.tear-rule i {
  flex: 1;
  height: 0;
  border-top: 1.5px dashed rgba(226, 231, 237, 0.22);
}
.tear-rule svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--peri);
  transform: rotate(180deg); /* blades trailing the cut, moving left to right */
  opacity: 0.9;
}
.tear-rule span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---- Mobile menu ---- */
.nav-burger {
  display: none;
  position: relative;
  z-index: 220;
  width: 42px; height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(18, 26, 43, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 17px; height: 1.8px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-out), opacity 0.25s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }
.mobile-scrim {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(6, 9, 16, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-scrim.open { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 210;
  width: min(320px, 84vw);
  padding: 104px 34px 40px;
  display: none;
  flex-direction: column;
  background: rgba(18, 26, 43, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--line-strong);
  transform: translateX(105%);
  transition: transform 0.42s var(--ease-out);
}
.mobile-menu.open { transform: none; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.nav-cta {
  margin-top: 28px;
  border: none;
  border-radius: 100px;
  background: var(--grad-glow);
  color: #101623;
  text-align: center;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
}
body.menu-open { overflow: hidden; }
@media (max-width: 900px) {
  .nav-burger { display: flex; }
  .mobile-menu { display: flex; }
  .nav-links .nav-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-burger span, .mobile-scrim, .mobile-menu { transition: none; }
}

/* Menu-open fixes: keep the bar (and the burger's X) above the panel */
body.menu-open .nav { z-index: 230; }
.fapps-label span { white-space: nowrap; }
@media (max-width: 640px) {
  .cs-flow { white-space: normal; line-height: 1.9; }
}

/* ---- Light chapters (01, 03, 05): flipped palette for section rhythm ----
   Scoped variable overrides flip most components automatically. */
section.block.chapter-light {
  background: linear-gradient(180deg, #b9c5d8 0%, #a4b3c9 100%);
  /* re-declare color so descendants re-resolve the scoped ink instead of
     inheriting body's computed light value */
  color: var(--ink);
  --ink: #16202f;
  --ink-dim: #43516a;
  --ink-faint: #67758e;
  --line: rgba(22, 32, 47, 0.13);
  --line-strong: rgba(22, 32, 47, 0.24);
  --peri: #3d5ea6;
  --gold: #4c5a75;
  --sky: #33518f;
  --grad-glow: linear-gradient(120deg, #3d5ea6 0%, #64789c 100%);
  --grad-aurora: linear-gradient(120deg, #33518f 0%, #4a68b0 55%, #5c7392 100%);
}
/* cards go paper-white on the light field; the dark theme's glow
   overlay would wash out titles here, so it's disabled */
.chapter-light .gcard {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(22, 32, 47, 0.16);
}
.chapter-light .gcard:hover {
  background: rgba(255, 255, 255, 0.6);
}
.chapter-light .gcard::before { display: none; }
/* the video placeholder stays a dark screen (it stands in for footage),
   framed so it reads deliberate on the light field */
.chapter-light .film-frame {
  box-shadow: 0 30px 70px rgba(22, 32, 47, 0.35);
  border-radius: var(--radius-lg);
}
/* selection + marquee-adjacent hairlines read on light */
.chapter-light ::selection { background: rgba(61, 94, 166, 0.25); color: var(--ink); }

/* ---- Blue chapter (01): the third section style, field in the em-word blue ---- */
section.block.chapter-blue {
  /* top edge matches the hero's "r" in reality (#5e7fbe, the aurora start),
     deepening slightly so lower body copy keeps contrast */
  background: linear-gradient(180deg, #5e7fbe 0%, #47639f 100%);
  /* re-declare so descendants re-resolve the scoped ink (same trick as .chapter-light) */
  color: var(--ink);
  --ink: #f7fafd;
  --ink-dim: #e6ecf8;
  --ink-faint: #c9d4ec;
  --line: rgba(240, 246, 255, 0.22);
  --line-strong: rgba(240, 246, 255, 0.38);
  --peri: #e9f0fd;
  --gold: #f4f7fc;
  --sky: #cddcf8;
  --grad-glow: linear-gradient(120deg, #dce8fc 0%, #ffffff 100%);
  --grad-aurora: linear-gradient(120deg, #bed2f6 0%, #e7eefc 55%, #ffffff 100%);
}
.chapter-blue .film-frame {
  box-shadow: 0 32px 80px rgba(8, 15, 35, 0.55);
  border-radius: var(--radius-lg);
}
.chapter-blue ::selection { background: rgba(255, 255, 255, 0.3); color: #1a2b57; }
/* the lighter field needs a touch more text weight to stay crisp */
.chapter-blue .block-lede, .chapter-blue .feature-list li { font-weight: 400; }

/* Rail stays legible over the light and blue chapter fields */
.rail a span {
  text-shadow: 0 1px 3px rgba(8, 15, 30, 0.7), 0 2px 10px rgba(8, 15, 30, 0.45);
}
.rail a i {
  box-shadow: 0 1px 4px rgba(8, 15, 30, 0.55);
}
.rail a.active i {
  box-shadow: 0 0 10px rgba(212, 219, 229, 0.7), 0 1px 4px rgba(8, 15, 30, 0.55);
}

/* Chapter 05 shares the blue treatment; its cards adapt to the field */
.chapter-blue .gcard {
  background: rgba(16, 27, 56, 0.35);
  border-color: rgba(240, 246, 255, 0.2);
}
.chapter-blue .gcard:hover {
  background: rgba(16, 27, 56, 0.5);
  border-color: rgba(240, 246, 255, 0.4);
}

/* Chapter 07 (Learn) on the light field: docs cards go paper */
.chapter-light .dcard {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72) 60%);
  border-color: rgba(22, 32, 47, 0.16);
}
.chapter-light .dcard:hover {
  border-color: rgba(61, 94, 166, 0.55);
  box-shadow: 0 26px 50px rgba(22, 32, 47, 0.22);
}
.chapter-light .dcard::after {
  background: radial-gradient(circle, rgba(61, 94, 166, 0.1), transparent 65%);
}
.chapter-light .dc-kicker {
  background: rgba(61, 94, 166, 0.1);
  border-color: rgba(61, 94, 166, 0.3);
}

/* ---- Section textures: greyscaled Unsplash imagery, mostly transparent so
   each field's color spills through. Swap for our own stills eventually. ---- */
section.block.chapter { z-index: 0; }
section.block.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--tex, none) center / cover no-repeat;
  filter: grayscale(1);
  opacity: var(--tex-o, 0);
  pointer-events: none;
}
/* 01 · the cutting room: a film projector */
#studio  { --tex: url("https://images.unsplash.com/photo-1478720568477-152d9b164e26?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.10; }
/* 02 · inside the headset */
#spatial { --tex: url("https://images.unsplash.com/photo-1592478411213-6153e4ebc07d?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.06; }
/* 03 · motion: long-exposure light trails */
#animation { --tex: url("https://images.unsplash.com/photo-1550684376-efcbd6e3f031?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.12; }
/* 04 · the network at night */
#sync    { --tex: url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.07; }
/* 05 · a sky full of features */
#everything { --tex: url("https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.09; }
/* 07 · the library */
#learn   { --tex: url("https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.06; }
/* 08 · be in the room: the theater */
#early-access { --tex: url("https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1600&q=55"); --tex-o: 0.08; }

/* the scroll cue fades via JS as the film arrives; ease the steps */
.scroll-cue { transition: opacity 0.2s linear; }
