:root {
  color-scheme: dark;

  --bg: #0b0d0b;
  --bg-rgb: 11, 13, 11;
  --bg-2: #101310;
  --ink: #e9e8e0;
  --ink-2: #a3a69d;
  --ink-3: #6d7068;
  --rule: rgba(233, 232, 224, 0.12);
  --rule-strong: rgba(233, 232, 224, 0.5);
  --accent: #7d8bff;
  --accent-rgb: 125, 139, 255;

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  font: 500 14px/1 var(--mono);
  text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- header ---------- */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 22px var(--gutter);
}

.wordmark {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  text-decoration: none;
  line-height: 1;
}

.top-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  font: 400 13px/1 var(--mono);
}
.top-nav a {
  position: relative;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.3s;
}
.top-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.top-nav a:hover { color: var(--ink); }
.top-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.top-nav .top-launch { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-flow,
.hero-still,
.hero-gusts {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero-gusts { overflow: hidden; pointer-events: none; }

/* A gust is a short streak gliding along the local flow. The outer element
   holds the static position and angle; the inner one is the only thing that
   animates, and only its transform and opacity, so it never repaints. */
.gust {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: translate(var(--x), var(--y)) rotate(var(--a));
}
.gust i {
  position: absolute;
  left: 0;
  top: -0.5px;
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, rgba(var(--accent-rgb), 0), rgba(var(--accent-rgb), 0.95));
  opacity: 0;
  will-change: transform, opacity;
  animation: gust var(--d) linear var(--delay) infinite;
}
.gust i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

@keyframes gust {
  0%   { transform: translateX(-120px); opacity: 0; }
  8%   { opacity: 1; }
  52%  { opacity: 1; }
  60%  { transform: translateX(var(--len)); opacity: 0; }
  100% { transform: translateX(var(--len)); opacity: 0; }
}

.hero-fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(var(--bg-rgb), 0.86) 22%, rgba(var(--bg-rgb), 0) 58%),
    linear-gradient(to bottom, var(--bg) 0%, rgba(var(--bg-rgb), 0) 16%);
}

.hero-inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
  align-items: end;
  padding-top: 140px;
  padding-bottom: clamp(28px, 5vh, 56px);
  pointer-events: none;
}
.hero-inner > * { pointer-events: auto; }

.hero-title {
  grid-column: 1 / span 8;
  font-size: clamp(3.4rem, 9.4vw, 9.5rem);
  font-weight: 500;
  font-stretch: 104%;
  letter-spacing: -0.055em;
  line-height: 0.88;
  text-wrap: balance;
}

.js .hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.js .hero-title .w > span { display: inline-block; }

.hero-side {
  grid-column: 9 / span 4;
  display: grid;
  gap: 28px;
  padding-bottom: 0.4em;
}

.hero-intro {
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 36ch;
}

.hero-meta {
  display: grid;
  border-top: 1px solid var(--rule);
}
.hero-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font: 400 13px/1.3 var(--mono);
}
.hero-meta dt { color: var(--ink-3); }
.hero-meta dd { font-variant-numeric: tabular-nums; }

.hero-caption {
  display: flex;
  gap: 12px;
  padding-bottom: 22px;
  font: 400 12px/1.4 var(--mono);
  color: var(--ink-3);
}
.hero-caption span { color: var(--ink); white-space: nowrap; }

/* ---------- sections ---------- */

.section { padding-block: clamp(96px, 14vw, 200px) 0; }

.sec-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(48px, 7vw, 96px);
}

.sec-label {
  grid-column: 1 / span 3;
  font: 400 13px/1.4 var(--mono);
  color: var(--ink-3);
  padding-top: 0.5em;
}

