/* ======================================================================
   Bundle Village — site stylesheet
   Tokens + shared components. Change a colour here, it changes everywhere.

   Rebranded from HealthFirst CRM on 2026-08-17. Token NAMES were kept so the
   ~300 var() references across six pages did not have to change; only the
   VALUES did. So --green now means the sage accent, --ink now means forest,
   --night is the forest lane. Read the comments, not the names.

   The site runs LIGHT — white nav, near-white page, light-sage alternating
   sections — with forest reserved for one dark lane and the buttons, and amber
   for the closing band. Same palette as the client's directory app, which
   itself runs a forest nav; the CRM site keeps its light frame.

   Contrast, measured (brand-kit-bv/check-contrast.py, 38 pairs):
   - Amber #C8860F on white is 3.06:1 — FILL and large-text only. Amber as
     body text uses --amber-text (#97650B, 5.02:1). On forest, --amber-on-night.
   - Sage #3A7055 on white is 5.79:1, so sage is safe as both text and fill.
   - Ink #111827 on amber is 5.81:1 — that is the amber-button text colour.
     Forest on amber is 4.41 and white on amber is 2.1; neither passes.
   - Light-grey hairlines fail the 3:1 non-text floor. Anything clickable uses
     --edge, which is set to clear it on the worst light ground (light sage).
   ====================================================================== */

:root {
  /* Brand — verbatim from the client's directory app */
  --forest:      #16342A;
  --amber:       #C8860F;
  --sage:        #3A7055;
  --sage-light:  #EBF5EF;

  /* Legacy names, re-pointed. --green = the accent FILL, --green-ink = accent
     TEXT on light grounds, --green-deep = the darker end of gradients. */
  --green:       #3A7055;   /* sage: dots, keys, bars, tints */
  --green-rgb:   58,112,85; /* for rgba(var(--green-rgb), .N) tints */
  --green-deep:  #16342A;
  --green-ink:   #3A7055;   /* 5.79:1 on white, 5.19:1 on light sage */
  --ink:         #16342A;   /* forest — dark buttons, skip link, solid fills */

  /* Amber, and the only two ways it may carry text */
  --amber-text:      #97650B;  /* body-size amber on any light ground */
  --amber-on-night:  #CB880F;  /* body-size amber on forest */

  /* Light grounds. Two section grounds — white and light sage — a visible step
     apart so the alternation reads as a decision. --brand-beige survives on
     panel bars and inner surfaces as the client's section-alt grey. */
  --paper:       #FAFAFA;   /* page ground */
  --paper-2:     #EBF5EF;   /* the alternating section ground — light sage */
  --brand-beige: #F4F7F5;   /* inner surfaces, panel bars */
  --surface:     #FFFFFF;

  /* Light-ground text. --text-3 carries the small print and measures 4.53:1
     on light sage, the worst ground it sits on. Do not lighten it. */
  --text:    #111827;
  --text-2:  #374151;
  --text-3:  #686F7D;

  /* Dark lane = forest. Eyebrows on it use --amber-on-night (4.53:1). */
  --night:    #16342A;
  --night-2:  #1E4437;
  --on-night:    #FFFFFF;
  --on-night-2:  rgba(255,255,255,.78);   /* 8.79:1 */
  --on-night-3:  rgba(255,255,255,.60);   /* 5.88:1 */

  /* Hairlines vs. interactive edges — different jobs.
     --line/--line-2 are decorative separators. --edge is the border of
     something clickable and clears the 3:1 non-text floor on light sage. */
  --line:    rgba(17,24,39,.10);
  --line-2:  rgba(17,24,39,.16);
  --line-n:  rgba(255,255,255,.13);
  --edge:    rgba(17,24,39,.50);   /* 3.32:1 on light sage, 3.38:1 on white */
  --edge-n:  rgba(255,255,255,.46); /* 4.08:1 on forest */

  /* Type. Libre Baskerville carries the wordmark and the two biggest heading
     levels; Inter carries everything else — the same pair as the client's app. */
  --f:         'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;

  /* Shape */
  --r:     14px;
  --r-lg:  22px;

  --shadow:    0 2px 4px rgba(17,24,39,.04), 0 12px 28px rgba(17,24,39,.06);
  --shadow-lg: 0 4px 10px rgba(17,24,39,.05), 0 26px 60px rgba(17,24,39,.10);
  --shadow-g:  0 18px 46px rgba(22,52,42,.18);

  --ease: cubic-bezier(.2,.7,.3,1);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  text-wrap: balance;
}
/* The two display levels take the wordmark's face. Baskerville is a book face,
   so it wants a touch more line-height and far less negative tracking than the
   geometric sans it replaced — tight tracking makes its serifs collide. */
