/* ========== TOKENS ========== */
:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --ink: #111111;
  --ink-muted: #4a4a4a;
  --ink-subtle: #777777;
  --border: #e2e0dd;
  --border-strong: #c8c8c5;

  --accent: #1a5e3f;
  --accent-hover: #156b47;
  --accent-bg: #eef5f1;
  --accent-border: #c8ddd0;

  --status-live: #1a5e3f;
  --status-dev: #9a7b1a;

  --dark-bg: #111111;
  --dark-surface: #1a1a19;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "Fira Code", monospace;

  --text-base: 1.0625rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;
  --text-xxs: 0.6875rem;
  --leading: 1.65;

  --content-max: 58rem;
  --space-section: clamp(3.5rem, 7vw, 5.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p { margin: 0; }

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 244, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.brand-mark {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.brand-version {
  font-family: var(--mono);
  font-size: var(--text-xxs);
  color: var(--ink-subtle);
  letter-spacing: 0.04em;
}

/* Brand wordmark lockup (SVG) -- replaces the .brand-mark/.brand-version text
   in the shared nav. Additive: the rules above are left intact, just unused. */
.brand-link {
  display: inline-flex;
  line-height: 0;
}

.brand-logo {
  height: 1.6rem;
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.header-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.header-nav a:hover {
  color: var(--ink);
}

.nav-cta {
  font-family: var(--mono);
  font-size: var(--text-xxs) !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  color: var(--accent) !important;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--accent-border);
  background: var(--accent-bg);
  transition: all 0.2s var(--ease);
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--surface) !important;
  border-color: var(--accent);
}

/* Mobile menu toggle (hidden on desktop; shown <=768px) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--ink);
}

/* ========== HERO ========== */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: clamp(4rem, 10vw, 6rem) clamp(1.25rem, 4vw, 2rem) clamp(4.5rem, 10vw, 6.5rem);
}

.hero-inner {
  max-width: 42rem;
  margin: 0 auto;
}

.hero-channels {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.channel-badge {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--accent-border);
  background: var(--accent-bg);
}

