/*
  BucklerForge site chrome — shared by index.html and privacy/index.html.

  cards/index.html is generated (see ~/card-battler/scripts/generate-card-guide.ts) and stays
  self-contained by design, so it keeps its own embedded copy of these same token values instead
  of linking this file. If you change a value here, mirror it there too.
*/

:root {
  /* Sampled straight from assets/icon.png (most-common-pixel scan) — this is the actual brand
     palette, not an invented one: navy bg, silver shield, gold blade, bronze grip, red pommel. */
  --navy-950: #0d1b2e;
  --navy-900: #142d4a;
  --navy-800: #1e4470; /* exact icon background */
  --navy-700: #2a5688;
  --silver-300: #c4ccd4; /* exact icon shield highlight */
  --silver-500: #b7bfc8; /* exact icon shield shadow */
  --slate-600: #5c6672; /* exact icon rivets */
  --gold-300: #ffda6b;
  --gold-400: #f4c542; /* exact icon blade */
  --gold-glow: rgba(244, 197, 66, 0.35);
  --bronze-700: #8a6a0f; /* exact icon grip */
  --red-600: #c0392b; /* exact icon pommel */

  --success: #22c55e;
  --danger: var(--red-600);

  --bg: var(--navy-950);
  --surface: var(--navy-900);
  --surface-raised: var(--navy-800);
  --border: #24405f;
  --text-primary: #eef1f4;
  --text-secondary: var(--silver-500);
  --text-muted: #7f8ea3;
  /* --accent is TEXT — must hold its own on --surface. Gold-on-white measures ~1.6–2.5:1 (fails
     WCAG AA's 4.5:1), so gold only ever appears as a background/decoration below, never as text
     color. --accent is gold-300 here because gold-300 on navy-900 is ~10:1 — plenty, since this
     is the dark-mode branch. */
  --accent: var(--gold-300);
  --accent-strong: var(--gold-300);
  --link: var(--gold-300);
  /* Badge/pill background is always the literal blade gold, independent of light/dark, with dark
     navy text on top (~8.6:1) — see .cost-badge / nav.filters button.active in the card guide. */
  --badge-bg: var(--gold-400);
  --badge-text: var(--navy-900);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef1f4;
    --surface: #ffffff;
    --surface-raised: #f4f7f9;
    --border: #ccd3da;
    --text-primary: var(--navy-900);
    --text-secondary: #3d5a7a;
    --text-muted: #6b7c91;
    /* Gold fails as text on a light surface at any shade worth calling "gold" (best case ~2.5:1).
       Bronze — also a real color straight off the icon's grip, not invented — reads at ~5:1 on
       white, so it's the text-safe accent in light mode; gold stays for backgrounds only. */
    --accent: var(--bronze-700);
    --accent-strong: var(--bronze-700);
    --link: var(--bronze-700);
    --badge-bg: var(--gold-400);
    --badge-text: var(--navy-900);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}

.display {
  font-family: "IBM Plex Sans", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Seam divider — the site's signature motif: a hot line joining sections, like a weld/temper seam. */
.seam {
  border: none;
  height: 2px;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--gold-400) 20%, var(--gold-300) 50%, var(--gold-400) 80%, transparent);
  box-shadow: 0 0 14px 1px var(--gold-glow);
}
.seam--section { margin: 56px 0 36px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "IBM Plex Sans", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 17px;
  color: var(--text-primary);
  text-decoration: none;
}
.site-header .brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--text-primary); }
.site-header nav a[aria-current="page"] { color: var(--accent); }

footer.site-footer {
  text-align: center;
  padding: 28px 20px;
  font-size: 13px;
  color: var(--text-muted);
}
footer.site-footer a { color: var(--link); text-decoration: none; }
footer.site-footer a:hover { text-decoration: underline; }
footer.site-footer .footer-links { margin: 0 0 6px; }
footer.site-footer .footer-links a:not(:last-child)::after { content: "·"; margin: 0 10px; color: var(--text-muted); }

main { max-width: 900px; margin: 0 auto; padding: 48px 20px 64px; }

/* Hero */
header.hero {
  background: radial-gradient(ellipse 70% 100% at 50% 0%, var(--navy-800), var(--navy-950));
  color: #fff;
  text-align: center;
  padding: 64px 20px 52px;
  position: relative;
}
.hero-icon-wrap {
  position: relative;
  display: inline-block;
}
.hero-icon-wrap::before {
  content: "";
  position: absolute;
  inset: -22px;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  z-index: 0;
}
.hero img.icon { position: relative; z-index: 1; width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 6px 28px rgba(0,0,0,0.5); }
.hero h1 { font-size: 44px; margin: 22px 0 8px; color: #fff; }
.hero .tagline { font-size: 17px; color: var(--silver-300); margin: 0 0 30px; }
.store-badges { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.store-badge { display: inline-flex; transition: opacity 0.15s ease; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge:hover { opacity: 0.85; }
.store-badge[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.store-badge[aria-disabled="true"]:hover { opacity: 0.5; }

/* Content sections */
section.description p { font-size: 16px; color: var(--text-secondary); max-width: 640px; }
section.description h2 { font-size: 24px; margin-top: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 32px; }
.feature-grid h3 { font-size: 16px; margin: 0 0 6px; color: var(--text-primary); }
.feature-grid p { font-size: 14px; color: var(--text-secondary); margin: 0; }

section.screenshots h2 { font-size: 24px; }
.shot-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 8px 4px 16px; }
.shot-row img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--border); }
@media (max-width: 700px) {
  .shot-row { grid-template-columns: repeat(2, 1fr); }
}

section.how-to-play h2 { font-size: 24px; margin: 0 0 4px; }
section.how-to-play > p { margin: 0 0 20px; color: var(--text-muted); font-size: 13px; }

.win-lose { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 4px 0 24px; }
.win-lose-card {
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.win-lose-card.win { border-color: var(--success); }
.win-lose-card.lose { border-color: var(--danger); }
.win-lose-card strong { font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.win-lose-card.win strong { color: var(--success); }
.win-lose-card.lose strong { color: var(--danger); }
.win-lose-card span { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }

.rules-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.rules-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.rules-group h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.rules-group dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rules-group dt { font-size: 13px; font-weight: 700; color: var(--accent-strong); }
.rules-group dd { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

.hp-effect-table {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.hp-effect-table h3 { margin: 0 0 6px; font-size: 14px; }
.hp-effect-table > p { margin: 0 0 14px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; max-width: 80ch; }
.hp-effect-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hp-effect-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--border);
}
.hp-effect-table td {
  padding: 10px 10px 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.hp-effect-table td:first-child { color: var(--text-primary); font-weight: 700; white-space: nowrap; }
.hp-effect-table tr:last-child td { border-bottom: none; }

/* Privacy policy page */
.policy-content { max-width: 640px; margin: 0 auto; padding: 40px 20px 64px; }
.policy-content h1 { font-family: "IBM Plex Sans", "Inter", sans-serif; font-weight: 700; font-size: 28px; letter-spacing: 0.01em; }
.policy-content h2 { font-size: 16px; margin-top: 2.2em; color: var(--text-primary); }
.policy-content .updated { color: var(--text-muted); font-size: 0.9rem; }
.policy-content p { color: var(--text-secondary); }
.policy-content a { color: var(--link); }
