/* ─────────────────────────────────────────────
   Design Tokens — Dark (default)
───────────────────────────────────────────── */
:root {
  --bg:           #0F0F13;
  --surface:      #1C1B1F;
  --surface-2:    #2B2930;
  --primary:      #6750A4;
  --primary-glow: rgba(103, 80, 164, 0.35);
  --primary-text: #D0BCFF;
  --on-primary:   #FFFFFF;
  --text:         #E6E1E5;
  --subtext:      #CAC4D0;
  --border:       rgba(255,255,255,0.08);
  --border-solid: #49454F;

  --radius:    20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --max-w:     1100px;
  --gap:       clamp(1.5rem, 4vw, 3rem);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ─────────────────────────────────────────────
   Light Mode Override
───────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg:           #FAFAFA;
    --surface:      #F4EFF4;
    --surface-2:    #ECE6F0;
    --primary-glow: rgba(103, 80, 164, 0.15);
    --primary-text: #6750A4;
    --text:         #1C1B1F;
    --subtext:      #49454F;
    --border:       rgba(0,0,0,0.07);
    --border-solid: #CAC4D0;
  }
}

/* ─────────────────────────────────────────────
   Reset & Base
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--primary-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────
   Layout
───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
}

section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

/* ─────────────────────────────────────────────
   Header
───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(15, 15, 19, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: light) {
  .site-header {
    background: rgba(250, 250, 250, 0.80);
  }
}

.site-header .container {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* ─────────────────────────────────────────────
   Hero
───────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}

/* Ambient glow background */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px var(--border),
    0 24px 64px rgba(0,0,0,0.4),
    0 0 80px var(--primary-glow);
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--subtext) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--subtext);
  letter-spacing: 0.03em;
  max-width: 480px;
}

/* ─────────────────────────────────────────────
   Store Buttons
───────────────────────────────────────────── */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-width: 175px;
}

.store-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px var(--primary-glow);
  text-decoration: none;
  color: var(--text);
}

.store-btn svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: var(--text);
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn-text .label {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--subtext);
  line-height: 1;
}

.store-btn-text .name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ─────────────────────────────────────────────
   Features Section
───────────────────────────────────────────── */
.features {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px var(--primary-glow);
}

.feature-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--subtext);
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   CTA Section
───────────────────────────────────────────── */
.cta {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 65%);
  pointer-events: none;
}

.cta .container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta p {
  color: var(--subtext);
  font-size: 1.05rem;
}

/* ─────────────────────────────────────────────
   Footer
───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--surface);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--subtext);
  transition: color 0.2s;
}

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

.copyright {
  font-size: 0.85rem;
  color: var(--subtext);
}

@media (max-width: 600px) {
  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─────────────────────────────────────────────
   Gameplay Demo Section
───────────────────────────────────────────── */
.demo {
  text-align: center;
  background: var(--bg);
}

.demo-subtitle {
  color: var(--subtext);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

.demo .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Phone mockup */
.phone-mockup {
  position: relative;
  display: inline-flex;
  justify-content: center;
  margin-top: 1rem;
}

.phone-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: 240px;
  border-radius: 36px;
  background: #0a0a0f;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 40px 80px rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  padding-top: 16px;  /* space for notch */
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 20px;
  background: #0a0a0f;
  border-radius: 12px;
  z-index: 2;
  border: 1.5px solid rgba(255,255,255,0.08);
}

.phone-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0 0 34px 34px;
  object-fit: cover;
}

@media (max-width: 480px) {
  .phone-frame { width: 200px; }
}

/* ─────────────────────────────────────────────
   Store Button — Muted variant (iOS coming soon)
───────────────────────────────────────────── */
.store-btn--muted {
  opacity: 0.55;
  cursor: default;
  pointer-events: auto;
}

.store-btn--muted:hover {
  transform: none;
  border-color: var(--border-solid);
  box-shadow: none;
  opacity: 0.7;
}

/* ─────────────────────────────────────────────
   Early Access Section
───────────────────────────────────────────── */
.early-access {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.early-access::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 65%);
  pointer-events: none;
}

.early-access .container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.ea-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 99px;
}

.ea-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

