/* ==========================================================================
   HOME: hero gate, candles, rewind, scenes
   ========================================================================== */
:root {
  --gate-w: clamp(19rem, 48vw, 50rem);
  --candle-w: clamp(.28rem, .36vw, .5rem);
  --line-main: 2.2px; --line-near: 1.3px; --line-far: .9px; --line-wall: .5px; --line-ray: .9px; --line-cross: .45px;
}
.page--home { overscroll-behavior-y: none; }
.page--home .page { padding-top: 0; }
.page--home .header { opacity: 0; }
.page--home .header.is-ready { opacity: 1; transition: opacity .4s var(--ease); }
html.is-intro-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   Hero (fixed layer while the rewind plays)
   -------------------------------------------------------------------------- */
.hero { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: var(--c-base); pointer-events: auto; }
.hero[data-render="retired"] { background: transparent; pointer-events: none; visibility: hidden; }
.hero__world { position: absolute; inset: 0; transform-origin: 50% 54%; will-change: transform; }

.hero__topo { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 80%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 80%, transparent 100%); }
.hero__topo canvas { width: 100%; height: 100%; display: block; }
.hero__topo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(55% 60% at 50% 48%, rgb(var(--rgb-base) / .72), rgb(var(--rgb-base) / .35) 45%, transparent 75%); }

/* candles (shared) */
.candles { position: relative; width: 100%; height: 100%; }
.candle { position: absolute; left: var(--x); top: 0; bottom: 0; width: var(--candle-w); transform: translateX(-50%); }
.candle__wick { position: absolute; left: 50%; width: 1px; top: var(--wt); height: var(--wh); transform: translateX(-50%); background: rgb(var(--rgb-accent-soft) / .5); }
.candle__body { position: absolute; left: 0; right: 0; top: var(--bt); height: max(var(--bh), 2px); border-radius: 1px; }
.candle--up .candle__body { background: rgb(var(--rgb-cool) / .85); box-shadow: inset 0 0 0 1px rgb(var(--rgb-cool) / .35); }
.candle--up .candle__wick { background: rgb(var(--rgb-cool) / .6); }
.candle--down .candle__body { background: rgb(var(--rgb-rose) / .78); box-shadow: inset 0 0 0 1px rgb(var(--rgb-rose) / .3); }
.candle--down .candle__wick { background: rgb(var(--rgb-rose) / .55); }
.candle--live .candle__body { background: rgb(var(--rgb-accent) / .9); box-shadow: 0 0 10px rgb(var(--rgb-accent) / .5); }
.candle--live .candle__wick { background: rgb(var(--rgb-accent) / .8); }

.hero__content { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); width: min(94vw, calc(var(--gate-w) * 1.65)); text-align: center; z-index: 8; display: grid; justify-items: center; gap: clamp(.6rem, 1.2vw, 1rem); perspective: calc(var(--gate-w) * 1.4); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: var(--fs-cap); letter-spacing: .18em; text-transform: uppercase; color: var(--c-accent); opacity: 0; }
.hero__eyebrow i { width: 1.4rem; height: 1px; background: currentColor; opacity: .6; }
.hero__title { display: grid; gap: .2em; justify-items: center; color: var(--c-ink); }
.hero__title-line { display: block; font-family: var(--f-display); font-weight: 300; font-size: max(1.4rem, calc(var(--gate-w) * .078)); line-height: 1.05; letter-spacing: -.01em; color: var(--c-ink-2); max-width: 20ch; transform-origin: 50% 60%; opacity: 0; } /* hidden until the intro: the main headline comes first */
.hero__title-line .ch { display: inline-block; will-change: transform; }
.hero__title-word { display: block; font-family: var(--f-display); font-weight: 800; font-size: max(2.2rem, calc(var(--gate-w) * .13)); line-height: .96; letter-spacing: -.035em; color: var(--c-ink); max-width: none; white-space: nowrap; opacity: 0; transform-origin: 50% 68%; background: linear-gradient(180deg, #fff 20%, var(--c-accent-soft) 70%, var(--c-accent) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__sub { font-size: clamp(.82rem, .35rem + .55vw, 1rem); line-height: 1.55; color: var(--c-ink-3); max-width: 54rem; opacity: 0; margin-top: clamp(.4rem, 1vw, 1rem); }
.hero__sub .w { display: inline-block; }
.hero__cta { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; opacity: 0; margin-top: .4rem; }

.hero__rail { position: absolute; left: 50%; bottom: clamp(1.4rem, 3.5vh, 2.6rem); transform: translateX(-50%); display: flex; align-items: center; gap: 1.2rem; font-family: var(--f-mono); font-size: var(--fs-cap); letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink-4); white-space: nowrap; z-index: 9; opacity: 0; }
.hero__rail i { width: 2.2rem; height: 1px; background: var(--c-line-strong); transform-origin: 50% 50%; }
.hero__rail .is-core { color: var(--c-ink); }
.hero__hint { position: absolute; right: var(--edge); bottom: clamp(1.4rem, 3.5vh, 2.6rem); display: grid; justify-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--c-ink-4); opacity: 0; z-index: 9; }
.hero__hint i { width: 1px; height: 2.4rem; background: linear-gradient(180deg, var(--c-accent), transparent); animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); opacity: 0 } 40% { transform: scaleY(1); opacity: 1 } 100% { transform: scaleY(1) translateY(40%); opacity: 0 } }

