/*
  Chess Club Merani — site styles.
  Colours come from the club crest: a black shield, a white knight and a
  gold crown (#E5C391). The crest's gold is too light for text on cream,
  so readable gold ink uses the deeper --gold-ink.
*/
:root {
  --bg: #FAF7F0;
  --bg-deep: #F2ECDF;
  --panel: #FFFFFF;
  --ink: #17161A;
  --muted: #5E5A55;
  --gold: #E5C391;
  --gold-ink: #8A6631;
  --line: #E9E0CE;
  --chip: #F4EEE2;
  --medallion: #FAF7F0;
  --shadow: 0 1px 2px rgba(23, 22, 26, .06), 0 8px 24px rgba(23, 22, 26, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111013;
    --bg-deep: #0B0A0C;
    --panel: #1A191C;
    --ink: #EFEBE3;
    --muted: #ADA79D;
    --gold: #E5C391;
    --gold-ink: #E5C391;
    --line: #2E2B27;
    --chip: #222024;
    --medallion: #FAF7F0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Georgian", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: var(--gold-ink); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

/* ── Header ─────────────────────────────────────────── */
.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.topbar-inner {
  max-width: 920px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--medallion); border: 1px solid var(--gold);
  display: grid; place-items: center; flex: none;
}
.brand-mark img { height: 32px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name strong { font-family: "Noto Serif Georgian", Georgia, serif; font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.brand-name span { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

.lang { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 4px; }
.lang button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px;
  font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; min-height: 32px;
}
.lang button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* ── Gold rule, echoing the crown ───────────────────── */
.rule {
  display: flex; align-items: center; gap: 12px; color: var(--gold);
  margin: 18px auto; max-width: 220px;
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--gold); }
.rule span { font-size: 14px; line-height: 1; }

/* ── Home ───────────────────────────────────────────── */
.hero {
  max-width: 920px; margin: 0 auto; padding: 56px 16px 40px; text-align: center;
}
.crest {
  width: 168px; height: 168px; margin: 0 auto; border-radius: 50%;
  background: var(--medallion);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 8px var(--bg), 0 0 0 9px var(--line), var(--shadow);
  display: grid; place-items: center;
}
.crest img { height: 120px; width: auto; }
.hero h1 {
  font-family: "Noto Serif Georgian", Georgia, serif;
  font-size: clamp(30px, 6vw, 44px); line-height: 1.2; margin: 28px 0 6px; font-weight: 700;
}
.hero .sub { color: var(--gold-ink); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; margin: 0; }
.hero .lead { font-size: 18px; max-width: 560px; margin: 0 auto; }
.hero .lead-en { color: var(--muted); max-width: 560px; margin: 8px auto 0; }

.features {
  max-width: 920px; margin: 0 auto; padding: 8px 16px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px;
}
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; box-shadow: var(--shadow);
}
.feature .icon { font-size: 24px; line-height: 1; }
.feature h2 { font-size: 17px; margin: 10px 0 4px; line-height: 1.35; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 16px 16px 8px; }
.button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); color: var(--ink); background: var(--panel);
}
.button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button:hover { border-color: var(--gold); }

/* ── Document pages (privacy) ───────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 36px 16px 48px; }
.doc h1 {
  font-family: "Noto Serif Georgian", Georgia, serif;
  font-size: clamp(26px, 5vw, 34px); line-height: 1.25; margin: 0 0 6px;
}
.doc .date { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.summary {
  background: var(--chip); border-left: 3px solid var(--gold);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 24px;
}
.summary ul { margin: 8px 0 0; padding-left: 20px; }
.summary li { margin: 4px 0; }
.doc section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; margin: 12px 0;
}
.doc h2 { font-size: 18px; margin: 0 0 8px; line-height: 1.35; }
.doc h2 .num { color: var(--gold-ink); margin-right: 6px; }
.doc section p { margin: 8px 0; }
.doc section ul { margin: 8px 0; padding-left: 20px; }
.doc section li { margin: 4px 0; }

[data-lang] { display: none; }
html[lang="ka"] [data-lang="ka"], html[lang="en"] [data-lang="en"] { display: block; }

/* ── Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line); margin-top: 24px;
  color: var(--muted); font-size: 13px; text-align: center; padding: 24px 16px 32px;
}
footer a { color: var(--muted); }
