/* ══════════════════════════════════════════════════════════════════════════
   Queens Count — shared site styles
   Palette mirrors the game's default "Obsidian" theme (ThemeManager.kt):
   gold #F0C64A on near-black, gold-gradient titles (Brand.kt GoldTitleBrush),
   Cinzel display + Manrope body (the game's intended design language).
   ══════════════════════════════════════════════════════════════════════════ */

/* Default theme: "Royal Navy" (ThemeManager.kt id "navy") — the same
   Double Eagle gold, set on deep navy. */
:root {
  --bg:           #060b14;   /* m3 background        */
  --surface:      #0c1626;   /* m3 surface           */
  --surface-2:    #122033;   /* m3 surfaceVariant / board background */
  --gold:         #f0c64a;   /* m3 primary / player gold */
  --gold-bright:  #e6b422;   /* GoldButtonMid        */
  --gold-deep:    #a9781f;   /* GoldGradientDeep     */
  --gold-pale:    #fdf6d8;   /* GoldGradientLight    */
  --frame:        #c8a13a;   /* board border         */
  --ink:          #f0d99a;   /* m3 onSurface         */
  --muted:        #bcc6d6;   /* m3 onSurfaceVariant  */
  --silver:       #cfd8e6;   /* m3 secondary (opponent) */
  --ink-on-gold:  #1a1208;   /* m3 onPrimary         */
  --line:         rgba(200, 161, 58, 0.45);  /* m3 outline        */
  --line-soft:    rgba(200, 161, 58, 0.20);  /* m3 outlineVariant */
  --card-white:   #fbf6e8;
  --card-red:     #b3392f;
  --nav-veil:     rgba(6, 11, 20, 0.85);  /* sticky nav glass */
}

/* ── "Obsidian" theme ────────────────────────────────────────────────────
   The game's original default (gold on near-black), kept in case we switch
   back. Activated by data-theme="obsidian" on <html>; the nav toggle that
   drives it is currently hidden — flip SHOW_TOGGLE in js/theme.js to
   restore the switch. */
:root[data-theme="obsidian"] {
  --bg:           #0a0805;   /* m3 background        */
  --surface:      #0e0b06;   /* m3 surface           */
  --surface-2:    #14110b;   /* m3 surfaceVariant    */
  --frame:        #caa133;   /* board border         */
  --ink:          #f3dd9a;   /* m3 onSurface         */
  --muted:        #cbb783;   /* m3 onSurfaceVariant  */
  --silver:       #cdd5e2;   /* m3 secondary         */
  --line:         rgba(184, 134, 11, 0.45);  /* m3 outline        */
  --line-soft:    rgba(184, 134, 11, 0.20);  /* m3 outlineVariant */
  --nav-veil:     rgba(10, 8, 5, 0.85);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(240, 198, 74, 0.10), transparent 60%);
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Gold-gradient display text (GoldTitleBrush) ───────────────────────── */
.gold-title {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-weight: 700;
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold); /* fallback */
}

h1, h2, h3 { font-family: 'Cinzel', 'Times New Roman', serif; font-weight: 600; }

/* ── Top navigation ────────────────────────────────────────────────────── */
.site-nav {
  border-bottom: 1px solid var(--line-soft);
  background: var(--nav-veil);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.site-nav .bar {
  max-width: 960px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 12px;
}
.site-nav .brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 17px; letter-spacing: 0.14em;
}
.site-nav .brand .brand-logo { width: 22px; height: 22px; display: block; }
.site-nav .links { margin-left: auto; display: flex; gap: 24px; align-items: center; }
.site-nav .links a {
  color: var(--muted); text-decoration: none;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.site-nav .links a:hover, .site-nav .links a.active { color: var(--gold); }

/* Theme toggle button (injected into the nav by js/theme.js) */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; cursor: pointer;
  border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 7px 14px;
  color: var(--muted);
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif; font-weight: 600;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold); }
.theme-toggle[aria-pressed="true"] {
  color: var(--gold);
  border-color: var(--line);
  background: rgba(240, 198, 74, 0.08);
}
.theme-toggle .swatch {
  width: 12px; height: 12px; border-radius: 50%;
  background: #0a0805; /* the Obsidian board color this toggle switches to */
  border: 1px solid var(--line);
}

/* ── Buttons (GoldButtonBrush) ─────────────────────────────────────────── */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--gold-bright) 55%, var(--gold-deep) 100%);
  color: var(--ink-on-gold);
  font-family: 'Cinzel', serif; font-weight: 700;
  font-size: 15px; letter-spacing: 0.08em;
  padding: 14px 30px; border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 4px 24px rgba(240, 198, 74, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 32px rgba(240, 198, 74, 0.4); }
.btn-gold .btn-icon, .btn-outline .btn-icon { width: 20px; height: 20px; display: block; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--gold);
  font-family: 'Cinzel', serif; font-weight: 600;
  font-size: 15px; letter-spacing: 0.08em;
  padding: 14px 30px; border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-outline:hover { border-color: var(--gold); background: rgba(240, 198, 74, 0.06); }

