:root {
  --bg: #0a0a0c;
  --bg-alt: #0e0e11;
  --surface: #141418;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #ecebe7;
  --muted: #9a9aa2;
  --faint: #6b6b73;
  --accent: #f2b25c;
  --accent-ink: #1a1206;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: 12px; }

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

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand__mark { width: 22px; height: 22px; }
.brand__mark path { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; }
.brand__mark .brand__inner { fill: var(--accent); stroke: none; }

.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--text); }

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

.hero {
  position: relative;
  padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 9vw, 120px);
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto auto;
  width: min(900px, 110vw);
  height: 760px;
  background: radial-gradient(closest-side, rgba(242, 178, 92, 0.13), rgba(242, 178, 92, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; font-weight: 600; }

h1 {
  font-size: clamp(44px, 7.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
h1 em, .closing h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}
h1 em { color: #d9d7d0; }

.lede {
  margin: 28px 0 0;
  max-width: 32em;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 24px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: #fff; transform: translateY(-1px); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 178, 92, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% { box-shadow: 0 0 0 7px rgba(242, 178, 92, 0.04); }
}

.stage {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 540px;
  justify-self: center;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.readout {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 14px;
  white-space: nowrap;
}
.readout__swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  transition: background-color 0.6s ease;
}
.readout__label { font-weight: 600; min-width: 5.5em; }
.readout__time {
  color: var(--muted);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

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

.section {
  padding: clamp(72px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}
.section--alt { background: var(--bg-alt); }

h2 {
  max-width: 20em;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.steps {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.step {
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.step__num {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
}
.step p, .card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.cards {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
}
.card strong { color: var(--text); font-weight: 600; }

.specs {
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.specs > div {
  padding: 28px 20px 0 0;
}
.specs dt {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.specs dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.closing {
  padding: clamp(96px, 14vw, 180px) 0;
  border-top: 1px solid var(--line);
  text-align: center;
  background: radial-gradient(60% 80% at 50% 100%, rgba(242, 178, 92, 0.1), rgba(242, 178, 92, 0) 70%);
}
.closing h2 {
  max-width: none;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 1;
}
.closing p {
  margin: 24px auto 0;
  max-width: 30em;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 14px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer__muted { color: var(--faint); }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

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

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .stage { max-width: 440px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__links { gap: 18px; }
  .nav__links a { font-size: 14px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 380px) {
  .nav__links a[href="#details"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status__dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

.notfound { min-height: 100vh; display: grid; place-items: center; border: 0; }
