/* ═══════════════════════════════════════════════════════════
   FRANKIE OS — Executive Systems Briefing · v2 APEX
   Aesthetic: obsidian luxe. Black is the room, gold is the light.
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink: #070708;
  --ink-2: #0d0d10;
  --ink-3: #131318;
  --line: rgba(232, 193, 90, 0.14);
  --line-soft: rgba(244, 239, 230, 0.08);
  --gold: #e8c15a;
  --gold-deep: #c9963b;
  --gold-pale: #f5d78e;
  --paper: #f4efe6;
  --paper-dim: rgba(244, 239, 230, 0.62);
  --paper-faint: rgba(244, 239, 230, 0.38);
  --display: "Clash Display", Georgia, serif;
  --body: "General Sans", -apple-system, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --serif-i: "Fraunces", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--ink); }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); }
.gold { color: var(--gold); }
em { font-style: italic; }

/* ── Custom cursor ─────────────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button { cursor: none; }
  .cur-dot {
    position: fixed; z-index: 200; pointer-events: none;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gold); left: 0; top: 0;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
  }
  .cur-ring {
    position: fixed; z-index: 199; pointer-events: none;
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(232, 193, 90, 0.5); left: 0; top: 0;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease),
                border-color 0.3s, background 0.3s;
  }
  .cur-ring.is-hot {
    width: 58px; height: 58px;
    border-color: var(--gold);
    background: rgba(232, 193, 90, 0.08);
  }
}
@media not ((hover: hover) and (pointer: fine)) {
  .cur-dot, .cur-ring { display: none; }
}

/* ── Atmosphere ────────────────────────────────────────────── */
.atmo { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
.atmo-glow {
  position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5;
  will-change: transform;
}
.atmo-glow--a {
  width: 56vw; height: 56vw; top: -18vw; right: -16vw;
  background: radial-gradient(circle, rgba(201, 150, 59, 0.16), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.atmo-glow--b {
  width: 44vw; height: 44vw; bottom: -14vw; left: -12vw;
  background: radial-gradient(circle, rgba(232, 193, 90, 0.08), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(-6vw, 8vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(7vw, -6vh) scale(1.08); } }
.atmo-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 0%, transparent 78%);
  opacity: 0.5;
}
#dust { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); }
  100% { transform: translate(0, 0); }
}

/* ── Boot overlay ──────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: 100; background: #040405;
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(150% at 50% 42%);
  transition: clip-path 1.1s cubic-bezier(0.65, 0, 0.35, 1), visibility 1.1s;
  cursor: pointer;
}
.boot.is-done { clip-path: circle(0% at 50% 42%); visibility: hidden; }
.boot-inner { text-align: center; width: min(420px, 86vw); }
.boot-mark {
  font-family: var(--display); font-weight: 600; font-size: 64px; color: var(--gold);
  width: 110px; height: 110px; margin: 0 auto 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 28px; position: relative;
}
.boot-mark::after {
  content: ""; position: absolute; inset: -1px; border-radius: 28px;
  border: 1px solid var(--gold);
  animation: boot-pulse 1.6s var(--ease) infinite;
}
@keyframes boot-pulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.28); }
}
.boot-lines {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em;
  color: var(--paper-dim); text-align: left; min-height: 116px; line-height: 2.1;
}
.boot-lines .ok { color: var(--gold); }
.boot-bar {
  height: 2px; background: rgba(244, 239, 230, 0.1); border-radius: 2px;
  margin-top: 18px; overflow: hidden;
}
.boot-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-pale));
  transition: width 0.25s linear;
}
.boot-pct {
  margin-top: 10px; font-size: 11px; letter-spacing: 0.2em;
  color: var(--gold); text-align: right;
}
.boot-skip {
  margin-top: 26px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint);
}

/* ── Progress rail ─────────────────────────────────────────── */
.rail {
  position: fixed; right: 34px; top: 50%; transform: translateY(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 22px; align-items: center;
}
.rail-line {
  position: absolute; top: 6px; bottom: 6px; width: 1px;
  background: var(--line-soft); z-index: -1;
}
.rail-fill {
  width: 100%; background: linear-gradient(var(--gold-pale), var(--gold-deep));
  height: 0%; transition: height 0.3s linear;
}
.rail-dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid var(--paper-faint); background: var(--ink);
  position: relative; transition: all 0.35s var(--ease);
}
.rail-dot span {
  position: absolute; right: 26px; top: 50%; transform: translateY(-50%) translateX(8px);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); white-space: nowrap;
  opacity: 0; transition: all 0.3s var(--ease); pointer-events: none;
}
.rail-dot:hover span { opacity: 1; transform: translateY(-50%) translateX(0); }
.rail-dot.is-active {
  border-color: var(--gold); background: var(--gold);
  box-shadow: 0 0 14px rgba(232, 193, 90, 0.55);
}
.rail-dot.is-past { border-color: var(--gold-deep); background: var(--gold-deep); }
.topbar { display: none; }

