/* WCH base + shared components.
   Every story page loads tokens.css then base.css, and adds only page-specific CSS after.
   If you write a style here, every page gets it — that is the point. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;         /* Libre Baskerville: Regular + Bold only */
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Layout ---- */
.wrap    { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* GLOBAL VERTICAL RHYTHM (Dan, rule): every content section has the SAME top and bottom
   space — var(--section-y), top == bottom — so the gap from a module's edge to its text is
   identical everywhere. Change the rhythm in ONE place (--section-y in tokens.css). Any new
   module MUST use .section. The only exceptions are the hero (sized to the fold) and the
   footer (its own convention) — nothing else may set its own vertical padding. */
.section { padding: var(--section-y) 0; }
.tinted  { background: var(--surface); }
.center  { text-align: center; }
.grid2   { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }

/* ---- Type ---- */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 16px;
}
.h1    { font-size: var(--fs-hero); line-height: 1.1; }
.h2    { font-size: var(--fs-h2); line-height: 1.18; }
.h3    { font-size: var(--fs-h3); }
.lead  { font-size: var(--fs-lead); color: var(--body); margin-top: 14px; }
.small { font-size: var(--fs-small); }
.muted { color: var(--muted); }

/* Signature treatment: navy headline with ONE key phrase in gold (brand.md) */
.accent { color: var(--gold); }
.hl     { background: linear-gradient(transparent 62%, var(--gold-3) 62%); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 14px; font-weight: 500;
  padding: 13px 24px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(.92); }

/* Reserved for the single highest-intent CTA on a page */
.btn-accent { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn-accent:hover { background: var(--gold-1); }

.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, .03); }

/* Standalone nav pill for the guarantee — its own navy color so it reads as a distinct
   destination, not another teal action or the outlined Sign in. Global across all pages. */
.btn-guarantee { background: var(--navy); color: #fff; }
.btn-guarantee:hover { background: var(--navy-1); }

/* ---- Surfaces ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.chip {
  border: 1px solid var(--line-2); background: #fff;
  border-radius: var(--pill); font-size: 12px;
  color: var(--body); padding: 8px 12px; white-space: nowrap;
}

/* ---- Nav ---- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 253, 253, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 18px; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 14px; color: var(--body); }
.nav-links > a:hover { color: var(--ink); }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item .trigger { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-item .trigger:hover { color: var(--ink); }
.nav-item .trigger i { font-size: 15px; transition: transform .2s; }
.nav-item:hover .trigger i { transform: rotate(180deg); }
.nav-item::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 14px; }
.dropdown {
  position: absolute; top: 100%; left: 50%; margin-top: 8px;
  transform: translateX(-50%) translateY(6px);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 210px;
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--body); white-space: nowrap; }
.dropdown a:hover { background: var(--grey); color: var(--ink); }

/* ---- Footer ---- */
footer.site {
  background: var(--navy); color: #fff;
  padding: 56px 0 32px;
  font-size: var(--fs-small);
}
footer.site a { color: var(--navy-4); }
footer.site a:hover { color: #fff; }

/* ---- Motion (respect reduced motion) ---- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  :root { --section-y: 56px; }
}
