/* ══════════════════════════════════════════════════════════
   SPEED OF LIGHT OPPORTUNITY FUND
   Brand palette (from "Speed of Light Brand 2" sheet artwork):
     green #01DE82 · ice #BDE5EE · navy #090E49
   NOTE: the sheet's printed labels #CEF664/#4001F6 don't occur
   anywhere in the artwork's vector fills — the fills above do,
   and the navy label matches its swatch, so the fills win.
   Brand type is Degular Display / Degular Mono (Adobe Fonts);
   Hanken Grotesk + DM Mono are the closest Google stand-ins.
   ══════════════════════════════════════════════════════════ */

:root {
  /* brand */
  --green:      #01de82;
  --ice:        #bde5ee;
  --navy:       #090e49;
  --green-deep: #0a7a4a;   /* darkened brand green for text on ice */

  /* surfaces */
  --ink:        #06081c;   /* near-black navy, the badge's dark field */
  --ink-2:      #0a0f2e;
  --paper:      #ffffff;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 72px);

  --display: "Hanken Grotesk", "Avenir Next", -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* overflow-x: clip, not hidden, and on html rather than body: `hidden`
   would make body a scroll container, which breaks window.scrollTo and
   viewport-relative position:sticky (the hero stage depends on it). */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

/* the nav is fixed, so anchor targets must reserve room for it or the
   first heading lands underneath the bar */
:target, #mission, #velocity, #connect { scroll-margin-top: 104px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
}

