/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg:          #0B0B1A;
  --bg-alt:      #0F0F22;
  --bg-card:     #131328;
  --accent:      #7A5298;
  --accent-glow: rgba(122, 82, 152, 0.35);
  --teal:        #39B5AA;
  --orange:      #E3562E;
  --text:        #F0F0FF;
  --text-muted:  #7878A0;
  --border:      rgba(122, 82, 152, 0.2);
  --radius:      16px;
  --radius-sm:   10px;
  --font:        'Comfortaa', system-ui, sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
strong { font-weight: 700; color: var(--text); }

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

.gradient-text {
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 26, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-img  {
  width: 34px; height: 34px;
  border-radius: 9px;
  object-fit: contain;
  padding: 3px;
  background: var(--accent);
}
.logo-text { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }

.btn-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(122, 82, 152, 0.14);
  border: 1px solid rgba(122, 82, 152, 0.4);
  color: var(--text);
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}
.btn-nav:hover { background: rgba(122, 82, 152, 0.24); transform: translateY(-1px); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-discord {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(122, 82, 152, 0.14);
  border: 1px solid rgba(122, 82, 152, 0.4);
  color: var(--text);
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}
.btn-discord:hover { background: rgba(122, 82, 152, 0.24); transform: translateY(-1px); }
.btn-icon { width: 16px; height: 16px; display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  /* Slightly under viewport height so the feature strip peeks above the
     fold — signals there's more to scroll. svh excludes the mobile
     address bar so the hero isn't cut off on phones. */
  min-height: calc(100svh - 90px);
  max-width: 1100px;
  margin: 0 auto;
  padding: 110px 24px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-glow {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(122, 82, 152, 0.16) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  /* Don't grow — sit at the title width so the paragraph, stats, and
     buttons line up with the heading, and the leftover space falls
     between this block and the screenshots. */
  flex: 0 1 460px;
  min-width: 0;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-block;
  background: rgba(122, 82, 152, 0.14);
  border: 1px solid rgba(122, 82, 152, 0.35);
  color: #B090CC;
  padding: 5px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 28px;
  /* Fills the hero-content width — same as the title */
  max-width: none;
}

/* ── Hero stats chips ────────────────────────────── */
.hero-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.stat-chip {
  /* Equal thirds — together they span the title width */
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(122, 82, 152, 0.1);
  border: 1px solid rgba(122, 82, 152, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* ── Store buttons (image-based) ─────────────────── */
.store-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
/* Row variant used in hero — two buttons split the row evenly */
.store-buttons-row {
  flex-direction: row;
  align-items: stretch;
  gap: 14px;
}
.store-buttons-row a { flex: 1; }
.store-buttons-row .store-btn-img { width: 100%; height: auto; }

.store-buttons.centered { align-items: center; flex-direction: row; justify-content: center; }

.store-btn-img {
  height: 60px;
  width: auto;
  display: block;
  transition: transform 0.2s, opacity 0.2s;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}
.store-btn-img:hover { transform: translateY(-3px); opacity: 0.9; }

/* ── Phone screenshots ───────────────────────────── */
.hero-screenshots {
  flex-shrink: 0;
  position: relative;
  /* Narrower than 2×screenshot width to force overlap */
  width: 420px;
  height: 600px;
  z-index: 1;
}

.screenshot {
  position: absolute;
  height: 520px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  border-radius: 32px;
}

/* iOS: left side, tilts left */
.screenshot-ios {
  top: 0;
  left: 0;
  transform: rotate(-5deg);
  transform-origin: bottom center;
  box-shadow: -8px 28px 64px rgba(0,0,0,0.6);
  z-index: 1;
}

/* Android: right side, tilts right, drops lower — overlaps iOS */
.screenshot-android {
  top: 65px;
  right: 0;
  transform: rotate(5deg);
  transform-origin: bottom center;
  box-shadow: 8px 28px 64px rgba(0,0,0,0.6);
  z-index: 2;
}

/* ============================================================
   FEATURE STRIP
   ============================================================ */
.feature-strip {
  background: var(--bg-alt);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.strip-item:hover { background: rgba(122,82,152,0.08); }

.strip-icon { font-size: 1.8rem; line-height: 1; }
.strip-item h3 { font-size: 0.88rem; font-weight: 700; margin-bottom: 3px; }
.strip-item p  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================================
   SECTION BASE
   ============================================================ */
.section     { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-cta {
  text-align: center;
  background: linear-gradient(160deg, rgba(122,82,152,0.12) 0%, rgba(57,181,170,0.08) 100%);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.025em;
  margin-bottom: 48px;
}

.cta-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.25s, transform 0.25s;
}
.step:hover { border-color: rgba(122,82,152,0.45); transform: translateY(-4px); }

.step-num {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.step h3 { font-size: 1rem; font-weight: 700; }
.step p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   GAME MODES
   ============================================================ */
.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius);
  padding: 36px 30px;
}
.mode-card.mode-word     { border-top-color: var(--teal); }
.mode-card.mode-question { border-top-color: var(--orange); }

.mode-icon { font-size: 2.4rem; display: block; margin-bottom: 16px; }
.mode-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.mode-card p  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 22px; }

.check-list { display: flex; flex-direction: column; gap: 9px; }
.check-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 22px;
  position: relative;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 700;
}
.teal-checks   li::before { color: var(--teal); }
.orange-checks li::before { color: var(--orange); }

/* ============================================================
   CONTENT PACKS
   ============================================================ */
.packs-sub {
  text-align: center;
  color: var(--text-muted);
  margin-top: -28px;
  margin-bottom: 44px;
  font-size: 1rem;
}

.packs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.pack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.pack-card:hover {
  border-color: rgba(122,82,152,0.45);
  transform: translateY(-4px);
}

.pack-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
}

.pack-card span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   LANGUAGES
   ============================================================ */
.lang-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: -28px;
  margin-bottom: 44px;
}