.sec-title {
  grid-column: 4 / span 8;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.sec-lede {
  grid-column: 4 / span 5;
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 44ch;
  margin-top: 8px;
}

.note {
  margin-top: 20px;
  font: 400 12px/1.4 var(--mono);
  color: var(--ink-3);
}

/* ---------- channels ---------- */

.channels { border-bottom: 1px solid var(--rule); }

.channel {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}
.channel:first-child { border-top: 0; }

.ch-name { grid-column: 1 / span 5; display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.ch-name h3 {
  min-width: 7.2em;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ch-name p { font-size: 0.9375rem; color: var(--ink-3); }

.ch-value {
  grid-column: 6 / span 3;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 400;
  font-stretch: 90%;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ch-value small {
  font: 400 13px/1 var(--mono);
  letter-spacing: 0;
  color: var(--ink-3);
}

.ch-spark {
  position: relative;
  grid-column: 9 / span 4;
  height: 48px;
}
.ch-spark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ch-spark path {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  transition: stroke 0.4s;
}

/* The end dot pings once per reading (a one-shot WAAPI animation in JS). */
.ch-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--accent);
}
.ch-dot i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
}

@media (hover: hover) {
  .channel:hover .ch-spark path { stroke: var(--accent); }
}

/* ---------- how it works ---------- */

.flow { position: relative; }

.flow-track {
  position: absolute;
  top: 6px;
  left: 6px;
  right: calc((100% - 48px) / 3 - 6px);
  height: 1px;
}
.flow-line {
  position: absolute;
  inset: 0;
  background: var(--rule-strong);
  transform-origin: left;
}

/* The runner spans the whole track, so translating it by 100% of its own
   size moves the packet from the first node to the last. */
.flow-runner {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.flow.is-running .flow-runner { animation: run-x 4s linear infinite; }
.flow-packet {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.16), 0 0 18px rgba(var(--accent-rgb), 0.6);
}

@keyframes run-x {
  0%   { transform: translateX(0); opacity: 0; }
  5%   { transform: translateX(0); opacity: 1; }
  45%  { transform: translateX(50%); }
  85%  { transform: translateX(100%); opacity: 1; }
  92%  { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(100%); opacity: 0; }
}
@keyframes run-y {
  0%   { transform: translateY(0); opacity: 0; }
  5%   { transform: translateY(0); opacity: 1; }
  45%  { transform: translateY(50%); }
  85%  { transform: translateY(100%); opacity: 1; }
  92%  { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(100%); opacity: 0; }
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.flow-steps li { position: relative; padding-top: 44px; padding-right: 12%; }
.flow-node {
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  transition: background-color 0.35s, border-color 0.35s;
}
.flow-node.is-hit { background: var(--accent); border-color: var(--accent); }
.flow-node::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
}
/* Each node pings as the packet reaches it: 5%, 45% and 85% of the run. */
.flow.is-running .flow-node::after { animation: node-ping 4s linear infinite; }
.flow.is-running li:nth-child(2) .flow-node::after { animation-delay: 1.6s; }
.flow.is-running li:nth-child(3) .flow-node::after { animation-delay: 3.2s; }

@keyframes node-ping {
  0%, 4%  { transform: scale(1); opacity: 0; }
  5%      { transform: scale(1); opacity: 1; }
  30%     { transform: scale(3.2); opacity: 0; }
  100%    { transform: scale(3.2); opacity: 0; }
}

.flow-num {
  font: 400 13px/1 var(--mono);
  color: var(--ink-3);
  margin-bottom: 14px;
}
.flow-steps h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}
.flow-steps li > p:last-child { color: var(--ink-2); max-width: 32ch; }

/* ---------- network ---------- */

.network {
  margin-top: clamp(96px, 14vw, 200px);
  padding-block: clamp(80px, 10vw, 140px);
  background: var(--bg-2);
  border-block: 1px solid var(--rule);
}

.map-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1000 / 440;
}
.map-layer {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: 100%;
  transform: translateX(-50%);
}
.map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.map-pins { position: absolute; inset: 0; pointer-events: none; }
.pin {
  position: absolute;
  width: 0;
  height: 0;
}
.pin::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
}
.pin.on::before { animation: pin 3.2s var(--ease) var(--delay, 0s) infinite; }

@keyframes pin {
  0%   { transform: scale(0.6); opacity: 0.9; }
  75%  { transform: scale(5); opacity: 0; }
  100% { transform: scale(5); opacity: 0; }
}

