:root {
  --bg: #0a0a0b;
  --housing: #151518;
  --text: #f4f4f5;
  --dim: #9a9aa0;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-live: rgba(255, 255, 255, 0.16);
  --silver: #c9c9ce;
  --silver-edge: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  --beam: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.32) 50%, transparent 100%);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 24px;
  --measure: 680px;
  --wide: 1120px;
  --section: 140px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--silver); color: #0a0a0b; }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul, ol, figure { margin: 0; }
img { display: block; }

.col { width: 100%; max-width: var(--wide); margin-inline: auto; position: relative; }
.headline,
.lead,
.body,
.qualifier { max-width: var(--measure); }

/* ---------- Brand + nav ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: auto; opacity: 0.95; }
.wordmark { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.wordmark.small { font-size: 15px; color: var(--dim); }

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(10, 10, 11, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
  z-index: 10;
}

.nav-link,
.footer-link {
  font-size: 15px;
  color: var(--dim);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 150ms var(--ease);
}
.nav-link:hover,
.footer-link:hover { color: var(--text); }

/* ---------- Type: 13 · 15 · 18 · 22 · 28 · 36 · 48 · 56 · 72 ---------- */

.display {
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display .line { display: block; animation: settle 900ms var(--ease) both; }
.display .line:nth-child(2) { animation-delay: 90ms; color: var(--dim); }

.headline {
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 24px;
}

.lead {
  font-size: clamp(18px, 1.5vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--dim);
  margin-top: 28px;
  max-width: 520px;
}

.body { color: var(--dim); max-width: 480px; }
.body + .body { margin-top: 16px; }
.body.strong { color: var(--text); font-weight: 500; }
.qualifier { font-size: 13px; line-height: 1.45; color: var(--dim); margin-top: 16px; }

/* ---------- Shared surfaces ---------- */

section { position: relative; padding: var(--section) var(--gutter); }

.band { overflow: hidden; isolation: isolate; background: var(--bg); }

.beam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--beam);
  z-index: 1;
  pointer-events: none;
}

.field,
.hero-chrome {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  pointer-events: none;
}
.field canvas,
.hero-chrome canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1200ms var(--ease);
}
.field.is-live canvas,
.hero-chrome.is-live canvas { opacity: 1; }

.glass {
  position: relative;
  background: rgba(14, 14, 16, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--hairline-live);
  border-radius: 20px;
}
.glass::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--beam);
  pointer-events: none;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--dim);
}
.card-title { color: var(--text); font-weight: 500; }
.tag-short { display: none; }
.tag {
  white-space: nowrap;
  margin-left: auto;
  font-size: 13px;
  color: var(--dim);
  padding: 2px 10px;
  border: 1px solid var(--hairline-live);
  border-radius: 999px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 80px;
  align-items: center;
}
.split-top { align-items: start; }
.sticky { position: sticky; top: 120px; }

/* ---------- Liquid chrome button ---------- */

.btn-chrome {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #1f1f23;
  box-shadow: var(--silver-edge);
  transition: transform 90ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.btn-chrome:active { transform: scale(0.97); }

.btn-chrome-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px),
    var(--silver);
}
.btn-chrome-fx canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.btn-chrome-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--silver-edge);
  pointer-events: none;
}

.btn-chrome-label {
  position: relative;
  color: #0a0a0b;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(56px + 56px);
  padding-bottom: 88px;
  overflow: hidden;
  isolation: isolate;
}

.hero-chrome {
  z-index: -2;
  -webkit-mask-image: radial-gradient(75% 95% at 82% 42%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 78%);
  mask-image: radial-gradient(75% 95% at 82% 42%, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 78%);
}
.hero-chrome canvas { transition-duration: 1600ms; }

.hero-mark {
  position: absolute;
  z-index: -1;
  right: -8vw;
  top: 50%;
  width: min(62vw, 980px);
  aspect-ratio: 800 / 315;
  transform: translateY(-50%);
  background: #1a1a1d;
  -webkit-mask: url("/assets/mark-800.png") center / contain no-repeat;
  mask: url("/assets/mark-800.png") center / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}
.hero-mark canvas { width: 100%; height: 100%; display: block; }

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
}

.actions { margin-top: 40px; }

/* ---------- Live demo ---------- */

.demo { padding: 20px 22px 8px; }

.demo-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--silver);
  animation: pulse 2s ease-in-out infinite;
}

.demo-feed { list-style: none; padding: 0; position: relative; }
.demo-feed::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 26px;
  bottom: 28px;
  width: 1px;
  background: var(--hairline-live);
}

.demo-row {
  position: relative;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
}
.demo-row + .demo-row { border-top: 1px solid var(--hairline); }

