/* ---------- tokens, reset, shared layout ---------- */
:root{
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
  --bg:#0A0B10; --fg:#EDEEF3; --mute:#A9AEC2; --accent:#7B8CFF;
  --phosphor:#33FF33; --paper:#E8E2CF;
  --teal:#008080; --chrome:#C0C0C0; --navy:#000080;
  --font-modern:'Space Grotesk',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;
  --font-term:'VT323','Courier New',ui-monospace,monospace;
  --font-pixel:'Silkscreen','VT323','Courier New',monospace;
  --font-web2:'Trebuchet MS','Lucida Grande',Verdana,sans-serif;
  --rail:0px;
  --rail-h:44px;
}
html{scroll-padding-top:env(safe-area-inset-top,0px);-webkit-text-size-adjust:100%}
/* Lenis smooth scroll */
html.lenis,html.lenis body{height:auto}
.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:hidden}

*,*::before,*::after{box-sizing:inherit}
body{margin:0;background:var(--bg);color:var(--fg);font-family:var(--font-modern);line-height:1.5;overflow-x:clip}
img{max-width:100%;display:block}
a{color:var(--accent)}
.ph{display:inline-block;border:1px dashed currentColor;padding:0 .35em;border-radius:3px;font-size:.85em;opacity:.8}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes blink{50%{opacity:0}}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- year rail ---------- */
#rail{position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);height:var(--rail-h);z-index:50;display:flex;align-items:center;gap:14px;padding:0 16px;font-size:13px;color:#fff;mix-blend-mode:difference;pointer-events:none}
#rail .brand{font-weight:700;letter-spacing:.06em}
#rail .year{font-variant-numeric:tabular-nums;font-weight:500;font-size:15px}
#rail .line{flex:1;height:1px;background:rgba(255,255,255,.35);position:relative}
#rail .line i{position:absolute;left:0;top:-1px;height:3px;width:100%;background:#fff;transform:scaleX(0);transform-origin:left center;will-change:transform}
html:not(.motion) #rail .line i{display:none}
@media (min-width:900px){
  :root{--rail:88px}
  #rail{left:0;right:auto;top:0;bottom:0;width:var(--rail);height:auto;flex-direction:column;justify-content:flex-start;padding:28px 0;gap:20px}
  #rail .line{flex:1;width:1px;height:auto}
  #rail .line i{top:0;left:-1px;width:3px;height:100%;transform:scaleY(0);transform-origin:center top}
  #rail .year{writing-mode:vertical-rl;transform:rotate(180deg);font-size:16px}
}

/* ---------- section scaffolding ---------- */
.era{position:relative;min-height:100vh;min-height:100svh;padding:72px 20px 56px;padding-left:calc(20px + var(--rail));overflow:hidden}
.wrap{max-width:1080px;margin:0 auto}
@media (min-width:900px){.era{padding:96px 64px 96px;padding-left:calc(64px + var(--rail))}}
.grid2{display:grid;gap:36px}
@media (min-width:900px){.grid2{grid-template-columns:1.1fr .9fr;gap:56px;align-items:start}}
.col{position:relative}
.beat{margin-top:22px}
.beat.first{margin-top:0}
.beat b{display:block;font-size:12px;letter-spacing:.08em;margin-bottom:6px;font-weight:500;opacity:.75}
.closing{margin-top:34px;padding-top:18px;border-top:1px solid currentColor;font-size:clamp(22px,3vw,30px);line-height:1.25}

/* Typed text: the ghost holds the full copy (and the accessible text) so the box
   never changes size; the live layer types over it when motion is on. */
.typed{position:relative;display:block}
.typed .ghost{display:block}
.typed .live{display:none;position:absolute;inset:0}
.motion .typed .ghost{color:transparent;-webkit-text-fill-color:transparent;text-shadow:none;user-select:none}
.motion .typed .live{display:block}

/* Phased text: stacked lines that crossfade. Without motion the last phase shows. */
.phases{display:grid}
.phases>span{grid-area:1/1}
.phases>span:not(:last-child){opacity:0}

.btn{display:inline-block;background:var(--fg);color:var(--bg);text-decoration:none;font-weight:500;padding:14px 22px;border-radius:999px;min-height:44px}
.btn:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

footer{padding:40px 20px 60px;padding-left:calc(20px + var(--rail));color:var(--mute);font-size:14px;background:var(--bg)}
@media (min-width:900px){footer{padding-left:calc(64px + var(--rail))}}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important}
  .trans{min-height:auto!important;padding:40px 20px}
}