.map-tip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: var(--ink);
  color: var(--bg);
  font: 400 12px/1.2 var(--mono);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 16px));
}
.map-tip strong { font-weight: 500; font-size: 13px; }

.map-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font: 400 12px/1.4 var(--mono);
  color: var(--ink-3);
}
.map-legend b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}

/* ---------- launch ---------- */

.launch .sec-title { grid-column: 4 / span 9; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}
.cd-unit { display: grid; gap: 12px; }
.cd-num {
  display: block;
  font-size: clamp(3.6rem, 15vw, 16rem);
  font-weight: 500;
  font-stretch: 72%;
  letter-spacing: -0.05em;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
  padding-right: 0.04em;
}
.cd-num .d { display: inline-block; }
.cd-label { font: 400 13px/1 var(--mono); color: var(--ink-3); }

/* A hairline that fills once per minute, synced to the clock in JS. */
.cd-progress {
  position: relative;
  height: 1px;
  background: var(--rule);
  overflow: hidden;
}
.cd-progress span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  animation: minute 60s linear var(--offset, 0s) infinite;
}

@keyframes minute {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.launch-live {
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.launch-date {
  margin-top: 20px;
  font: 400 13px/1.4 var(--mono);
  color: var(--ink-2);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: clamp(96px, 14vw, 200px);
  padding-block: 28px 32px;
  border-top: 1px solid var(--rule);
  font: 400 12px/1.4 var(--mono);
  color: var(--ink-3);
}
.foot .wordmark { font-size: 18px; color: var(--ink); }

/* ---------- motion ---------- */

.js [data-reveal],
.js [data-hero-fade],
.js .top { opacity: 0; }
.js .flow-line { transform: scaleX(0); }

/* Looping animations only run while their section is on screen. */
[data-anim]:not(.in-view) .gust i,
[data-anim]:not(.in-view) .flow-runner,
[data-anim]:not(.in-view) .flow-node::after,
[data-anim]:not(.in-view) .pin::before,
[data-anim]:not(.in-view) .cd-progress span { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal],
  .js [data-hero-fade],
  .js .top { opacity: 1; }
  .js .flow-line { transform: none; }
  .hero-gusts, .flow-runner { display: none; }
  .pin::before, .flow-node::after, .cd-progress span { animation: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-title { grid-column: 1 / -1; }
  .hero-side { grid-column: 1 / span 7; }
  .ch-name { grid-column: 1 / span 6; }
  .ch-value { grid-column: 7 / span 3; }
  .ch-spark { grid-column: 10 / span 3; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .top-nav a:not(.top-launch) { display: none; }

  .hero-inner { row-gap: 32px; padding-top: 110px; }
  .hero-side { grid-column: 1 / -1; }
  .hero-caption { padding-bottom: 18px; }

  .sec-head { row-gap: 14px; }
  .sec-label,
  .sec-title,
  .sec-lede,
  .launch .sec-title { grid-column: 1 / -1; }

  .channel { row-gap: 14px; padding: 22px 0; }
  .ch-name { grid-column: 1 / -1; gap: 4px 14px; }
  .ch-name h3 { min-width: 0; }
  .ch-value { grid-column: 1 / span 6; }
  .ch-spark { grid-column: 7 / span 6; height: 40px; }

  .flow-track {
    top: 0;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .flow-line { transform-origin: top; }
  .js .flow-line { transform: scaleY(0); }
  .flow.is-running .flow-runner { animation-name: run-y; }
  .flow-packet { left: -4px; top: -4px; }
  .flow-steps { grid-template-columns: 1fr; gap: 56px; }
  .flow-steps li { padding: 0 0 0 44px; }
  .flow-node { top: 2px; }

  .map-stage { aspect-ratio: 1000 / 704; }
  .map-layer { width: 160%; }

  .countdown { grid-template-columns: repeat(2, auto); row-gap: 36px; justify-content: start; column-gap: 12vw; }
  .cd-num { font-size: clamp(4.5rem, 26vw, 9rem); }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .js .flow-line { transform: none; }
}
