/* ==========================================================================
   Applied Risk Management — styles.css
   Design tokens + components for a single-page site.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand — pulled directly from the Applied Risk Management logo */
  --brand:        #025379;
  --brand-2:      #014059;
  --brand-soft:   #DCEAF1;
  --brand-grey:   #969696;
  --brand-grey-2: #BCBCBC;

  --navy:         #025379;
  --navy-2:       #014059;
  --navy-deep:    #012E42;
  --steel:        #3B82F6;
  --steel-2:      #2563EB;
  --steel-soft:   #DBEAFE;
  --cream:        #F8F7F4;
  --cream-2:      #EFEDE6;
  --paper:        #FFFFFF;
  --ink:          #0F172A;
  --ink-2:        #1F2A3D;
  --muted:        #475569;
  --muted-2:      #64748B;
  --line:         #E2E8F0;
  --line-2:       #CBD5E1;
  --success:      #047857;
  --danger:       #B91C1C;

  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    24px;

  --shadow-sm:    0 1px 2px rgba(11,29,58,.06), 0 1px 1px rgba(11,29,58,.04);
  --shadow-md:    0 8px 30px rgba(11,29,58,.08), 0 2px 6px rgba(11,29,58,.04);
  --shadow-lg:    0 30px 60px rgba(11,29,58,.18), 0 10px 20px rgba(11,29,58,.08);

  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif:   "Newsreader", "Source Serif Pro", Georgia, "Times New Roman", serif;

  --container:    1180px;
  --gutter:       24px;

  --t-fast:       180ms;
  --t-med:        320ms;
  --ease:         cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 136px; }
body { margin: 0; font: 400 17px/1.6 var(--font-sans); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: var(--steel-2); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--navy); color: var(--cream); }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: var(--cream); padding: 10px 14px; border-radius: 6px; z-index: 1000; }
.skip-link:focus { left: 12px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; color: var(--navy); letter-spacing: -.01em; line-height: 1.12; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 4.8vw, 4.2rem); font-weight: 500; line-height: 1.04; letter-spacing: -.02em; }
h1 em { font-style: italic; color: var(--navy); }
h1 .hero-accent { display: inline-block; color: var(--ink-2); font-weight: 500; font-size: .68em; line-height: 1.18; margin-top: .35em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
.eyebrow { display: inline-block; font: 600 .78rem/1 var(--font-sans); letter-spacing: .15em; text-transform: uppercase; color: var(--steel-2); margin: 0 0 1.2em; padding: .35em .8em; background: var(--steel-soft); border-radius: 100px; }
.eyebrow .case-preserve { text-transform: none; letter-spacing: .12em; }
.eyebrow-light { color: var(--steel); background: rgba(59,130,246,.18); }
.section-lede { max-width: 56ch; font-size: 1.1rem; color: var(--muted); margin: 0 0 2.5rem; }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 60ch; margin: 1.4rem 0; line-height: 1.55; }
.lede strong { color: var(--navy); font-weight: 600; }
.lede-foot { font-family: var(--font-serif); font-style: italic; font-size: 1.18rem; color: var(--navy); margin: 0 0 2rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .9em 1.5em; border-radius: 100px; font-weight: 600; font-size: .98rem; line-height: 1; text-decoration: none; transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); white-space: nowrap; }
.btn-primary { background: var(--navy); color: var(--cream); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--steel-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--paper); color: var(--navy); border-color: var(--navy); }
.btn-block { width: 100%; }
.btn-inline { margin-top: 1.4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.8rem 0 2.4rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(248,247,244,.85); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid transparent; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.site-header.scrolled { border-color: var(--line); background: rgba(248,247,244,.95); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 124px; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; text-decoration: none; color: var(--navy); }
.brand-wordmark { width: auto; height: 92px; display: block; }
.brand-tag { font-size: .7rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; padding-left: 2px; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.primary-nav { display: flex; gap: 4px; align-items: center; }
.primary-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: .94rem; text-decoration: none; }
.primary-nav a:hover { color: var(--navy); background: var(--cream-2); }
.primary-nav .nav-cta { background: var(--navy); color: var(--cream); padding: 10px 18px; border-radius: 100px; margin-left: 8px; }
.primary-nav .nav-cta:hover { background: var(--steel-2); color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border-radius: 10px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 4px auto; transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem); background:
  radial-gradient(ellipse 1200px 500px at 80% -10%, rgba(59,130,246,.10), transparent 60%),
  radial-gradient(ellipse 800px 400px at 0% 100%, rgba(11,29,58,.06), transparent 60%),
  var(--cream);
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { max-width: 820px; }
.hero-copy .cta-row { margin-top: 2rem; }
.hero-meta { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--line); padding-top: 1.5rem; max-width: 720px; }
.hero-meta li { display: flex; flex-direction: column; gap: 2px; }
.hero-meta-num { font-family: var(--font-serif); font-weight: 600; color: var(--navy); font-size: 1.4rem; line-height: 1; }
.hero-meta-lab { font-size: .78rem; color: var(--muted); line-height: 1.3; }