/* ── Next-chapter pill ─────────────────────────────────────── */
.next-pill {
  position: fixed; bottom: 30px; right: 86px; z-index: 49;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(13, 13, 16, 0.82); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 13px 22px;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
              border-color 0.3s, box-shadow 0.3s;
}
.next-pill.is-on { opacity: 1; transform: none; pointer-events: auto; }
.next-pill:hover { border-color: var(--gold); box-shadow: 0 8px 32px rgba(232, 193, 90, 0.18); }
.next-pill-arrow { animation: bob 1.8s ease-in-out infinite; }

/* ── Shared chapter scaffolding ────────────────────────────── */
.chapter { max-width: 1180px; margin: 0 auto; padding: 150px 56px 60px; }
.ch-head { max-width: 760px; margin-bottom: 72px; position: relative; }
.ch-ghost {
  position: absolute; top: -110px; right: -340px; z-index: -1;
  font-family: var(--display); font-weight: 700; font-size: 380px; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 193, 90, 0.07);
  pointer-events: none; user-select: none;
  will-change: transform;
}
.ch-kicker {
  font-size: 11.5px; letter-spacing: 0.32em; color: var(--gold);
  margin-bottom: 22px; min-height: 1.4em;
}
.ch-kicker::before {
  content: ""; display: inline-block; width: 34px; height: 1px;
  background: var(--gold); vertical-align: middle; margin-right: 14px;
}
.ch-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(38px, 5.2vw, 64px); line-height: 1.04;
  letter-spacing: -0.015em; margin-bottom: 26px;
}
.ch-lede { font-size: 18.5px; color: var(--paper-dim); max-width: 640px; }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* mouse-follow glow on cards */
.glow-track { position: relative; }
.glow-track::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(232, 193, 90, 0.09), transparent 65%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.glow-track:hover::after { opacity: 1; }

