/* =========================================================
   v3 typography override for the legacy subpages.
   Loaded AFTER the page's inline serif styles so it wins.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Roboto+Condensed:wght@400;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --v3-display: 'Anton', 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --v3-cond:    'Roboto Condensed', 'Arial Narrow', sans-serif;
  --v3-body:    'Montserrat', system-ui, -apple-system, sans-serif;
  --v3-primary: #0a3b2c;
  --v3-primary-deep: #062318;
  --v3-gold:    #2d6e4f;
  --v3-cream:   #f4f8f5;
  --v3-line:    #d6e2db;
  --v3-ink:     #1a1a18;
  --v3-ink-soft:#3a4a42;

  /* Subpage palette override — repoints inline-defined heritage vars
     to a unified green + white theme. v3-override.css loads AFTER
     the inline <style> in each subpage, so these win. */
  --green:           #0a3b2c;
  --green-deep:      #062318;
  --green-soft:      #14543f;
  --cream:           #f4f8f5;
  --paper:           #ffffff;
  --paper-warm:      #eef4f0;
  --gold:            #2d6e4f;
  --gold-soft:       #3f8866;
  --oxblood:         #0a3b2c;
  --oxblood-bright:  #14543f;
  --ink:             #1a1a18;
  --ink-soft:        #3a4a42;
  --line:            rgba(10, 59, 44, 0.18);
  --line-soft:       rgba(10, 59, 44, 0.08);
}

/* Catch [data-theme="ccc-heritage"] scopes used by some subpages */
[data-theme="ccc-heritage"] {
  --green:           #0a3b2c;
  --green-deep:      #062318;
  --green-soft:      #14543f;
  --cream:           #f4f8f5;
  --paper:           #ffffff;
  --paper-warm:      #eef4f0;
  --gold:            #2d6e4f;
  --gold-soft:       #3f8866;
  --oxblood:         #0a3b2c;
  --oxblood-bright:  #14543f;
  --ink:             #1a1a18;
  --ink-soft:        #3a4a42;
  --line:            rgba(10, 59, 44, 0.18);
}

/* Body typography */
body,
.body-text,
p,
li,
button,
input,
select,
textarea,
.ccc-form,
.step-body,
.article-body,
.article-deck,
.lede,
.numbers-line {
  font-family: var(--v3-body) !important;
  -webkit-font-smoothing: antialiased;
}
body { font-size: 15px; line-height: 1.55; color: var(--v3-ink); }

/* All Fraunces headings → Anton condensed uppercase */
h1, h2, h3, h4,
.brand, .logo-mark,
.article-title,
.timeline-title,
.impact-title,
.step-title,
.hero h1,
.hero__title,
.menu-link,
.welcome-title,
.deal-title,
.numbers-band-label,
.opportunity-title,
.solution-name,
.event-tile-name {
  font-family: var(--v3-display) !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  font-style: normal !important;
  font-weight: 400 !important;
}

/* Italic emphasis inside headings should stay condensed, not script-italic */
h1 em, h2 em, h3 em, h4 em {
  font-family: var(--v3-display) !important;
  font-style: normal !important;
  color: inherit !important;
}

/* Eyebrows + small labels → uppercase Montserrat (condensed feel) */
.eyebrow,
.article-tag,
.article-byline,
.article-leadin,
.menu-section-label,
.detail-eyebrow,
.solutions-num,
.community-mark,
.section-label,
.timeline-eyebrow,
.impact-eyebrow,
.welcome-eyebrow {
  font-family: var(--v3-cond) !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-style: normal !important;
}

/* Brand mark in legacy headers */
.logo-mark {
  font-size: 18px !important;
  letter-spacing: 0.5px !important;
  color: var(--v3-primary) !important;
}
.logo-mark small {
  display: block !important;
  font-family: var(--v3-cond) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  margin-top: 2px;
}