/* ---------- Sections (shared) ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-problem { background: var(--paper); border-top: 1px solid var(--line); }
.section-pillars { background: var(--cream); }
.section-scms { background: var(--paper); border-top: 1px solid var(--line); }
.section-how { background: var(--cream); }
.section-proof { background: var(--navy); color: var(--cream); }
.section-proof h2, .section-proof h3 { color: var(--cream); }
.section-proof .eyebrow { background: rgba(255,255,255,.08); color: #93C5FD; }
.section-proof .section-lede { color: rgba(248,247,244,.72); }
.section-frameworks { background: var(--cream-2); }
.section-why { background: var(--paper); }
.section-about { background: var(--cream); }
.section-case { background: var(--paper); border-top: 1px solid var(--line); }
.section-faq { background: var(--cream); }
.section-contact { background: var(--paper); }

/* ---------- Problem ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin-top: 2.5rem; }
.problem-card { padding: 1.8rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.problem-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.problem-card h3 { color: var(--navy); margin-bottom: .5em; }
.problem-card p { color: var(--muted); margin: 0; }
.problem-card em { color: var(--ink); font-style: italic; }

/* ---------- Pillars (What We Do) ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 1.4rem; margin-top: 2.5rem; align-items: stretch; }
.pillar {
  position: relative;
  padding: 2.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
  will-change: transform;
}
.pillar:hover {
  transform: translateY(-4px) scale(1.025);
  box-shadow: var(--shadow-lg);
  border-color: var(--steel);
  z-index: 2;
}
.pillar-featured {
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--cream);
  border: 0;
  box-shadow: var(--shadow-lg);
  transform: scale(1.04);
  z-index: 1;
}
.pillar-featured:hover {
  transform: translateY(-4px) scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .pillar, .pillar-featured, .pillar:hover, .pillar-featured:hover { transform: none; transition: none; }
}
.pillar-featured h3, .pillar-featured .pillar-num { color: var(--cream); }
.pillar-featured .pillar-tag { color: #93C5FD; }
.pillar-featured ul li::before { background: var(--steel); }
.pillar-num { display: inline-block; font-family: var(--font-serif); font-size: 2.2rem; color: var(--steel-2); line-height: 1; margin-bottom: .6em; font-weight: 600; }
.pillar-tag { font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.2em; }
.pillar p { line-height: 1.6; }
.pillar-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.pillar-list li { position: relative; padding: .4em 0 .4em 1.6em; border-bottom: 1px solid rgba(255,255,255,.08); }
.pillar:not(.pillar-featured) .pillar-list li { border-color: var(--line); }
.pillar-list li::before { content: ""; position: absolute; left: 0; top: .85em; width: 8px; height: 8px; background: var(--steel-2); border-radius: 50%; }
.pillar-list li:last-child { border-bottom: 0; }
.pillar-foot { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .94rem; color: rgba(248,247,244,.85); }
.pillar-foot strong { color: #fff; }

/* ---------- What Is An SCMS ---------- */
.scms-explainer { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 2.5rem 0 3.5rem; }
.scms-pillar { padding: 1.8rem 2rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
.scms-pillar h3 { color: var(--navy); font-size: 1.15rem; margin-bottom: .8em; }
.scms-pillar ul { list-style: none; padding: 0; margin: 0; }
.scms-pillar li { position: relative; padding: .5em 0 .5em 1.4em; border-bottom: 1px dashed var(--line); color: var(--ink-2); font-size: .98rem; line-height: 1.55; }
.scms-pillar li:last-child { border-bottom: 0; }
.scms-pillar li::before { content: "→"; position: absolute; left: 0; top: .5em; color: var(--steel-2); font-weight: 600; }
.scms-pillar code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; background: var(--paper); padding: .1em .4em; border-radius: 4px; border: 1px solid var(--line); color: var(--navy); }
.scms-pillar strong { color: var(--navy); font-weight: 600; }