h1, h2 { font-family: var(--f-display); font-weight: 700; letter-spacing: -.012em; color: var(--forest); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.65rem); line-height: 1.14; }
h3 { font-size: clamp(1.12rem, 1.5vw, 1.3rem); letter-spacing: -.015em; line-height: 1.24; }
p  { margin: 0 0 16px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* The focus ring is lane-aware. Forest on white is 13.47:1; on the forest
   lane it would be invisible, and on the amber closing band it is 4.41:1 —
   fine, but each lane sets --focus explicitly rather than trusting a default. */
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--focus, var(--forest));
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- Layout */

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap--wide   { width: min(100% - 40px, 1320px); }
.wrap--narrow { width: min(100% - 40px, 800px); }
@media (max-width: 560px) { .wrap, .wrap--wide, .wrap--narrow { width: min(100% - 32px, var(--wrap)); } }

.section { padding-block: clamp(60px, 7.5vw, 112px); }
.section--tight { padding-block: clamp(46px, 5vw, 72px); }

/* The header is sticky, so an in-page jump would otherwise land with the
   section heading tucked underneath it. */
[id] { scroll-margin-top: 88px; }

.lane-paper  { background: var(--paper-2); }
.lane-white  { background: var(--surface); }
.lane-night  { background: var(--night); color: var(--on-night); --focus: #FFFFFF; }
.lane-night h1, .lane-night h2, .lane-night h3 { color: var(--on-night); }
.lane-night p { color: var(--on-night-2); }

.section-head { max-width: 720px; margin-bottom: clamp(34px, 4vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-bottom: 16px; }
.section-head .lead { color: var(--text-2); font-size: 1.06rem; margin: 0; }
.lane-night .section-head .lead { color: var(--on-night-2); }

.lead { font-size: 1.1rem; line-height: 1.62; color: var(--text-2); }

/* ---------------------------------------------------------------- Eyebrow */

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .7rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--green-ink);
  margin-bottom: 18px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  flex-shrink: 0;
}
.lane-night .eyebrow { color: var(--amber-on-night); }
.lane-night .eyebrow .dot { background: var(--amber); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(17,24,39,.04);
  font-size: .82rem; font-weight: 600; color: var(--text-2);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(57,181,74,.18);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease),
              background .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .22s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* Primary: white on forest — 13.47:1. Kept the .btn--green class name so the
   six pages did not need touching; the colour is forest, not green. */
.btn--green {
  background: var(--forest); color: #fff;
  box-shadow: var(--shadow-g);
}
.btn--green:hover { background: var(--night-2); box-shadow: 0 22px 54px rgba(22,52,42,.26); }

.btn--ink { background: var(--forest); color: #fff; }
.btn--ink:hover { background: var(--night-2); }

/* Emphasis: ink on amber — 5.81:1. One per screen, or it stops being emphasis. */
.btn--amber { background: var(--amber); color: var(--text); box-shadow: 0 18px 46px rgba(200,134,15,.22); }
.btn--amber:hover { background: #D4931A; }

.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--edge);
}
.btn--ghost:hover { background: rgba(17,24,39,.05); border-color: rgba(17,24,39,.66); }

/* On the forest lane the primary button flips to amber — forest-on-forest is
   invisible. Ink text on amber, 5.81:1. This is the lane's one amber element. */
.lane-night .btn--green, .lane-night .btn--ink { background: var(--amber); color: var(--text); box-shadow: 0 18px 46px rgba(0,0,0,.25); }
.lane-night .btn--green:hover, .lane-night .btn--ink:hover { background: #D4931A; }
.lane-night .btn--ghost { color: var(--on-night); border-color: var(--edge-n); }
.lane-night .btn--ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.72); }

