/* ==========================================================================
   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

   Identity: cool graphite neutrals + a SINGLE governed-teal accent.
   NOT a purple->blue SaaS gradient (APP-017 Rule 29). The only saturated
   brand-glow is a CONTAINED RADIAL glow scoped to the dark brand hero
   (identity spec §3.1 bounded exception) and never a full-bleed linear
   gradient. Type: humanist system-UI for prose, ui-monospace for evidence
   (Rule 28). 8px rhythm, 4px instrument radius, hairline grouping.
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- graphite neutrals (LIGHT column of the identity spec §3) ---- */
  --ec-ink: #111820;
  --ec-ink-muted: #51606e;
  --ec-ink-faint: #6b7a88;
  --ec-surface: #ffffff;
  --ec-surface-raised: #f5f7f9;
  --ec-surface-sunken: #eef1f5;
  --ec-line: #d8dee4;
  --ec-line-strong: #c2ccd4;

  /* ---- single authored accent: governed-teal (locus of control + primary action).
          --ec-accent is the fill (white text on it); --ec-accent-ink is the on-light text/link
          variant and is intentionally darker so small text clears WCAG AA on white. ---- */
  --ec-accent: #0f6f74;
  --ec-accent-ink: #0b595d;
  --ec-accent-weak: #e3f1f1;

  /* ---- brand-glow (hero only; identity §3.1). Blue->indigo radial, kept subtle on light. ---- */
  --ec-brand-blue: #2f6bff;
  --ec-brand-indigo: #7c4dff;

  /* ---- semantic decision-state colors (LIGHT column) — ALWAYS paired with a glyph + text label ---- */
  --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)
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(10px); transition: opacity 480ms var(--ease-ec-out), transform 480ms var(--ease-ec-out); }
.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;
  /* Opaque white so the logo's baked near-white background never shows a seam against the
     tinted hero. Light theme reads cleaner with a solid header. */
  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; }
/* Logo is 3:1 (2048x682). Deliberately a strong brand anchor (APP-017 identity persistence /
   operation §27): substantially larger than a navbar icon, and allowed to overhang LEFT past the
   content column. The negative margin breaks the standard column on purpose.
   The light logo has an opaque near-white baked background; a matching white plate makes it read
   as intentional on any surface (no accidental seam). */
.nav-brand img { height: 72px; width: auto; margin-left: clamp(-28px, -2.4vw, -8px); background: #ffffff; }
@media (max-width: 960px) { .nav-brand img { height: 60px; margin-left: -8px; } }
@media (max-width: 720px) { .nav-brand img { height: 46px; margin-left: 0; } }
@media (max-width: 380px) { .nav-brand img { height: 40px; } }
.nav-links { display: flex; align-items: center; gap: 28px; }
.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 — the one authored dark brand hero (identity §3.1 bounded exception).
   Blue->indigo glow is a CONTAINED RADIAL layer, never a full-bleed linear
   gradient; it never migrates into the instrument-styled sections below.
   ========================================================================== */

.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: 70%;
  /* radial, contained — the §3.1 exception. Not linear-gradient. On the light theme the glow is
     a gentle blue/indigo brand tint (harmonizes with the logo mark), kept low-opacity so the hero
     reads clean and the dark text stays high-contrast. */
  background:
    radial-gradient(42% 60% at 20% 12%, color-mix(in srgb, var(--ec-brand-blue) 12%, transparent) 0%, transparent 70%),
    radial-gradient(38% 52% at 30% 18%, color-mix(in srgb, var(--ec-brand-indigo) 9%, transparent) 0%, transparent 72%);
  filter: blur(46px); 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 {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ec-mono); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ec-ink-muted); border: 1px solid var(--ec-line); border-radius: var(--radius);
  padding: 6px 10px; margin-bottom: 24px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ec-accent); }
.hero h1 { font-size: var(--text-display); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 20px; }
.hero h1 .accent { color: var(--ec-accent-ink); }
.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: SELECTIVE APERTURE (operation §72). A wide field of reachable context narrows
   through Elevated Context to a small permitted set that reaches the model. Communicates
   selection + containment without exposing internal formalism. Decorative/illustrative. */
.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-blue) 22%, 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; }

.site-footer { border-top: 1px solid var(--ec-line); background: var(--ec-surface); padding: 56px 0 32px; }
.footer-row { display: flex; flex-direction: column; gap: 32px; }
/* footer logo keeps the 3:1 ratio; larger and correctly proportioned. White backing matches the
   logo's baked near-white background so it sits seamlessly on the white footer. */
.footer-brand img { height: 52px; width: auto; background: #ffffff; }
.footer-legal a { color: var(--ec-accent-ink); text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: var(--ec-ink-muted); text-decoration: none; font-size: var(--text-sm); transition: color var(--dur-nav) var(--ease-ec-out); }
.footer-links a:hover { color: var(--ec-ink); }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--ec-line); padding-top: 24px; font-size: var(--text-xs); color: var(--ec-ink-faint); }

/* ==========================================================================
   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 { outline: none; border-color: var(--ec-accent); }
.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); }

/* ==========================================================================
   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; }
}

@media (max-width: 720px) {
  .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; }

/* ==========================================================================
   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; }
}
