/* ============================================================
   FairAscent — shared stylesheet
   Design: trustworthy financial-comparison site (NerdWallet/Bankrate tone)
   ============================================================ */

:root {
  --navy: #0b2545;
  --navy-light: #163a68;
  --navy-pale: #eef2f8;
  --gold: #c79a3d;
  --gold-dark: #a87f2e;
  --ink: #14181f;
  --muted: #5b6472;
  --muted-light: #8891a0;
  --bg: #faf9f6;
  --white: #ffffff;
  --border: #e4e2da;
  --success-bg: #eef6ef;
  --success-text: #2c6e49;
  --unit: 16px;
  --radius: 8px;
  --max-width: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}

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

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 2.4em; margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; margin-top: 1.8em; margin-bottom: 0.5em; }
h4 { font-size: 1.05rem; margin-bottom: 0.4em; }

p { margin-bottom: 1.1em; color: var(--ink); }
ul, ol { margin: 0 0 1.1em 1.3em; }
li { margin-bottom: 0.4em; }

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: all .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--white); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-small { padding: 9px 18px; font-size: 13px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 300;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  font-weight: 600;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.blog-link {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 6px;
}
.nav-links a.blog-link:hover { border-color: var(--gold); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span { width: 24px; height: 2px; background: var(--white); display: block; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--muted-light);
  padding: 18px 0 0;
}
.breadcrumb a { color: var(--muted-light); }
.breadcrumb a:hover { color: var(--navy); }

/* ---------- Hero (homepage) ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 72px 0 88px;
  text-align: center;
}
.hero h1 { color: var(--white); max-width: 780px; margin: 0 auto 20px; }
.hero .lede { color: rgba(255,255,255,0.75); max-width: 620px; margin: 0 auto 8px; }
.hero-trust {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}

/* ---------- Category tiles ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: 0 8px 24px rgba(11,37,69,0.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(11,37,69,0.12);
}
.category-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--navy-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.category-card h3 { margin-top: 0; font-size: 1.05rem; }
.category-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.category-card a.card-link { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.category-card a.card-link:hover { color: var(--gold-dark); }

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }

/* ---------- Article / pillar page ---------- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0 40px;
}
.page-header h1 { color: var(--white); }
.page-header .lede { color: rgba(255,255,255,0.75); }
.page-header .breadcrumb { color: rgba(255,255,255,0.5); }
.page-header .breadcrumb a { color: rgba(255,255,255,0.65); }

.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 18px;
}

article.pillar {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}
article.pillar h2:first-child { margin-top: 0; }

.callout {
  background: var(--navy-pale);
  border-left: 4px solid var(--navy);
  border-radius: 0 6px 6px 0;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 14.5px;
}
.callout strong { color: var(--navy); }

.affiliate-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin: 32px 0;
  box-shadow: 0 4px 16px rgba(11,37,69,0.05);
}
.affiliate-box h4 { margin-top: 0; }
.affiliate-box .fine-print { font-size: 12px; color: var(--muted-light); margin-top: 12px; margin-bottom: 0; }

.checklist { list-style: none; margin-left: 0; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--success-text);
  font-weight: 700;
}

.disclosure-banner {
  background: var(--success-bg);
  border: 1px solid #d4e6d8;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--muted);
  margin: 24px 0 0;
}
.disclosure-banner strong { color: var(--success-text); }

.article-footer-disclosure {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--muted-light);
  line-height: 1.6;
}

/* ---------- Comparison table ---------- */
.compare-table-wrap { overflow-x: auto; margin: 28px 0; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.compare th, table.compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table.compare th { background: var(--navy-pale); color: var(--navy); font-weight: 700; }
table.compare tr:last-child td { border-bottom: none; }
table.compare td:first-child { font-weight: 600; color: var(--navy); white-space: nowrap; }

.verdict-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
.verdict-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.verdict-card h4 { color: var(--gold-dark); }

/* ---------- Blog widget ---------- */
.blog-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: box-shadow .15s ease;
}
.blog-post-card:hover { box-shadow: 0 8px 20px rgba(11,37,69,0.08); }
.blog-post-card .post-date { font-size: 12px; color: var(--muted-light); margin-bottom: 8px; }
.blog-post-card h4 { margin-top: 0; font-size: 1rem; }
.blog-post-card h4 a { color: var(--navy); }
.blog-post-card h4 a:hover { color: var(--gold-dark); }
.blog-post-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 0; }
.blog-widget-status { font-size: 13.5px; color: var(--muted-light); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h5 {
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 13.5px; margin-bottom: 9px; }
.footer-col a:hover { color: var(--gold); }
.footer-brand { font-size: 18px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-brand span { color: var(--gold); }
.footer-disclaimer { font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,0.45); max-width: 720px; }
.footer-disclaimer a, .footer-bottom a { color: rgba(255,255,255,0.75); text-decoration: underline; }
.footer-disclaimer a:hover, .footer-bottom a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Legal pages ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal-page h1 { margin-bottom: 6px; }
.legal-sub { font-size: 13px; color: var(--muted-light); margin-bottom: 32px; }
.legal-page h3 { color: var(--navy); }

/* ---------- Cookie consent gate (blocking, same pattern as other FairAscent-family sites) ---------- */
.cookie-banner {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; inset: 0; z-index: 900;
  background: rgba(10,10,10,0.75);
  align-items: center; justify-content: center;
  padding: var(--unit);
}
.cookie-banner.open { display: flex; }
.cookie-inner {
  max-width: 560px; width: 100%;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: calc(var(--unit) * 2.2) calc(var(--unit) * 2);
  display: flex; flex-direction: column; gap: calc(var(--unit) * 1.1);
}
.cookie-inner h4 { margin-top: 0; }
.cookie-text { font-size: 14px; line-height: 1.7; color: var(--muted); }
.cookie-text a { color: var(--gold-dark); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-btn {
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 12px 20px; cursor: pointer; border: 1px solid var(--border); background: none; color: var(--muted);
  border-radius: 6px;
  transition: all 0.2s;
}
.cookie-btn:hover { border-color: var(--gold); color: var(--gold-dark); }
.cookie-btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.cookie-btn.primary:hover { background: var(--gold-dark); color: var(--white); }
body.cookie-lock { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); margin-top: -32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-widget-grid { grid-template-columns: 1fr; }
  .verdict-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: flex-start; padding: 20px 24px; gap: 16px; display: none; border-top: 1px solid rgba(255,255,255,0.1); }
  .nav-links.open { display: flex; }
  .burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 72px; }
  .section { padding: 52px 0; }
  article.pillar { padding: 40px 18px 16px; }
}