.artefact-heading { font-size: 1.6rem; margin: 0 0 .3em; color: var(--navy); }
.artefact-sub { font-family: var(--font-sans); font-weight: 400; font-style: normal; font-size: .82rem; color: var(--muted); letter-spacing: 0; }
.artefact-lede { color: var(--muted); margin: 0 0 2rem; max-width: 64ch; font-size: 1rem; }

/* Document card (faux file window) */
.doc-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius); margin: 0 0 2rem; overflow: hidden; box-shadow: var(--shadow-md); }
.doc-head { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: linear-gradient(180deg, #F1F5F9, #E2E8F0); border-bottom: 1px solid var(--line-2); }
.doc-dots { display: inline-flex; gap: 6px; }
.doc-dots span { width: 11px; height: 11px; border-radius: 50%; background: #CBD5E1; }
.doc-dots span:nth-child(1) { background: #FCA5A5; }
.doc-dots span:nth-child(2) { background: #FCD34D; }
.doc-dots span:nth-child(3) { background: #86EFAC; }
.doc-filename { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82rem; color: var(--muted); }
.doc-filename code { background: transparent; padding: 0; border: 0; color: var(--ink-2); font-size: inherit; }
.doc-tag { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-2); padding: 4px 10px; background: var(--steel-soft); border-radius: 100px; }
.doc-body { padding: 1.6rem 1.8rem; }
.doc-body-rendered { padding: 1.8rem 2rem 2rem; }
.doc-body h4 { font-family: var(--font-serif); font-size: 1.4rem; color: var(--navy); margin: 0 0 .3em; }
.doc-body h5 { font-family: var(--font-sans); font-size: .95rem; font-weight: 600; color: var(--navy); margin: 1.6rem 0 .8rem; letter-spacing: .02em; text-transform: uppercase; }
.doc-meta { color: var(--muted); margin: 0 0 1.4rem; font-size: .92rem; }
.doc-meta strong { color: var(--ink-2); }
.doc-foot { color: var(--muted); margin: 1.6rem 0 0; font-size: .8rem; font-style: italic; padding-top: 1rem; border-top: 1px solid var(--line); }
.doc-foot code { font-family: ui-monospace, monospace; font-size: .9em; background: var(--cream-2); padding: .1em .35em; border-radius: 3px; }

/* Dashboard tiles */
.dash-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 1.4rem 0 1rem; }
.dash-tile { padding: 1.1rem 1.2rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 4px; }
.dash-tile-num { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; color: var(--navy); line-height: 1; letter-spacing: -.02em; }
.dash-tile-lab { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.dash-tile-trend { font-size: .74rem; color: var(--muted-2); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.dash-tile-trend.up { color: var(--success); }
.dash-tile-trend.down { color: var(--danger); }

/* Doc tables */
.doc-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .88rem; }
.doc-table thead th { text-align: left; font-weight: 600; color: var(--navy); background: var(--cream); border-bottom: 2px solid var(--line-2); padding: 8px 10px; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.doc-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; line-height: 1.45; }
.doc-table tbody tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover td { background: var(--cream); }
.doc-table code { font-family: ui-monospace, monospace; font-size: .9em; background: var(--cream-2); padding: .1em .35em; border-radius: 3px; color: var(--navy); }
.doc-table strong { color: var(--ink); }

/* Status pills */
.pill { display: inline-block; padding: 2px 9px; font-size: .74rem; font-weight: 600; border-radius: 100px; line-height: 1.5; letter-spacing: .02em; white-space: nowrap; }
.pill-pass { background: #DCFCE7; color: #14532D; }
.pill-warn { background: #FEF3C7; color: #78350F; }
.pill-fail { background: #FEE2E2; color: #7F1D1D; }

/* YAML preview */
.doc-yaml { margin: 0; padding: 1.4rem 1.6rem; background: #0C2A40; color: #E2ECF3; border-radius: var(--radius-sm); font-family: ui-monospace, "SF Mono", Menlo, "Cascadia Code", monospace; font-size: .82rem; line-height: 1.7; overflow-x: auto; white-space: pre; }
.doc-yaml .yk { color: #93C5FD; }       /* keys / structural tokens */
.doc-yaml .yv { color: #F1F5F9; }       /* values */
.doc-yaml .yc { color: #64748B; font-style: italic; }  /* comments */
.doc-yaml .yv.pass { color: #86EFAC; font-weight: 600; }
.doc-yaml .yv.fail { color: #FCA5A5; font-weight: 600; }

/* Narrative pane (body of review.md after the YAML) */
.doc-narrative { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.doc-narrative p { color: var(--ink-2); line-height: 1.6; font-size: .95rem; }
.doc-narrative strong { color: var(--navy); }
.doc-notes { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.doc-notes li { margin: .5rem 0; line-height: 1.55; font-size: .94rem; }

.doc-footer { padding: 14px 1.8rem 18px; background: var(--cream); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.doc-meta-line { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.doc-meta-line strong { color: var(--navy); margin-right: 6px; }
.doc-meta-line code { font-family: ui-monospace, monospace; font-size: .85em; color: var(--ink-2); background: var(--paper); padding: .12em .4em; border-radius: 3px; border: 1px solid var(--line); }
.doc-hash code { letter-spacing: .04em; }

/* ---------- How It Works (steps) ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.step { position: relative; padding: 2rem 2rem 2rem 5.5rem; border-left: 2px solid var(--line); }
.step:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.step:last-child { border-radius: 0 0 var(--radius) var(--radius); padding-bottom: 1.5rem; }
.step-num {
  position: absolute; left: -23px; top: 1.7rem; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); border: 2px solid var(--navy); color: var(--navy);
  font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.step h3 { color: var(--navy); margin-bottom: .4em; font-size: 1.35rem; }
.step p { color: var(--muted); margin: 0; line-height: 1.65; }

/* ---------- Proof (dark section) ---------- */
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.proof-card {
  padding: 1.8rem; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.proof-card:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.proof-num { display: block; font-family: var(--font-serif); font-weight: 600; color: #93C5FD; font-size: 2rem; line-height: 1; margin-bottom: .5em; letter-spacing: -.02em; }
.proof-label { display: block; color: rgba(248,247,244,.78); font-size: .96rem; line-height: 1.55; }
.proof-label code { font-size: .88em; padding: .15em .4em; background: rgba(255,255,255,.08); border-radius: 4px; color: #FBBF24; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.proof-label em { font-style: normal; color: #93C5FD; font-weight: 500; }

/* AI quotes block */
.ai-quotes { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,.12); }
.quotes { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.quotes li { padding: 0; }
.quotes blockquote {
  margin: 0; padding: 1.6rem 1.6rem 1.6rem 2.2rem; position: relative;
  font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.5; color: var(--cream);
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius); border-left: 3px solid var(--steel);
}
.quotes blockquote::before { content: "\201C"; position: absolute; left: .55rem; top: .35rem; font-size: 2.4rem; color: var(--steel); line-height: 1; opacity: .6; }
.quotes blockquote em { color: #BFDBFE; font-style: italic; }
.quotes blockquote strong { color: #fff; }
.quotes blockquote code { font-size: .88em; padding: .15em .4em; background: rgba(255,255,255,.1); border-radius: 4px; color: #FBBF24; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ---------- Frameworks ---------- */
.framework-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin: 2.5rem 0 2rem; }
.framework-badge {
  padding: 1.8rem 1.4rem 1.6rem; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.framework-badge:hover { transform: translateY(-3px); border-color: var(--steel); box-shadow: var(--shadow-md); }
.fb-icon-wrap { display: flex; align-items: center; justify-content: center; width: 100%; height: 88px; margin-bottom: 1rem; }
.fb-icon { display: block; width: auto; max-width: 100%; height: 80px; max-height: 80px; object-fit: contain; object-position: center; }
.fb-icon-iso { transform: translateX(14px); }
.fb-title { display: block; font-family: var(--font-serif); font-weight: 600; color: var(--navy); font-size: 1.25rem; line-height: 1.1; letter-spacing: -.01em; margin-bottom: .4em; }
.fb-sub { display: block; font-size: .8rem; color: var(--muted); line-height: 1.4; }
.cert-line { text-align: center; margin: 1.6rem 0 0; color: var(--muted); font-size: .98rem; }
.cert-line strong { color: var(--navy); letter-spacing: .04em; }

/* ---------- Why Different ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.why-card { padding: 1.8rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); }
.why-card h3 { color: var(--navy); margin-bottom: .5em; font-size: 1.1rem; }
.why-card p { color: var(--muted); margin: 0; font-size: .98rem; line-height: 1.6; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-photo { position: relative; }
.about-photo img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.about-photo.photo-missing { aspect-ratio: 4/5; background: linear-gradient(140deg, var(--navy), var(--navy-2)); border-radius: var(--radius-lg); position: relative; box-shadow: var(--shadow-lg); }
.about-photo.photo-missing::after { content: "JF"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 5rem; font-weight: 600; color: rgba(255,255,255,.25); }
.about-photo.photo-missing img { display: none; }
.about-copy .role { color: var(--muted); margin: 0 0 1.4rem; font-size: 1.05rem; }
.about-copy .certs { font-size: .82rem; letter-spacing: .15em; color: var(--steel-2); font-weight: 600; }
.about-copy p { color: var(--ink-2); line-height: 1.7; }

/* ---------- Case study ---------- */
.case-card { padding: 2.4rem; background: linear-gradient(170deg, var(--cream), var(--paper)); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-top: 2rem; box-shadow: var(--shadow-sm); }
.case-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; padding-bottom: 1.8rem; border-bottom: 1px solid var(--line); margin-bottom: 1.8rem; }
.case-stat { display: flex; flex-direction: column; gap: 4px; }
.case-num { font-family: var(--font-serif); font-weight: 600; color: var(--navy); font-size: 1.8rem; line-height: 1; letter-spacing: -.02em; }
.case-lab { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.case-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; line-height: 1.5; color: var(--ink); margin: 0 0 1rem; }
.case-quote em { color: var(--steel-2); }
.case-attrib { font-size: .9rem; color: var(--muted); margin: 0; }
.case-foot { margin-top: 1.5rem; font-size: .9rem; color: var(--muted); text-align: center; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 2rem; max-width: 820px; }
.faq-item { padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; color: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-sans); font-weight: 400; font-size: 1.6rem; color: var(--steel-2); transition: transform var(--t-fast) var(--ease); flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); margin: 1rem 0 0; line-height: 1.65; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-meta { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-direction: column; gap: 14px; }
.contact-meta li { font-size: .98rem; color: var(--muted); }
.contact-meta strong { color: var(--navy); margin-right: 6px; }
.contact-form { background: var(--cream); padding: 2.2rem; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.cf-turnstile { margin: 1rem 0; min-height: 65px; }
.contact-form .btn { margin-top: .8rem; }
.form-status { margin: 1rem 0 0; font-size: .94rem; min-height: 1.4em; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }
.form-fineprint { margin: 1rem 0 0; font-size: .82rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(248,247,244,.7); padding: 3rem 0 2rem; }
.site-footer .brand-name { color: var(--cream); font-family: var(--font-serif); font-size: 1.05rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-tag { margin: .6rem 0 0; font-size: .94rem; max-width: 36ch; }
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: rgba(248,247,244,.7); text-decoration: none; font-size: .94rem; transition: color var(--t-fast) var(--ease); }
.footer-nav a:hover { color: var(--cream); }
.footer-meta p { font-size: .85rem; line-height: 1.6; margin: 0; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; gap: 1.2rem; }
  .problem-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .case-stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .framework-row { grid-template-columns: repeat(2, 1fr); }
  .scms-explainer { grid-template-columns: 1fr; }
  .dash-tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    transform: translateY(-110%); transition: transform var(--t-med) var(--ease);
    pointer-events: none;
  }
  .primary-nav[data-open="true"] { transform: translateY(0); pointer-events: auto; }
  .primary-nav a { padding: 12px 14px; font-size: 1rem; border-radius: 10px; }
  .primary-nav .nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
  .field-row { grid-template-columns: 1fr; }
  .case-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .step { padding: 1.4rem 1rem 1.4rem 4rem; }
  .step-num { left: -22px; top: 1.2rem; width: 40px; height: 40px; font-size: 1rem; }
  h1 .hero-accent { font-size: .78em; }
  .brand-wordmark { height: 64px; }
  .brand-tag { font-size: .65rem; }
  .doc-body, .doc-body-rendered { padding: 1.2rem 1.1rem; }
  .doc-head { padding: 10px 12px; gap: 10px; }
  .doc-filename { font-size: .72rem; }
  .doc-tag { display: none; }
  .doc-yaml { padding: 1rem 1.1rem; font-size: .74rem; }
  .doc-table { font-size: .82rem; display: block; overflow-x: auto; white-space: nowrap; }
  .doc-table tbody td { white-space: normal; }
  .dash-tile-num { font-size: 1.4rem; }
  .doc-footer { padding: 12px 1.1rem 14px; }
}

@media (max-width: 480px) {
  .hero-meta { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .framework-row { grid-template-columns: 1fr 1fr; }
  .dash-tiles { grid-template-columns: 1fr; }
}
