/* ==========================================================================
   Aegis — Marketing Site Stylesheet
   翊玑 · Yìjī — the guardian star
   Calm & governed · jade accents on warm paper · Inter / JetBrains Mono
   Variable fonts: the full weight axis is declared so component weights
   (500–800) render with real glyphs instead of synthesized faux-bold.
   The jade core is never recolored.
   ========================================================================== */

/* ---------- Self-hosted fonts (no third-party egress) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ---------- Design Tokens ---------- */
:root {
  /* Brand — jade */
  --jade:        #1F7A5C;
  --jade-dark:   #0F6E56;
  --jade-light:  #7FE3BF;

  /* Jade ramp — fills, charts, states (tint → shade) */
  --jade-50:  #e1f5ee;
  --jade-100: #c4ebdc;
  --jade-200: #9fe1cb;
  --jade-300: #5dcaa5;
  --jade-400: #1d9e75;
  --jade-500: #0f6e56;
  --jade-600: #085041;
  --jade-700: #04342c;

  /* Ink / slate — warm-cool dark neutrals */
  --slate:       #1E2A32;
  --slate-deep:  #16212A;
  --ink:         #1a2227;
  --muted:       #5b6b73;
  --hair:        #e2e6e4;
  --paper:       #F1EFE8;

  /* Neutral ramp (text + surfaces) */
  --n-50:  #f7f8f7;
  --n-100: #eef0ee;
  --n-200: #e2e6e4;
  --n-300: #cdd4d0;
  --n-400: #9aa8af;
  --n-500: #6b7a80;
  --n-600: #5b6b73;
  --n-700: #3a474e;
  --n-800: #26323a;
  --n-900: #1a2227;

  /* Semantic */
  --info:    #185FA5;
  --success: #1d9e75;
  --warning: #BA7517;
  --danger:  #A32D2D;

  --white: #FFFFFF;

  /* Semantic surface / text */
  --bg:          #fbfcfb;
  --bg-subtle:   #f5f6f4;
  --bg-paper:    #F1EFE8;
  --text:        #1a2227;
  --text-soft:   #41525a;
  --text-mute:   #4d5a61;  /* AA-compliant (≥4.5:1 on paper) for small captions */
  --border:      #e2e6e4;
  --accent:      var(--jade);
  --accent-hover:var(--jade-dark);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Radius — soft rectangles, not pills */
  --r-sm: 0.375rem;
  --r:    0.5rem;     /* 8px — buttons, pills, fields */
  --r-md: 0.625rem;   /* 10px — metric cards */
  --r-lg: 0.875rem;   /* 14px — cards */
  --r-xl: 1.125rem;
  --r-2xl: 1.5rem;
  --r-full: 9999px;

  /* Shadow — restrained */
  --sh-xs: 0 1px 2px rgba(26,34,39,.05);
  --sh-sm: 0 1px 3px rgba(26,34,39,.07), 0 1px 2px rgba(26,34,39,.04);
  --sh:    0 4px 14px rgba(26,34,39,.07), 0 1px 3px rgba(26,34,39,.04);
  --sh-md: 0 10px 26px rgba(26,34,39,.08), 0 3px 8px rgba(26,34,39,.04);
  --sh-lg: 0 20px 44px rgba(26,34,39,.10), 0 6px 14px rgba(26,34,39,.05);
  --sh-jade: 0 10px 26px rgba(31,122,92,.18);

  /* Layout */
  --maxw: 1120px;
  --gutter: 1.5rem;
  --nav-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.16,1,.3,1);
  --ease-out: cubic-bezier(.22,1,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
/* width/height attrs are set for CLS prevention; height:auto keeps aspect ratio
   when the element is sized responsively (width:100%). Without this the fixed
   height attribute squashes the image. */
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
/* Links to the Terrene Foundation site/standards — subtle jade underline, works on light + dark */
a.tf-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: var(--jade-300); transition: color .2s, text-decoration-color .2s; }
a.tf-link:hover { color: var(--jade-dark); text-decoration-color: currentColor; }
.bg-ink a.tf-link, .footer a.tf-link, .cta-band a.tf-link { text-decoration-color: rgba(127,227,191,.55); }
.bg-ink a.tf-link:hover, .footer a.tf-link:hover, .cta-band a.tf-link:hover { color: var(--jade-light); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
b, strong { font-weight: 500; }
::selection { background: var(--jade-light); color: var(--slate-deep); }

/* ---------- Keyboard focus (WCAG 2.4.7) ---------- */
:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 2px;
  border-radius: 3px;
}
/* on dark surfaces the jade-light ring reads against slate-deep */
.nav :focus-visible, .hero :focus-visible, .bg-ink :focus-visible,
.cta-band :focus-visible, .footer :focus-visible, .mobile-menu :focus-visible {
  outline-color: var(--jade-light);
}
/* don't double-paint: form fields already get a jade ring via box-shadow */
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; }
/* suppress the legacy/default outline only where :focus-visible applies */
:focus:not(:focus-visible) { outline: none; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 820px; }
.section { padding-block: clamp(2.5rem, 5.5vw, 5rem); }
.section-sm { padding-block: clamp(2rem, 4vw, 3.25rem); }
.bg-subtle { background: var(--bg-subtle); }
.bg-muted { background: linear-gradient(180deg, var(--bg-paper), var(--bg)); }
.bg-ink { background: var(--slate-deep); color: var(--n-200); }
.center { text-align: center; }
.relative { position: relative; }

