:root {
  --void: #020308;
  --ink: #e9ecf6;
  --dim: rgba(233, 236, 246, 0.56);
  --faint: rgba(233, 236, 246, 0.32);
  --blue: #3f66fe;
  --blue-soft: #8ea6ff;
  --paper: #f3f2f0;
  --char: #343434;
  --glass: rgba(14, 18, 34, 0.42);
  --line: rgba(233, 236, 246, 0.14);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 3vw, 40px);
}

* { box-sizing: border-box; }
html { background: var(--void); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-gated { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }

#world {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100lvh;
  display: block; z-index: 0;
}
.whiteout {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 62%, #ffffff 0%, var(--paper) 55%);
  opacity: 0;
}

/* ---------- ribbon (unofficial) ---------- */
.ribbon {
  position: fixed; z-index: 60; left: 50%; bottom: 14px; transform: translateX(-50%);
  font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); text-decoration: none;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px;
  background: rgba(2, 3, 8, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.ribbon:hover { color: var(--ink); }
body.on-light .ribbon { color: #6b6b6b; background: rgba(243, 242, 240, 0.8); border-color: rgba(0,0,0,.1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border-radius: 99px; border: 0;
  font: 400 16px/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), background .3s, color .3s, opacity .3s, box-shadow .4s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: default; opacity: .55; transform: none; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 0 0 0 rgba(63,102,254,.0); }
