:root {
  --bg: #050505;
  --fg: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.6);
  --faint: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #a78bfa;
  --pad: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
a { color: inherit; }
main { flex: 1; display: flex; }

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

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
}
.top-row { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.brand img { width: 26px; height: 26px; }

/* Buttons: square, white, like the reference */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px;
  background: #fff; color: #000; border: 0; border-radius: 0;
  font: 500 14.5px/1 inherit; font-family: inherit;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.85); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.small { height: 36px; padding: 0 14px; font-size: 13.5px; }

/* Hero */
.hero {
  position: relative; isolation: isolate; flex: 1;
  display: flex; align-items: center;
  min-height: calc(100svh - 64px - 61px);
  padding: 56px 0;
  overflow: hidden;
}
.mosaic {
  position: absolute; inset: -8%;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  transform: rotate(-8deg);
  opacity: 0.55;
}
.mosaic .col { display: flex; flex-direction: column; gap: 6px; animation: drift 60s linear infinite; }
.mosaic .col:nth-child(even) { animation-direction: reverse; }
.mosaic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .mosaic .col { animation: none; } }

.shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 50%, rgba(5,5,5,0.95), rgba(5,5,5,0.8) 65%, rgba(5,5,5,0.55) 100%),
    linear-gradient(to top, var(--bg), transparent 30%),
    linear-gradient(to bottom, var(--bg), transparent 20%);
}
@media (min-width: 768px) {
  .shade {
    background:
      radial-gradient(ellipse 55% 55% at 50% 50%, rgba(5,5,5,0.96), rgba(5,5,5,0.82) 55%, rgba(5,5,5,0.35) 100%),
      linear-gradient(to top, var(--bg), transparent 30%),
      linear-gradient(to bottom, var(--bg), transparent 15%);
  }
}

.hero-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  font-size: 13px; color: rgba(255, 255, 255, 0.75);
}
.dot { width: 6px; height: 6px; background: var(--accent); }
h1 {
  margin: 28px 0 0;
  font-size: clamp(2.7rem, 7.6vw, 7.25rem);
  font-weight: 600; line-height: 0.92; letter-spacing: -0.055em;
}
.soft { color: var(--faint); }
.lead { margin: 28px 0 0; max-width: 40rem; font-size: clamp(16px, 1.3vw, 17.5px); line-height: 1.6; color: var(--muted); }

/* Form */
.join { margin-top: 36px; width: 100%; max-width: 520px; }
.join .row { display: flex; gap: 8px; }
.join input[type="email"] {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px;
  background: rgba(255, 255, 255, 0.04); color: var(--fg);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0;
  font: 15px/1 inherit; font-family: inherit; outline: none;
}
.join input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.35); }
.join input[type="email"]:focus { border-color: rgba(255, 255, 255, 0.45); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; justify-content: center; margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.5); text-align: left; cursor: pointer; }
.consent input { margin: 2px 0 0; accent-color: #fff; }
.consent a { color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.consent a:hover { color: #fff; }
.msg { min-height: 1.5em; margin: 12px 0 0; font-size: 14px; }
.msg.ok { color: #86efac; }
.msg.err { color: #fca5a5; }
.join.done .row, .join.done .consent { display: none; }
.join.done .msg { font-size: 16px; }

.fine { margin: 20px 0 0; font-size: 13px; color: var(--faint); }

@media (max-width: 560px) {
  .join .row { flex-direction: column; }
  .join input[type="email"] { flex: none; width: 100%; }
  .join .btn { width: 100%; }
}

/* Footer */
.foot { border-top: 1px solid rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.45); font-size: 12.5px; }
.foot-row { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }

/* Privacy page */
.doc { max-width: 720px; padding-top: 64px; padding-bottom: 96px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-top: 0; }
.doc h2 { font-size: 18px; margin: 36px 0 8px; letter-spacing: -0.02em; }
.doc p, .doc li { color: var(--muted); line-height: 1.65; font-size: 15.5px; }

/* Countdown: split-flap cards, like a scoreboard flip chart */
.countdown {
  --w: clamp(30px, 8vw, 62px);
  --h: calc(var(--w) * 1.42);
  --card: #141416;
  --card-2: #0e0e10;
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(8px, 2.2vw, 22px);
  margin-top: 36px;
}
.cd-group { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cd-digits { display: flex; gap: clamp(3px, 0.6vw, 6px); }
.cd-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.cd-sep { align-self: flex-start; height: var(--h); display: flex; align-items: center; font-size: calc(var(--w) * 0.7); font-weight: 600; color: rgba(255,255,255,0.25); }

.flip {
  position: relative; width: var(--w); height: var(--h);
  perspective: calc(var(--h) * 4);
  font-weight: 600; font-size: calc(var(--w) * 1.12); letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; color: #f5f5f5;
  border-radius: 6px;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.06);
}
.flip .half, .flip .leaf {
  position: absolute; left: 0; right: 0; height: 50%;
  overflow: hidden; backface-visibility: hidden;
}
.flip .top, .flip .leaf.top { top: 0; background: var(--card); border-radius: 6px 6px 0 0; transform-origin: 50% 100%; }
.flip .bottom, .flip .leaf.bottom { bottom: 0; background: var(--card-2); border-radius: 0 0 6px 6px; transform-origin: 50% 0; }
.flip span { position: absolute; left: 0; right: 0; height: var(--h); line-height: var(--h); text-align: center; }
.flip .top span { top: 0; }
.flip .bottom span { bottom: 0; }
/* The hinge line across the middle */
.flip::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(0,0,0,0.85); box-shadow: 0 1px 0 rgba(255,255,255,0.05); z-index: 5;
}
.flip .leaf { z-index: 3; }
.flip .leaf.top { animation: flip-top 0.3s ease-in forwards; }
.flip .leaf.bottom { transform: rotateX(90deg); animation: flip-bottom 0.3s ease-out 0.3s forwards; }
/* A little shading while the leaf falls */
.flip .leaf.top::after, .flip .leaf.bottom::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0); animation: shade 0.3s ease-in forwards; }
@keyframes flip-top { to { transform: rotateX(-90deg); } }
@keyframes flip-bottom { to { transform: rotateX(0deg); } }
@keyframes shade { to { background: rgba(0,0,0,0.35); } }
@media (prefers-reduced-motion: reduce) { .flip .leaf { display: none; } }

.countdown.live { font-size: clamp(20px, 3vw, 28px); font-weight: 600; letter-spacing: -0.02em; }

/* Waitlist counter */
.joined { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.joined[hidden] { display: none; }
.joined strong { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,0.6); animation: pulse 2s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 8px rgba(74,222,128,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
