/* Styles for the static public pages (generated by scripts/build-site.mjs).
   Deliberately separate from the app's styles.css: these pages ship without the
   app bundle, so they carry their own small stylesheet.

   Design language: "evening espresso bar" — deep espresso ink on rich cream,
   mocha mid-tones, burnt-orange as the working accent, and true gold reserved
   for the luxury details (hairlines, eyebrows, numerals). Fraunces carries the
   display type; Manrope stays for body and UI. */

:root {
  --paper: #f4ecdc;
  --paper-deep: #ecdfc8;
  --card: #fbf6ea;
  --ink: #241a10;
  --ink-soft: #6d5b45;
  --espresso: #21150a;
  --espresso-2: #2e2010;
  --cream-on-dark: #f2e7d3;
  --cream-soft-on-dark: rgba(242, 231, 211, 0.72);
  --line: #e0d2b8;
  --line-strong: #d0bd9c;
  --accent: #b35e1e;
  --accent-deep: #8a4413;
  --accent-soft: rgba(179, 94, 30, 0.09);
  --gold: #b8893b;
  --gold-bright: #d9ae62;
  --gold-soft: rgba(184, 137, 59, 0.16);
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-card: 0 1px 2px rgba(46, 30, 12, 0.05), 0 12px 32px -12px rgba(46, 30, 12, 0.18);
  --shadow-pop: 0 2px 4px rgba(46, 30, 12, 0.08), 0 24px 56px -16px rgba(46, 30, 12, 0.32);
  /* Handmade-paper grain: warm-brown speckle + faint horizontal fibres (laid
     paper) for cream surfaces, and a cream speckle for dark espresso ones.
     SVG turbulence tiles — zero extra requests. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.30  0 0 0 0 0.21  0 0 0 0 0.11  0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
  --fibers: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.28' numOctaves='2' stitchTiles='stitch' seed='11'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0 0.12  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23f)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='gl'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='3' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.95  0 0 0 0 0.88  0 0 0 0 0.72  0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23gl)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    var(--grain),
    radial-gradient(1200px 500px at 85% -100px, rgba(217, 174, 98, 0.14), transparent 70%),
    radial-gradient(900px 420px at -10% 40px, rgba(179, 94, 30, 0.07), transparent 65%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(184, 137, 59, 0.32); }

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ── Header ─────────────────────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(244, 236, 220, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-head::after {
  /* gold hairline under the cream border — the "gilt edge" */
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 137, 59, 0.55) 18%, rgba(184, 137, 59, 0.55) 82%, transparent);
}
.site-head-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px 28px;
  flex-wrap: wrap;
}
.site-logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--espresso);
  text-decoration: none;
  line-height: 1;
}
.site-logo em {
  font-style: italic;
  color: var(--accent);
}
.site-nav {
  display: flex;
  gap: 22px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}
.site-nav a:hover { color: var(--espresso); border-bottom-color: var(--line-strong); }
.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  border-bottom-color: var(--gold);
}
.site-cta {
  background: linear-gradient(160deg, #c26a24, var(--accent) 45%, var(--accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 235, 205, 0.35), 0 8px 18px -8px rgba(138, 68, 19, 0.55);
  color: #fff7ec;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 22px;
  border-radius: 999px;
  white-space: nowrap;
  transition: filter 140ms ease, transform 140ms ease;
}
.site-cta:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ── Page body (article pages) ──────────────────────────────────────── */

.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.page {
  max-width: 68ch;
  padding: 64px 0 88px;
}
.page h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 560;
  font-variation-settings: "opsz" 80;
  margin: 0 0 20px;
  text-wrap: balance;
  color: var(--espresso);
}
.page-lede {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 38px;
}
.page-updated {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: -8px 0 34px;
}
.page h2 {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.005em;
  font-weight: 560;
  margin: 44px 0 14px;
  text-wrap: balance;
  color: var(--espresso);
}
.page p { margin: 0 0 17px; }
.page ul { margin: 0 0 20px; padding-left: 22px; }
.page li { margin-bottom: 10px; }
.page li::marker { color: var(--gold); }
.page strong { font-weight: 700; color: var(--espresso); }
.page-crosslink {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

/* ── Landing page ───────────────────────────────────────────────────── */

.site-main-wide { max-width: 1120px; }

.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0 72px;
}
.hero-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-weight: 560;
  font-variation-settings: "opsz" 120;
  margin: 0 0 22px;
  text-wrap: balance;
  color: var(--espresso);
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero-sub {
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink-soft);
  margin: 0 0 32px;
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.btn-primary,
.btn-ghost {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 30px;
  border-radius: 999px;
  transition: filter 140ms ease, transform 140ms ease, border-color 140ms ease, color 140ms ease;
}
.btn-primary {
  background: linear-gradient(160deg, #c26a24, var(--accent) 45%, var(--accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 235, 205, 0.35), 0 12px 26px -10px rgba(138, 68, 19, 0.6);
  color: #fff7ec;
}
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--espresso);
  background: rgba(251, 246, 234, 0.6);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--accent-deep); }
