/* ==========================================================================
   ELEVATED CONTEXT — MARKETING DESIGN SYSTEM
   Governed by APP-017 (Frontend Design Governance), APP-018 (Marketing
   Communication), APP-016 (Identity Continuity).

   Authored identity source of truth:
     docs/product/design/ELEVATED-CONTEXT-FRONTEND-IDENTITY.md
     apps/web/tokens/tokens.css

   BRAND IDENTITY (navy · teal · gold · white — the Context Elevation mark).
   The palette is derived DIRECTLY from the canonical logo artwork in
   /logos (sampled deterministically; see tools/marketing-artwork/). Three
   brand colors, but NOT three competing UI accents (operation §7):
     - NAVY  = authority / foundation / primary ink + structural brand color
     - TEAL  = governance / permission / the PRIMARY interactive accent
     - GOLD  = elevated / selected context — SCARCE emphasis only
     - WHITE = clarity / the upward passage (the arrow)
   Light theme, high-contrast, restrained. No purple/blue SaaS gradient and
   no AuraVoxa cyan/indigo glow. Type: humanist system-UI for prose,
   ui-monospace for evidence (Rule 28). 8px rhythm, 4px instrument radius.
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- neutrals (LIGHT column of the identity spec §3), warmed toward navy ink ---- */
  --ec-ink: #0b2143;          /* navy-derived primary ink (AAA on white) */
  --ec-ink-muted: #51606e;
  --ec-ink-faint: #5a6977;   /* darkened from #6b7a88: AA on white, raised and sunken surfaces */
  --ec-surface: #ffffff;
  --ec-surface-raised: #f5f7f9;
  --ec-surface-sunken: #eef2f6;
  --ec-line: #d8dee4;
  --ec-line-strong: #c2ccd4;

  /* ---- RAW brand colors (sampled from /logos — imagery, fills, glows ONLY).
          These are the artwork colors; they are NOT used directly for small text. ---- */
  --ec-brand-navy: #002460;   /* sampled 21.7% of the mark — bottom/foundation layer */
  --ec-brand-teal: #00a8a8;   /* sampled jade-teal — middle/governance layer */
  --ec-brand-gold: #fcb400;   /* sampled warm amber — top/elevated layer */
  --ec-brand-white: #ffffff;  /* the arrow / passage */

  /* soft tints for low-chroma surfaces/glows (never for text) */
  --ec-brand-navy-soft: #e4e9f1;
  --ec-brand-teal-soft: #e2f3f2;
  --ec-brand-gold-soft: #fdeec2;

  /* ---- ACCESSIBLE UI derivatives (verified WCAG 2.2 AA on white; see contrast_check.py).
          Raw teal (2.93:1) and raw gold (1.80:1) FAIL as text on white, so UI text/fills use
          these darker companions while imagery keeps the raw brand hues. ---- */
  --ec-accent: #0a6e6e;        /* teal action FILL — white text clears AA (6.05:1) */
  --ec-accent-hover: #08595c;  /* darker teal hover (8:1) */
  --ec-accent-ink: #007575;    /* teal TEXT/link: AA on white 5.5:1, sunken 4.9:1 (was #008282, failed on grey) */
  --ec-accent-weak: #e2f3f2;   /* pale teal wash */

  --ec-gold-ink: #8a6a12;      /* gold-family TEXT on white (rare) — AA */
  --ec-highlight: #fcb400;     /* raw gold for highlight bars / elevated accents on light */

  /* ---- semantic decision-state colors (LIGHT column) — ALWAYS paired with a glyph + text label.
          Kept SEPARATE from brand tokens: brand gold != warning, brand teal != success. ---- */
  --ec-ok: #1f7a4d;
  --ec-withheld: #8a6d1f;
  --ec-transform: #4a5bb0;
  --ec-deny: #9a2b2b;
  --ec-failclosed: #5a3e86;

  /* ---- type: humanist system-UI (prose), ui-monospace (evidence/counts/IDs) — Rule 28 ---- */
  --ec-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ec-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  /* ---- scale ---- */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-display: clamp(2.25rem, 4.5vw, 3.5rem);

  /* ---- layout: 8px base rhythm, 4px instrument radius ---- */
  --container-max: 1280px;
  --sp: 8px;
  --radius: 4px;
  --radius-lg: 6px;
  --section-y: clamp(72px, 9vw, 120px);

  /* ---- motion (identity §10): sparse, communicative, reduced-motion aware ---- */
  --ease-ec-out: ease-out;
  --dur-nav: 120ms;
  --dur-hover: 90ms;
  --dur-drawer: 180ms;
}

/* ==========================================================================
   RESET & ACCESSIBILITY DEFAULTS
   ========================================================================== */

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

html { scroll-behavior: smooth; }