/* CTAs → v3 button (solid green, uppercase Montserrat) */
.cta,
.cta-secondary,
.btn-primary,
button.cta,
a.cta {
  font-family: var(--v3-body) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 12px 22px !important;
  border-radius: 4px !important;
  background: var(--v3-primary) !important;
  color: #fff !important;
  border: 0 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.cta:hover,
a.cta:hover,
button.cta:hover {
  background: var(--v3-primary-deep) !important;
  transform: translateY(-1px);
  color: #fff !important;
}
.cta-secondary {
  background: transparent !important;
  color: var(--v3-primary) !important;
  border: 1.5px solid var(--v3-primary) !important;
}
.cta-secondary:hover { background: var(--v3-primary) !important; color: #fff !important; }

/* Workflow / steps: keep layout but flatten heading style */
.timeline-title,
.impact-title { font-size: clamp(28px, 4vw, 44px) !important; }
.step-title  { font-size: 22px !important; }
.step-tag    { font-family: var(--v3-cond) !important; text-transform: uppercase !important; letter-spacing: 0.12em !important; }
.step-revenue { font-family: var(--v3-display) !important; color: var(--v3-primary) !important; letter-spacing: 0.5px !important; }
.step-revenue small { font-family: var(--v3-cond) !important; text-transform: uppercase !important; letter-spacing: 0.14em !important; }
.step-math { font-family: var(--v3-cond) !important; font-style: normal !important; color: var(--v3-ink-soft) !important; }
.step-solution { font-family: var(--v3-cond) !important; }

/* Impact cards */
.impact-card-name { font-family: var(--v3-display) !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
.impact-card-link { font-family: var(--v3-cond) !important; }
.impact-benefits li { font-family: var(--v3-body) !important; font-size: 14.5px !important; }

/* Footer */
footer.foot,
.site-footer,
.footer-prev,
.cta-band {
  font-family: var(--v3-body) !important;
}
.cta-band h2 { font-family: var(--v3-display) !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; }
.cta-band a.cta { background: var(--v3-gold) !important; color: var(--v3-primary-deep) !important; }
.cta-band a.cta:hover { background: #2d6e4f !important; }

/* Article (membership values) — fonts only, keep the layout */
.article-title { font-size: clamp(36px, 5vw, 64px) !important; }
.article-value h2 { font-family: var(--v3-display) !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; font-size: clamp(22px, 2.5vw, 28px) !important; }
.article-value-num { font-family: var(--v3-cond) !important; color: #fff !important; }

/* Solution detail pages */
.solution-page h1 { font-size: clamp(38px, 5vw, 64px) !important; }
.delivers-list li { font-family: var(--v3-body) !important; font-size: 16px !important; }
.numbers-line { font-family: var(--v3-display) !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; color: var(--v3-primary) !important; }
.numbers-line em { color: var(--v3-gold) !important; }

/* Top "back to home" links across subpages */
.back-link { font-family: var(--v3-cond) !important; text-transform: uppercase !important; letter-spacing: 0.12em !important; color: var(--v3-primary) !important; }

/* Numbers / stats — kill the Fraunces serif leakage */
.total-num,
.total-num em,
.stat-num,
.stat-num em,
.numbers-line,
.numbers-line em,
.numbers-line strong,
.revenue-card-num,
.revenue-card-num em,
.article-value-num,
.article-title em,
.solution-num,
.event-tile-name,
h1 em, h2 em, h3 em,
.match__name, .match__crest text {
  font-family: var(--v3-display) !important;
  font-style: normal !important;
  letter-spacing: 0 !important;
}
.total-num,
.stat-num,
.revenue-card-num { color: var(--v3-primary) !important; }
.total-num em,
.stat-num em,
.revenue-card-num em,
.numbers-line em,
.article-title em { color: var(--v3-gold) !important; }

/* Hide the placeholder/default subpage header — v3 shell.js will inject the real one */
body.v3-shelled .subpage-header,
body.v3-shelled .header,
body.v3-shelled .site-footer,
body.v3-shelled footer.foot,
body.v3-shelled .footer-prev { display: none !important; }
body.v3-shelled .stage,
body.v3-shelled main { padding-top: 0 !important; }

/* =========================================================
   v3 SHELL — topstrip, nav, footer injected on subpages
   ========================================================= */

body.v3-shelled { padding: 0; margin: 0; }

.v3-shell-topstrip {
  background: var(--v3-ink);
  color: rgba(255,255,255,0.85);
  font-family: var(--v3-body);
  font-size: 11px;
  padding: 8px 0;
}
.v3-shell-topstrip__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.v3-shell-topstrip__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
}
.v3-shell-topstrip__brand {
  font-family: var(--v3-cond);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  font-size: 12px;
}
.v3-shell-topstrip__divider {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.18);
}

.v3-shell-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: #0a3b2c;
  border-bottom: 0;
  color: #fff;
  font-family: var(--v3-body);
}
.v3-shell-nav a { color: #fff !important; }
.v3-shell-nav .v3-shell-brand,
.v3-shell-nav .v3-shell-brand * { color: #fff !important; }
.v3-shell-nav .v3-shell-name small { color: #d4ecdc !important; }
/* Push subpage content down by nav height (matches homepage .nav at 92px) */
body.v3-shelled { padding-top: 112px; }
/* Topstrip sits flush under the fixed nav (body already pads for it) */
.v3-shell-topstrip { margin-top: 0; }
.v3-shell-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 112px;
  gap: 24px;
}
.v3-shell-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--v3-ink);
}
.v3-shell-badge { width: 40px; height: 40px; flex-shrink: 0; }
.v3-shell-badge svg { width: 100%; height: 100%; display: block; }
.v3-shell-logo { display: block; height: 96px; width: 228px; max-width: 54vw; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4)); }
.v3-shell-name {
  font-family: var(--v3-display) !important;
  font-size: 17px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--v3-ink);
}
.v3-shell-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
}
.v3-shell-links > a,
.v3-shell-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.04em;
  color: #fff !important;
  text-transform: none !important;
  text-decoration: none;
  padding: 22px 0;
  white-space: nowrap;
  font-family: var(--v3-body) !important;
  position: relative;
  transition: color 0.2s;
}
.v3-shell-links > a:hover,
.v3-shell-item > a:hover { color: #fff !important; }
.v3-shell-item { position: relative; display: inline-flex; align-items: center; }
.v3-shell-item > a span { font-size: 9px; color: #76726a; }
.v3-shell-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 14px;
}
.v3-shell-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: -16px;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e6e2d6;
  border-top: 3px solid var(--v3-gold);
  box-shadow: 0 24px 48px -24px rgba(10, 59, 44, 0.3);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 220;
}
.v3-shell-item:hover .v3-shell-panel,
.v3-shell-item:focus-within .v3-shell-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.v3-shell-panel a {
  display: block;
  padding: 11px 18px;
  font-family: var(--v3-body) !important;
  font-weight: 600;
  font-size: 13px;
  color: var(--v3-ink) !important;
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: none !important;
}
.v3-shell-panel a:hover { background: #eef4f0; color: var(--v3-primary) !important; }
.v3-shell-panel__label {
  display: block;
  padding: 8px 18px 4px;
  font-family: var(--v3-cond) !important;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
}
.v3-shell-panel__divider {
  display: block;
  height: 1px;
  margin: 6px 14px;
  background: #e6e2d6;
}
.v3-shell-panel--wide { min-width: 280px; right: -16px; left: auto; }

.v3-shell-cta { display: flex; gap: 8px; }
.v3-shell-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--v3-body) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 8px 14px !important;
  border-radius: 4px !important;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s;
}
.v3-shell-nav a.v3-shell-btn--ghost { color: #fff !important; border-color: rgba(255,255,255,0.55) !important; background: transparent !important; }
.v3-shell-nav a.v3-shell-btn--ghost:hover { background: rgba(255,255,255,0.12) !important; border-color: #fff !important; color: #fff !important; }
.v3-shell-nav a.v3-shell-btn--solid { background: #fff !important; color: #0a3b2c !important; border-color: #fff !important; }
.v3-shell-nav a.v3-shell-btn--solid:hover { background: #eef4f0 !important; color: #062318 !important; }

.v3-shell-burger { display: none; width: 44px; height: 44px; flex-direction: column; gap: 4px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.18); background: rgba(0,0,0,0.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 999px; cursor: pointer; padding: 0; transition: background 0.2s; }
.v3-shell-burger:hover, .v3-shell-burger:focus-visible { background: rgba(0,0,0,0.55); }
.v3-shell-burger span { width: 22px; height: 2px; background: #fff; }

@media (max-width: 1080px) {
  .v3-shell-links { gap: 10px; }
  .v3-shell-links > a, .v3-shell-item > a { font-size: 11px !important; }
  .v3-shell-name { font-size: 13px; }
  .v3-shell-badge { width: 34px; height: 34px; }
}
@media (max-width: 880px) {
  /* Two-column grid: brand left, burger right — no stretchy middle */
  .v3-shell-nav__inner { grid-template-columns: 1fr auto; height: 100px; }
  .v3-shell-burger { display: flex; grid-column: 2; grid-row: 1; justify-self: end; }
  .v3-shell-cta { display: none; }
  /* Match homepage logo size + drop-shadow so it's consistent across all pages */
  .v3-shell-logo {
    height: 88px !important;
    width: 209px !important;
    max-width: 56vw !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.55)) !important;
  }
  .v3-shell-name { display: none; }
  body.v3-shelled { padding-top: 100px; }
  .v3-shell-topstrip { margin-top: 0; display: none; }
  @media (max-width: 359px) {
    .v3-shell-logo { height: 60px !important; width: 142px !important; }
    .v3-shell-nav__inner { height: 72px; }
    body.v3-shelled { padding-top: 72px; }
  }

  /* Full-screen editorial drawer — matches the homepage menu */
  .v3-shell-links {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    background: rgba(12,12,11,0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    padding: 92px 8px calc(32px + env(safe-area-inset-bottom));
    visibility: hidden;
    transform: translateY(-110%);
    transition: transform 0.32s ease, visibility 0s linear 0.32s;
    border-bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 250;
    counter-reset: navitem;
  }
  .v3-shell-links.is-open {
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.32s ease, visibility 0s linear 0s;
  }
  /* "Pages" section label, like the homepage drawer */
  .v3-shell-links::before {
    content: "Pages";
    display: block;
    color: var(--cream, #f4f8f5);
    opacity: 0.55;
    font-family: var(--v3-body);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    padding: 0 20px 18px;
  }
  /* Top-level rows: large, left-aligned, numbered i, ii, iii… */
  .v3-shell-links > a,
  .v3-shell-item > a {
    counter-increment: navitem;
    display: flex !important;
    align-items: center;
    gap: 16px;
    width: 100%;
    color: #fff !important;
    padding: 22px 20px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-family: var(--v3-display);
    font-weight: 700;
    font-size: 24px !important;
    letter-spacing: 0.01em;
    text-align: left;
    justify-content: flex-start;
    background: transparent;
    min-height: 64px;
  }
  .v3-shell-links > a::before,
  .v3-shell-item > a::before {
    content: counter(navitem, lower-roman);
    display: inline-flex;
    justify-content: center;
    width: 34px;
    flex-shrink: 0;
    font-family: var(--v3-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--cream, #f4f8f5);
    opacity: 0.6;
    text-transform: lowercase;
  }
  /* Hide the desktop dropdown chevrons on mobile */
  .v3-shell-item > a span[aria-hidden="true"] { display: none; }
  .v3-shell-item { display: block; width: 100%; }
  .v3-shell-item::after { display: none; }
  /* Sub-links: indented with a hairline rule, like the homepage panels */
  .v3-shell-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 4px 0 14px 14px;
    margin: 0 20px 0 34px;
    border-left: 1px solid rgba(241,234,215,0.18);
  }
  .v3-shell-panel a {
    color: rgba(255,255,255,0.85) !important;
    font-family: var(--v3-body);
    font-weight: 500;
    font-size: 16px !important;
    line-height: 1.4;
    padding: 12px 0 !important;
    text-align: left !important;
    background: transparent;
    border: 0 !important;
    display: block;
  }
  .v3-shell-panel__label {
    color: var(--cream, #f4f8f5) !important;
    text-align: left;
    padding: 10px 0 6px;
    font-family: var(--v3-body);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.65;
  }
  .v3-shell-panel--wide { right: auto; left: auto; }
}

.v3-shell-footer {
  background: var(--v3-primary-deep);
  color: #fff;
  font-family: var(--v3-body);
  padding: 56px 0 0;
  margin-top: 64px;
}
.v3-shell-footer,
.v3-shell-footer *,
.footer,
.footer * { color: #fff !important; }
.v3-shell-footer a:hover,
.footer a:hover { opacity: 0.75; }
.v3-shell-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.v3-shell-footer__col h4 {
  font-family: var(--v3-display) !important;
  font-size: 18px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.v3-shell-footer__col a {
  display: block;
  color: #fff !important;
  text-decoration: none;
  font-size: 13.5px;
  padding: 4px 0;
}
.v3-shell-footer__col a:hover { color: #fff !important; }
.v3-shell-footer__col p {
  color: #fff !important;
  font-size: 13.5px;
  line-height: 1.55;
}
.v3-shell-footer__bottom {
  margin-top: 40px;
  padding: 22px clamp(16px, 3vw, 40px);
  border-top: 1px solid rgba(255,255,255,0.15);
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 880px) {
  .v3-shell-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .v3-shell-footer__inner { grid-template-columns: 1fr; }
}

/* Mobile menu */
.menu-link { font-family: var(--v3-display) !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; font-size: 18px !important; }
.menu-link-num { font-family: var(--v3-cond) !important; }

/* Desktop nav links (legacy nav still uses --green) */
.desktop-nav a,
.desktop-nav button,
.subpage-nav a,
.nav-dropdown a {
  font-family: var(--v3-body) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
}
.nav-dropdown-label { font-family: var(--v3-cond) !important; }
