/* ============================================================
   Sleep Better Path — Global Stylesheet
   ============================================================ */

:root {
  --navy-950: #0a1522;
  --navy-900: #0d1b2a;
  --navy-800: #142943;
  --navy-700: #1d3a5c;
  --gold-500: #d4a256;
  --gold-400: #e0b876;
  --gold-300: #ecd2a1;
  --cream-100: #faf6ee;
  --cream-200: #f2ead9;
  --sage-500: #7c9885;
  --sage-300: #b7c9bb;
  --ink-900: #1c1f24;
  --ink-600: #4a4f57;
  --ink-400: #767b83;
  --white: #ffffff;
  --danger: #b3543f;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-soft: 0 12px 32px rgba(13, 27, 42, 0.12);
  --shadow-card: 0 8px 24px rgba(13, 27, 42, 0.08);
  --max-width: 1180px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--cream-100);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  line-height: 1.25;
  margin: 0 0 16px;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; color: var(--ink-600); }

section { padding: 64px 0; }

.section-alt { background: var(--cream-200); }
.section-navy { background: var(--navy-900); color: var(--cream-100); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: var(--sage-300); }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-500);
  margin-bottom: 12px;
}

.center { text-align: center; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  background: var(--navy-950);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(212, 162, 86, 0.2);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}
.brand span { color: var(--gold-400); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--sage-300);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-400); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-950);
    flex-direction: column;
    gap: 0;
    display: none;
    border-top: 1px solid rgba(212,162,86,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-950);
  box-shadow: 0 10px 24px rgba(212, 162, 86, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(212, 162, 86, 0.45); }

.btn-secondary {
  background: transparent;
  color: var(--navy-900);
  border: 2px solid var(--navy-900);
}
.section-navy .btn-secondary { color: var(--white); border-color: var(--gold-400); }

.btn-block { display: block; width: 100%; }
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }

.cta-note {
  font-size: 0.82rem;
  color: var(--ink-400);
  margin-top: 10px;
}
.section-navy .cta-note, .hero .cta-note { color: var(--sage-300); }

/* ---------------- Hero ---------------- */
.hero {
  background: radial-gradient(ellipse at top right, var(--navy-800), var(--navy-950) 70%);
  color: var(--white);
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { color: var(--white); }
.hero p.lead { font-size: 1.15rem; color: var(--sage-300); }

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(212,162,86,0.25);
}

.badge-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.badge {
  font-size: 0.85rem;
  color: var(--sage-300);
  display: flex;
  align-items: center;
  gap: 6px;
}
.badge::before {
  content: "✓";
  color: var(--gold-400);
  font-weight: 700;
}

/* ---------------- Cards / Grids ---------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(13,27,42,0.06);
}

.card .icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream-200);
  color: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

/* ---------------- Review page specific ---------------- */
.rating-stars { color: var(--gold-500); font-size: 1.4rem; letter-spacing: 2px; }

.score-box {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.score-box .cta-note { color: var(--sage-300); }
.score-number {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  color: var(--gold-400);
  font-weight: 700;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }

.pros-cons ul { margin: 0; padding-left: 20px; }
.pros-cons li { margin-bottom: 10px; color: var(--ink-600); }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
  color: var(--ink-600);
}
.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sage-500);
  font-weight: 700;
}
.section-navy .list-check li { color: var(--sage-300); }
.section-navy .list-check li::before { color: var(--gold-400); }

table.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
table.compare-table th, table.compare-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cream-200);
  text-align: left;
  font-size: 0.95rem;
}
table.compare-table th { background: var(--navy-900); color: var(--white); font-family: var(--font-serif); }
table.compare-table tr:last-child td { border-bottom: none; }

/* ---------------- Sticky mobile CTA ---------------- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy-950);
  padding: 12px 16px;
  z-index: 200;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
  display: none;
}
.sticky-cta.show { display: block; }
.sticky-cta .btn { width: 100%; }

/* ---------------- Disclosure banner ---------------- */
.disclosure-strip {
  background: var(--cream-200);
  border: 1px dashed var(--sage-500);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--ink-400);
  margin: 24px 0;
}

/* ---------------- FAQ ---------------- */
.faq-item {
  border-bottom: 1px solid var(--cream-200);
  padding: 20px 0;
}
.faq-item h3 { margin-bottom: 8px; font-size: 1.1rem; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy-950);
  color: var(--sage-300);
  padding: 48px 0 24px;
  font-size: 0.9rem;
}
.site-footer p { color: var(--sage-300); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--white); font-size: 1rem; font-family: var(--font-sans); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--sage-300);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: var(--gold-400); text-decoration: underline; }

/* ---------------- Breadcrumb / article ---------------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-400);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--sage-500); }

.article-body h2 { margin-top: 40px; }
.article-body h3 { margin-top: 28px; color: var(--navy-800); }
.article-body img { border-radius: var(--radius-md); margin: 24px 0; }

.related-guides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .related-guides { grid-template-columns: 1fr; } }

.guide-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(13,27,42,0.06);
}
.guide-card .guide-card-body { padding: 20px; }
.guide-card img { border-radius: 0; margin: 0; aspect-ratio: 16/10; object-fit: cover; }

/* ---------------- Author Bio ---------------- */
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid rgba(13,27,42,0.08);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin: 32px 0;
}
.author-box img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--gold-400);
}
.author-box .author-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--navy-900);
  font-weight: 700;
  margin-bottom: 2px;
}
.author-box .author-role {
  font-size: 0.82rem;
  color: var(--gold-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.author-box p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-600);
}

.author-box-lg {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.author-box-lg img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-400);
  box-shadow: var(--shadow-card);
}
.author-box-lg .author-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy-900);
  margin-bottom: 4px;
}
.author-box-lg .author-role {
  font-size: 0.85rem;
  color: var(--gold-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.author-box-lg .author-bio-text { flex: 1; min-width: 260px; }

/* ---------------- Utility ---------------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.small { font-size: 0.85rem; }