.demo-node {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--silver);
  box-shadow: var(--silver-edge);
  position: relative;
  z-index: 1;
}
.demo-body { display: grid; gap: 4px; min-width: 0; }
.demo-title { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.demo-meta { font-size: 13px; color: var(--dim); }
.demo-time {
  font-size: 13px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 1px;
}
.demo-bubble {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: #1b1b1f;
  border: 1px solid var(--hairline);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 12px;
}

.demo.is-playing .demo-row {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms var(--ease), transform 700ms var(--ease);
}
.demo.is-playing .demo-row .demo-node {
  background: #2a2a2e;
  box-shadow: none;
  transition: background 500ms var(--ease) 150ms;
}
.demo.is-playing .demo-row.on { opacity: 1; transform: none; }
.demo.is-playing .demo-row.on .demo-node { background: var(--silver); box-shadow: var(--silver-edge); }
.demo.is-resetting .demo-row.on { opacity: 0; transition-duration: 400ms; }

/* ---------- Problem: temperature ---------- */

.field-problem {
  -webkit-mask-image: radial-gradient(85% 120% at 8% 70%, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 78%);
  mask-image: radial-gradient(85% 120% at 8% 70%, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 78%);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 80px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head .headline { margin-bottom: 0; }
.section-head > :last-child { justify-self: end; }

.temp { padding: 22px 28px 24px; }

.temp-chart {
  --pad: 88px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 400px;
  padding-top: var(--pad);
  border-bottom: 1px solid var(--hairline-live);
}

/* bar heights are the study's ratios at true scale: 1, 1/7, 1/60 */
.temp-col {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}
.temp-bar {
  position: relative;
  width: min(56%, 200px);
  height: max(var(--h), 4px);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  transform-origin: bottom;
  transition: transform 1100ms var(--ease);
}
.temp-value {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--h) + 16px);
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  transition: opacity 700ms var(--ease);
}
.temp-num {
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.temp-unit { font-size: 13px; color: var(--dim); }

.temp-hot .temp-bar { background: #e4e4e7; }
.temp-warm .temp-bar { background: #5f5f65; }
.temp-warm .temp-num { color: #c2c2c7; }
.temp-cold .temp-bar { background: #2a2a2f; }
.temp-cold .temp-num { color: var(--dim); }

.temp-curve {
  position: absolute;
  left: 0;
  top: var(--pad);
  width: 100%;
  height: calc(100% - var(--pad));
  overflow: visible;
  pointer-events: none;
  z-index: 2;
  clip-path: inset(-4px 0 -4px 0);
  transition: clip-path 1500ms var(--ease) 1300ms;
}
.temp-curve path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.25;
  stroke-linecap: round;
}

.js .temp:not(.in) .temp-bar { transform: scaleY(0); }
.js .temp:not(.in) .temp-value { opacity: 0; }
.js .temp:not(.in) .temp-curve { clip-path: inset(-4px 100% -4px 0); }
.temp-hot .temp-bar { transition-delay: 200ms; }
.temp-warm .temp-bar { transition-delay: 650ms; }
.temp-cold .temp-bar { transition-delay: 1000ms; }
.temp-hot .temp-value { transition-delay: 700ms; }
.temp-warm .temp-value { transition-delay: 1150ms; }
.temp-cold .temp-value { transition-delay: 1500ms; }

.temp-axis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  text-align: center;
}
.temp-axis > div { display: grid; gap: 4px; }
.temp-stage { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.temp-time { font-size: 13px; color: var(--dim); }

.temp-source {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
}
.temp-source a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms var(--ease);
}
.temp-source a:hover { text-decoration-color: var(--text); }

/* ---------- Flow ---------- */

.field-flow {
  -webkit-mask-image: radial-gradient(70% 70% at 50% 78%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 85%);
  mask-image: radial-gradient(70% 70% at 50% 78%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 85%);
}

.instrument { padding: 44px 40px 40px; }

.rail {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  position: relative;
  overflow: hidden;
}
.rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 1px;
  background: var(--hairline-live);
  transform-origin: left;
  transition: transform 1400ms var(--ease);
}
.rail::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 18%;
  height: 1px;
  background: var(--beam);
  animation: travel 4s linear infinite;
}
.js .instrument:not(.in) .rail::before { transform: scaleX(0); }

.rail li { position: relative; padding-top: 32px; padding-right: 16px; }
.node {
  position: absolute;
  top: 0;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--silver);
  box-shadow: var(--silver-edge);
  z-index: 1;
  transition: background 500ms var(--ease), box-shadow 500ms var(--ease);
  transition-delay: calc(var(--i, 0) * 180ms + 200ms);
}
.js .instrument:not(.in) .node { background: #2a2a2e; box-shadow: none; }

.step {
  display: block;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--text);
}
.sub { display: block; font-size: 13px; color: var(--dim); margin-top: 6px; }
.rail li:last-child .step { font-weight: 600; }