/* ── 00 · Hero ─────────────────────────────────────────────── */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 90px 56px 30px; }
.hero-inner {
  max-width: 1180px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 72px; align-items: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em;
  color: var(--gold); margin-bottom: 30px; display: flex; align-items: center; gap: 12px;
  opacity: 0; animation: rise 0.9s var(--ease) 0.15s forwards;
}
.eyebrow-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 193, 90, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(232, 193, 90, 0); }
}
.hero-h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(54px, 7.8vw, 104px); line-height: 0.98; letter-spacing: -0.02em;
}
.hero-line { display: block; white-space: nowrap; }
.hero-line .ch {
  display: inline-block; opacity: 0; transform: translateY(0.55em) rotate(4deg);
  animation: ch-rise 0.7s var(--ease) forwards;
  animation-delay: calc(0.3s + var(--ci) * 38ms);
}
@keyframes ch-rise { to { opacity: 1; transform: none; } }
.hero-line--gold .ch {
  background: linear-gradient(105deg, var(--gold-pale) 10%, var(--gold-deep) 55%, var(--gold-pale) 90%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-line--gold { animation: shimmer 6s ease-in-out 1.8s infinite; }
@keyframes shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.hero-sub {
  margin-top: 30px; font-size: 19.5px; color: var(--paper-dim); max-width: 480px;
  opacity: 0; animation: rise 1s var(--ease) 0.85s forwards;
}
.hero-sub em { color: var(--gold); font-style: italic; }
.hero-meta {
  margin-top: 18px; font-size: 10.5px; letter-spacing: 0.16em;
  color: var(--paper-faint);
  opacity: 0; animation: rise 1s var(--ease) 0.95s forwards;
}
.hero-stats {
  display: flex; gap: 40px; margin-top: 44px; flex-wrap: wrap;
  opacity: 0; animation: rise 1s var(--ease) 1.05s forwards;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-n {
  font-family: var(--display); font-weight: 600; font-size: 44px;
  color: var(--gold); line-height: 1;
}
.stat-l {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--paper-faint); line-height: 1.7;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 48px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  background: linear-gradient(120deg, var(--gold-pale), var(--gold-deep));
  padding: 18px 32px; border-radius: 100px;
  opacity: 0; animation: rise 1s var(--ease) 1.2s forwards;
  transition: box-shadow 0.35s var(--ease);
  will-change: transform;
}
.hero-cta:hover { box-shadow: 0 14px 44px rgba(232, 193, 90, 0.3); }
.cta-arrow { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.hero-portrait { opacity: 0; animation: rise 1.1s var(--ease) 0.6s forwards; perspective: 1100px; }
.portrait-tilt {
  position: relative; transform-style: preserve-3d;
  will-change: transform; transition: transform 0.2s ease-out;
}
.portrait-orbit {
  position: absolute; inset: -26px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(232, 193, 90, 0.5) 8%, transparent 16%, transparent 50%, rgba(232, 193, 90, 0.25) 58%, transparent 66%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), black calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 1.5px), black calc(100% - 1.5px));
  animation: orbit-spin 14s linear infinite;
  pointer-events: none;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.portrait-frame { position: relative; border-radius: 26px; overflow: hidden; transform: translateZ(30px); }
.portrait-frame img {
  border-radius: 26px; width: 100%; aspect-ratio: 1;
  object-fit: cover; filter: contrast(1.04) saturate(0.94);
  animation: ken-burns 18s ease-in-out infinite alternate;
}
@keyframes ken-burns { from { transform: scale(1); } to { transform: scale(1.07); } }
.portrait-frame::after {
  content: ""; position: absolute; inset: 0; border-radius: 26px;
  background: linear-gradient(195deg, transparent 55%, rgba(7, 7, 8, 0.88));
  pointer-events: none;
}
.portrait-scan {
  position: absolute; left: 0; right: 0; top: -40%; height: 32%;
  background: linear-gradient(180deg, transparent, rgba(232, 193, 90, 0.06) 45%, rgba(232, 193, 90, 0.12) 50%, rgba(232, 193, 90, 0.06) 55%, transparent);
  animation: scan 7s ease-in-out 2s infinite;
  pointer-events: none;
}
@keyframes scan {
  0% { top: -40%; } 38% { top: 110%; } 100% { top: 110%; }
}
.portrait-ring {
  position: absolute; inset: -14px; border-radius: 36px;
  border: 1px solid var(--line); pointer-events: none;
  transform: translateZ(10px);
}
.portrait-tag {
  position: absolute; left: 26px; bottom: 24px; z-index: 2;
  font-size: 10.5px; letter-spacing: 0.2em; color: var(--gold); line-height: 1.9;
}
.portrait-tag .tag-dim { color: var(--paper-dim); }

/* ── Ticker ────────────────────────────────────────────────── */
.ticker {
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  overflow: hidden; padding: 17px 0; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.ticker-track {
  display: flex; gap: 38px; width: max-content; align-items: center;
  animation: ticker-roll 36s linear infinite;
}
.ticker-track span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em;
  color: var(--paper-faint); white-space: nowrap;
}
.ticker-track i { color: var(--gold-deep); font-style: normal; font-size: 8px; }
@keyframes ticker-roll { to { transform: translateX(-50%); } }

/* ── 01 · Principles ───────────────────────────────────────── */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.principle {
  border: 1px solid var(--line-soft); border-radius: 20px; padding: 34px 30px;
  background: linear-gradient(170deg, var(--ink-2), var(--ink));
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
  overflow: hidden;
}
.principle::before {
  content: ""; position: absolute; top: 0; left: 30px; right: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.principle:hover { border-color: var(--line); transform: translateY(-4px); }
.principle:hover::before { opacity: 1; }
.principle-num { font-size: 11px; letter-spacing: 0.26em; color: var(--gold); margin-bottom: 20px; }
.principle h3 {
  font-family: var(--display); font-weight: 600; font-size: 23px;
  margin-bottom: 12px; letter-spacing: -0.01em;
}
.principle p { font-size: 15.5px; color: var(--paper-dim); }
.principle--feature {
  background: linear-gradient(170deg, rgba(232, 193, 90, 0.1), rgba(201, 150, 59, 0.03));
  border-color: var(--line);
}
.principle--feature p { color: var(--paper); }

/* ── 02 · Skill deck ───────────────────────────────────────── */
.deck-meter {
  display: flex; align-items: center; gap: 22px; margin-bottom: 26px;
}
.deck-meter-label {
  font-size: 11px; letter-spacing: 0.22em; color: var(--gold); white-space: nowrap;
  transition: color 0.4s;
}
.deck-meter-bar {
  flex: 1; height: 2px; background: rgba(244, 239, 230, 0.1);
  border-radius: 2px; overflow: hidden;
}
.deck-meter-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-pale));
  transition: width 0.6s var(--ease);
}
.deck-meter.is-complete .deck-meter-label {
  background: linear-gradient(105deg, var(--gold-pale), var(--gold-deep), var(--gold-pale));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: meter-shine 2.4s linear infinite;
}
@keyframes meter-shine { to { background-position: 200% 0; } }