img, picture, svg { display: block; max-width: 100%; height: auto; }

body {
  font-family: var(--ec-font);
  background: var(--ec-surface);
  color: var(--ec-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--ec-font);
  color: var(--ec-ink);
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.2;
}

/* numerics / identifiers are evidence -> monospace (identity §4) */
.mono, code, kbd { font-family: var(--ec-mono); }

a { color: inherit; }

/* Accessible skip link (Rule 12 operable) */
.skip-link {
  position: absolute;
  top: -200px;
  left: 16px;
  background: var(--ec-surface-raised);
  color: var(--ec-accent-ink);
  border: 1px solid var(--ec-accent);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
}
.skip-link:focus { top: 16px; }

/* Visible focus indicator everywhere (Rule 12 / Rule 30 functional states) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--ec-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   REVEAL ANIMATION (purposeful; disabled under reduced-motion — Rule 12/31)
   ========================================================================== */

/* hidden only once script.js has run, so content never disappears without JavaScript */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 480ms var(--ease-ec-out), transform 480ms var(--ease-ec-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 90ms; }
.delay-2 { transition-delay: 180ms; }
.delay-3 { transition-delay: 270ms; }

/* ==========================================================================
   LAYOUT PRIMITIVES
   ========================================================================== */

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.section { padding: var(--section-y) 0; border-top: 1px solid var(--ec-line); }
.section--sunken { background: var(--ec-surface-sunken); }

.section-eyebrow {
  font-family: var(--ec-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ec-accent-ink);
  margin-bottom: 12px;
}
.section-title { font-size: var(--text-3xl); margin-bottom: 16px; }
.section-desc { color: var(--ec-ink-muted); font-size: var(--text-lg); max-width: 68ch; }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section-head.center .section-desc { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   BUTTONS — instrument shape (low radius), functional states (Rule 30)
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ec-font); font-size: var(--text-sm); font-weight: 600;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background var(--dur-hover) var(--ease-ec-out),
              border-color var(--dur-hover) var(--ease-ec-out),
              color var(--dur-hover) var(--ease-ec-out);
}
.btn-sm { padding: 8px 14px; font-size: var(--text-xs); }
.btn-lg { padding: 14px 26px; font-size: var(--text-base); }

/* primary = the single governed-teal accent (solid fill, NOT a gradient — Rule 29).
   White text on the light-mode teal (#0f6f74) clears WCAG AA. */
.btn-primary { background: var(--ec-accent); color: #ffffff; border-color: var(--ec-accent); }
.btn-primary:hover { background: var(--ec-accent-ink); border-color: var(--ec-accent-ink); }

.btn-outline { background: transparent; color: var(--ec-ink); border-color: var(--ec-line-strong); }
.btn-outline:hover { border-color: var(--ec-accent); color: var(--ec-accent-ink); }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.site-nav {
  position: sticky; top: 0; z-index: 100;
  /* Solid white header; the new logo is a true transparent PNG/WebP, so no plate hack is needed. */
  background: var(--ec-surface);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-nav) var(--ease-ec-out);
}
.site-nav.scrolled { border-bottom-color: var(--ec-line); }
.nav-row {
  max-width: var(--container-max); margin: 0 auto;
  padding: 10px clamp(20px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
/* New transparent logo lockup (~4.3:1). A strong brand anchor (APP-017 identity persistence /
   operation §27/§35): larger than a navbar icon, sits NATURALLY on the light header with no
   white plate (the old baked-background hack is retired). */
/* The lockup must never be squeezed by the nav row (it once rendered at half width when links were added). */
.nav-brand img { height: 46px; width: auto; max-width: none; flex-shrink: 0; }
@media (max-width: 960px) { .nav-brand img { height: 42px; } }
@media (max-width: 720px) { .nav-brand img { height: 38px; } }
@media (max-width: 380px) { .nav-brand img { height: 34px; } }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { white-space: nowrap; }
.nav-links a:not(.btn) {
  color: var(--ec-ink-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 500;
  transition: color var(--dur-nav) var(--ease-ec-out);
}
.nav-links a:not(.btn):hover { color: var(--ec-ink); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 12px 10px;
  background: transparent; border: 1px solid var(--ec-line-strong); border-radius: var(--radius);
  flex-direction: column; justify-content: space-between; align-items: center; cursor: pointer;
}
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--ec-ink); border-radius: 1px; transition: transform var(--dur-drawer) var(--ease-ec-out), opacity var(--dur-nav); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--ec-accent-ink); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--ec-accent-ink); }

/* ==========================================================================
   HERO — light, restrained. The brand-glow is a CONTAINED RADIAL layer scoped
   to the hero (identity §3.1 bounded exception): a soft TEAL wash around the
   governance region and a scarcer GOLD wash near the elevated region. Never a
   full-bleed linear gradient, never a purple/cyan SaaS mesh (operation §38).
   ========================================================================== */

