/* ==========================================================================
   Czytelnia — public marketing site (Etap 31, ADR 0037).

   Carried over from the approved mockup (docs/design/czytelnia-www/index.html)
   with two structural changes: this is an external stylesheet (the mockup had
   it inline, which would force a CSP with 'unsafe-inline' — ADR 0037 §3), and
   it also styles the real subpages, the contact form's live/fallback states
   and the 404 page, which the hash-routed mockup did not have.

   Single committed dark theme: the product's "night library" identity
   (docs/design/biblioteka/assets/tokens.css, ADR 0026). Violet space, amber
   reading-lamp accents. System fonts only — zero network requests.
   ========================================================================== */
:root {
  color-scheme: dark;

  --bg: #0b0a0f;
  --surface: #131119;
  --surface-raised: #1a1722;
  --surface-elevated: #221e2d;
  --edge: #2c2838;
  --edge-strong: #3a3550;
  --ink: #eceaf3;
  --ink-muted: #b6b2c6;
  --ink-faint: #8a8599;
  --accent-deep: #2a2350;
  --accent: #6e56cf;
  --accent-hover: #7c66e0;
  --accent-glow: #9e8cff;
  --amber-deep: #7c2d12;
  --amber: #f59e0b;
  --amber-glow: #fde68a;
  --danger: #f87171;

  --glass-bg: rgb(19 17 25 / 0.72);
  --glass-edge: rgb(255 255 255 / 0.1);

  --shadow-card: 0 24px 60px -24px rgb(0 0 0 / 0.85);
  --shadow-glow: 0 0 28px -6px rgb(110 86 207 / 0.5);
  --shadow-lamp: 0 10px 32px -10px rgb(245 158 11 / 0.5);

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;

  --container: 1140px;
  --nav-h: 66px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--bg);
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: var(--accent-glow); text-decoration: none; }
a:hover { color: var(--ink); }

/* A link sitting inside a block of text must be distinguishable without relying on
   colour (WCAG 1.4.1): our violet on muted grey is a 1.32:1 contrast, far under the
   3:1 an unaided eye needs. Navigation, buttons and card links are standalone and
   keep the clean look. */
p a:not(.btn), li a:not(.btn), .consent a {
  text-decoration: underline; text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: rgb(110 86 207 / 0.45); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  padding: 10px 16px; background: var(--amber); color: #171004;
  border-radius: var(--radius-sm); font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; color: #171004; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* --------------------------------------------------------------------------
   Top navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  background: rgb(11 10 15 / 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; gap: 28px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.3rem; color: var(--ink);
  margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand-orb {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--amber-glow), var(--amber) 60%, var(--amber-deep));
  box-shadow: 0 0 12px 2px rgb(245 158 11 / 0.55);
  flex: none;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 13px; border-radius: 999px;
  color: var(--ink-muted); font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink); background: rgb(255 255 255 / 0.05); }
.nav-links a.active,
.nav-links a[aria-current="page"] { color: var(--ink); background: rgb(110 86 207 / 0.18); }

/* Entrance to the application: a text link, deliberately not a second button —
   the only call to action in the header stays "Umów prezentację" (ADR 0045 §7). */
