/* ============================================================
   Heaven Health — Shared SEO-page stylesheet
   Used by /vs/*, /luna, /heaven-score, /biological-age,
   /blood-test-ai, /longevity, /about, /research, /compounds,
   /protocols, /blog, and per-locale homepages.

   Visual brand: heavenly sky palette + Fraunces (display) +
   Nunito (body) + Space Mono (mono). Light theme primary;
   dark prefer-color-scheme supported below.

   This stylesheet is content-first — generous typography,
   strong reading rhythm, low chrome. The main heaven-health.com
   homepage (index.html) has its own elaborate sky animation;
   SEO pages stay calm and focused on text + schema.
   ============================================================ */

:root {
  --gold:       #B68A2E;
  --gold-mid:   #E9C46A;
  --gold-light: #FFE8A8;
  --gold-deep:  #8C6A22;

  --bg:        #FBFCFE;
  --bg2:       #EEF3FA;
  --bg3:       #DCE6F3;
  --surface:   #FFFFFF;
  --surface-2: #F6F9FD;

  --night:     #0B1020;
  --ink:       #1F2A44;
  --ink-body:  #3D4A66;
  --ink-mute:  #5A6680;

  --border:       rgba(95,143,201,0.30);
  --border-soft:  rgba(168,201,238,0.40);
  --border-gold:  rgba(182,138,46,0.30);

  --max-w: 760px;        /* content reading width */
  --max-w-wide: 1080px;  /* tables, comparison grids */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0B1020;
    --bg2:       #0E1A33;
    --bg3:       #122142;
    --surface:   #0E1A33;
    --surface-2: #122142;
    --ink:       #E8EEF8;
    --ink-body:  #C2CCDF;
    --ink-mute:  #8B96AE;
    --border:    rgba(168,201,238,0.18);
    --border-soft: rgba(95,143,201,0.20);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(168,201,238,0.40), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 110%, rgba(233,196,106,0.10), transparent 70%);
  background-attachment: fixed;
}

/* ── Top bar ────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  max-width: var(--max-w-wide);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #FFF, var(--gold-light) 25%, var(--gold-mid) 55%, var(--gold-deep) 100%);
  box-shadow: 0 4px 12px rgba(182,138,46,0.30), inset 0 2px 4px rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.top-cta {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .2s, border-color .2s;
}
.top-cta:hover { background: var(--gold-light); border-color: var(--gold); }

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px clamp(20px, 5vw, 56px) 0;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: 'Space Mono', ui-monospace, monospace;
}
.breadcrumb a { color: var(--ink-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-deep); }

/* ── Main content ───────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 56px) 80px;
}

/* Wide table / grid sections opt-in */
main > section.wide,
main > .wide {
  max-width: var(--max-w-wide);
  margin-left: auto; margin-right: auto;
}

/* ── Typography ─────────────────────────────────────── */
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 24px 0 16px;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  background: linear-gradient(120deg, var(--gold-deep), var(--gold-mid));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  color: var(--ink);
}

h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.25;
  margin: 32px 0 12px;
  color: var(--ink);
}

p, ul, ol, li {
  color: var(--ink-body);
  font-size: 17px;
  line-height: 1.62;
}

p { margin: 14px 0; }

.lede {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-body);
  margin: 8px 0 28px;
}

ul, ol { padding-left: 22px; margin: 14px 0; }
li { margin: 6px 0; }

a {
  color: var(--gold-deep);
  text-decoration-color: var(--gold-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--gold); }

strong, b { color: var(--ink); font-weight: 700; }
em, i { color: var(--ink-body); }

blockquote {
  border-left: 3px solid var(--gold-mid);
  padding: 6px 0 6px 18px;
  margin: 18px 0;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--ink-body);
}

code {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ── Tables (comparison pages) ──────────────────────── */
section.comparison-table { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 18px 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
th {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px;
  letter-spacing: 0.01em;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--surface-2); }

/* ── Cards (compounds/protocols hubs) ───────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color .2s, transform .15s;
}
.card:hover { border-color: var(--gold-mid); transform: translateY(-2px); }
.card h3 { margin-top: 0; }
.card a { display: block; text-decoration: none; color: inherit; }

/* ── Quick-answer / callout boxes ───────────────────── */
.quick-answer, .callout {
  background: linear-gradient(180deg, rgba(233,196,106,0.10), rgba(255,232,168,0.06));
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 28px 0;
}
.quick-answer h2, .callout h2 {
  margin-top: 0;
  font-size: 20px;
  color: var(--gold-deep);
}

/* ── FAQ ────────────────────────────────────────────── */
.faq h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin-top: 28px;
  color: var(--ink);
}
.faq h3:first-of-type { margin-top: 16px; }
.faq p { margin: 8px 0 16px; }

/* ── CTA section ────────────────────────────────────── */
.cta {
  margin: 56px 0 0;
  padding: 36px 28px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  text-align: center;
}
.cta h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 18px;
}
.cta-primary, .cta-secondary {
  display: inline-block;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  margin: 6px 4px;
  transition: transform .15s, box-shadow .2s;
}
.cta-primary {
  background: var(--ink);
  color: #fff;
}
.cta-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.cta-secondary:hover { background: var(--surface-2); border-color: var(--ink-mute); }

/* ── Footer ─────────────────────────────────────────── */
footer {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--ink-mute);
  text-align: center;
}
footer p { font-size: 13px; color: var(--ink-mute); margin: 8px 0; }
footer nav {
  margin: 12px 0;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
footer nav a { color: var(--ink-body); text-decoration: none; margin: 0 4px; }
footer nav a:hover { color: var(--gold-deep); }

/* ── RTL support (Arabic locale) ────────────────────── */
[dir="rtl"] { direction: rtl; text-align: right; }
[dir="rtl"] .breadcrumb,
[dir="rtl"] main,
[dir="rtl"] footer { text-align: right; }
[dir="rtl"] ul, [dir="rtl"] ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .topbar { flex-direction: row-reverse; }
[dir="rtl"] blockquote { border-left: 0; border-right: 3px solid var(--gold-mid); padding-left: 0; padding-right: 18px; }

/* ── Print (for users sharing pages as PDF/print) ───── */
@media print {
  .topbar .top-cta, .cta { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
