/* Copyright (c) 2026 Backgammon Gaming Technologies LLC. */
/*
  snap-site/styles.css — the one stylesheet every page of snap.bgsage.ai
  links (/styles.css, absolute, so the /<lang>/ copies the i18n build writes
  resolve it too). The visual system is docs/SNAP.md §2.2: the app's tokens,
  light-first with the dark counterparts under prefers-color-scheme, the
  app's type scale, a 4-pt spacing base and its radii. The site loads NO
  external font or script — the privacy page says it makes no third-party
  requests, so the type is the system stack. Gold and navy are Sage Pro's
  and never appear here; the only brand colour is the logo's maroon.
*/

:root {
  /* §2.2.2 palette — light */
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-alt: #e8e4dd;
  --line: #d8d3ca;
  --ink: #1b1a18;
  --ink2: #5b5751;
  --ink3: #6f6a63;
  --primary-fill: #1b1a18;
  --on-primary: #ffffff;
  --tint: #7a1f2b;
  --tint-soft: #f3e3e5;
  --best: #176b3b;
  --best-soft: #dff1e5;
  --mistake: #1d5fb8;
  --mistake-soft: #dce8f8;
  --blunder: #b3261e;
  --blunder-soft: #faddda;
  --notice: #7a5300;
  --notice-soft: #f3e2b3;

  /* §2.2.3 type scale (size / line) */
  --fs-large-title: 34px; --lh-large-title: 41px;
  --fs-verdict: 24px;     --lh-verdict: 30px;
  --fs-title: 22px;       --lh-title: 28px;
  --fs-move: 20px;        --lh-move: 25px;
  --fs-headline: 17px;    --lh-headline: 22px;
  --fs-body: 17px;        --lh-body: 22px;
  --fs-callout: 15px;     --lh-callout: 20px;
  --fs-footnote: 13px;    --lh-footnote: 18px;
  --fs-caption: 11px;     --lh-caption: 13px;

  /* §2.2.4 spacing (4-pt base) and radii */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px;
  --sp-12: 48px; --sp-16: 64px; --sp-24: 96px;
  --r-control: 10px; --r-card: 14px; --r-button: 16px; --r-pill: 28px; --r-thumb: 8px; --r-sheet: 20px;

  /* The language picker scripts/company_site_i18n.py injects reads these
     company-site variable names (with its own fallbacks): alias them so the
     control takes the page's colours in both modes. */
  --color-text-secondary: var(--ink2);
  --color-border: var(--line);
  --border-hover: var(--ink3);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1e1c19;
    --surface-alt: #2a2824;
    --line: #35322d;
    --ink: #f2efe9;
    --ink2: #b5b0a7;
    --ink3: #8a857c;
    --primary-fill: #f2efe9;
    --on-primary: #141311;
    --tint: #e39aa2;
    --tint-soft: #3a2226;
    --best: #5fcb8a;
    --best-soft: #16301f;
    --mistake: #7fb3f5;
    --mistake-soft: #172b45;
    --blunder: #f07167;
    --blunder-soft: #3d1a17;
    --notice: #f0b84d;
    --notice-soft: #3b2e12;
  }
}

/* ── Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* no horizontal page scroll at any width */
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--tint); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 3px;
  border-radius: var(--r-thumb);
}
h1, h2, h3, p, ul, ol, figure, dl { margin: 0; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--sp-4); }
.narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  padding: var(--sp-2) var(--sp-4);
  background: var(--primary-fill); color: var(--on-primary);
  border-radius: var(--r-control); font-weight: 600; z-index: 10;
}
.skip-link:focus { top: var(--sp-4); text-decoration: none; }

/* Type styles (§2.2.3) */
.large-title { font-size: var(--fs-large-title); line-height: var(--lh-large-title); font-weight: 700; letter-spacing: -0.01em; }
.title { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; }
.headline { font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; }
.callout { font-size: var(--fs-callout); line-height: var(--lh-callout); }
.footnote { font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--ink3); }
.caption {
  font-size: var(--fs-caption); line-height: var(--lh-caption); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--tint);
}
.ink2 { color: var(--ink2); }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand-name { font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; white-space: nowrap; }
.header-cta { display: flex; align-items: center; gap: var(--sp-3); flex: none; }
.header-cta .lang-picker { margin-right: 0; }
.header-cta .lang-picker select { border-radius: var(--r-control); min-height: 36px; }
.btn-ghost {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--sp-3);
  border: 1px solid var(--line); border-radius: var(--r-control);
  color: var(--ink); font-size: var(--fs-callout); line-height: var(--lh-callout); font-weight: 600;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--ink3); text-decoration: none; }
