/* ---------------------------------------------------------------------------
 * seo.css — shared stylesheet for ChurnMiser's static SEO/GEO marketing pages
 * (comparison pages under /compare/, blog posts under /blog/, /about, hubs).
 *
 * These pages are plain HTML served straight from S3/CloudFront — NOT part of
 * the React SPA — so they ship their own self-contained styling. No JS, no
 * framework: fast first paint and clean source for search + AI crawlers.
 *
 * Brand: Manrope + the app's 60-30-10 palette (see frontend/tailwind.config.js,
 * the single source of truth): off-white surface #f5f3ec (60%), near-black
 * text #1b1b19 (30%), terracotta accent #d97757 with #b0512e for links/text
 * accents (10%). Variable names below are historical (--green era) — the
 * VALUES are the app tokens; don't reintroduce green or the old baby blue.
 * ------------------------------------------------------------------------- */

:root {
  --green: #d97757;        /* app `primary` (terracotta) — accents, buttons */
  --green-dark: #b0512e;   /* app `primary-strong` — links, emphasized text */
  --green-soft: #faede5;   /* terracotta tint — eyebrow/answer-box fills */
  --ink: #1b1b19;          /* app `on-surface` */
  --slate: #56544c;        /* app `on-surface-variant` */
  --slate-light: #7c7970;  /* lighter warm gray for meta text */
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --bg: #f5f3ec;           /* app `surface` (off-white page background) */
  --bg-soft: #ffffff;      /* white containers on the off-white surface */
  --amber-soft: #fffbeb;
  --amber-line: #fde68a;
  --radius: 14px;
  --maxw: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site header ──────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(245, 243, 236, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.05s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* ── Layout ───────────────────────────────────────────────────────────── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.breadcrumb {
  font-size: 13px;
  color: var(--slate-light);
  padding: 18px 0 0;
}
.breadcrumb a { color: var(--slate-light); }
.breadcrumb a:hover { color: var(--ink); }

.hero { padding: 28px 0 8px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-soft);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 16px;
}
.lede { font-size: 19px; color: var(--slate); margin: 0 0 8px; }

h2 {
  font-size: clamp(24px, 3.5vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 800;
  margin: 48px 0 14px;
  scroll-margin-top: 80px;
}
h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }
strong { font-weight: 700; color: var(--ink); }

/* ── TL;DR / answer box (GEO: direct, citable answer up top) ──────────── */
.tldr {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0 8px;
}
.tldr h2 { margin: 0 0 10px; font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-light); }
.tldr p:last-child { margin-bottom: 0; }

/* ── Comparison / feature tables ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
thead th {
  background: var(--bg-soft);
  text-align: left;
  font-weight: 800;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
thead th.churnmiser { color: var(--green-dark); }
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
td.feature { font-weight: 600; color: var(--ink); }
.yes { color: var(--green-dark); font-weight: 700; }
.no { color: var(--slate-light); }
.partial { color: #b45309; font-weight: 600; }

/* ── Two-column "where each wins" cards ───────────────────────────────── */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  background: var(--bg-soft);
}
.card.win-churnmiser { border-top: 3px solid var(--green); }
.card.win-other { border-top: 3px solid #94a3b8; }
.card h3 { margin-top: 0; }
.card ul { margin-bottom: 0; }

/* ── Callout ──────────────────────────────────────────────────────────── */
.callout {
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 15px;
}
.callout strong { color: #92400e; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { margin: 16px 0; }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 8px; font-size: 18px; }
.faq-item p:last-child { margin-bottom: 0; }

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 18px;
  padding: 40px 32px;
  text-align: center;
  margin: 56px 0 24px;
}
.cta-band h2 { color: #fff; margin: 0 0 10px; }
.cta-band p { color: #d6d3ca; max-width: 540px; margin: 0 auto 22px; }
.cta-band .btn-primary { font-size: 16px; padding: 13px 26px; }
.cta-band .sub { font-size: 13px; color: #a8a59b; margin: 14px 0 0; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 28px 0 48px;
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  font-size: 13px;
  color: var(--slate-light);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}
.site-footer a { color: var(--slate-light); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }

.updated { font-size: 13px; color: var(--slate-light); margin-top: 4px; }

/* ── Blog-specific ────────────────────────────────────────────────────── */
.post-meta {
  font-size: 14px;
  color: var(--slate-light);
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.toc {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px 18px 40px;
  margin: 24px 0;
}
.toc strong {
  display: block;
  margin: 0 0 8px -18px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-light);
}
.toc li { margin: 5px 0; }

.formula {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.5;
}
.formula .eq {
  font-weight: 700;
  color: var(--ink);
  font-size: 18px;
}
.formula .ex { color: var(--slate); font-size: 15px; margin-top: 8px; }

blockquote {
  margin: 22px 0;
  padding: 6px 0 6px 20px;
  border-left: 4px solid var(--green);
  color: var(--slate);
  font-size: 18px;
}

.key-takeaway {
  background: var(--green-soft);
  border: 1px solid #edc6b2;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 15px;
}
.key-takeaway strong { color: var(--green-dark); }

.related {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 20px;
}
.related h2 { margin-top: 0; }
.related ul { list-style: none; padding: 0; }
.related a { font-weight: 600; }

/* ── Hub pages (/blog and /compare index) ─────────────────────────────── */
.hub-section-label {
  margin: 40px 0 14px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-light);
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin: 0 0 8px;
}
.hub-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--bg-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hub-card:hover {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.hub-card .eyebrow { margin-bottom: 6px; }
.hub-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.35; }
.hub-card h3 a { color: var(--ink); }
.hub-card h3 a:hover { color: var(--green-dark); text-decoration: none; }
.hub-card p { margin: 0 0 10px; font-size: 14.5px; color: var(--slate); }
.hub-card .hub-meta { font-size: 12.5px; color: var(--slate-light); }

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cols { grid-template-columns: 1fr; }
  .nav-cta-text { display: none; }
  .hub-grid { grid-template-columns: 1fr; }

  /* Card padding steps down from 22-24px. At 375px the column is 335px wide
     inside main's own 20px, so 24px of card padding left just 287px of
     content — and a nested list inside one took it to 241px. Desktop keeps the
     roomier value; this block is the phone case only. */
  .tldr,
  .card,
  .formula,
  .cta-band { padding: 16px; }
  .callout { padding: 14px 16px 14px 32px; }

  /* Nested lists lose the double squeeze. */
  .tldr ul,
  .card ul { padding-left: 18px; }

  /* 19px against a 16px body reads as a second headline on a narrow column. */
  .lede { font-size: 17px; }

  /* Breadcrumb, related and footer links measured 18-22px tall, and the
     header's own CTA 41px. 44px is the tap target floor; inline-flex +
     min-height gets there without moving the text.
     The header LOGO link is deliberately not in this list: it is 30px, and
     forcing it to 44 grows the header band on all 27 static pages for a
     target nobody misses. Raise it only alongside a header redesign. */
  .breadcrumb a,
  .related a,
  .site-footer a,
  .site-header .btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