.hero-note { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* The loop: a dark espresso "menu card" — the landing page's one dramatic
   moment, so it earns real ornament: gold numerals, hairline dividers. */
.loop {
  list-style: none;
  margin: 0;
  padding: 34px 34px 30px;
  background:
    var(--grain-light),
    radial-gradient(420px 220px at 110% -40px, rgba(217, 174, 98, 0.16), transparent 70%),
    linear-gradient(165deg, var(--espresso-2), var(--espresso) 70%);
  border: 1px solid rgba(184, 137, 59, 0.35);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  color: var(--cream-soft-on-dark);
}
.loop li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
  font-size: 15.5px;
  line-height: 1.6;
  padding: 15px 0;
}
.loop li + li { border-top: 1px solid rgba(217, 174, 98, 0.18); }
.loop strong {
  color: var(--cream-on-dark);
  font-family: var(--serif);
  font-weight: 560;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.loop-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
  color: var(--gold-bright);
  padding-top: 3px;
  text-align: center;
}

/* ── Landing strips ─────────────────────────────────────────────────── */

.strip {
  padding: 52px 0;
  border-top: 1px solid var(--line);
}
.strip h2,
.strip p { max-width: 68ch; }
.strip h2 {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: -0.005em;
  font-weight: 560;
  margin: 0 0 16px;
  color: var(--espresso);
}
.strip p { margin: 0 0 18px; }

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 22px;
  background: var(--card);
  background-image: var(--grain), var(--fibers);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.trust-item strong {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 18.5px;
  color: var(--espresso);
}
.trust-item span { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 52px 0 46px; }
}

/* ── Hub cards (/compare, /help) ────────────────────────────────────── */

.card-list {
  display: grid;
  gap: 16px;
  margin: 34px 0 8px;
}
.card {
  display: block;
  background: var(--card);
  background-image: var(--grain), var(--fibers);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.card:hover {
  border-color: var(--gold);
  transform: translateX(3px);
  box-shadow: var(--shadow-pop);
}
.card-title {
  display: block;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 20px;
  letter-spacing: -0.005em;
  color: var(--accent-deep);
  margin-bottom: 5px;
}
.card-hook {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.card-blurb {
  display: block;
  font-size: 15.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .site-cta, .btn-primary, .btn-ghost { transition: none; }
  .card:hover, .site-cta:hover, .btn-primary:hover { transform: none; }
}

/* ── Footer: the dark close ─────────────────────────────────────────── */

.site-foot {
  margin-top: 40px;
  background: var(--grain-light), linear-gradient(180deg, var(--espresso-2), var(--espresso));
  color: var(--cream-soft-on-dark);
  border-top: 1px solid rgba(184, 137, 59, 0.4);
}
.site-foot-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  font-size: 14.5px;
}
.site-foot-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--cream-on-dark);
}
.site-foot-brand em { font-style: italic; color: var(--gold-bright); }
.site-foot-links {
  display: flex;
  gap: 20px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}
.site-foot-links a {
  color: var(--cream-soft-on-dark);
  text-decoration: none;
  transition: color 140ms ease;
}
.site-foot-links a:hover { color: var(--gold-bright); }
.site-foot-copy { color: rgba(242, 231, 211, 0.45); }

@media (max-width: 620px) {
  body { font-size: 16px; }
  /* Logo and CTA share the top row; the nav takes a clean full row below,
     rather than the three ragged rows the default wrap produced. */
  .site-head-inner { padding: 12px 20px 12px; }
  .site-logo { flex: 1 1 auto; }
  .site-nav { order: 3; flex-basis: 100%; gap: 4px 16px; font-size: 14px; }
  .site-cta { order: 2; font-size: 14px; padding: 9px 18px; }
  .page { padding: 46px 0 64px; }
  .loop { padding: 26px 22px 22px; }
  .hero h1 { font-size: clamp(34px, 9vw, 44px); }
}