.deck { display: flex; flex-direction: column; gap: 12px; }
.card {
  border: 1px solid var(--line-soft); border-radius: 18px;
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  overflow: hidden; transition: border-color 0.4s var(--ease);
}
.card.is-open { border-color: var(--gold-deep); }
.card-face {
  display: grid; grid-template-columns: 64px 1.05fr 1fr 26px 40px;
  align-items: center; gap: 18px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; color: inherit;
  font-family: inherit; padding: 26px 32px;
}
.card-num {
  font-size: 13px; color: var(--gold); letter-spacing: 0.1em;
  transition: transform 0.4s var(--ease);
}
.card.is-open .card-num { transform: scale(1.3); }
.card-name {
  font-family: var(--display); font-weight: 600; font-size: clamp(19px, 2.2vw, 26px);
  letter-spacing: -0.01em;
}
.card-hook { font-size: 15px; color: var(--paper-faint); font-style: italic; }
.card-done {
  font-size: 14px; color: var(--gold); justify-self: center;
  opacity: 0; transform: scale(0.4); transition: all 0.45s var(--ease);
}
.card.is-explored .card-done { opacity: 1; transform: scale(1); }
.card-plus { position: relative; width: 30px; height: 30px; justify-self: end; }
.card-plus::before, .card-plus::after {
  content: ""; position: absolute; background: var(--gold); top: 50%; left: 50%;
  transition: transform 0.45s var(--ease);
}
.card-plus::before { width: 16px; height: 1.5px; transform: translate(-50%, -50%); }
.card-plus::after { width: 1.5px; height: 16px; transform: translate(-50%, -50%); }
.card.is-open .card-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.card-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.card.is-open .card-body { grid-template-rows: 1fr; }
.card-body-inner { overflow: hidden; padding: 0 32px 0 116px; }
.card.is-open .card-body-inner { padding-bottom: 34px; }
.card-body-inner > p { margin-bottom: 16px; max-width: 720px; color: var(--paper-dim); font-size: 16px; }
.card-body-inner strong { color: var(--paper); font-weight: 600; }
.card-body-inner strong.gold { color: var(--gold); }
.card-try {
  font-size: 12.5px; letter-spacing: 0.04em; color: var(--gold);
  border: 1px dashed rgba(232, 193, 90, 0.35); border-radius: 12px;
  padding: 14px 18px; display: inline-block; max-width: 720px; line-height: 1.8;
  background: rgba(232, 193, 90, 0.05);
}

/* ── 03 · A day with Frankie ───────────────────────────────── */
.day-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.day-tabs { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 90px; }
.day-tab {
  display: flex; align-items: baseline; gap: 18px; text-align: left;
  background: none; border: 1px solid var(--line-soft); border-radius: 16px;
  padding: 22px 26px; cursor: pointer; color: inherit; font-family: inherit;
  transition: all 0.35s var(--ease);
}
.day-tab:hover { border-color: var(--line); transform: translateX(4px); }
.day-tab.is-active {
  border-color: var(--gold-deep);
  background: linear-gradient(120deg, rgba(232, 193, 90, 0.1), transparent 70%);
  transform: translateX(8px);
}
.day-time { font-size: 12px; letter-spacing: 0.12em; color: var(--gold); min-width: 76px; }
.day-label { font-family: var(--display); font-weight: 600; font-size: 20px; }
.day-tab--gold .day-label { color: var(--gold); }
.phone {
  border: 1px solid var(--line); border-radius: 30px; overflow: hidden;
  background: var(--ink-2); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.phone-head {
  display: flex; align-items: center; gap: 10px; padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--display); font-weight: 600; font-size: 17px;
}
.phone-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; }
.phone-status { margin-left: auto; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-faint); }
.phone-status.is-typing { color: var(--gold); }
.phone-scroll { padding: 26px 22px; min-height: 500px; display: flex; flex-direction: column; }
.moment { display: none; flex-direction: column; gap: 12px; }
.moment.is-active { display: flex; }
.msg {
  max-width: 86%; padding: 15px 19px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.65;
  opacity: 0; transform: translateY(16px) scale(0.9);
  transition: opacity 0.4s var(--ease),
              transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.msg.is-shown { opacity: 1; transform: none; }
.msg--f {
  align-self: flex-start; background: var(--ink-3);
  border: 1px solid var(--line-soft); border-bottom-left-radius: 6px;
  color: var(--paper-dim);
}
.msg--f strong { color: var(--gold); }
.msg--l {
  align-self: flex-end; border-bottom-right-radius: 6px;
  background: linear-gradient(120deg, rgba(232, 193, 90, 0.92), rgba(201, 150, 59, 0.92));
  color: #161003; font-weight: 500;
}
.msg--note {
  align-self: center; max-width: 100%; text-align: center;
  background: none; border: 1px dashed rgba(232, 193, 90, 0.35);
  color: var(--gold); font-size: 12px; letter-spacing: 0.03em; line-height: 1.9;
}
.msg--typing {
  align-self: flex-start; background: var(--ink-3);
  border: 1px solid var(--line-soft); border-bottom-left-radius: 6px;
  display: inline-flex; gap: 5px; align-items: center;
  padding: 17px 19px;
}
.msg--typing b {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold-deep);
  animation: typing-bounce 1s ease-in-out infinite;
}
.msg--typing b:nth-child(2) { animation-delay: 0.15s; }
.msg--typing b:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── 04 · Vaults ───────────────────────────────────────────── */
.vaults { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vault {
  border: 1px solid var(--line-soft); border-radius: 18px; padding: 28px 24px;
  background: linear-gradient(170deg, var(--ink-2), var(--ink));
  transition: all 0.4s var(--ease);
}
.vault::before {
  content: ""; position: absolute; top: 28px; right: 24px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); opacity: 0.35; transition: opacity 0.4s;
  box-shadow: 0 0 10px rgba(232, 193, 90, 0.4);
}
.vault:hover { border-color: var(--line); transform: translateY(-4px); }
.vault:hover::before { opacity: 1; }
.vault-path { display: block; font-size: 11px; letter-spacing: 0.06em; color: var(--gold); margin-bottom: 16px; }
.vault h3 { font-family: var(--display); font-weight: 600; font-size: 19px; margin-bottom: 8px; }
.vault p { font-size: 14px; color: var(--paper-dim); }

