/* ── Palette / Typography / Spacing tokens — mirror of DESIGN.md ──
   Mirror DESIGN.md changes here. NEVER hardcode hex codes outside :root. */
:root {
  /* GATE 2 — palette. Default: bold + warm + Framer-leaning light theme. */
  --bg:        #FAFAF7;   /* off-white surface */
  --surface:   #FFFFFF;   /* elevated card surface */
  --ink:       #0B0B0F;   /* near-black, never pure #000 */
  --ink-muted: #5C5C68;   /* secondary text */
  --accent:    #FF5A1F;   /* warm primary — CTAs, links, key highlights */
  --accent-2:  #0EA5E9;   /* cool secondary — signature-move accents (GATE 9) */
  --border:    rgba(11, 11, 15, 0.08);
  --border-strong: rgba(11, 11, 15, 0.16);

  /* GATE 3 — typography pair from DESIGN.md. */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* GATE 11 — spacing tokens on a 4/8px ladder. */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii on a single scale. */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* GATE 12 — multi-layer shadow tokens. */
  --shadow-card:        0 4px 12px rgba(11, 11, 15, 0.06), 0 1px 3px rgba(11, 11, 15, 0.04);
  --shadow-card-hover:  0 18px 40px -10px rgba(11, 11, 15, 0.18), 0 4px 12px rgba(11, 11, 15, 0.08);
  --shadow-elevated:    0 30px 60px -20px rgba(11, 11, 15, 0.25), 0 6px 16px rgba(11, 11, 15, 0.08);

  /* Motion. GATE 13 — transitions live in the 200-300ms range. */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:   180ms;
  --t-base:   240ms;

  --width:        1180px;
  --width-narrow: 720px;
}

/* ── Reset / base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
ul { list-style: none; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--ink); }
::selection { background: var(--accent); color: var(--bg); }

/* ── Display typography ───────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}
h1.display, .hero h1 {
  /* GATE 4 — hero h1 IS massive. */
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-4);
}
h2, .display.h2 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}
h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: var(--space-2) 0 var(--space-2);
}
h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: var(--space-3);
}
p { color: var(--ink-muted); margin-bottom: var(--space-4); max-width: 65ch; }