.ea-subtitle {
  color: var(--subtext);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.65;
}

.ea-countries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.ea-country {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.4rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.ea-how {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ea-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  color: var(--subtext);
  text-align: left;
  max-width: 200px;
}

.ea-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ea-step-divider {
  color: var(--subtext);
  font-size: 1.2rem;
  opacity: 0.4;
}

@media (max-width: 640px) {
  .ea-step-divider { display: none; }
  .ea-how { gap: 0.5rem; }
  .ea-step { max-width: 100%; }
}

.ea-note {
  font-size: 0.82rem;
  color: var(--subtext);
  opacity: 0.7;
  margin-top: -0.25rem;
}

/* Code grid */
.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.5rem;
  max-height: 380px;
  overflow-y: auto;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: var(--bg);
  text-align: left;

  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.code-grid::-webkit-scrollbar { width: 5px; }
.code-grid::-webkit-scrollbar-track { background: transparent; }
.code-grid::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 99px;
}

.code-item {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  font-size: 0.8rem;
  color: var(--primary-text);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  letter-spacing: 0.06em;
  user-select: all;
  cursor: text;
  transition: border-color 0.15s, background 0.15s;
}

.code-item:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

/* ─────────────────────────────────────────────
   iOS Coming Soon Page
───────────────────────────────────────────── */
.coming-soon-main {
  min-height: calc(100vh - 70px - 97px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}

.coming-soon-main::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 65%);
  pointer-events: none;
}

.cs-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  max-width: 520px;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
  margin: 0 auto;
}

/* Pulsing icon */
.cs-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.cs-pulse {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 36px;
  background: var(--primary-glow);
  animation: cs-pulse 2.4s ease-in-out infinite;
}

@keyframes cs-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.6; }
  50%       { transform: scale(1.2); opacity: 0.2; }
}

.cs-icon {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 26px;
  box-shadow:
    0 0 0 1px var(--border),
    0 20px 60px rgba(0,0,0,0.4),
    0 0 60px var(--primary-glow);
}

.cs-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary-text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 1rem;
}

.cs-title {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--subtext) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cs-body {
  color: var(--subtext);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 400px;
}

/* Email capture form */
.cs-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cs-input-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.cs-email-input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border-solid);
  border-radius: 100px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.cs-email-input::placeholder {
  color: var(--subtext);
  opacity: 0.5;
}

.cs-email-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.cs-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.4rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 24px var(--primary-glow);
}

.cs-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 10px 32px var(--primary-glow);
}

.cs-submit-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Loading spinner */
.cs-submit-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cs-spin 0.7s linear infinite;
}

@keyframes cs-spin {
  to { transform: rotate(360deg); }
}

.cs-form-hint {
  font-size: 0.78rem;
  color: var(--subtext);
  opacity: 0.55;
  text-align: center;
}

.cs-form-success {
  font-size: 0.88rem;
  color: #4ade80;
  text-align: center;
  font-weight: 500;
}

.cs-form-error {
  font-size: 0.88rem;
  color: #f87171;
  text-align: center;
}

.cs-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
}

.cs-divider::before,
.cs-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.cs-divider span {
  font-size: 0.82rem;
  color: var(--subtext);
  white-space: nowrap;
  opacity: 0.6;
}

.cs-android-btn {
  width: auto;
}

.cs-back {
  font-size: 0.88rem;
  color: var(--subtext);
  text-decoration: none;
  margin-top: 0.25rem;
  transition: color 0.2s;
}

.cs-back:hover {
  color: var(--text);
  text-decoration: none;
}

/* ─────────────────────────────────────────────
   Legal Pages
───────────────────────────────────────────── */
.legal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}

.legal-body .page-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.legal-body .last-updated {
  font-size: 0.875rem;
  color: var(--subtext);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-body p {
  color: var(--subtext);
  margin-bottom: 1.2rem;
  font-size: 0.975rem;
  line-height: 1.75;
}

.legal-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.legal-body ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

.legal-body li {
  font-size: 0.975rem;
  color: var(--subtext);
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

.legal-body a {
  color: var(--primary-text);
}

.legal-body strong {
  color: var(--text);
  font-weight: 600;
}