.nav-login {
  color: var(--ink-faint); font-size: 0.92rem;
  padding: 8px 2px; border-bottom: 1px solid transparent;
}
.nav-login:hover { color: var(--ink); border-bottom-color: var(--amber); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 0.98rem var(--sans); cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}
.btn-primary {
  background: linear-gradient(180deg, #fbbf24, var(--amber));
  color: #171004; box-shadow: var(--shadow-lamp);
}
.btn-primary:hover { transform: translateY(-1px); background: linear-gradient(180deg, #fcd34d, #fbbf24); color: #171004; }
.btn-ghost {
  border-color: var(--edge-strong); color: var(--ink);
  background: rgb(255 255 255 / 0.02);
}
.btn-ghost:hover { border-color: var(--accent-glow); background: rgb(110 86 207 / 0.12); color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.burger {
  display: none;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--edge-strong); background: transparent;
  cursor: pointer; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.2s, top 0.25s;
}
.burger span { top: 50%; margin-top: -1px; }
.burger span::before { left: 0; right: 0; top: -7px; }
.burger span::after { left: 0; right: 0; top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: rgb(11 10 15 / 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--edge);
  padding: 18px 24px 28px;
}
.mobile-menu a {
  display: block; padding: 14px 6px;
  font-family: var(--serif); font-size: 1.35rem; color: var(--ink);
  border-bottom: 1px solid var(--edge);
}
.mobile-menu a.btn {
  margin-top: 20px; width: 100%;
  border-bottom: 0; font-family: var(--sans); font-size: 0.98rem;
  color: #171004;
}
/* Without JS the burger cannot toggle anything, so it must not be offered at all;
   the mobile menu then stays closed and the footer navigation carries the links. */
html:not(.js) .burger { display: none !important; }

/* --------------------------------------------------------------------------
   Hero — glyph field + reading lamp cursor
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 56px) 0 96px;
  overflow: hidden;
}
#glyph-field {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero::before {
  /* readability scrim over the glyph field, denser behind the headline */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58% 66% at 26% 42%, rgb(11 10 15 / 0.9), rgb(11 10 15 / 0.42) 62%, transparent 100%),
    linear-gradient(180deg, rgb(11 10 15 / 0.55), transparent 22%, transparent 72%, var(--bg));
}
.hero .container { position: relative; z-index: 2; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 72px); align-items: center;
}

.eyebrow {
  display: block;
  font: 600 0.78rem var(--sans);
  letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.35rem);
  margin-bottom: 22px;
}
.hero h1 .lamp {
  font-style: italic; color: var(--amber-glow);
  text-shadow: 0 0 34px rgb(245 158 11 / 0.35);
}
.hero .lede {
  max-width: 34em;
  font-size: clamp(1.05rem, 1.45vw, 1.2rem);
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 0.88rem; color: var(--ink-faint);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-glow); flex: none;
}
.hero-hint {
  margin-top: 40px; font: 400 0.82rem var(--mono);
  color: var(--ink-faint); display: inline-flex; align-items: center; gap: 10px;
}
.hero-hint i {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, var(--amber-glow), var(--amber));
  box-shadow: 0 0 10px 2px rgb(245 158 11 / 0.5);
}

/* Live Q&A demo panel */
.demo, .mcp-panel {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.demo-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-bottom: 1px solid var(--edge);
  font: 500 0.85rem var(--sans); color: var(--ink-muted);
}
.demo-head .brand-orb { width: 9px; height: 9px; }
.demo-head strong { color: var(--ink); font-weight: 600; }
.demo-chip {
  margin-left: auto;
  font: 500 0.72rem var(--mono);
  padding: 3px 10px; border-radius: 999px;
  color: var(--accent-glow);
  background: rgb(110 86 207 / 0.14);
  border: 1px solid rgb(110 86 207 / 0.35);
  white-space: nowrap;
}
.demo-body {
  height: 330px; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.msg { max-width: 88%; font-size: 0.95rem; line-height: 1.55; }
.msg-q {
  align-self: flex-end;
  background: rgb(110 86 207 / 0.2);
  border: 1px solid rgb(110 86 207 / 0.4);
  color: var(--ink);
  padding: 10px 14px; border-radius: 14px 14px 4px 14px;
}
.msg-a {
  align-self: flex-start;
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  color: var(--ink-muted);
  padding: 12px 15px; border-radius: 14px 14px 14px 4px;
}
.msg-a .cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cite {
  font: 500 0.7rem var(--mono);
  color: var(--amber);
  background: rgb(245 158 11 / 0.08);
  border: 1px solid rgb(245 158 11 / 0.3);
  padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.demo-body-static { height: auto; }
.demo-tool {
  display: flex; align-items: center; gap: 8px;
  font: 500 0.78rem var(--mono); color: var(--ink-faint);
}
.demo-tool svg { color: var(--accent-glow); flex: none; }
.demo-sources {
  background: var(--surface-raised);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.demo-sources-label {
  display: block; font: 600 0.68rem var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px;
}
.demo-source-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: var(--ink); padding: 3px 0;
}
.demo-source-item svg { color: var(--amber); flex: none; }
.demo-source-link {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--edge);
  font-size: 0.8rem; color: var(--ink-faint);
}
.dash-list { list-style: none; display: grid; gap: 12px; margin-bottom: 26px; }
.dash-list li { position: relative; padding-left: 24px; font-size: 0.95rem; color: var(--ink-muted); }
.dash-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 10px; height: 2px; border-radius: 1px; background: var(--amber);
}
.caret {
  display: inline-block; width: 8px; height: 1.05em;
  background: var(--amber); vertical-align: text-bottom;
  animation: blink 0.9s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.demo-foot {
  padding: 11px 18px; border-top: 1px solid var(--edge);
  font-size: 0.78rem; color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Shared section scaffolding
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(76px, 10vw, 128px); }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 18px; }
.section-head .lede { font-size: 1.12rem; }