/* ── Layout primitives ────────────────────────────────────────── */
.container {
  max-width: var(--width);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.container.narrow { max-width: var(--width-narrow); }

.section {
  /* GATE 11 — section padding scales fluidly, never a one-off 2rem. */
  padding-block: clamp(3rem, 8vw, 6rem);
}
.section-tight {
  /* Used for the stats strip directly under the hero — half the vertical
     padding so the strip reads as part of the hero zone, not a new chapter. */
  padding-block: clamp(1.5rem, 4vw, 3rem);
}
.section-soft {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.section-center {
  /* Centers narrow content sections (about / mission) so the eyebrow + h2
     don't float awkwardly on the left edge of a centered narrow container. */
  text-align: center;
}
.section-center .eyebrow,
.section-center .display {
  margin-inline: auto;
}
.section-center p {
  margin-inline: auto;
}
.section-lead {
  /* Subtitle paragraph between an h2 and a card grid. Slightly larger than
     body copy so it pairs with the display heading instead of fading away. */
  font-size: 1.0625rem;
  max-width: 56ch;
  margin-bottom: var(--space-8);
}

/* GATE 6 — every list of similar items goes in .grid + grid-N. */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ── Eyebrow (GATE 9 — uses --accent-2 by default; .eyebrow-cool inverts to warm) ── */
.eyebrow {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.eyebrow-cool {
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color: var(--accent-2);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  /* GATE 13 — every interactive element has hover + transition. */
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-card);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  color: #fff;
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ── Nav (GATE 5) ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo:hover { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--space-2) 0;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.btn { padding: var(--space-3) var(--space-5); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
  padding: var(--space-2);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  /* GATE 10 — signature move: subtle two-accent radial wash behind the hero
     (warm halo top, cool halo bottom-right). Replace with whatever creative
     move DESIGN.md commits to. */
  background:
    radial-gradient(60% 80% at 20% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(50% 60% at 100% 100%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%),
    var(--bg);
  text-align: left;
}
.hero-inner {
  max-width: 880px;
  padding-block: clamp(2rem, 4vw, 4rem);
}
.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 60ch;
  margin-block: var(--space-4) var(--space-8);
}
.cta-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* ── Cards (GATES 6 + 12) ─────────────────────────────────────── */
.card {
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
}
.feature .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}
.feature p { margin-bottom: var(--space-5); }

/* Subtle in-card link — every feature card ends with one to give cards a
   clear "next action", which keeps them from feeling like dead read-only
   blocks. The arrow nudges right on hover (GATE 13). */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: -0.005em;
}
.card-link::after {
  content: "→";
  transition: transform var(--t-fast) var(--ease);
}
.card-link:hover { color: var(--ink); }
.card-link:hover::after { transform: translateX(3px); }

/* ── Stat cards (proof-point strip under the hero) ───────────────────────
   Smaller padding than feature cards, big display-font number, all-caps
   label underneath. The 4-column auto-fit grid collapses gracefully:
   4 → 2 → 1 columns as the viewport narrows. */
.stat-grid { gap: var(--space-4); }
.stat-card {
  padding: var(--space-6) var(--space-5);
  text-align: left;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.stat-num .stat-unit {
  font-size: 0.55em;
  font-weight: 700;
  color: var(--accent);
  margin-left: 0.1em;
  vertical-align: 0.15em;
}
.stat-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Testimonial card variant — for marketing-style social proof. */
.testimonial {
  position: relative;
  padding: var(--space-10) var(--space-8);
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: var(--space-3);
  left: var(--space-6);
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: color-mix(in srgb, var(--accent-2) 60%, transparent);
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: var(--space-5);
  letter-spacing: -0.01em;
  /* Indent the quote text past the giant ::before glyph so the first line
     never crowds the curl, even on the narrowest mobile viewports. */
  padding-left: var(--space-6);
}
@media (max-width: 480px) {
  .testimonial::before { font-size: 3.5rem; top: var(--space-2); left: var(--space-4); }
  .testimonial blockquote { padding-left: var(--space-4); font-size: 1.125rem; }
}
.testimonial cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ── Two-column split (form + info sidebar) ──────────────────────────────
   Used by the contact section. Auto-fit means the right card drops below
   the form on narrower viewports without a media query. */
.contact-head { margin-bottom: var(--space-8); max-width: 56ch; }
.contact-head p { font-size: 1.0625rem; margin-bottom: 0; }
.split { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent-2) 6%, var(--surface)) 0%,
    var(--surface) 100%);
}
.info-card h3 { margin-top: 0; }
.info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-2);
}
.info-list li {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.info-foot {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* ── Forms (GATE 7) ───────────────────────────────────────────── */
.form-card {
  display: grid;
  gap: var(--space-5);
  margin-top: 0;
}
.field {
  display: grid;
  gap: var(--space-2);
}
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  font: inherit;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--ink-muted) 70%, transparent); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ── Footer (GATE 8) ──────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, #fff 70%, transparent);
  padding-block: clamp(3rem, 6vw, 5rem) var(--space-8);
  margin-top: var(--space-24);
}
.footer-grid {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 2fr repeat(2, 1fr);
}
.footer-brand p {
  color: color-mix(in srgb, #fff 60%, transparent);
  margin-top: var(--space-3);
  max-width: 36ch;
}
.logo-on-dark { color: #fff; }
.logo-on-dark:hover { color: var(--accent); }
.site-footer h4 { color: #fff; margin-bottom: var(--space-4); }
.footer-links li { margin-bottom: var(--space-2); }
.footer-links a {
  color: color-mix(in srgb, #fff 70%, transparent);
  font-size: 0.95rem;
}
.footer-links a:hover { color: var(--accent); }
.footer-meta {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid color-mix(in srgb, #fff 12%, transparent);
  font-size: 0.8125rem;
  color: color-mix(in srgb, #fff 50%, transparent);
}
.footer-meta p { margin: 0; color: inherit; max-width: none; }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    padding: var(--space-4) var(--space-6);
    gap: var(--space-3);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* Reduced motion — respect user preference. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}