:root {
  color-scheme: dark;
  --bg: #0c0c0d;
  --surface: #161618;
  --surface-elevated: #1e1e22;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 12, 13, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  font-weight: 750;
}

.hero-lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 650;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #101010;
}

.btn-secondary {
  background: var(--surface-elevated);
  border-color: var(--border);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
  max-width: 480px;
}

.stat-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.stat-pill strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-pill span {
  font-size: 12px;
  color: var(--muted);
}

/* Phone Mockup */
.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 310px;
  background: #121214;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 42px;
  padding: 16px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), 0 0 80px rgba(255, 122, 26, 0.08);
}

.phone-notch {
  width: 92px;
  height: 22px;
  background: #060607;
  border-radius: 999px;
  margin: 0 auto 14px;
}

.phone-screen {
  background: #161618;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 20px 18px;
  text-align: center;
}

.phone-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.phone-app-id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.phone-app-id img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.phone-streak {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.cue-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}

.phone-sprite-box {
  background: #0f0f11;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 12px;
  margin-bottom: 16px;
}

.phone-sprite-box img {
  width: 100%;
  height: 124px;
  object-fit: contain;
  margin: 0 auto;
}

.phone-timer {
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.phone-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.phone-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 14px;
}

.phone-progress-fill {
  height: 100%;
  width: 58%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.phone-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Sections */
section {
  padding: 64px 0;
}

.section-header {
  max-width: 620px;
  margin-bottom: 40px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 12px;
}

.section-lead {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Visual Showcase */
.showcase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.showcase-media {
  background: #0e0e10;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}

.showcase-media img {
  max-height: 220px;
  margin: 0 auto;
  border-radius: 12px;
}

.step-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.step-item span {
  font-size: 14px;
  color: var(--muted);
}

/* Legal pages */
.legal-main {
  padding: 56px 0 80px;
}

.legal-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.legal-card h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 10px;
}

.legal-card h2 {
  font-size: 20px;
  margin-top: 30px;
  margin-bottom: 10px;
}

.legal-card p,
.legal-card li {
  color: #d4d4d8;
  font-size: 15px;
}

.legal-card ul {
  padding-left: 20px;
}

.legal-note {
  background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: #ffd7ba;
  margin: 18px 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .hero-grid,
  .cards-3,
  .showcase {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 44px 0 36px;
  }
  .nav-links {
    gap: 14px;
    font-size: 13px;
  }
  .legal-card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn:hover {
    transform: none;
  }
}

/* Join Page */
.join-main {
  padding: 48px 0 80px;
}

.join-shell {
  max-width: 480px;
  margin: 0 auto;
}

.join-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
}

.join-card h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.join-form {
  margin-top: 20px;
}

.join-form label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 6px;
}

.join-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-elevated);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

#room {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.join-submit,
.join-secondary,
.join-open-app {
  width: 100%;
  margin-top: 18px;
}

.join-stop {
  width: 100%;
  min-height: 150px;
  font-size: 26px;
  margin: 14px 0;
}

.join-timer {
  font-size: 64px;
  font-weight: 750;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  margin: 22px 0 12px;
  text-align: center;
}

.join-status {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
  margin: 8px 0;
}

.join-error {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffd7ba;
  font-size: 14px;
  margin-bottom: 14px;
}

.join-players {
  padding: 0;
  list-style: none;
  margin: 24px 0 10px;
}

.join-players li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.join-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-elevated);
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.join-name {
  flex: 1;
  overflow-wrap: anywhere;
}

.join-score {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
}

.join-place {
  font-weight: 750;
  width: 28px;
}

[hidden] {
  display: none !important;
}