/* ── 05 · Org chart + routing demo ─────────────────────────── */
.org { display: flex; flex-direction: column; align-items: center; }
.org-center { display: flex; flex-direction: column; align-items: center; }
.org-stem { width: 1px; height: 56px; background: linear-gradient(var(--gold), var(--line-soft)); }
.agent {
  border: 1px solid var(--line-soft); border-radius: 22px; padding: 26px;
  background: linear-gradient(170deg, var(--ink-2), var(--ink));
  text-align: center; width: 250px; transition: all 0.45s var(--ease);
}
.agent:hover { transform: translateY(-5px); border-color: var(--line); }
.agent img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 18px; border: 1px solid var(--line);
  transition: transform 0.45s var(--ease);
}
.agent:hover img { transform: scale(1.06); }
.agent h3 { font-family: var(--display); font-weight: 600; font-size: 22px; }
.agent-role { font-size: 10px; letter-spacing: 0.24em; color: var(--gold); margin: 8px 0 12px; }
.agent-desc { font-size: 13.5px; color: var(--paper-dim); }
.agent--frankie {
  width: 290px; border-color: var(--gold-deep);
  background: linear-gradient(170deg, rgba(232, 193, 90, 0.09), var(--ink));
  box-shadow: 0 20px 70px rgba(201, 150, 59, 0.12);
}
.agent--frankie img { width: 116px; height: 116px; border-color: var(--gold-deep); }
.org-row { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }

.agent.is-routed {
  border-color: var(--gold); transform: translateY(-7px);
  box-shadow: 0 0 0 1px var(--gold), 0 24px 70px rgba(232, 193, 90, 0.22);
}
.agent.is-dim { opacity: 0.35; filter: saturate(0.6); }

.route-demo {
  margin-top: 64px; width: 100%; max-width: 860px;
  border: 1px solid var(--line-soft); border-radius: 24px;
  padding: 38px 40px; background: var(--ink-2);
}
.route-k { font-size: 11px; letter-spacing: 0.28em; color: var(--gold); margin-bottom: 24px; min-height: 1.4em; }
.route-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.route-chip {
  font-family: var(--body); font-size: 14px; color: var(--paper-dim);
  background: none; border: 1px solid var(--line-soft); border-radius: 100px;
  padding: 11px 20px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.route-chip:hover { border-color: var(--gold-deep); color: var(--paper); transform: translateY(-2px); }
.route-chip.is-active {
  border-color: var(--gold); color: var(--ink); font-weight: 500;
  background: linear-gradient(120deg, var(--gold-pale), var(--gold-deep));
}
.route-chip--split { border-style: dashed; }
.route-out { margin-top: 26px; border-top: 1px solid var(--line-soft); padding-top: 26px; }
.route-out.is-fresh > * { animation: rise 0.55s var(--ease) both; }
.route-out.is-fresh > *:nth-child(2) { animation-delay: 0.12s; }
.route-out.is-fresh > *:nth-child(3) { animation-delay: 0.24s; }
.route-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.route-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--gold); border: 1px solid var(--gold-deep); border-radius: 100px;
  padding: 8px 16px;
}
.route-badge::before { content: "→"; color: var(--paper-faint); }
.route-draft {
  font-size: 12.5px; line-height: 1.9; color: var(--paper-dim);
  border: 1px dashed rgba(232, 193, 90, 0.3); border-radius: 12px;
  background: rgba(232, 193, 90, 0.04); padding: 16px 20px; margin-bottom: 16px;
}
.route-draft b { color: var(--gold); font-weight: 500; }
.route-loop { font-size: 14.5px; color: var(--paper-dim); }
.route-loop strong { color: var(--gold); font-weight: 500; }

