/* =====================================================================
   Design tokens — semantic, OKLCH, re-themed for dark. No raw hex below
   this block; components reference var(--token) only.
   ===================================================================== */
:root {
  --bg: oklch(100% 0 0);
  --bg-alt: oklch(97.5% 0.005 258.3);
  --fg: oklch(25.8% 0.057 260.9);
  --fg-muted: oklch(50.1% 0.025 259.2);
  --fg-on-inverse: oklch(96% 0.01 258);
  --fg-on-inverse-muted: oklch(66.1% 0.026 262.1);

  --accent: oklch(67.3% 0.111 206.4);          /* decorative only: motif shapes, subtle fills */
  --accent-solid: oklch(49.7% 0.085 216.9);    /* buttons, icon-circle fill, links, focus */
  --accent-solid-hover: oklch(25.8% 0.057 260.9);
  --accent-on-inverse: oklch(79.3% 0.121 197); /* accent text/icons on dark bands */
  --on-accent-solid: oklch(100% 0 0);

  --bg-inverse: oklch(21.2% 0.051 260.5);      /* dark bands: stat/CTA/footer */
  --border: oklch(93% 0.009 258.3);
  --border-inverse: oklch(32% 0.03 261);
  --focus: oklch(49.7% 0.085 216.9);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --container: 1280px;

  /* 8pt spacing scale */
  --space-1: 0.25rem;  /* 4  */
  --space-2: 0.5rem;   /* 8  */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */

  /* fluid type scale, ratio 1.25 */
  --step-body: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.25rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.5vw, 3rem);
  --step-5: clamp(2.6rem, 1.3rem + 5.5vw, 3.75rem);

  --section-pad: clamp(3rem, 2rem + 6vw, 8rem);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(14% 0.045 261);
    --bg-alt: oklch(21.2% 0.051 260.5);
    --fg: oklch(96% 0.01 258);
    --fg-muted: oklch(66.1% 0.026 262.1);
    --accent: oklch(79.3% 0.121 197);
    --accent-solid: oklch(79.3% 0.121 197);
    --accent-solid-hover: oklch(100% 0 0);
    --accent-on-inverse: oklch(79.3% 0.121 197);
    --on-accent-solid: oklch(21.2% 0.051 260.5);
    --bg-inverse: oklch(21.2% 0.051 260.5);
    --border: oklch(32% 0.03 261);
    --focus: oklch(79.3% 0.121 197);
  }
}
:root[data-theme="dark"] {
  --bg: oklch(14% 0.045 261);
  --bg-alt: oklch(21.2% 0.051 260.5);
  --fg: oklch(96% 0.01 258);
  --fg-muted: oklch(66.1% 0.026 262.1);
  --accent: oklch(79.3% 0.121 197);
  --accent-solid: oklch(79.3% 0.121 197);
  --accent-solid-hover: oklch(100% 0 0);
  --accent-on-inverse: oklch(79.3% 0.121 197);
  --on-accent-solid: oklch(21.2% 0.051 260.5);
  --bg-inverse: oklch(21.2% 0.051 260.5);
  --border: oklch(32% 0.03 261);
  --focus: oklch(79.3% 0.121 197);
}