@media (max-width: 479px) { .btn-ghost.hide-narrow { display: none; } }

/* ── Buttons and store badges ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: var(--sp-3) var(--sp-6);
  background: var(--primary-fill); color: var(--on-primary);
  border-radius: var(--r-button); font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600;
  text-align: center;
}
.btn-primary:hover { text-decoration: none; opacity: 0.92; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: var(--sp-3) var(--sp-6);
  border: 1.5px solid var(--ink); border-radius: var(--r-button); color: var(--ink);
  font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; text-align: center;
}
.btn-outline:hover { text-decoration: none; background: var(--surface); }

.badges { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
/* Self-drawn, monochrome: the text is HTML (translatable), the glyph inline
   SVG. See README — the stores' official badge artwork replaces these. */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 56px; padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-3);
  background: var(--primary-fill); color: var(--on-primary); border-radius: var(--r-control);
  flex: 1 1 180px; max-width: 240px;
}
.badge:hover { text-decoration: none; opacity: 0.92; }
.badge-icon { width: 28px; height: 28px; flex: none; fill: currentColor; }
.badge-text { display: flex; flex-direction: column; min-width: 0; }
.badge-small { font-size: var(--fs-caption); line-height: var(--lh-caption); letter-spacing: 0.02em; }
.badge-big { font-size: var(--fs-move); line-height: var(--lh-move); font-weight: 600; white-space: nowrap; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: var(--sp-12) 0 var(--sp-8); }
.hero-inner { display: grid; gap: var(--sp-8); align-items: center; }
.hero h1 { font-size: var(--fs-large-title); line-height: var(--lh-large-title); font-weight: 700; letter-spacing: -0.01em; }
.hero .lede { font-size: var(--fs-verdict); line-height: var(--lh-verdict); color: var(--ink2); margin-top: var(--sp-3); max-width: 22ch; }
.hero .badges { margin-top: var(--sp-6); }
.hero .footnote { margin-top: var(--sp-3); }
@media (min-width: 720px) {
  .hero { padding: var(--sp-16) 0 var(--sp-12); }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: var(--sp-12); }
  .hero h1 { font-size: 44px; line-height: 52px; }
}

/* The screenshot slot: a phone frame around the wooden board. A placeholder
   figure, not a mock screen — the board is the one thing every screen of the
   app shows unchanged. */
.phone { width: min(300px, 100%); margin: 0 auto; }
.phone-screen {
  background: var(--surface); border: 8px solid var(--surface-alt); border-radius: var(--r-pill);
  overflow: hidden;
}
.phone-bar { height: 44px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.phone-bar::before { content: ""; width: 80px; height: 8px; border-radius: 4px; background: var(--surface-alt); }
.phone-screen img { width: 100%; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.phone-panel { padding: var(--sp-4); display: grid; gap: var(--sp-3); }
.skel { display: block; height: 12px; border-radius: 6px; background: var(--surface-alt); }
.skel.w60 { width: 60%; } .skel.w40 { width: 40%; } .skel.w80 { width: 80%; }
.phone figcaption { margin-top: var(--sp-3); text-align: center; font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--ink3); }

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding: var(--sp-12) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: var(--sp-6); }
.section-head h2 { font-size: var(--fs-verdict); line-height: var(--lh-verdict); font-weight: 700; margin-top: var(--sp-1); }
.section-head p { color: var(--ink2); margin-top: var(--sp-2); }
@media (min-width: 720px) {
  .section { padding: var(--sp-16) 0; }
  .section-head h2 { font-size: 30px; line-height: 36px; }
}

.steps { display: grid; gap: var(--sp-4); counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--sp-6); display: grid; gap: var(--sp-2);
}
.step h3 { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; display: flex; align-items: baseline; gap: var(--sp-3); }
.step h3::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--tint-soft); color: var(--tint);
  font-size: var(--fs-callout); line-height: 28px; font-weight: 700; text-align: center;
  align-self: center;
}
.step p { color: var(--ink2); font-size: var(--fs-callout); line-height: var(--lh-callout); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.features { display: grid; gap: var(--sp-4); }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--sp-6); display: grid; gap: var(--sp-2); align-content: start;
}
.feature-icon {
  width: 40px; height: 40px; border-radius: var(--r-control); background: var(--tint-soft); color: var(--tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-2);
}
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; }
.feature p { color: var(--ink2); font-size: var(--fs-callout); line-height: var(--lh-callout); }
@media (min-width: 560px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.verdict-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-1); }
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 24px; padding: 0 var(--sp-2);
  border-radius: var(--r-control); font-size: var(--fs-footnote); line-height: var(--lh-footnote); font-weight: 600;
}
.chip-best { background: var(--best-soft); color: var(--best); }
.chip-blunder { background: var(--blunder-soft); color: var(--blunder); }
.chip svg { width: 14px; height: 14px; fill: currentColor; }

