/* ============================================================
   ChessCoins — Design System
   Classic Chess Theme  |  Dark Mode
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:          #0E0E0E;
  --surface:     #181818;
  --surface-2:   #222222;
  --surface-3:   #2A2A2A;
  --border:      #2E2E2E;
  --border-2:    #3A3A3A;

  --gold:        #C9A84C;
  --gold-light:  #E3C870;
  --gold-dark:   #9A7832;
  --gold-glow:   rgba(201, 168, 76, 0.18);

  --chess-light: #F0D9B5;
  --chess-dark:  #B58863;

  --text:        #F0EBE0;
  --text-2:      #A09080;
  --text-3:      #6A6060;

  --success:     #5BBB5B;
  --error:       #D95555;

  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-2xl: 28px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,.35);
  --shadow-md:   0 4px 20px rgba(0,0,0,.45);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.55);
  --shadow-gold: 0 4px 24px rgba(201,168,76,.22);

  --nav-h: 64px;
  --max-w: 1180px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
button { font-family: inherit; cursor: pointer; }

/* ── Typography ────────────────────────────────────────────── */
.serif { font-family: 'Playfair Display', Georgia, serif; }

h1,h2,h3,h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text);
  line-height: 1.2;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding-block: 80px; }

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(14,14,14,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding-inline: 24px;
}
.nav-inner {
  max-width: var(--max-w);
  width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.nav-brand .crown { font-size: 1.6rem; line-height: 1; }
.nav-brand em { color: var(--gold); font-style: normal; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-2);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color .18s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links .nav-cta {
  background: var(--gold);
  color: #0E0E0E !important;
  padding: 6px 16px;
  border-radius: var(--r-md);
  font-weight: 600;
  transition: background .18s, transform .18s;
}
.nav-links .nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  padding: 4px;
  line-height: 1;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-size: .94rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #0E0E0E;
}
.btn-primary:hover {
  background: var(--gold-light);
  color: #0E0E0E;
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,.06);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #0E0E0E; }
.btn-danger {
  background: var(--error);
  color: #fff;
}
.btn-danger:hover { background: #C04040; transform: translateY(-1px); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Store Buttons ─────────────────────────────────────────── */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--r-lg);
  transition: all .2s;
  text-decoration: none;
}
.store-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}
.store-btn-icon { font-size: 1.6rem; line-height: 1; }
.store-btn-text small {
  display: block;
  font-size: .62rem;
  opacity: .65;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.store-btn-text strong { display: block; font-size: .92rem; font-weight: 600; }

/* ── Eyebrow / Label ───────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── Section Header ────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 14px; }
.section-header p { font-size: 1rem; color: var(--text-2); max-width: 520px; margin-inline: auto; line-height: 1.75; }

/* ════════════════════════════════════════════════════════════
   HOME — HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 65% 45%, rgba(201,168,76,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 10% 80%, rgba(181,136,99,.05) 0%, transparent 55%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding-block: 80px;
}
.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  margin-bottom: 20px;
}
.hero-text h1 .accent { color: var(--gold); }
.hero-text p {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stores { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stat-row {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.hero-stat-label { font-size: .78rem; color: var(--text-2); margin-top: 4px; }

/* Chess Board Visual */
.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; }
.chess-board {
  width: min(360px, 85vw);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(201,168,76,.14);
  border: 2px solid rgba(201,168,76,.2);
}
.sq {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  user-select: none;
}
.sq.light { background: var(--chess-light); }
.sq.dark  { background: var(--chess-dark); }
.piece-w { color: #FFFFF0; text-shadow: 0 1px 4px rgba(0,0,0,.85); }
.piece-b { color: #1A1210; text-shadow: 0 1px 3px rgba(255,255,255,.3); }

/* Floating badge */
.hero-badge {
  position: absolute;
  bottom: -16px;
  left: -24px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  min-width: 130px;
}
.hero-badge-val {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1;
}
.hero-badge-label { font-size: .72rem; color: var(--text-2); margin-top: 3px; }

/* ════════════════════════════════════════════════════════════
   HOME — FEATURES
   ════════════════════════════════════════════════════════════ */
.features { background: var(--surface); border-block: 1px solid var(--border); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-glow);
  border: 1px solid rgba(201,168,76,.22);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.feature-card h3 { font-family: 'Inter', sans-serif; font-size: .97rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p  { font-size: .88rem; color: var(--text-2); line-height: 1.65; }

/* ════════════════════════════════════════════════════════════
   HOME — HOW IT WORKS
   ════════════════════════════════════════════════════════════ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 32px;
}
.step { text-align: center; padding: 8px; }
.step-num {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0E0E0E;
  margin: 0 auto 18px;
  box-shadow: var(--shadow-gold);
}
.step h3 { font-family: 'Inter', sans-serif; font-size: .97rem; font-weight: 600; margin-bottom: 8px; }
.step p  { font-size: .88rem; color: var(--text-2); line-height: 1.65; }

/* ════════════════════════════════════════════════════════════
   HOME — DOWNLOAD CTA
   ════════════════════════════════════════════════════════════ */
.cta-section { padding-block: 80px; }
.cta-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(201,168,76,.07) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 14px; }
.cta-card p  { color: var(--text-2); font-size: 1rem; max-width: 460px; margin-inline: auto; margin-bottom: 36px; }
.cta-stores  { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-king {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 7rem;
  opacity: .04;
  pointer-events: none;
  line-height: 1;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 56px 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-brand { margin-bottom: 14px; }
.footer-brand p { font-size: .875rem; color: var(--text-2); line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: .875rem; color: var(--text-2); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copyright { font-size: .82rem; color: var(--text-3); }

/* ════════════════════════════════════════════════════════════
   INNER PAGES — PAGE HEADER
   ════════════════════════════════════════════════════════════ */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--nav-h) + 56px) 24px 56px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-hero p   { color: var(--text-2); font-size: 1rem; max-width: 520px; margin-inline: auto; }
.page-hero .updated { font-size: .82rem; color: var(--text-3); margin-top: 12px; }

/* ════════════════════════════════════════════════════════════
   INNER PAGES — PROSE
   ════════════════════════════════════════════════════════════ */
.prose-page { padding-block: 64px; }
.prose {
  max-width: 760px;
  margin-inline: auto;
  font-size: .96rem;
  color: var(--text-2);
  line-height: 1.8;
}
.prose h2 {
  font-size: 1.4rem;
  color: var(--text);
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: 'Inter', sans-serif; font-size: .97rem; font-weight: 600; color: var(--gold); margin: 24px 0 8px; }
.prose p  { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 14px 24px; }
.prose li { margin-bottom: 5px; }
.prose strong { color: var(--text); }
.prose a { color: var(--gold); }
.prose a:hover { color: var(--gold-light); }
.info-box {
  background: var(--gold-glow);
  border: 1px solid rgba(201,168,76,.22);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: .9rem;
}
.info-box strong { color: var(--gold); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ════════════════════════════════════════════════════════════
   DELETE ACCOUNT FORM
   ════════════════════════════════════════════════════════════ */
.delete-page { padding-block: 64px; }
.delete-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
  max-width: 900px;
  margin-inline: auto;
}
.delete-info h2 { font-size: 1.5rem; margin-bottom: 14px; }
.delete-info p  { color: var(--text-2); font-size: .93rem; line-height: 1.75; margin-bottom: 12px; }
.delete-info ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; margin: 20px 0; }
.delete-info li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .88rem;
  color: var(--text-2);
}
.delete-info li::before {
  content: '✗';
  color: var(--error);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px;
}
.form-card h3 { font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 600; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  letter-spacing: .02em;
}
.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: .94rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.1);
}
.form-input.is-error { border-color: var(--error); }
.form-input::placeholder { color: var(--text-3); }