/* ===================================================================== Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: var(--step-body);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 4rem);
}

/* ===================================================================== Accessibility helpers */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--fg); color: var(--bg); padding: var(--space-3) var(--space-5);
  z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus-visible { left: 0; top: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* mouse users don't see a ring on elements we style explicitly */
.btn:focus-visible { outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===================================================================== Buttons — 5 states each */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn-primary {
  background: var(--accent-solid);
  color: var(--on-accent-solid);
}
.btn-primary:hover { background: var(--accent-solid-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary[disabled], .btn-primary[aria-disabled="true"] {
  background: var(--border); color: var(--fg-muted); cursor: not-allowed; pointer-events: none;
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--fg); }
.btn-ghost:active { transform: scale(0.98); }

/* ===================================================================== Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
  padding-block: var(--space-3);
  gap: var(--space-4);
}
.brand-logo { height: 36px; width: auto; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo-dark { display: block; }
}
.main-nav { display: none; gap: var(--space-6); }
.main-nav a {
  font-weight: 600; font-size: 0.95rem; color: var(--fg);
  padding: var(--space-2) 0;
}
.main-nav a:hover { color: var(--accent-solid); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.theme-toggle {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
}
.theme-toggle:hover { border-color: var(--fg-muted); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--fg); }

.main-nav.is-open {
  display: flex; flex-direction: column; gap: 0;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: var(--space-2) clamp(1rem, 5vw, 4rem) var(--space-5);
}
.main-nav.is-open a { padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }

/* keep the sticky header compact on mobile: one repeated primary CTA (in the hero) is enough */
.header-actions .btn-primary { display: none; }
@media (min-width: 768px) {
  .header-actions .btn-primary { display: inline-flex; }
}

/* anchor targets shouldn't hide under the sticky header */
section[id] { scroll-margin-top: 84px; }

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ===================================================================== Hero */
.hero { padding-block: clamp(2.5rem, 4vw, 4rem) var(--section-pad); overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1fr; align-items: center; gap: var(--space-7);
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  font-weight: 700; color: var(--accent-solid); margin-bottom: var(--space-4);
}
.hero h1 { font-size: var(--step-5); max-width: 16ch; margin-bottom: var(--space-5); }
.hero-lede { font-size: var(--step-1); color: var(--fg-muted); max-width: 60ch; margin-bottom: var(--space-5); }
.tagline {
  font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg); font-size: 0.95rem; margin-bottom: var(--space-6);
}
.tagline-light { color: var(--accent-on-inverse); }
.hero-ctas { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.hero-mark { justify-self: center; width: 100%; max-width: 220px; opacity: 0.92; }

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
  .hero-mark { max-width: 320px; }
}

/* ===================================================================== Icon circles */
.icon-circle {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: var(--accent-solid);
  display: flex; align-items: center; justify-content: center;
}
.icon-circle img { width: 26px; height: 26px; }
.icon-circle.small { width: 46px; height: 46px; }
.icon-circle.small img { width: 22px; height: 22px; }

/* ===================================================================== Intrinsic grids */
.pillars { padding-block: 0 var(--section-pad); }
.pillars-grid, .card-grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}
.pillar, .card {
  background: var(--bg-alt); border-radius: var(--radius-lg); padding: var(--space-6);
}
.pillar h3, .card h3 { font-size: var(--step-2); margin: var(--space-4) 0 var(--space-2); }
.pillar p, .card p { color: var(--fg-muted); }

/* ===================================================================== Sections */
.section { padding-block: var(--section-pad); }
.section-alt { background: var(--bg-alt); }
.kicker {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  font-weight: 700; color: var(--accent-solid); margin-bottom: var(--space-3);
}
.kicker-light { color: var(--accent-on-inverse); }
.section h2 { font-size: var(--step-4); max-width: 22ch; margin-bottom: var(--space-4); }
.section-lede { color: var(--fg-muted); font-size: var(--step-1); max-width: 65ch; margin-bottom: var(--space-7); }

/* ===================================================================== Differentiators */
.diff-grid {
  display: grid; gap: var(--space-6) var(--space-7);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.diff-row { display: flex; gap: var(--space-4); align-items: flex-start; }
.diff-row h4 { font-size: var(--step-1); margin-bottom: var(--space-1); }
.diff-row p { color: var(--fg-muted); }

/* ===================================================================== Stat band */
.stat-band { background: var(--bg-inverse); color: var(--fg-on-inverse); padding-block: var(--section-pad); }
.stat-band-inner { display: grid; gap: var(--space-6); grid-template-columns: 1fr; align-items: center; }
.stat-number { font-size: var(--step-5); font-weight: 800; line-height: 1; margin-block: var(--space-2); }
.stat-label { color: var(--fg-on-inverse-muted); font-size: var(--step-1); max-width: 32ch; }
.stat-points li {
  padding-left: var(--space-5); position: relative; margin-bottom: var(--space-4); font-size: var(--step-body);
}
.stat-points li::before {
  content: ''; position: absolute; left: 0; top: 0.5em;
  width: 8px; height: 8px; background: var(--accent-on-inverse);
}
@media (min-width: 1024px) { .stat-band-inner { grid-template-columns: 1.2fr 1fr; } }

/* ===================================================================== Who we serve */
.serve-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
.serve-card { background: var(--bg-alt); border-radius: var(--radius-lg); padding: var(--space-7); }
.serve-card h3, .serve-pills h3 { font-size: var(--step-2); margin-bottom: var(--space-5); }
.bullet-list li {
  padding-left: var(--space-5); position: relative; margin-bottom: var(--space-3); font-size: 0.98rem;
}
.bullet-list li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 7px; height: 7px; background: var(--accent-solid);
}
.pill-wrap { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.pill {
  background: var(--fg); color: var(--bg); font-weight: 600; font-size: 0.85rem;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-full);
}
@media (min-width: 1024px) { .serve-grid { grid-template-columns: 1.1fr 1fr; } }

/* ===================================================================== Outcomes */
.outcome-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.outcome {
  background: var(--bg); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6);
  display: flex; align-items: center; gap: var(--space-5);
}
.outcome-num {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--fg); color: var(--accent-on-inverse);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.outcome p { font-weight: 700; font-size: 1.02rem; }
@media (min-width: 768px) { .outcome-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===================================================================== CTA band */
.cta-band { background: var(--bg-inverse); padding-block: var(--section-pad); }
.cta-inner { text-align: center; color: var(--fg-on-inverse); }
.cta-inner h2 { font-size: var(--step-4); margin-bottom: var(--space-4); }
.cta-inner .tagline { margin-bottom: var(--space-6); }
.cta-inner .btn-primary { padding-inline: var(--space-7); }

/* ===================================================================== Contact form */
.contact-layout { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
.contact-form { display: flex; flex-direction: column; gap: var(--space-5); max-width: 40rem; }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-weight: 400; color: var(--fg-muted); font-size: 0.85rem; }
.field input, .field textarea {
  min-height: 44px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--fg-muted); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: oklch(55% 0.19 25);
}
.field-error {
  color: oklch(45% 0.19 25); font-size: 0.85rem; display: none;
}
.field-error.is-visible { display: block; }
.form-status {
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-md);
  background: var(--bg-alt); font-size: 0.95rem; display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error { color: oklch(45% 0.19 25); }

@media (min-width: 1024px) { .contact-layout { grid-template-columns: 1fr 1fr; } }

/* ===================================================================== Footer */
.site-footer { background: var(--bg-inverse); color: var(--fg-on-inverse-muted); padding-block: var(--space-8) var(--space-5); }
.footer-inner {
  display: grid; gap: var(--space-7);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-7); border-bottom: 1px solid var(--border-inverse);
}
.footer-brand .brand-logo { height: 24px; margin-bottom: var(--space-3); }
.footer-brand p { font-size: 0.9rem; }
.footer-nav { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-nav a:hover { color: var(--fg-on-inverse); }
.footer-contact { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-row { display: flex; align-items: center; gap: var(--space-3); font-size: 0.92rem; }
.contact-row:hover { color: var(--fg-on-inverse); }
.footer-bottom {
  display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-5);
  font-size: 0.82rem;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.2fr 1fr 1.4fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ===================================================================== Scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.4s ease-out, transform 0.4s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===================================================================== Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