/* ── 06 · Guardrails ───────────────────────────────────────── */
.locks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lock {
  display: flex; gap: 20px; align-items: flex-start;
  border: 1px solid var(--line-soft); border-radius: 16px; padding: 26px 28px;
  background: linear-gradient(170deg, var(--ink-2), var(--ink));
  transition: border-color 0.4s var(--ease);
}
.lock:hover { border-color: var(--line); }
.lock-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--gold-deep); position: relative; margin-top: 2px;
}
.lock-icon::before {
  content: ""; position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%);
  width: 9px; height: 8px; border-radius: 2px; background: var(--gold);
}
.lock-icon::after {
  content: ""; position: absolute; left: 50%; top: 32%; transform: translateX(-50%);
  width: 8px; height: 7px; border: 1.5px solid var(--gold); border-bottom: none;
  border-radius: 5px 5px 0 0;
  transition: transform 0.4s var(--ease);
}
.lock:hover .lock-icon::after { transform: translateX(-50%) translateY(-2px) rotate(-8deg); }
.lock p { font-size: 15.5px; color: var(--paper-dim); }
.lock strong { color: var(--paper); }

/* ── 07 · Activation ───────────────────────────────────────── */
.runway { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.staged, .unlock {
  border: 1px solid var(--line-soft); border-radius: 22px; padding: 40px 38px;
  background: linear-gradient(170deg, var(--ink-2), var(--ink));
}
.unlock { border-color: var(--gold-deep); background: linear-gradient(170deg, rgba(232, 193, 90, 0.07), var(--ink)); }
.staged-k { font-size: 11px; letter-spacing: 0.3em; color: var(--gold); margin-bottom: 26px; }
.staged ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.staged li { display: flex; gap: 16px; align-items: baseline; color: var(--paper-dim); font-size: 16px; }
.staged-dot {
  flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--gold); position: relative; top: -1px;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.steps { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.steps li { display: flex; gap: 20px; align-items: flex-start; font-size: 16px; color: var(--paper-dim); }
.steps strong { color: var(--paper); }
.step-n {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--gold-deep); color: var(--gold);
  display: grid; place-items: center; font-size: 12px;
}
.unlock-cta { margin-top: 30px; font-size: 17px; font-weight: 500; }

.memo {
  margin: 110px auto 0; max-width: 680px; text-align: center;
  border: 1px solid var(--line); border-radius: 26px;
  padding: 56px 54px 46px; position: relative;
  background:
    radial-gradient(ellipse 90% 100% at 50% 0%, rgba(232, 193, 90, 0.06), transparent 60%),
    var(--ink-2);
}
.memo::before {
  content: "F"; position: absolute; top: -23px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--gold);
  background: var(--ink); border: 1px solid var(--gold-deep); border-radius: 14px;
}
.memo-k { font-size: 11px; letter-spacing: 0.3em; color: var(--gold); margin-bottom: 26px; min-height: 1.4em; }
.memo-body {
  font-family: var(--serif-i); font-style: italic; font-weight: 300;
  font-size: 21.5px; line-height: 1.75; color: var(--paper-dim);
}
.memo-body .gold { color: var(--gold); }
.memo-sig {
  margin-top: 26px; font-family: var(--serif-i); font-style: italic;
  font-size: 19px; color: var(--gold);
}

.outro { text-align: center; padding: 130px 0 40px; }
.outro-line {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(30px, 4.4vw, 50px); line-height: 1.16; letter-spacing: -0.015em;
}
.outro-sig { margin-top: 40px; font-size: 11px; letter-spacing: 0.26em; color: var(--paper-faint); line-height: 2.3; }