/* ── Store badges ──────────────────────────────────────────────────────── */
.store-badges { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 22px 10px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(240, 198, 74, 0.18);
}
.store-badge .glyph { font-size: 30px; color: var(--gold); line-height: 1; }
.store-badge .txt { text-align: left; line-height: 1.25; }
.store-badge .txt .small { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.store-badge .txt .big { display: block; font-family: 'Cinzel', serif; font-size: 17px; font-weight: 600; color: var(--gold-pale); }
.store-badge.soon { opacity: 0.55; cursor: default; pointer-events: none; }
.store-badge.soon:hover { border-color: var(--line); transform: none; box-shadow: none; }

/* ── Cards / panels ────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 26px 26px;
}

/* ── Tutorial video (how-to-play) ──────────────────────────────────────── */
.video-panel { margin: 8px 0 44px; scroll-margin-top: 80px; }
.video-panel h2 { margin-top: 0; }
.video-panel p { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.video-panel video {
  display: block; width: 100%;
  border-radius: 10px;
  background: #000;
}
.feature-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-grid .panel h3 {
  color: var(--gold);
  font-size: 18px; letter-spacing: 0.04em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.feature-grid .panel h3 .fi { font-size: 22px; }
.feature-grid .panel p { color: var(--muted); font-size: 14.5px; }

/* ── Section headings ──────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-title {
  text-align: center;
  font-size: clamp(26px, 4.5vw, 36px);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section-sub {
  text-align: center; color: var(--muted);
  max-width: 620px; margin: 0 auto 40px;
  font-size: 15.5px;
}
.rule { border: none; border-top: 1px solid var(--line-soft); margin: 0; }

/* ── Playing-card chip (mirrors RulesDialog's mini card tags) ──────────── */
.card-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 54px; min-width: 40px;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--card-white) 0%, #f0e4c6 100%);
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 17px;
  color: var(--ink-on-gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.card-chip.red { color: var(--card-red); }
.card-chip.small-tag { font-size: 12px; }

/* ── Content pages (policy / terms / rules) ────────────────────────────── */
.page-header {
  text-align: center;
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 48px;
}
.page-header .crown-mark { line-height: 0; margin-bottom: 12px; }
.page-header .crown-mark img { width: 40px; height: 40px; }
.page-header h1 { font-size: clamp(30px, 5.5vw, 46px); letter-spacing: 0.06em; }
.page-header .effective { color: var(--muted); font-size: 14px; margin-top: 14px; font-style: italic; }

.content h2 {
  color: var(--gold);
  font-size: 24px; letter-spacing: 0.03em;
  margin: 44px 0 14px;
}
.content h3 { color: var(--gold); font-size: 18px; margin: 28px 0 10px; }
.content p { margin: 12px 0; }
.content ul { margin: 12px 0 12px 6px; list-style: none; }
.content li { padding-left: 24px; position: relative; margin: 8px 0; }
.content li::before {
  content: "♛"; color: var(--gold); font-size: 12px;
  position: absolute; left: 0; top: 1px;
}
.content a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); }
.content a:hover { color: var(--gold-pale); }
.content strong { color: var(--gold-pale); font-weight: 600; }

.content table {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 10px; overflow: hidden;
  font-size: 14.5px;
}
.content th {
  font-family: 'Cinzel', serif; font-weight: 600;
  color: var(--gold); text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  letter-spacing: 0.05em;
}
.content td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.content tr:last-child td { border-bottom: none; }
.content td.pts { color: var(--gold); white-space: nowrap; font-weight: 600; }

/* Rule rows on the How-to-Play page */
.rule-row {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.rule-row:last-child { border-bottom: none; }
.rule-row .body h4 {
  font-family: 'Cinzel', serif; color: var(--gold-pale);
  font-size: 16px; letter-spacing: 0.04em; margin-bottom: 2px;
}
.rule-row .body p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ── Contact form ──────────────────────────────────────────────────────── */
.contact-form { max-width: 640px; margin: 0 auto; text-align: left; }
.contact-form .field { margin-bottom: 20px; }
.contact-form label {
  display: block;
  font-family: 'Cinzel', serif; font-weight: 600;
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  padding: 12px 14px;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 198, 74, 0.15);
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form ::placeholder { color: var(--muted); opacity: 0.6; }
.type-toggle { display: flex; gap: 12px; flex-wrap: wrap; }
.type-toggle input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.type-toggle .chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.type-toggle .chip:hover { border-color: var(--gold); color: var(--ink); }
.type-toggle input[type="radio"]:checked + .chip {
  border-color: var(--gold);
  background: rgba(240, 198, 74, 0.10);
  color: var(--gold);
}
.type-toggle input[type="radio"]:focus-visible + .chip {
  box-shadow: 0 0 0 3px rgba(240, 198, 74, 0.25);
}
.contact-form .send-row { text-align: center; margin-top: 28px; }
.contact-form button.btn-gold { border: 1px solid var(--gold-deep); cursor: pointer; }
.contact-form button.btn-gold:disabled { opacity: 0.55; cursor: default; }
.form-status { text-align: center; font-size: 14.5px; margin-top: 18px; min-height: 1.4em; color: var(--muted); }
.form-status.ok  { color: var(--gold); }
.form-status.err { color: #E08578; }
.contact-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
.contact-note a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 72px;
  padding: 40px 0 48px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
}
.site-footer .crown { line-height: 0; margin-bottom: 10px; }
.site-footer .crown img { width: 24px; height: 24px; }
.site-footer .co {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  letter-spacing: 0.24em; text-transform: uppercase;
  font-size: 13px; margin-bottom: 14px;
}
.site-footer .co a { color: inherit; text-decoration: none; }
.site-footer .co a:hover { text-decoration: underline; }
.site-footer nav { margin-bottom: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); text-decoration: none; padding: 0 8px; }
.site-footer nav a:hover { color: var(--gold); }
.site-footer nav span { color: var(--line); }

@media (max-width: 560px) {
  .site-nav .links { gap: 14px; }
  .site-nav .brand { font-size: 15px; }
  .section { padding: 44px 0; }
  /* Narrow screens: the toggle collapses to just its navy swatch */
  .theme-toggle { padding: 7px 9px; }
  .theme-toggle .theme-toggle__text { display: none; }
}
