/* ==========================================================================
   RevXForge — Shared Stylesheet
   One centralized stylesheet for every page (header, navigation, dropdowns,
   buttons, typography, layout, sections, cards, forms, footer, backgrounds,
   modal, responsive and accessibility rules). Loaded via a single <link> on
   every HTML page — do not duplicate these rules back into page <head> tags.
   ========================================================================== */

/* ── 1. CSS Variables ─────────────────────────────────────────────────── */
:root {
  --brand-bg: #ffffff;
  --brand-fg: #111111;
  --brand-accent: #cd3e2d;
  --brand-accent-2: #942d20;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --canvas: #fafaf9;
  --panel: #f4f3f1;
  --panel-border: #e5e3df;
  --text-primary: #111111;
  --text-secondary: #4a4845;
  --text-muted: #7a7673;
  --accent: var(--brand-accent);
  --accent-hover: var(--brand-accent-2);
  --accent-subtle: rgba(205, 62, 45, 0.08);
  --accent-border: rgba(205, 62, 45, 0.25);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 9rem;

  --container: 1200px;
  --container-narrow: 760px;
}

/* ── 2. Reset / Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; }
body {
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ── 3. Typography ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
h4 { font-size: 1rem; font-weight: 600; }
p { max-width: 68ch; color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── 4. Container / Layout ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.container--narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── 5. Header ────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--brand-bg, #ffffff);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
}
#nav.scrolled { border-color: rgba(0,0,0,0.08); box-shadow: 0 2px 24px rgba(0,0,0,0.06); }
#nav-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 2rem; height: 68px;
  display: flex; align-items: center; gap: 1.5rem;
}
#nav-brand { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
#nav-logo-link {
  display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0;
  border-radius: 6px;
}
#nav-logo-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#nav-logo {
  height: 44px; width: auto; max-width: 66px; object-fit: contain; display: block; flex-shrink: 0;
}
#nav-wordmark {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 1.25rem; font-weight: 700; color: var(--brand-fg, #111111);
  letter-spacing: -0.02em; white-space: nowrap;
}
#nav-wordmark span { color: var(--brand-accent, #cd3e2d); }
#nav-divider { width: 1px; height: 22px; background: rgba(0,0,0,0.12); flex-shrink: 0; }
#nav-parent-tag {
  font-size: 0.8rem; color: var(--text-muted, #7a7673); white-space: nowrap;
  display: block;
}
#nav-parent-tag a {
  color: var(--text-secondary, #4a4845); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent; transition: color 0.15s ease, border-color 0.15s ease;
}
#nav-parent-tag a:hover, #nav-parent-tag a:focus-visible { color: var(--brand-accent, #cd3e2d); border-bottom-color: currentColor; }

/* ── 6. Navigation ────────────────────────────────────────────────────── */
#nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; flex: 1; }
#nav-links > li { position: relative; }
#nav-links > li > a, #nav-links > li > button.nav-parent {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.5rem 0.75rem;
  font-size: 0.875rem; font-weight: 500; color: var(--brand-fg, #111111);
  text-decoration: none; border-radius: 6px; border: none; background: none; cursor: pointer;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif); white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease; line-height: 1;
}
#nav-links > li > a:hover, #nav-links > li > button.nav-parent:hover {
  color: var(--brand-accent, #cd3e2d); background: rgba(205, 62, 45, 0.06);
}
#nav-links > li > a.nav-active { color: var(--brand-accent, #cd3e2d); }
#nav-cta {
  display: inline-flex; align-items: center; padding: 0.6rem 1.3rem; font-size: 0.855rem; font-weight: 600;
  color: #ffffff; background: var(--brand-accent, #cd3e2d); border-radius: 999px; text-decoration: none;
  white-space: nowrap; flex-shrink: 0; font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 10px rgba(205, 62, 45, 0.25); margin-left: auto;
}
#nav-cta:hover { background: var(--brand-accent-2, #942d20); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(205, 62, 45, 0.35); }
#nav-hamburger {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer;
  padding: 6px; margin-left: auto; border-radius: 6px; transition: background 0.15s ease;
}
#nav-hamburger:hover { background: rgba(0,0,0,0.05); }
#nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--brand-fg, #111111); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
#nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
#nav-mobile-panel {
  display: none; position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
  background: var(--brand-bg, #ffffff); overflow-y: auto; padding: 1.5rem 1.5rem 2rem;
  flex-direction: column; gap: 0.25rem; border-top: 1px solid rgba(0,0,0,0.07);
}
#nav-mobile-panel.open { display: flex; }
.nav-mobile-link, .nav-mobile-parent {
  display: block; width: 100%; text-align: left; padding: 0.75rem 0.75rem; font-size: 1rem; font-weight: 500;
  color: var(--brand-fg, #111111); text-decoration: none; border-radius: 8px; border: none; background: none;
  cursor: pointer; font-family: var(--font-body, 'Inter', system-ui, sans-serif); transition: color 0.15s ease, background 0.15s ease;
}
.nav-mobile-link:hover, .nav-mobile-parent:hover { color: var(--brand-accent, #cd3e2d); background: rgba(205, 62, 45, 0.06); }
.nav-mobile-link.nav-active { color: var(--brand-accent, #cd3e2d); }
.nav-mobile-group { display: flex; flex-direction: column; }
.nav-mobile-parent { display: flex; align-items: center; justify-content: space-between; }
.nav-mobile-children { display: none; flex-direction: column; padding-left: 1rem; border-left: 2px solid rgba(205, 62, 45, 0.15); margin-left: 0.75rem; margin-top: 0.25rem; margin-bottom: 0.25rem; gap: 0; }
.nav-mobile-children.open { display: flex; }
.nav-mobile-children a { display: block; padding: 0.6rem 0.75rem; font-size: 0.9rem; font-weight: 500; color: var(--brand-fg, #111111); text-decoration: none; border-radius: 6px; font-family: var(--font-body, 'Inter', system-ui, sans-serif); transition: color 0.15s ease, background 0.15s ease; }
.nav-mobile-children a:hover { color: var(--brand-accent, #cd3e2d); background: rgba(205, 62, 45, 0.06); }
.nav-mobile-children a.nav-active { color: var(--brand-accent, #cd3e2d); }
#nav-mobile-cta { display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.5rem; font-size: 0.95rem; font-weight: 600; color: #ffffff; background: var(--brand-accent, #cd3e2d); border-radius: 8px; text-decoration: none; margin-top: 1rem; font-family: var(--font-body, 'Inter', system-ui, sans-serif); transition: background 0.18s ease; }
#nav-mobile-cta:hover { background: var(--brand-accent-2, #942d20); }
#nav-mobile-tag { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; color: var(--text-muted, #7a7673); padding: 0.5rem 0.75rem 1rem; border-bottom: 1px solid rgba(0,0,0,0.07); margin-bottom: 0.5rem; }
#nav-mobile-tag img { height: 28px; width: auto; max-width: 42px; object-fit: contain; flex-shrink: 0; }
#nav-mobile-tag a { color: var(--text-secondary, #4a4845); font-weight: 600; text-decoration: none; }
#nav-mobile-tag a:hover, #nav-mobile-tag a:focus-visible { color: var(--brand-accent, #cd3e2d); }

/* ── 7. Dropdowns ─────────────────────────────────────────────────────── */
.nav-chevron { width: 14px; height: 14px; opacity: 0.5; transition: transform 0.2s ease, opacity 0.2s ease; flex-shrink: 0; }
.nav-dropdown-wrap:hover .nav-chevron, .nav-dropdown-wrap.open .nav-chevron { transform: rotate(180deg); opacity: 0.8; }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-6px);
  min-width: 200px; background: var(--brand-bg, #ffffff); border: 1px solid rgba(0,0,0,0.09);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  padding: 0.5rem; list-style: none; margin: 0; opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-dropdown-wrap:hover .nav-dropdown, .nav-dropdown-wrap.open .nav-dropdown {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.nav-dropdown li a {
  display: block; padding: 0.55rem 0.9rem; font-size: 0.855rem; font-weight: 500;
  color: var(--brand-fg, #111111); text-decoration: none; border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease; white-space: nowrap;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
}
.nav-dropdown li a:hover { color: var(--brand-accent, #cd3e2d); background: rgba(205, 62, 45, 0.06); }
.nav-dropdown li a.nav-active { color: var(--brand-accent, #cd3e2d); }

/* ── 8. Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out), transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
  text-decoration: none;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  text-shadow: none;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(205,62,45,0.28);
}
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--panel-border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}
@media (pointer: coarse) {
  .btn { min-height: 44px; }
}

/* ── 9. Hero Sections ─────────────────────────────────────────────────── */
.page-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--space-xl) + 3rem) var(--space-lg);
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  z-index: 0;
}
.page-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(250,250,249,0.97) 0%, rgba(250,250,249,0.88) 40%, rgba(250,250,249,0.6) 70%, rgba(250,250,249,0.35) 100%);
  z-index: 1;
}
.page-hero.no-image .page-hero-scrim { background: var(--canvas); }
.page-hero.no-image { min-height: auto; padding-block: calc(var(--space-xl) + 2rem) var(--space-lg); }
.page-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.page-hero-inner {
  max-width: 720px;
}
.page-hero-kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
}
.page-hero-inner h1 {
  margin-bottom: 1.5rem;
}
.page-hero-inner .hero-body {
  margin-bottom: 2rem;
  max-width: 62ch;
}
.page-hero-inner .hero-body p { font-size: 1.05rem; }
.page-hero-inner .hero-body p + p {
  margin-top: 1rem;
}
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
/* The ghost CTA is otherwise fully transparent, so on a hero photo it depended
   entirely on the diagonal scrim being opaque exactly where the button sits —
   not guaranteed on every image/viewport height. Giving it its own solid
   backdrop keeps both hero CTAs legible regardless of the photo behind them. */
.page-hero-actions .btn--ghost {
  background: rgba(255,255,255,0.92);
  border-color: rgba(17,17,17,0.14);
  backdrop-filter: blur(2px);
}
.page-hero-actions .btn--ghost:hover {
  background: rgba(255,255,255,1);
}

/* ── 10. Common Sections ──────────────────────────────────────────────── */
section { padding-block: var(--space-xl); }
section:nth-child(even) { background: var(--panel); }

.section-header { margin-bottom: var(--space-lg); max-width: 720px; }
.section-header h2 { margin-bottom: 0.75rem; }

.copy-block { max-width: 760px; }
.copy-block p { margin-bottom: 1.1rem; font-size: 1.02rem; }
.copy-block p:last-child { margin-bottom: 0; }

.policy-callout {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.policy-callout p {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  max-width: none;
}
.policy-callout p + p { margin-top: 0.6rem; font-weight: 400; }

.split-band { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); align-items: stretch; }
.split-image-col { border-radius: var(--radius-lg); overflow: hidden; min-height: 320px; }
.split-image-col img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.split-image-col:hover img { transform: scale(1.045); }
.split-content-col { display: flex; flex-direction: column; justify-content: center; gap: 1.1rem; }
.split-content-col p { max-width: none; }
.split-band.reverse .split-image-col { order: 2; }

.simple-list { max-width: 760px; }
.simple-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
  font-size: 1rem;
  color: var(--text-secondary);
}
.simple-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.simple-list li strong { color: var(--text-primary); }

.next-links {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}
.next-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.next-links a:hover { color: var(--accent-hover); }

/* Marquee (homepage capability strip) */
.marquee-section { padding-block: 1.25rem; background: var(--text-primary); overflow: hidden; }
.marquee-track { display: flex; gap: 0; animation: marqueeScroll 32s linear infinite; width: max-content; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item { display: inline-flex; align-items: center; gap: 1.5rem; padding-inline: 2rem; color: rgba(255,255,255,0.72); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.marquee-item::after { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* Closing CTA band */
/* `section` prefix ties specificity with `section:nth-child(even)` above so this
   always wins regardless of the section's position in the page (fixes washed-out
   sections where the even/odd zebra rule was silently overriding the intended background). */
section.closing-cta-section {
  background: var(--text-primary);
  color: #fff;
  text-align: center;
  padding-block: var(--space-2xl);
}
.closing-cta-inner { max-width: 680px; margin-inline: auto; }
.closing-cta-section .kicker { color: rgba(255,255,255,0.5); }
.closing-cta-section h2 { color: #fff; margin-bottom: 1.25rem; }
.closing-cta-section p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; max-width: 58ch; margin-inline: auto; }
.closing-cta-section .btn--ghost { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.25); }
.closing-cta-section .btn--ghost:hover { border-color: #fff; color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ── 11. Cards ────────────────────────────────────────────────────────── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.pillars-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.pillar-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}
.pillar-card:hover { border-color: var(--accent-border); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.pillar-card:hover::before { opacity: 1; }
.pillar-number {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.pillar-card h3 { margin-bottom: 0.75rem; font-size: 1.05rem; font-weight: 600; }
.pillar-card p { font-size: 0.9rem; color: var(--text-secondary); max-width: none; line-height: 1.65; }

/* ── 12. Forms ────────────────────────────────────────────────────────── */
/* Shared by the Contact page, the Diagnostic lead form and the contact modal. */
section.contact-section { background: var(--canvas); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: start; }
.contact-info h2 { margin-bottom: 1rem; }
.contact-info p { margin-bottom: 1.5rem; max-width: 46ch; }
.contact-detail { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.9375rem; color: var(--text-secondary); }
.contact-detail svg { color: var(--accent); flex-shrink: 0; }
.contact-reason-list { margin-top: 1.5rem; }
.contact-reason-list li { font-size: 0.9rem; }
.contact-form-wrap { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius-lg); padding: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.825rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-primary); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.7rem 1rem; background: var(--canvas);
  border: 1.5px solid var(--panel-border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9375rem; color: var(--text-primary);
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(205,62,45,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-status { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; margin-bottom: 1rem; display: none; }
.form-status.success { background: rgba(22, 163, 74, 0.1); border: 1px solid rgba(22, 163, 74, 0.3); color: #166534; display: block; }
.form-status.error { background: rgba(205,62,45,0.08); border: 1px solid var(--accent-border); color: var(--accent); display: block; }

/* ── 13. Diagnostic ───────────────────────────────────────────────────── */
/* The Diagnostic page's lead-capture panel reuses the Forms + Common Sections
   rules above (.contact-layout, .contact-form-wrap, .policy-callout, .pillars-grid) —
   no page-specific overrides needed. */

/* ── 14. Calculators ──────────────────────────────────────────────────── */
/* The Calculators page reuses Cards (.pillars-grid.cols-2) and Common Sections —
   no page-specific overrides needed. */

/* ── 15. Tables ───────────────────────────────────────────────────────── */
/* No tabular content in the current content set. Add rules here if/when a
   page introduces a real data table. */

/* ── 16. FAQ ──────────────────────────────────────────────────────────── */
section.faq-section { background: var(--panel); }
.faq-list { max-width: 820px; display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--panel-border);
  padding-block: 1.5rem;
}
.faq-item:first-child { padding-top: 0; }
.faq-item h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}
.faq-item p { max-width: none; font-size: 0.95rem; }

/* ── 17. Modal / Contact Popup ────────────────────────────────────────── */
.contact-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease-out); }
.contact-modal.open { opacity: 1; pointer-events: auto; }
.contact-modal-overlay { position: absolute; inset: 0; background: rgba(17,17,17,0.6); }
.contact-modal-panel {
  position: relative; background: var(--canvas); border-radius: var(--radius-lg);
  max-width: 580px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: 2rem; box-shadow: 0 24px 64px rgba(0,0,0,0.32);
  transform: translateY(16px) scale(0.98); transition: transform 0.22s var(--ease-out);
}
.contact-modal.open .contact-modal-panel { transform: translateY(0) scale(1); }
.contact-modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--panel);
  border: 1px solid var(--panel-border); color: var(--text-secondary); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact-modal-close:hover { color: var(--accent); border-color: var(--accent-border); }
.contact-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-modal-panel h2 { margin-bottom: 0.5rem; padding-right: 2rem; }
.contact-modal-panel > p { margin-bottom: 1.25rem; }
.contact-modal-panel .contact-detail { margin-bottom: 0.5rem; }
.contact-modal-panel form { margin-top: 1.25rem; }
body.contact-modal-open { overflow: hidden; }

/* ── 18. Footer ───────────────────────────────────────────────────────── */
#footer { background: var(--brand-fg, #111111); color: var(--brand-bg, #ffffff); font-family: var(--font-body, 'Inter', system-ui, sans-serif); padding: 4rem 2rem 2rem; position: relative; overflow: hidden; }
#footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--brand-accent, #cd3e2d); }
#footer-inner { max-width: 1280px; margin: 0 auto; }
#footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
#footer-brand { display: flex; flex-direction: column; gap: 1rem; }
#footer-wordmark { font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif); font-size: 1.4rem; font-weight: 700; color: var(--brand-bg, #ffffff); text-decoration: none; letter-spacing: -0.02em; display: inline-block; }
#footer-wordmark span { color: var(--brand-accent, #cd3e2d); }
#footer-tagline { font-size: 0.875rem; line-height: 1.65; color: rgba(255,255,255,0.55); max-width: 260px; margin: 0; }
#footer-contact { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.footer-contact-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.855rem; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.15s ease; }
a.footer-contact-item:hover { color: var(--brand-accent, #cd3e2d); }
.footer-contact-item svg { flex-shrink: 0; opacity: 0.6; }
.footer-col h4 { font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin: 0 0 1rem 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a { font-size: 0.875rem; color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.15s ease; font-weight: 500; }
.footer-col ul li a:hover { color: var(--brand-accent, #cd3e2d); }
#footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 2rem; gap: 1.5rem; flex-wrap: wrap; }
#footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.3); margin: 0; }
#footer-legal { font-size: 0.8rem; color: rgba(255,255,255,0.3); display: flex; gap: 1rem; flex-wrap: wrap; }
#footer-legal a { color: rgba(255,255,255,0.3); text-decoration: none; }
#footer-legal a:hover { color: rgba(255,255,255,0.6); }

/* ── 18b. Floating Book-a-Call CTA (site-wide, fixed to viewport) ────── */
/* Lives as a direct child of <body>, not inside the footer, so it stays
   pinned to the viewport at all scroll positions instead of scrolling away
   with page content. z-index sits above the header (1000) but below the
   contact modal (2000) so an open modal still takes visual precedence. */
#floating-book-call {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  max-width: calc(100vw - 2rem);
}
@media (max-width: 480px) {
  #floating-book-call {
    right: 1rem;
    bottom: 1rem;
    padding: 0.65rem 1.15rem;
    font-size: 0.875rem;
  }
}

/* ── 19. Background / Image Utilities ─────────────────────────────────── */
.page-env {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(205,62,45,0.035) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 90%, rgba(205,62,45,0.025) 0%, transparent 55%);
  animation: envDrift 60s ease-in-out infinite alternate;
}
@keyframes envDrift {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}
main { position: relative; z-index: 1; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }
.reveal.in.reveal-delay-1 { transition-delay: 0.08s; }
.reveal.in.reveal-delay-2 { transition-delay: 0.16s; }
.reveal.in.reveal-delay-3 { transition-delay: 0.24s; }
.reveal.in.reveal-delay-4 { transition-delay: 0.32s; }
.reveal.in.reveal-delay-5 { transition-delay: 0.40s; }
.reveal.in.reveal-delay-6 { transition-delay: 0.48s; }

/* ── 20. Responsive Breakpoints ───────────────────────────────────────── */
/* Most breakpoints live next to the component they modify (standard practice —
   keeps a component's base + responsive rules easy to read together). This
   section covers ones that don't belong to a single component above. */
@media (max-width: 1100px) { #nav-parent-tag { display: none; } #nav-divider { display: none; } }
@media (max-width: 960px) {
  #nav-links, #nav-cta { display: none; }
  #nav-hamburger { display: flex; }
}
@media (min-width: 961px) { #nav-mobile-panel { display: none !important; } }
@media (max-width: 480px) { #nav-logo { height: 34px; max-width: 50px; } #nav-wordmark { font-size: 1.1rem; } }

@media (max-width: 1024px) { .pillars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pillars-grid, .pillars-grid.cols-2 { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
  .split-band { grid-template-columns: 1fr; }
  .split-image-col { min-height: 220px; }
  .split-band.reverse .split-image-col { order: 0; }
}

@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) { .contact-modal-panel { padding: 1.5rem 1.25rem; max-height: 85vh; } }

@media (max-width: 900px) { #footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem; } #footer-brand { grid-column: 1 / -1; } #footer-tagline { max-width: 100%; } }
@media (max-width: 520px) { #footer-top { grid-template-columns: 1fr; gap: 2rem; } #footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; } }

/* ── 21. Accessibility / Focus States ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Pause all animation/transition when the tab is hidden (perf + a11y). */
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .page-env { animation: none; }
  .marquee-track { animation: none; }
}
