/* ==========================================================================
   BH PARTNERS — Design System
   --------------------------------------------------------------------------
   Institutional · Quantitative · Technological · Precise · Discreet
   Edit design tokens in :root below to re-skin the entire site.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:              #05070d;
  --bg-alt:          #070a12;
  --surface:         rgba(255, 255, 255, 0.022);
  --surface-hover:   rgba(255, 255, 255, 0.04);
  --border:          rgba(255, 255, 255, 0.08);
  --border-strong:   rgba(255, 255, 255, 0.14);

  /* Text */
  --text:            #e9edf6;
  --text-soft:       #a8b2c6;
  --text-muted:      #6f7b92;

  /* Accent — electric blue */
  --accent:          #3b7bff;
  --accent-bright:   #6b9bff;
  --accent-dim:      rgba(59, 123, 255, 0.14);
  --accent-glow:     rgba(59, 123, 255, 0.30);

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo,
               Consolas, monospace;

  /* Layout */
  --maxw:      1200px;
  --maxw-wide: 1440px;
  --gutter:    clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5rem, 10vw, 9rem);
  --radius:    14px;
  --radius-sm: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); letter-spacing: -0.018em; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--text-soft);
  max-width: 62ch;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-family: var(--font-mono);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.text-muted { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--maxw-wide); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.section--alt { background: var(--bg-alt); }

.section-divider { border-top: 1px solid var(--border); }

.section-header { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-header--center { margin-inline: auto; text-align: center; }
.section-header--center .eyebrow::before { display: none; }
.section-header--center .lead { margin-inline: auto; }
.section-header h2 + .lead { margin-top: 1.25rem; }

/* Faint technical grid used behind key sections */
.grid-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 8px 28px -8px var(--accent-glow);
}

.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--surface-hover);
}

.btn--sm { padding: 0.55rem 1.15rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

/* Text link with underline sweep */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-bright);
  font-weight: 500;
  font-size: 0.9375rem;
}
.link-arrow .arrow { transition: transform 0.25s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. Navbar
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(5, 7, 13, 0.78);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand:hover .brand__mark { opacity: 0.85; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-soft);
  transition: color 0.2s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--text); }

.nav__cta { display: inline-flex; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--text);
  position: relative;
  transition: background-color 0.2s var(--ease);
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}
.nav__toggle span::before { top: -5px; }
.nav__toggle span::after  { top: 5px; }

.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 99;
  display: none;
  flex-direction: column;
  padding: 2rem var(--gutter) 3rem;
  background: rgba(5, 7, 13, 0.97);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.nav__drawer.is-open { opacity: 1; transform: none; }
.nav__drawer ul {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.nav__drawer li { border-bottom: 1px solid var(--border); }
.nav__drawer a {
  display: block;
  padding: 1.05rem 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-soft);
}
.nav__drawer a[aria-current="page"] { color: var(--accent-bright); }

body.nav-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 900px);
  padding-block: calc(var(--nav-h) + 5rem) 5rem;
  overflow: hidden;
  isolation: isolate;
}
.hero--page {
  min-height: 0;
  padding-block: calc(var(--nav-h) + clamp(4.5rem, 9vw, 7.5rem)) clamp(3rem, 6vw, 5rem);
}

.hero__viz {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

/* Static gradient fallback / ambience layer */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 34rem at 78% 18%, rgba(59, 123, 255, 0.16), transparent 62%),
    radial-gradient(46rem 30rem at 10% 92%, rgba(59, 123, 255, 0.08), transparent 65%),
    linear-gradient(to bottom, transparent 55%, var(--bg) 100%);
}

.hero__content { max-width: 44rem; }
.hero h1 { margin-bottom: 1.75rem; }
.hero .lead { max-width: 40rem; }

/* Small status chip above the headline */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.chip__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* --------------------------------------------------------------------------
   8. Metrics
   -------------------------------------------------------------------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metric {
  padding: clamp(2rem, 3.5vw, 2.75rem) clamp(1rem, 2vw, 2rem);
  border-left: 1px solid var(--border);
}
.metric:first-child { border-left: 0; }
.metric__value {
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  background: linear-gradient(180deg, var(--text) 30%, var(--text-soft) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.metric__label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease),
              transform 0.3s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(24rem 16rem at 50% 0%, var(--accent-dim), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-3px);
}
.card:hover::after { opacity: 1; }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(59, 123, 255, 0.07);
  color: var(--accent-bright);
}
.card__icon svg { width: 20px; height: 20px; }