.band { background: var(--surface); border-block: 1px solid var(--edge); }

.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s, transform 0.7s; }
.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Metaphor strip
   -------------------------------------------------------------------------- */
.metaphor { border-block: 1px solid var(--edge); background: var(--surface); }
.metaphor-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-block: 34px;
}
.metaphor-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 22px;
}
.metaphor-item + .metaphor-item { border-left: 1px solid var(--edge); }
.metaphor-item svg { flex: none; color: var(--accent-glow); }
.metaphor-item.is-lamp svg { color: var(--amber); }
.metaphor-item b {
  display: block; font-family: var(--serif); font-weight: 500;
  color: var(--ink); font-size: 1.05rem;
}
.metaphor-item small { font-size: 0.85rem; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   How it works — four steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  counter-reset: step;
}
.step { position: relative; padding-top: 22px; }
.step::before {
  content: ""; position: absolute; top: 0; left: 0; right: -26px; height: 1px;
  background: var(--edge);
}
.step:last-child::before { right: 0; }
.step::after {
  content: ""; position: absolute; top: -3px; left: 0;
  width: 44px; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, var(--amber), rgb(245 158 11 / 0));
}
.step-no {
  font: 500 0.82rem var(--mono);
  color: var(--amber); letter-spacing: 0.08em;
}
.step h3 { font-size: 1.3rem; margin: 10px 0 10px; }
.step p { font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Feature cards
   -------------------------------------------------------------------------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 26px 24px 28px;
  transition: transform 0.25s, border-color 0.25s;
  overflow: hidden;
}
.card:hover { transform: translateY(-3px); border-color: var(--edge-strong); }
.card-tick {
  display: block; width: 30px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), var(--accent));
  margin-bottom: 18px;
}
/* h2 on the subpages (where the card sits directly under the page's h1), h3 on the
   home page (under a section heading) — same visual weight, correct outline both times. */
.card h2, .card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { font-size: 0.93rem; }
/* Lists inside a card (status, packages, roadmap) — same dash marker as the role
   cards, so an enumeration reads identically wherever it appears. */