/* ---------- Typography — two weights (400 / 500) ---------- */
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.01em; font-weight: 500; color: var(--text); }
.h-display { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
h2.h-section { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 500; letter-spacing: -.015em; }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.35rem); font-weight: 500; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.22rem); color: var(--text-soft); line-height: 1.6; font-weight: 400; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--jade);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 1px; background: var(--jade); opacity: .55; }
.center .eyebrow::before { display: none; }
.bg-ink h1, .bg-ink h2, .bg-ink h3 { color: #f5f8f7; }
.bg-ink .lead, .bg-ink p { color: var(--n-400); }
.mono { font-family: var(--font-mono); }
.text-grad {
  background: linear-gradient(100deg, var(--jade-dark) 0%, var(--jade) 55%, var(--jade-300) 110%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Buttons — 8px radius, weight 500 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 500; font-size: .9rem; line-height: 1;
  padding: .7rem 1.25rem; border-radius: var(--r);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--jade); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--jade-dark); transform: translateY(-1px); box-shadow: var(--sh-jade); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--n-300); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--jade); color: var(--jade-dark); transform: translateY(-1px); }
.btn-on-ink { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.btn-on-ink:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); }
/* Ghost buttons on dark surfaces (hero, ink panels, cta bands) read light — mirrors the .nav-cta override.
   Without this, .btn-ghost falls back to dark var(--text) ink and is invisible on slate-deep. */
.hero .btn-ghost, .bg-ink .btn-ghost, .cta-band .btn-ghost {
  color: #e7ecea; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.hero .btn-ghost:hover, .bg-ink .btn-ghost:hover, .cta-band .btn-ghost:hover {
  color: var(--jade-light); box-shadow: inset 0 0 0 1px var(--jade-light); transform: translateY(-1px);
}
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn-link { color: var(--jade-dark); font-weight: 500; display: inline-flex; align-items: center; gap: .35rem; }
.btn-link svg { transition: transform .22s var(--ease); }
.btn-link:hover svg { transform: translateX(4px); }