.pricing { text-align: center; }
.pricing h2 { font-size: var(--fs-verdict); line-height: var(--lh-verdict); font-weight: 700; }
.pricing p { color: var(--ink2); margin-top: var(--sp-2); }
.pricing .badges { justify-content: center; margin-top: var(--sp-6); }

.pro {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--sp-6); display: grid; gap: var(--sp-3);
}
.pro h2 { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; }
.pro p { color: var(--ink2); }
.pro .link { font-weight: 600; }
@media (min-width: 720px) {
  .pro { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: var(--sp-8); }
  .pro .link { justify-self: end; }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.footer-inner {
  padding: var(--sp-6) 0; display: flex; flex-direction: column; gap: var(--sp-3);
  font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--ink3); text-align: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2) var(--sp-4); }
.footer-links a { color: var(--ink2); }
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
}

/* ── Documents (privacy, delete account) ─────────────────────────────── */
.doc { padding: var(--sp-12) 0 var(--sp-16); }
.doc h1 { font-size: var(--fs-large-title); line-height: var(--lh-large-title); font-weight: 700; letter-spacing: -0.01em; }
.doc .lede { color: var(--ink2); margin-top: var(--sp-3); line-height: 1.5; }
.doc-meta { font-size: var(--fs-footnote); line-height: var(--lh-footnote); color: var(--ink3); margin-top: var(--sp-3); }
.doc h2 { font-size: var(--fs-title); line-height: var(--lh-title); font-weight: 600; margin-top: var(--sp-8); }
.doc h3 { font-size: var(--fs-headline); line-height: var(--lh-headline); font-weight: 600; margin-top: var(--sp-4); }
/* Prose is read, not scanned: 1.5 leading rather than the 22 px of a UI row. */
.doc p { line-height: 1.5; margin-top: var(--sp-3); }
.doc ul { list-style: none; padding: 0; margin-top: var(--sp-3); display: grid; gap: var(--sp-2); }
.doc li { display: flex; gap: var(--sp-3); line-height: 1.5; }
.doc li .tick { color: var(--tint); flex: none; }
.doc strong { font-weight: 600; }

.methods { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.method {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: var(--sp-4) var(--sp-6);
}
.method h3 { margin-top: 0; }
.method p { color: var(--ink2); }
.path {
  display: inline-block; margin-top: var(--sp-3); padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-control); background: var(--surface-alt); color: var(--ink);
  font-size: var(--fs-footnote); line-height: var(--lh-footnote); font-weight: 600;
}
.callout-note {
  margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-card); background: var(--notice-soft); color: var(--ink);
  border-left: 3px solid var(--notice); line-height: 1.5;
}
.doc .cta { margin-top: var(--sp-6); display: flex; }

/* ── Share landing ───────────────────────────────────────────────────── */
.share { padding: var(--sp-8) 0 var(--sp-16); flex: 1; }
.share h1 { font-size: var(--fs-verdict); line-height: var(--lh-verdict); font-weight: 700; margin-top: var(--sp-1); }
.share .lede { color: var(--ink2); margin-top: var(--sp-2); line-height: 1.5; }
.preview {
  margin-top: var(--sp-6); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden;
}
.preview img { width: 100%; }
.preview figcaption { padding: var(--sp-8) var(--sp-4); text-align: center; color: var(--ink2); font-size: var(--fs-callout); line-height: var(--lh-callout); }
.actions { margin-top: var(--sp-6); display: grid; gap: var(--sp-4); }
.actions .btn-primary { width: 100%; }
.stores-lede { color: var(--ink2); font-size: var(--fs-callout); line-height: var(--lh-callout); margin-bottom: var(--sp-2); }
.pro-pointer { margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-callout); line-height: var(--lh-callout); }
@media (min-width: 720px) { .share { padding: var(--sp-12) 0 var(--sp-24); } .share h1 { font-size: var(--fs-large-title); line-height: var(--lh-large-title); } }
