:root {
  --ink: #f4f1e9;
  --muted: #a5a4b3;
  --violet: #9d78ff;
  --cyan: #5ae8ff;
  --acid: #c9ff55;
  --void: #02030a;
  --edge: rgba(255, 255, 255, 0.09);
  --edge-glow: rgba(157, 120, 255, 0.22);
  --edge-cyan: rgba(90, 232, 255, 0.28);
  --edge-subtle: rgba(255, 255, 255, 0.05);
  --page-pad: clamp(1.35rem, 4vw, 4.8rem);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--void); color: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, a { color: inherit; font: inherit; }
a { text-decoration: none; }

.skip-link {
  position: fixed; z-index: 100; left: 1rem; top: 1rem; padding: .75rem 1rem;
  background: var(--ink); color: #05060b; transform: translateY(-160%); transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed; z-index: 30; inset: 0 0 auto; height: 6rem; padding: 0 var(--page-pad);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-bottom: 1px solid transparent; transition: background .4s, border-color .4s, height .4s;
}
body.is-scrolled .site-header { height: 4.8rem; background: rgba(2, 3, 10, .75); border-color: var(--edge); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); }
.brand { justify-self: start; display: flex; align-items: center; gap: .9rem; }
.brand > span:last-child { display: grid; gap: .12rem; }
.brand strong { font-size: .9rem; letter-spacing: -.02em; }
.brand small { color: #747586; font-size: .54rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.brand-orbit { position: relative; width: 2.2rem; aspect-ratio: 1; display: block; transform: rotate(-30deg) translateZ(0); backface-visibility: hidden; }
.brand-orbit::before, .brand-orbit::after { content: ""; position: absolute; inset: 2px 7px; border: 1px solid rgba(157,120,255,.65); border-radius: 50%; box-shadow: 0 0 14px rgba(157,120,255,.45), inset 0 0 6px rgba(157,120,255,.2); }
.brand-orbit::after { inset: 7px 2px; border-color: rgba(90,232,255,.5); box-shadow: 0 0 12px rgba(90,232,255,.35); }
.brand-orbit i { position: absolute; inset: 38%; border-radius: 50%; background: white; box-shadow: 0 0 12px white; }
.brand-orbit b { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--acid); left: 2px; top: 48%; box-shadow: 0 0 9px var(--acid); }
.header-status { display: flex; align-items: center; gap: .7rem; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; }
.header-status span { color: #676978; }
.header-status i { color: var(--cyan); font-style: normal; }
.header-status b { font-weight: 700; min-width: 5.5rem; }
.header-download { justify-self: end; padding: .65rem 1.15rem; border: 1px solid var(--edge); border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; box-shadow: inset 0 1px 0 0 rgba(255,255,255,.12), 0 2px 8px rgba(0,0,0,.25); transition: background .3s cubic-bezier(0.16,1,0.3,1), border-color .3s cubic-bezier(0.16,1,0.3,1), transform .3s cubic-bezier(0.16,1,0.3,1), box-shadow .3s cubic-bezier(0.16,1,0.3,1); }
.header-download:hover, .header-download:focus-visible { background: white; color: #060710; border-color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(90,232,255,.35); }
.header-download span { margin-left: .6rem; color: var(--cyan); }

.cosmic-journey { position: relative; height: 900svh; }
.cosmic-stage { position: sticky; top: 0; height: 100svh; overflow: clip; background: #02030a; isolation: isolate; }
.journey-canvas, .canvas-fallback, .space-grain, .space-vignette { position: absolute; inset: 0; width: 100%; height: 100%; }
.journey-canvas { z-index: -4; display: block; }
.canvas-fallback { z-index: -5; overflow: hidden; background: radial-gradient(circle at 50% 48%, #12102a 0, #050713 28%, #02030a 67%); }
.canvas-fallback::before, .canvas-fallback::after { content: ""; position: absolute; left: 50%; top: 50%; width: min(45vw, 42rem); aspect-ratio: 2.6; border: 1px solid rgba(157,120,255,.35); border-radius: 50%; transform: translate(-50%,-50%) rotate(-17deg) translateZ(0); filter: drop-shadow(0 0 20px rgba(108,75,212,.35)); }
.canvas-fallback::after { transform: translate(-50%,-50%) rotate(16deg) translateZ(0); border-color: rgba(90,232,255,.25); }
.canvas-fallback i { position: absolute; left: 50%; top: 50%; width: 13vw; min-width: 7rem; aspect-ratio: 1; border-radius: 50%; background: #000; transform: translate(-50%,-50%); box-shadow: 0 0 6rem rgba(116,82,255,.35); }
.space-grain { z-index: 8; pointer-events: none; opacity: .08; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.space-vignette { z-index: 7; pointer-events: none; background: radial-gradient(circle at center, transparent 34%, rgba(1,2,8,.2) 62%, rgba(1,2,8,.86) 120%), linear-gradient(to bottom, rgba(2,3,10,.18), transparent 20%, transparent 80%, rgba(2,3,10,.42)); }

.journey-intro { position: absolute; z-index: 12; right: var(--page-pad); top: 50%; display: flex; align-items: center; gap: .8rem; writing-mode: vertical-rl; color: #777989; font-size: .52rem; letter-spacing: .24em; }
.journey-intro i { width: 1px; height: 5rem; background: linear-gradient(var(--violet), transparent); }
.story { position: absolute; z-index: 10; inset: 0; margin: 0; padding: 0; list-style: none; }
.story-moment { position: absolute; inset: 0; padding: 7rem var(--page-pad) 5.5rem; display: grid; align-items: center; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(1.8rem); transition: opacity .6s cubic-bezier(0.16,1,0.3,1), transform .75s cubic-bezier(0.16,1,0.3,1), visibility .6s; }
.story-moment.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.story-copy { width: min(36rem, 78vw); }
.story-copy--right { justify-self: end; text-align: right; }
.story-copy--hero { width: min(62rem, 85vw); align-self: end; padding-bottom: clamp(1.5rem, 6vh, 5rem); }
.story-copy--wide { width: min(46rem, 86vw); }
.story-copy--download { width: min(66rem, 92vw); justify-self: center; text-align: center; }
.kicker { margin: 0 0 1.1rem; display: flex; align-items: center; gap: .9rem; color: #b9b8c5; font-size: .62rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.story-copy--right .kicker, .story-copy--download .kicker { justify-content: flex-end; }
.story-copy--download .kicker { justify-content: center; }
.kicker span { color: var(--cyan); }
h1, h2 { margin: 0; text-wrap: balance; font-weight: 660; letter-spacing: -.065em; line-height: .88; }
h1 { max-width: 10ch; font-size: clamp(4rem, 9.3vw, 10rem); }
h2 { font-size: clamp(3.4rem, 7.2vw, 8rem); }
.story-copy > p:not(.kicker) { margin: 1.7rem 0 0; color: var(--muted); font-size: clamp(.95rem, 1.25vw, 1.18rem); line-height: 1.7; }
.lead { max-width: 38rem; }
.story-copy--right > p:not(.kicker) { margin-left: auto; }
.story-copy--download > p:not(.kicker) { max-width: 44rem; margin-left: auto; margin-right: auto; }
.story-copy code { display: inline-block; margin-top: 1.4rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: .72rem 1rem; border: 1px solid rgba(90,232,255,.24); border-radius: 8px; background: rgba(4,8,18,.62); color: #a8f4ff; font: 600 clamp(.66rem,1vw,.82rem)/1.2 "Cascadia Code", Consolas, monospace; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 0 rgba(255,255,255,.08), 0 4px 16px rgba(0,0,0,.35); }
.scroll-cue { margin-top: 2rem; display: inline-flex; align-items: center; gap: 1rem; color: #d2d0d9; font-size: .63rem; letter-spacing: .17em; text-transform: uppercase; }
.scroll-cue i { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid var(--edge); border-radius: 50%; color: var(--cyan); font-style: normal; box-shadow: inset 0 1px 0 0 rgba(255,255,255,.1), 0 0 12px rgba(90,232,255,.12); animation: cue 1.8s infinite; }
@keyframes cue { 50% { transform: translateY(.35rem); border-color: rgba(90,232,255,.55); box-shadow: 0 0 18px rgba(90,232,255,.3); } }

.download-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; text-align: left; }
.download-card { position: relative; min-height: 9.5rem; padding: 1.4rem; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--edge); border-radius: 14px; background: rgba(5,6,15,.62); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.45), inset 0 1px 0 0 rgba(255,255,255,.08); transition: transform .35s cubic-bezier(0.16,1,0.3,1), border-color .35s cubic-bezier(0.16,1,0.3,1), box-shadow .35s cubic-bezier(0.16,1,0.3,1), background .35s ease; }
.download-card::before { content: ""; position: absolute; inset: auto -20% -90% 40%; height: 180%; background: radial-gradient(circle, rgba(157,120,255,.22), transparent 65%); transition: transform .45s cubic-bezier(0.16,1,0.3,1); pointer-events: none; }
.download-card.is-primary::before { background: radial-gradient(circle, rgba(90,232,255,.25), transparent 65%); }
.download-card:hover, .download-card:focus-visible { transform: translateY(-4px); border-color: rgba(90,232,255,.45); background: rgba(9,11,26,.85); box-shadow: 0 16px 44px rgba(0,0,0,.6), 0 0 24px rgba(90,232,255,.15), inset 0 1px 0 0 rgba(255,255,255,.2); }
.download-card:hover::before { transform: translate(-10%,-10%); }
.download-card span, .download-card small { color: #8d8e9c; font-size: .57rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.download-card strong { margin: .5rem 0 .3rem; font-size: clamp(1.3rem,2vw,2rem); letter-spacing: -.04em; }
.download-card i { position: absolute; right: 1.2rem; top: 1rem; color: var(--cyan); font-size: 1.4rem; font-style: normal; transition: transform .3s cubic-bezier(0.16,1,0.3,1); }
.download-card:hover i { transform: translate(2px, 2px); }
.return-origin { margin: 1.2rem auto 0; padding: .6rem 1rem; border: 1px solid transparent; border-radius: 999px; background: transparent; display: flex; align-items: center; gap: .8rem; cursor: pointer; color: #cac9d3; font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transition: border-color .3s, background .3s, color .3s; }
.return-origin:hover, .return-origin:focus-visible { border-color: var(--edge); background: rgba(255,255,255,.05); color: white; }
.return-origin i { width: 1.7rem; height: 1.7rem; border: 1px solid rgba(157,120,255,.5); border-radius: 50%; box-shadow: inset 0 0 12px rgba(157,120,255,.25); }
.return-origin b { color: var(--violet); }

.journey-ui { position: absolute; z-index: 15; left: var(--page-pad); right: var(--page-pad); bottom: 1.7rem; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1.2rem; color: #626473; font-size: .5rem; letter-spacing: .18em; }
.journey-meter { height: 2px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.journey-meter i { display: block; width: 0; height: 2px; border-radius: 999px; background: linear-gradient(90deg,var(--violet),var(--cyan),var(--acid)); box-shadow: 0 0 10px var(--cyan); }
.journey-ui span { color: #d3d2db; font: 600 .62rem "Cascadia Code", monospace; }
.journey-ui b { font-weight: 600; }

.site-footer { min-height: 7rem; padding: 0 var(--page-pad); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; border-top: 1px solid var(--edge); color: #6f7180; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; }
.site-footer p { margin: 0; text-align: center; }
.site-footer b { justify-self: end; font-weight: 600; }
.site-footer i { font-style: normal; }
.no-script { min-height: 100vh; padding: 8rem var(--page-pad); display: grid; align-content: center; gap: 1rem; }
.no-script a { text-decoration: underline; }

body.is-returning::after { content: ""; position: fixed; z-index: 99; inset: 0; pointer-events: none; background: white; animation: return-flash 1.1s forwards; }
@keyframes return-flash { from { opacity: .8; } to { opacity: 0; } }

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; height: 5rem; }
  .header-status { display: none; }
  .brand small { display: none; }
  .header-download { padding: .55rem .75rem; }
  .cosmic-journey { height: 760svh; }
  .story-moment { padding-top: 6rem; padding-bottom: 5rem; align-items: end; }
  .story-copy, .story-copy--hero, .story-copy--wide, .story-copy--download { width: 100%; text-align: left; justify-self: stretch; }
  .story-copy--hero { align-self: end; padding-bottom: 1.5rem; }
  h1 { font-size: clamp(3.5rem, 17vw, 6rem); }
  h2 { font-size: clamp(3rem, 14vw, 5.2rem); }
  .story-copy--right .kicker, .story-copy--download .kicker { justify-content: flex-start; }
  .download-grid { grid-template-columns: 1fr; }
  .download-card { min-height: 7rem; }
  .journey-intro, .journey-ui b { display: none; }
  .journey-ui { grid-template-columns: 1fr auto; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .cosmic-journey { height: auto; }
  .cosmic-stage { position: relative; height: auto; min-height: 100vh; overflow: hidden; }
  .journey-canvas { position: fixed; opacity: .35; }
  .story { position: relative; }
  .story-moment { position: relative; min-height: 90svh; opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .journey-ui, .journey-intro { display: none; }
}