/* ---------- Navigation — dark slate-deep bar ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center;
  background: var(--slate-deep);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled { border-bottom-color: rgba(255,255,255,.08); box-shadow: 0 2px 16px rgba(0,0,0,.18); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; font-size: 1.12rem; letter-spacing: .02em; color: #f2f6f5; }
.brand .brand-mark { width: 30px; height: 30px; flex: none; }
.brand .brand-mark svg { width: 100%; height: 100%; }
/* Bilingual mark — Aegis 翊玑 (Yìjī). Shown on the dark nav/footer only. */
.brand .brand-cn {
  flex: none; white-space: nowrap;
  font-size: .8em; font-weight: 400; color: var(--jade-light);
  letter-spacing: .12em; opacity: .85;
  margin-left: .5rem; padding-left: .55rem;
  border-left: 1px solid rgba(255,255,255,.18);
}
@media (max-width: 420px) { .nav .brand .brand-cn { display: none; } }
.nav-links { display: flex; align-items: center; gap: .15rem; }
.nav-links a {
  font-size: .85rem; font-weight: 400; color: var(--n-400);
  padding: .45rem .8rem; border-radius: var(--r); transition: color .2s, background .2s;
}
.nav-links a:hover { color: #f2f6f5; background: rgba(255,255,255,.06); }
.nav-links a.active { color: var(--jade-light); }
.nav-cta { display: flex; align-items: center; gap: .55rem; }
.nav-login { white-space: nowrap; font-size: .85rem; font-weight: 500; color: #e7ecea; padding: .45rem .65rem; border-radius: var(--r); transition: color .2s, background .2s; }
.nav-login:hover { color: var(--jade-light); background: rgba(255,255,255,.06); }
.nav-cta .btn-ghost { color: #e7ecea; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.nav-cta .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--jade-light); color: var(--jade-light); }
.nav-toggle { display: none; flex: none; width: 44px; height: 44px; border-radius: var(--r); align-items: center; justify-content: center; color: var(--n-300); }
.nav-toggle:hover { background: rgba(255,255,255,.06); }

/* Collapse to the hamburger before the 7-link bar + dual CTAs get cramped */
@media (max-width: 1024px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu { display: block; }
}
/* On the narrow mobile bar, drop the inline CTA (it lives in the menu) so the
   brand + hamburger never crowd and the toggle keeps its full 44px target. */
@media (max-width: 520px) {
  .nav-cta { display: none; }
}
/* On touch devices, guarantee comfortable hit targets */
@media (pointer: coarse) {
  .nav-links a { min-height: 44px; }
  .footer .fcol a { padding-block: .55rem; }
  .btn { min-height: 44px; }
}

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: var(--slate-deep); border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 1rem var(--gutter) 1.5rem; box-shadow: 0 16px 32px rgba(0,0,0,.28);
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a { display: block; padding: .85rem .5rem; font-weight: 400; color: var(--n-300); border-bottom: 1px solid rgba(255,255,255,.07); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { width: 100%; margin-top: 1rem; }
@media (min-width: 1025px) { .mobile-menu { display: none; } }

/* ---------- Hero — dark, governed ---------- */
.hero {
  position: relative; background: var(--slate-deep); color: var(--n-300);
  padding-top: calc(var(--nav-h) + clamp(2rem, 4.5vw, 3.25rem)); padding-bottom: clamp(2.5rem, 5vw, 4rem); overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(55% 50% at 82% 4%, rgba(127,227,191,.10) 0%, transparent 60%),
    radial-gradient(45% 45% at 8% 20%, rgba(31,122,92,.16) 0%, transparent 60%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.hero-copy { max-width: 38rem; }
.hero h1 { margin-top: 1.1rem; color: #f5f8f7; font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.12; text-align: center; }
.hero .lead { margin-top: 1.4rem; color: var(--n-400); }
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-trust { margin-top: 2.4rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.09); }
.hero-trust .ht { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; padding: 0 1rem; border-left: 1px solid rgba(255,255,255,.09); }
.hero-trust .ht:first-child { border-left: none; }
.hero-trust .ht b { font-family: var(--font-sans); font-size: 1.95rem; font-weight: 500; letter-spacing: -.02em; line-height: 1; color: var(--jade-light); }
.hero-trust .ht span { font-size: .78rem; line-height: 1.4; color: var(--n-400); font-weight: 400; }
@media (max-width: 520px) {
  .hero-trust { grid-template-columns: 1fr; gap: 1.1rem; }
  .hero-trust .ht { flex-direction: row; align-items: baseline; justify-content: center; gap: .65rem; padding: 0; border-left: none; }
  .hero-trust .ht b { font-size: 1.45rem; min-width: 1.7rem; }
}

/* ---------- Badge / pill — 8px radius ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .76rem; font-weight: 500; letter-spacing: .01em; color: var(--jade-600);
  background: var(--jade-50); border: 1px solid transparent;
  padding: .38rem .75rem; border-radius: var(--r);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jade-400); }
.pill.amber { background: #faeeda; color: #854f0b; }
.pill.amber .dot { background: var(--warning); }
.pill.danger { background: #fcebeb; color: var(--danger); }
.pill.danger .dot { background: var(--danger); }
/* on the dark hero, pills read as a quiet jade-light tag */
.hero .pill, .bg-ink .pill {
  background: rgba(127,227,191,.12); color: var(--jade-light); letter-spacing: .12em;
  text-transform: uppercase; font-size: .7rem;
}
.hero .pill .dot, .bg-ink .pill .dot { background: var(--jade-light); }

/* ---------- Org-chart hero illustration ---------- */
.orgchart-stage {
  position: relative; border-radius: var(--r-lg); padding: 1.5rem;
  background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(127,227,191,.12);
}
.orgchart-stage .stage-label {
  position: absolute; top: 1rem; left: 1.25rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em;
  color: var(--jade-light); text-transform: uppercase; opacity: .8;
}
.orgchart-svg { width: 100%; height: auto; }

/* org-chart node animation classes (driven by SVG) */
.oc-node { opacity: 0; transform-box: fill-box; transform-origin: center; }
.oc-edge { stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200); }
.oc-pulse { transform-box: fill-box; transform-origin: center; }

.in-view .oc-edge { animation: drawEdge 1s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
.in-view .oc-node { animation: popNode .7s var(--ease) forwards; animation-delay: var(--d, 0s); }
.in-view .oc-pulse { animation: agentPulse 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }

@keyframes drawEdge { to { stroke-dashoffset: 0; } }
@keyframes popNode { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }
@keyframes agentPulse { 0%,100% { opacity: .35; transform: scale(1); } 50% { opacity: .9; transform: scale(1.5); } }

/* trust current flowing along edges */
.oc-flow { opacity: 0; }
.in-view .oc-flow { opacity: 1; animation: flowDash 2.6s linear infinite; animation-delay: var(--fd, 1.1s); }
@keyframes flowDash { to { stroke-dashoffset: -36; } }

/* agent badge label fade */
.oc-label { opacity: 0; }
.in-view .oc-label { animation: fadeUp .6s var(--ease) forwards; animation-delay: var(--d, 1.4s); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.6rem; box-shadow: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--jade-200); }
.card .card-icon {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--jade-50); color: var(--jade); margin-bottom: 1.05rem;
}
.card .card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-soft); font-size: .94rem; }
.card.on-ink { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
.card.on-ink:hover { border-color: rgba(127,227,191,.4); background: rgba(255,255,255,.06); }
.card.on-ink p { color: var(--n-400); }
.card.on-ink .card-icon { background: rgba(127,227,191,.14); color: var(--jade-light); }

/* feature card with number */
.numcard { position: relative; }
.numcard .num {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; color: var(--jade);
  letter-spacing: .04em;
}

/* ---------- Section heading block ---------- */
.shead { max-width: 46rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.shead.center { margin-inline: auto; }
.shead h2 { margin-top: .8rem; }
.shead p { margin-top: 1rem; }

/* ---------- Narrative band (the story) ---------- */
.story-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
@media (max-width: 940px) { .story-steps { grid-template-columns: 1fr; } }
.story-step { position: relative; padding: 1.6rem 1.5rem; }
.story-step:not(:last-child)::after {
  content: ""; position: absolute; top: 2.3rem; right: -1px; width: 1px; height: calc(100% - 2rem);
  background: linear-gradient(var(--jade-200), transparent);
}
@media (max-width: 940px) { .story-step:not(:last-child)::after { display: none; } }
.story-step .step-n {
  width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  background: var(--jade-50); color: var(--jade-dark); font-weight: 500; font-family: var(--font-mono); margin-bottom: 1rem;
  box-shadow: inset 0 0 0 1px var(--jade-200);
}
.story-step h3 { font-size: 1.08rem; margin-bottom: .45rem; }
.story-step p { color: var(--text-soft); font-size: .92rem; }

/* ---------- Split feature rows ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.25rem); align-items: center; }
.feature-row + .feature-row { margin-top: clamp(2.75rem, 5vw, 4.5rem); }
.feature-row.reverse .fr-media { order: -1; }
@media (max-width: 880px) { .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 2rem; } .feature-row.reverse .fr-media { order: 0; } }
.fr-copy .eyebrow { margin-bottom: .9rem; }
.fr-copy h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; }
.fr-copy p { margin-top: 1rem; color: var(--text-soft); }
.fr-list { margin-top: 1.5rem; display: grid; gap: .8rem; }
.fr-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.fr-list .ck {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--jade-50);
  display: flex; align-items: center; justify-content: center; margin-top: .15rem;
}
.fr-list .ck svg { width: 12px; height: 12px; color: var(--jade-dark); }
.fr-list b { font-weight: 500; }

/* ---------- Screenshot frame ---------- */
.shot {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--sh-lg); background: var(--white);
}
.shot .chrome {
  display: flex; align-items: center; gap: .4rem; padding: .6rem .85rem;
  background: var(--n-100); border-bottom: 1px solid var(--border);
}
.shot .chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--n-300); }
.shot .chrome .dot.r { background: #d98b86; } .shot .chrome .dot.y { background: #d9b46a; } .shot .chrome .dot.g { background: #7fbf9a; }
.shot .chrome .url {
  margin-left: .6rem; font-family: var(--font-mono); font-size: .7rem; color: var(--text-mute);
  background: var(--white); border-radius: var(--r); padding: .25rem .8rem; flex: 1; max-width: 280px;
}
.shot img { width: 100%; display: block; }
.shot-float { position: relative; }
.shot-float::after {
  content: ""; position: absolute; inset: -8% -6% auto auto; width: 50%; height: 50%; z-index: -1;
  background: radial-gradient(closest-side, var(--jade-100), transparent); filter: blur(24px); opacity: .55;
}

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; padding: 1.5rem 1rem; }
.stat b { display: block; font-family: var(--font-mono); font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 500; letter-spacing: -.01em; }
.stat span { font-size: .88rem; color: var(--text-soft); }
.bg-ink .stat b { color: var(--jade-light); }
.bg-ink .stat span { color: var(--n-400); }

/* ---------- Posture ladder ---------- */
.ladder { display: grid; gap: .6rem; }
.rung {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--white);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s;
}
.rung:hover { transform: translateX(5px); box-shadow: var(--sh-sm); border-color: var(--jade-200); }
.rung .lvl { font-family: var(--font-mono); font-weight: 500; color: var(--jade); font-size: 1rem; }
.rung .rname { font-weight: 500; font-family: var(--font-mono); }
.rung .rname small { display: block; font-weight: 400; color: var(--text-mute); font-size: .8rem; font-family: var(--font-sans); margin-top: .1rem; }
.rung .rdesc { color: var(--text-soft); font-size: .9rem; }
.rung .clr {
  font-size: .7rem; font-weight: 500; padding: .3rem .65rem; border-radius: var(--r);
  background: var(--n-100); color: var(--text-mute); white-space: nowrap; letter-spacing: .02em;
}
.rung[data-l="5"] .clr { background: var(--jade-50); color: var(--jade-600); }
.rung[data-l="4"] .clr { background: var(--jade-50); color: var(--jade-500); }
@media (max-width: 680px) { .rung { grid-template-columns: 44px 1fr; } .rung .rdesc { grid-column: 2; } .rung .clr { grid-column: 2; justify-self: start; } }

