/* ==========================================================================
   High Performance Post Frame — Design System
   Diagram-first, editorial, mountain-modern. Built to port to WP/Gutenberg:
   each .section maps to a block pattern; tokens map to theme.json.
   ========================================================================== */

:root {
  /* Brand tokens */
  --navy: #001C3D;
  --navy-90: #0A2A4E;
  --forest: #2F4A1F;
  --forest-bright: #3E6129;
  --slate: #5E6D7B;
  --cedar: #A05C1F;
  --cedar-bright: #B8721F;
  --stone: #F4F2ED;
  --stone-dark: #E9E5DC;
  --white: #FFFFFF;
  --ink: #1A2430;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --text-xs: 0.78rem;
  --text-sm: 0.9rem;
  --text-base: 1.02rem;
  --text-lg: 1.22rem;
  --text-xl: clamp(1.5rem, 2.6vw, 1.9rem);
  --text-2xl: clamp(1.9rem, 3.6vw, 2.6rem);
  --text-hero: clamp(2.3rem, 5vw, 3.6rem);

  --measure: 68ch;
  --radius: 6px;
  --gap: clamp(1.2rem, 2.5vw, 2rem);
  --section-pad: clamp(3.2rem, 7vw, 5.5rem);
  --shadow: 0 2px 24px rgba(0, 28, 61, 0.09);
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; font-weight: 600; }
h1 { font-size: var(--text-hero); letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); margin-bottom: 0.9rem; }
h3 { font-size: var(--text-lg); margin-bottom: 0.5rem; }
p { max-width: var(--measure); }

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cedar); }

.wrap { width: min(1140px, 92vw); margin-inline: auto; }
.wrap-narrow { width: min(820px, 92vw); margin-inline: auto; }

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.kicker {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cedar);
  margin-bottom: 0.7rem;
}
.lede { font-size: var(--text-lg); color: var(--slate); line-height: 1.6; }
.rule { width: 64px; height: 3px; background: var(--cedar); border: 0; margin: 1.2rem 0; }
.center { text-align: center; }
.center p, .center .lede { margin-inline: auto; }

/* --------------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--cedar);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0; gap: 1rem;
}
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.logo .logo-main {
  font-family: var(--font-display); font-weight: 700;
  color: var(--white); font-size: 1.18rem; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.logo .logo-sub {
  font-size: 0.62rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--cedar-bright); font-weight: 600;
}
.nav { display: flex; gap: 1.35rem; align-items: center; flex-wrap: wrap; }
.nav a {
  color: #C9D2DC; text-decoration: none; font-size: var(--text-sm); font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); border-bottom: 2px solid var(--cedar); }
.nav .nav-cta {
  background: var(--cedar); color: var(--white); padding: 0.5rem 1rem;
  border-radius: var(--radius); font-weight: 600;
}
.nav .nav-cta:hover { background: var(--cedar-bright); border-bottom: 0; }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: 1rem 4vw 1.4rem; gap: 0.9rem; border-bottom: 3px solid var(--cedar);
  }
  .nav.open { display: flex; }
}

/* --------------------------------------------------------------------------
   Sections (Gutenberg-shaped patterns)
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-pad); }
.section-navy { background: var(--navy); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: #C9D2DC; }
.section-navy .lede { color: #AEBBC9; }
.section-white { background: var(--white); }
.section-stonedark { background: var(--stone-dark); }
.section-forest { background: var(--forest); }
.section-forest h2, .section-forest h3 { color: var(--white); }
.section-forest p { color: #D8E0CE; }

/* Hero */
.hero { padding-block: clamp(4rem, 10vw, 7.5rem); position: relative; overflow: hidden; }
.hero .lede { margin-top: 1.1rem; }
.hero-actions { display: flex; gap: 0.9rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--gap); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  display: inline-block; padding: 0.85rem 1.6rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; font-size: var(--text-base);
  border: 2px solid transparent; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--cedar); color: var(--white); }