/* ── Footer ────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line-soft); padding: 34px 56px; text-align: center;
}
.foot p { font-size: 10px; letter-spacing: 0.3em; color: var(--paper-faint); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .principles { grid-template-columns: 1fr 1fr; }
  .vaults { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 52px; }
  .hero-portrait { max-width: 420px; }
  .ch-ghost { right: -60px; font-size: 260px; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .rail { display: none; }
  .topbar {
    display: block; position: fixed; top: 0; left: 0; right: 0; height: 2px;
    background: var(--line-soft); z-index: 50;
  }
  .topbar-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-pale));
  }
  .next-pill { right: 18px; bottom: 18px; padding: 11px 18px; }
  .chapter { padding: 96px 24px 40px; }
  .hero { padding: 84px 24px 30px; }
  .ch-head { margin-bottom: 48px; }
  .ch-ghost { display: none; }
  .principles, .locks, .runway { grid-template-columns: 1fr; }
  .card-face { grid-template-columns: 40px 1fr 20px 32px; padding: 22px 20px; gap: 12px; }
  .card-hook { display: none; }
  .card-body-inner { padding: 0 20px 0 20px; }
  .card.is-open .card-body-inner { padding-bottom: 26px; }
  .day-wrap { grid-template-columns: 1fr; gap: 28px; }
  .day-tabs { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .day-tab { flex-direction: column; gap: 6px; padding: 14px 18px; flex-shrink: 0; }
  .day-tab.is-active, .day-tab:hover { transform: none; }
  .day-label { font-size: 15px; }
  .phone-scroll { min-height: 430px; }
  .vaults { grid-template-columns: 1fr; }
  .org-row { flex-direction: column; align-items: center; }
  .route-demo { padding: 28px 22px; }
  .hero-stats { gap: 26px; }
  .stat-n { font-size: 36px; }
  .memo { padding: 46px 28px 38px; }
  .memo-body { font-size: 18.5px; }
  .foot { padding: 28px 20px; }
  .foot p { letter-spacing: 0.18em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, .msg, .hero-line .ch { opacity: 1; transform: none; }
  .cur-dot, .cur-ring { display: none; }
  body, a, button { cursor: auto; }
}

/* ═══════════════════════════════════════════════════════════
   v3 APEX LAYER — HUD, sound, fills, seals, energy
   ═══════════════════════════════════════════════════════════ */

/* gold scrollbar */
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #040405; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-deep), #6b5120);
  border-radius: 8px; border: 2px solid #040405;
}

/* cinematic vignette */
.vignette {
  position: fixed; inset: 0; z-index: 58; pointer-events: none;
  background: radial-gradient(ellipse 120% 95% at 50% 45%, transparent 62%, rgba(0, 0, 0, 0.42));
}

/* HUD frame */
.hud { position: fixed; inset: 14px; z-index: 57; pointer-events: none; }
.hud-c { position: absolute; width: 22px; height: 22px; opacity: 0.55; }
.hud-c::before, .hud-c::after { content: ""; position: absolute; background: var(--gold-deep); }
.hud-c::before { width: 100%; height: 1px; }
.hud-c::after { width: 1px; height: 100%; }
.hud-c--tl { top: 0; left: 0; }
.hud-c--tr { top: 0; right: 0; transform: scaleX(-1); }
.hud-c--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.hud-c--br { bottom: 0; right: 0; transform: scale(-1); }
.hud-c--tl::before, .hud-c--tr::before { top: 0; } .hud-c--tl::after, .hud-c--tr::after { left: 0; }
.hud-c--bl::before, .hud-c--br::before { top: 0; } .hud-c--bl::after, .hud-c--br::after { left: 0; }
.hud-meta {
  position: absolute; top: 4px; left: 40px;
  font-size: 9.5px; letter-spacing: 0.22em; color: rgba(232, 193, 90, 0.55);
  display: flex; gap: 10px;
}
.hud-sep { color: var(--paper-faint); }

/* sound toggle */
.snd {
  position: fixed; left: 34px; bottom: 26px; z-index: 56;
  font-size: 9.5px; letter-spacing: 0.22em; color: var(--paper-faint);
  background: rgba(13, 13, 16, 0.7); backdrop-filter: blur(10px);
  border: 1px solid var(--line-soft); border-radius: 100px;
  padding: 9px 16px; cursor: pointer;
  transition: all 0.3s var(--ease);
}
.snd:hover { color: var(--gold); border-color: var(--line); }
.snd.is-on { color: var(--gold); border-color: var(--gold-deep); }

/* divider statement + scroll gold-fill text */
.divider { padding: 150px 24px; text-align: center; }
.fill-line {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 6.4vw, 86px); line-height: 1.12; letter-spacing: -0.02em;
  color: transparent;
  background-image: linear-gradient(100deg,
    var(--gold-pale) 0%, var(--gold-deep) 38%, var(--gold-pale) 50%,
    rgba(244, 239, 230, 0.13) 50.05%, rgba(244, 239, 230, 0.13) 100%);
  background-size: 200% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  margin: 0 auto; max-width: 900px;
}