.card ul { list-style: none; display: grid; gap: 11px; margin-top: 4px; }
.card li { position: relative; padding-left: 22px; font-size: 0.93rem; color: var(--ink-muted); }
.card li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 9px; height: 2px; border-radius: 1px; background: var(--amber);
}
.card li b { color: var(--ink); font-weight: 600; }
/* Verifiable numbers, set in mono so they read as measurements, not marketing. */
.card .stat {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--edge);
  font: 500 0.82rem var(--mono); color: var(--ink-faint); line-height: 1.6;
}
.card .stat b { color: var(--amber-glow); font-weight: 600; }
.card .tag {
  display: inline-block; margin-top: 14px;
  font: 500 0.7rem var(--mono);
  color: var(--accent-glow);
  background: rgb(110 86 207 / 0.12);
  border: 1px solid rgb(110 86 207 / 0.3);
  padding: 2px 9px; border-radius: 999px;
}
@media (hover: hover) {
  .glow::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    opacity: 0; transition: opacity 0.35s;
    background: radial-gradient(230px circle at var(--mx, 50%) var(--my, 50%),
      rgb(158 140 255 / 0.12), transparent 65%);
  }
  .glow:hover::after { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Team roles
   -------------------------------------------------------------------------- */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.role {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
}
.role-badge {
  display: inline-block;
  font: 600 0.72rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.role-owner .role-badge { color: var(--amber); background: rgb(245 158 11 / 0.1); border: 1px solid rgb(245 158 11 / 0.32); }
.role-sales .role-badge { color: var(--accent-glow); background: rgb(110 86 207 / 0.14); border: 1px solid rgb(110 86 207 / 0.38); }
.role h3 { font-size: 1.45rem; margin-bottom: 6px; }
.role .role-sub { font-size: 0.92rem; color: var(--ink-faint); margin-bottom: 18px; }
.role ul { list-style: none; display: grid; gap: 12px; }
.role li { position: relative; padding-left: 24px; font-size: 0.95rem; }
.role li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 10px; height: 2px; border-radius: 1px; background: var(--amber);
}
.role-sales li::before { background: var(--accent-glow); }
/* `.section-note` is the same dashed aside used outside the roles section
   (problem, segments, status) — one look for "a sentence that closes a section". */
.roles-note,
.section-note {
  margin-top: 26px; padding: 18px 22px;
  border: 1px dashed var(--edge-strong); border-radius: var(--radius);
  font-size: 0.92rem; color: var(--ink-faint);
}
.roles-note b,
.section-note b { color: var(--ink-muted); font-weight: 600; }

/* --------------------------------------------------------------------------
   Security
   -------------------------------------------------------------------------- */
.security-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--edge); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg);
}
.security-cell {
  padding: 28px 26px;
  border-right: 1px solid var(--edge); border-bottom: 1px solid var(--edge);
}
.security-cell:nth-child(3n) { border-right: 0; }
.security-cell:nth-last-child(-n+3) { border-bottom: 0; }
.security-cell h3 { font-size: 1.12rem; margin-bottom: 8px; }
.security-cell p { font-size: 0.9rem; }
/* The closing cell spans the whole row (data residency reads as a statement, not a
   tile). With it present the last grid row is always that one cell, so every other
   cell keeps its bottom rule — hence the two overrides below, written at a higher
   specificity than the nth-child arithmetic above and in the breakpoints. */