.channel-badge-light {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.hero-title {
  font-family: var(--sans);
  font-size: clamp(1.625rem, 3.5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-lead {
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.125rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Opt-in: stack a primary button above a secondary text link (e.g. /solutions hero). */
.hero-actions-stack {
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.hero-link-secondary {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--ink-subtle);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.02em;
}

.hero-link-secondary:hover {
  color: var(--ink);
}

/* Landing hero: a wider text column so the long H1 fits one line on a laptop
   (wraps on narrow/phone). The title font size now lives in the shared
   .hero-title rule (applied site-wide); the lead font reduction + the column
   and lead widths stay landing-only. */
.hero-home .hero-inner {
  max-width: 54rem;
}

.hero-home .hero-lead {
  font-size: clamp(1rem, 1.4vw, 1.0625rem);
  max-width: 48rem;
}

/* Hero deck: the supporting line under the headline — sized between the h1 and
   the body lead (headline -> deck -> value-prop body). */
.hero-deck {
  margin-top: 1.4rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-lead + .hero-deck { margin-top: 1.1rem; }

/* Hero illustration: one calm operations graphic between the lead and the CTAs.
   Breaks out wider than the 42rem text column while staying centered + in flow. */
.hero-figure {
  width: min(64rem, calc(100vw - 2.5rem));
  margin-top: clamp(2.25rem, 5vw, 3rem);
  margin-left: 50%;
  transform: translateX(-50%);
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ========== BUTTONS ========== */
a.button {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s var(--ease);
}

.button-primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

.button-primary:hover {
  background: var(--surface);
  color: var(--ink);
}

.button-primary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.button-secondary:hover {
  border-color: var(--ink);
}

.button-cta {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--surface);
  font-size: var(--text-sm);
}

.button-cta:hover {
  background: transparent;
  color: var(--surface);
}

.button-cta:focus-visible {
  outline: 2px solid var(--surface);
  outline-offset: 3px;
}

/* Secondary CTA on the dark .section-cta band -- white outline, inverts on
   hover. Mirrors .button-cta so a second path stays legible on --dark-bg
   (.button-secondary is dark-ink/dark-border, light-bg only). */
.button-cta-outline {
  background: transparent;
  color: var(--surface);
  border-color: var(--surface);
  font-size: var(--text-sm);
}

.button-cta-outline:hover {
  background: var(--surface);
  color: var(--ink);
}

.button-cta-outline:focus-visible {
  outline: 2px solid var(--surface);
  outline-offset: 3px;
}

/* ========== CONTENT ========== */
main.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) 0;
}

/* ========== SECTIONS ========== */
.section {
  padding: var(--space-section) 0;
}

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

.section-label {
  font-family: var(--mono);
  font-size: var(--text-xxs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 1.25rem;
  text-align: center;
}

.section-label-light {
  color: rgba(255, 255, 255, 0.45);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title-light {
  color: var(--surface);
}

.section-intro {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 38rem;
  margin: -0.75rem auto 2.5rem;
}

/* ========== 01 · PHILOSOPHY ========== */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

.philosophy-item {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.philosophy-item:hover {
  border-color: var(--accent-border);
  border-left-color: var(--accent);
  box-shadow: 0 8px 32px -16px rgba(0, 0, 0, 0.1);
}

.philosophy-item p {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--ink-muted);
}

/* The Problem: three equal problem beats, then the Qoat turn set apart. */
.problem-beats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.problem-resolution {
  max-width: var(--content-max);
  margin: 1.5rem auto 0;
  padding: 1.75rem 2rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
}

.problem-resolution p {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  max-width: 46rem;
}

.problem-resolution strong {
  color: var(--accent);
  font-weight: 600;
}

/* ========== 02 · CAPABILITIES ========== */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.capability-card {
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
}

.capability-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 12px 40px -20px rgba(26, 94, 63, 0.15);
  transform: translateY(-2px);
}

.capability-id {
  font-family: var(--mono);
  font-size: var(--text-xxs);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--accent-border);
  background: var(--accent-bg);
  display: inline-block;
  margin-bottom: 1rem;
}

.capability-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.capability-card p {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ========== 03 · THE LAYER ========== */
.section-layer {
  background: var(--dark-bg);
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  padding-left: clamp(1.25rem, 4vw, 2rem);
  padding-right: clamp(1.25rem, 4vw, 2rem);
  border-top: none;
}

.section-layer + .section {
  border-top: none;
}

.layer-content {
  max-width: 40rem;
  margin: 0 auto;
}

.layer-statement {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  margin-bottom: 1rem;
}

.layer-statement:last-of-type {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
}

/* Framework flow diagram (light) on /framework §02, under the four
   discipline cards — shows VIS/WKF/CON/GOV working as one system. */
.framework-figure {
  max-width: min(54rem, 100%);
  margin: 2.5rem auto 0;
}

.framework-figure-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Alignment diagram on the dark Platform band (homepage "Where this is
   going") — dark-native artwork, no panel. */
.layer-figure {
  max-width: min(56rem, 100%);
  margin: 2.5rem auto 0;
}

.layer-figure-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ========== 04 · FRAMEWORK ========== */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.framework-step {
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  transition: all 0.25s var(--ease);
}

.framework-step:hover {
  box-shadow: 0 8px 32px -16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.step-number {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.step-status {
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-subtle);
  padding: 0.1875rem 0.5rem;
  border: 1px solid var(--border);
}

.framework-step h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

.framework-step p {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ========== 05 · TOOLS ========== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.tool-card {
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 36px -20px rgba(0, 0, 0, 0.12);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tool-status {
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.tool-status-live {
  color: var(--status-live);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
}

.tool-status-live .status-dot {
  background: var(--status-live);
}

.tool-status-dev {
  color: var(--status-dev);
  background: #faf5e8;
  border: 1px solid #e8dbb8;
}

.tool-status-dev .status-dot {
  background: var(--status-dev);
}

.tool-status-preview {
  color: #4a6fa5;
  background: #edf2f8;
  border: 1px solid #c8d6e5;
}

.tool-status-preview .status-dot {
  background: #4a6fa5;
}

.tool-card-primary {
  border-left: 3px solid var(--accent);
}

.tool-type {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  color: var(--ink-subtle);
  text-transform: uppercase;
}

.tool-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

.tool-card p {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--ink-muted);
  flex-grow: 1;
}

.tool-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: var(--text-xxs);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--accent-border);
  transition: all 0.2s var(--ease);
}

.tool-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

/* ========== CTA ========== */
.section-cta {
  background: var(--dark-bg);
  margin: 0 calc(50% - 50vw);
  width: 100vw;
  padding: clamp(4rem, 10vw, 6rem) clamp(1.25rem, 4vw, 2rem);
  text-align: center;
  border-top: none;
  position: relative;
}

.section-cta::before {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.cta-inner {
  max-width: 30rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-channels {
  display: flex;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 2rem;
}

/* The two CTA paths sit side by side on desktop, stack on mobile. */
.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-cta h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  color: var(--surface);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-cta p {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2rem;
}

.cta-link-secondary {
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.02em;
}

.cta-link-secondary:hover {
  color: rgba(255, 255, 255, 0.85);
}

.cta-email {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: var(--text-xxs);
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.04em;
}

/* ========== FOOTER ========== */
.site-footer {
  padding: clamp(2.5rem, 6vw, 3.5rem) clamp(1.25rem, 4vw, 2rem) 2.5rem;
  max-width: var(--content-max);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.footer-mark {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.footer-year {
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--ink-subtle);
}

.footer-tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin: 0 0 1rem;
}

.footer-credibility {
  font-size: var(--text-xs);
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 42ch;
  margin: 0;
}

.footer-col-head {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin: 0 0 1rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin: 0 0 0.625rem;
}

.footer-list a {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Legal links bar (Privacy · Terms), below the main footer columns. */
.footer-bottom {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-bottom a {
  font-size: var(--text-xs);
  color: var(--ink-subtle);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== SOLUTIONS PAGE (reuses existing cards + tokens) ========== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.svc-list {
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
}

.svc-list li {
  font-size: var(--text-xs);
  line-height: 1.75;
  color: var(--ink-muted);
}

/* Buyer-problem sub-group label inside a service card (scoped, additive). */
.svc-group {
  margin: 1.1rem 0 0.25rem;
  font-size: var(--text-xxs);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.svc-group + .svc-list { margin-top: 0; }
.svc-note { color: var(--ink-subtle); }

/* "Who it's for" fit list -- scoped, additive (homepage). Card grid mirrors
   .capabilities-grid so the section reads as structured, not a text blob. */
.fit-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.fit-list li {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 2.75rem;
  margin: 0;
  text-align: left;
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
}
.fit-list li:hover {
  border-color: var(--accent-border);
  box-shadow: 0 12px 40px -20px rgba(26, 94, 63, 0.15);
  transform: translateY(-2px);
}
.fit-list li::before {
  content: "\2014";
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  color: var(--accent);
  font-weight: 600;
}
.fit-list .fit-lead {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
@media (max-width: 768px) {
  .fit-list { grid-template-columns: 1fr; }
}

/* Option C emphasis -- scoped to the /services detailed cards via the modifier
   so the homepage's brief .capability-cards (same classes) are untouched. */
.capabilities-grid-detailed .capability-card h3 {
  color: var(--accent);
  display: inline-block;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--accent-border);
}
.capabilities-grid-detailed .capability-card > p:not(.svc-group) {
  color: var(--ink);
  font-weight: 500;
}
.capabilities-grid-detailed .svc-group { color: var(--ink-muted); }

/* Consistency: the homepage area cards (brief .capability-cards, no -detailed
   modifier) get the same green area-name + rule as /services -- without the
   detailed-card 3-col layout or body-weight changes. */
.capabilities-grid:not(.capabilities-grid-detailed) .capability-card h3 {
  color: var(--accent);
  display: inline-block;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--accent-border);
}

/* /services: the three work-cards sit 3-across (Oversight is pulled out above
   into the anchor band). Grid items stretch to equal height by default. */
.capabilities-grid-detailed { grid-template-columns: repeat(3, 1fr); }

/* Oversight & Assurance anchor -- a dark brand-green CANOPY over the three
   lighter work-cards (the watching layer above the stack; mirrors the logo
   board / framework oversight bar). Scoped to /services. */
.service-anchor {
  background: var(--accent);
  border-left: 4px solid #4ea27a;
  border-radius: 4px;
  padding: 2rem 1.9rem;
  margin-bottom: 1.6rem;
}
.anchor-eyebrow {
  margin: 0 0 0.5rem;
  font-size: var(--text-xxs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd9b9;
}
.anchor-title {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.anchor-body {
  margin: 0 0 1.1rem;
  max-width: 52rem;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: #e2eee8;
}
.anchor-body strong { color: #9fd9b9; font-weight: 700; }
.anchor-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 1.5rem;
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.service-anchor .svc-list li { color: #eaf3ee; }
.service-anchor .svc-note { color: #c2dccd; }
.anchor-handoff {
  margin: 0 0 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
}

/* Center this section's header + handoff (canopy content + cards stay left). */
.section-areas > .section-label,
.section-areas > .section-title,
.section-areas > .section-intro,
.section-areas > .anchor-handoff { text-align: center; }
.section-areas > .section-intro { margin-left: auto; margin-right: auto; }

/* Connectors: the canopy drops to the three card centers (1/6, 1/2, 5/6). */
.anchor-connectors { position: relative; height: 24px; margin: 0 0 0.4rem; }
.anchor-connectors::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16.667%;
  right: 16.667%;
  border-top: 1.5px solid #4ea27a;
}
.anchor-node {
  position: absolute;
  top: 0;
  height: 20px;
  border-left: 1.5px solid #4ea27a;
}
.anchor-node::after {
  content: "";
  position: absolute;
  bottom: -3.5px;
  left: -3.5px;
  width: 7px;
  height: 7px;
  background: var(--accent);            /* square, like the logo's recessed indicators */
  box-shadow: inset 0 1px 1.5px rgba(0, 0, 0, 0.3);  /* recessed feel */
}

/* Service cards: subgrid aligns title, description, and list rows across all three columns */
.grid-3:has(.capability-card) {
  grid-template-rows: repeat(3, auto);
}

.grid-3:has(.capability-card) .capability-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 0.75rem;
}

.grid-3 .capability-card h3 {
  line-height: 1.3;
  text-wrap: balance;
  margin: 0;
}

.grid-3 .capability-card > p {
  line-height: 1.65;
  margin: 0;
}

.grid-3 .svc-list {
  margin: 0.875rem 0 0;
  padding: 0;
}

.grid-3 .svc-list li {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0;
}

.grid-3 .svc-list li::before {
  content: "\2022";
  flex: 0 0 0.45rem;
  text-align: center;
  color: var(--ink-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  body { font-size: 1rem; }

  .nav-toggle { display: inline-flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(244, 244, 242, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem clamp(1.25rem, 4vw, 2rem) 1rem;
  }

  .header-nav.open { display: flex; }

  .header-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }

  .header-nav a:last-child { border-bottom: 0; }

  .nav-cta {
    margin-top: 0.85rem;
    text-align: center;
    padding: 0.6rem 0.875rem !important;
  }

  .hero-title {
    font-size: clamp(1.5rem, 6vw, 1.875rem);
  }

  /* Mobile hero: swap to the stacked portrait diagram (via <picture>).
     Cap the width so it stays a reasonable size up to the 768px breakpoint,
     and clear the desktop <img> aspect-ratio so the portrait source isn't
     squeezed into the 988x580 box. */
  .hero-home .hero-figure {
    width: min(22rem, 100vw - 2.5rem);
    margin-top: clamp(1.5rem, 5vw, 2rem);
  }

  .hero-home .hero-figure .hero-img {
    aspect-ratio: auto;
  }

  /* Concept diagrams swap to stacked portrait variants (via <picture>).
     Cap the width so the portrait sources stay a sensible size up to the
     breakpoint, and clear the desktop <img> aspect-ratio so the portrait
     source isn't squeezed into the wide box. */
  .framework-figure,
  .layer-figure {
    width: min(20rem, 100%);
  }

  .framework-figure-img,
  .layer-figure-img {
    aspect-ratio: auto;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .problem-beats {
    grid-template-columns: 1fr;
  }

  .capabilities-grid,
  .capabilities-grid-detailed {
    grid-template-columns: 1fr;
  }

  .anchor-list {
    grid-template-columns: 1fr;
  }

  .anchor-connectors { display: none; }

  .framework-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-3:has(.capability-card) {
    grid-template-rows: none;
  }

  .grid-3:has(.capability-card) .capability-card {
    grid-row: auto;
    grid-template-rows: none;
    row-gap: 0;
  }

  .grid-3 .capability-card h3 {
    margin-bottom: 0.75rem;
  }

  .section-layer {
    margin: 0 -1.25rem;
    width: calc(100% + 2.5rem);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .section-cta {
    margin: 0 -1.25rem;
    width: calc(100% + 2.5rem);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .section-cta::before {
    inset: 0.5rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  main.content {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .framework-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