/* ---------- Included ---------- */

.field-included {
  -webkit-mask-image: radial-gradient(80% 110% at 22% 100%, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 78%);
  mask-image: radial-gradient(80% 110% at 22% 100%, #000 0%, rgba(0, 0, 0, 0.6) 40%, transparent 78%);
}

.features {
  list-style: none;
  padding: 8px 28px;
}
.features li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
}
.features li + li { border-top: 1px solid var(--hairline); }
.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #1a1a1e;
  border: 1px solid var(--hairline-live);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.features li > div { display: grid; gap: 3px; }
.feature-title { font-size: 18px; font-weight: 500; color: var(--text); letter-spacing: -0.015em; }
.feature-meta { font-size: 15px; color: var(--dim); line-height: 1.45; }

/* ---------- Close ---------- */

.field-close {
  -webkit-mask-image: radial-gradient(60% 75% at 72% 60%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 85%);
  mask-image: radial-gradient(60% 75% at 72% 60%, #000 0%, rgba(0, 0, 0, 0.45) 50%, transparent 85%);
}
.close-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: clamp(520px, 70vw, 1100px);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.035;
  pointer-events: none;
}
.close-inner { z-index: 1; }
.close .body { max-width: 560px; }
.close .btn-chrome { margin-top: 44px; }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--hairline);
}

/* ---------- Reveals ---------- */

.js [data-reveal] {
  transition: opacity 800ms var(--ease), transform 900ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(16px); }

/* ---------- Motion ---------- */

@keyframes settle { from { transform: translateY(14px); } to { transform: translateY(0); } }
@keyframes travel { from { left: -18%; } to { left: 100%; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .display .line, .demo-pulse, .rail::after { animation: none; }
  .rail::after { display: none; }
  .temp-bar, .temp-value, .temp-curve { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 56px; max-width: 680px; }
  .hero { min-height: auto; padding-top: calc(56px + 88px); }
  .hero-chrome {
    -webkit-mask-image: radial-gradient(120% 60% at 70% 80%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%);
    mask-image: radial-gradient(120% 60% at 70% 80%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%);
  }
  .hero-mark { top: 18%; right: -30vw; width: 110vw; transform: none; opacity: 0.16; }

  .split { grid-template-columns: 1fr; gap: 48px; }
  .split > * { max-width: 680px; }
  .sticky { position: static; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section-head > :last-child { justify-self: start; }
  .field-problem { -webkit-mask-image: radial-gradient(110% 55% at 20% 85%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%); mask-image: radial-gradient(110% 55% at 20% 85%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%); }
  .field-included { -webkit-mask-image: radial-gradient(110% 55% at 30% 95%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%); mask-image: radial-gradient(110% 55% at 30% 95%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%); }
}

@media (max-width: 900px) {
  .rail { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .rail::before, .rail::after { display: none; }
  .rail li::before {
    content: "";
    position: absolute;
    left: 0;
    right: 16px;
    top: 6px;
    height: 1px;
    background: var(--hairline-live);
  }
}

@media (max-width: 640px) {
  :root { --section: 88px; }
  .hero { padding-top: calc(56px + 48px); padding-bottom: 64px; }
  .display { font-size: clamp(40px, 11.5vw, 56px); }
  .headline { font-size: 32px; }
  .lead { font-size: 18px; margin-top: 24px; }
  .actions { margin-top: 32px; }
  .btn-chrome { width: 100%; }

  /* blur over a moving shader is the most expensive thing on a phone */
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 14, 16, 0.9); }

  .demo { padding: 16px 16px 4px; }
  .demo-row { gap: 12px; }
  .tag-long { display: none; }
  .tag-short { display: inline; }
  .temp { padding: 18px 16px 18px; }
  .temp-chart { --pad: 72px; height: 320px; }
  .temp-bar { width: 62%; }
  .temp-num { font-size: 28px; }
  .temp-stage { font-size: 15px; }
  .temp-time { font-size: 13px; padding-inline: 4px; }
  .instrument { padding: 24px 20px; }
  .rail { grid-template-columns: 1fr; row-gap: 0; }
  .rail li { padding: 16px 0 16px 30px; border-bottom: 1px solid var(--hairline); }
  .rail li:last-child { border-bottom: 0; }
  .rail li::before { display: none; }
  .node { top: 22px; }
  .features { padding: 4px 18px; }
  .features li { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
  .feature-icon { width: 40px; height: 40px; }
  .close-mark { width: 140vw; }
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}