.btn--lg    { padding: 16px 28px; font-size: 1rem; }
.btn--sm    { padding: 10px 17px; font-size: .875rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* A destination that has not been supplied yet.

   This must be VISIBLE, not just non-functional. A flagship button that looks
   live and silently does nothing reads as broken; one that says so reads as
   unfinished, which is the truth. qa.mjs is what refuses to let either reach
   production. */
a[data-pending] { cursor: not-allowed; }
.btn[data-pending] {
  position: relative;
  filter: saturate(.35);
  opacity: .8;
}
.btn[data-pending]:hover { transform: none; box-shadow: none; }
/* The label only goes on the big page-level CTAs. On a small header button it
   escaped the bar and floated over the hero; there the desaturation carries it. */
.btn--lg[data-pending]::after,
.btn--block[data-pending]::after {
  content: 'Link not set up yet';
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: var(--text-3); white-space: nowrap;
}
/* The label sits below the button, so anything directly under one needs room. */
.btn-row:has(.btn--lg[data-pending]) { margin-bottom: 22px; }

/* ---------------------------------------------------------------- Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .26s var(--ease), box-shadow .26s var(--ease), border-color .26s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-2); font-size: .93rem; margin: 0; }

.card__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(57,181,74,.13);
  color: var(--green-ink);
  margin-bottom: 18px;
}
.card__icon svg { width: 21px; height: 21px; }

/* ---------------------------------------------------------------- Panels */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.panel__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--brand-beige);
}
.panel__dots { display: flex; gap: 6px; }
.panel__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(17,24,39,.14); }
.panel__title {
  font-size: .78rem; font-weight: 700; color: var(--text-2);
  letter-spacing: -.01em;
}
.panel__note {
  margin-left: auto;
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 9px;
  white-space: nowrap;
}
.panel__body { padding: 20px; }

/* ---------------------------------------------------------------- Header */

.site-header {
  position: sticky; top: 0; z-index: 60;
  /* Fairly opaque on purpose: this bar passes over a near-black section, and a
     lighter alpha reads as a muddy grey slab there rather than a beige bar. */
  background: rgba(250,248,243,.93);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
  background: var(--paper);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(17,24,39,.05);
}
.site-header__inner {
  display: flex; align-items: center; gap: 26px;
  height: 70px;
}
.brand img { width: auto; height: 34px; }
/* The inline lockup is 8.3:1, so at 34px tall it is ~280px wide. On phones
   that crowds the menu button; cap the height there so it stays ~200px. */
@media (max-width: 640px) { .brand img { height: 24px; } }

.site-nav { display: flex; gap: 26px; margin-left: 8px; }
.site-nav a {
  font-size: .92rem; font-weight: 600; color: var(--text-2);
  transition: color .2s var(--ease);
}
.site-nav a:hover { color: var(--green-ink); }

