/* =========================================================================
   BRAND LAYER — editorial tier
   Loaded AFTER styles.css by layouts/editorial-base.njk. Every class is
   prefixed `ed-` so nothing here collides with the base brochure stylesheet.
   Colors and fonts come from the tokens brand.json injects in <head>.
   ========================================================================= */

:root {
  --ed-wrap: 1120px;
  --ed-gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ed-navy-deep: #142338;
  --ed-cream: #F3ECDD;
  --ed-brass-bright: #D4A95C;
  --ed-on-navy-muted: #93A0B4;
  --ed-step: clamp(3.5rem, 7vw, 6rem);
}

.ed-wrap { width: 100%; max-width: var(--ed-wrap); margin-inline: auto; padding-inline: var(--ed-gutter); }
.ed-section { padding-block: var(--ed-step); }
.ed-section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* ---------- shared type ---------- */
.ed-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.17em;
  text-transform: uppercase; color: var(--color-accent); margin: 0 0 1.1rem;
}
.ed-display {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem); line-height: 1.08;
  letter-spacing: -0.012em; color: var(--color-primary);
  margin: 0 0 1.1rem; max-width: 19ch; text-wrap: balance;
}
.ed-display em { font-style: italic; color: var(--color-accent); }
.ed-h2 {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem); line-height: 1.14;
  letter-spacing: -0.01em; color: var(--color-primary); margin: 0 0 0.7rem;
  max-width: 22ch; text-wrap: balance;
}
.ed-h2 em { font-style: italic; color: var(--color-accent); }
.ed-lede { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--color-muted); max-width: 58ch; line-height: 1.68; margin: 0 0 1.6rem; }
.ed-body { max-width: 66ch; }
.ed-body p { margin: 0 0 1.1rem; line-height: 1.75; }
.ed-body h2 { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 1.85rem); color: var(--color-primary); margin: 2.4rem 0 0.9rem; letter-spacing: -0.008em; }
.ed-body h2 em { font-style: italic; color: var(--color-accent); }
.ed-body strong { color: var(--color-primary); font-weight: 600; }
.ed-body a { color: var(--color-primary); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 3px; }

/* ---------- buttons ---------- */
.ed-btn {
  display: inline-block; background: var(--color-primary); color: var(--ed-cream);
  font-family: var(--font-body); font-weight: 500; font-size: 0.95rem;
  padding: 0.85rem 1.6rem; border-radius: 3px; text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}
.ed-btn:hover { background: var(--ed-navy-deep); transform: translateY(-1px); }
.ed-btn--ghost { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.ed-btn--ghost:hover { background: var(--color-primary); color: var(--ed-cream); }
.ed-btn--light { background: var(--ed-cream); color: var(--color-primary); }
.ed-btn--light:hover { background: #fff; }
.ed-link {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: var(--color-primary); text-decoration: none;
  border-bottom: 2px solid var(--color-accent); padding-bottom: 2px;
  transition: color 0.18s ease;
}
.ed-link:hover { color: var(--color-accent); }
.ed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.5rem; }

/* ---------- header ---------- */
.ed-header { background: var(--color-background); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 30; }
.ed-header-in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.05rem; }
.ed-brand { display: inline-flex; align-items: center; text-decoration: none; }
.ed-brand img { height: 34px; width: auto; }
.ed-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.9rem); }
.ed-nav a { font-family: var(--font-body); font-size: 0.92rem; color: var(--color-muted); text-decoration: none; transition: color 0.18s ease; }
.ed-nav a:hover, .ed-nav a[aria-current="page"] { color: var(--color-primary); }
.ed-nav a[aria-current="page"] { border-bottom: 2px solid var(--color-accent); padding-bottom: 2px; }
.ed-nav .ed-btn { color: var(--ed-cream); font-size: 0.88rem; padding: 0.6rem 1.1rem; }
.ed-nav .ed-btn:hover { color: var(--ed-cream); }

/* ---------- hero ---------- */
.ed-hero { background: var(--color-background); padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem); }
.ed-hero .ed-lede { max-width: 54ch; }

/* ---------- credibility strip ---------- */
.ed-strip { background: var(--color-primary); }
.ed-strip-in { display: flex; flex-wrap: wrap; gap: 0.7rem 2.4rem; padding-block: 1.15rem; margin-block: 0; list-style: none; }
.ed-strip li {
  font-family: var(--font-body); font-size: 0.86rem; color: #B9C4D4;
  display: inline-flex; align-items: center; gap: 0.65rem;
}
.ed-strip li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ed-brass-bright); flex: none; }

