/* ==========================================================================
   Bonsai Security — design tokens
   Values are lifted from the "1a Hero A" wireframe (Claude Design).
   ========================================================================== */

:root {
  --ink:          #0e0f0c;  /* headings, on-accent text */
  --ink-deep:     #163300;  /* deep green — links, eyebrow, ticks */
  --body:         #454745;  /* body copy */
  --muted:        #868685;  /* supporting copy, placeholders */
  --muted-strong: #6d6b66;  /* nav, chip labels */

  --accent:       #9fe870;  /* primary CTA */
  --accent-hover: #8fdc5e;
  --accent-soft:  #c5edab;  /* tick badges */

  --surface:      #ffffff;
  --surface-hero: #e8ebe6;  /* hero band */
  --surface-chip: #eceae5;

  --line:         #e4e1db;
  --line-strong:  #dcd9d2;

  --radius-pill:  9999px;
  --radius-lg:    24px;
  --radius-md:    12px;
  --radius-sm:    6px;

  --shell:        1160px;
  --gutter:       40px;

  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink-deep); }

:focus-visible {
  outline: 2px solid var(--ink-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font: 600 13px/1 var(--font);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-lg);
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--ink); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .55; cursor: progress; transform: none; }

.btn-sm    { padding: 9px 18px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cta-short { display: none; }
.btn-block { width: 100%; padding: 13px; font-size: 15px; font-weight: 600; }

.link-quiet {
  font: 600 12px/1 var(--font);
  color: var(--muted-strong);
  text-decoration: none;
}
.link-quiet:hover { color: var(--ink); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: none;
}
.logo-mark { flex: none; }
.logo-word {
  font: 700 16px/1 var(--font);
  letter-spacing: -.4px;
  color: var(--ink);
}
.logo-word-light { color: var(--muted-strong); font-weight: 500; margin-left: 2px; }

.primary-nav { margin-right: auto; }
.primary-nav ul { display: flex; gap: 18px; }
.primary-nav a {
  font: 600 12px/1 var(--font);
  color: var(--muted-strong);
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* Hamburger — hidden until the desktop nav collapses */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px; height: 32px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 16px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav {
  border-top: 1px solid var(--line);
  padding: 8px var(--gutter) 16px;
}
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font: 600 15px/1 var(--font);
  color: var(--ink);
  text-decoration: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { background: var(--surface-hero); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 32px;
  align-items: start;
  padding-block: 52px 44px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  align-self: flex-start;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font: 600 12px/1.4 var(--font);
  color: var(--ink-deep);
}

/* Tracking is in em, not px. The wireframe's -1.5px was tuned for its fixed 46px
   headline; as a px value it stays constant while the type scales, so it reads far
   tighter at the 36px mobile end than it ever did in the design. -0.032em is the
   same proportion the wireframe used, held steady across the whole clamp range. */
/* The 32px floor is measured, not guessed: "A firewall team costs" is the longest
   line, and above ~34px it wraps inside a 390px viewport — which would turn the
   three-line structure into four and split the first claim across lines. */
.hero h1 {
  font-weight: 900;
  font-size: clamp(32px, 5.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.032em;
  color: var(--ink);
}

.hero-sub {
  font-size: 18px;
  line-height: 28px;
  color: var(--body);
  max-width: 46ch;
}

.proof-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.proof-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 14px/1.45 var(--font);
  color: var(--body);
}
.tick {
  flex: none;
  width: 18px; height: 18px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 11px/1 var(--font);
}

/* ==========================================================================
   Application card
   ========================================================================== */

.apply-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-margin-top: 90px;
}

.apply-title { font: 900 22px/26px var(--font); color: var(--ink); }
.apply-sub   { font: 400 13px/19px var(--font); color: var(--muted); }

.apply-form { display: flex; flex-direction: column; gap: 14px; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field { margin: 0; }

.apply-form input,
.apply-form select {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font: 400 13px/1.4 var(--font);
  color: var(--ink);
  background: var(--surface);
  appearance: none;
}
.apply-form input::placeholder { color: var(--muted); }
.apply-form select:invalid { color: var(--muted); }

/* Chevron for the two selects, drawn rather than imaged */
.apply-form select {
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.apply-form input[aria-invalid="true"],
.apply-form select[aria-invalid="true"] {
  border-color: #b42318;
  background-color: #fff6f5;
}

/* Honeypot — off-screen, never announced, never tab-reachable */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font: 500 12px/17px var(--font);
  color: var(--body);
  min-height: 0;
}
.form-status:empty { display: none; }
.form-status[data-state="error"]   { color: #b42318; }
.form-status[data-state="success"] { color: var(--ink-deep); }

.apply-alt {
  font: 400 11px/15px var(--font);
  color: var(--muted);
  text-align: center;
}
.apply-alt a { color: var(--muted); text-decoration: underline; }
.apply-alt a:hover { color: var(--ink); }

.apply-trust {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font: 600 11px/1.4 var(--font);
  color: var(--muted);
}

/* ==========================================================================
   Section scaffolding
   ========================================================================== */

.section { padding-block: 56px; }

.section--white  { background: var(--surface); }
.section--tint   { background: var(--surface-hero); }
.section--dark   { background: var(--ink); }
.section--accent { background: var(--accent); }

.section-title {
  font-weight: 900;
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1;
  letter-spacing: -1.1px;
  color: var(--ink);
  margin-bottom: 8px;
}
.section-title--solo { margin-bottom: 30px; }

.section-lede {
  font-size: 18px;
  line-height: 27px;
  color: var(--body);
  max-width: 65ch;
  margin-bottom: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
}
.section-head .section-lede { margin-bottom: 0; margin-top: 8px; }

.link-arrow {
  font: 600 14px/1 var(--font);
  color: var(--ink-deep);
  text-decoration: underline;
  white-space: nowrap;
}

.kicker {
  font: 600 12px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.kicker--accent { color: var(--accent); }

.btn-md { padding: 13px 24px; font-size: 15px; font-weight: 600; }
.btn-dark { background: var(--ink); color: var(--accent); }
.btn-dark:hover { background: #23241f; color: var(--accent); }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-light:hover { background: #efeee9; color: var(--ink); }
.btn-outline-dark {
  border: 1px solid #3a3c38;
  background: transparent;
  color: #fff;
}
.btn-outline-dark:hover { background: #23241f; color: #fff; }
.btn-outline {
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
}
.btn-outline:hover { background: #f5f4f0; color: var(--ink); }

/* ==========================================================================
   Build vs partner
   ========================================================================== */

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-card { background: var(--surface); border-radius: var(--radius-lg); padding: 26px; }
.compare-card--dark { background: var(--ink); }

.compare-head {
  font: 600 12px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 14px;
}
.compare-head--con { color: #a72027; }
.compare-head--pro { color: var(--accent); }

.compare-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f0eee9;
  font: 400 15px/21px var(--font);
  color: var(--body);
}
.compare-card--dark .compare-list li { border-bottom-color: #2a2c28; color: #c8cac6; }
.compare-list li:last-child { border-bottom: 0; }
.mark { font-weight: 700; flex: none; }
.mark--con { color: #d03238; }
.mark--pro { color: var(--accent); }

/* ==========================================================================
   Operations cards
   ========================================================================== */

.ops-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ops-card {
  background: var(--surface-hero);
  border-radius: 16px;
  padding: 20px;
}
.ops-icon { display: block; width: 48px; height: 48px; margin-bottom: 10px; }
.ops-card h3 { font: 600 16px/1.3 var(--font); color: var(--ink); margin-bottom: 10px; }
.ops-card p  { font: 400 13px/19px var(--font); color: var(--muted); }

/* ==========================================================================
   Platform cards
   ========================================================================== */

.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* Logo-only tiles: the mark is the entire card, so centre it on both axes and
   give every tile the same height regardless of each logo's proportions. */
.platform-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px 18px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 100%;
}
.platform-logo img {
  height: auto;
  max-height: 44px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* If a logo ever fails to load, app.js swaps in its alt text — with no other
   content in the card, hiding the image outright would leave an empty tile. */
.platform-logo--text {
  font: 600 14px/1.3 var(--font);
  color: var(--muted-strong);
  text-align: center;
}

/* ==========================================================================
   Onboarding steps
   ========================================================================== */

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step {
  border-top: 3px solid var(--accent);
  padding-top: 16px;
}
.step-n { font: 900 15px/1 var(--font); color: var(--muted); margin-bottom: 10px; }
.step h3 { font: 600 19px/24px var(--font); color: var(--ink); margin-bottom: 10px; }
.step-d { font: 400 14px/21px var(--font); color: var(--body); margin-bottom: 10px; }
.step-t { font: 600 12px/1 var(--font); color: var(--ink-deep); }

/* ==========================================================================
   Pricing
   ========================================================================== */

.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }

.price-card {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.price-intro { font: 400 20px/28px var(--font); color: #c8cac6; }
.price-figure { display: flex; align-items: baseline; gap: 10px; }
.price-amount {
  font: 900 clamp(58px, 7vw, 88px)/.9 var(--font);
  color: var(--accent);
  letter-spacing: -3px;
}
.price-unit { font: 600 17px/1.2 var(--font); color: #fff; }
.price-note { font: 400 15px/23px var(--font); color: var(--muted); max-width: 42ch; }
.price-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.factors-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 34px;
}
.factors-title { font: 900 26px/28px var(--font); color: var(--ink); margin-bottom: 16px; }
.factors-intro { font: 400 15px/23px var(--font); color: var(--body); margin-bottom: 6px; }
.factors-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f0eee9;
}
.factor-n {
  flex: none;
  width: 22px; height: 22px;
  border-radius: var(--radius-pill);
  background: #e2f6d5;
  color: #054d28;
  font: 700 11px/22px var(--font);
  text-align: center;
}
.factors-list h4 { font: 600 15px/1.3 var(--font); color: var(--ink); }
.factors-list p  { font: 400 13px/19px var(--font); color: var(--muted); margin-top: 2px; }
.factors-foot { font: 400 13px/19px var(--font); color: var(--muted); margin-top: 16px; }

/* ==========================================================================
   Partner story
   ========================================================================== */

.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.story-copy { display: flex; flex-direction: column; gap: 20px; }
.story-quote { margin: 0; }
.story-quote p { font: 400 clamp(20px, 2vw, 26px)/1.4 var(--font); color: #fff; }
.story-attr { display: flex; align-items: center; gap: 12px; }
.story-avatar {
  flex: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  background: #3a3c38;
}
.story-attr strong { display: block; font: 600 15px/1.4 var(--font); color: #fff; }
.story-attr span span { display: block; font: 400 13px/1.4 var(--font); color: var(--muted); }

.case-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case-stats li { background: var(--ink-deep); border-radius: 16px; padding: 18px; }
.case-v { font: 900 28px/1 var(--font); color: var(--accent); }
.case-l { font: 400 12px/17px var(--font); color: #c8cac6; margin-top: 4px; }

/* ==========================================================================
   Fit cards
   ========================================================================== */

.fits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fit-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.fit-card h3 { font: 600 16px/1.3 var(--font); color: var(--ink); margin-bottom: 8px; }
.fit-card p  { font: 400 14px/20px var(--font); color: var(--body); }

/* ==========================================================================
   FAQ — native <details>, so it opens without JavaScript
   ========================================================================== */

.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.faq-aside { font: 400 16px/24px var(--font); color: var(--body); margin-top: 12px; }
.faq-aside a { color: var(--ink-deep); }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 20px;
}
.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 600 16px/1.4 var(--font);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  flex: none;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { font: 400 14px/21px var(--font); color: var(--body); margin-top: 8px; }

/* ==========================================================================
   Closing CTA band
   ========================================================================== */

.closing { padding-block: 60px; }
.closing-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.closing-copy { display: flex; flex-direction: column; gap: 16px; }
.closing-title {
  font-weight: 900;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: .96;
  letter-spacing: -1.4px;
  color: var(--ink);
}
.closing-lede { font: 400 17px/26px var(--font); color: var(--ink-deep); max-width: 44ch; }
.closing-points {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font: 600 13px/1.4 var(--font);
  color: var(--ink-deep);
}

.apply-form textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font: 400 13px/1.5 var(--font);
  color: var(--ink);
  background: var(--surface);
  resize: vertical;
  min-height: 52px;
}
.apply-form textarea::placeholder { color: var(--muted); }

/* ==========================================================================
   Services page
   ========================================================================== */

.primary-nav a.is-current {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.breadcrumb { margin-bottom: 12px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li { font: 400 12px/1.4 var(--font); color: var(--muted); }
.breadcrumb li + li::before { content: "/ "; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

.svc-hero { padding-block: 44px 36px; }
.svc-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
}
.svc-hero-copy { display: flex; flex-direction: column; gap: 14px; }
.svc-hero h1 {
  font-weight: 900;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: .96;
  letter-spacing: -1.4px;
  color: var(--ink);
}
.svc-hero-lede { font: 400 17px/26px var(--font); color: var(--body); max-width: 54ch; }
.svc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.jump-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.jump-title { font: 600 14px/1 var(--font); color: var(--ink); margin-bottom: 10px; }
.jump-card ul { display: flex; flex-direction: column; }
.jump-card a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f0eee9;
  font: 400 13px/1.4 var(--font);
  color: var(--body);
  text-decoration: none;
}
.jump-card a span { color: var(--muted); }
.jump-card a:hover { color: var(--ink); }
.jump-card li:last-child a { border-bottom: 0; }

/* Filter bar — the chips are hidden until app.js wires them up, so a
   no-JavaScript visitor sees every block rather than dead buttons. */
.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-block: 20px;
}
.filter-label {
  font: 600 11px/1 var(--font);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0;
  background: var(--surface-chip);
  color: var(--body);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font: 600 12px/1.4 var(--font);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.chip:hover { background: #e2dfd8; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.svc-blocks .shell { display: flex; flex-direction: column; gap: 16px; }
.svc-block {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 28px;
  padding: 24px;
  background: var(--surface-hero);
  border-radius: var(--radius-lg);
  scroll-margin-top: 90px;
}
.svc-block-copy { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.svc-block h2 { font: 900 clamp(22px, 2.2vw, 26px)/1.08 var(--font); color: var(--ink); }
.svc-block-copy p { font: 400 14px/21px var(--font); color: var(--body); }
.sla-pill {
  margin-top: 6px;
  font: 600 12px/1.4 var(--font) !important;
  color: #054d28 !important;
  background: #e2f6d5;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}
.svc-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.svc-items li {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  font: 400 13px/18px var(--font);
  color: var(--body);
}

/* Coverage matrix */
.matrix-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.matrix-scroll { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; min-width: 620px; }
.matrix thead tr { background: var(--ink); }
.matrix thead th {
  text-align: left;
  padding: 14px 18px;
  font: 600 13px/1.3 var(--font);
  color: #fff;
}
.matrix thead th:first-child {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.matrix thead th.col-best { color: var(--accent); }
.matrix tbody tr { border-bottom: 1px solid #f0eee9; }
.matrix tbody th {
  text-align: left;
  padding: 12px 18px;
  font: 400 14px/1.4 var(--font);
  color: var(--body);
}
.matrix tbody td {
  padding: 12px 18px;
  font: 600 14px/1.4 var(--font);
  color: var(--body);
}
.matrix tbody td:first-of-type { color: var(--muted); }
.matrix tbody td.col-best { color: #054d28; }

.matrix-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--ink);
  padding: 22px 24px;
}
.matrix-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.matrix-price-label  { font: 600 13px/1.4 var(--font); color: #c8cac6; }
.matrix-price-amount { font: 900 44px/1 var(--font); color: var(--accent); letter-spacing: -1.5px; }
.matrix-price-unit   { font: 600 13px/1.4 var(--font); color: #fff; }

.matrix-note { margin-top: 14px; font: 400 12px/18px var(--font); color: var(--muted); }

/* Closing CTA pair */
.cta-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cta-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.cta-card h3 { font: 900 26px/28px var(--font); }
.cta-card p  { font: 400 15px/23px var(--font); margin: 0; }
.cta-card--dark { background: var(--ink); }
.cta-card--dark h3 { color: var(--accent); }
.cta-card--dark p  { color: #c8cac6; }
.cta-card--tint { background: var(--surface-hero); }
.cta-card--tint h3 { color: var(--ink); }
.cta-card--tint p  { color: var(--body); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  padding-block: 44px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 28px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand p {
  font: 400 13px/20px var(--font);
  color: var(--muted);
  max-width: 30ch;
}
.logo-invert .logo-word { color: #fff; }
.logo-invert .logo-word-light { color: var(--muted); }

.footer-head {
  font: 600 12px/1 var(--font);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 9px;
}
.site-footer nav ul { display: flex; flex-direction: column; gap: 9px; }
.site-footer nav a {
  font: 400 13px/1.3 var(--font);
  color: var(--muted);
  text-decoration: none;
}
.site-footer nav a:hover { color: #fff; }

.footer-base {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #2a2c28;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font: 400 12px/1.4 var(--font);
  color: var(--muted-strong);
}
.footer-base p { margin: 0; }
.footer-base a { color: var(--muted-strong); text-decoration: none; }
.footer-base a:hover { color: #fff; }

/* ==========================================================================
   Utility pages (404, thanks)
   ========================================================================== */

.narrow-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 720px;
  margin-inline: 0;
  padding-block: 72px 96px;
}
.narrow-page h1 {
  font-weight: 900;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -1.2px;
  color: var(--ink);
}
.narrow-page p { margin: 0; }

/* ==========================================================================
   Sticky mobile CTA (from the 1f mobile wireframe)
   ========================================================================== */

.sticky-cta {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 45;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sticky-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  font: 600 12px/16px var(--font);
  color: var(--ink);
}
.sticky-copy span { font-weight: 400; color: var(--muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  :root { --gutter: 24px; }

  .primary-nav,
  .header-actions .link-quiet { display: none; }
  .nav-toggle { display: flex; }
  .logo { margin-right: auto; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 40px 36px;
  }
  .hero-sub { max-width: none; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  .footer-brand { grid-column: 1 / -1; }

  .section { padding-block: 44px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }

  .ops-grid,
  .platform-grid,
  .steps-grid,
  .fits-grid { grid-template-columns: repeat(2, 1fr); }

  .compare-grid,
  .price-grid,
  .story-grid,
  .faq-grid,
  .closing-grid { grid-template-columns: 1fr; }

  .price-card { padding: 28px; }
  .factors-card { padding: 26px; }
  .story-grid { gap: 28px; }

  .svc-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .svc-block { grid-template-columns: 1fr; gap: 18px; }
  .cta-pair { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }

  .site-header { position: static; }
  .header-inner { gap: 10px; }
  .cta-long  { display: none; }
  .cta-short { display: inline; }

  /* The desktop headline breaks are art-directed; let it wrap naturally instead.
     The hero h1 opts out — see the comment on its rule. */
  .wide-only { display: none; }
  .hero-sub { font-size: 15px; line-height: 23px; }

  .apply-card { padding: 22px; }
  .field-grid { grid-template-columns: 1fr; }

  .section { padding-block: 40px; }
  .section-lede { font-size: 16px; line-height: 24px; }

  .ops-grid,
  .steps-grid,
  .fits-grid { grid-template-columns: 1fr; }

  .price-actions .btn { width: 100%; }
  .closing-points { gap: 10px 20px; }

  .svc-hero-actions .btn { width: 100%; }
  .svc-items { grid-template-columns: 1fr; }
  .matrix-foot { padding: 20px; }

  .sticky-cta { display: flex; }
  body { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