.security-grid .security-cell.is-wide {
  grid-column: 1 / -1;
  border-right: 0; border-bottom: 0;
}
.security-grid .security-cell:not(.is-wide) { border-bottom: 1px solid var(--edge); }
.security-quote {
  margin-top: 44px; max-width: 720px;
  font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-style: italic; color: var(--ink); line-height: 1.45;
}
.security-quote em { color: var(--amber-glow); font-style: inherit; }
.security-quote footer {
  margin-top: 14px;
  font: 500 0.8rem var(--sans); font-style: normal;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Onboarding
   -------------------------------------------------------------------------- */
.onboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.onboard-step {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
}
.onboard-step .step-no { font-size: 1.5rem; font-family: var(--serif); color: var(--amber-glow); }
.onboard-step h3 { font-size: 1.15rem; margin: 12px 0 8px; }
.onboard-step p { font-size: 0.9rem; }
.onboard-note { margin-top: 30px; font-size: 0.95rem; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   Final CTA with the Czytelnia orb
   -------------------------------------------------------------------------- */
.cta-final { text-align: center; position: relative; overflow: hidden; }
.orb-wrap { display: flex; justify-content: center; margin-bottom: 40px; }
.orb {
  position: relative; width: 148px; height: 148px; border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, var(--amber-glow), var(--amber) 46%, var(--amber-deep) 82%);
  box-shadow:
    0 0 60px 12px rgb(245 158 11 / 0.32),
    0 0 140px 40px rgb(245 158 11 / 0.12);
  animation: breathe 5.5s ease-in-out infinite;
}
.orb::after {
  content: ""; position: absolute; inset: -26px; border-radius: 50%;
  border: 1px solid rgb(245 158 11 / 0.25);
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); box-shadow: 0 0 76px 18px rgb(245 158 11 / 0.4), 0 0 160px 52px rgb(245 158 11 / 0.15); }
}
.cta-final h2 { font-size: clamp(2.1rem, 4vw, 3.1rem); margin-bottom: 16px; }
.cta-final .lede { max-width: 34em; margin: 0 auto 34px; }
.cta-final .hero-cta { justify-content: center; margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Subpages: about, contact, privacy policy, 404
   -------------------------------------------------------------------------- */
.page { padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 88px)); padding-bottom: clamp(76px, 10vw, 128px); }
.page-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 60px); }
.page-head h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); margin-bottom: 18px; }
.page-head h1:focus { outline: none; }
.page-head .lede { font-size: 1.15rem; }

.prose { max-width: 680px; display: grid; gap: 18px; margin-bottom: 56px; }
.prose strong { color: var(--ink); font-weight: 600; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 64px; }

.timeline { position: relative; max-width: 680px; margin-bottom: 64px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, var(--amber), var(--accent), transparent);
}
.timeline li {
  list-style: none; position: relative;
  padding: 0 0 26px 34px;
}
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface-elevated);
  border: 2px solid var(--accent-glow);
}
.timeline li:first-child::before { border-color: var(--amber); background: var(--amber-deep); }
.timeline b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 3px; }
.timeline span { font-size: 0.92rem; }

.stack-note {
  border: 1px solid var(--edge); border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px 26px; max-width: 680px;
  margin-bottom: 44px;
  font-size: 0.95rem;
}
.stack-note b { color: var(--ink); }

/* Legal prose (privacy policy) — long-form text, numbered sections, definition lists. */
.legal { max-width: 720px; }
.legal h2 {
  font-size: 1.5rem; margin: 44px 0 14px;
  padding-top: 22px; border-top: 1px solid var(--edge);
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { font-size: 1.12rem; margin: 24px 0 8px; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 22px; display: grid; gap: 8px; }
.legal li { font-size: 0.97rem; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .legal-meta {
  font-size: 0.85rem; color: var(--ink-faint);
  border: 1px dashed var(--edge-strong); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 34px;
}

/* Contact */
.contact-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}
.form {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  display: grid; gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label { font: 600 0.85rem var(--sans); color: var(--ink); }
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: 400 0.98rem var(--sans);
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-glow);
  box-shadow: 0 0 0 3px rgb(110 86 207 / 0.25);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.consent { display: flex; gap: 11px; align-items: flex-start; font-size: 0.85rem; color: var(--ink-faint); }
.consent input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--amber); flex: none; }
.form-note { font-size: 0.8rem; color: var(--ink-faint); }
.form-success {
  border: 1px solid rgb(245 158 11 / 0.4);
  background: rgb(245 158 11 / 0.07);
  border-radius: var(--radius);
  padding: 22px 24px;
  color: var(--ink);
}
.form-success b { color: var(--amber-glow); }
.form-success:focus { outline: none; }

/* The submit-state line: empty and silent until something happens, then announced
   through aria-live. Errors keep the typed message on screen — the point is that a
   network failure must never cost someone the text they just wrote. */