.form-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--error);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.form-check label { font-size: .85rem; color: var(--text-2); line-height: 1.55; cursor: pointer; }

.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: .88rem;
  margin-bottom: 18px;
  display: none;
  line-height: 1.5;
}
.alert.visible { display: block; }
.alert-error   { background: rgba(217,85,85,.1); border: 1px solid rgba(217,85,85,.3); color: #EF9999; }
.alert-success { background: rgba(91,187,91,.1); border: 1px solid rgba(91,187,91,.3); color: #88DD88; }

.success-state { display: none; text-align: center; padding: 32px 0; }
.success-state.visible { display: block; }
.success-icon { font-size: 3rem; margin-bottom: 16px; }
.success-state h3 { font-size: 1.2rem; margin-bottom: 10px; }
.success-state p  { font-size: .9rem; color: var(--text-2); }

/* ════════════════════════════════════════════════════════════
   SUPPORT PAGE
   ════════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.contact-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.contact-card-icon { font-size: 2rem; margin-bottom: 14px; }
.contact-card h3 { font-family: 'Inter', sans-serif; font-size: .97rem; font-weight: 600; margin-bottom: 8px; }
.contact-card p  { font-size: .88rem; color: var(--text-2); line-height: 1.65; }
.contact-card a  { color: var(--gold); font-size: .88rem; display: block; margin-top: 8px; }

.faq-list { max-width: 760px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding-block: 20px;
}
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 600; margin-bottom: 8px; font-size: .97rem; }
.faq-a { font-size: .9rem; color: var(--text-2); line-height: 1.7; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
  .hero-text p { max-width: none; }
  .hero-actions { justify-content: center; }
  .hero-stores  { justify-content: center; }
  .hero-stat-row { justify-content: center; }
  .hero-visual  { order: -1; }
  .hero-badge { left: 0; bottom: -12px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .delete-layout {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 40px;
  }
}

@media (max-width: 680px) {
  :root { --nav-h: 58px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta { align-self: flex-start; }

  section { padding-block: 56px; }
  .cta-card { padding: 48px 24px; }
  .cta-king { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-card { padding: 24px; }
  .page-hero { padding-inline: 20px; }
}

/* ── Utility ────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-2); }
.mt-xs  { margin-top: 6px; }
.mt-sm  { margin-top: 12px; }
.mt-md  { margin-top: 20px; }
.mt-lg  { margin-top: 32px; }
.mt-xl  { margin-top: 48px; }
.divider { border: none; border-top: 1px solid var(--border); margin-block: 32px; }