.hero { position: relative; overflow: hidden; background: var(--ec-surface-sunken); border-bottom: 1px solid var(--ec-line); }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 80%;
  /* teal around the governance boundary, a scarce gold hint toward the elevated/top region —
     low-opacity so dark navy text stays high-contrast and the hero reads clean. */
  background:
    radial-gradient(40% 58% at 68% 20%, color-mix(in srgb, var(--ec-brand-teal) 13%, transparent) 0%, transparent 70%),
    radial-gradient(32% 46% at 80% 8%, color-mix(in srgb, var(--ec-brand-gold) 11%, transparent) 0%, transparent 72%);
  filter: blur(50px); pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  max-width: var(--container-max); margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(20px, 4vw, 48px) clamp(64px, 8vw, 104px);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero-eyebrow {
  font-family: var(--ec-mono); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ec-accent-ink); margin-bottom: 20px;
}
.hero h1 { font-size: var(--text-display); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 20px; }
/* "Not everything." — navy text with a scarce gold elevation bar beneath (operation §55).
   The word stays high-contrast navy; gold is the small elevated-emphasis detail, not the text. */
.hero h1 .accent {
  color: var(--ec-ink);
  position: relative;
  display: inline-block;
}
.hero h1 .accent::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.04em; height: 0.14em;
  background: var(--ec-highlight);
  border-radius: 2px;
  z-index: -1;
  opacity: 0.9;
}
.hero-sub { font-size: var(--text-lg); color: var(--ec-ink-muted); max-width: 56ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-note { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-sm); color: var(--ec-ink-faint); border-left: 2px solid var(--ec-accent); padding-left: 12px; max-width: 54ch; }

/* Hero figure: the Context Elevation illustration (navy foundation -> teal governance ->
   gold elevated, with the white arrow of the mark travelling up). Transparent-background asset,
   so it sits cleanly on the light hero. It is the LCP image on wide viewports; loaded eagerly.
   The conceptual message also lives in HTML text + the "How it works" section, so the figure
   supplements rather than carries meaning (accessibility). */
.hero-figure { display: flex; justify-content: center; }
.hero-figure img {
  width: 100%; max-width: 560px; height: auto;
  /* a soft contained navy drop-shadow for depth — no colored brand glow on the asset itself */
  filter: drop-shadow(0 22px 44px color-mix(in srgb, var(--ec-brand-navy) 18%, transparent));
}
@media (max-width: 960px) { .hero-figure img { max-width: 480px; } }
@media (max-width: 520px) { .hero-figure img { max-width: 360px; } }

/* Durable trust principles (replaces the former release-status board). Flat hairline-grouped
   rows; each is an enduring product behavior, not a development state. */
.trust-list { border: 1px solid var(--ec-line); border-radius: var(--radius-lg); overflow: hidden; background: var(--ec-surface); }
.trust-item { padding: 24px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--ec-line); }
.trust-item:last-child { border-bottom: none; }
.trust-item h3 { font-size: var(--text-lg); font-weight: 600; margin-bottom: 7px; display: flex; align-items: baseline; gap: 10px; }
.trust-item h3::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--ec-accent); flex-shrink: 0; transform: translateY(-1px); }
.trust-item p { font-size: var(--text-base); color: var(--ec-ink-muted); max-width: 74ch; }
.flow-foot a { color: var(--ec-accent-ink); font-weight: 600; text-decoration: none; }
.flow-foot a:hover { text-decoration: underline; }

/* Hero figure: SELECTIVE APERTURE (legacy figure, retained for reference/fallback). */
.aperture {
  background: var(--ec-surface); border: 1px solid var(--ec-line); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
}
.ap-band { border: 1px solid var(--ec-line); border-radius: var(--radius); padding: 14px 16px; }
.ap-field { background: color-mix(in srgb, var(--ec-surface-raised) 70%, transparent); }
.ap-allowed {
  width: 62%; align-self: center; background: var(--ec-accent-weak);
  border-color: color-mix(in srgb, var(--ec-accent) 45%, transparent);
}
.ap-label { display: block; font-size: var(--text-xs); color: var(--ec-ink-muted); margin-bottom: 10px; letter-spacing: 0.02em; }
.ap-allowed .ap-label { color: var(--ec-accent-ink); }
.ap-dots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.ap-dots i { height: 10px; border-radius: 2px; background: var(--ec-line-strong); display: block; }
.ap-dots-few { grid-template-columns: repeat(3, 1fr); max-width: 120px; }
.ap-dots i.on { background: var(--ec-accent); }
.ap-gate {
  align-self: center; display: flex; align-items: center; gap: 8px;
  font-family: var(--ec-mono); font-size: var(--text-xs); letter-spacing: 0.06em;
  color: var(--ec-ink-muted); position: relative; padding: 2px 0;
}
.ap-gate::before, .ap-gate::after { content: ""; width: 26px; height: 1px; background: var(--ec-line-strong); display: block; }
.ap-gate-label { color: var(--ec-accent-ink); }
.ap-model {
  align-self: center; font-size: var(--text-xs); color: var(--ec-ink-muted);
  border: 1px dashed var(--ec-line-strong); border-radius: var(--radius); padding: 7px 16px;
}

