/* Health Exchange Group corporate site styles.
   Scoped to the corporate pages only (root, /about, /contact, /partners,
   /learn, /privacy, /terms). No landing page folder loads this file. */

:root {
  --paper: #fbf8f2;
  --cream: #f4eee3;
  --sand: #e9e0cf;
  --line: #dcd2bf;
  --ink: #1a2233;
  --ink-soft: #4a5263;
  --muted: #6b7180;
  --royal: #2443a6;
  --royal-deep: #172e72;
  --royal-tint: #e7ecf8;
  --green: #2c8a63;
  --green-light: #8fc79a;
  --green-grad: linear-gradient(100deg, #237a57 0%, #3f9b6e 45%, #9fd0a0 100%);
  --radius: 6px;
  --radius-lg: 14px;
  --wrap: 1180px;
  --font-display: 'Gambetta', 'Iowan Old Style', 'Georgia', serif;
  --font-body: 'Switzer', 'Segoe UI', system-ui, sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  --text-2xl: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--royal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--royal-deep); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 68ch; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }

/* Utility bar */
.util { background: var(--royal-deep); color: #dfe5f5; font-size: var(--text-xs); }
.util .wrap { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; flex-wrap: wrap; }
.util a { color: #fff; text-decoration: none; font-weight: 500; }
.util a:hover { text-decoration: underline; color: #fff; }

/* Header */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand svg.mark { width: 38px; height: 38px; flex: none; }
.brand .word { display: flex; flex-direction: column; line-height: 1; }
.brand .word b { font-family: var(--font-display); font-weight: 500; font-size: 1.32rem; letter-spacing: -0.01em; }
.brand .word small { font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: var(--green); font-weight: 600; margin-top: .3rem; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: var(--text-sm); font-weight: 500; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--royal); color: var(--ink); }
.nav a.btn { border-bottom: 1px solid var(--royal); padding: .7rem 1.15rem; color: #fff; }
.nav a.btn:hover { border-bottom-color: var(--royal-deep); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .7rem; font: inherit; font-size: var(--text-sm); color: var(--ink); cursor: pointer; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--royal); color: #fff !important; text-decoration: none; font-weight: 600; font-size: var(--text-sm); padding: .8rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--royal); transition: background .15s ease, transform .15s ease; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--royal-deep); border-color: var(--royal-deep); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff !important; }
.btn.light { background: #fff; color: var(--royal-deep) !important; border-color: #fff; }
.btn.light:hover { background: var(--cream); }
.textlink { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-photo { position: relative; }
.hero-photo img { border-radius: var(--radius-lg); aspect-ratio: 4 / 4.4; object-fit: cover; width: 100%; }
.hero-note { position: absolute; left: -1.5rem; bottom: 1.75rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; max-width: 250px; box-shadow: 0 10px 30px -18px rgba(26,34,51,.45); }
.hero-note strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
.hero-note span { font-size: var(--text-xs); color: var(--muted); }

/* Situation chooser */
.chooser { margin-top: 1.75rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.chooser p.q { font-weight: 600; margin-bottom: .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: inherit; font-size: var(--text-sm); background: var(--paper); border: 1px solid var(--line); color: var(--ink); padding: .6rem .95rem; border-radius: 999px; cursor: pointer; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--royal); }
.chip[aria-pressed="true"] { background: var(--royal); color: #fff; border-color: var(--royal); }
.answer { margin-top: 1rem; padding: 1rem 1.1rem; background: var(--royal-tint); border-left: 3px solid var(--royal); border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--text-sm); }
.answer p { margin: 0 0 .5rem; }
.answer p:last-child { margin: 0; }
.hero .alt { margin-top: 1.25rem; font-size: var(--text-sm); color: var(--muted); }

/* Dates band */
.dates { background: var(--ink); color: #f1ede4; }
.dates .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.date-item { padding: 1.6rem 1.5rem 1.6rem 0; }
.date-item + .date-item { border-left: 1px solid rgba(255,255,255,.14); padding-left: 1.5rem; }
.date-item .label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em; color: var(--green-light); font-weight: 600; }
.date-item .when { font-family: var(--font-display); font-size: 1.45rem; margin: .25rem 0; color: #fff; }
.date-item p { font-size: var(--text-sm); color: #c9c6bf; margin: 0; }

/* Sections */
section.block { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.tint { background: var(--cream); }
section.sand { background: var(--sand); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); margin: 0; }
.rule { height: 3px; width: 64px; background: var(--green-grad); border-radius: 3px; margin-bottom: 1.1rem; }

.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.col { padding: 1.75rem 1.75rem 1.5rem 0; }
.col + .col { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.col .num { font-family: var(--font-display); color: var(--royal); font-size: 1rem; margin-bottom: .6rem; display: block; }
.col p { color: var(--ink-soft); font-size: var(--text-sm); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip > :first-child { order: 2; }
.split img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 3 / 2.3; object-fit: cover; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.4rem 3.25rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.15rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--royal); color: var(--royal); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem; }
.steps li strong { display: block; margin-bottom: .2rem; }
.steps li span { color: var(--ink-soft); font-size: var(--text-sm); }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.figure { background: var(--paper); padding: 1.5rem 1.4rem; }
.figure .val { font-family: var(--font-display); font-size: 2rem; color: var(--royal-deep); line-height: 1.1; }
.figure .what { font-weight: 600; font-size: var(--text-sm); margin: .5rem 0 .25rem; }
.figure .src { font-size: var(--text-xs); color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.card img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: 1rem; transition: opacity .2s; }
.card:hover img { opacity: .9; }
.card .meta { font-size: var(--text-xs); color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin: .35rem 0 .45rem; }
.card:hover h3 { color: var(--royal); }
.card p { font-size: var(--text-sm); color: var(--ink-soft); margin: 0; }

.partner-band { background: var(--royal-deep); color: #e6ebf7; padding: clamp(3rem, 6vw, 4.5rem) 0; position: relative; overflow: hidden; }
.partner-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--green-grad); }
.partner-band .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.partner-band h2 { color: #fff; }
.partner-band ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.18); }
.partner-band li { padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.18); font-size: var(--text-sm); }

/* Page heads (interior) */
.page-head { background: var(--cream); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); max-width: 22ch; }
.page-head .lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; margin: 0; }
.crumbs { font-size: var(--text-xs); color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

/* Lists and tables */
.ticks { list-style: none; padding: 0; margin: 1rem 0; }
.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: .65rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55rem; width: .9rem; height: 2px; background: var(--green); }
.facts { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.facts th, .facts td { text-align: left; padding: .8rem .75rem .8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { font-weight: 600; width: 38%; }

.offer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.offer { background: var(--paper); padding: 1.9rem 1.75rem; }
.offer h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; margin-bottom: .5rem; }
.offer p { color: var(--ink-soft); font-size: var(--text-sm); margin-bottom: .75rem; }
.offer .tag { display: inline-block; font-size: var(--text-xs); color: var(--royal); font-weight: 600; letter-spacing: .06em; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.contact-card { border-top: 3px solid var(--royal); background: var(--paper); padding: 1.6rem 1.4rem 1.4rem; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 1px 0 var(--line); }
.contact-card.green { border-top-color: var(--green); }
.contact-card.ink { border-top-color: var(--ink); }
.contact-card h2 { font-size: 1.4rem; }
.contact-card p { font-size: var(--text-sm); color: var(--ink-soft); }
.contact-card .big { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); text-decoration: none; display: inline-block; margin-bottom: .35rem; word-break: break-word; }

/* Article */
.article { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 5vw, 4rem); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.toc { position: sticky; top: 100px; align-self: start; font-size: var(--text-sm); }
.toc p { font-weight: 600; margin-bottom: .5rem; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.toc a { display: block; color: var(--ink-soft); text-decoration: none; padding: .35rem 0 .35rem .8rem; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--royal); border-left-color: var(--royal); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.2rem; font-size: clamp(1.45rem, 1.2rem + .9vw, 1.9rem); }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose .figure-img { margin: 1.75rem 0; }
.prose .figure-img img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.callout { background: var(--cream); border-left: 3px solid var(--green); padding: 1.1rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; font-size: var(--text-sm); }
.callout p:last-child { margin: 0; }
.byline { font-size: var(--text-xs); color: var(--muted); margin-top: 1rem; }
.sources { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--muted); }
.sources ol { padding-left: 1.1rem; }
.cmp { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin: 1.25rem 0; }
.cmp th, .cmp td { border-bottom: 1px solid var(--line); padding: .7rem .6rem .7rem 0; text-align: left; vertical-align: top; }
.cmp thead th { font-weight: 600; color: var(--royal-deep); border-bottom: 2px solid var(--ink); }
.table-scroll { overflow-x: auto; }

.gloss { columns: 2; column-gap: 3rem; }
.gloss div { break-inside: avoid; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.gloss dt { font-weight: 600; }
.gloss dd { margin: .25rem 0 0; color: var(--ink-soft); font-size: var(--text-sm); }

.legal-body { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.legal-body .prose { font-size: var(--text-sm); }
.legal-body .prose h2 { font-size: 1.35rem; }

/* Footer */
.site-foot { background: #121a29; color: #b9bfcc; font-size: var(--text-sm); padding: 3.5rem 0 2rem; }
.site-foot a { color: #e6e9f0; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-bottom: 2.25rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.foot-top .brand { color: #fff; }
.foot-top .brand .word small { color: var(--green-light); }
.foot-top h2 { font-family: var(--font-body); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .14em; color: #8d95a6; margin-bottom: .9rem; font-weight: 600; }
.foot-top ul { list-style: none; padding: 0; margin: 0; }
.foot-top li { margin-bottom: .5rem; }
.foot-addr { margin-top: 1rem; line-height: 1.55; }
.disclaimer { padding-top: 1.75rem; font-size: var(--text-xs); line-height: 1.65; color: #8d95a6; }
.disclaimer p { margin-bottom: .8rem; }

/* Responsive */
@media (max-width: 980px) {
  .hero .wrap, .split, .partner-band .wrap, .section-head { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .hero-photo { max-width: 560px; }
  .hero-note { left: 1rem; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .cards, .contact-grid { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .article { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
}
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .nav.open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: 1rem; padding: .85rem 1.15rem; }
  .menu-btn { display: inline-block; }
}
@media (max-width: 640px) {
  .dates .wrap { grid-template-columns: 1fr; }
  .date-item, .date-item + .date-item { border-left: 0; padding: 1.1rem 0; border-top: 1px solid rgba(255,255,255,.14); }
  .date-item:first-child { border-top: 0; }
  .cols-3, .cards, .contact-grid, .offer-grid, .figures { grid-template-columns: 1fr; }
  .col, .col + .col { padding: 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .gloss { columns: 1; }
  .foot-top { grid-template-columns: 1fr; }
  .util .wrap span.hide-sm { display: none; }
  .hero-note { position: relative; left: auto; bottom: auto; margin: -2.5rem 1rem 0; max-width: none; }
  .brand .word b { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ZIP quote entry (homepage hero) */
.zipform { margin-top: 1.75rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.25rem 1rem; box-shadow: 0 14px 34px -26px rgba(26,34,51,.5); max-width: 520px; }
.zipform label { display: block; font-weight: 600; font-size: var(--text-sm); margin-bottom: .6rem; }
.zip-row { display: flex; gap: .6rem; }
.zip-row input { flex: 1; min-width: 0; height: 52px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 1rem; font: inherit; font-size: 1.05rem; color: var(--ink); letter-spacing: .04em; }
.zip-row input::placeholder { color: #9a9fab; letter-spacing: 0; }
.zip-row input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px rgba(36,67,166,.15); }
.zip-row input[aria-invalid="true"] { border-color: #b4372f; }
.zip-row .btn { height: 52px; padding: 0 1.5rem; font-size: 1rem; white-space: nowrap; }
.zip-err { color: #b4372f; font-size: var(--text-xs); font-weight: 600; margin: .5rem 0 0; }
.zip-note { color: var(--muted); font-size: var(--text-xs); margin: .6rem 0 0; }
.hero .zipform + .chooser { border-top: 0; padding-top: 0; margin-top: 1.5rem; }
@media (max-width: 420px) { .zip-row { flex-direction: column; } .zip-row input { flex: none; width: 100%; } .zip-row .btn { width: 100%; } }