/* Exactly 10 columns = 2 even rows of 10 */
.flags-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.flag-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: transform 0.2s;
}
.flag-item:hover { transform: translateY(-3px); }

.flag-item img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.07);
}

.flag-item span {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.25s, transform 0.25s;
}
.feature-card:hover { border-color: rgba(122,82,152,0.45); transform: translateY(-4px); }

.feature-icon { font-size: 2rem; display: block; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 9px; }
.feature-card p  { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 22px;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: rgba(122, 82, 152, 0.45); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  padding: 20px 32px 20px 0;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }

/* Plus / minus toggle */
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding: 0 0 22px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

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

.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

.footer-copy {
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   CONTACT DIALOG
   ============================================================ */
.contact-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 520px;
  width: calc(100% - 36px);
}
.contact-dialog::backdrop {
  background: rgba(5, 5, 14, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.contact-form {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.contact-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.contact-close:hover { color: var(--text); }

.contact-title {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}
.contact-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: -8px;
  margin-bottom: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field > span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(122, 82, 152, 0.6);
}
.field select { cursor: pointer; }
.field option { background: var(--bg-card); }

.btn-send {
  margin-top: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--orange) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 100px;
  padding: 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-send:hover { opacity: 0.9; transform: translateY(-1px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablets / small laptops — stack the hero ─────── */
@media (max-width: 1000px) {
  .hero {
    flex-direction: column;
    min-height: auto;
    padding-top: 124px;
    text-align: center;
    align-items: center;
    gap: 40px;
  }
  /* Fill the column instead of collapsing to content width */
  .hero-content {
    flex: none;
    width: 100%;
    max-width: 560px;
  }
  .hero-sub   { max-width: 100%; }
  .hero-stats { justify-content: center; }
  .store-buttons-row { justify-content: center; }

  .hero-screenshots {
    width: 380px;
    height: 500px;
  }
  .screenshot { height: 420px; max-width: 200px; }
  .screenshot-android { top: 52px; }

  .strip-grid    { grid-template-columns: repeat(3, 1fr); }
  .steps         { grid-template-columns: repeat(2, 1fr); }
  .packs-grid    { grid-template-columns: repeat(3, 1fr); }
  .flags-grid    { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Large phones / small tablets ─────────────────── */
@media (max-width: 680px) {
  .section { padding: 60px 0; }
  .section-title { margin-bottom: 36px; }

  .nav-inner { padding: 11px 18px; }
  .logo-text { font-size: 0.98rem; }

  .hero { padding: 110px 20px 60px; gap: 36px; }
  .hero h1 { margin-bottom: 16px; }
  .hero-sub { font-size: 1rem; }

  /* Keep screenshots — just scale the whole block down */
  .hero-screenshots {
    width: 300px;
    height: 400px;
  }
  .screenshot { height: 340px; max-width: 160px; border-radius: 26px; }
  .screenshot-android { top: 44px; }

  .strip-grid    { grid-template-columns: repeat(2, 1fr); gap: 4px; }
  .steps         { grid-template-columns: 1fr; }
  .modes-grid    { grid-template-columns: 1fr; }
  .packs-grid    { grid-template-columns: repeat(3, 1fr); }
  .flags-grid    { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .features-grid { grid-template-columns: 1fr; }

  .lang-sub, .packs-sub { margin-top: -20px; margin-bottom: 32px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Small phones ─────────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 0 18px; }

  /* Icon-only nav buttons so logo + both actions fit the row */
  .nav-actions { gap: 8px; }
  .btn-label { display: none; }
  .btn-nav, .btn-discord { padding: 8px 11px; gap: 0; }

  .badge { font-size: 0.68rem; padding: 5px 12px; letter-spacing: 0.04em; }

  .hero-stats { gap: 8px; }
  .stat-chip  { min-width: 0; flex: 1; padding: 9px 8px; }
  .stat-num   { font-size: 1.2rem; }
  .stat-label { font-size: 0.62rem; }

  .hero-screenshots {
    width: 300px;
    height: 380px;
  }
  .screenshot { height: 330px; max-width: 158px; }
  .screenshot-android { top: 42px; }

  /* Keep store buttons side by side at natural size, centered */
  .store-buttons-row,
  .store-buttons.centered {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .store-btn-img { height: 52px; width: auto; }

  .packs-grid { grid-template-columns: repeat(2, 1fr); }
  .flags-grid { grid-template-columns: repeat(4, 1fr); }

  .mode-card { padding: 28px 22px; }
  .feature-card { padding: 24px 20px; }
}

/* ── Very small phones ────────────────────────────── */
@media (max-width: 360px) {
  .logo-text { font-size: 0.9rem; }
  .hero-screenshots { width: 230px; }
  .screenshot { height: 270px; max-width: 124px; }
  .flags-grid { grid-template-columns: repeat(3, 1fr); }
}