/* ==========================================================================
   PULLQUOTE / CONTRAST ROWS / PRINCIPLES
   ========================================================================== */

.pullquote {
  border-left: 3px solid var(--ec-accent); padding: 8px 0 8px 22px; max-width: 72ch;
}
.pullquote p { font-size: var(--text-xl); line-height: 1.4; color: var(--ec-ink); }

/* plain, understandable "A ≠ B" contrasts (operation §21/§44) — never color-only; the glyph is
   decorative and the words carry the meaning. */
.contrast {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--ec-surface-raised); border: 1px solid var(--ec-line); border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.contrast .c-a { font-weight: 600; font-size: var(--text-lg); color: var(--ec-ink); }
.contrast .c-x { font-family: var(--ec-mono); font-size: var(--text-xl); color: var(--ec-accent-ink); }
.contrast .c-b { font-size: var(--text-lg); color: var(--ec-ink-muted); }

.principle { background: var(--ec-surface-raised); border: 1px solid var(--ec-line); border-radius: var(--radius-lg); padding: 22px; }
.principle h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: 6px; }
.principle p { font-size: var(--text-sm); color: var(--ec-ink-muted); }

/* ==========================================================================
   PRINCIPLE / FEATURE PANELS — hairline grouping, flat surfaces (identity §6/§7)
   ========================================================================== */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.panel {
  background: var(--ec-surface-raised); border: 1px solid var(--ec-line); border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--dur-hover) var(--ease-ec-out);
}
.panel:hover { border-color: var(--ec-line-strong); }
.panel .tag { font-family: var(--ec-mono); font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ec-accent-ink); margin-bottom: 12px; }
.panel h3 { font-size: var(--text-lg); font-weight: 600; margin-bottom: 8px; }
.panel p { font-size: var(--text-sm); color: var(--ec-ink-muted); }

/* functional icon badge — monochrome, inherits accent (identity §9) */
.badge {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ec-accent-weak); border: 1px solid color-mix(in srgb, var(--ec-accent) 40%, transparent);
  color: var(--ec-accent-ink); margin-bottom: 16px;
}
.badge svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   HOW-IT-WORKS FLOW — plain numbered stages (operation §22/§43)
   ========================================================================== */

.flow { list-style: none; display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.flow-node { flex: 1 1 170px; background: var(--ec-surface-raised); border: 1px solid var(--ec-line); border-radius: var(--radius-lg); padding: 20px; }
.flow-node .step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ec-accent-weak); border: 1px solid color-mix(in srgb, var(--ec-accent) 45%, transparent);
  color: var(--ec-accent-ink); font-family: var(--ec-mono); font-size: var(--text-xs); font-weight: 600;
  margin-bottom: 12px;
}
.flow-node .name { font-size: var(--text-base); font-weight: 600; margin-bottom: 6px; }
.flow-node .desc { font-size: var(--text-sm); color: var(--ec-ink-muted); }
.flow-foot { margin-top: 24px; font-size: var(--text-sm); color: var(--ec-ink-muted); max-width: 72ch; }

/* ==========================================================================
   STATUS / HONESTY TABLE (APP-018 — claim-reality separation made explicit)
   ========================================================================== */

.record { border: 1px solid var(--ec-line); border-radius: var(--radius-lg); overflow: hidden; }
.record-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--ec-line); }
.record-row:last-child { border-bottom: none; }
.record-row .k { font-size: var(--text-sm); color: var(--ec-ink); }
.record-row .k span { display: block; font-size: var(--text-xs); color: var(--ec-ink-faint); margin-top: 3px; }
/* Trust states in plain language (operation §23/§24). Status is never color-only: each carries a
   word label; the color/dot is reinforcement, not the message. */
