/* =========================================================================
   Valor Tech Systems — retro theme system
   Three toggle-able identities driven entirely by CSS custom properties on
   <html data-theme="…">.  Every rule below consumes tokens, so the whole look
   falls out of the same markup.  Default (and :root) = "amber" (Amber CRT).
   Themes: amber (default, DARK CRT) · green (DARK CRT, military olive drab) ·
   red (LIGHT, USA red/white/blue).  All three keep the SAME VT323 pixel display
   + layout for brand continuity across the toggle.  Amber + green are DARK CRT
   terminals — dark screen with the phosphor effects (scanline overlay, hero
   glow, heading text-glow) ON via tokens; red is the LIGHT inversion (white
   body, dark ink, colored headings/accents, visible panels, effects OFF).
   ========================================================================= */

:root {
  /* ---- structure (theme-agnostic) ---- */
  --radius: 14px;
  --max: 1120px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;

  /* status colors (kept constant across themes so meaning is stable) */
  --ok: #4fd39a;
  --error: #ff8a8a;

  /* =====================================================================
     THEME A — "Amber CRT" (DEFAULT).  Warm amber phosphor terminal.
     ===================================================================== */
  --font-display: "VT323", ui-monospace, "Share Tech Mono", monospace;
  --display-tracking: 0.02em;

  --body-bg: #0d0b07;
  --surface-alt: #100c07;
  --panel: linear-gradient(180deg, #17110a, #100b06);
  --panel-inset: inset 0 1px 0 rgba(255, 176, 0, 0.06);
  --soft-panel: linear-gradient(135deg, rgba(255, 176, 0, 0.09), rgba(255, 107, 26, 0.07));
  --input-bg: #0a0805;
  --header-bg: rgba(13, 11, 7, 0.72);
  --overlay-bg: rgba(13, 11, 7, 0.96);

  --text: #e8dfce;
  --heading: #ffcf6a;
  --muted: #c8bfa8;
  --muted-2: #9a8f78;

  --line: rgba(255, 176, 0, 0.16);
  --line-strong: rgba(255, 176, 0, 0.34);
  --line-hover: rgba(255, 176, 0, 0.5);

  --accent: #ffb000;
  --accent-2: #ff6b1a;
  --accent-ink: #1a1200;
  --focus-ring: rgba(255, 176, 0, 0.2);
  --tap: rgba(255, 176, 0, 0.18);

  --chip-bg: rgba(255, 176, 0, 0.1);
  --chip-border: rgba(255, 176, 0, 0.28);

  --btn-bg: linear-gradient(135deg, #ffb000, #ff6b1a);
  --btn-shadow: 0 12px 30px -12px rgba(255, 176, 0, 0.55);
  --btn-shadow-hover: 0 16px 40px -12px rgba(255, 107, 26, 0.72);

  --display-grad: linear-gradient(135deg, #ffcf6a, #ff7a2a);
  --brand-grad-a: #ffb000;
  --brand-grad-b: #ff6b1a;
  --mark-ink: #0d0b07;

  --heading-shadow: 0 0 10px rgba(255, 176, 0, 0.28);
  --hero-h1-glow: drop-shadow(0 0 10px rgba(255, 176, 0, 0.38));
  --hero-glow:
    radial-gradient(60% 60% at 50% 0%, rgba(255, 176, 0, 0.14), transparent 70%),
    radial-gradient(40% 50% at 70% 10%, rgba(255, 107, 26, 0.1), transparent 70%);

  --scanlines: block;   /* CRT overlay — amber only */
}

/* =======================================================================
   THEME B — "Military olive" (DARK CRT).  Old-school field-terminal / night-
   ops look: dark olive-black screen, olive-drab (army green) phosphor, VT323
   pixel display.  Mirrors Amber's DARK structure — scanline overlay + hero
   glow + heading text-glow ON via tokens — recolored to desaturated field
   green (#8bab53 field green, #556b2f dark-olive) instead of amber.  Does NOT
   set --shadow, so it inherits :root's dark card shadow (like Amber).
   ======================================================================= */
[data-theme="green"] {
  /* --font-display, --display-tracking inherit Amber's VT323 headline */

  --body-bg: #0d120b;
  --surface-alt: #0f150c;
  --panel: linear-gradient(180deg, #18200f, #10160a);
  --panel-inset: inset 0 1px 0 rgba(139, 171, 83, 0.07);
  --soft-panel: linear-gradient(135deg, rgba(125, 155, 78, 0.1), rgba(85, 107, 47, 0.08));
  --input-bg: #0a0f07;
  --header-bg: rgba(13, 18, 11, 0.72);
  --overlay-bg: rgba(13, 18, 11, 0.96);

  --text: #cdd6b3;
  --heading: #bcd488;
  --muted: #98a67f;
  --muted-2: #8a9770;

  --line: rgba(139, 171, 83, 0.16);
  --line-strong: rgba(139, 171, 83, 0.34);
  --line-hover: rgba(139, 171, 83, 0.5);

  --accent: #8bab53;
  --accent-2: #556b2f;
  --accent-ink: #0d120b;
  --focus-ring: rgba(139, 171, 83, 0.25);
  --tap: rgba(139, 171, 83, 0.18);

  --chip-bg: rgba(139, 171, 83, 0.1);
  --chip-border: rgba(139, 171, 83, 0.28);

  /* gradient brightened from spec #8bab53→#556b2f so the dark stencil ink
     (--accent-ink) clears WCAG AA on the dark end (5.1:1, was 3.2:1) — reads
     like black stencil lettering on olive-drab field equipment. */
  --btn-bg: linear-gradient(135deg, #9bbf5e, #6b8f3f);
  --btn-shadow: 0 12px 30px -12px rgba(85, 107, 47, 0.55);
  --btn-shadow-hover: 0 16px 40px -12px rgba(125, 155, 78, 0.6);

  --display-grad: linear-gradient(135deg, #c2d89a, #7d9b4e);
  --brand-grad-a: #8bab53;
  --brand-grad-b: #556b2f;
  --mark-ink: #0d120b;

  --heading-shadow: 0 0 10px rgba(139, 171, 83, 0.28);
  --hero-h1-glow: drop-shadow(0 0 10px rgba(139, 171, 83, 0.35));
  --hero-glow: radial-gradient(72% 60% at 50% 0%, rgba(125, 155, 78, 0.1), transparent 70%);

  --scanlines: block;
  /* no --shadow here on purpose — inherits :root's dark card shadow (like Amber) */
}

/* =======================================================================
   THEME C — "USA" — patriotic red / white / blue (LIGHT).  The one LIGHT
   theme (white body, dark ink, scanlines / glows OFF via tokens), colored to
   the flag: NAVY carries the structure
   (headline, section headings, shield, borders/chips) and RED carries the
   interactive layer (buttons, links, accent dots, focus rings, hover edges),
   with a white cross knockout on the navy shield.  Both flag colors stay
   prominent so it reads patriotic — fitting a 100% veteran-owned business —
   not "navy with red buttons."
   NOTE --shadow override: the global :root --shadow is a heavy dark shadow
   that's wrong on white; this soft one lifts white cards off the white body.
   ======================================================================= */
[data-theme="red"] {
  /* --font-display, --display-tracking inherit Amber's VT323 headline */

  --body-bg: #ffffff;
  --surface-alt: #f5f7fc;
  --panel: linear-gradient(180deg, #ffffff, #f5f8fd);
  --panel-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --soft-panel: linear-gradient(135deg, rgba(10, 36, 99, 0.06), rgba(179, 25, 66, 0.05));
  --input-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.82);
  --overlay-bg: rgba(255, 255, 255, 0.97);

  --text: #16203a;
  --heading: #0a2463;   /* navy — 14.5:1 on white */
  --muted: #4f5872;     /* 7.1:1 on white (WCAG AA) */
  --muted-2: #66708c;   /* 4.9:1 on white (WCAG AA) */

  --line: rgba(10, 36, 99, 0.16);
  --line-strong: rgba(10, 36, 99, 0.3);
  --line-hover: rgba(179, 25, 66, 0.5);   /* red hover edge */

  --accent: #b31942;    /* red — 6.7:1 on white; interactive/CTA color */
  --accent-2: #1e3a8a;  /* navy secondary */
  --accent-ink: #ffffff;
  --focus-ring: rgba(179, 25, 66, 0.3);
  --tap: rgba(179, 25, 66, 0.12);

  --chip-bg: rgba(10, 36, 99, 0.07);
  --chip-border: rgba(10, 36, 99, 0.26);

  --btn-bg: linear-gradient(135deg, #c41e3a, #a4123a);   /* white text ≥ 5.8:1 */
  --btn-shadow: 0 12px 28px -16px rgba(179, 25, 66, 0.45);
  --btn-shadow-hover: 0 16px 36px -16px rgba(179, 25, 66, 0.55);

  --display-grad: linear-gradient(135deg, #1e3a8a, #0a2463);   /* navy headline + stat numbers */
  --brand-grad-a: #1e3a8a;
  --brand-grad-b: #0a2463;
  --mark-ink: #ffffff;   /* white cross knockout on the navy shield */

  --heading-shadow: none;
  --hero-h1-glow: none;
  --hero-glow: radial-gradient(72% 60% at 50% 0%, rgba(10, 36, 99, 0.06), transparent 70%);

  --scanlines: none;
  --shadow: 0 14px 34px -22px rgba(15, 25, 55, 0.28);
}

/* ---- recolor the inline-SVG logo straight from theme tokens ---- */
#vetGrad stop:first-child { stop-color: var(--brand-grad-a); }
#vetGrad stop:last-child  { stop-color: var(--brand-grad-b); }
#vet-shield path:last-of-type { fill: var(--mark-ink); }

/* ---- Light theme (USA/red): lift near-white panels off the white body ----
   The DARK CRT themes (amber, green) keep their inset-only card shadow; only
   the light USA theme adds the soft --shadow so cards read as distinct. */
[data-theme="red"] :is(.card, .step, .case, .stat, .faq-item, .cta-inner) {
  box-shadow: var(--panel-inset), var(--shadow);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--body-bg);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: var(--tap);
}

/* CRT scanline overlay — sits above content (below header/CTA), amber only */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  display: var(--scanlines, none);
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

/* Display type carries each theme's identity */
h1, h2, .eyebrow, .step-num, .cta-inner h2 {
  font-family: var(--font-display);
  letter-spacing: var(--display-tracking);
}
h1, h2 { color: var(--heading); text-shadow: var(--heading-shadow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.1rem, 4vw, 2.5rem);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
}

.brand.small .brand-mark { width: 28px; height: 28px; }

.nav { display: flex; align-items: center; gap: 1.4rem; font-size: 0.95rem; }
.nav a { color: var(--muted); transition: color 0.15s ease; }
.nav a:hover { color: var(--text); }

.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 0.55rem 1rem;
  border-radius: 999px;
}
.nav-cta:hover { border-color: var(--accent); }

/* ---------- Theme switcher (segmented control) ---------- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--input-bg);
}
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.34rem 0.6rem;
  min-height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.theme-btn:hover { color: var(--text); }
.theme-btn[aria-pressed="true"] {
  color: var(--text);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 0 12px -5px var(--accent);
}
.theme-swatch {
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
/* swatches show each theme's fixed identity, independent of the active theme */
.theme-btn[data-theme-choice="amber"] .theme-swatch { background: linear-gradient(135deg, #ffb000, #ff6b1a); }
.theme-btn[data-theme-choice="green"] .theme-swatch { background: linear-gradient(135deg, #8bab53, #556b2f); }
/* tricolor "flag" swatch — outer navy hairline keeps the white band from
   dissolving into a white (light-theme) switcher pill; inner bevel matches siblings */
.theme-btn[data-theme-choice="red"] .theme-swatch {
  background: linear-gradient(120deg, #b31942 0 43%, #ffffff 43% 57%, #0a2463 57% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 0 1px rgba(10, 36, 99, 0.32);
}
.theme-name { line-height: 1; white-space: nowrap; }

/* ---------- Header click-to-call ---------- */
.header-call {
  flex: none;
  margin-left: auto;            /* pins brand left, packs call + nav right */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}
.header-call:hover { border-color: var(--accent); }
.call-ico { flex: none; display: block; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }

.btn-primary {
  color: var(--accent-ink);
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
}
.btn-primary:hover { box-shadow: var(--btn-shadow-hover); }

.btn-ghost { color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 12vw, 8rem) clamp(1.1rem, 4vw, 2.5rem) clamp(3rem, 8vw, 6rem);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; text-align: center; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.1rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 800;
  background: var(--display-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
  filter: var(--hero-h1-glow);
}

/* blinking terminal cursor after the hero headline — a shared brand touch
   across all three themes (recolors via --accent; olive on dark, navy on white) */
[data-theme="amber"] .hero h1::after,
[data-theme="green"] .hero h1::after,
[data-theme="red"] .hero h1::after {
  content: "";
  display: inline-block;
  width: 0.55ch;
  height: 0.86em;
  margin-left: 0.14em;
  vertical-align: -0.05em;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: vts-blink 1.06s steps(1) infinite;
}

.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--muted);
  max-width: 620px;
  margin: 1.4rem auto 2rem;
}

.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

.hero-badges {
  list-style: none;
  display: flex;
  gap: 0.6rem 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0;
  margin: 2.6rem 0 0;
  color: var(--muted-2);
  font-size: 0.9rem;
}
.hero-badges li { position: relative; padding-left: 1.1rem; }
.hero-badges li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--accent);
}

.hero-glow {
  position: absolute;
  inset: -20% 0 auto 0;
  height: 620px;
  background: var(--hero-glow);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) clamp(1.1rem, 4vw, 2.5rem); max-width: var(--max); margin: 0 auto; }
.section-alt { background: var(--surface-alt); max-width: none; }
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section-head { max-width: 620px; margin: 0 auto 2.6rem; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; }
.section-head p { color: var(--muted); margin: 0.8rem 0 0; }

.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards ---------- */
.card, .step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--panel-inset);
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.card:hover, .step:hover { transform: translateY(-3px); border-color: var(--line-hover); }
.card h3, .step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p, .step p { color: var(--muted); margin: 0; font-size: 0.97rem; }

.step-num {
  display: inline-block;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
}

/* Inline "go deeper" link inside a service card (links to /ai, /application-security). */
.card-link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}
.card-link::after { content: " \2192"; }
.card-link:hover { border-bottom-color: var(--accent); }

/* Centered action row beneath a section's grid. */
.section-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.4rem;
}

/* ---------- Sub-page shell (/ai, /application-security) ---------- */

/* Shorter hero than the home page: these pages lead with content, not a pitch. */
.hero-page { padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.hero-page h1 { font-size: clamp(2rem, 5vw, 3.1rem); }

.crumbs {
  font-size: 0.85rem;
  color: var(--muted-2);
  margin-bottom: 1.1rem;
}
.crumbs a { color: var(--muted); border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--text); border-bottom-color: var(--line-strong); }
.crumbs span[aria-hidden] { margin: 0 0.4rem; opacity: 0.6; }
.crumbs [aria-current] { color: var(--text); }

/* Capability block — a wider panel than .card, for one service explained in depth.
   Two columns on desktop (heading rail + detail), stacked on tablet and below. */
.cap {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.4rem 2.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--panel-inset);
  margin-bottom: 1.1rem;
  transition: border-color 0.2s ease;
}
.cap:last-child { margin-bottom: 0; }
.cap:hover { border-color: var(--line-hover); }
.cap-head { grid-row: span 3; }
.cap-head h3 { font-size: 1.3rem; margin-top: 0.3rem; }
.cap-lede { color: var(--text); margin: 0; font-size: 1rem; }

.cap-list { list-style: none; margin: 0; padding: 0; }
.cap-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.cap-list li:last-child { margin-bottom: 0; }
/* Checkmark drawn in CSS so the list needs no per-item markup. */
.cap-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.42em;
  width: 0.62rem;
  height: 0.34rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.cap-proof {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted-2);
}
.cap-proof a { color: var(--accent); border-bottom: 1px solid transparent; }
.cap-proof a:hover { border-bottom-color: var(--accent); }

/* Stack the capability block before the 3-up grids collapse, so the detail
   column never gets squeezed into an unreadable ribbon. */
@media (max-width: 900px) {
  .cap { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem; }
  .cap-head { grid-row: auto; }
}

/* ---------- Work / case studies ---------- */
.case {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--panel-inset);
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.case:hover { transform: translateY(-3px); border-color: var(--line-hover); }
.case-cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.case h3 { font-size: 1.12rem; margin-bottom: 0.55rem; }
.case > p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.case-metric {
  margin-top: 0.9rem !important;
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.9rem !important;
}
.case-tech {
  margin-top: auto !important;
  padding-top: 0.9rem;
  color: var(--muted-2) !important;
  font-size: 0.82rem !important;
}

/* ---------- Proof / credentials ---------- */
.stat-band {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}
.stat {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  box-shadow: var(--panel-inset);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  background: var(--display-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-label {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.cert-row {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 820px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.cert {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}
.cert-more { color: var(--muted-2); background: transparent; }

/* compliance-readiness framework row (mirrors .cert-row, tokenized) */
.framework-row {
  list-style: none;
  padding: 0;
  margin: 1.6rem auto 0;
  max-width: 820px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}
.framework-lead {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.framework {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

@media (max-width: 720px) {
  .stat-band { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Contact form ---------- */
.contact-form { text-align: left; max-width: 620px; margin: 2.2rem auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field > span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.field > span em { color: var(--muted-2); font-style: normal; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(255, 138, 138, 0.14);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; font-size: 0.92rem; min-height: 1.2em; color: var(--muted); }
.form-status.is-success { color: var(--ok); }
.form-status.is-error { color: var(--error); }
.contact-alt { color: var(--muted); margin: 1.4rem 0 0; font-size: 0.92rem; }
.contact-alt a { color: var(--accent); }

/* ---------- Contact success panel (swaps in for the form on submit) ---------- */
.form-done {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.5rem 0;
  text-align: center;
}
/* On success app.js adds .is-sent: hide the form + intro/alt copy, reveal panel */
.cta-inner.is-sent > :not(.form-done) { display: none; }
.cta-inner.is-sent .form-done { display: flex; }

.form-done-badge {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: var(--accent-ink);
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
}
.form-done-badge svg { display: block; width: 38px; height: 38px; }

.form-done-title {
  font-family: var(--font-display);
  letter-spacing: var(--display-tracking);
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  color: var(--heading);
  text-shadow: var(--heading-shadow);
  margin: 0;
}
/* programmatic focus target (announcement only) — no visible ring */
.form-done-title:focus { outline: none; }
.form-done-sub { color: var(--muted); margin: 0; max-width: 420px; }
.form-done-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

/* gentle entrance (neutralized under prefers-reduced-motion by the global rule) */
.cta-inner.is-sent .form-done { animation: vts-rise 0.32s ease both; }
.cta-inner.is-sent .form-done-badge { animation: vts-pop 0.34s ease both; }

/* ---------- CTA ---------- */
.section-cta { text-align: center; }
.cta-inner {
  background: var(--soft-panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}
.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-inner p { color: var(--muted); max-width: 520px; margin: 1rem auto 2rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-alt); }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem clamp(1.1rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
  text-align: center;
}
.footer-meta { color: var(--muted); margin: 0.3rem 0 0; font-size: 0.95rem; }
.footer-meta a { color: var(--accent); }
.footer-area { color: var(--muted); margin: 0.2rem 0 0; font-size: 0.88rem; }
.footer-copy { color: var(--muted-2); font-size: 0.85rem; margin: 0.3rem 0 0; }

/* ---------- Hamburger toggle (mobile) ---------- */
.nav-toggle {
  display: none;                 /* revealed at <=1000px */
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  place-items: center;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before { position: absolute; left: 0; top: -6px; }
.nav-toggle-bar::after  { position: absolute; left: 0; top: 6px; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bar::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Veteran-owned badge ---------- */
.vet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.9rem;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.hero .vet-badge { margin: 0 0 1.3rem; }
.vet-ico { flex: none; display: block; }
.vet-badge-sm {
  font-size: 0.8rem;
  padding: 0.32rem 0.8rem;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta {
  display: none;                 /* revealed at <=1000px */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.7rem clamp(1rem, 4vw, 1.5rem);
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--overlay-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-cta .btn { width: 100%; }
.mobile-cta.is-hidden {
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
}

/* Kill intrinsic-width overflow of form controls inside grid/flex tracks */
.field,
.field input,
.field textarea { min-width: 0; }
.cf-turnstile { max-width: 100%; min-height: 65px; margin: 0 auto; overflow: hidden; }

/* ---------- Accessibility: focus ring + skip link ---------- */
a:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.brand:focus-visible,
.theme-btn:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0.75rem; }

/* In-text links live inside body copy — underline so they aren't identified by color alone */
.contact-alt a,
.footer-meta a,
.faq-item p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 0.7rem; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 1.2rem;
  box-shadow: var(--panel-inset);
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--line-hover); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item > p { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.97rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .card:hover, .step:hover, .case:hover { transform: none; }
  /* keep retro accents present but static */
  [data-theme="amber"] .hero h1::after,
  [data-theme="green"] .hero h1::after,
  [data-theme="red"] .hero h1::after { animation: none; opacity: 1; }
}

/* ---------- Keyframes ---------- */
@keyframes vts-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes vts-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vts-pop { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: scale(1); } }

/* ---------- Responsive ---------- */

/* Compact the theme switcher label on mid widths so nav never crowds */
/* Theme labels collapse to bare swatches before the nav can outgrow the header.
   Raised 1040px -> 1100px on 2026-08-06: with labels shown the nav measures ~739px
   and the header only offers (viewport - ~331px), so labels cannot survive below
   ~1070px. See the nav-overflow note on the mobile-nav breakpoint below. */
@media (max-width: 1100px) {
  .theme-name { display: none; }
  .theme-btn { padding: 0.34rem 0.5rem; }
}

/* Tablet — 3-up grids become 2-up */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile nav — hamburger dropdown + sticky CTA.
   Raised 820px -> 1000px on 2026-08-06. The horizontal nav needs ~643px even with
   the theme labels hidden, but the header only offers (viewport - ~325px), so
   anything under ~970px overflowed the viewport and produced horizontal page
   scroll. That was already true at 820-970px before the "AI" link was added; the
   7th link only widened the broken band. Handing over to the hamburger at 1000px
   fixes the whole range at the source rather than shaving pixels off the links. */
@media (max-width: 1000px) {
  .nav-toggle { display: grid; }
  .mobile-cta { display: block; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem;
    font-size: 1rem;
    background: var(--overlay-bg);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }
  .nav-open .nav {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }
  .nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    color: var(--text);
  }
  .nav a:not(.nav-cta):hover { background: var(--chip-bg); }
  .nav-cta {
    justify-content: center;
    border-color: var(--accent);
    margin-top: 0.25rem;
  }

  /* theme switcher becomes a full-width labeled segmented control atop the menu */
  .theme-switch {
    order: -1;
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
    margin-bottom: 0.35rem;
  }
  .theme-btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 0.4rem;
  }
  .theme-name { display: inline; }

  /* room so the sticky CTA never sits on top of the footer */
  .site-footer { padding-bottom: 5.5rem; }
}

/* Small phones — collapse the header call chip to an icon-only tap target
   (the number stays in the DOM + on tablet/desktop; contact & footer show it) */
@media (max-width: 480px) {
  .header-call {
    width: 44px;
    padding-left: 0;
    padding-right: 0;
  }
  .header-call-num { display: none; }
}

/* Phones — single column + tighter form chrome (prevents 320px overflow) */
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cta-inner { padding: clamp(2rem, 7vw, 3rem) 1.1rem; }
  .hero-badges { gap: 0.5rem 1.1rem; }
  .section-cta { padding-left: 0.9rem; padding-right: 0.9rem; }
}

/* Very small phones — trim form chrome so the fixed 300px Turnstile widget fits */
@media (max-width: 380px) {
  .section-cta { padding-left: 0.5rem; padding-right: 0.5rem; }
  .cta-inner { padding-left: 0.6rem; padding-right: 0.6rem; }
}
