:root {
  --bg: #07070c;
  --ink: #f4f1ea;
  --muted: #a3a1b4;
  --faint: rgba(244, 241, 234, 0.08);
  --line: rgba(244, 241, 234, 0.12);
  --violet: #8b5cf6;
  --violet-soft: #a78bfa;
  --amber: #f5b94a;
  --radius: 18px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* ---------- Sky: aurora, grid, grain ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
}

.aurora--violet {
  top: -38vmax;
  left: -18vmax;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.55), rgba(139, 92, 246, 0) 70%);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.aurora--amber {
  bottom: -46vmax;
  right: -22vmax;
  background: radial-gradient(closest-side, rgba(245, 185, 74, 0.32), rgba(245, 185, 74, 0) 70%);
  animation: drift-b 26s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate(14vmax, 10vmax) scale(1.12);
  }
}

@keyframes drift-b {
  to {
    transform: translate(-12vmax, -8vmax) scale(1.08);
  }
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.5;
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 4px 14px rgba(139, 92, 246, 0.45));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(245, 185, 74, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(245, 185, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 185, 74, 0);
  }
}

/* ---------- Hype counter ---------- */

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hype {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.hype[hidden] {
  display: none;
}

.hype:hover:not(:disabled),
.hype:focus-visible {
  border-color: rgba(245, 185, 74, 0.6);
  background: rgba(245, 185, 74, 0.08);
  outline: none;
}

.hype:active:not(:disabled) {
  transform: scale(0.96);
}

.hype:disabled {
  cursor: default;
}

.hype.done {
  border-color: rgba(245, 185, 74, 0.45);
  background: rgba(245, 185, 74, 0.1);
}

.hype-fire {
  font-size: 15px;
  line-height: 1;
  filter: grayscale(0.6);
  transition: filter 0.2s ease;
}

.hype:hover .hype-fire,
.hype.done .hype-fire {
  filter: none;
}

.hype.pop .hype-fire {
  animation: hype-pop 0.5s ease-out;
}

@keyframes hype-pop {
  40% {
    transform: scale(1.45) rotate(-8deg);
  }
  100% {
    transform: scale(1);
  }
}

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

.hero {
  flex: 1;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) 0 32px;
  text-align: center;
}

h1 {
  margin: 0 auto;
  max-width: 14ch;
  font-size: clamp(42px, 8.4vw, 104px);
  line-height: 0.98;
  font-weight: 750;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.shine {
  background: linear-gradient(100deg, var(--violet-soft) 0%, #f0abfc 35%, var(--amber) 65%, var(--violet-soft) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 7s linear infinite;
}

@keyframes shine {
  to {
    background-position: -220% 0;
  }
}

.lede {
  max-width: 62ch;
  margin: 26px auto 0;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Stage: cards + timeline ---------- */

.stage {
  position: relative;
  max-width: 980px;
  margin: clamp(40px, 7vh, 72px) auto 0;
  padding: 0 4px;
}

.cards {
  position: relative;
  height: clamp(230px, 34vw, 360px);
}

.card {
  --x: 50%;
  position: absolute;
  bottom: 18px;
  left: var(--x);
  width: clamp(92px, 19%, 176px);
  margin: 0;
  transform: translateX(-50%);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card[data-seg="0"] {
  --x: 17%;
}
.card[data-seg="1"] {
  --x: 51%;
}
.card[data-seg="2"] {
  --x: 83%;
}

/* Connector from card to its moment on the timeline */
.card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 1px;
  height: 18px;
  background: linear-gradient(var(--violet-soft), transparent);
}

.js .card {
  opacity: 0;
  transform: translate(-50%, 26px) scale(0.92);
}

.js .card.on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4),
    0 18px 50px -18px rgba(139, 92, 246, 0.55);
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.75) 100%);
}