/* section rule beam */
.ch-head::after {
  content: ""; position: absolute; left: 0; bottom: -26px;
  width: min(420px, 60%); height: 1px;
  background: linear-gradient(90deg, var(--gold-deep), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s var(--ease) 0.25s;
}
.ch-head.is-in::after { transform: scaleX(1); }

/* open-card conic energy border */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.card { position: relative; }
.card.is-open::before {
  content: ""; position: absolute; inset: -1px; border-radius: 18px; z-index: 0;
  padding: 1px;
  background: conic-gradient(from var(--ang),
    rgba(232, 193, 90, 0.05), var(--gold) 12%, rgba(232, 193, 90, 0.05) 28%,
    rgba(232, 193, 90, 0.05) 60%, rgba(201, 150, 59, 0.6) 74%, rgba(232, 193, 90, 0.05) 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ang-spin 3.2s linear infinite;
  pointer-events: none;
}
@keyframes ang-spin { to { --ang: 360deg; } }
.card-face, .card-body { position: relative; z-index: 1; }

/* phone status bar + replay */
.phone-sb {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 22px 8px; font-size: 9.5px; letter-spacing: 0.18em;
  color: var(--paper-faint); background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--line-soft);
}
.phone-replay {
  margin-left: 14px; font-size: 9.5px; letter-spacing: 0.16em;
  color: var(--paper-faint); background: none;
  border: 1px solid var(--line-soft); border-radius: 100px;
  padding: 6px 13px; cursor: pointer; text-transform: uppercase;
  transition: all 0.3s var(--ease);
}
.phone-replay:hover { color: var(--gold); border-color: var(--gold-deep); }

/* routed agent energy pulse */
.agent.is-routed { animation: routed-pulse 1.6s var(--ease) infinite; }
@keyframes routed-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--gold), 0 24px 70px rgba(232, 193, 90, 0.22); }
  50% { box-shadow: 0 0 0 3px rgba(232, 193, 90, 0.55), 0 24px 90px rgba(232, 193, 90, 0.34); }
}
.route-badge--scan { animation: scan-blink 0.5s steps(2) infinite; }
@keyframes scan-blink { 50% { opacity: 0.45; } }

/* outro seal */
.outro-seal {
  cursor: pointer;
  width: 86px; height: 86px; margin: 52px auto 0;
  display: grid; place-items: center; position: relative;
  font-family: var(--display); font-weight: 700; font-size: 40px; color: var(--gold);
  border: 1px solid var(--gold-deep); border-radius: 24px;
  background: radial-gradient(circle at 50% 30%, rgba(232, 193, 90, 0.12), transparent 70%);
  box-shadow: 0 0 60px rgba(232, 193, 90, 0.15);
  transform: scale(0.4) rotate(-12deg); opacity: 0;
  transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s, opacity 0.5s 0.2s;
}
.outro.is-in .outro-seal { transform: none; opacity: 1; }
.outro.is-in .outro-seal:hover { transform: scale(1.08); }
.outro-seal::after {
  content: ""; position: absolute; inset: -12px; border-radius: 30px;
  border: 1px solid rgba(232, 193, 90, 0.25);
  animation: boot-pulse 2.4s var(--ease) infinite;
}

/* hero exit choreography hooks */
.hero-copy, .hero-portrait { will-change: transform, opacity; }

@media (max-width: 820px) {
  .hud { inset: 8px; }
  .hud-c { width: 14px; height: 14px; }
  .hud-meta { left: 28px; top: 10px; font-size: 8.5px; }
  .snd { left: 16px; bottom: 16px; }
  .divider { padding: 96px 20px; }
  .phone-sb { padding: 8px 16px; }
  .phone-replay { margin-left: 8px; padding: 5px 10px; }
}

/* ═══ v4 PINNACLE LAYER ═══ */

/* typographic balance */
.ch-title, .hero-sub, .ch-lede, .outro-line { text-wrap: balance; }

/* keyboard focus — gold, never invisible */
a:focus-visible, button:focus-visible {
  outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}

/* guardrail locks snap shut on reveal */
.lock .lock-icon::after { transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: calc(var(--i, 0) * 90ms + 0.35s); }
.lock:not(.is-in) .lock-icon::after { transform: translateX(-50%) translateY(-5px) rotate(-14deg); }
.lock.is-in .lock-icon::after { transform: translateX(-50%); }

/* ignition countdown */
.tminus {
  display: flex; align-items: baseline; gap: 16px;
  margin: -8px 0 28px; padding: 18px 22px;
  border: 1px dashed rgba(232, 193, 90, 0.35); border-radius: 14px;
  background: rgba(232, 193, 90, 0.05);
}
.tminus-k { font-size: 10px; letter-spacing: 0.3em; color: var(--paper-faint); }
.tminus-v {
  font-size: clamp(20px, 2.4vw, 28px); letter-spacing: 0.06em; color: var(--gold);
  font-weight: 500; font-variant-numeric: tabular-nums;
}
.tminus-v i { font-style: normal; font-size: 0.5em; color: var(--paper-faint); margin: 0 10px 0 2px; letter-spacing: 0.2em; }
.tminus.is-live .tminus-v { font-size: 18px; letter-spacing: 0.12em; }

/* suggested next moment — the interface nudges, never nags */
.day-tab.is-suggested { border-color: rgba(232, 193, 90, 0.45); animation: suggest-pulse 2s var(--ease) infinite; }
@keyframes suggest-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 193, 90, 0); }
  50% { box-shadow: 0 0 22px 0 rgba(232, 193, 90, 0.14); }
}