img, svg { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* grain overlay — matches the brand badge's noisy gradient texture */
.hero__grain, .velocity__grain, .cta__grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='2.4' intercept='-.45'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
.velocity__grain { opacity: .3; }

/* ─────────────────────────  NAV  ───────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 18px var(--pad);
  transition: background .35s ease, backdrop-filter .35s ease, padding .35s ease;
}
.nav.is-stuck {
  /* high alpha on purpose: the nav crosses both dark and ice sections
     and must stay legible over both */
  background: rgba(6, 8, 28, .93);
  backdrop-filter: blur(14px) saturate(140%);
  padding-block: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* horizontal main lockup per brand sheet 1.1:
   mark · wordmark · two-line mono sublabel at right */
.nav__logo {
  display: flex; align-items: center; gap: 12px;
  color: var(--paper); text-decoration: none; margin-right: auto;
}
.nav__mark { width: 30px; height: 32px; flex: none; color: var(--green); }
.nav__word {
  font-family: var(--display); font-weight: 800; font-size: 22px;
  letter-spacing: -.015em; line-height: 1;
}
.nav__sub {
  font-family: var(--mono); font-weight: 500;
  font-size: 8.5px; letter-spacing: .28em; text-transform: uppercase;
  line-height: 1.55; opacity: .92; margin-left: 2px;
  align-self: center;
}

.nav__links { display: flex; gap: 30px; }
.nav__links a {
  color: var(--paper); text-decoration: none; font-size: 16px; font-weight: 600;
  opacity: .92; transition: opacity .2s, color .2s;
}
.nav__links a:hover { color: var(--green); opacity: 1; }

/* ─────────────────────────  CHIP BUTTON  ───────────────────────── */
.chip {
  display: inline-block;
  background: var(--green); color: var(--navy);
  font-family: var(--mono); font-weight: 500; font-size: 13.5px;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 13px 26px; border: 2px solid var(--green);
  transition: transform .18s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px -8px var(--green);
}
.chip--nav { flex: none; padding: 11px 22px; font-size: 12.5px; }
.chip--lg { padding: 17px 34px; font-size: 14.5px; }
.chip--ghost {
  background: transparent; color: var(--paper);
  border-color: rgba(255,255,255,.4);
}
.chip--ghost:hover { border-color: var(--paper); box-shadow: none; }

/* ─────────────────────────  HERO  ─────────────────────────
   Brand "gradient badge" treatment: near-black field, green glow
   in the top-left, ice glow in the bottom-right, grain over it. */
/* isolation:isolate is load-bearing — .hero__grain uses mix-blend-mode,
   and without a stacking context here its blend group escapes to the
   root and suppresses painting of later siblings (main, .velocity, …). */
.hero {
  position: relative; height: 240vh;
  background: var(--ink);
  isolation: isolate;
}

.hero__grad {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(60% 55% at 4% 0%, rgba(1,222,130,.75) 0%, rgba(1,222,130,.22) 38%, transparent 68%),
    radial-gradient(50% 45% at 100% 100%, rgba(189,229,238,.5) 0%, rgba(189,229,238,.12) 45%, transparent 72%),
    radial-gradient(70% 60% at 55% 55%, rgba(9,14,73,.55) 0%, transparent 75%),
    linear-gradient(158deg, #071018 0%, var(--ink) 48%, #080c33 100%);
}

.hero__stage {
  position: sticky; top: 0; height: 100vh; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(2vh, 4vh, 6vh);
  padding-inline: clamp(16px, 4vw, 60px);
}
.hero__title { margin: 0; display: contents; }
.hero__line {
  display: block; text-align: center;
  font-family: var(--display); font-weight: 800;
  /* Hanken is wider than the old condensed face — sized so the longer
     line clears the viewport edges at every width */
  font-size: clamp(1.55rem, 5.6vw, 5.6rem);
  line-height: 1.02; letter-spacing: -.025em;
  text-transform: uppercase;
  text-wrap: balance;
  will-change: transform, opacity;
}
.hero__line--a { color: #fff; text-shadow: 0 6px 60px rgba(0,0,0,.45); }
.hero__line--b { color: var(--green); text-shadow: 0 6px 60px rgba(0,0,0,.5); }

.hero__scroll {
  position: sticky; bottom: 0; left: 0; right: 0; z-index: 4;
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding-bottom: 34px;
  pointer-events: none;
}
.hero__scroll span {
  font-family: var(--mono); font-size: 11px; letter-spacing: .34em;
  color: rgba(255,255,255,.85);
}
.hero__scroll i {
  display: block; width: 1px; height: 44px; margin-top: 10px;
  background: linear-gradient(rgba(1,222,130,.9), rgba(1,222,130,0));
  animation: drip 2.1s ease-in-out infinite;
}
@keyframes drip { 0%,100% { transform: scaleY(.3); opacity: .4 } 50% { transform: scaleY(1); opacity: 1 } }

/* ─────────────────────────  PILLARS  ───────────────────────── */
main { position: relative; z-index: 5; background: var(--ink); }

.pillar { padding: clamp(80px, 12vh, 150px) 0; position: relative; }
.pillar + .pillar { border-top: 1px solid rgba(255,255,255,.07); }

.pillar[data-accent="green"] { --hue: var(--green); }
.pillar[data-accent="ice"]   { --hue: var(--ice); }
.pillar[data-accent="duo"]   { --hue: var(--green); }

.pillar__head {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
  text-align: center; margin-bottom: clamp(44px, 7vh, 80px);
}
.eyebrow {
  display: inline-block; margin: 0 0 18px;
  font-family: var(--mono); font-size: clamp(10px, 1.3vw, 13px);
  font-weight: 500; letter-spacing: .24em; text-transform: uppercase;
  color: var(--paper);
  border: 1.5px solid rgba(255,255,255,.5); padding: 6px 14px;
}
.pillar__word {
  margin: 0; color: var(--hue);
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 10.5vw, 9.5rem);
  line-height: .95; letter-spacing: -.03em; text-transform: uppercase;
}
/* the third pillar gets the brand's green→ice duo as gradient text */
.pillar[data-accent="duo"] .pillar__word {
  background: linear-gradient(96deg, var(--green) 15%, var(--ice) 85%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.pillar__body {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.pillar__body--flip .viz { order: 2; }

.pillar__copy h3 {
  margin: 0 0 22px;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.3rem, 2.5vw, 2.1rem);
  line-height: 1.12; letter-spacing: -.015em; text-transform: uppercase;
}
.pillar__copy p { margin: 0 0 20px; color: rgba(255,255,255,.82); max-width: 54ch; }

.source {
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255,255,255,.45); margin-bottom: 26px !important;
  line-height: 1.7;
}
.source em { font-style: italic; }
.source--center { text-align: center; margin-top: 46px; }

.pillar .chip { border-color: var(--hue); background: var(--hue); color: var(--navy); }
.pillar .chip:hover { box-shadow: 0 8px 26px -8px var(--hue); }

/* ── abstract "light" visuals in place of stock photography ──
   Perf contract for this block:
   • every animated layer animates ONLY transform/opacity and is
     promoted with will-change, so filters rasterize once;
   • animations are paused until the panel is on screen (.is-live),
     added by the IntersectionObserver in main.js. Simultaneous
     gradient animations will stall the renderer otherwise. */
.viz {
  margin: 0; aspect-ratio: 4 / 3; position: relative;
  overflow: hidden; background: var(--ink-2);
  border: 1px solid rgba(255,255,255,.09);
  contain: paint;
}
.viz span, .viz .prism::after, .viz .gridviz::after {
  animation-play-state: paused;
}
.viz.is-live span,
.viz.is-live .prism::after,
.viz.is-live .gridviz::after {
  animation-play-state: running;
}

/* 01 — beam / fibre bundle */
.viz--beam { background: radial-gradient(120% 100% at 0% 50%, #0b1c2a, #060a14 70%); }
.viz--beam span {
  position: absolute; left: -10%; width: 120%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--ice) 18%, #fff 50%, var(--green) 82%, transparent);
  animation: beam 3.4s cubic-bezier(.5,0,.5,1) infinite;
  will-change: transform, opacity;
}
.viz--beam span:nth-child(1) { top: 24%; animation-delay: 0s;   opacity: .9 }
.viz--beam span:nth-child(2) { top: 38%; animation-delay: .45s; opacity: .6 }
.viz--beam span:nth-child(3) { top: 50%; animation-delay: .9s;  height: 3px }
.viz--beam span:nth-child(4) { top: 63%; animation-delay: 1.35s; opacity: .6 }
.viz--beam span:nth-child(5) { top: 77%; animation-delay: 1.8s; opacity: .85 }
@keyframes beam {
  0%   { transform: translateX(-100%) scaleX(.4); opacity: 0 }
  35%  { opacity: 1 }
  100% { transform: translateX(100%) scaleX(1); opacity: 0 }
}

/* 02 — prism refraction */
.viz--prism { background: linear-gradient(160deg, #0a1526, #060a14); }
.prism { position: absolute; inset: 0; }
.prism::before {
  content: ""; position: absolute; top: 50%; left: 8%;
  width: 44%; height: 3px; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, #fff);
  box-shadow: 0 0 24px 4px rgba(255,255,255,.5);
}
.prism::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 52%; height: 78%; transform: translateY(-50%);
  /* Origin is the left-middle of this box (the prism vertex); 0deg points
     up, so the wedge must straddle 90deg to fan out to the right. */
  background: conic-gradient(from 66deg at 0% 50%,
    transparent 0deg,
    var(--green) 5deg, #6ee9b4 11deg, #ffffff 17deg,
    var(--ice) 24deg, #6fbfd8 31deg, var(--green-deep) 38deg,
    transparent 44deg);
  filter: blur(6px); opacity: .95;
  transform-origin: 0% 50%;
  animation: fan 7s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes fan {
  from { transform: translateY(-50%) rotate(-3deg) }
  to   { transform: translateY(-50%) rotate(3deg) }
}

/* 03 — distributed grid */
.viz--grid { background: #060a14; }
.gridviz { position: absolute; inset: -1px; }
.gridviz::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(1,222,130,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,222,130,.15) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(520px) rotateX(52deg) scale(1.7);
  transform-origin: 50% 100%;
}
.gridviz::after {
  content: ""; position: absolute; inset: 0;
  /* keep nodes below the grid's horizon (~55%) so they read as sitting
     on the plane rather than floating above it */
  background:
    radial-gradient(circle 4px at 47% 58%, var(--green), transparent),
    radial-gradient(circle 5px at 68% 63%, var(--ice), transparent),
    radial-gradient(circle 6px at 27% 69%, var(--green), transparent),
    radial-gradient(circle 8px at 55% 77%, #fff, transparent),
    radial-gradient(circle 6px at 81% 84%, var(--ice), transparent),
    radial-gradient(circle 9px at 34% 91%, var(--green), transparent);
  filter: blur(1px) drop-shadow(0 0 10px rgba(1,222,130,.6));
  animation: twinkle 4.5s ease-in-out infinite alternate;
  will-change: opacity;
}
@keyframes twinkle { from { opacity: .55 } to { opacity: 1 } }

/* ─────────────────────────  VELOCITY COUNTER  ─────────────────────────
   The brand's ice blue as a full light section — navy text on #BDE5EE. */
.velocity {
  position: relative; z-index: 5;
  padding: clamp(80px, 13vh, 160px) 0;
  background:
    radial-gradient(90% 70% at 85% 100%, rgba(255,255,255,.55) 0%, transparent 60%),
    radial-gradient(70% 55% at 8% 0%, rgba(1,222,130,.28) 0%, transparent 55%),
    var(--ice);
  color: var(--navy);
  text-align: center; overflow: hidden;
}
.velocity__lede {
  margin: 0 auto clamp(34px, 6vh, 60px); max-width: 24ch;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.4rem, 3.6vw, 3rem);
  line-height: 1.06; letter-spacing: -.02em; text-transform: uppercase;
}
.tick {
  font-family: var(--mono); font-weight: 500;
  color: var(--green-deep); font-variant-numeric: tabular-nums;
}

.velocity__big { margin-bottom: clamp(30px, 5vh, 54px); }
.velocity__big .odometer {
  display: block;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(2.3rem, 9vw, 7.5rem); line-height: 1;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.velocity__unit {
  display: block; margin-top: 12px;
  font-family: var(--mono); font-size: clamp(11px, 1.6vw, 15px);
  letter-spacing: .42em; color: rgba(9,14,73,.62);
}

.velocity__tag {
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(12px, 1.7vw, 17px);
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--green-deep); margin: 0;
}

.velocity .source { color: rgba(9,14,73,.5); }

/* ─────────────────────────  CTA  ─────────────────────────
   Gradient badge again, mirrored: green glow anchors the headline. */
.cta {
  position: relative; z-index: 5; overflow: hidden;
  padding: clamp(90px, 16vh, 190px) 0;
  text-align: center;
  background: var(--ink);
  isolation: isolate;
}
.cta__grad {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(55% 70% at 12% 8%, rgba(1,222,130,.65) 0%, rgba(1,222,130,.16) 42%, transparent 70%),
    radial-gradient(45% 55% at 96% 96%, rgba(189,229,238,.42) 0%, transparent 65%),
    linear-gradient(150deg, #081018 0%, var(--ink) 55%, #080c33 100%);
  animation: shift 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes shift { from { transform: translate3d(-2%, -1%, 0) scale(1.06) } to { transform: translate3d(2%, 1%, 0) scale(1.12) } }

.cta__inner { position: relative; z-index: 3; }
.cta__title {
  margin: 0 auto 20px; max-width: 22ch;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.7rem, 5.4vw, 4.6rem);
  line-height: 1.06; letter-spacing: -.025em; text-transform: uppercase;
  text-shadow: 0 6px 44px rgba(0,0,0,.4);
}
/* inline-block so the highlight box is bounded by its own line box —
   as a plain inline it overflows upward and covers the line above */
.cta__title span {
  display: inline-block;
  color: var(--navy); background: var(--green);
  line-height: .98; padding: .02em .12em;
  text-shadow: none;
}
.cta__inner > p {
  margin: 0 auto 34px; max-width: 54ch; font-size: 18px;
  color: rgba(255,255,255,.95); text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.cta__row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── contact form ── */
.form { max-width: 860px; margin-inline: auto; }
.form__row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 22px; text-align: left;
}
.form__field span {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255,255,255,.85);
}
.form__field input {
  width: 100%; padding: 13px 14px;
  font-family: var(--body); font-size: 16px; color: #fff;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.28); border-radius: 0;
  transition: border-color .2s ease, background .2s ease;
}
.form__field input::placeholder { color: rgba(255,255,255,.38); }
.form__field input:focus {
  outline: none; border-color: var(--green);
  background: rgba(255,255,255,.11);
}
.form__field input.is-invalid { border-color: #ff7a7a; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status {
  min-height: 1.4em; margin: 16px 0 0;
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em;
  color: var(--green);
}
.form__status.is-error { color: #ff9d9d; }
.form__status a { color: inherit; }

@media (max-width: 720px) {
  .form__row { grid-template-columns: 1fr; }
}

/* ─────────────────────────  FOOTER  ───────────────────────── */
.foot { position: relative; z-index: 5; background: #04061a; padding: 56px 0 34px; }
.foot__inner {
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.1);
}
/* horizontal lockup per brand sheet 1.1, mirroring the header */
.foot__brand {
  display: flex; align-items: center;
  gap: 12px; margin-right: auto;
}
.foot__mark { width: 32px; height: 34px; flex: none; }
.foot__name {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: 22px; letter-spacing: -.015em; line-height: 1;
}
.foot__sub {
  margin: 0 0 0 2px; font-family: var(--mono); font-weight: 500;
  font-size: 8.5px; letter-spacing: .28em; text-transform: uppercase;
  line-height: 1.55; opacity: .92; align-self: center;
}
.foot__links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot__links a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 15px; }
.foot__links a:hover { color: var(--green); }

.foot__legal { padding-top: 24px; }
.foot__legal p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.42); max-width: 90ch; }
.foot__copy { color: rgba(255,255,255,.32) !important; }

/* ─────────────────────────  REVEALS  ───────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }

/* ─────────────────────────  RESPONSIVE  ───────────────────────── */
@media (max-width: 900px) {
  .pillar__body, .pillar__body--flip { grid-template-columns: 1fr; }
  .pillar__body--flip .viz { order: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { gap: 14px; padding: 12px var(--pad); }
  .nav__links { display: none; }
  .nav__word { font-size: 18px; }
  .nav__sub { display: none; }
  .nav__mark { width: 24px; height: 26px; }
  .chip--nav { padding: 9px 15px; font-size: 11px; }
  :target, #mission, #velocity, #connect { scroll-margin-top: 76px; }
  .hero { height: 190vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
