/* ForgeSaaS — story page. Drafting-paper system: white, dashed grid, hairline rails,
   serif statements, mono bracket labels, black chapter blocks, diagrams instead of screenshots. */
:root {
  --paper: #ffffff;
  --ink: #141519;
  --ink-2: #4b4f58;
  --ink-3: #8a8e97;
  --rule: #e6e7ea;
  --rule-2: #d4d6db;
  --grid: rgba(20,21,25,0.10);
  --black: #0b0b0c;
  --black-2: #151517;
  --white-2: rgba(255,255,255,0.62);
  --white-3: rgba(255,255,255,0.32);
  --accent: #2f55d4;
  --accent-soft: #e8edfb;
  --serif: "Newsreader", "Tiempos Text", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1280px;
  --gl: max(24px, env(safe-area-inset-left, 0px));
  --gr: max(24px, env(safe-area-inset-right, 0px));
  --nav: 60px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.inertial { scroll-behavior: auto; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg, canvas { max-width: 100%; display: block; }
::selection { background: #e2e8fb; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Drafting grid behind everything (fades out inside black blocks) */
.paper { position: relative; }
.paper::before { content: ""; display: none; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, transparent 0 99px, var(--grid) 99px 100px), repeating-linear-gradient(0deg, transparent 0 199px, var(--grid) 199px 200px);
  -webkit-mask-image: repeating-linear-gradient(0deg, #000 0 6px, transparent 6px 12px); mask-image: repeating-linear-gradient(0deg, #000 0 6px, transparent 6px 12px);
  opacity: .9; }

/* Type */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
.t-hero { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -0.03em; text-align: center; max-width: 18ch; margin: 0 auto; text-wrap: balance; }
.t-chapter { font-family: var(--serif); font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.1; letter-spacing: -0.02em; max-width: 22ch; text-wrap: balance; }
.t-statement { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; max-width: 24ch; text-wrap: balance; }
.t-sub { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; max-width: 26ch; text-wrap: balance; }
.t-strong { font-family: var(--sans); font-weight: 600; font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -0.02em; line-height: 1.15; max-width: 24ch; text-wrap: balance; }
.mono { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.mono.dim { color: var(--ink-3); }
.p { color: var(--ink-2); font-size: 1rem; line-height: 1.45; max-width: 52ch; }
.p + .p { margin-top: 1.1em; }
.cursor::after { content: "_"; animation: blink 1s steps(1) infinite; margin-left: .02em; }
@keyframes blink { 50% { opacity: 0; } }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--nav); background: rgba(255,255,255,0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand svg { width: 24px; height: 24px; }
.brand svg.wordmark { height: 26px; width: auto; display: block; color: var(--ink); }
.footer .brand svg.wordmark { color: #fff; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 6px 10px; border-radius: 6px; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { background: #f1f2f4; color: var(--ink); }
.nav-cta { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; border: 1px solid var(--rule-2); background: #fff; transition: background .15s; white-space: nowrap; }
.btn:hover { background: #f4f4f6; }
.btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: #000; }
.nav-toggle { display: none; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 3px 0; }
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 49; background: #fff; padding: calc(90px + env(safe-area-inset-top, 0px)) var(--gr) 40px var(--gl); flex-direction: column; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--serif); font-size: 1.6rem; padding: 14px 0; border-bottom: 1px solid var(--rule); }

/* Rails: the hairline frame with corner marks */
.rail { position: relative; }
.rail::before, .rail::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.rail::before { left: var(--gl); } .rail::after { right: var(--gr); }
.mark { position: relative; }
.mark::before, .mark::after { content: ""; position: absolute; top: -3px; width: 5px; height: 5px; background: var(--ink); z-index: 2; }
.mark::before { left: calc(var(--gl) - 2px); } .mark::after { right: calc(var(--gr) - 2px); }
.hr { height: 1px; background: var(--rule); }

/* Chapter bar (fixed bottom) */
.chapters { position: fixed; left: 0; right: 0; bottom: 0; z-index: 48; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom, 0px); }
.chapters a { position: relative; height: 34px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); overflow: hidden; border-right: 1px solid var(--rule); }
.chapters a:last-child { border-right: 0; }
.chapters a i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); z-index: 0; transition: width .25s linear; }
.chapters a span { position: relative; z-index: 1; mix-blend-mode: difference; color: #fff; }
.chapters a.on { color: var(--ink); }

/* ───── Hero: ASCII field + scroll-typed headline ───── */
.hero { position: relative; height: 220vh; }
.hero-stick { position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); overflow: hidden; }
#ascii { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 0 var(--gl) 0 var(--gr); text-align: center; z-index: 2; }
.hero-copy .mono { display: block; margin-bottom: 28px; }
.hero-copy .t-hero { min-height: 2.2em; }
.hero-hint { position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%); font-family: var(--mono); font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; }
.hero-hint i { width: 1px; height: 36px; background: var(--accent); display: block; animation: drop 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
.no-pin .hero { height: auto; }
.no-pin .hero-stick { position: relative; top: auto; height: clamp(560px, 86vh, 820px); height: clamp(560px, 86svh, 820px); }

/* ───── Chapter opener ───── */
.chapter-head { padding: 96px 0 56px; }
.chapter-head .mono { display: block; margin-bottom: 36px; }

/* Editorial rows: label | body */
.row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding: 56px 0; border-top: 1px solid var(--rule); }
.row .label { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.row .label::before { content: ""; width: 6px; height: 6px; background: var(--ink); margin-top: 7px; flex: none; }
.row .label small { display: block; color: var(--ink-3); font-weight: 400; margin-top: 4px; font-size: 0.8rem; }
.row .body { max-width: 560px; }
.row .body .t-sub { margin-top: 48px; }

/* Statement panel (pinned serif + diagram) */
.statement { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 96px 0; border-top: 1px solid var(--rule); }
.statement .fig { min-height: 420px; display: grid; place-items: center; }
.fig-caption { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 16px; display: flex; gap: 18px; flex-wrap: wrap; }
.fig-caption b { color: var(--ink); font-weight: 500; }

/* Numbered reasons */
.reasons { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.reason { padding: 28px 22px 32px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.reason .head { display: flex; justify-content: space-between; align-items: baseline; }
.reason .head b { font-weight: 500; font-size: 1rem; }
.reason p { color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; }

/* Black blocks */
.black { background: var(--black); color: #fff; position: relative; }
.black .p { color: var(--white-2); }
.black .mono { color: #fff; }
.black .mono.dim { color: var(--white-3); }
.black .row { border-top-color: rgba(255,255,255,0.12); }
.black .row .label { color: #fff; } .black .row .label::before { background: #fff; } .black .row .label small { color: var(--white-3); }
.black .hr { background: rgba(255,255,255,0.12); }
.black.rail::before, .black.rail::after { background: rgba(255,255,255,0.12); }
.black .mark::before, .black .mark::after { background: #fff; }

/* Transition statement (centered, three lines fading in) */
.lines { padding: 120px 0; text-align: center; }
.lines .t-statement { margin: 0 auto; max-width: 28ch; }
.lines .t-statement + .t-statement { margin-top: 28px; }
.lines .t-statement.dim { color: var(--ink-3); }
.black .lines .t-statement.dim { color: var(--white-3); }

/* Stack labels */
.stack { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.12); }
.stack span { background: var(--black); padding: 18px 14px; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; text-align: center; }
.stack span.core { background: var(--accent); color: #fff; }

/* Pillars (dark, with dotted spheres) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.12); }
.pillar { background: var(--black); padding: 36px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pillar .head { display: flex; justify-content: space-between; align-items: baseline; }
.pillar .head b { font-family: var(--serif); font-size: 2rem; font-weight: 400; letter-spacing: -0.02em; }
.pillar canvas { width: 100%; aspect-ratio: 1; max-width: 100%; }
.pillar p { color: var(--white-2); font-size: 0.95rem; }

/* Launch cards */
.launch { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.card { background: var(--paper); padding: 40px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card .name { font-family: var(--serif); font-size: 2rem; letter-spacing: -0.02em; }
.card .tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.card .tag.beta { color: var(--ink-3); }
.card .fig { height: 240px; border: 1px solid var(--rule); border-radius: 6px; display: grid; place-items: center; overflow: hidden; position: relative; background: #fff; }
.card .fig svg { width: 100%; height: 100%; }
.card .p { font-size: 0.95rem; }
.card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.card.wide .fig { height: 300px; }

/* Industries + start + pricing */
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.cell { background: var(--paper); padding: 32px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cell .mono { display: block; }
.cell h3 { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.02em; }
.cell p { color: var(--ink-2); font-size: 0.92rem; }
.cell .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.chip { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; border: 1px solid var(--rule-2); border-radius: 4px; color: var(--ink); background: #fff; }
.cells.four { grid-template-columns: repeat(4, 1fr); }
.cell .big { font-family: var(--serif); font-size: 2.4rem; letter-spacing: -0.03em; line-height: 1; }
.cell .big small { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: block; margin-top: 8px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.tl { background: var(--paper); padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tl .mono { display: block; }
.tl b { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; letter-spacing: -0.02em; }
.tl p { color: var(--ink-2); font-size: 0.92rem; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 500; font-size: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "[+]"; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.faq details[open] summary::after { content: "[–]"; }
.faq .ans { color: var(--ink-2); padding: 0 0 20px; max-width: 64ch; }

/* Closing CTA with perspective floor */
.closing { position: relative; padding: 140px 0 0; overflow: hidden; border-top: 1px solid var(--rule); }
.closing .t-chapter { text-align: center; margin: 0 auto 40px; }
.cta-box { display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; margin: 0 auto; border: 1px solid var(--rule-2); background: #fff; position: relative; z-index: 2; }
.cta-box a { display: block; padding: 18px; text-align: center; font-family: var(--mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; transition: background .15s; }
.cta-box a + a { border-left: 1px solid var(--rule-2); }
.cta-box a:hover { background: #f4f4f6; }
.floor { display: block; width: 100%; height: 320px; margin-top: -30px; }

/* Footer */
.footer { background: var(--black); color: var(--white-2); padding: 56px 0 calc(80px + env(safe-area-inset-bottom, 0px)); font-size: 0.875rem; }
.footer .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: #fff; font-weight: 500; font-size: 0.8rem; margin: 0 0 12px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: #fff; }
.footer .brand { color: #fff; }

.footer .fine { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.78rem; color: var(--white-3); }
.email { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-family: var(--mono); font-size: 0.75rem; color: #fff; }
.email button { color: var(--white-3); font-family: var(--mono); font-size: 0.68rem; letter-spacing: .06em; text-transform: uppercase; }

/* Reveal */
.js .rv { opacity: 0; filter: blur(10px); transform: translateY(14px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1), filter .6s cubic-bezier(.2,.7,.2,1); will-change: opacity, filter, transform; }
.js .rv.in { opacity: 1; transform: none; filter: blur(0); }
.js .rv.d1 { transition-delay: .12s; } .js .rv.d2 { transition-delay: .24s; } .js .rv.d3 { transition-delay: .36s; }

/* Colour wash strip */
.wash { height: 360px; position: relative; overflow: hidden; background: #fff; }
.wash i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.wash i:nth-child(1) { width: 520px; height: 420px; left: 6%; top: 10%; background: #cfe3ff; }
.wash i:nth-child(2) { width: 460px; height: 380px; left: 36%; top: 0; background: #ffe2c6; }
.wash i:nth-child(3) { width: 520px; height: 420px; right: 4%; top: 14%; background: #d7f3e4; }
.wash i:nth-child(4) { width: 380px; height: 320px; left: 52%; top: 30%; background: #e9d8ff; }
.wash .t-statement { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 1; }

@media (max-width: 1024px) {
  .reasons { grid-template-columns: repeat(2, 1fr); }
  .pillars, .cells, .cells.four, .timeline { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn:not(.btn-primary) { display: none; }
  .nav-toggle { display: inline-flex; }
  .row, .statement, .launch, .card.wide { grid-template-columns: 1fr; }
  .statement .fig { min-height: 320px; }
  .launch { gap: 1px; }
  .cta-box { grid-template-columns: 1fr; }
  .cta-box a + a { border-left: 0; border-top: 1px solid var(--rule-2); }
  .footer .grid { grid-template-columns: 1fr 1fr; }
  .chapters a span { font-size: 0.6rem; }
}
@media (max-width: 600px) {
  .reasons, .pillars, .cells, .cells.four, .timeline, .footer .grid { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr 1fr; }
  .card { padding: 24px; }
  .hero-copy .mono { margin-bottom: 18px; }
  .wash { height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; filter: none; }
}

/* Resolution grid */
.res { margin-top: 48px; }
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.res-cell { background: var(--paper); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.res-cell canvas { width: 100%; aspect-ratio: 1; }
@media (max-width: 860px) { .res-grid { grid-template-columns: 1fr 1fr; } }
/* diagram motion */
.spin { transform-origin: center; animation: spin 80s linear infinite; }
.spin.rev { animation-direction: reverse; animation-duration: 120s; }
@keyframes spin { to { transform: rotate(360deg); } }
.dash { stroke-dasharray: 4 6; animation: dashmove 1.6s linear infinite; }
@keyframes dashmove { to { stroke-dashoffset: -20; } }
.pulse { animation: pulse 1.6s ease-in-out infinite; transform-origin: center; }
@keyframes pulse { 50% { opacity: .25; } }
.draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.in .draw { animation: drawin 2.2s cubic-bezier(.4,0,.2,1) forwards .2s; }
@keyframes drawin { to { stroke-dashoffset: 0; } }

/* Card refinements */
.card-head { display: flex; justify-content: space-between; gap: 12px; }
.card .name { margin-top: 2px; }
.card .fig { border-color: var(--rule-2); }
.io { display: grid; grid-template-columns: 72px 1fr; gap: 6px 14px; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.85rem; }
.io dt { font-family: var(--mono); font-size: 0.66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.io dd { margin: 0; color: var(--ink-2); }
.card.wide .io { max-width: 520px; }
/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.plan { background: var(--paper); padding: 32px 28px 36px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.plan.featured { background: var(--ink); color: #fff; }
.plan.featured .mono, .plan.featured .price small, .plan.featured li::before { color: var(--white-2); }
.plan-head { display: flex; flex-direction: column; gap: 10px; }
.plan-head b { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; letter-spacing: -0.02em; }
.price { font-family: var(--serif); font-size: 2rem; letter-spacing: -0.03em; line-height: 1; }
.price small { display: block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.plan ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: "■"; font-size: 0.5rem; margin-top: 7px; color: var(--ink-3); }
.plan.featured li { color: #fff; }
.deliver .cell h3 { font-size: 1.3rem; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
/* Figure entrance + stagger */
.js .fig svg { opacity: 0; transition: opacity .9s ease .1s; }
.js .in .fig svg { opacity: 1; }
.js .cells .cell, .js .reasons .reason, .js .launch .card, .js .timeline .tl, .js .plans .plan, .js .pillars .pillar { opacity: 0; filter: blur(10px); transform: translateY(14px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1), filter .9s cubic-bezier(.2,.7,.2,1); }
.js .in > .cell, .js .in > .reason, .js .in > .card, .js .in > .tl, .js .in > .plan, .js .in > .pillar { opacity: 1; transform: none; filter: blur(0); }
.js .in > :nth-child(2) { transition-delay: .08s } .js .in > :nth-child(3) { transition-delay: .16s } .js .in > :nth-child(4) { transition-delay: .24s } .js .in > :nth-child(5) { transition-delay: .32s } .js .in > :nth-child(6) { transition-delay: .4s }
.chapters a i { transition: width .35s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .js .fig svg, .js .cells .cell, .js .reasons .reason, .js .launch .card, .js .timeline .tl, .js .plans .plan, .js .pillars .pillar { opacity: 1; transform: none; } }

/* Accent: one colour, used only for index marks and the live element of each diagram */
#heroKicker, .chapter-head > .mono, .closing > .mono { color: var(--accent); }
.reason .head .mono, .pillar .head .mono, .card-head .mono, .cell > .mono, .tl > .mono, .row .label .mono { color: var(--accent); }
.cursor::after { color: var(--accent); }
.chapters a.on span { color: var(--accent); mix-blend-mode: normal; }
.chapters a.on i { background: var(--accent-soft); }
.faq details[open] summary { color: var(--accent); }
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* Chapter bar appears only after the hero */
.chapters { transform: translateY(100%); opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .45s ease; }
.chapters.show { transform: none; opacity: 1; pointer-events: auto; }

/* Longer hook lines in the hero */
.hero-copy .t-hero { font-size: clamp(2rem, 5.4vw, 3.5rem); max-width: 24ch; min-height: 3.4em; }

.hero-copy .t-hero .swap { display: inline-block; color: var(--accent); white-space: nowrap; }
.hero-copy .t-hero { max-width: 20ch; min-height: 3.4em; }

/* Apple-style gradient on the rotating word */
.hero-copy .t-hero .swap { color: transparent; -webkit-text-fill-color: transparent; background-image: linear-gradient(100deg, #2997ff 0%, #8e5cff 35%, #ff4f9a 65%, #ff9f0a 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; padding: 0 .04em .12em; animation: gradshift 5s ease-in-out infinite alternate; }
.hero-copy .t-hero .swap[data-g="1"] { background-image: linear-gradient(100deg, #00c6ff 0%, #2f55d4 40%, #8e5cff 100%); }
.hero-copy .t-hero .swap[data-g="2"] { background-image: linear-gradient(100deg, #ff9f0a 0%, #ff4f9a 50%, #8e5cff 100%); }
.hero-copy .t-hero .swap[data-g="3"] { background-image: linear-gradient(100deg, #30d158 0%, #00c6ff 50%, #2f55d4 100%); }
.hero-copy .t-hero .swap[data-g="4"] { background-image: linear-gradient(100deg, #ff375f 0%, #ff9f0a 50%, #ffd60a 100%); }
@keyframes gradshift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero-copy .t-hero .swap { animation: none; } }

.hero-copy::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1000px, 96%); height: 340px; transform: translate(-50%, -50%); background: radial-gradient(ellipse at center, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 40%, rgba(255,255,255,0) 72%); pointer-events: none; }

/* Animated bottleneck diagram */
.flow { margin: 28px 0 8px; padding: 28px; border: 1px solid var(--rule); background: #fff; position: relative; }
.flow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 36px; }
.flow-tab { font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px; border: 1px solid var(--rule); cursor: pointer; transition: all .3s; }
.flow-tab.on { color: #fff; background: var(--ink); border-color: var(--ink); }
.flow-cap { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; letter-spacing: -.01em; margin-left: auto; transition: opacity .35s, filter .35s; }
.flow-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; padding-top: 64px; }
.flow-track::before { content: ""; position: absolute; left: 5%; right: 5%; top: calc(64px + 44px); height: 1px; background: repeating-linear-gradient(90deg, var(--rule-2) 0 6px, transparent 6px 12px); z-index: 0; }
.stage { position: relative; z-index: 1; min-height: 116px; padding: 16px 14px; border: 1px solid var(--rule); background: #fff; display: flex; flex-direction: column; gap: 6px; transition: background .6s, border-color .6s, opacity .6s, box-shadow .6s, transform .6s; }
.stage b { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; letter-spacing: -.01em; }
.stage small { font-size: .74rem; color: var(--ink-3); line-height: 1.35; }
.stage.st-dim { opacity: .6; background: repeating-linear-gradient(135deg, #fff 0 8px, #f4f5f7 8px 9px); }
.stage.st-core { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stage .badge { z-index: 6; position: absolute; top: -12px; right: 12px; font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; background: var(--accent); color: #fff; }
.flow .s-agent { display: none; }
/* queue: layered cards stacked above the bottleneck */
.queue { position: absolute; left: 10px; right: 10px; bottom: 100%; height: 64px; pointer-events: none; }
.queue i { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; font-style: normal; font-family: var(--mono); font-size: .66rem; letter-spacing: .05em; padding: 8px 10px; background: #fff; border: 1px solid var(--accent); color: var(--accent); transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .7s, background .5s; box-shadow: 0 6px 14px -8px rgba(47,85,212,.45); }
.queue i:nth-child(1) { transform: translateY(-4px); z-index: 4; }
.queue i:nth-child(2) { transform: translateY(-14px) scale(.97); z-index: 3; opacity: .85; }
.queue i:nth-child(3) { transform: translateY(-24px) scale(.94); z-index: 2; opacity: .65; }
.queue i:nth-child(4) { transform: translateY(-34px) scale(.91); z-index: 1; opacity: .45; }
/* agent state: queue flows away to the right, downstream lights up */
.flow.agent .s-today { display: none; } .flow.agent .s-agent { display: block; }
.flow.agent .badge.s-agent { display: block; }
.flow.agent .queue i { opacity: 0; }
.flow.agent .queue i:nth-child(1) { transform: translate(120%, -4px); transition-delay: .0s; }
.flow.agent .queue i:nth-child(2) { transform: translate(120%, -14px) scale(.97); transition-delay: .12s; }
.flow.agent .queue i:nth-child(3) { transform: translate(120%, -24px) scale(.94); transition-delay: .24s; }
.flow.agent .queue i:nth-child(4) { transform: translate(120%, -34px) scale(.91); transition-delay: .36s; }
.flow.agent .stage.st-dim { opacity: 1; background: var(--accent-soft); border-color: #c9d4f6; }
.flow.agent .stage.st-dim:nth-child(3) { transition-delay: .25s; } .flow.agent .stage.st-dim:nth-child(4) { transition-delay: .45s; } .flow.agent .stage.st-dim:nth-child(5) { transition-delay: .65s; }
.flow.agent .stage.st-core { background: var(--accent); border-color: var(--accent); }
.flow.agent .stage.st-core b, .flow.agent .stage.st-core small, .flow.agent .stage.st-core .mono { color: #fff; }
.flow.agent .stage .badge { background: #fff; color: var(--accent); }
.flow-bar { height: 2px; background: var(--rule); margin-top: 26px; position: relative; overflow: hidden; }
.flow-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.flow.run .flow-bar i { animation: flowbar 3.6s linear forwards; }
@keyframes flowbar { from { width: 0; } to { width: 100%; } }
@media (max-width: 860px) { .flow-track { grid-template-columns: 1fr; padding-top: 0; } .flow-track::before { display: none; } .queue { display: none; } .flow-cap { margin-left: 0; width: 100%; } .stage { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .queue i, .stage { transition: none !important; } .flow.run .flow-bar i { animation: none; } }

/* Scroll-driven bottleneck scene */
.flow2 { position: relative; height: 270vh; margin: 24px 0 0; }
.flow2-stick { position: sticky; top: calc(var(--nav) + 8px); height: calc(100vh - var(--nav) - 16px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.flow2-head { display: flex; flex-direction: column; gap: 10px; min-height: 84px; }
.f2-cap { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; margin: 0; max-width: 24ch; transition: opacity .35s, filter .35s, transform .35s; }
.flow2-stage { position: relative; flex: 1; min-height: 280px; max-height: 520px; border: 1px solid var(--rule); background: linear-gradient(180deg, #fff, #fafbfd); overflow: hidden; }
#f2cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.f2-stat { position: absolute; bottom: 14px; display: flex; flex-direction: column; gap: 2px; }
.f2-stat.l { left: 16px; } .f2-stat.r { right: 16px; align-items: flex-end; }
.f2-stat b { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.f2-stat.l b { color: #d97f00; } .f2-stat.r b { color: var(--accent); }
.f2-hint { display: flex; align-items: center; gap: 10px; }
.f2-hint i { width: 22px; height: 1px; background: var(--ink-3); display: block; }
@media (prefers-reduced-motion: reduce) { .flow2 { height: auto; } .flow2-stick { position: relative; top: auto; height: auto; } .flow2-stage { height: 420px; flex: none; } .f2-hint { display: none; } }

/* Pain cards + scroll-scrubbed statement */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 48px; }
.pain { background: #fff; padding: 28px 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.pain b { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.1; letter-spacing: -.02em; }
.pain p { margin: 0; color: var(--ink-3); font-size: .95rem; line-height: 1.5; }
.meter { margin-top: auto; padding-top: 18px; }
.meter i { display: block; height: 6px; width: 0; background: linear-gradient(90deg, #ffb340, #ff6a1f); transition: width 1.8s cubic-bezier(.2,.7,.2,1); }
.meter span { display: block; margin-top: 8px; font-family: var(--mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: #d97f00; }
.pains.in .meter i { width: var(--w); }
.pains.in .pain:nth-child(2) .meter i { transition-delay: .2s; } .pains.in .pain:nth-child(3) .meter i { transition-delay: .4s; }
.scrub { font-family: var(--serif); font-size: clamp(1.7rem, 3.6vw, 3rem); line-height: 1.15; letter-spacing: -.02em; max-width: 26ch; margin: 96px 0 0; }
.scrub .w { color: #d3d6dc; transition: color .35s ease; }
.scrub .w.on { color: var(--ink); }
.scrub em { font-style: normal; }
.scrub em .w.on { color: var(--accent); }
.story-out { max-width: 30ch; margin: 72px 0 0; }
@media (max-width: 860px) { .pains { grid-template-columns: 1fr; } .scrub { margin-top: 64px; } }
@media (prefers-reduced-motion: reduce) { .meter i { width: var(--w); transition: none; } .scrub .w { color: var(--ink); } .scrub em .w { color: var(--accent); } }

.f2-hint { color: var(--ink-3); font-size: .85rem; align-items: center; }
.f2-hint .sq { display: inline-block; width: 9px; height: 9px; background: #8a8e97; margin: 0 4px 0 0; vertical-align: baseline; }
.f2-hint .sq.o { background: #ff9f0a; margin-left: 6px; }
.f2-stat b { font-size: 2rem; }
.f2-stat.l b { color: #d97f00; transition: color .4s; }

/* Live pain cards */
.pains { gap: 16px; background: none; border: 0; }
.pain { position: relative; border: 1px solid var(--rule); overflow: hidden; min-height: 380px; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
.pain::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(47,85,212,.10), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.pain:hover { transform: translateY(-4px); border-color: #c9d4f6; box-shadow: 0 18px 40px -22px rgba(47,85,212,.45); }
.pain:hover::before { opacity: 1; }
.pain .vis { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 170px; padding: 8px 0; }
.pv-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); background: #fafbfd; font-size: .82rem; }
.pv-file i { font-style: normal; font-family: var(--mono); font-size: .62rem; background: var(--ink); color: #fff; padding: 3px 5px; }
.pv-file em { font-style: normal; margin-left: auto; color: var(--accent); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; }
.pv-time { font-family: var(--serif); font-size: 3rem; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pv-sub { font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); min-height: 2.4em; }
.pv-bar { height: 5px; background: var(--rule); position: relative; overflow: hidden; }
.pv-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffb340, #ff6a1f); }
.pv-ring { position: relative; width: 132px; height: 132px; align-self: center; }
.pv-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pv-ring circle { fill: none; stroke-width: 7; }
.pv-ring .tr { stroke: var(--rule); } .pv-ring .fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 0; transition: stroke .3s; }
.pv-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 400; font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.pain.hot .pv-ring .fg { stroke: #ff6a1f; } .pain.hot .pv-time { color: #d97f00; }
.pain.lost .pv-ring .fg { stroke: #e5484d; } .pain.lost .pv-ring b, .pain.lost .pv-sub { color: #e5484d; }
.pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pv-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); font-size: .88rem; color: var(--ink-3); transition: all .4s; }
.pv-list li::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--rule-2); border-radius: 50%; flex: none; transition: all .35s; }
.pv-list li.ok { color: var(--ink); border-color: #c9d4f6; background: var(--accent-soft); }
.pv-list li.ok::before { border-color: var(--accent); background: var(--accent) radial-gradient(circle, #fff 28%, transparent 30%); }
.pv-list li.miss.try { color: #d97f00; border-color: #ffd9a0; animation: blinkmiss 1s ease-in-out infinite; }
.pv-list li.miss.try::before { border-color: #ff9f0a; }
@keyframes blinkmiss { 50% { background: #fff4e0; } }
@media (hover: none) { .pain:hover { transform: none; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .pv-list li.miss.try { animation: none; } }

/* Calmer, monochrome pain cards: ink only, no accent colours */
.pain::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(20,21,25,.05), transparent 70%); }
.pain:hover { border-color: var(--rule-2); box-shadow: 0 18px 40px -24px rgba(20,21,25,.3); }
.pv-file em { color: var(--ink-3); }
.pv-bar i { background: var(--ink); }
.pain.hot .pv-time { color: var(--ink); }
.pv-ring .fg, .pain.hot .pv-ring .fg, .pain.lost .pv-ring .fg { stroke: var(--ink); }
.pain.lost .pv-ring b, .pain.lost .pv-sub { color: var(--ink); }
.pain.lost .pv-ring b { text-decoration: line-through; text-decoration-thickness: 2px; }
.pain.lost .pv-sub { font-weight: 600; }
.pv-list li.ok { background: #f4f5f7; border-color: var(--rule-2); color: var(--ink); }
.pv-list li.ok::before { border-color: var(--ink); background: var(--ink) radial-gradient(circle, #fff 28%, transparent 30%); }
.pv-list li.miss.try { color: var(--ink); border: 1px dashed var(--ink); background: #fff; animation: blinkmiss2 1.1s ease-in-out infinite; }
.pv-list li.miss.try::before { border-color: var(--ink); }
@keyframes blinkmiss2 { 50% { background: #f4f5f7; } }

/* Generic enterprise pain scenes (ink only) */
.pv-rec { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--ink); background: #fff; font-size: .85rem; }
.pv-rec b { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.pv-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pv-tools span { font-family: var(--mono); font-size: .6rem; letter-spacing: .03em; text-transform: uppercase; text-align: center; padding: 14px 2px 10px; border: 1px solid var(--rule); color: var(--ink-3); position: relative; transition: all .3s; }
.pv-tools span::before { content: ""; position: absolute; left: 50%; top: 5px; width: 6px; height: 6px; transform: translateX(-50%); border: 1px solid var(--rule-2); transition: all .3s; }
.pv-tools span.on { color: var(--ink); border-color: var(--ink); background: #f4f5f7; }
.pv-tools span.on::before { background: var(--ink); border-color: var(--ink); }
.pv-tools span.cur { background: var(--ink); color: #fff; }
.pv-net { width: 100%; height: auto; max-height: 160px; }
.pv-net line { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 4; animation: netflow 1s linear infinite; transition: opacity .4s; }
.pv-net .sat { fill: #fff; stroke: var(--ink); stroke-width: 1.5; transition: all .4s; }
.pv-net .hub { fill: var(--ink); stroke: var(--ink); stroke-width: 1.5; transition: all .4s; }
.pv-net text { font-family: var(--mono); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; fill: #fff; text-anchor: middle; transition: fill .4s; }
@keyframes netflow { to { stroke-dashoffset: -14; } }
.pain.away .pv-net line { animation: none; opacity: .25; }
.pain.away .pv-net .sat { stroke: var(--rule-2); stroke-dasharray: 2 2; }
.pain.away .pv-net .hub { fill: #fff; stroke-dasharray: 3 3; }
.pain.away .pv-net text { fill: var(--ink-3); }
.pain.away .pv-sub { color: var(--ink); font-weight: 600; }
.pv-threads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pv-threads li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); font-size: .82rem; transition: all .35s; }
.pv-threads em { font-style: normal; font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; padding: 2px 6px; border: 1px solid var(--rule-2); color: var(--ink-3); transition: all .35s; font-variant-numeric: tabular-nums; }
.pv-threads li.old { border-color: var(--ink); } .pv-threads li.old em { background: var(--ink); color: #fff; border-color: var(--ink); }

.f2-stat.l b { color: var(--ink); }
.f2-hint .sq { background: #c4c7ce; }
.f2-hint .sq.o { background: var(--ink); }

/* On-brand gradient for the rotating word: blues and ink only */
.hero-copy .t-hero .swap { background-image: linear-gradient(100deg, #1c3aa9 0%, #2f55d4 45%, #4f8dff 100%); }
.hero-copy .t-hero .swap[data-g="1"] { background-image: linear-gradient(100deg, #141519 0%, #2f55d4 60%, #4f8dff 100%); }
.hero-copy .t-hero .swap[data-g="2"] { background-image: linear-gradient(100deg, #1c3aa9 0%, #3b6cf0 55%, #6aa6ff 100%); }
.hero-copy .t-hero .swap[data-g="3"] { background-image: linear-gradient(100deg, #141519 0%, #1c3aa9 50%, #2f55d4 100%); }
.hero-copy .t-hero .swap[data-g="4"] { background-image: linear-gradient(100deg, #2f55d4 0%, #4f8dff 55%, #1c3aa9 100%); }

/* Simple three-step structure with brick icons */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; border: 1px solid var(--rule); background: #fff; }
.step { padding: 8px 24px 28px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.step + .step { border-left: 1px solid var(--rule); }
.step canvas { width: 100%; height: 190px; display: block; }
.step b { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; line-height: 1.1; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--ink-3); font-size: .95rem; line-height: 1.5; max-width: 30ch; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } .step + .step { border-left: 0; border-top: 1px solid var(--rule); } }

/* ═══ Rebuilt lower half: layer · agents · start · faq · footer ═══ */
#system .chapter-head, #agents .chapter-head, #engage .chapter-head { padding-top: 120px; }
.layer { position: relative; height: 340vh; }
.layer-stick { position: sticky; top: calc(var(--nav) + 8px); height: calc(100vh - var(--nav) - 16px); display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: center; }
.ly-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 1px solid var(--rule); }
.ly-step { position: relative; padding: 16px 0 16px 24px; transition: opacity .45s, filter .45s; opacity: .32; filter: blur(1.5px); }
.ly-step::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: transform .45s; }
.ly-step.on { opacity: 1; filter: none; }
.ly-step.on::before { transform: scaleY(1); }
.ly-step.done { opacity: .62; filter: none; }
.ly-step b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -.02em; line-height: 1.1; margin: 6px 0 6px; }
.ly-step p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.45; max-width: 40ch; }
.ly-stage { position: relative; height: 100%; max-height: 640px; }
#lycv { position: absolute; inset: 0; width: 100%; height: 100%; }

.ag-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); background: #fff; }
.ag { padding: 26px 24px 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; transition: background .2s; }
.ag:hover { background: #fafbfc; }
.ag b { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.1; margin-top: 6px; }
.ag p { margin: 0; color: var(--ink-2); font-size: .93rem; line-height: 1.45; min-height: 2.9em; }
.ag .meter { width: 100%; height: 74px; display: block; margin: 6px 0 2px; }
.ag-m { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px dashed var(--rule-2); padding-top: 12px; }
.ag-m em { font-style: normal; font-family: var(--serif); font-size: 1.25rem; letter-spacing: -.01em; white-space: nowrap; }
.ag-m em i { font-style: normal; color: var(--accent); margin: 0 2px; }

.start { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); background: #fff; position: relative; }
.st { padding: 4px 24px 28px; display: flex; flex-direction: column; gap: 8px; }
.st + .st { border-left: 1px solid var(--rule); }
.st canvas { width: 100%; height: 200px; display: block; }
.st b { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; letter-spacing: -.02em; line-height: 1.1; }
.st p { margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; max-width: 34ch; }
.start-line { text-align: center; margin: 96px auto 0; padding-bottom: 120px; }
.start-line span { color: var(--ink-3); }

#faq { border-top: 1px solid var(--rule); }
.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; padding-top: 96px; padding-bottom: 120px; }

#endcv { display: block; width: 260px; height: 220px; margin: -40px auto 8px; }
.closing { padding-top: 100px; }

.footer .foot { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer .foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 10px 40px; align-content: start; }
.footer .fine { margin-top: 40px; }

@media (max-width: 900px) {
  .layer { height: 300vh; }
  .layer-stick { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 8px; }
  .ly-steps { border-left: 0; }
  .ly-step { display: none; padding: 8px 0; }
  .ly-step::before { display: none; }
  .ly-step.on { display: block; }
  .ag-grid { grid-template-columns: 1fr 1fr; }
  .start { grid-template-columns: 1fr; }
  .st + .st { border-left: 0; border-top: 1px solid var(--rule); }
  .faq-wrap { grid-template-columns: 1fr; gap: 24px; }
  .footer .foot-links { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 600px) { .ag-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .layer { height: auto; } .layer-stick { position: relative; top: auto; height: auto; } .ly-stage { height: 460px; }
  .ly-step { opacity: 1; filter: none; display: block; }
}

/* ═══ Floating glass nav: logo only over the hero, centred pill after it ═══ */
.nav { position: fixed; left: 0; right: 0; top: calc(14px + env(safe-area-inset-top, 0px)); height: auto; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; display: flex; justify-content: center; }
.nav .wrap { pointer-events: auto; width: auto; max-width: calc(100% - 32px); margin: 0; height: 54px; padding: 0 7px 0 22px; gap: 22px; border-radius: 999px; border: 1px solid transparent; }
.nav:not(.on) .wrap { padding: 0; animation: logoIn .5s cubic-bezier(.2,.7,.2,1) both; }
.nav:not(.on) .nav-links, .nav:not(.on) .nav-cta { position: absolute; opacity: 0; pointer-events: none; visibility: hidden; }
.nav.on .wrap {
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.5));
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 0 0 1px rgba(20,21,25,0.06), 0 12px 32px -12px rgba(20,21,25,0.22);
  animation: pillIn .6s cubic-bezier(.2,.8,.2,1) both;
}
.nav.on .brand svg.wordmark { height: 22px; }
.nav .nav-links a { border-radius: 999px; padding: 7px 12px; }
.nav .nav-links a:hover { background: rgba(20,21,25,0.06); }
.nav .btn { border-radius: 999px; height: 38px; padding: 0 16px; }
.nav .btn:not(.btn-primary) { background: rgba(255,255,255,0.6); }
@keyframes pillIn { from { opacity: 0; transform: translateY(-14px) scale(.94); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes logoIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.hero-stick { top: 0; height: 100vh; }
@media (max-width: 860px) { .nav .wrap { padding: 0 6px 0 18px; gap: 10px; } .nav.on .wrap { width: calc(100% - 32px); justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) { .nav .wrap { animation: none !important; } }

/* Industries grid */
.ind { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); background: #fff; }
.indc { padding: 28px 24px 30px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; transition: background .25s; }
.indc:hover { background: #fafbfc; }
.indc h3 { margin: 4px 0 0; font-family: var(--serif); font-weight: 500; font-size: 1.55rem; letter-spacing: -.02em; line-height: 1.1; }
.indc p { margin: 0; color: var(--ink-2); font-size: .95rem; }
#industries .chapter-head { padding-top: 120px; }
@media (max-width: 860px) { .ind { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ind { grid-template-columns: 1fr; } }

/* Smoother nav: transitions, hide while scrolling, return when reading */
.nav .wrap { transition: transform .7s cubic-bezier(.22,1,.36,1), opacity .5s ease, filter .5s ease, background .5s ease, box-shadow .5s ease, border-color .5s ease; }
.nav.on .wrap { animation: pillIn .9s cubic-bezier(.22,1,.36,1) backwards; }
.nav:not(.on) .wrap { animation: logoIn .7s cubic-bezier(.22,1,.36,1) backwards; }
.nav.on.hid .wrap { transform: translateY(calc(-100% - 24px)) scale(.97); opacity: 0; filter: blur(6px); pointer-events: none; }
@keyframes pillIn { from { opacity: 0; transform: translateY(-18px) scale(.96); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }

/* ═══ How we start · full-screen cinematic build ═══ */
.cine { position: relative; height: 360vh; }
.cine-stick { position: sticky; top: 0; height: 100vh; overflow: hidden; background: radial-gradient(120% 80% at 50% 60%, #ffffff 40%, #f3f4f7 100%); border-top: 1px solid var(--rule); }
#cicv { position: absolute; inset: 0; width: 100%; height: 100%; }
.cine-bar { position: absolute; left: 0; right: 0; height: 14vh; background: #0b0b0c; z-index: 3; transform-origin: top; will-change: transform; }
.cine-bar.t { top: 0; transform-origin: top; } .cine-bar.b { bottom: 0; transform-origin: bottom; }
.cine-copy { position: absolute; left: 0; right: 0; top: calc(13vh + 20px); text-align: center; z-index: 2; padding: 0 20px; pointer-events: none; }
.cine-copy .mono { color: var(--accent); display: inline-block; margin-bottom: 18px; transition: opacity .6s; }
.cine-h { margin: 0 auto; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5.2vw, 4.6rem); line-height: 1.04; letter-spacing: -0.03em; max-width: 18ch; text-wrap: balance; }
.cine-h .w { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(18px); transition: opacity .9s cubic-bezier(.22,1,.36,1), filter .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.cine-h .w.on { opacity: 1; filter: none; transform: none; }
.cine-h .w.g { background: linear-gradient(90deg, #2f55d4, #6d8cf0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cine-steps { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); width: min(1180px, calc(100% - 48px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; z-index: 2; }
.cine-prog { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--rule-2); }
.cine-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); }
.cs { padding: 18px 20px 0 0; opacity: .3; filter: blur(1.5px); transition: opacity .6s, filter .6s; }
.cs.on { opacity: 1; filter: none; } .cs.done { opacity: .6; filter: none; }
.cs b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.3rem; letter-spacing: -.02em; margin: 6px 0 4px; }
.cs p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.45; max-width: 30ch; }
@media (max-width: 860px) {
  .cine-steps { grid-template-columns: 1fr; bottom: 28px; }
  .cs { display: none; } .cs.on { display: block; }
  .cine-copy { top: calc(13vh + 8px); }
}
@media (prefers-reduced-motion: reduce) { .cine { height: auto; } .cine-stick { position: relative; } .cine-bar { display: none; } .cine-h .w { opacity: 1; filter: none; transform: none; } .cs { opacity: 1; filter: none; } }

/* ═══ Closing: full screen, moving perspective floor, no footer ═══ */
.closing { position: relative; min-height: 100vh; padding: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border-top: 1px solid var(--rule); background: #fff; }
.closing .close-in { position: relative; z-index: 2; padding-top: 12vh; padding-bottom: 34vh; }
#floorcv { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46vh; z-index: 1; }
.closing::after { content: ""; position: absolute; left: 0; right: 0; bottom: 46vh; height: 80px; background: linear-gradient(#fff, rgba(255,255,255,0)); z-index: 1; pointer-events: none; }
#endcv { margin: 0 auto 8px; }
.close-fine { position: absolute; left: 0; right: 0; bottom: 48px; text-align: center; z-index: 2; margin: 0; font-size: .66rem; }
#floorcv { height: 34vh; }
.closing .close-in { padding-top: 10vh; padding-bottom: 36vh; }
.closing::after { bottom: calc(34vh - 40px); height: 120px; background: linear-gradient(#fff 30%, rgba(255,255,255,0)); }
.close-fine.mono { color: var(--ink-3); }

/* The layer: black section */
#system { background: #0b0b0c; color: #fff; padding: 0 0 120px; border-top: 0; }
#system::before, #system::after { background: rgba(255,255,255,0.08); }
#system .chapter-head { padding-top: 140px; padding-bottom: 24px; }
#system .chapter-head .t-chapter { color: #fff; }
#system .chapter-head .p { color: rgba(255,255,255,0.62); }
#system .chapter-head > .mono { color: #8fa6f3; }
#system .mark::before, #system .mark::after { background: #fff; }
#system .ly-steps { border-left-color: rgba(255,255,255,0.14); }
#system .ly-step::before { background: #fff; }
#system .ly-step .mono.dim { color: rgba(255,255,255,0.45); }
#system .ly-step b { color: #fff; }
#system .ly-step p { color: rgba(255,255,255,0.66); }
#system .layer { height: 320vh; }
#system { padding-bottom: 40px; }
.nav.on.dark .wrap { background: linear-gradient(180deg, rgba(40,42,50,0.66), rgba(20,21,25,0.5)); border-color: rgba(255,255,255,0.12); box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 12px 32px -12px rgba(0,0,0,0.6); }
.nav.on.dark .brand svg.wordmark { color: #fff; }
.nav.on.dark .nav-links a { color: rgba(255,255,255,0.72); }
.nav.on.dark .nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav.on.dark .btn-primary { background: #fff; color: var(--ink); border-color: #fff; }
.nav.on.dark .nav-toggle span { background: #fff; }

/* ═══ Spacing rhythm: one consistent gap between and inside sections ═══ */
:root { --sec: 120px; }
.chapters { display: none !important; }
#story, #industries, #agents { padding: var(--sec) 0; }
#story .chapter-head, #industries .chapter-head, #agents .chapter-head, #system .chapter-head { padding-top: 0; padding-bottom: 48px; }
#story .statement { padding: 96px 0 0; }
#system { padding: var(--sec) 0 24px; }
.flow2 { height: 230vh; }
.layer, #system .layer { height: 290vh; }
.cine { height: 320vh; }
#agents .ag-grid + p { margin-top: 24px !important; }
#faq { padding: 0; }
.faq-wrap { padding-top: var(--sec); padding-bottom: var(--sec); }
@media (max-width: 860px) { :root { --sec: 80px; } .flow2 { height: 210vh; } .layer, #system .layer { height: 260vh; } }

/* ── Responsive refinements: tablet and phone ── */
@media (max-width: 1024px) and (min-width: 601px) {
  .t-chapter { font-size: clamp(2rem, 4.6vw, 3.4rem); }
  .t-statement { font-size: clamp(1.5rem, 3.4vw, 2.4rem); }
  .p { font-size: 1.0625rem; max-width: 60ch; }
  .chapter-head .p { max-width: 62ch; }
}
@media (max-width: 600px) {
  .t-chapter { font-size: clamp(1.9rem, 8.2vw, 2.4rem); line-height: 1.1; }
  .t-statement { font-size: clamp(1.4rem, 6.4vw, 1.8rem); }
  .p { font-size: 1rem; }
  .hero-copy .t-hero { font-size: clamp(1.9rem, 8.6vw, 2.4rem); max-width: 14ch; }
  .hero-hint { bottom: 28px; }
  .flow2-stage { min-height: 300px; }
  .f2-stat b { font-size: 1.5rem; }
  .cine-h { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
  .cta-box a { padding: 18px 16px; }
  .faq details summary { font-size: 1rem; }
}
@media (hover: none) and (pointer: coarse) {
  .nav-links a, .btn, .faq details summary, .mobile-menu a { -webkit-tap-highlight-color: transparent; }
  .btn { min-height: 44px; }
}

@media (min-width: 1600px) {
  .hero-copy .t-hero { font-size: 4rem; }
}
