/* Shared styles for Chadwick's Revenge SEO landing pages.
   Standalone from the SPA — brand-matched to src/index.css (greens/browns/cream,
   Josefin Sans). Light + dark aware. */

:root {
  --green-900: #14532d;
  --green-800: #1a472a;
  --green-700: #166534;
  --green-600: #1a7a3a;
  --green-500: #22873a;
  --green-100: #d4f0dc;
  --green-50: #eef8f0;
  --brown-800: #5c3d2e;
  --brown-700: #6b4c3a;
  --brown-600: #7c5a3c;
  --brown-300: #c4a882;
  --brown-100: #f0e4d0;
  --cream: #fdfbf7;
  --white: #ffffff;

  --bg: var(--cream);
  --surface: var(--white);
  --surface-alt: var(--green-50);
  --text: var(--brown-800);
  --muted: var(--brown-600);
  --border: var(--brown-300);
  --accent: var(--green-700);
  --accent-hover: var(--green-900);
  --header-bg: var(--green-800);
  --header-text: #fdfbf7;
  --shadow: 0 1px 3px rgba(20, 40, 25, 0.12), 0 8px 24px rgba(20, 40, 25, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1e;
    --surface: #242428;
    --surface-alt: #1e2e24;
    --text: #d4d0cc;
    --muted: #9a958f;
    --border: #3a3a40;
    --accent: #3da35a;
    --accent-hover: #6dc08a;
    --header-bg: #14231a;
    --header-text: #eaf4ec;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  --bg: #1a1a1e;
  --surface: #242428;
  --surface-alt: #1e2e24;
  --text: #d4d0cc;
  --muted: #9a958f;
  --border: #3a3a40;
  --accent: #3da35a;
  --accent-hover: #6dc08a;
  --header-bg: #14231a;
  --header-text: #eaf4ec;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}
:root[data-theme="light"] {
  --bg: var(--cream);
  --surface: var(--white);
  --surface-alt: var(--green-50);
  --text: var(--brown-800);
  --muted: var(--brown-600);
  --border: var(--brown-300);
  --accent: var(--green-700);
  --accent-hover: var(--green-900);
  --header-bg: var(--green-800);
  --header-text: #fdfbf7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Josefin Sans Variable', 'Josefin Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Site header ─────────────────────────────────────────── */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.site-header .brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--header-text);
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-header nav a {
  color: var(--header-text);
  text-decoration: none;
  font-size: 16px;
  opacity: 0.9;
}
.site-header nav a:hover { opacity: 1; text-decoration: underline; }

.btn {
  display: inline-block;
  background: var(--green-600);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: background 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--green-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: 19px; padding: 15px 34px; }
.site-header .btn { padding: 9px 18px; font-size: 15px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--surface-alt), var(--bg));
  border-bottom: 1px solid var(--border);
  padding: 56px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.5px;
}
.hero .lead {
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 28px;
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}
.hero .cta-note { font-size: 15px; color: var(--muted); }

/* ── Sections ────────────────────────────────────────────── */
section { padding: 48px 0; }
section h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  margin: 0 0 8px;
  color: var(--text);
  letter-spacing: -0.3px;
}
section .section-intro { color: var(--muted); margin: 0 0 28px; max-width: 720px; }
section h3 { font-size: 21px; margin: 0 0 6px; color: var(--text); }
p { margin: 0 0 16px; }

.alt-bg { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Benefit cards ───────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card .icon { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }

/* ── Screenshot figures ──────────────────────────────────── */
figure.shot {
  margin: 28px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
figure.shot img { display: block; width: 100%; }
figure.shot figcaption {
  padding: 12px 18px;
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
}
.shot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.shot-row figure.shot { margin-top: 0; }

/* ── Prose lists ─────────────────────────────────────────── */
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.9em;
}

/* Notation table */
.table-wrap { overflow-x: auto; }
table.notation {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
table.notation th, table.notation td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
table.notation th { background: var(--surface-alt); }
table.notation td.sym { font-weight: 700; color: var(--accent); white-space: nowrap; }
table.notation tr:last-child td { border-bottom: none; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; color: var(--accent); font-weight: 400; }
.faq details[open] summary::after { content: '\2013'; }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ── Final CTA band ──────────────────────────────────────── */
.cta-band {
  text-align: center;
  background: var(--header-bg);
  color: var(--header-text);
}
.cta-band h2 { color: var(--header-text); }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 620px; margin: 0 auto 24px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 36px 0;
  font-size: 16px;
}
.site-footer .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  justify-content: space-between;
}
.site-footer h4 { margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .copy { margin-top: 28px; color: var(--muted); font-size: 14px; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .site-header nav .nav-links { display: none; }
  section { padding: 36px 0; }
}