.form-status:empty { display: none; }
.form-status {
  font-size: 0.9rem; border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--edge-strong); color: var(--ink-muted);
}
.form-status[data-state="error"] { border-color: rgb(248 113 113 / 0.45); color: #fca5a5; background: rgb(248 113 113 / 0.07); }
.form-status[data-state="sending"] { border-color: rgb(110 86 207 / 0.45); color: var(--accent-glow); }

/* The honeypot: off-screen rather than display:none, because some bots skip hidden
   fields but happily fill positioned ones. Never announced, never tab-reachable. */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* Live form vs mailto fallback. `config.js` (a <head> script, so this settles before
   first paint — no flash) adds `.contact-live` to <html> when CONTACT_FORM_ENABLED is
   on. Without JS, or with the flag off, the form stays hidden and the mailto panel
   carries the same information: how to reach us. */
#contact-form { display: none; }
.contact-live #contact-form { display: grid; }
.contact-live #contact-fallback { display: none; }
.contact-fallback {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  display: grid; gap: 14px;
}
.contact-fallback h2 { font-size: 1.35rem; }
.contact-fallback .mono { font-family: var(--mono); font-size: 1.05rem; color: var(--amber); }

.contact-aside { display: grid; gap: 20px; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.contact-card p { font-size: 0.92rem; }
.contact-card .mono { font-family: var(--mono); font-size: 0.9rem; color: var(--amber); }

/* 404 */
.error-page { text-align: center; min-height: 62svh; display: grid; align-content: center; }
.error-code {
  font: 500 clamp(3.4rem, 12vw, 6rem) var(--serif);
  color: var(--amber-glow);
  text-shadow: 0 0 44px rgb(245 158 11 / 0.3);
  line-height: 1;
}
.error-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 18px 0 14px; }
.error-page .lede { max-width: 30em; margin: 0 auto 30px; }
.error-page .hero-cta { justify-content: center; margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--edge);
  background: var(--surface);
  padding: 52px 0 40px;
}
.footer-grid {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: flex-start; justify-content: space-between;
  margin-bottom: 36px;
}
.footer .brand { font-size: 1.15rem; margin: 0; }
.footer-tagline { margin-top: 10px; font-size: 0.9rem; color: var(--ink-faint); max-width: 26em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer-nav a { color: var(--ink-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--ink); }
.footer-fine {
  border-top: 1px solid var(--edge); padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between;
  font-size: 0.8rem; color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 34px 26px; }
  .step::before { right: 0; }
  .onboard { grid-template-columns: repeat(2, 1fr); }
  .security-grid { grid-template-columns: repeat(2, 1fr); }
  .security-cell:nth-child(3n) { border-right: 1px solid var(--edge); }
  .security-cell:nth-child(2n) { border-right: 0; }
  .security-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--edge); }
  .security-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .metaphor-grid { grid-template-columns: 1fr 1fr; gap: 0; }
  .metaphor-item { padding-block: 18px; }
  .metaphor-item:nth-child(3) { border-left: 0; }
  .metaphor-item:nth-child(-n+2) { border-bottom: 1px solid var(--edge); }
}

@media (max-width: 940px) {
  .nav-links, .nav .btn, .nav-login { display: none; }
  .burger { display: block; }
  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero::before {
    background:
      radial-gradient(90% 55% at 50% 30%, rgb(11 10 15 / 0.9), rgb(11 10 15 / 0.5) 66%, transparent 100%),
      linear-gradient(180deg, rgb(11 10 15 / 0.55), transparent 25%, transparent 72%, var(--bg));
  }
  .hero-hint { display: none; }
  .roles, .contact-grid, .values { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .cards, .steps, .onboard, .security-grid, .metaphor-grid { grid-template-columns: 1fr; }
  .metaphor-item { border-left: 0 !important; padding-inline: 4px; }
  .metaphor-item + .metaphor-item { border-top: 1px solid var(--edge); }
  .metaphor-item:nth-child(-n+2) { border-bottom: 0; }
  .security-cell { border-right: 0 !important; border-bottom: 1px solid var(--edge) !important; }
  .security-cell:last-child { border-bottom: 0 !important; }
  .demo-body { height: 300px; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   Reduced motion — static field, no typing loop, no pulse
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