/* ---------- Quartet / standards ---------- */
.quartet { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.1rem; }
@media (max-width: 900px) { .quartet { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .quartet { grid-template-columns: 1fr; } }
.qcard { padding: 1.5rem; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--white); position: relative; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.qcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--bar, var(--jade)); }
.qcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.qcard .qabbr { font-family: var(--font-mono); font-weight: 500; font-size: 1.4rem; letter-spacing: .01em; color: var(--ink); }
.qcard .qfull { font-size: .8rem; color: var(--text-mute); margin-top: .15rem; font-weight: 400; }
.qcard p { font-size: .9rem; color: var(--text-soft); margin-top: .8rem; }
.qcard .qtype { display: inline-block; margin-top: 1rem; font-size: .68rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--jade-600); background: var(--jade-50); padding: .25rem .6rem; border-radius: var(--r); }

/* ---------- Diagram boxes (envelope / dual plane) ---------- */
.diagram { border: 1px solid var(--jade-200); border-radius: var(--r-lg); padding: clamp(1.5rem,3vw,2.5rem); background: var(--jade-50); }

.envelopes { display: grid; place-items: center; gap: 0; }
.env {
  width: 100%; border-radius: var(--r-md); border: 1.5px solid var(--jade-300);
  padding: 1.1rem 1.25rem; background: rgba(255,255,255,.7); position: relative; text-align: center;
}
.env .et { font-weight: 500; font-size: .96rem; }
.env .ed { font-size: .82rem; color: var(--text-soft); }
.env.e1 { max-width: 100%; border-color: var(--jade-200); }
.env.e2 { max-width: 78%; border-color: var(--jade-300); background: rgba(255,255,255,.85); }
.env.e3 { max-width: 56%; border-color: var(--jade); background: #fff; box-shadow: var(--sh); }
.env-arrow { color: var(--jade-300); margin: .4rem 0; }

/* ---------- Verification gradient ---------- */
.gradient-zones { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
@media (max-width: 760px) { .gradient-zones { grid-template-columns: repeat(2,1fr); } }
.zone { border-radius: var(--r-md); padding: 1.2rem; border: 1px solid var(--border); background: #fff; }
.zone .zhead { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin-bottom: .5rem; }
.zone .zd { font-size: .86rem; color: var(--text-soft); }
.zone .zdot { width: 9px; height: 9px; border-radius: 50%; }
.zone[data-z="auto"] { box-shadow: inset 0 0 0 1px var(--jade-300); } .zone[data-z="auto"] .zdot { background: var(--jade-400); }
.zone[data-z="flag"] .zdot { background: var(--info); }
.zone[data-z="held"] .zdot { background: var(--warning); }
.zone[data-z="block"] .zdot { background: var(--danger); }

/* ---------- CTA ---------- */
.cta-band { border-radius: var(--r-2xl); padding: clamp(2.25rem, 5vw, 3.5rem); text-align: center; position: relative; overflow: hidden; background: var(--slate-deep); }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(55% 110% at 82% 8%, rgba(127,227,191,.16), transparent 60%),
    radial-gradient(45% 100% at 12% 92%, rgba(31,122,92,.22), transparent 60%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #f5f8f7; font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 500; }
.cta-band p { color: var(--n-400); margin-top: 1rem; max-width: 36rem; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer { background: var(--slate-deep); color: var(--n-400); padding-block: 4rem 2.5rem; }
.footer .wrap { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.footer .brand { color: #f2f6f5; }
.footer .fcol h4 { color: var(--n-300); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; font-weight: 500; }
.footer .fcol a { display: block; padding: .3rem 0; font-size: .9rem; color: var(--n-400); transition: color .2s; }
.footer .fcol a:hover { color: var(--jade-light); }
.footer .fabout { max-width: 22rem; }
.footer .fabout p { font-size: .9rem; margin-top: 1rem; line-height: 1.6; color: var(--n-400); }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 3rem; padding-top: 1.75rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--n-400);
}
.footer-base .legal { max-width: 48rem; }

/* ---------- Callout / note ---------- */
.note {
  border-left: 2px solid var(--jade); background: var(--jade-50);
  padding: 1.1rem 1.4rem; border-radius: 0 var(--r) var(--r) 0; font-size: .93rem; color: var(--text-soft);
}
.note b { color: var(--jade-600); }

/* ---------- Trust strip ---------- */
.trust-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.5rem; }
.trust-strip .ts-item { display: inline-flex; align-items: center; gap: .55rem; color: var(--text-soft); font-weight: 400; font-size: .92rem; }
.trust-strip .ts-item svg { width: 20px; height: 20px; color: var(--jade); }

/* ---------- Tabs (personas / functions) ---------- */
.persona-tabs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2.5rem; }
.persona-tab {
  display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.15rem; border-radius: var(--r);
  font-weight: 500; font-size: .9rem; color: var(--text-soft); background: var(--white);
  border: 1px solid var(--border); transition: all .2s ease;
}
.persona-tab:hover { border-color: var(--jade-300); color: var(--jade-dark); }
.persona-tab.active { background: var(--jade); color: #fff; border-color: var(--jade); }
.persona-tab .pt-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
/* On narrow screens, turn the tab list into a single edge-to-edge scroll strip
   instead of a ragged centered wrap (6 function tabs otherwise staircase). */
@media (max-width: 640px) {
  .persona-tabs {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .persona-tabs::-webkit-scrollbar { display: none; }
  .persona-tab { flex: none; scroll-snap-align: start; }
}
.persona-panel { display: none; }
.persona-panel.active { display: block; animation: fadeUp .5s var(--ease) both; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* floating subtle animation for hero accents */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floaty { animation: float 6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .oc-node, .oc-flow, .oc-label { opacity: 1; }
  .oc-edge { stroke-dashoffset: 0; }
  .floaty { animation: none; }
}

/* ---------- Page hero (interior pages) — light paper ---------- */
.page-hero { padding-top: calc(var(--nav-h) + clamp(1.75rem, 3.5vw, 2.75rem)); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 60% at 72% 0%, var(--jade-50) 0%, transparent 60%), var(--bg);
}
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 500; letter-spacing: -.02em; margin-top: 1rem; }
.page-hero .lead { margin-top: 1.1rem; max-width: 42rem; }

/* breadcrumb-ish small */
.kicker-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }

/* generic two-col prose */
.prose-cols { columns: 2; column-gap: 3rem; }
@media (max-width: 760px) { .prose-cols { columns: 1; } }

/* divider */
.hr { height: 1px; background: var(--border); border: none; margin-block: clamp(2.25rem,4.5vw,3.75rem); }

/* video block */
.video-block { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg); border: 1px solid var(--border); background: #000; }
.video-block video, .video-block img { width: 100%; display: block; }
.video-wrap { position: relative; }
.video-caption { margin-top: 1rem; font-size: .9rem; color: var(--text-mute); text-align: center; }

/* ---------- Forms (contact / demo request) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.4rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-full { grid-column: 1 / -1; }
.field > span { font-size: .82rem; font-weight: 500; color: var(--text-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--white); border: 1px solid var(--n-300); border-radius: var(--r);
  transition: border-color .18s ease, box-shadow .18s ease; appearance: none;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input::placeholder, .field textarea::placeholder { color: var(--n-400); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px var(--jade-50);
}
/* Inline error state — only after the user has interacted (not on first load) */
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid {
  border-color: var(--danger); box-shadow: 0 0 0 3px #f7e4e4;
}
.field input:user-invalid + .field-err, .field textarea:user-invalid + .field-err { display: block; }
.field-err { display: none; font-size: .76rem; color: var(--danger); margin-top: .1rem; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6b73' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.4rem;
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-success { animation: fadeUp .5s var(--ease) both; padding: 1.5rem 0 .5rem; }

/* small util */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.maxw-sm { max-width: 34rem; } .maxw-md { max-width: 44rem; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .items-center { align-items: center; } .justify-center { justify-content: center; }

/* use-case trust arc (solutions teaser cards) */
.uc-arc { display: inline-block; margin-top: .85rem; font-family: 'JetBrains Mono', monospace; font-size: .72rem; letter-spacing: .02em; color: var(--text-mute); }
.uc-arc span { color: var(--jade); }

/* form helper note (contact) */
.form-note { margin-top: 1rem; font-size: .82rem; color: var(--text-mute); text-align: center; }

/* ============ COPILOT VS AEGIS CONTRAST (home) ============ */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.vs-col { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.75rem; box-shadow: var(--sh-sm); }
.vs-col.is-aegis { border: 1.5px solid var(--jade); box-shadow: var(--sh-jade); background: linear-gradient(180deg, var(--jade-50), var(--white) 55%); }
.vs-head { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.vs-head p { margin: .55rem 0 0; color: var(--text-soft); font-size: .95rem; }
.vs-tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px; background: var(--bg-subtle); color: var(--text-mute); }
.vs-col.is-aegis .vs-tag { background: var(--jade); color: var(--white); }
.vs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.vs-list li { position: relative; padding-left: 1.85rem; font-size: .95rem; line-height: 1.5; color: var(--text-soft); }
.vs-list li::before { position: absolute; left: 0; top: -.05em; width: 1.3rem; height: 1.3rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800; }
.vs-x::before { content: "✕"; background: #f1e2e2; color: var(--danger); }
.vs-ck::before { content: "✓"; background: var(--jade); color: var(--white); }
.vs-col.is-aegis .vs-list li { color: var(--ink, #16212a); font-weight: 500; }

/* ============ FIRST 90 DAYS TIMELINE (home) ============ */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.phase { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--sh-sm); }
.phase::before { content: ""; position: absolute; top: 0; left: 1.6rem; right: 1.6rem; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--jade), var(--jade-light)); }
.phase-when { display: inline-block; margin: .35rem 0 .6rem; font-family: 'JetBrains Mono', monospace; font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--jade-dark); }
.phase h3 { margin: 0 0 .5rem; font-size: 1.08rem; }
.phase p { margin: 0; color: var(--text-soft); font-size: .94rem; line-height: 1.55; }

@media (max-width: 880px) {
  .vs { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
}