.rewind-track { height: 175svh; }
.travel-light { position: fixed; left: 0; top: 0; z-index: 8; width: clamp(16rem, 30vw, 32rem); aspect-ratio: 1; pointer-events: none; opacity: 0; transform: translate(-50%, -50%); will-change: transform, opacity;
  background: radial-gradient(closest-side, rgb(var(--rgb-accent-soft) / .16), rgb(var(--rgb-accent) / .05) 22%, transparent 48%); }
/* the star itself: a hard bright core, two crossed rays, a tight halo */
.travel-light::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, #ffffff 0 28%, rgb(var(--rgb-accent-soft)) 60%, transparent 72%);
  box-shadow: 0 0 10px 2px rgb(255 255 255 / .9), 0 0 26px 6px rgb(var(--rgb-accent-soft) / .7), 0 0 70px 18px rgb(var(--rgb-accent) / .45); }
.travel-light::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11rem; height: 11rem; transform: translate(-50%, -50%);
  background:
    linear-gradient(90deg, transparent 0, rgb(255 255 255 / .0) 18%, rgb(var(--rgb-accent-soft) / .85) 50%, rgb(255 255 255 / 0) 82%, transparent 100%) center / 100% 1px no-repeat,
    linear-gradient(180deg, transparent 0, rgb(255 255 255 / .0) 22%, rgb(var(--rgb-accent-soft) / .7) 50%, rgb(255 255 255 / 0) 78%, transparent 100%) center / 1px 100% no-repeat;
  opacity: 0; transition: opacity .35s var(--ease-out); animation: star-twinkle 2.6s ease-in-out infinite; }
.travel-light.is-born::after { opacity: 1; }
@keyframes star-twinkle { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.12, .94); } }

/* --------------------------------------------------------------------------
   Scenes (shared)
   -------------------------------------------------------------------------- */
.scene { position: relative; min-height: 100svh; padding: clamp(5rem, 11svh, 9rem) 0 clamp(4rem, 9svh, 7rem); display: grid; align-items: center; }
.scene__eyebrow { font-family: var(--f-mono); font-size: var(--fs-cap); letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent); }
.scene__title { font-family: var(--f-display); font-weight: 300; font-size: clamp(2.2rem, 4.6vw, 4.6rem); line-height: .98; letter-spacing: -.02em; color: var(--c-ink); text-wrap: balance; max-width: 18ch; }
.scene__title .w, .scene__statement .w, .scene__body .w { display: inline-block; }
.scene__body { color: var(--c-ink-3); font-size: clamp(.95rem, .7rem + .4vw, 1.1rem); line-height: 1.55; max-width: 38rem; }
.scene__intro { display: grid; gap: 1.1rem; }
.scene__intro--center { justify-items: center; text-align: center; margin-bottom: clamp(2rem, 5vw, 4rem); }
.scene__intro--center .scene__title { max-width: 18ch; }
.scene__center { display: grid; justify-items: center; text-align: center; gap: 1.5rem; }
.scene__statement { font-family: var(--f-display); font-weight: 300; font-size: clamp(1.5rem, 1rem + 2.1vw, 3rem); line-height: 1.12; letter-spacing: -.015em; color: var(--c-ink); max-width: 36ch; text-wrap: balance; }
.scene__body--center { max-width: 48rem; }
.light-anchor { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }

/* statement: the star rests above the words, a thin beam ties them together */
.scene--statement .scene__center { position: relative; z-index: 1; padding-top: 1rem; }
.star-seat { position: relative; width: 0; height: 0; margin-bottom: 5.5rem; }
.star-seat--exit { margin-bottom: 3rem; }
.star-seat i { position: absolute; left: 0; top: 2.2rem; width: 1px; height: 2.6rem; translate: -50% 0; background: linear-gradient(180deg, rgb(var(--rgb-accent-soft) / .6), transparent); }