.card h3 { margin-bottom: 0.75rem; }
.card p {
  color: var(--text-soft);
  font-size: 0.9375rem;
  line-height: 1.68;
}

/* Numbered index shown on technology cards */
.card__index {
  position: absolute;
  top: 1.5rem; right: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   10. Process timeline
   -------------------------------------------------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    var(--accent) 0%, rgba(59, 123, 255, 0.35) 45%, var(--border) 100%);
}
.step { position: relative; padding: 0 1.75rem 0 0; }
.step__node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-bright);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover .step__node {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-dim);
}
.step h3 { margin: 1.75rem 0 0.7rem; }
.step p {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.68;
  max-width: 22rem;
}

/* --------------------------------------------------------------------------
   11. Split feature rows (About)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }

.pillars {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--bg);
  transition: background-color 0.3s var(--ease);
}
.pillar:hover { background: var(--bg-alt); }
.pillar h3 { margin-bottom: 0.6rem; }
.pillar p { color: var(--text-soft); font-size: 0.9375rem; margin: 0; }

/* Decorative panel used where a large abstract visual is called for */
.panel-viz {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(30rem 20rem at 70% 25%, rgba(59, 123, 255, 0.12), transparent 70%),
    var(--bg-alt);
  overflow: hidden;
}
.panel-viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   12. Careers
   -------------------------------------------------------------------------- */
.roles {
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 2.5vw, 2rem) 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease);
}
.role:hover { padding-left: 0.75rem; }
.role h3 { margin-bottom: 0.6rem; }
.role__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: 0.5rem; }
.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}
label .req { color: var(--accent-bright); }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(59, 123, 255, 0.05);
}
textarea { resize: vertical; min-height: 8.5rem; }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.consent input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 2px; }

/* Honeypot — must stay invisible to humans, reachable to bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form__status {
  display: none;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.form__status.is-visible { display: block; }
.form__status.is-success {
  border-color: rgba(59, 123, 255, 0.4);
  background: var(--accent-dim);
  color: var(--text);
}
.form__status.is-error {
  border-color: rgba(255, 106, 106, 0.4);
  background: rgba(255, 106, 106, 0.08);
  color: #ffb9b9;
}

.btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }

/* Contact detail list */
.contact-details {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-details > div {
  padding: 1.5rem;
  background: var(--bg-alt);
}
.contact-details dt {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.contact-details dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}
.contact-details dd a:hover { color: var(--accent-bright); }

/* --------------------------------------------------------------------------
   13b. Prose (legal pages)
   -------------------------------------------------------------------------- */
.prose { max-width: 46rem; }
.prose__meta {
  margin-bottom: 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.prose h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 3rem 0 1rem;
}
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li {
  color: var(--text-soft);
  font-size: 0.9375rem;
  line-height: 1.78;
}
.prose ul {
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.5rem;
}
.prose a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Bracketed values still awaiting real company details */
.prose mark {
  background: var(--accent-dim);
  color: var(--text);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   14. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(46rem 26rem at 50% 120%, rgba(59, 123, 255, 0.16), transparent 70%),
    var(--bg);
  text-align: center;
}
.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  background: var(--bg-alt);
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
}
.footer__tagline {
  margin-top: 1.1rem;
  max-width: 26rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.footer h4 {
  margin-bottom: 1.1rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.footer ul a {
  font-size: 0.9375rem;
  color: var(--text-soft);
  transition: color 0.2s var(--ease);
}
.footer ul a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer__legal { max-width: 60ch; }

/* --------------------------------------------------------------------------
   16. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Never hide content if JS fails to run */
.no-js .reveal { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
  .process::before { display: none; }
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .form-layout { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }

  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__drawer { display: flex; }

  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { border-left: 1px solid var(--border); }
  .metric:nth-child(odd) { border-left: 0; }
  .metric:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .process { grid-template-columns: 1fr; row-gap: 2.25rem; }
  .step { padding-right: 0; }
  .field--row { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; align-items: start; }
  .role .btn { justify-self: start; }
  .btn-row .btn { width: 100%; }
  .footer__top { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-block: calc(var(--nav-h) + 4rem) 4rem; }
}

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

/* Print — keep legal pages readable on paper */
@media print {
  .nav, .nav__drawer, .cta-band, .hero__viz, .hero__glow { display: none !important; }
  body { background: #fff; color: #000; }
}