/* ---------- two-column case ---------- */
.ed-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.ed-split p { line-height: 1.78; margin: 0 0 1rem; }
.ed-closing-note { font-family: var(--font-head); font-style: italic; font-size: 1.1rem; color: var(--color-primary); line-height: 1.55; margin-top: 1.2rem; }
.ed-check { list-style: none; margin: 0; padding: 0; }
.ed-check li { display: flex; gap: 0.95rem; padding: 1rem 0; border-top: 1px solid var(--color-border); line-height: 1.6; }
.ed-check li:first-child { border-top: none; padding-top: 0; }
.ed-check .ed-tick {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-surface); border: 1px solid var(--color-border);
  color: var(--color-accent); display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; margin-top: 2px;
}
.ed-check b { color: var(--color-primary); font-weight: 600; }
.ed-check span.t { color: var(--color-muted); }

/* ---------- service pillars ---------- */
.ed-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.35rem; }
.ed-pillar {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.2rem);
}
.ed-pillar .ed-kicker {
  font-family: var(--font-body); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent); margin: 0 0 0.85rem;
}
.ed-pillar h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.45rem; color: var(--color-primary); margin: 0 0 0.6rem; }
.ed-pillar > p { color: var(--color-muted); line-height: 1.7; margin: 0 0 1.1rem; font-size: 0.97rem; }
.ed-plist { list-style: none; margin: 0; padding: 0; }
.ed-plist li { font-size: 0.9rem; padding: 0.55rem 0; border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ed-plist li:first-child { border-top: none; }
.ed-plist b { color: var(--color-primary); font-weight: 600; }
.ed-plist span { color: var(--color-muted); }

/* ---------- process ---------- */
.ed-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.ed-step { background: var(--color-background); padding: clamp(1.4rem, 2.6vw, 1.9rem); }
.ed-step .n { font-family: var(--font-head); font-style: italic; font-weight: 500; font-size: 1.6rem; color: var(--color-accent); line-height: 1; margin-bottom: 0.8rem; opacity: 0.75; }
.ed-step h4 { font-family: var(--font-body); font-size: 0.98rem; font-weight: 600; color: var(--color-primary); margin: 0 0 0.4rem; }
.ed-step p { font-size: 0.87rem; color: var(--color-muted); line-height: 1.6; margin: 0; }

/* ---------- closing block ---------- */
.ed-closing { background: var(--color-primary); border-radius: var(--radius); padding: clamp(2.8rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); text-align: center; }
.ed-closing h2 { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.7rem, 3.8vw, 2.6rem); line-height: 1.14; color: var(--ed-cream); margin: 0 auto 0.9rem; max-width: 24ch; text-wrap: balance; }
.ed-closing h2 em { font-style: italic; color: var(--ed-brass-bright); }
.ed-closing p { color: var(--ed-on-navy-muted); max-width: 54ch; margin: 0 auto 1.7rem; line-height: 1.7; }

/* ---------- page header (interior) ---------- */
.ed-pagehead { background: var(--color-background); padding-block: clamp(3rem, 6vw, 4.5rem) 0; }
.ed-pagehead .ed-display { max-width: 20ch; margin-bottom: 0.9rem; }
.ed-pagehead .ed-lede { margin-bottom: 0; }

