/* landing/style.css
   Shared document layout for /privacy, /terms, and /support. Visually descends
   from landing/index.html (which keeps its own inline styles — see the
   out-of-scope note there): same tokens, fonts, header/footer chrome.

   Palette: app design-system tokens (lib/design_systems/colors.dart) —
   `background` page surface, forest greens for headings, coinGold strictly
   as accent (link underlines), never text on light surfaces and never a
   large surface. One landing-only derivation flagged inline (text-muted). */

:root {
  --primary: #1C3D2E;        /* primary — deep forest green */
  --primary-mid: #2D5E45;    /* primaryMid */
  --gold: #F4B942;           /* coinGold — accent only */
  --bg: #F7F9F7;             /* background — page surface */
  --card: #FFFFFF;           /* card */
  --text-dark: #111816;      /* textDark */
  --text-muted: #5E6E64;     /* landing-only: textMuted #6B7B72 is 4.2:1 on
                                --bg and 4.5:1 borderline on white —
                                darkened to clear WCAG AA (5.1:1) */
  --border: #E4EAE5;         /* border */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", -apple-system, "Helvetica Neue", sans-serif;
}

/* ── Reset-lite ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, li, address { margin: 0; padding: 0; }
svg { display: block; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  letter-spacing: -0.006em;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--bg);
}

/* Subtle grain — same treatment as the landing page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--gold); color: var(--text-dark); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Chrome (matches landing) ───────────────────────────────────────── */
.wrap {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.site-header { padding-block: 1.5rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.wordmark svg { color: var(--primary-mid); }

.site-footer {
  margin-top: 5rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 1.5rem; }
/* In-paragraph link (the contact email) needs a non-color affordance
   (WCAG 1.4.1); standalone nav links above are exempt */
.site-footer p a {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.site-footer a:hover {
  color: var(--primary);
  border-color: var(--gold);
}

/* ── Document column ────────────────────────────────────────────────── */
.doc {
  max-width: 640px; /* ~70ch measure at 17px DM Sans */
  margin-inline: auto;
  padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 1.5rem 0;
}

.doc h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.8rem + 1.6vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Effective / Last-updated lines under the h1 */
.doc-dates {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2.75rem;
}

.doc h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--primary);
  /* whitespace, not heavy dividers, separates top-level sections */
  margin: 3rem 0 1rem;
}

/* No h3s in the current documents; spec'd so future sections inherit
   a consistent treatment. */
.doc h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 2rem 0 0.75rem;
}

.doc p { margin-bottom: 1.1rem; }

.doc ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 1.1rem;
}
.doc li { margin-bottom: 0.45rem; }
.doc li::marker { color: var(--primary-mid); }

/* DM Sans 700 isn't loaded; 600 is the app's emphasis weight */
.doc strong { font-weight: 600; }

/* Links: forest-green text (AA on white/bg), gold underline as the accent */
.doc a {
  color: var(--primary-mid);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
.doc a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary-mid);
}

/* Contact block — address-like, softly carded */
.doc address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .doc { padding-inline: 1.25rem; }
}