/* foundation: five satellites on an orbit around the core */
/* text on the left, the orbit on the right: one screen, no separate block below */
.foundation-grid { display: grid; grid-template-columns: minmax(20rem, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.scene--foundation .scene__intro { max-width: 34rem; margin-bottom: 0; }
.foundation { position: relative; width: min(100%, 50rem); aspect-ratio: 1; margin: 0 auto; }
.orbit { position: absolute; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%; pointer-events: none; }
.orbit--outer { width: 80%; height: 80%; border: 1px dashed rgb(var(--rgb-accent-soft) / .16); animation: orbit-spin 140s linear infinite; }
.orbit--inner { width: 52%; height: 52%; border: 1px solid rgb(var(--rgb-accent-soft) / .08); animation: orbit-spin 90s linear infinite reverse; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.foundation__core { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; translate: -50% -50%; display: grid; place-items: center; }
.core__ring { position: absolute; border-radius: 50%; border: 1px solid rgb(var(--rgb-accent-soft) / .2); opacity: 0; }
.core__ring--outer { inset: 0; }
.core__ring--mid { inset: 16%; border-style: dashed; border-color: rgb(var(--rgb-accent-soft) / .16); }
.core__ring--inner { inset: 38%; border-color: rgb(var(--rgb-accent) / .5); box-shadow: 0 0 40px -10px rgb(var(--rgb-accent) / .4) inset; }
/* the star lands here: --fill goes 0 -> 1 as it arrives and the core lights up */
.foundation__core { --fill: 0; }
.core__ring--inner::after { content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: var(--fill); background: radial-gradient(circle, #ffffff 0, rgb(var(--rgb-accent-soft)) 28%, rgb(var(--rgb-accent) / .6) 55%, rgb(var(--rgb-accent) / 0) 78%); box-shadow: 0 0 60px 10px rgb(var(--rgb-accent) / .45); }
.core__ring--mid { opacity: calc(.5 + var(--fill) * .5); border-color: rgb(var(--rgb-accent-soft) / calc(.16 + var(--fill) * .5)); }
.core__ring--outer { box-shadow: 0 0 calc(var(--fill) * 70px) rgb(var(--rgb-accent) / .25); border-color: rgb(var(--rgb-accent-soft) / calc(.2 + var(--fill) * .4)); }
.core__ticks { opacity: calc(.6 + var(--fill) * .4); }
.core__ticks { position: absolute; inset: 7%; border-radius: 50%; }
.core__ticks i { position: absolute; left: 50%; top: 0; width: 1px; height: 6px; background: rgb(var(--rgb-accent-soft) / .35); transform-origin: 50% calc(50% + (100% * var(--r))); }
.core__dot { position: absolute; width: .9rem; height: .9rem; border-radius: 50%; background: #f0fff8; box-shadow: 0 0 18px 4px rgb(var(--rgb-accent) / .65); opacity: 0; }
.core__label { position: absolute; bottom: -2rem; font-family: var(--f-mono); font-size: var(--fs-cap); letter-spacing: .16em; text-transform: uppercase; color: var(--c-ink-4); white-space: nowrap; }
.fnode { position: absolute; left: calc(50% + cos(var(--a)) * 40%); top: calc(50% + sin(var(--a)) * 40%); width: 0; height: 0; }
.fnode__inner { position: absolute; left: 0; top: 0; translate: -50% -50%; display: grid; justify-items: center; opacity: 0; }
.fnode__circle { position: relative; width: clamp(9.5rem, 16vw, 12.5rem); aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: .45rem; padding: 1rem; text-align: center;
  border: 1px solid rgb(var(--rgb-accent) / .45); background: radial-gradient(circle at 50% 35%, rgb(var(--rgb-surface) / .95), rgb(var(--rgb-base) / .9));
  box-shadow: 0 0 0 6px rgb(var(--rgb-accent) / .05), 0 0 30px -8px rgb(var(--rgb-accent) / .35); animation: fnode-bob 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fnode__circle::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px dashed rgb(var(--rgb-accent-soft) / .18); }
.fnode__num { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; color: var(--c-accent); }
.fnode__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.12; color: var(--c-ink); letter-spacing: -.01em; }
@keyframes fnode-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* markets (pinned) */
.scene--markets { padding: 0; overflow: hidden; display: block; }
.markets__frame { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.markets__head { padding-top: clamp(3.5rem, 7svh, 5.5rem); }
.markets__head-inner { display: grid; gap: .8rem; }
.markets__title { position: relative; font-family: var(--f-display); font-weight: 300; font-size: clamp(2rem, 5vw, 5rem); line-height: 1.05; letter-spacing: -.02em; color: var(--c-ink); height: 1.1em; overflow: hidden; }
.markets__title > span { position: absolute; left: 0; top: 0; white-space: nowrap; }
.markets__title-b { opacity: 0; }
.markets__body { max-width: 56rem; }
.markets__chart { position: relative; margin-top: clamp(.5rem, 2svh, 1.25rem); overflow: hidden; min-height: 46svh; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.candles--wide { position: absolute; inset: 6% 0 6%; }
.candles--wide .candle { --candle-w: clamp(.32rem, .42vw, .55rem); }
.markets__scale { position: absolute; right: var(--edge); top: 6%; bottom: 6%; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--f-mono); font-size: .62rem; color: var(--c-ink-4); letter-spacing: .06em; opacity: .5; }
.markets__labels { position: absolute; inset: 0; pointer-events: none; }
.candles--wide .mlabel { transform: translate(-50%, -50%); } /* labels sit on the chart centre line; the solid fill keeps them readable over the candles */
.mlabel { position: absolute; left: var(--p); top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .55rem; padding: .5rem .8rem; border-radius: var(--radius-pill); border: 1px solid rgb(var(--rgb-accent) / .7); background: linear-gradient(rgb(var(--rgb-accent) / .26), rgb(var(--rgb-accent) / .26)), var(--c-base); box-shadow: 0 0 0 1px rgb(var(--rgb-base) / .9), 0 6px 20px -8px rgb(var(--rgb-accent) / .5); font-family: var(--f-display); font-weight: 700; font-size: clamp(.8rem, .9vw, 1rem); color: var(--c-ink); white-space: nowrap; opacity: 0; }
.mlabel b { font-family: var(--f-mono); font-weight: 500; font-size: var(--fs-cap); color: var(--c-accent); letter-spacing: .1em; }
.markets__cursor { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; pointer-events: none; }
.markets__cursor-line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgb(var(--rgb-accent) / .5) 30%, rgb(var(--rgb-accent) / .5) 70%, transparent); opacity: 0; }
.markets__cursor-dot { position: absolute; left: 0; top: 50%; width: .75rem; height: .75rem; border-radius: 50%; background: #f0fff8; transform: translate(-50%, -50%); box-shadow: 0 0 16px 3px rgb(var(--rgb-accent) / .6); opacity: 0; }
.markets__foot { padding: clamp(1rem, 3svh, 2rem) 0 clamp(2.5rem, 6svh, 4rem); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.markets__note { color: var(--c-ink-3); max-width: 46rem; font-size: var(--fs-sm); opacity: 0; }
.markets__metrics { display: flex; gap: clamp(1.2rem, 3vw, 3rem); margin: 0; }
.markets__metrics div { display: grid; gap: .25rem; }
.markets__metrics dt { font-size: var(--fs-cap); color: var(--c-ink-4); font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.markets__metrics dd { margin: 0; font-family: var(--f-mono); font-size: clamp(.95rem, 1vw, 1.3rem); color: var(--c-ink); font-variant-numeric: tabular-nums; }

/* control (pinned states) */
.scene--control { align-items: center; }
.control { display: grid; grid-template-columns: minmax(18rem, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; min-height: calc(100svh - 14rem); }
.control__board { padding: 0; overflow: visible; display: grid; grid-template-columns: 3.5rem 1fr; }
.control__rail { position: relative; border-right: 1px solid var(--c-line); display: grid; grid-auto-rows: 1fr; }
.crail__dot { position: relative; place-self: center; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c-accent); opacity: 0; transform: scale(.7); transition: opacity .35s var(--ease), transform .35s var(--ease), background .35s; }
.crail__dot::after { content: ""; position: absolute; inset: -.45rem; border-radius: 50%; border: 1px solid rgb(var(--rgb-accent) / .6); opacity: 0; animation: cpulse 1.65s ease-in-out infinite; }
.crail__dot:nth-child(2)::after { animation-delay: .12s } .crail__dot:nth-child(3)::after { animation-delay: .24s } .crail__dot:nth-child(4)::after { animation-delay: .36s }
@keyframes cpulse { 0% { transform: scale(.75); opacity: 0 } 35% { opacity: .74 } 78% { opacity: 0; transform: scale(1.42) } 100% { opacity: 0 } }
[data-control-bridge="complete"] .crail__dot { opacity: 1; transform: none; }
.control__states { display: grid; }
.cstate { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.1rem; align-items: center; text-align: left; padding: 1.1rem 1.25rem; border-top: 1px solid var(--c-line); opacity: 1; cursor: default; transition: background .3s; }
.cstate:first-child { border-top: 0; }
.cstate:hover { background: rgb(var(--rgb-surface) / .5); }
.cstate__text b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: var(--c-ink); }
.cstate__text span { display: block; color: var(--c-ink-3); font-size: var(--fs-xs); margin-top: .3rem; line-height: 1.5; }
.cstate__visual { position: relative; height: 3rem; display: flex; align-items: flex-end; gap: 3px; }
.cstate__visual--latency i { flex: 1; height: 30%; border-radius: 1px; background: var(--c-accent); animation: lat 1.1s ease-in-out infinite; }
.cstate__visual--latency i:nth-child(2) { animation-delay: .08s } .cstate__visual--latency i:nth-child(3) { animation-delay: .16s } .cstate__visual--latency i:nth-child(4) { animation-delay: .24s } .cstate__visual--latency i:nth-child(5) { animation-delay: .32s } .cstate__visual--latency i:nth-child(6) { animation-delay: .4s } .cstate__visual--latency i:nth-child(7) { animation-delay: .48s } .cstate__visual--latency i:nth-child(8) { animation-delay: .56s }
@keyframes lat { 0%,100% { height: 25% } 50% { height: 95% } }
.cstate__visual--analysis svg { width: 100%; height: 100%; }
.cstate__visual--analysis path { stroke-width: 1.4; stroke-dasharray: 300; stroke-dashoffset: 300; }
.cstate__visual--analysis .a1 { stroke: var(--c-accent); } .cstate__visual--analysis .a2 { stroke: rgb(var(--rgb-cool) / .8); } .cstate__visual--analysis .a3 { stroke: rgb(var(--rgb-accent-soft) / .25); stroke-dasharray: 3 4; stroke-dashoffset: 0; }
.cstate__visual--analysis .a1, .cstate__visual--analysis .a2 { animation: drawline 1.4s var(--ease-out) forwards; }
@keyframes drawline { to { stroke-dashoffset: 0 } }
.cstate__visual--orders { flex-direction: column; justify-content: space-between; align-items: stretch; }
.cstate__visual--orders i { position: relative; display: block; height: 1px; font-family: var(--f-mono); font-size: .55rem; letter-spacing: .1em; font-style: normal; }
.cstate__visual--orders i::after { content: attr(class); position: absolute; right: 0; top: -1.1em; text-transform: uppercase; }
.cstate__visual--orders .tp { background: rgb(var(--rgb-cool) / .8); color: var(--c-long); }
.cstate__visual--orders .px { background: var(--c-ink); height: 2px; transform: translateY(0); }
.cstate__visual--orders .px::after { content: ""; }
.cstate__visual--orders .sl { background: rgb(var(--rgb-rose) / .8); color: var(--c-short); }
.cstate__visual--orders .px { animation: px 2.2s ease-in-out infinite; }
.cstate__visual--orders .tp { animation: tp 2.2s ease-in-out infinite; }
@keyframes px { 0%,100% { transform: translateY(.6rem) } 50% { transform: translateY(-.6rem) } }
@keyframes tp { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-.35rem) } }
.cstate__visual--universal { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 4px; align-items: stretch; }
.cstate__visual--universal i { border: 1px solid rgb(var(--rgb-accent-soft) / .25); border-radius: 2px; background: rgb(var(--rgb-accent) / .06); transition: background .4s, border-color .4s; }
.cstate__visual--universal i { animation: tile 1.8s ease-in-out infinite; }
.cstate__visual--universal i:nth-child(2) { animation-delay: .15s } .cstate__visual--universal i:nth-child(3) { animation-delay: .3s } .cstate__visual--universal i:nth-child(4) { animation-delay: .45s } .cstate__visual--universal i:nth-child(5) { animation-delay: .6s } .cstate__visual--universal i:nth-child(6) { animation-delay: .75s }
@keyframes tile { 0%,100% { background: rgb(var(--rgb-accent) / .06) } 50% { background: rgb(var(--rgb-accent) / .5); border-color: var(--c-accent) } }

/* flow (steps) */
.flow { position: relative; aspect-ratio: 1000 / 1250; overflow: visible; user-select: none; } /* tall: the star takes a long stretch of scroll from step to step, so each title can be read */
.flow__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow__link { stroke: rgb(var(--rgb-accent) / .55); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.flow__node { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.flow__ring { position: absolute; left: 50%; top: 50%; width: 3.2rem; height: 3.2rem; border-radius: 50%; transform: translate(-50%, -50%); background: conic-gradient(var(--c-accent) calc(var(--p, 0) * 1turn), transparent 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 66%, transparent 67%); mask: radial-gradient(circle, transparent 60%, #000 61%, #000 66%, transparent 67%); }
.flow__core { position: absolute; left: 50%; top: 50%; width: .7rem; height: .7rem; border-radius: 50%; background: #f0fff8; transform: translate(-50%, -50%) scale(0); box-shadow: 0 0 14px 2px rgb(var(--rgb-accent) / .6); opacity: 0; }
.flow__node--final .flow__ring { width: 5rem; height: 5rem; }
.flow__card { position: absolute; left: 2.6rem; top: -.7rem; width: max-content; max-width: 18rem; opacity: 0; transform: translateY(6px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.flow__node.is-lit .flow__card { opacity: 1; transform: none; }
.flow__node:nth-child(odd) .flow__card { left: auto; right: 2.6rem; text-align: right; }
.flow__node.flow__node--final .flow__card { left: 3.4rem; right: auto; top: -.7rem; text-align: left; }
.flow__card b { background: none; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.1rem, 1.5vw, 1.5rem); letter-spacing: -.01em; color: var(--c-ink); white-space: nowrap; }
.flow__card b::first-letter { color: var(--c-accent); }

/* education / terminal */
.edu { display: grid; grid-template-columns: minmax(18rem, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.edu__actions { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; margin-top: .5rem; opacity: 0; }
.terminal { padding: .75rem; margin: 0; opacity: 0; }
.terminal__bar { display: flex; align-items: center; gap: .4rem; padding: .2rem .4rem .7rem; }
.terminal__bar span { width: .55rem; height: .55rem; border-radius: 50%; background: rgb(var(--rgb-accent-soft) / .18); }
.terminal__bar em { margin-left: auto; font-style: normal; font-family: var(--f-mono); font-size: var(--fs-cap); letter-spacing: .1em; color: var(--c-ink-4); }
.terminal__body { display: grid; grid-template-columns: 1fr 6.5rem; gap: .5rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: rgb(var(--rgb-base) / .5); }
.terminal__chart { position: relative; aspect-ratio: 16 / 9; }
.candles--mini { position: absolute; inset: 10% 2%; }
.candles--mini .candle { --candle-w: clamp(.22rem, .3vw, .4rem); }
.terminal__side { display: grid; align-content: start; gap: .4rem; padding: .7rem .6rem; border-left: 1px solid var(--c-line); }
.tstat { display: grid; gap: .1rem; }
.tstat dt { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-ink-4); }
.tstat dd { margin: 0; font-family: var(--f-mono); font-size: .9rem; color: var(--c-ink); }
.terminal__markers { display: flex; flex-wrap: wrap; gap: .4rem; padding: .75rem .25rem .25rem; }
.terminal__markers span { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; border-radius: var(--radius-pill); border: 1px solid var(--c-line); font-family: var(--f-mono); font-size: var(--fs-cap); letter-spacing: .08em; color: var(--c-ink-3); opacity: 0; }
.terminal__markers span::before { content: ""; width: .35rem; height: .35rem; border-radius: 50%; background: var(--c-accent); }

/* exit */
.scene--exit { min-height: auto; padding-bottom: clamp(3rem, 6svh, 5rem); }
/* the ending is the same ribbon box as on the inner pages, with the star landing above it */
.exit { position: relative; display: grid; gap: 1.5rem; }
.exit .star-seat--exit { margin: 0 auto 1rem; }
.exit__box { display: grid; gap: 1.25rem; justify-items: start; }
.exit__title { max-width: 22ch; }
.exit__title .w { display: inline-block; }
.exit__body { max-width: 44rem; }
.exit__box .page-hero__actions { opacity: 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 74.99rem) {
  .control { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; }
}
@media (max-width: 64rem) {
  .foundation-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .scene--foundation .scene__intro { max-width: none; }
  .foundation { aspect-ratio: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; padding-top: 1rem; }
  .foundation__core { grid-column: 1 / -1; }
  .fnode:last-child { grid-column: 1 / -1; }
  .orbit { display: none; }
  .foundation__core { position: relative; left: auto; top: auto; translate: none; width: min(60vw, 14rem); margin: 0 auto 2.5rem; }
  .fnode { position: static; width: auto; height: auto; }
  .fnode__inner { position: static; translate: none; justify-items: center; }
  .fnode__circle { width: min(40vw, 11rem); }
  .fnode__circle { animation: none; }
  /* phones: 01 and 02 above the core, 03 04 05 below it */
  .foundation__core { order: 1; margin: .5rem auto 1rem; }
  .fnode { order: 2; }
  .foundation > .fnode:nth-child(4), .foundation > .fnode:nth-child(5) { order: 0; }
  /* the light reaches a satellite: its ring brightens, the number turns white, one ripple runs out */
  .fnode__circle { transition: border-color .5s var(--ease), background .5s var(--ease), transform .5s var(--ease-out); }
  .fnode__num { transition: color .4s; }
  .fnode.is-lit .fnode__circle { border-color: var(--c-accent); background: radial-gradient(circle at 50% 40%, rgb(var(--rgb-accent) / .16), rgb(var(--rgb-surface) / .9) 70%); transform: scale(1.04); }
  .fnode.is-lit .fnode__num { color: var(--c-ink); }
  .fnode__circle::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--c-accent); opacity: 0; }
  .fnode.is-lit .fnode__circle::after { animation: fnode-ripple 1.1s var(--ease-out) 1; }
}
@media (min-width: 56rem) {
  .markets__cursor-dot, .core__dot { visibility: hidden !important; } /* the star plays these parts; the elements stay in layout as stops */
}
@media (max-width: 56rem) {
  :root { --gate-w: clamp(18rem, 78vw, 30rem); }
  .page--home .page { padding-top: 0; }
  .hero { position: relative; inset: auto; min-height: 100svh; z-index: 1; overflow: hidden; touch-action: pan-y; } /* phones: the first screen is the terrain alone, the next scene appears only once scrolling starts */
  .flow__card { opacity: 1; transform: none; }
  .markets__labels { position: absolute; inset: 0; }
  .markets__title > span { white-space: normal; }
  .markets__title { height: auto; min-height: 2.3em; }
  .rewind-track, .travel-light { display: none; }
  .hero__content { top: 36%; width: 92vw; } /* phones: the brand line sits on the dark sky above the terrain, the rest over it */
  .hero__title-line { font-size: 1.35rem; }
  .hero__title-word { font-size: clamp(2.2rem, 10.5vw, 3.2rem); white-space: normal; text-wrap: balance; }
  .hero__sub { font-size: .9rem; }
  .hero__rail, .hero__hint { display: none; }
  .markets__title { font-size: 1.6rem; }
  .mlabel { left: 50% !important; top: 50%; }
  .scene { min-height: auto; padding: clamp(3.5rem, 12vw, 5rem) 0; }
  .scene--markets { padding: 0; }
  .markets__frame { min-height: auto; }
  .control { min-height: auto; }
  .markets__chart { min-height: 40svh; }
  .markets__foot { grid-template-columns: 1fr; }
  .markets__metrics { flex-wrap: wrap; gap: 1rem 1.5rem; }
  .cstate { grid-template-columns: 1fr; gap: .6rem; }
  .cstate__visual { height: 2.2rem; width: 6rem; }
  .flow { aspect-ratio: auto; display: grid; gap: 1.5rem; padding: 1.25rem; }
  .flow__svg { display: none; }
  .flow__node { position: relative; left: auto; top: auto; width: auto; height: auto; display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; align-items: center; }
  .flow__ring, .flow__node--final .flow__ring { position: relative; left: auto; top: auto; transform: none; width: 3.2rem; height: 3.2rem; }
  .flow__core { left: 1.6rem; top: 50%; }
  .flow__card, .flow__node:nth-child(odd) .flow__card, .flow__node--final .flow__card { position: static; width: auto; text-align: left; }
  .terminal__body { grid-template-columns: 1fr; }
  .terminal__side { grid-template-columns: repeat(4, 1fr); border-left: 0; border-top: 1px solid var(--c-line); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__hint i, .crail__dot::after, .cstate__visual--latency i, .cstate__visual--universal i, .cstate__visual--orders i { animation: none !important; }
}

/* ---------- media on the home page ---------- */
.scene__rock { position: absolute; right: -8%; bottom: -6%; width: min(46vw, 44rem); z-index: 0; pointer-events: none; opacity: .85; }
.scene__rock img { width: 100%; filter: drop-shadow(0 30px 60px rgb(0 0 0 / .7)); }
.scene--steps .scene__rock { right: -4%; top: 14%; bottom: auto; width: min(40vw, 36rem); } /* floats in the empty right half of the steps scene */
.scene--exit, .scene--foundation { position: relative; overflow: hidden; isolation: isolate; }
/* foundation: the face fills the whole first screen of the scene and dissolves before the orbit begins */
.scene--foundation .video-bg--wide { bottom: auto; height: min(100svh, 58rem); mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .06) 14%, rgb(0 0 0 / .3) 30%, rgb(0 0 0 / .75) 46%, #000 56%, #000 62%, transparent 94%); -webkit-mask-image: linear-gradient(180deg, transparent 0, rgb(0 0 0 / .06) 14%, rgb(0 0 0 / .3) 30%, rgb(0 0 0 / .75) 46%, #000 56%, #000 62%, transparent 94%); }
/* masks live on plain wrappers only (vertical on the outer, horizontal on the inner): a masked <video> is rendered by the
   hardware video layer and some browsers smear its edge rows. the clip itself starts a little below the section top and an
   opaque strip of the page colour lies over that edge, so no row of the decoder output can ever show at the boundary */
.scene--foundation .video-bg__h { position: absolute; inset: 0; mask-image: linear-gradient(90deg, rgb(0 0 0 / .04) 0, rgb(0 0 0 / .14) 34%, rgb(0 0 0 / .85) 60%, #000 88%, rgb(0 0 0 / .6) 100%); -webkit-mask-image: linear-gradient(90deg, rgb(0 0 0 / .04) 0, rgb(0 0 0 / .14) 34%, rgb(0 0 0 / .85) 60%, #000 88%, rgb(0 0 0 / .6) 100%); }
.scene--foundation .video-bg--wide::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16%; z-index: 1; background: linear-gradient(180deg, rgb(var(--rgb-base)) 0, rgb(var(--rgb-base)) 22%, rgb(var(--rgb-base) / 0) 100%); }
/* no painted shading layer here: the page background is a vertical gradient, and any solid-colour box over it shows its edge.
   the clip fades out by itself, vertically and towards the headline on the left, through two masks on the video */
.scene--foundation .video-bg--wide::after { display: none; }
.scene--foundation .video-bg--wide video { left: 9%; top: 3%; width: 100%; height: 97%; opacity: .9; mask-image: none; -webkit-mask-image: none; } /* shifted right so the face sits further from the headline; the nose stays in frame */
.scene--foundation .video-bg--wide::after { background: linear-gradient(90deg, rgb(var(--rgb-base) / .96) 0%, rgb(var(--rgb-base) / .86) 34%, rgb(var(--rgb-base) / .2) 60%, rgb(var(--rgb-base) / .1) 88%, rgb(var(--rgb-base) / .5) 100%); }
.video-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.video-bg video { position: absolute; left: 30%; top: -6%; width: 85%; height: 112%; object-fit: cover; object-position: 50% center; opacity: .8; mask-image: linear-gradient(180deg, transparent, #000 22%, #000 68%, transparent 94%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 68%, transparent 94%); }
/* the face in the clip sits on the right, the headline stays on a dark left side */
.video-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(var(--rgb-base) / .97) 0%, rgb(var(--rgb-base) / .9) 38%, rgb(var(--rgb-base) / .25) 62%, rgb(var(--rgb-base) / .15) 85%, rgb(var(--rgb-base) / .6) 100%); }
@media (max-width: 74.99rem) { .video-bg video { left: 0; width: 130%; } .video-bg::after { background: linear-gradient(180deg, rgb(var(--rgb-base) / .9), rgb(var(--rgb-base) / .6)); } }
@media (max-width: 56rem) { .scene__rock { width: 90vw; right: -30%; opacity: .5; } }

@media (max-width: 56rem) {
  /* the final clip sits above the headline on phones */
  .scene--exit { padding-top: 0; display: block; }
  .scene--steps .scene__rock { top: auto; bottom: -7rem; right: -36%; width: 70vw; opacity: .6; } /* below the last step, above the next heading */
  .scene--foundation .video-bg--wide { height: 78vw; }
  .scene--foundation .video-bg--wide { mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 70%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 70%, transparent 100%); }
  .scene--foundation .video-bg__h { mask-image: none; -webkit-mask-image: none; }
  .scene--foundation .video-bg--wide::before { height: 12%; }
  .scene--foundation .video-bg--wide video { left: 0; top: 3%; width: 100%; height: 97%; opacity: .95; }
  .video-bg { position: relative; inset: auto; height: 78vw; min-height: 15rem; margin-bottom: 1.5rem; z-index: 0; }
  .video-bg video { position: absolute; inset: 0; left: 0; top: 0; width: 100%; height: 100%; opacity: .95; object-position: 62% center; mask-image: linear-gradient(180deg, #000 0, #000 70%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 0, #000 70%, transparent 100%); }
  .video-bg::after { background: linear-gradient(180deg, rgb(var(--rgb-base) / .4), transparent 40%, var(--c-base) 100%); }
}

@keyframes fnode-ripple { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }

.home-markets { position: relative; z-index: 2; padding: clamp(4rem, 9vw, 7rem) 0; }