.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-actions .login {
  font-size: .92rem; font-weight: 600; color: var(--text-2);
}
.header-actions .login:hover { color: var(--green-ink); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  background: transparent; border: 1px solid var(--edge); color: var(--text);
  cursor: pointer; place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .site-nav, .header-actions .login { display: none; }
  .nav-toggle { display: grid; }
}
@media (max-width: 460px) {
  .header-actions .btn { display: none; }
}

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 90;
  background: var(--paper);
  padding: 20px;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .34s var(--ease);
  visibility: hidden;
}
.mobile-nav.is-open { transform: none; visibility: visible; }
.mobile-nav__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 34px; }
.mobile-nav__top img { height: 24px; width: auto; }
.mobile-nav__links { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav__links a {
  font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.mobile-nav__cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* ---------------------------------------------------------------- Footer */

.site-footer {
  background: var(--night); color: var(--on-night-2); --focus: #FFFFFF;
  padding-block: clamp(48px, 6vw, 74px) 34px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid var(--line-n);
}
.footer-brand img { height: 30px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: .9rem; color: var(--on-night-3); max-width: 34ch; margin: 0; }
.footer-col h4 {
  font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--on-night-3); margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: .92rem; color: var(--on-night-2); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; justify-content: space-between;
  padding-top: 26px;
  font-size: .84rem; color: var(--on-night-3);
}
.footer-bottom nav { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--green); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Reveals

   CSS owns visibility. JS only ever ADDS `.js` to <html> and `.is-in` to an
   element. If the script never runs — throttled tab, blocked file, thrown
   error — nothing is hidden and the page reads normally. A 2.5s failsafe
   reveals everything regardless.
   ---------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .62s var(--ease) var(--d, 0ms), transform .62s var(--ease) var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------- Glow */

.glow { position: absolute; border-radius: 50%; pointer-events: none; }

/* ======================================================================
   AGENT PAGES — course, support, snapshot request, next steps

   These sit BEHIND the sale: the reader is already a customer, already
   logged in somewhere else, and arrived from a link in the CRM or an email.
   So they drop the marketing nav and the conversion furniture, and carry a
   slim bar with the two things an agent actually wants from any of them:
   back to support, and back into the CRM.

   They share the marketing site's tokens on purpose — an agent who saw the
   site before buying should recognise this as the same product.
   ====================================================================== */

/* Only course.html carries a header — a single "back to support" line, nothing
   else. support.html, nextsteps.html and snapshotrequest.html have NO header:
   the logo sits centred in the hero instead. Matches the pattern already
   shipping on Legacy Life CRM's equivalent pages; do not add a nav bar back. */
.agent-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.agent-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.agent-header .brand img { height: 30px; width: auto; }
.agent-header__back {
  font-size: .9rem; font-weight: 600; color: var(--text-2);
  transition: color .2s var(--ease);
}
.agent-header__back:hover { color: var(--green-ink); }
@media (max-width: 480px) {
  .agent-header__inner { height: 56px; }
  .agent-header .brand img { height: 24px; }
  .agent-header__back { font-size: .84rem; }
}

/* ---------- Agent page hero ---------- */
.agent-hero {
  position: relative; overflow: hidden;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 66px);
  text-align: center;
}
.agent-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.agent-hero__bg .g1 {
  width: 820px; height: 520px; left: 50%; top: -280px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(57,181,74,.2), transparent 70%);
}
.agent-hero__in { position: relative; z-index: 2; max-width: 640px; margin-inline: auto; }
.agent-hero__logo { height: 30px; width: auto; margin: 0 auto 22px; }
.agent-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 14px; }
.agent-hero h1 .hl { color: var(--green-ink); }
.agent-hero p { color: var(--text-2); font-size: 1.05rem; margin: 0 auto; max-width: 56ch; }
.agent-hero__back {
  display: inline-block; margin-top: 20px;
  font-size: .9rem; font-weight: 600; color: var(--text-2);
}
.agent-hero__back:hover { color: var(--green-ink); }
@media (max-width: 480px) { .agent-hero__logo { height: 24px; } }

/* ---------- Agent page footer ---------- */
.agent-footer {
  background: var(--night); color: var(--on-night-3);
  padding-block: 36px; text-align: center;
}
.agent-footer img { height: 26px; width: auto; margin: 0 auto 14px; }
.agent-footer p { font-size: .85rem; margin: 0; }

/* ---------- Awaiting-content placeholder ----------
   Used wherever a real asset (a video, a form) does not exist yet. It is
   deliberately plain and deliberately labelled: a fake-looking mock here
   would let an unfinished page pass for a finished one. qa.mjs counts these
   and reports them. */
.awaiting {
  display: grid; place-items: center; gap: 10px;
  border: 1px dashed var(--edge); border-radius: var(--r);
  background: repeating-linear-gradient(
    135deg, transparent, transparent 9px,
    rgba(17,24,39,.022) 9px, rgba(17,24,39,.022) 18px);
  padding: 30px 22px; text-align: center;
  color: var(--text-3);
}
.awaiting svg { width: 26px; height: 26px; color: var(--text-3); }
.awaiting b { display: block; font-size: .93rem; font-weight: 700; color: var(--text-2); }
.awaiting span { font-size: .82rem; max-width: 46ch; }