.state { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.01em; padding: 6px 11px; border-radius: var(--radius); border: 1px solid var(--ec-line-strong); color: var(--ec-ink-muted); white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.state.live { color: var(--ec-ok); border-color: color-mix(in srgb, var(--ec-ok) 50%, transparent); }
.state.built { color: var(--ec-accent-ink); border-color: color-mix(in srgb, var(--ec-accent) 50%, transparent); }
.state.progress { color: var(--ec-withheld); border-color: color-mix(in srgb, var(--ec-withheld) 50%, transparent); }

/* ==========================================================================
   LAYERED SPLIT (image + prose) — used for identity/evidence sections
   ========================================================================== */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split h3 { font-size: var(--text-2xl); margin-bottom: 16px; }
.split p { color: var(--ec-ink-muted); margin-bottom: 16px; }
.bullets { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.bullets li { position: relative; padding-left: 22px; color: var(--ec-ink-muted); font-size: var(--text-base); }
.bullets li::before { content: "→"; position: absolute; left: 0; color: var(--ec-accent-ink); }

.brand-plate {
  background: var(--ec-surface-sunken); border: 1px solid var(--ec-line); border-radius: var(--radius-lg);
  padding: 40px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.brand-plate .plate-glow {
  position: absolute; inset: 0;
  background: radial-gradient(45% 55% at 50% 42%, color-mix(in srgb, var(--ec-brand-teal) 20%, transparent) 0%, transparent 70%);
  filter: blur(40px); pointer-events: none;
}
.brand-plate img { position: relative; max-width: 220px; }

/* ==========================================================================
   ECOSYSTEM / CTA / FOOTER
   ========================================================================== */

.ecosystem-box { max-width: 820px; margin: 0 auto; text-align: center; background: var(--ec-surface-raised); border: 1px solid var(--ec-line); border-radius: var(--radius-lg); padding: 48px clamp(24px, 4vw, 48px); }
.ecosystem-box .lineage { font-family: var(--ec-mono); font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ec-ink-faint); margin-bottom: 14px; }
.ecosystem-box h2 { font-size: var(--text-2xl); margin-bottom: 12px; }
.ecosystem-box p { color: var(--ec-ink-muted); max-width: 60ch; margin: 0 auto 24px; }

.cta { text-align: center; }
.cta h2 { font-size: var(--text-3xl); margin-bottom: 16px; max-width: 20ch; margin-left: auto; margin-right: auto; }
.cta p { color: var(--ec-ink-muted); font-size: var(--text-lg); max-width: 60ch; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Dark navy footer (operation §57): one deliberate reverse-brand moment while the rest of the
   page stays light. Hosts the reverse-white logo. The footer navy is a LIGHTER navy than the
   logo's bottom-layer navy (#002460) so the mark's navy foundation slab stays visible instead of
   merging into the background; a faint light halo on the lockup guarantees the slab's silhouette
   reads. All link/legal text verified for contrast on this surface (white 12.6:1 AAA;
   links #c3d0e0 8:1; legal #a9b9cc 6.3:1; gold 7:1). */
.site-footer { border-top: 1px solid #13335f; background: #13335f; padding: 56px 0 32px; color: #dbe4f0; }
.footer-row { display: flex; flex-direction: column; gap: 32px; }
.footer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
@media (max-width: 640px) {
  .footer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
.footer-brand img {
  height: 44px; width: auto;
  /* faint light halo so the logo's navy foundation layer never disappears into the footer */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.55));
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: #c3d0e0;
  background: color-mix(in srgb, #ffffff 6%, transparent);
  border: 1px solid color-mix(in srgb, #ffffff 14%, transparent);
  transition: all var(--dur-nav) var(--ease-ec-out);
  text-decoration: none;
}
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform var(--dur-nav) var(--ease-ec-out);
}
.footer-social-link:hover {
  color: #ffffff;
  background: color-mix(in srgb, var(--ec-brand-teal) 22%, transparent);
  border-color: var(--ec-brand-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--ec-brand-navy) 40%, transparent);
}
.footer-social-link:hover svg {
  transform: scale(1.08);
}
.footer-legal a { color: var(--ec-brand-gold); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { text-decoration-thickness: 2px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: #c3d0e0; text-decoration: none; font-size: var(--text-sm); transition: color var(--dur-nav) var(--ease-ec-out); }
.footer-links a:hover { color: #ffffff; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid color-mix(in srgb, #ffffff 16%, transparent); padding-top: 24px; font-size: var(--text-xs); color: #a9b9cc; }
/* reinstate a visible focus ring on the dark footer */
.site-footer a:focus-visible { outline: 2px solid var(--ec-brand-gold); outline-offset: 2px; }

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.contact-wrap { max-width: 640px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 48px); }
.contact-head { text-align: center; margin-bottom: 40px; }
.contact-head h1 { font-size: var(--text-3xl); margin-bottom: 12px; }
.contact-head p { color: var(--ec-ink-muted); font-size: var(--text-lg); }
.form-card { background: var(--ec-surface-raised); border: 1px solid var(--ec-line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: 7px; }
.field .req { color: var(--ec-deny); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--ec-surface); border: 1px solid var(--ec-line-strong); color: var(--ec-ink);
  padding: 11px 13px; border-radius: var(--radius); font-family: var(--ec-font); font-size: var(--text-base);
  transition: border-color var(--dur-hover) var(--ease-ec-out);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ec-accent); }
.field [aria-invalid="true"] { border-color: var(--ec-deny); }
.field textarea { resize: vertical; min-height: 120px; }
.field .hint { font-size: var(--text-xs); color: var(--ec-ink-faint); margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { font-size: var(--text-xs); color: var(--ec-ink-faint); margin-top: 16px; line-height: 1.6; }
.form-alert { padding: 14px 16px; border-radius: var(--radius); font-size: var(--text-sm); margin-bottom: 20px; display: none; }
.form-alert-error { display: block; background: color-mix(in srgb, var(--ec-deny) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ec-deny) 45%, transparent); color: var(--ec-ink); }
.form-alert-success { display: block; background: var(--ec-accent-weak); border: 1px solid color-mix(in srgb, var(--ec-accent) 45%, transparent); color: var(--ec-ink); }

.doc-page { max-width: 760px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 48px); }
.doc-page h1 { font-size: var(--text-3xl); margin-bottom: 20px; }
.doc-page h2 { font-size: var(--text-xl); margin: 32px 0 12px; }
.doc-page p, .doc-page li { color: var(--ec-ink-muted); margin-bottom: 12px; }
.doc-page ul { padding-left: 22px; }
.doc-page a { color: var(--ec-accent-ink); }

/* ---- developer / docs surfaces (reuse .doc-page; same tokens, no new theme) ---- */
/* Availability pill — states the honest capability class; never decorative. */
.avail { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ec-mono);
  font-size: var(--text-sm); line-height: 1; padding: 6px 10px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--ec-ink) 18%, transparent); color: var(--ec-ink);
  background: var(--ec-surface); margin-bottom: 20px; }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.avail-limited { color: var(--ec-accent-ink); border-color: color-mix(in srgb, var(--ec-accent) 45%, transparent); background: var(--ec-accent-weak); }
.avail-planned { color: var(--ec-failclosed); border-color: color-mix(in srgb, var(--ec-failclosed) 40%, transparent); }
/* Honest "what this is / isn't" callout. */
.doc-note { border-left: 3px solid color-mix(in srgb, var(--ec-accent) 50%, transparent);
  background: var(--ec-accent-weak); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 16px 0; }
.doc-note strong { color: var(--ec-ink); }
/* Runnable code blocks — monospace evidence styling; never decorative filler. */
.doc-page pre { font-family: var(--ec-mono); font-size: var(--text-sm); line-height: 1.5;
  background: var(--ec-ink); color: #e8eef7; padding: 16px 18px; border-radius: var(--radius);
  overflow-x: auto; margin: 12px 0 16px; }
.doc-page pre code { color: inherit; font-family: inherit; }
/* Developer hub cards grid. */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.dev-card { display: block; border: 1px solid color-mix(in srgb, var(--ec-ink) 14%, transparent);
  border-radius: var(--radius); padding: 20px; background: var(--ec-surface); text-decoration: none; }
.dev-card:hover { border-color: color-mix(in srgb, var(--ec-accent) 50%, transparent); }
.dev-card h3 { font-size: var(--text-lg); color: var(--ec-ink); margin-bottom: 6px; }
.dev-card p { margin-bottom: 10px; }
.doc-crumbs { font-family: var(--ec-mono); font-size: var(--text-sm); color: var(--ec-ink-muted); margin-bottom: 16px; }
.doc-crumbs a { color: var(--ec-accent-ink); }


/* ==========================================================================
   HERO FIGURE: CONTEXT ELEVATION (inline SVG, replaces the raster)
   Three floating plates narrow from available to governed to elevated.
   Every plate holds the same document card, so the only thing that changes
   is how many make it through. Only the gold plate reaches the AI model.
   Labels are real HTML text at a fixed size, legible at every width.
   ========================================================================== */
.ce-figure { position: relative; width: 100%; max-width: 580px; margin: 0 auto; }
.ce-svg { width: 100%; height: auto; display: block; overflow: visible; }

.ce-label {
  position: absolute; transform: translateY(-8px);
  padding-right: 26px; text-align: right; white-space: nowrap; line-height: 1.25;
}
.ce-label::after { content: ""; position: absolute; right: 0; top: 7px; width: 16px; height: 1px; background: currentColor; opacity: .45; }
.ce-label b { display: block; font-family: var(--ec-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.ce-label small { display: block; font-size: 12px; color: var(--ec-ink-muted); margin-top: 3px; }
.ce-label--model     { top: 12.19%; right: calc(100% - 51.25% + 8px); color: var(--ec-ink); }
.ce-label--elevated  { top: 40.16%; right: calc(100% - 42.50% + 8px); color: var(--ec-gold-ink); }
.ce-label--governed  { top: 56.72%; right: calc(100% - 32.81% + 8px); color: var(--ec-accent-ink); }
.ce-label--available { top: 75.78%; right: calc(100% - 22.50% + 8px); color: var(--ec-ink-muted); }

/* Motion with intent, played once (about 2s): plates arrive bottom to top,
   then the passage to the model, then the model. Reduced motion shows the
   final state immediately. */
@keyframes ce-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ce-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes ce-fade { from { opacity: 0; } to { opacity: 1; } }
.ce-layer { animation: ce-rise 620ms cubic-bezier(.2,.7,.2,1) both; }
.ce-governed { animation-delay: 520ms; }
.ce-elevated { animation-delay: 1040ms; }
.ce-glow-teal { animation: ce-fade 700ms ease-out 520ms both; }
.ce-glow-gold { animation: ce-fade 700ms ease-out 1040ms both; }
.ce-beam { animation: ce-fade 400ms ease-out 1500ms both; }
.ce-model { animation: ce-drop 520ms cubic-bezier(.2,.7,.2,1) 1700ms both; }
.ce-label--available { animation: ce-fade 400ms ease-out 200ms both; }
.ce-label--governed  { animation: ce-fade 400ms ease-out 720ms both; }
.ce-label--elevated  { animation: ce-fade 400ms ease-out 1240ms both; }
.ce-label--model     { animation: ce-fade 400ms ease-out 1900ms both; }
@media (prefers-reduced-motion: reduce) {
  .ce-layer, .ce-beam, .ce-model, .ce-label, .ce-glow-teal, .ce-glow-gold { animation: none !important; }
}
@media (max-width: 1100px) { .ce-label small { display: none; } }
@media (max-width: 520px) {
  .ce-label b { font-size: 10px; letter-spacing: 0.08em; }
  .ce-label { padding-right: 0; }
  .ce-label::after { display: none; }
}


/* ==========================================================================
   SIGN IN / EARLY ACCESS
   Sign in is a quiet text link straight to the app's own login
   (app.elevatedcontext.com) for existing customers; the one primary action
   for everyone else is "Request early access" (a waitlist, stated plainly:
   no countdowns, no "spots left", no implied scarcity).
   ========================================================================== */
[hidden] { display: none !important; }

.nav-links a.nav-signin { color: var(--ec-ink); font-weight: 600; }
@media (min-width: 1081px) {
  .nav-links a.nav-signin { padding-left: 28px; border-left: 1px solid var(--ec-line); }
}

.btn-block { width: 100%; }
.cta-signin { margin-top: 20px; font-size: var(--text-sm); color: var(--ec-ink-muted); }
.cta-signin a, .auth-foot a { color: var(--ec-accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.auth-wrap { max-width: 600px; }
.auth-foot { text-align: center; margin-top: 24px; font-size: var(--text-sm); color: var(--ec-ink-muted); }


.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field .opt { font-weight: 400; font-size: var(--text-xs); color: var(--ec-ink-muted); margin-left: 6px; }

.form-done { text-align: center; padding: 8px 0; outline: none; }
.done-mark {
  display: inline-flex; width: 48px; height: 48px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--ec-accent-weak); border: 1px solid color-mix(in srgb, var(--ec-accent) 45%, transparent); color: var(--ec-accent); margin-bottom: 16px;
}
.done-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.form-done h2 { font-size: var(--text-2xl); margin-bottom: 10px; }
.form-done p { color: var(--ec-ink-muted); max-width: 46ch; margin: 0 auto 12px; }
.form-done strong { color: var(--ec-ink); word-break: break-all; }
.done-ref { font-size: var(--text-xs); }
.done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .aperture { max-width: 480px; }
}

/* The full link row needs ~1240px beside an undistorted logo; below that the menu collapses (was 1080px, which squeezed the logo). */
@media (max-width: 1240px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 0; z-index: 90;
    background: color-mix(in srgb, var(--ec-surface) 97%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 88px clamp(20px, 6vw, 40px) 40px; gap: 4px;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
    transition: opacity var(--dur-drawer) var(--ease-ec-out), visibility var(--dur-drawer), transform var(--dur-drawer) var(--ease-ec-out);
    overflow-y: auto;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-links a:not(.btn) { font-size: var(--text-lg); padding: 14px 2px; border-bottom: 1px solid var(--ec-line); color: var(--ec-ink); }
  .nav-links .nav-cta { margin-top: 14px; width: 100%; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 1fr; }
  .ap-allowed { width: 100%; }
}

body.menu-open { overflow: hidden; }
/* keep the brand and the close (X) control above the open drawer so the menu can always be dismissed */
.nav-brand, .nav-toggle { position: relative; z-index: 95; }

/* ==========================================================================
   REDUCED MOTION (APP-017 Rule 12 / §10)
   ========================================================================== */

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

/* ==========================================================================
   TEAM PAGE
   Founder portrait, bio prose, and a plain focus list. Reuses the
   shared primitives (section, panel, grid, badge, trust-list, cta) so the
   page carries the same light, restrained identity as the rest of the site.
   ========================================================================== */

.team-hero { background: var(--ec-surface-sunken); border-bottom: 1px solid var(--ec-line); }
.team-hero .container { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.team-hero h1 { font-size: var(--text-display); line-height: 1.08; letter-spacing: -0.02em; margin: 10px 0 18px; max-width: 20ch; }
.team-hero .lede { font-size: var(--text-lg); color: var(--ec-ink-muted); max-width: 64ch; }

/* Founder card: portrait + role, then bio prose and a plain focus list.
   The portrait carries one small brand detail: the three layers of the mark
   (navy foundation, teal governance, gold elevated) as a stepped edge along
   its bottom, so the photo reads as Elevated Context without a frame or filter. */
.founder { display: grid; grid-template-columns: 240px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.founder-side { position: sticky; top: 100px; }
.founder-photo { position: relative; margin: 0 0 20px; }
.founder-photo img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%;
  border-radius: var(--radius-lg); background: var(--ec-surface-sunken);
  border: 1px solid var(--ec-line);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--ec-brand-navy) 14%, transparent);
}
.founder-photo-layers { position: absolute; left: 14px; bottom: -6px; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 3px; }
.founder-photo-layers i { display: block; height: 4px; border-radius: 1px; }
.founder-photo-layers i:nth-child(1) { width: 64px; background: var(--ec-brand-navy); }
.founder-photo-layers i:nth-child(2) { width: 44px; background: var(--ec-brand-teal); }
.founder-photo-layers i:nth-child(3) { width: 24px; background: var(--ec-brand-gold); }
.founder-name { font-size: var(--text-xl); font-weight: 600; margin-bottom: 4px; }
.founder-role { font-family: var(--ec-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ec-accent-ink); margin-bottom: 10px; }
.founder-meta { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.founder-meta li { font-size: var(--text-sm); color: var(--ec-ink-muted); position: relative; padding-left: 16px; }
.founder-meta li::before { content: "·"; position: absolute; left: 2px; color: var(--ec-accent-ink); font-weight: 700; }

.founder-bio p { color: var(--ec-ink-muted); font-size: var(--text-base); margin-bottom: 16px; max-width: 70ch; }
.founder-bio p:first-child { color: var(--ec-ink); font-size: var(--text-lg); }

.team-cta { justify-content: flex-start; margin-top: 28px; }

/* Focus areas as a plain two-column list with hairline rules (no pills). */
.focus { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ec-line); max-width: 70ch; }
.focus-label { font-family: var(--ec-mono); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ec-accent-ink); margin-bottom: 12px; }
.focus-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.focus-list li { font-size: var(--text-sm); color: var(--ec-ink); padding: 9px 0 9px 18px; border-bottom: 1px solid var(--ec-line); position: relative; }
.focus-list li::before { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 2px; background: var(--ec-accent); }

@media (max-width: 760px) {
  .founder { grid-template-columns: 1fr; }
  .founder-side { position: static; display: grid; grid-template-columns: 112px 1fr; column-gap: 18px; align-items: center; }
  .founder-photo { grid-row: 1 / span 2; margin: 0; }
  .founder-photo-layers { left: 8px; bottom: -5px; }
  .founder-photo-layers i:nth-child(1) { width: 40px; }
  .founder-photo-layers i:nth-child(2) { width: 28px; }
  .founder-photo-layers i:nth-child(3) { width: 16px; }
  .founder-name { align-self: end; }
  .founder-role { align-self: start; margin-bottom: 0; }
  .founder-meta { grid-column: 1 / -1; margin-top: 16px; }
}
@media (max-width: 520px) {
  .focus-list { grid-template-columns: 1fr; }
}

/* EC-UX-001 - Get started page: numbered paths, plain list, one primary action. */
.start-h{font-size:1.15rem;margin:0 0 12px;}
.start-steps{margin:0 0 16px;padding-left:1.25rem;display:flex;flex-direction:column;gap:12px;line-height:1.55;}
.start-card .hint{margin:0 0 16px;}

/* EC-UX-001: '.doc-page a' recolours links, which also recoloured primary BUTTONS to teal-on-teal (unreadable). Buttons keep their own colours. */
.doc-page a.btn-primary, .doc-page a.btn-primary:hover { color: #ffffff; }
.doc-page a.btn-outline { color: var(--ec-ink); }