.screen--a {
  background: radial-gradient(circle at 30% 30%, #6d4bd8 0%, transparent 55%),
    radial-gradient(circle at 75% 70%, #f59e0b 0%, transparent 55%), #1a1530;
}

.screen--b {
  background: radial-gradient(circle at 70% 25%, #ec4899 0%, transparent 50%),
    radial-gradient(circle at 25% 75%, #7c3aed 0%, transparent 55%), #1d1226;
}

.screen--c {
  background: radial-gradient(circle at 40% 25%, #f5b94a 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, #6366f1 0%, transparent 55%), #171628;
}

.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.caption {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 12%;
  z-index: 1;
  margin: 0;
  font-size: clamp(11px, 1.55vw, 17px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.w {
  display: inline-block;
  transition: color 0.15s ease, transform 0.15s ease;
}

.w.hot {
  color: var(--amber);
  transform: scale(1.08);
}

.meta {
  margin: 8px 0 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.timeline {
  position: relative;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.bars {
  position: absolute;
  inset: 10px 10px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.bars i {
  flex: 1;
  min-width: 1px;
  border-radius: 2px;
  background: rgba(244, 241, 234, 0.22);
}

/* Without JS, a calm static track */
html:not(.js) .bars {
  background: repeating-linear-gradient(90deg, rgba(244, 241, 234, 0.2) 0 2px, transparent 2px 5px);
  height: 30%;
  top: 35%;
  border-radius: 2px;
}

.seg {
  --from: 0%;
  --to: 0%;
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: var(--from);
  width: calc(var(--to) - var(--from));
  border-radius: 9px;
  border: 1px solid rgba(167, 139, 250, 0.55);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), rgba(245, 185, 74, 0.18));
  transition: box-shadow 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}

.seg[data-seg="0"] {
  --from: 13%;
  --to: 21%;
}
.seg[data-seg="1"] {
  --from: 46%;
  --to: 56%;
}
.seg[data-seg="2"] {
  --from: 80%;
  --to: 86%;
}

.js .seg {
  border-color: rgba(167, 139, 250, 0.25);
  background: rgba(139, 92, 246, 0.08);
}

.js .seg.on {
  border-color: rgba(245, 185, 74, 0.9);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.42), rgba(245, 185, 74, 0.3));
  box-shadow: 0 0 28px rgba(245, 185, 74, 0.35), inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--ink);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
  opacity: 0;
}

.js .playhead {
  opacity: 1;
}

.playhead::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -5px;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}

.ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(163, 161, 180, 0.7);
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: clamp(36px, 6vh, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
  color: var(--ink);
}

.ic {
  font-size: 11px;
  color: var(--amber);
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.foot a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot a:hover,
.foot a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Legal page ---------- */

.legal {
  flex: 1;
  width: min(760px, 100% - 32px);
  margin: 0 auto;
  padding: clamp(24px, 6vh, 64px) 0 48px;
}

.legal h1 {
  max-width: none;
  margin: 0 0 28px;
  font-size: clamp(34px, 5vw, 52px);
  text-align: left;
}

.panel {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(12, 12, 20, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.panel h2 {
  margin: 28px 0 8px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
}

.panel h2:first-child {
  margin-top: 0;
}

.panel p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.panel p + p {
  margin-top: 10px;
}

.panel a {
  color: var(--ink);
}

/* ---------- Desktop: the whole page fits the screen, no scroll ---------- */

@media (min-width: 900px) and (min-height: 560px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .top {
    padding: 2.4vh 0;
  }

  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 1vh 0 2vh;
  }

  h1 {
    max-width: none;
    font-size: min(7.4vw, 10vh, 112px);
  }

  .lede {
    margin-top: 2.2vh;
    font-size: min(1.6vw, 2.2vh, 19px);
  }

  .stage {
    width: 100%;
    margin-top: 4vh;
  }

  .cards {
    height: min(34vh, 380px);
  }

  .card {
    width: auto;
    height: calc(100% - 18px);
    bottom: 18px;
  }

  .screen {
    height: calc(100% - 26px);
    width: auto;
  }

  .timeline {
    height: min(64px, 7vh);
  }

  .ticks {
    margin-top: 1vh;
  }

  .chips {
    margin-top: 3.4vh;
  }

  .chips li {
    padding: min(10px, 1.1vh) 16px;
  }

  .foot {
    padding: 1.8vh 0 2.2vh;
  }

  .caption {
    font-size: min(1.55vw, 1.9vh, 17px);
  }
}

/* Short laptop screens: a little tighter */
@media (min-width: 900px) and (min-height: 560px) and (max-height: 760px) {
  .chips li:nth-child(3) {
    display: none;
  }

  .stage {
    margin-top: 3vh;
  }
}

/* The legal page keeps normal scrolling */
@media (min-width: 900px) and (min-height: 560px) {
  body:has(.legal) {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .pill {
    padding: 6px 11px;
    font-size: 11px;
  }

  .top-right {
    gap: 6px;
  }

  .hype {
    padding: 5px 10px 5px 8px;
    font-size: 12px;
  }

  .cards {
    height: 56vw;
  }

  .card {
    width: 26%;
  }

  .tag {
    top: 6px;
    left: 6px;
    padding: 3px 6px;
  }

  .ticks span:nth-child(2),
  .ticks span:nth-child(4) {
    display: none;
  }

  .foot {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Reduced motion: everything shown, nothing moves ---------- */

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .dot,
  .shine,
  .hype.pop .hype-fire {
    animation: none;
  }

  .hype {
    transition: none;
  }

  .js .card,
  .js .card.on {
    opacity: 1;
    transform: translateX(-50%);
    transition: none;
  }

  .js .playhead {
    opacity: 0;
  }
}