.btn-blue:not(:disabled):hover { box-shadow: 0 10px 40px -8px rgba(63,102,254,.7); }
.btn-ghost { background: transparent; color: var(--dim); }
.btn-ghost:not(:disabled):hover { color: var(--ink); }
.btn-white { background: #fff; color: #111; }
.btn-line { background: #fff; color: #111; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; text-align: center;
  background: radial-gradient(60% 50% at 50% 50%, #070a18 0%, var(--void) 70%);
  transition: opacity 0.9s ease, visibility 0.9s;
  padding: 24px;
}
.gate.is-out { opacity: 0; visibility: hidden; }
.gate-in { display: grid; justify-items: center; gap: 18px; max-width: 820px; }
.gate-mark { width: 54px; height: 44px; overflow: visible; margin-bottom: 8px; }
.gate-mark path {
  fill: transparent; stroke: var(--blue-soft); stroke-width: .35;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.1s cubic-bezier(.6,0,.2,1) .05s forwards, fillin .6s ease .95s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill: #fff; stroke: transparent; } }
.gate-kicker { color: var(--faint); margin: 0; }
.gate-title {
  margin: 0; font-weight: 300; letter-spacing: -0.045em; line-height: .95;
  font-size: clamp(48px, 9vw, 104px);
  background: linear-gradient(180deg, #fff 30%, #9fb2ff 120%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gate-hint { color: var(--faint); margin: 18px 0 0; }
.gate-bar { width: 160px; height: 1px; background: var(--line); margin-top: 18px; overflow: hidden; }
.gate-bar i { display: block; height: 100%; width: 0; background: var(--blue-soft); transition: width .4s ease; }

/* ---------- header ---------- */
.top {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  pointer-events: none;
  transition: color .6s;
}
.top > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 21px; letter-spacing: -0.03em; }
.brand svg { width: 26px; height: 22px; fill: currentColor; }
.top-r { display: flex; align-items: center; gap: 10px; }
body.on-light .top { color: var(--char); }
body.on-light 
/* ---------- chapter index ---------- */
.chapters {
  position: fixed; z-index: 40; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: grid; gap: 12px; justify-items: end;
  transition: opacity .6s;
}
.chapters button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 400 12px/1 var(--sans); color: var(--faint); letter-spacing: 0;
  display: flex; gap: 8px; align-items: baseline;
  transition: color .4s;
}
.chapters button .mono { font-size: 9px; }
.chapters button.on { color: var(--ink); }
.chapters button:hover { color: var(--ink); }
.ch-line { position: absolute; right: -12px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ch-line b { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--blue-soft); }
body.on-light .chapters { opacity: 0; pointer-events: none; }

.readout {
  position: fixed; z-index: 40; left: var(--gutter); bottom: 18px;
  display: grid; gap: 4px; color: var(--faint); font-size: 10px;
}
.readout b { font-weight: 400; color: var(--ink); font-size: 12px; letter-spacing: .06em; }
body.on-light .readout { opacity: 0; }

/* ---------- scroll copy ---------- */
.stage { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.blk {
  position: absolute; left: 50%; top: 50%;
  width: min(1100px, calc(100vw - 2 * var(--gutter)));
  transform: translate(-50%, calc(-50% + var(--dy, 0px)));
  filter: blur(var(--bl, 0px));
  text-align: center;
  opacity: 0; visibility: hidden;
  will-change: opacity, transform, filter;
}
.blk-hero { top: 71%; }
.blk-top { top: 15vh; transform: translate(-50%, var(--dy, 0px)); }
.blk-low { top: auto; bottom: 13vh; transform: translate(-50%, var(--dy, 0px)); }
.blk-side { left: var(--gutter); transform: translate(0, calc(-50% + var(--dy, 0px))); text-align: left; width: min(440px, calc(100vw - 2 * var(--gutter))); top: 58%; }
.kicker { color: var(--blue-soft); margin: 0 0 18px; }
.display {
  margin: 0; font-weight: 300; letter-spacing: -0.04em; line-height: 1.02;
  font-size: clamp(36px, 6.2vw, 84px);
  text-shadow: 0 0 40px rgba(63, 102, 254, 0.35);
}
.display.sm { font-size: clamp(28px, 4vw, 54px); line-height: 1.06; }
.lede { margin: 22px auto 0; max-width: 640px; color: var(--dim); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; letter-spacing: -0.01em; }
.blk-side .lede { margin-left: 0; }
.lede b { color: var(--ink); font-weight: 500; }
.cue { color: var(--faint); margin-top: 34px; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; }
.cue i { width: 1px; height: 40px; background: linear-gradient(var(--blue-soft), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.blk-drop { top: 50%; }
.first {
  margin: 0; font-weight: 300; letter-spacing: -0.07em; line-height: .8;
  font-size: clamp(120px, 24vw, 340px);
  background: linear-gradient(180deg, #ffffff 35%, #7f9aff 110%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 60px rgba(63,102,254,.55));
}
.press { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; align-items: center; color: var(--faint); }
.press img { filter: brightness(0) invert(1); opacity: .55; width: auto; }
.press-word { font: 600 15px/1 Georgia, "Times New Roman", serif; color: rgba(255,255,255,.55); letter-spacing: -.01em; }

.blk-mission .display { margin: 6px 0; }
.blk-mission em { font-style: normal; color: #fff; background: rgba(63,102,254,.28); box-shadow: inset 0 0 0 1px rgba(142,166,255,.45); padding: 0 .18em; border-radius: 6px; }
.idx { font-size: 12px; color: var(--blue-soft); vertical-align: middle; margin-right: 8px; letter-spacing: .1em; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.step {
  padding: 20px 20px 18px; border-radius: 16px; display: grid; gap: 12px; align-content: start;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.step span { color: var(--blue-soft); font-size: 10px; }
.step b { font-weight: 400; font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; }
.step i { font-style: normal; color: var(--faint); font-size: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips span {
  padding: 10px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 15px;
}

/* ---------- question cards ---------- */
.cards { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
.card {
  position: absolute; left: 0; top: 0; width: 340px;
  border-radius: 18px; overflow: hidden;
  background: var(--glass); border: 1px solid rgba(233,236,246,.16);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 60px -20px rgba(63,102,254,.35);
  opacity: 0; visibility: hidden; transform-origin: 50% 50%;
  will-change: transform, opacity;
}
.card-img { height: 150px; background-size: cover; background-position: center; filter: saturate(.75) contrast(1.05); position: relative; }
.card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8,10,22,.85)); }
.card-b { padding: 4px 18px 16px; display: grid; gap: 12px; }
.chip { justify-self: start; font-size: 9px; padding: 5px 8px; border-radius: 99px; background: rgba(63,102,254,.22); color: #c9d4ff; }
.card h3 { margin: 0; font-weight: 400; font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; }
.fc { display: grid; gap: 8px; }
.fc-bar { height: 6px; border-radius: 6px; background: rgba(233,236,246,.12); overflow: hidden; }
.fc-bar i { display: block; height: 100%; width: calc(var(--y) * 100% * var(--k, 0)); background: linear-gradient(90deg, #8ea6ff, var(--blue)); box-shadow: 0 0 14px rgba(63,102,254,.9); border-radius: 6px; }
.fc-l { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; }
.fc-l b { color: var(--ink); font-weight: 500; }
.dist { display: flex; align-items: flex-end; gap: 4px; height: 46px; }
.dist i { flex: 1; height: calc(var(--h) * 100% * var(--k, 0)); min-height: 2px; background: linear-gradient(180deg, #8ea6ff, rgba(63,102,254,.4)); border-radius: 3px 3px 0 0; }
.illus { margin: 0; color: var(--faint); font-size: 9px; }

/* ---------- 3D-anchored tags ---------- */
.tags { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.tag {
  position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap;
  font: 400 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  will-change: transform, opacity;
}
.tag-rank { transform-origin: 0 50%; display: flex; align-items: center; gap: 8px; }
.tag-rank::after { content: ""; width: 34vw; height: 1px; background: linear-gradient(90deg, rgba(233,236,246,.18), transparent); }
.tag-me { color: #c9d4ff; display: flex; align-items: center; gap: 8px; }
.tag-me i { width: 24px; height: 1px; background: #8ea6ff; }
.tag-me b { color: #fff; font-weight: 500; }
.tag-city { color: rgba(233,236,246,.72); padding-left: 10px; border-left: 1px solid rgba(142,166,255,.6); }

/* ---------- track + light world ---------- */
main { position: relative; z-index: 20; }
.track { height: 1250vh; pointer-events: none; }
.light {
  position: relative; background: var(--paper); color: var(--char);
  padding: 22vh var(--gutter) 90px;
  display: grid; justify-items: center; gap: 90px;
}
.light-hero { text-align: center; display: grid; justify-items: center; gap: 22px; }
.light-mark { width: 64px; height: 53px; fill: var(--char); }
.light-hero h2 { margin: 0; font-weight: 400; letter-spacing: -0.045em; line-height: .98; font-size: clamp(54px, 9vw, 120px); }
.light-hero p { margin: 0; font-size: 19px; color: #6b6b6b; }
.light-cta { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.product { margin: 0; width: min(1080px, 100%); }

.founders { width: min(1080px, 100%); display: grid; gap: 44px; }
.founders-head { display: grid; gap: 16px; max-width: 760px; }
.kicker-dark { margin: 0; color: var(--blue); }
.founders-head h3 { margin: 0; font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-size: clamp(40px, 5.6vw, 72px); }
.founders-head p:last-child { margin: 0; color: #6b6b6b; font-size: 18px; line-height: 1.55; max-width: 620px; }
.founders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.founder { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 40px 80px -50px rgba(0,0,0,.35); display: grid; grid-template-rows: auto 1fr; }
.founder-img { aspect-ratio: 4 / 3.2; overflow: hidden; background: #262626; }
.founder-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; filter: saturate(.92); transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.founder:hover .founder-img img { transform: scale(1.035); }
.founder-b { padding: 24px 26px 26px; display: grid; gap: 12px; align-content: start; }
.founder-b .mono { margin: 0; color: var(--blue); }
.founder-b h4 { margin: 0; font-weight: 400; font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.035em; line-height: 1; }
.founder-b > p:not(.mono) { margin: 0; color: #5d5d5d; font-size: 16px; line-height: 1.6; }
.creds { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.creds li { font-size: 13px; padding: 7px 12px; border-radius: 99px; background: var(--paper); color: var(--char); }
.office { margin: 0; position: relative; border-radius: 22px; overflow: hidden; }
.office img { display: block; width: 100%; height: clamp(260px, 42vw, 520px); object-fit: cover; object-position: 50% 45%; }
.office figcaption { position: absolute; left: 18px; bottom: 16px; color: #fff; font-size: 10px; padding: 7px 11px; border-radius: 99px; background: rgba(20,20,20,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.xp { display: grid; gap: 22px; justify-items: center; text-align: center; }
.xp > .mono { margin: 0; color: #8a8780; }
.xp-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px 44px; }
.xp-logos img { height: 26px; width: auto; max-width: 140px; object-fit: contain; filter: grayscale(1) brightness(.25); opacity: .7; }
.product-chrome { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #e8e6e2; border-radius: 14px 14px 0 0; }
.product-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #cfccc6; }
.product-chrome span { margin-left: 10px; color: #8a8780; font-size: 10px; }
.product video { display: block; width: 100%; aspect-ratio: 1200 / 704; background: #fff; border-radius: 0 0 14px 14px; box-shadow: 0 40px 80px -40px rgba(0,0,0,.25); }
.product figcaption { margin-top: 14px; color: #8a8780; font-size: 10px; text-align: center; }
.facts { width: min(1080px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(0,0,0,.12); }
.facts div { padding: 26px 22px 0 0; display: grid; gap: 10px; }
.facts b { font-weight: 400; font-size: clamp(36px, 4.4vw, 56px); letter-spacing: -0.04em; line-height: 1; }
.facts div:first-child b { color: var(--blue); }
.facts span { color: #6b6b6b; font-size: 15px; line-height: 1.4; max-width: 280px; }
.backers { margin: 0; max-width: 760px; text-align: center; color: #6b6b6b; font-size: 17px; line-height: 1.55; }
.credits { width: min(1080px, 100%); border-top: 1px solid rgba(0,0,0,.12); padding-top: 24px; display: grid; gap: 10px; color: #8a8780; font-size: 13px; line-height: 1.55; padding-bottom: 40px; }
.credits p { margin: 0; }
.credits b { color: var(--char); font-weight: 500; }
.fallback { display: none; }
.no-webgl #world, .no-webgl .stage, .no-webgl .cards, .no-webgl .tags, .no-webgl .chapters, .no-webgl .readout, .no-webgl .whiteout, .no-webgl .track { display: none; }
.no-webgl .top { position: absolute; }
.no-webgl .fallback { display: grid; position: relative; z-index: 20; min-height: 100vh; place-items: end start; overflow: hidden; }
.fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fallback::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,3,8,.2), rgba(2,3,8,.92)); }
.fallback-in { position: relative; z-index: 1; padding: 0 var(--gutter) 14vh; max-width: 720px; display: grid; gap: 16px; }
.fallback-in .mono { color: var(--blue-soft); margin: 0; }
.fallback-in h1 { margin: 0; font-weight: 300; letter-spacing: -0.045em; line-height: .98; font-size: clamp(44px, 8vw, 96px); }
.fallback-in p:last-child { margin: 0; color: var(--dim); font-size: 17px; line-height: 1.55; }
.nojs { position: fixed; inset: auto 0 40% 0; text-align: center; z-index: 99; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .chapters { display: none; }
  .readout { bottom: 52px; }
  .card { width: 270px; }
  .card-img { height: 110px; }
  .card h3 { font-size: 15px; }
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .step { padding: 14px 16px; gap: 6px; }
  .step b { font-size: 15px; }
  .blk-low { bottom: 11vh; }
  .blk-side { top: 70%; }
  .facts { grid-template-columns: 1fr; gap: 26px; }
  .founders-grid { grid-template-columns: 1fr; }
  .xp-logos { gap: 18px 28px; }
  .xp-logos img { height: 20px; }
  .tag-rank::after { width: 18vw; }
  .tag-city { font-size: 9px; }
  .brand span { display: none; }
    }

body.clean .stage, body.clean .cards, body.clean .tags, body.clean .top, body.clean .chapters, body.clean .readout, body.clean .ribbon { display: none; }
/* portfolio recording only (?debug=rec): the card caption covers the bottom third */
body.rec .stage { inset: -18vh 0 18vh 0; }
body.rec .blk-hero, body.rec .readout, body.rec .chapters { display: none; }

@media (prefers-reduced-motion: reduce) {
  .gate-mark path { animation-duration: .01s; animation-delay: 0s; }
  .cue i { animation: none; }
}