/* ---------- footer ---------- */
.ed-footer { background: var(--color-primary); color: var(--ed-on-navy-muted); }
.ed-footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: clamp(2.2rem, 4vw, 3rem); }
.ed-footer img { height: 30px; width: auto; }
.ed-footer .tag { font-family: var(--font-head); font-style: italic; color: var(--ed-cream); margin: 0.9rem 0 0; font-size: 1rem; }
.ed-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.ed-footer a { color: var(--ed-on-navy-muted); text-decoration: none; font-size: 0.9rem; }
.ed-footer a:hover { color: var(--ed-cream); }
.ed-footer .meta { font-size: 0.85rem; line-height: 1.9; text-align: right; }
.ed-footer-legal { border-top: 1px solid rgba(243, 236, 221, 0.14); padding-block: 1.1rem; font-size: 0.8rem; color: #77869B; }

/* ---------- mobile menu toggle ---------- */
.ed-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.ed-nav-label { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.45rem; }
.ed-nav-label span { width: 24px; height: 2px; background: var(--color-primary); border-radius: 2px; }
.ed-nav-toggle:focus-visible ~ .ed-nav-label { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .ed-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .ed-split, .ed-pillars { grid-template-columns: 1fr; }
  .ed-nav-label { display: flex; }
  .ed-header-in { flex-wrap: wrap; }
  .ed-nav {
    display: none; order: 3; width: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    border-top: 1px solid var(--color-border); padding-block: 0.4rem 0.9rem;
  }
  .ed-nav-toggle:checked ~ .ed-nav { display: flex; }
  .ed-nav a { padding: 0.7rem 0.1rem; font-size: 1rem; }
  .ed-nav a[aria-current="page"] { border-bottom: none; color: var(--color-accent); }
  .ed-nav .ed-btn { margin-top: 0.6rem; text-align: center; padding: 0.8rem 1.1rem; font-size: 0.95rem; }
  .ed-footer .meta { text-align: left; }
  .ed-footer-in { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- spacing corrections ---------- */
.ed-body > :first-child { margin-top: 0; }
.ed-closing-wrap { padding-top: 0; }

/* ---------- contact form ---------- */
.ed-form { max-width: 34rem; margin-top: 2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.ed-field { display: flex; flex-direction: column; gap: 0.4rem; }
.ed-field label {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-primary);
}
.ed-field input,
.ed-field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 4px; padding: 0.7rem 0.8rem; width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ed-field textarea { resize: vertical; min-height: 7rem; }
.ed-field input:focus,
.ed-field textarea:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(165, 129, 60, 0.16);
}
.ed-form button { align-self: flex-start; border: none; cursor: pointer; font-family: var(--font-body); }

/* ---------- pillar "learn more" link ---------- */
.ed-pillar-link { margin: 1.1rem 0 0; }

/* =========================================================================
   v2 — problem-first homepage (2026-09-13)
   ========================================================================= */

/* Header: sharper, bolder (client request) */
.ed-header-in { padding-block: 1.15rem; }
.ed-brand img { height: 36px; }
.ed-nav { gap: clamp(1.1rem, 2.3vw, 2.1rem); }
.ed-nav a {
  font-size: 0.9rem; font-weight: 600; color: var(--color-primary);
  letter-spacing: -0.005em;
}
.ed-nav a:not(.ed-btn):hover { color: var(--color-accent); }
.ed-nav a[aria-current="page"] { color: var(--color-primary); border-bottom-width: 2px; }
.ed-nav .ed-btn { font-weight: 600; letter-spacing: -0.005em; padding: 0.66rem 1.2rem; }

/* Hero trust lines */
.ed-trust { list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-direction: column; gap: 0.62rem; }
.ed-trust li { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 1rem; color: var(--color-text); line-height: 1.5; }
.ed-trust .ed-tick { flex: none; width: 21px; height: 21px; margin-top: 1px; font-size: 0.62rem; }

/* Ghost button on navy grounds */
.ed-btn--ghost-light { border-color: var(--ed-cream); color: var(--ed-cream); background: transparent; }
.ed-btn--ghost-light:hover { background: var(--ed-cream); color: var(--color-primary); }
.ed-closing-actions { display: flex; justify-content: center; }
.ed-closing-actions .ed-actions { justify-content: center; }

/* Flagship tag */
.ed-pillar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ed-flag {
  flex: none; font-family: var(--font-body); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--color-primary);
  background: rgba(165, 129, 60, 0.16); border-radius: 3px; padding: 0.22rem 0.5rem;
  position: relative; top: -0.15rem;
}

/* Inline sub-service list (homepage pillars) */
.ed-plist-inline {
  font-size: 0.88rem; color: var(--color-muted); line-height: 1.75;
  margin: 0; padding-top: 0.9rem; border-top: 1px solid var(--color-border);
}

/* Specialized programs — deliberately quiet, no cards */
.ed-specialized { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.8rem 2.5rem; margin-top: 1.8rem; }
.ed-spec-label {
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--color-accent);
  margin: 0 0 0.7rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--color-border);
}
.ed-specialized ul { list-style: none; margin: 0; padding: 0; }
.ed-specialized li { font-size: 0.96rem; color: var(--color-muted); padding: 0.3rem 0; }
.ed-specialized a { color: var(--color-primary); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 3px; }

/* Trust recap band */
.ed-trustband { background: var(--color-surface); border-block: 1px solid var(--color-border); padding-block: clamp(2.4rem, 5vw, 3.4rem); }
.ed-trustband-head {
  font-family: var(--font-head); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  color: var(--color-primary); margin: 0 0 0.7rem; max-width: 30ch; line-height: 1.22; text-wrap: balance;
}
.ed-trustband-body { color: var(--color-muted); max-width: 68ch; margin: 0; line-height: 1.75; }