.btn-primary:hover { background: var(--cedar-bright); color: var(--white); }
.btn-ghost { border-color: var(--slate); color: var(--navy); background: transparent; }
.section-navy .btn-ghost { border-color: #5E6D7B; color: var(--white); }
.btn-ghost:hover { border-color: var(--cedar); color: var(--cedar); }
.btn-forest { background: var(--forest); color: var(--white); }
.btn-forest:hover { background: var(--forest-bright); color: var(--white); }
.btn-note { font-size: var(--text-xs); color: var(--slate); margin-top: 0.6rem; }
.section-navy .btn-note { color: #8FA0B0; }

/* Card grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow); border-top: 3px solid var(--cedar);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: var(--text-sm); color: var(--slate); }
.card .card-link { font-size: var(--text-sm); font-weight: 600; display: inline-block; margin-top: 0.7rem; }
.section-navy .card { background: var(--navy-90); border-top-color: var(--cedar); }
.section-navy .card h3 { color: var(--white); }
.section-navy .card p { color: #AEBBC9; }

/* Driver cards (uncertainty section) */
.driver { border-left: 3px solid var(--forest); background: var(--white); padding: 1.1rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.driver strong { color: var(--navy); display: block; margin-bottom: 0.2rem; }
.driver p { font-size: var(--text-sm); color: var(--slate); }

/* Steps (roadmap) */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; background: var(--white); padding: 1.4rem; border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 700;
  color: var(--stone-dark); position: absolute; top: 0.7rem; right: 1rem;
}
.step h3 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.step p { font-size: var(--text-sm); color: var(--slate); }

/* Story band */
.story-band { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: calc(var(--gap) * 1.5); align-items: center; }
@media (max-width: 900px) { .story-band { grid-template-columns: 1fr; } }
.pullquote {
  font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.35;
  color: var(--white); border-left: 4px solid var(--cedar); padding-left: 1.4rem;
}
.pullquote cite { display: block; font-family: var(--font-body); font-size: var(--text-sm); font-style: normal; color: var(--cedar-bright); margin-top: 1rem; font-weight: 600; }

/* Comparison table */
.compare { width: 100%; border-collapse: collapse; background: var(--white); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; font-size: var(--text-sm); }
.compare th, .compare td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--stone-dark); vertical-align: top; }
.compare thead th { background: var(--navy); color: var(--white); font-family: var(--font-body); letter-spacing: 0.04em; }
.compare tbody th { color: var(--navy); font-weight: 600; width: 26%; }
.compare .highlight { background: #FBF6EE; }
.table-scroll { overflow-x: auto; }

/* FAQ */
.faq details { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 0.8rem; padding: 1.1rem 1.4rem; }
.faq summary { font-weight: 600; color: var(--navy); cursor: pointer; font-size: var(--text-base); }
.faq details p { margin-top: 0.7rem; color: var(--slate); font-size: var(--text-sm); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--navy); }
.field label .opt { color: var(--slate); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: var(--text-base);
  padding: 0.7rem 0.9rem; border: 1.5px solid #C6CDD4; border-radius: var(--radius);
  background: var(--white); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cedar); border-color: var(--cedar); }
.form-note { font-size: var(--text-xs); color: var(--slate); }
.form-status { font-weight: 600; padding: 0.9rem 1.1rem; border-radius: var(--radius); display: none; }
.form-status.ok { display: block; background: #EAF2E3; color: var(--forest); }
.form-status.err { display: block; background: #F7E9E4; color: #8C3B12; }

/* Checklist */
.checklist { list-style: none; max-width: var(--measure); }
.checklist li { padding-left: 1.9rem; position: relative; margin-bottom: 0.65rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.32em;
  width: 0.95em; height: 0.95em; border-radius: 3px;
  background: var(--forest);
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 16%, 84% 2%, 40% 70%);
}
.section-navy .checklist li::before { background: var(--cedar-bright); }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 0.6rem; }
.cta-band .lede { margin-inline: auto; margin-bottom: 1.6rem; }

/* Trust strip */
.trust-strip { display: flex; gap: 2.2rem; flex-wrap: wrap; justify-content: center; padding-block: 1.4rem; font-size: var(--text-sm); color: var(--slate); }
.trust-strip strong { color: var(--navy); display: block; font-size: var(--text-base); }
.trust-strip > div { text-align: center; }

/* Footer */
.site-footer { background: var(--navy); color: #AEBBC9; padding-block: 3rem 2rem; border-top: 3px solid var(--cedar); font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--gap); margin-bottom: 2rem; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: var(--white); font-family: var(--font-body); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.8rem; }
.site-footer a { color: #C9D2DC; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.45rem; }
.footer-tagline { font-family: var(--font-display); color: var(--white); font-size: var(--text-lg); margin-bottom: 0.6rem; }
.footer-legal { border-top: 1px solid #16324F; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--text-xs); color: #7E90A2; }

/* Diagram figure */
.diagram-frame { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.diagram-frame figcaption { font-size: var(--text-xs); color: var(--slate); margin-top: 0.8rem; text-align: center; }

/* Misc */
.eyebrow-list { display: flex; gap: 0.6rem 2rem; flex-wrap: wrap; font-size: var(--text-sm); font-weight: 600; color: var(--navy); }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; }
