/* Asterline: black, blue-gray mist, glass, Satoshi for words and figures, Figtree for small labels. */
:root {
  --bg: #000000;
  --foot-end: #36434f;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.64);
  --ink-3: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.035);
  --blue: #3f74e8;
  --blue-soft: #addcff;
  --sans: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --label: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 8vw, 120px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Alex Brush"; src: url("/assets/fonts/alexbrush.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
/* The page still scrolls; the bar is hidden (Firefox, then WebKit and Blink). */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
/* Below the last pixel (Safari's toolbar inset, the bottom bounce) the page shows the footer's end color, not black;
   no bounce, so the top never shows it. */
html:has(.foot) { background: var(--foot-end); overscroll-behavior-y: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(63, 116, 232, 0.4); }

.eyebrow {
  font-family: var(--label);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
}
.dim { color: var(--ink-3); }

/* Text comes into focus as it enters the view. */
.reveal { opacity: 0; filter: blur(14px); transform: translateY(14px);
  transition: opacity 1.1s var(--ease), filter 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; filter: blur(0); transform: none; }

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px var(--gutter);
  padding-top: max(26px, env(safe-area-inset-top));
  pointer-events: none;
}
.bar::before {
  content: ""; position: absolute; inset: 0 0 -40px 0; z-index: -1;
  background: linear-gradient(rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.bar > * { pointer-events: auto; }
.mark { font-family: "Alex Brush", cursive; font-size: 34px; font-weight: 400; line-height: 1; letter-spacing: 0; }
.chip {
  font-family: var(--label); font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink-2);
  padding: 8px 14px; border-radius: 10px;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.chip { transition: color .2s ease, border-color .2s ease; }
.chip:hover, .chip:focus-visible { color: var(--ink); border-color: var(--ink-2); }

/* ---------- mist ---------- */
.mist {
  position: absolute; left: -10%; width: 120%; height: auto; max-width: none;
  pointer-events: none; user-select: none;
  will-change: transform;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 140px var(--gutter) 120px;
  overflow: hidden; isolation: isolate;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 55%, #000);
}
.hero .mist { bottom: -18%; z-index: -1; opacity: 0.95; }
.beam {
  position: absolute; top: -10%; left: 50%; width: 2px; height: 62%; z-index: -1;
  transform: translateX(-50%);
  background: linear-gradient(rgba(173, 220, 255, 0), rgba(173, 220, 255, 0.5) 55%, rgba(173, 220, 255, 0));
  filter: blur(1.5px);
  box-shadow: 0 0 40px 10px rgba(63, 116, 232, 0.18);
  opacity: 0.55;
}
.hero-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.wordmark {
  font-weight: 500;
  font-size: clamp(64px, 14vw, 210px);
  line-height: 0.95; letter-spacing: -0.05em;
  color: #d4d4d4;
  text-shadow: 0 0 60px rgba(173, 220, 255, 0.12);
}
.lede { margin-top: 26px; font-size: clamp(19px, 2.2vw, 26px); font-weight: 500; letter-spacing: -0.015em; color: var(--ink-2); }
.pill {
  margin-top: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 190px; padding: 16px 34px; border-radius: 999px;
  font-size: 19px; font-weight: 500; letter-spacing: -0.01em;
  background: #05060a;
  border: 1px solid rgba(63, 116, 232, 0.55);
  box-shadow: 0 0 0 4px rgba(63, 116, 232, 0.08), inset 0 0 18px rgba(63, 116, 232, 0.18), 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: border-color 0.3s, box-shadow 0.3s, opacity 1.1s var(--ease), filter 1.1s var(--ease), transform 1.1s var(--ease);
}
.pill:hover, .pill:focus-visible { border-color: rgba(173, 220, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(63, 116, 232, 0.14), inset 0 0 22px rgba(63, 116, 232, 0.28), 0 10px 40px rgba(0, 0, 0, 0.6); }
/* ---------- flower ---------- */
.bloom { position: relative; height: 340vh; }
.bloom-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* The top and bottom fade is drawn in the canvas (flower.js): a CSS mask on a canvas that redraws each frame is slow. */
.bloom canvas { width: 100%; height: 100%; display: block; }

/* ---------- about ---------- */
.about { padding: clamp(30px, 6vh, 80px) var(--gutter) clamp(60px, 10vh, 120px); }
.about > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.statement {
  font-size: clamp(30px, 4.4vw, 64px); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em;
  color: var(--ink); max-width: 1240px;
}
/* Words come into focus one after another as the sentence scrolls up (main.js). */
.statement .w { display: inline-block; white-space: pre; will-change: opacity, filter, transform; }

/* ---------- principles ---------- */
/* A sticky field of light (field.js); each principle's text crossfades beside its shape. */
.principles { position: relative; height: 350vh; }
.pr-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.pr-text { position: absolute; z-index: 1; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(40%, 540px); }
.pr-text::before { content: ""; position: absolute; z-index: -1; inset: -30% -40% -30% -60%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0)); }
.pr-list { list-style: none; display: grid; }
.pr { grid-area: 1 / 1; opacity: 0; will-change: opacity, filter, transform; }
.pr:first-child { opacity: 1; }
.pr h3 { font-size: clamp(40px, 5.4vw, 82px); font-weight: 500; line-height: 1; letter-spacing: -0.045em; }
.pr p { margin-top: 22px; max-width: 30ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.45; color: var(--ink-2); }

/* ---------- performance ---------- */
/* It slides up over the end of the principles' field, which has faded to black by then. */
.perf { position: relative; z-index: 1; margin-top: -30vh; padding: clamp(40px, 6vh, 80px) var(--gutter) clamp(90px, 14vh, 160px); }
.perf .sub { margin-top: 0; font-size: clamp(18px, 2vw, 24px); color: var(--ink); }
.board {
  max-width: 1240px; margin: clamp(36px, 6vh, 64px) auto 20px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px;
}
.lead, .tile { border: 1px solid var(--line); border-radius: 30px; background: var(--glass-2); }
.lead { padding: clamp(26px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 300px; }
.lead .k, .tile .k { font-size: clamp(14px, 1.2vw, 17px); color: var(--ink-2); }
.value {
  margin-top: 14px;
  font-weight: 500; font-size: clamp(54px, 7.4vw, 112px);
  line-height: 0.95; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums; color: #e4e4e4;
}
.tiles { display: grid; grid-template-rows: repeat(3, 1fr); gap: 20px; }
.tile { padding: 22px clamp(22px, 2.4vw, 32px); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.tile .n { font-size: clamp(28px, 3vw, 44px); font-weight: 500; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile .u { font-size: 0.5em; letter-spacing: 0; color: var(--ink-2); }
.tile .u[hidden] { display: none; }

/* ---------- chart ---------- */
.chart {
  max-width: 1240px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: 30px;
  background: var(--glass-2);
  padding: 28px clamp(16px, 2.6vw, 36px) 20px;
}
.chart figcaption { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.plot { position: relative; height: clamp(320px, 58vh, 620px); touch-action: pan-y; }
.plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.plot .grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; shape-rendering: crispEdges; }
.plot .base { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; stroke-dasharray: 3 5; shape-rendering: crispEdges; }
.plot .axis { font-family: var(--label); font-size: 12px; font-weight: 500; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.plot .line { fill: none; stroke: var(--blue-soft); stroke-width: 1.7; stroke-linejoin: round; }
.plot .cross { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; shape-rendering: crispEdges; }
.plot .empty { font-family: var(--label); font-size: 13px; fill: var(--ink-3); }
.tip {
  position: absolute; top: 0; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 13px; border-radius: 12px;
  background: rgba(12, 13, 16, 0.9); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  white-space: nowrap; transform: translateX(-50%);
}
.tip[hidden] { display: none; }
.tip b { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tip span { font-family: var(--label); font-size: 12px; color: var(--ink-3); }

/* ---------- contact ---------- */
.contact { padding: clamp(80px, 14vh, 160px) var(--gutter); text-align: center; }
.contact .eyebrow { margin-bottom: 22px; }
.mail {
  display: inline-block;
  font-weight: 700; font-size: clamp(26px, 5vw, 64px); letter-spacing: -0.03em;
  background-image: linear-gradient(var(--blue-soft), var(--blue-soft));
  background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.6s var(--ease), opacity 1.1s var(--ease), filter 1.1s var(--ease), transform 1.1s var(--ease);
  overflow-wrap: anywhere;
}
.mail:hover, .mail:focus-visible { background-size: 100% 2px; }

/* ---------- footer ---------- */
.foot { position: relative; overflow: hidden; isolation: isolate; padding: 40px var(--gutter) 0; border-top: 1px solid var(--line); }
.foot-row { display: flex; justify-content: flex-end; gap: 16px; font-size: 16px; font-weight: 500; color: #999; letter-spacing: -0.02em; }
.foot-row a:hover { color: var(--ink); }
.ghost {
  margin-top: clamp(30px, 6vw, 80px);
  font-weight: 800; font-size: clamp(90px, 23vw, 380px); line-height: 0.8; letter-spacing: -0.06em;
  text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, rgba(96, 112, 130, 0.75) 10%, rgba(30, 34, 40, 0.2) 75%, rgba(0, 0, 0, 0));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: clamp(30px, 6vw, 90px);
  user-select: none;
}
.foot .mist-foot { bottom: -30%; z-index: -1; opacity: 0.9; }
/* The mist ends in one flat color, the page's color below the footer: no edge where the document stops. */
.foot::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(54, 67, 79, 0), var(--foot-end));
}

:focus-visible { outline: 1px solid var(--blue-soft); outline-offset: 4px; border-radius: 6px; }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 28px; padding: 0 var(--gutter); }
.nf .eyebrow:hover { color: var(--ink); }

@media (max-width: 900px) {
  .principles { height: 335vh; }
  .pr-text { top: auto; bottom: max(10vh, 64px); right: var(--gutter); transform: none; width: auto; }
  .pr h3 { font-size: clamp(34px, 10vw, 52px); }
  .pr p { margin-top: 14px; }
  .board { grid-template-columns: 1fr; }
  .lead { min-height: 0; }
  .mist { left: -90%; width: 280%; }
  .hero .mist { bottom: -6%; }
  .foot .mist-foot { bottom: -12%; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; filter: none; transform: none; transition: none; }
  .mist { will-change: auto; }
}