/* FAQ */
.ed-faq { margin-top: 1rem; }
.ed-faq-group { margin-bottom: 2.6rem; }
.ed-faq-group > p.ed-eyebrow { margin-bottom: 1.2rem; }
.ed-faq details {
  border-top: 1px solid var(--color-border); padding: 0;
}
.ed-faq details:last-of-type { border-bottom: 1px solid var(--color-border); }
.ed-faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.4rem 1.15rem 0; position: relative;
  font-family: var(--font-head); font-size: 1.16rem; font-weight: 500; color: var(--color-primary);
  line-height: 1.35;
}
.ed-faq summary::-webkit-details-marker { display: none; }
.ed-faq summary::after {
  content: "+"; position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-body); font-size: 1.3rem; font-weight: 400; color: var(--color-accent); line-height: 1;
}
.ed-faq details[open] summary::after { content: "–"; }
.ed-faq summary:hover { color: var(--color-accent); }
.ed-faq summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.ed-faq .ed-faq-answer { padding: 0 2.4rem 1.35rem 0; max-width: 68ch; }
.ed-faq .ed-faq-answer p { margin: 0 0 0.9rem; line-height: 1.75; color: var(--color-text); }
.ed-faq .ed-faq-answer p:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .ed-specialized { grid-template-columns: 1fr; }
}

/* Hero refinements */
.ed-hero .ed-display { max-width: 26ch; }
.ed-hero .ed-lede { max-width: 56ch; margin-bottom: 1.5rem; }
.ed-trust .ed-tick {
  background: transparent; border: none; color: var(--color-accent);
  font-size: 0.85rem; font-weight: 700; width: 16px; height: 16px; margin-top: 3px;
}

/* ---------- optional page portrait (About) ---------- */
/* Turned on per page via a `portrait` block in front matter. Deliberately
   modest: a column beside the prose, never a banner. */
.ed-withportrait {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.25rem);
  align-items: start;
}
.ed-withportrait .ed-body { max-width: 62ch; }
.ed-portrait { margin: 0; }
.ed-portrait img { display: block; width: 100%; height: auto; }
.ed-portrait--matted {
  background: var(--color-surface);
  padding: 10px;
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(24, 42, 66, 0.05);
}
.ed-portrait--matted img { box-shadow: 0 0 0 1px rgba(165, 129, 60, 0.35); }
.ed-portrait-cap {
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-muted);
  margin-top: 0.7rem;
}
.ed-portrait--matted .ed-portrait-cap { margin: 0.7rem 2px 0; }

@media (max-width: 800px) {
  .ed-withportrait { grid-template-columns: 1fr; gap: 1.9rem; }
  .ed-portrait { max-width: 200px; }
}

/* ---------- v3: final-round components ---------- */
/* Visually hidden, still in the text (copy-paste, reader view, previews). */
.ed-vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Points: short lead + one sentence, brass rule above. Used by "What you can
   count on" (home) and "More ways we find savings" (services). Lighter than
   the pillar cards on purpose — supporting detail, not featured services. */
.ed-points {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 2.2rem); margin-top: 1.9rem;
}
.ed-point { border-top: 1px solid var(--color-accent); padding-top: 1.05rem; }
.ed-point h3 {
  font-family: var(--font-head); font-weight: 500; font-size: 1.2rem; line-height: 1.28;
  color: var(--color-primary); margin: 0 0 0.5rem; letter-spacing: -0.005em;
}
.ed-point h3 a { color: inherit; text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 3px; }
.ed-point p { margin: 0; color: var(--color-muted); line-height: 1.65; font-size: 0.97rem; }

/* "What you can count on" — the surface band between pillars and closing. */
.ed-counton {
  background: var(--color-surface); border-block: 1px solid var(--color-border);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

/* Breathing room when the navy closing follows a full-width band. */
.ed-counton + .ed-closing-wrap,
.ed-trustband + .ed-closing-wrap { padding-top: clamp(2.5rem, 5vw, 4rem); }

/* End-of-page link (About → background). */
.ed-endlink { margin-top: 2.2rem !important; padding-top: 1.3rem; border-top: 1px solid var(--color-border); }
.ed-endlink a { font-weight: 500; }

@media (max-width: 980px) { .ed-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ed-points { grid-template-columns: 1fr; } }
