/* ================================================================
   FIFTEEN — Waitlist Landing Page
   ================================================================ */

@font-face {
  font-family: 'Satoshi';
  src: local('Satoshi Variable'),
       local('Satoshi'),
       url('fonts/Satoshi-Variable.woff2') format('woff2'),
       url('fonts/Satoshi-Variable.woff') format('woff');
  font-weight: 100 900;
  font-display: swap;
}

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

:root {
  --bg: #0A0A0A;
  --text: #FFFFFF;
  --muted: #888888;
  --win: #00E676;
  --loss: #FF5252;
  --draw: #78909C;
  --font: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ── Background drift ─────────────────────────────────────────── */

#bg-drift {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Screens ──────────────────────────────────────────────────── */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.screen.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* ── Wordmark ─────────────────────────────────────────────────── */

.wordmark {
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  margin-bottom: 2.5rem;
}

/* ── Line (15 circles) ────────────────────────────────────────── */

.line {
  display: flex;
  gap: 10px;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  transition: border-color 0.2s, background 0.2s;
}

.dot.w { background: var(--win); border-color: var(--win); }
.dot.l { background: var(--loss); border-color: var(--loss); }
.dot.d { background: var(--draw); border-color: var(--draw); }

.dot.pop {
  animation: pop 0.35s ease;
}

.dot.pulse {
  background: var(--text);
  border-color: var(--text);
  opacity: 0.6;
  transition: opacity 0.1s ease;
}

.dot.pulse.beat {
  opacity: 1;
}

/* ── History table ────────────────────────────────────────────── */

.history {
  display: grid;
  grid-template-columns: repeat(5, auto);
  gap: 4px 24px;
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  color: var(--muted);
  margin-bottom: 2rem;
  justify-content: center;
  line-height: 2;
}

.h-round {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.h-num {
  color: var(--muted);
  opacity: 0.4;
  min-width: 2em;
  text-align: right;
  font-size: 0.7rem;
}

.h-move {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.h-vs {
  opacity: 0.25;
  font-size: 0.7rem;
}

.h-result {
  font-weight: 700;
  vertical-align: baseline;
  line-height: inherit;
}

.h-result.w { color: var(--win); }
.h-result.l { color: var(--loss); }
.h-result.d { color: var(--draw); }

/* ── Tagline ──────────────────────────────────────────────────── */

.tagline {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}

/* ── Command text ─────────────────────────────────────────────── */

.command {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.7;
  text-align: center;
  white-space: nowrap;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* ── Move buttons ─────────────────────────────────────────────── */

.moves {
  display: flex;
  gap: 1.25rem;
}

.move {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.2rem 0;
  width: 100px;
  background: transparent;
  border: 1.5px solid var(--muted);

  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.move:hover:not(:disabled) {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.move:active:not(:disabled) {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.1);
}

.move:disabled {
  opacity: 0.2;
  cursor: default;
}

.move-letter {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
}

.move-label {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ── Keyboard hint ────────────────────────────────────────────── */

.key-hint {
  display: none;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.7;
  letter-spacing: 0.4em;
  margin-top: 1rem;
}

@media (hover: hover) and (pointer: fine) {
  .key-hint { display: block; }
}

/* ── Matchup line ─────────────────────────────────────────────── */

.reveal-matchup {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Draw screen ──────────────────────────────────────────────── */

.draw-text {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
}

#screen-draw.flash-draw {
  background: rgba(120, 144, 156, 0.12);
  transition: background 0s;
}

#screen-draw:not(.flash-draw) {
  transition: background 0.4s ease;
}

/* ── Loss screen ──────────────────────────────────────────────── */

.loss-text {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
}

#screen-loss.flash-red {
  background: rgba(255, 23, 68, 0.12);
  transition: background 0s;
}

#screen-loss:not(.flash-red) {
  transition: background 0.4s ease;
}

#screen-email.flash-green {
  background: rgba(0, 230, 118, 0.12);
  transition: background 0s;
}

#screen-email:not(.flash-green) {
  transition: background 0.4s ease;
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.9rem 2.5rem;
  background: var(--text);
  color: var(--bg);
  border: none;

  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }

/* ── Email capture ────────────────────────────────────────────── */

.email-lead {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.email-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 400;
  padding: 0.5rem 0;
  width: 280px;
  text-align: center;
  outline: none;
  margin-bottom: 2rem;
}

.email-input::placeholder {
  color: var(--muted);
}

.email-input.shake {
  animation: shake 0.3s ease;
}

/* ── Confirmed screen ─────────────────────────────────────────── */

.confirmed-text {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.confirmed-caption {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 2rem;
}


.share-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1.5rem 2.5rem;
  text-align: center;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.share-card-title {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.share-card-letters {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.20em;
}

.share-line {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.20em;
}

.share-card-tag {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.share-card-url {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── Mute button ─────────────────────────────────────────────── */

.mute-btn {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  transition: border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mute-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.mute-btn.muted {
  opacity: 0.4;
}

/* ── Footer ──────────────────────────────────────────────────── */

.footer {
  position: fixed;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* ── Keyframes ────────────────────────────────────────────────── */

@keyframes pop {
  0%   { transform: scale(0.3); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 480px) {
  .screen { padding: 1.5rem 1.25rem 4rem; justify-content: center; padding-top: 8vh; }
  .dot { width: 16px; height: 16px; }
  .line { gap: 6px; margin-bottom: 1.5rem; }
  .wordmark { font-size: 3rem; margin-bottom: 1.5rem; }
  .history {
    grid-template-columns: repeat(4, auto);
    gap: 4px 16px;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
  }
  .h-num { font-size: 0.65rem; min-width: 1.8em; }
  .h-move { font-size: 0.7rem; }
  .h-vs { font-size: 0.65rem; }
  .command { font-size: 1rem; margin-bottom: 1.5rem; }
  .move { width: 90px; padding: 1rem 0; }
  .move-letter { font-size: 2rem; }
  .moves { gap: 0.75rem; }
  .email-input { width: 260px; }
}

@media (min-width: 768px) {
  .move { width: 120px; padding: 1.4rem 0; }
  .move-letter { font-size: 2.6rem; }
  .moves { gap: 1.5rem; }
}

@media (max-height: 680px) {
  .wordmark { font-size: 2rem; margin-bottom: 1rem; }
  .line { margin-bottom: 0.75rem; }
  .history { margin-bottom: 0.75rem; }
  .command { margin-bottom: 1rem; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
