/* My Rivals waitlist. Tokens mirror the app's welcome screen (RadarColor / RadarFont). */
:root {
  --bg: #FAFAFA;            /* quizWelcomeBackground */
  --ink: #16171A;           /* ink */
  --primary: #111114;       /* primary (ink buttons) */
  --on-primary: #FFFFFF;
  --surface: #F3F3F3;
  --text-2: #464646;
  --text-3: #707070;
  --border: #DCDCDC;        /* borderVisible */
  --error: #C22A30;         /* errorText */
  --display: 'Playfair Display', Georgia, serif;   /* RadarFont.display */
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* the welcome still is wider than its canvas; the screen edge clips it, as in the app */
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
.pitch { max-width: 480px; }

.brand { font: 700 22px/1 var(--display); letter-spacing: -0.01em; }
.headline {
  margin-top: 56px;
  font: 700 clamp(40px, 5.6vw, 68px)/1.04 var(--display);
  letter-spacing: -0.02em;
}
.headline span { display: block; text-wrap: balance; }
.lede { margin-top: 16px; font-size: 19px; color: var(--text-2); }

/* Waitlist form: idle · .is-error · .is-done */
.waitlist { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.waitlist.is-error .form-msg { color: var(--error); }
.waitlist.is-done .field,
.waitlist.is-done .btn { display: none; }
.waitlist.is-done .form-msg { padding-left: 0; font-weight: 600; font-size: 17px; }
.form-msg { flex-basis: 100%; min-height: 1.45em; padding-left: 20px; font-size: 15px; color: var(--text-2); }

/* Email field: default · :focus/.is-focus · [aria-invalid] · :disabled */
.field {
  flex: 1 1 220px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FFF;
  color: inherit;
  font: inherit;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.field::placeholder { color: var(--text-3); }
.field:focus, .field.is-focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 23, 26, .08); }
.field[aria-invalid="true"] { border-color: var(--error); }
.field[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(194, 42, 48, .12); }
.field:disabled { background: var(--surface); color: var(--text-3); }

/* Primary button: default · :hover/.is-hover · :active/.is-active · :disabled. Pressed = the app's .pressable (0.97 + dim). */
.btn {
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font: 600 17px/1 var(--sans);
  cursor: pointer;
  transition: transform .16s ease-out, opacity .16s;
}
.btn:hover, .btn.is-hover { opacity: .88; }
.btn:active, .btn.is-active { transform: scale(.97); opacity: .78; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn:disabled { opacity: .35; cursor: default; transform: none; }

.scope { display: flex; justify-content: center; }
.radar { display: block; width: 100%; max-width: 448px; aspect-ratio: 1; }
.qr { flex-direction: column; align-items: center; gap: 16px; }
.qr img { display: block; width: 100%; max-width: 400px; height: auto; border-radius: 16px; }
.qr figcaption { font-size: 15px; color: var(--text-2); }

/* Stacked form (join page): full-width field and button, centred message. */
.waitlist--stack .field, .waitlist--stack .btn { flex-basis: 100%; }
.waitlist--stack .form-msg { padding-left: 0; text-align: center; }

/* Signal chip (QuizSignalChip): on a rival's icon, or .chip--card as the glass card's pill. */
.chip {
  position: absolute;
  padding: 5.3px 6.2px;
  border-radius: 999px;
  font: 700 13.8px/1.2 var(--sans);
  letter-spacing: -0.28px;
  white-space: nowrap;
}
.chip--card { position: static; padding: 4.5px 7px; font-size: 11px; letter-spacing: -0.1px; }

/* Welcome hero (QuizWelcomeHero): the 402 × 448 design canvas, scaled to fit by welcome.js (--s). */
.hero { position: relative; text-align: left; }
.hero__canvas {
  position: absolute; left: 50%; top: 50%;
  width: 402px; height: 448px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
}
.hero__canvas > * { position: absolute; transform: translate(-50%, -50%) rotate(-5.24deg); }
.hero__still {
  left: 201px; top: 226px; width: 432.3px; height: 432.3px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 80%, transparent),
                      linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 80%, transparent),
              linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-composite: intersect;
}
.hero__soften {
  left: 204.4px; top: 273.2px; width: 274.5px; height: 174.3px;
  border-radius: 20.3px; background: rgba(255, 255, 255, .5); filter: blur(10.6px);
}
.hero__card {
  left: 196px; top: 273px; width: 236px; height: 160px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px;
  color: #0B0B0E;
}
.hero__title { font: 500 24.7px/25.5px var(--sans); letter-spacing: -0.49px; }
.hero__line { font: 400 14.1px/20px var(--sans); letter-spacing: -0.28px; }
.hero .word { display: inline-block; white-space: nowrap; }
.hero .word > span { display: inline-block; }

/* Join page (opened from the QR): the app's welcome screen, with the waitlist form as its action. */
.welcome {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.welcome .hero { flex: 1 1 0; width: calc(100% + 32px); margin: 0 -16px; min-height: 300px; } /* edge to edge, like the app */
.welcome__headline {
  font: 700 clamp(22px, 9.4vw, 36px)/1.06 var(--display);
  letter-spacing: -0.72px;
  white-space: nowrap;
}
.welcome__headline span { display: block; }
.welcome__lede { max-width: 300px; margin-top: 12px; color: var(--text-2); }
.welcome .waitlist { width: 100%; margin-top: 32px; }

.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;
}

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; align-content: start; gap: 40px; padding: 32px 16px 48px; }
  .headline { margin-top: 40px; }
  .radar { max-width: 360px; }
  .qr { display: none; } /* on a phone you're already here */
}
@media (max-width: 480px) {
  .btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .field, .btn { transition: none; }
  .btn:active { transform: none; }
}
