/* Fanout waiting page. Tokens from the brand kit (tokens.css); light theme only. */

/* Fonts are self-hosted (SIL Open Font License) so no visitor data goes to a font CDN. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-700-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
}
:root {
  --ink: #1b1b2f;
  --cream: #fff6ea;
  --cobalt: #3355ff;
  --cobalt-600: #2a49e6;
  --mint: #c9f2dc;
  --surface: #ffffff;
  --line: #e8dfd0;
  --muted: #6b645a;
  --success: #12805c;
  --danger: #c8321e;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* One soft overshoot for the fan-out landing, nothing bounces twice. */
  --ease-land: cubic-bezier(0.34, 1.3, 0.64, 1);
  color-scheme: light;
}

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

html,
body {
  margin: 0;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo-link img {
  display: block;
  height: 28px;
  width: auto;
}
.link {
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: color 150ms var(--ease-out);
}
.link:hover {
  color: var(--cobalt);
}

/* Hero */
.hero {
  flex: 1;
  display: grid;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 72px;
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 40px;
    padding-top: 24px;
    padding-bottom: 96px;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--mint);
  font-size: 14px;
  font-weight: 700;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 2s var(--ease-out) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.accent {
  color: var(--cobalt);
}

.lede {
  margin: 24px 0 0;
  max-width: 34ch;
  font-size: clamp(18px, 2vw, 20px);
  color: var(--muted);
  text-wrap: pretty;
}

.actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  background: var(--cobalt);
  color: var(--cream);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    background-color 150ms var(--ease-out),
    transform 150ms var(--ease-out);
}
button.button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.button:hover {
  background: var(--cobalt-600);
}
.button:active {
  transform: scale(0.98);
}
.note {
  font-size: 14px;
  color: var(--muted);
}

/* Waitlist form */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.waitlist {
  margin-top: 32px;
  max-width: 480px;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.field-row input {
  flex: 1 1 220px;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  transition: border-color 150ms var(--ease-out);
}
.field-row input::placeholder {
  color: var(--muted);
}
.field-row input:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}
.field-row input[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-row .button {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.field-row .button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--cobalt);
}
.consent a,
.footer a,
.prose a {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 3px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.status {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.status.error {
  color: var(--danger);
}
.status.success {
  color: var(--success);
}
.waitlist.done .field-row,
.waitlist.done .consent {
  display: none;
}
.waitlist.done .status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--ink);
}
.waitlist.done .status::before {
  content: "✓";
  color: var(--success);
  font-weight: 800;
}

/* Privacy page */
.prose {
  max-width: 68ch;
  padding-top: 24px;
  padding-bottom: 72px;
}
.prose h1 {
  font-size: clamp(40px, 6vw, 56px);
}
.prose h2 {
  margin: 32px 0 8px;
  font-size: 18px;
  font-weight: 700;
}
.prose p,
.prose li {
  color: var(--muted);
}

/* Fan-out stage */
.stage-wrap {
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
}
.stage {
  position: relative;
  aspect-ratio: 1;
  container-type: inline-size;
}

.coin {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22cqw;
  height: 22cqw;
  border-radius: 50%;
  background: var(--cobalt);
  display: grid;
  place-items: center;
  z-index: 1;
}
.coin::after {
  /* Ring that ripples out when the coin releases the cards. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--cobalt);
  opacity: 0;
}
.coin img {
  width: 48%;
  height: auto;
}
.stage.pulse .coin {
  animation: coin-pulse 450ms var(--ease-out);
}
.stage.pulse .coin::after {
  animation: ripple 800ms var(--ease-out);
}
@keyframes coin-pulse {
  35% {
    transform: scale(1.07);
  }
  70% {
    transform: scale(0.97);
  }
}
@keyframes ripple {
  from {
    opacity: 0.3;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

.card {
  --x: calc(cos(var(--a) * 1deg) * 37cqw);
  --y: calc(sin(var(--a) * 1deg) * 38cqw);
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25cqw;
  padding: 1.6cqw 2.4cqw;
  translate: -50% -50%; /* centring; `transform` stays free for the animation */
  min-height: 11cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  opacity: 0;
  transform: translate(0, 0) scale(0.4);
  transition:
    transform 700ms var(--ease-land),
    opacity 180ms var(--ease-out),
    background-color 220ms var(--ease-out),
    border-color 220ms var(--ease-out);
  transition-delay: calc(var(--i) * 60ms);
}
.card b {
  font-size: clamp(10px, 2.5cqw, 13px);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card span {
  font-size: clamp(12px, 3.1cqw, 15px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card em {
  display: none;
  font-style: normal;
  font-size: clamp(10px, 2.5cqw, 13px);
  font-weight: 700;
  color: var(--success);
}
.card em::before {
  content: "✓ ";
}

.stage.out .card {
  opacity: 1;
  transform: translate(var(--x), var(--y)) scale(1);
}
.stage.out .card.claimed {
  background: var(--mint);
  border-color: var(--mint);
  animation: flip 360ms var(--ease-out);
}
.card.claimed b {
  display: none;
}
.card.claimed em {
  display: block;
}
@keyframes flip {
  from {
    transform: translate(var(--x), var(--y)) rotateX(80deg);
  }
  to {
    transform: translate(var(--x), var(--y)) rotateX(0);
  }
}
/* Reset: fade back into the coin quickly, no delay. */
.stage.resetting .card {
  transition:
    transform 450ms var(--ease-out),
    opacity 300ms var(--ease-out);
  transition-delay: 0ms;
}

/* How it works */
.points {
  display: grid;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 72px;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
.num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cobalt);
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
}
.points h2 {
  margin: 12px 0 4px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.points p {
  margin: 0;
  color: var(--muted);
  max-width: 36ch;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 32px;
  font-size: 14px;
  color: var(--muted);
}

/* Reduced motion: final state, no loop, no transitions. */
@media (prefers-reduced-motion: reduce) {
  .dot,
  .stage.pulse .coin,
  .stage.pulse .coin::after,
  .stage.out .card.claimed {
    animation: none;
  }
  .card {
    transition: none;
  }
}

@media (max-width: 480px) {
  .field-row .button {
    flex: 1 1 100%;
  }
}
