/* bizomics.com: one stylesheet for the whole site.
 *
 * Tokens: copied from web2/app/globals.css on 2026-12-03; BO-3350 will generate this file.
 * Names follow docs/plans/PLAN-website-design-system.md §3 (ADR-058 target names;
 * `bz-` for Bizomics-only, `bz-site-` for marketing-only). Contrast fixes from
 * that plan's §6 are applied: muted-foreground #646b78, input #918d83.
 */

/* ---------- 1. Tokens ---------- */
:root {
  /* Chrome (light values, reused verbatim from the app: plan §3.2) */
  --background: #f6f4ee;        /* app: paper */
  --card: #ffffff;              /* app: paper-2 */
  --muted: #fbfaf6;             /* app: paper-3 (surface) */
  --secondary: #f0ede5;         /* app: paper-4 */
  --foreground: #0b0e13;        /* app: ink */
  --foreground-2: #2a313c;      /* app: ink-2 */
  --muted-foreground: #646b78;  /* app: muted, contrast-fixed (plan §6.1) */
  --primary: #2b4aa0;           /* app: accent: the only brand colour */
  --primary-hover: #3a5cba;     /* app: accent-2 */
  --on-primary: #ffffff;        /* app: on-accent (approved) */
  --accent: #e6ecf8;            /* app: accent-soft (surface) */
  --border: #e6e4de;            /* app: rule (decorative hairline) */
  --border-strong: #cfccc4;     /* app: rule-2 */
  --input: #918d83;             /* new input border, contrast-fixed (plan §6.1) */
  --ring: #2b4aa0;              /* app: focus-ring */
  --success: #1f7a4c;
  --success-soft: #e3f2e9;
  --warning: #b45309;
  --warning-soft: #fdf3dc;
  --destructive: #a3341d;
  --destructive-soft: #fbe7e0;

  /* Radii (approved values, plan §3.2 / G1) */
  --bz-radius-tag: 4px;
  --bz-radius-btn: 8px;
  --bz-radius-control: 8px;
  --bz-radius-card: 10px;

  /* Families */
  --bz-font-display: "Instrument Serif", "Instrument Serif Fallback", Georgia, "Times New Roman", serif;
  --bz-font-text: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bz-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Night panel (plan §3.3; values from web2/components/layout/AuthBrandLayout.tsx) */
  --bz-night-surface: radial-gradient(ellipse at 50% 42%, #18223a 0%, #0c0f15 64%);
  --bz-night-base: #0c0f15;
  --bz-night-foreground: #eef0f3;
  --bz-night-foreground-2: #c3cad6;
  --bz-night-emphasis: #a9bdf2;
  --bz-night-headline: #f4f6f9;
  --bz-night-ring: #e7ecf7;

  /* Site type scale (plan §3.3) */
  --bz-site-display-1: clamp(40px, 5.2vw, 72px);
  --bz-site-display-2: clamp(32px, 3.6vw, 48px);
  --bz-site-heading-3: 24px;
  --bz-site-lead: 20px;
  --bz-site-body: 17px;
  --bz-site-kicker: 12px;

  /* Site layout (plan §3.3) */
  --bz-site-section-y: 64px;
  --bz-site-container: 1140px;
  --bz-site-gutter: 16px;
  --bz-site-prose: 68ch;
}

@media (min-width: 768px) {
  :root { --bz-site-section-y: 96px; --bz-site-gutter: 24px; }
}
@media (min-width: 1200px) {
  :root { --bz-site-section-y: 128px; }
}

/* ---------- 2. Fonts (self-hosted, Latin subset, OFL: see fonts/LICENSE-*.txt) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
}
/* Metric-matched fallbacks so the swap barely moves the layout (CLS, plan §6.3). */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
  size-adjust: 107.06%;
}
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Times New Roman"), local("Times");
  ascent-override: 102%;
  descent-override: 26%;
  line-gap-override: 0%;
  size-adjust: 92%;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%; /* 16 px root: respects the reader's own text-size setting */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--bz-font-text);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p, ul, ol, dl { margin: 0; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 2px;
}
.night :focus-visible { outline-color: var(--bz-night-emphasis); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--foreground);
  color: var(--background);
  border-radius: var(--bz-radius-btn);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--background); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- 4. Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--bz-site-container) + 2 * var(--bz-site-gutter));
  margin-inline: auto;
  padding-inline: var(--bz-site-gutter);
}

.section { padding-block: var(--bz-site-section-y); }
.section--tint { background: var(--secondary); }
.section--card { background: var(--card); border-block: 1px solid var(--border); }

.section-head { max-width: 760px; margin-bottom: 40px; }
@media (min-width: 768px) { .section-head { margin-bottom: 56px; } }

/* ---------- 5. Type ---------- */
.kicker {
  display: block;
  font-family: var(--bz-font-mono);
  font-size: var(--bz-site-kicker);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}
.night .kicker { color: var(--bz-night-foreground-2); }

.display-1 {
  font-family: var(--bz-font-display);
  font-size: var(--bz-site-display-1);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.display-2, .prose h2 {
  font-family: var(--bz-font-display);
  font-size: var(--bz-site-display-2);
  line-height: 1.08;
  letter-spacing: -0.005em;
}
.display-1 em, .display-2 em { font-style: italic; }

.heading-3 {
  font-family: var(--bz-font-text);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
}
@media (min-width: 768px) { .heading-3 { font-size: var(--bz-site-heading-3); line-height: 1.25; } }

.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--foreground-2);
  margin-top: 20px;
}
@media (min-width: 768px) { .lead { font-size: var(--bz-site-lead); line-height: 1.5; } }

.body { font-size: var(--bz-site-body); line-height: 1.6; color: var(--foreground-2); }
.small { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--bz-radius-btn);
  border: 1px solid transparent;
  font-family: var(--bz-font-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn--secondary { background: var(--card); color: var(--foreground); border-color: var(--input); }
.btn--secondary:hover { background: var(--muted); color: var(--foreground); border-color: var(--foreground-2); }
.btn--quiet { color: var(--foreground); padding-inline: 12px; }
.btn--quiet:hover { color: var(--primary); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }

/* On the night surface the primary is light (accent on night is too dark to read as a button). */
.night .btn--primary { background: var(--bz-night-foreground); color: var(--foreground); }
.night .btn--primary:hover { background: #ffffff; color: var(--foreground); }
.night .btn--secondary { background: transparent; color: var(--bz-night-foreground); border-color: var(--bz-night-foreground-2); }
.night .btn--secondary:hover { background: rgba(238, 240, 243, 0.08); color: #ffffff; border-color: var(--bz-night-foreground); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 479px) {
  .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- 7. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 238, 0.94);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(246, 244, 238, 0.82); backdrop-filter: saturate(1.4) blur(8px); }
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  text-decoration: none;
  font-family: var(--bz-font-display);
  font-size: 24px;
  line-height: 1;
  min-height: 44px;
}
.brand:hover { color: var(--foreground); }
.ring-icon { display: block; width: 28px; height: 28px; flex: none; color: var(--foreground); }
.ring-icon img, .ring-hero img { width: 100%; height: 100%; }

.nav-desktop { display: none; margin-left: auto; }
.nav-desktop ul { list-style: none; padding: 0; display: flex; gap: 4px; }
.nav-desktop a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--foreground-2); text-decoration: none; font-size: 15px;
}
.nav-desktop a:hover { color: var(--primary); }
.nav-desktop a[aria-current="page"] { color: var(--foreground); font-weight: 600; }
.header-actions { display: none; gap: 8px; align-items: center; }

.menu { margin-left: auto; }
.menu > summary {
  list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--input);
  border-radius: var(--bz-radius-btn);
  background: var(--card);
  font-weight: 600; font-size: 15px;
  cursor: pointer;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu-bars { display: block; width: 16px; height: 10px; position: relative; }
.menu-bars::before, .menu-bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px;
}
.menu-bars::before { top: 0; }
.menu-bars::after { bottom: 0; }
.menu[open] .menu-bars::before { top: 4px; transform: rotate(45deg); }
.menu[open] .menu-bars::after { bottom: 4px; transform: rotate(-45deg); }
.menu-panel {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--background);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 12px 24px -12px rgba(11, 14, 19, 0.18);
  padding: 8px var(--bz-site-gutter) 20px;
}
.menu-panel ul { list-style: none; padding: 0; }
.menu-panel li a {
  display: flex; align-items: center; min-height: 48px;
  color: var(--foreground); text-decoration: none; font-size: 17px;
  border-bottom: 1px solid var(--border);
}
.menu-panel .btn-row { margin-top: 20px; }
.menu-panel .btn-row .btn { flex: 1 1 100%; }

@media (min-width: 960px) {
  .nav-desktop { display: block; }
  .header-actions { display: flex; }
  .menu { display: none; }
}

/* ---------- 8. Night bands (hero + closing CTA) ---------- */
.night {
  background: var(--bz-night-base);
  background-image: var(--bz-night-surface);
  color: var(--bz-night-foreground);
}
.night a:not(.btn) { color: var(--bz-night-emphasis); }

.hero { padding-block: 56px 64px; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { color: var(--bz-night-headline); max-width: 14ch; }
.hero h1 em { color: var(--bz-night-emphasis); }
.hero .lead { color: var(--bz-night-foreground); max-width: 34em; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--bz-night-foreground-2); }
.hero-ring { display: grid; place-items: center; }
.ring-hero {
  display: block;
  width: 220px; height: 220px;
  color: var(--bz-night-ring);
}
@media (min-width: 768px) {
  .hero { padding-block: 88px 96px; }
  .ring-hero { width: 300px; height: 300px; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
  .hero { padding-block: 112px 120px; }
  .ring-hero { width: 400px; height: 400px; }
}

.cta-band { text-align: left; }
.cta-band h2 { color: var(--bz-night-headline); max-width: 18ch; }
.cta-band .lead { color: var(--bz-night-foreground); max-width: 34em; }
.cta-grid { display: grid; gap: 32px; align-items: center; }
.cta-ring { display: none; }
@media (min-width: 960px) {
  .cta-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .cta-ring { display: block; width: 160px; height: 160px; color: var(--bz-night-ring); }
}

/* ---------- 9. Cards and grids ---------- */
.grid-3, .grid-2, .grid-4 { display: grid; gap: 16px; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (min-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--bz-radius-card);
  padding: 24px;
}
@media (min-width: 768px) { .card { padding: 28px; } }
.card .heading-3 { margin-bottom: 10px; }
.card p { color: var(--foreground-2); }
.card .num {
  display: block;
  font-family: var(--bz-font-mono);
  font-size: var(--bz-site-kicker);
  letter-spacing: 0.14em;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

/* Live / Next badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: var(--bz-radius-tag);
  font-family: var(--bz-font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--live { background: var(--success-soft); color: var(--success); }
.badge--next { background: var(--accent); color: var(--primary); }
.badge--next::before { background: transparent; border: 1.5px solid currentColor; width: 7px; height: 7px; }

/* ---------- 10. Problem / promise ---------- */
.promise {
  font-family: var(--bz-font-display);
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.1;
  max-width: 22ch;
}
.promise-body { margin-top: 28px; max-width: 40em; }
.promise-grid { display: grid; gap: 28px; }
@media (min-width: 960px) {
  .promise-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: end; }
  .promise-body { margin-top: 0; }
}

/* ---------- 11. Steps (How it works) ---------- */
.steps { list-style: none; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-top .num { margin: 0; }
.step--next { background: var(--muted); border-style: dashed; border-color: var(--border-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; align-items: center; }
.legend span.small { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- 12. Triple diagram ---------- */
.triple-block {
  margin-top: 56px;
  display: grid;
  gap: 28px;
}
@media (min-width: 960px) {
  .triple-block { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; margin-top: 80px; }
}
.triple-figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--bz-radius-card);
  padding: 24px 20px;
}
@media (min-width: 768px) { .triple-figure { padding: 32px; } }
.triple { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.triple-sentence + .triple { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border-strong); }
.concept {
  display: block;
  border: 1.5px solid var(--foreground);
  border-radius: var(--bz-radius-control);
  padding: 10px 14px;
  background: var(--card);
}
.concept small, .link small {
  display: block;
  font-family: var(--bz-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  line-height: 1.3;
}
.concept strong { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; }
.link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0 8px 18px;
  margin-left: 14px;
  border-left: 2px solid var(--primary);
  color: var(--primary);
}
.link strong { font-weight: 600; font-size: 16px; }
.link small { color: var(--primary); opacity: 1; }
.link-arrow { font-size: 18px; line-height: 1; }
@media (min-width: 640px) {
  .triple { flex-direction: row; align-items: center; }
  .concept { flex: 1 1 0; min-width: 0; }
  .link {
    flex: 0 0 auto; flex-direction: column; gap: 2px;
    margin: 0; padding: 0 10px; border: 0; text-align: center; position: relative;
  }
  .link::after {
    content: ""; display: block; width: 100%; min-width: 80px; height: 2px; margin-top: 6px;
    background: var(--primary);
  }
  .link::before {
    content: ""; position: absolute; right: 8px; bottom: -4px;
    border-left: 8px solid var(--primary); border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  }
  .link-arrow { display: none; }
}
.triple-sentence {
  margin-top: 12px;
  font-family: var(--bz-font-display);
  font-size: 22px;
  line-height: 1.25;
  color: var(--foreground);
}
.triple-sentence b { font-weight: 400; color: var(--primary); font-style: italic; }
.triple-figure figcaption { margin-top: 20px; }

/* ---------- 13. Context Envelope diagram ---------- */
.envelope-layout { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .envelope-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: start; }
}
.flow { display: grid; gap: 0; }
.flow-node {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--bz-radius-card);
  padding: 16px 20px;
}
.flow-node .small { margin-top: 2px; }
.flow-node strong { font-weight: 600; }
.flow-arrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0 10px 28px;
  margin-left: 0;
  font-family: var(--bz-font-mono);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-foreground);
  position: relative;
}
.flow-arrow::before {
  content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--border-strong);
}
.flow-arrow span { padding-left: 12px; }
.envelope {
  background: var(--card);
  border: 1.5px solid var(--foreground);
  border-radius: var(--bz-radius-card);
  overflow: hidden;
}
.envelope-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--foreground);
  color: var(--background);
  font-family: var(--bz-font-mono);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
}
.envelope-part { padding: 18px 20px; border-top: 1px solid var(--border); }
.envelope-part:first-of-type { border-top: 0; }
.envelope-part h3 { font-weight: 600; font-size: 17px; display: flex; gap: 10px; align-items: baseline; }
.envelope-part h3 .tag {
  font-family: var(--bz-font-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.envelope-part p { margin-top: 4px; color: var(--foreground-2); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary);
  font-size: 14px; font-weight: 600;
}
.ticks { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 28px; color: var(--foreground-2); font-size: var(--bz-site-body); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* ---------- 14. Trust trio / partners ---------- */
.trio-item { border-top: 2px solid var(--foreground); padding-top: 20px; }
.trio-item p { margin-top: 10px; color: var(--foreground-2); }
.made-in { margin-top: 40px; }

.partner-card h3 { margin-bottom: 10px; }

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--secondary);
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
  font-size: 15px;
}
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
}
.footer-brand p { margin-top: 12px; color: var(--foreground-2); max-width: 30ch; }
.footer-col h2 {
  font-family: var(--bz-font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 10px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col a {
  display: inline-flex; align-items: center; min-height: 36px;
  color: var(--foreground-2); text-decoration: none;
}
.footer-col a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-strong);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  color: var(--muted-foreground); font-size: 14px;
}

/* ---------- 16. Inner pages ---------- */
.page-head { padding-block: 56px 40px; }
@media (min-width: 768px) { .page-head { padding-block: 88px 56px; } }
.page-head h1 { font-family: var(--bz-font-display); font-size: clamp(40px, 4.6vw, 60px); line-height: 1.05; }
.page-head .lead { max-width: 36em; }

.contact-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.contact-card { display: flex; flex-direction: column; gap: 12px; }
.contact-card .btn { align-self: flex-start; margin-top: 8px; }
.contact-card--feature { border-color: var(--foreground); }
.contact-meta { display: grid; gap: 4px; }
.email-big { font-family: var(--bz-font-display); font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }

.prose { max-width: var(--bz-site-prose); font-size: var(--bz-site-body); line-height: 1.65; color: var(--foreground-2); }
.prose h2 { color: var(--foreground); font-size: clamp(28px, 3vw, 36px); margin-top: 56px; margin-bottom: 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { padding-left: 1.25em; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--foreground); font-weight: 600; }
.summary-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--bz-radius-card);
  padding: 20px 24px;
  margin-bottom: 48px;
}
.summary-box ul { margin-top: 10px; }

/* 404 */
.notfound { padding-block: 96px 120px; text-align: center; }
.notfound .ring-moment { width: 120px; height: 120px; margin: 0 auto 32px; color: var(--foreground); }
.notfound h1 { font-family: var(--bz-font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }
.notfound .lead { margin-inline: auto; max-width: 30em; }
.notfound .btn-row { justify-content: center; }

/* ---------- 17. Small utilities ---------- */
.display-3 { font-family: var(--bz-font-display); font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
.spaced { margin-top: 16px; }
.card--muted { background: var(--muted); }
.figure { margin: 0; }
.spaced-lg { margin-top: 32px; }
.contact-section, .privacy-section { padding-top: 0; }

/* ---------- 13. The contact form ---------- */
.request-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) {
  .request-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; }
}
.form { display: grid; gap: 18px; }
.form .btn { justify-self: start; }
.contact-form-block { margin-top: 56px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; color: var(--foreground); }
.field .optional { margin-left: 6px; font-weight: 400; font-size: 13px; color: var(--muted-foreground); }
.field input, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* below 16 px, phones zoom the page when the field is tapped */
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--input);
  border-radius: var(--bz-radius-control);
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-color: var(--ring); }
.field [aria-invalid="true"] { border-color: var(--destructive); }
.form-status:empty { display: none; }
.form-status { font-weight: 600; color: var(--success); }
.form-status.is-error { color: var(--destructive); }

/* ---------- 14. Motion: cards that respond, sections that arrive, the ring behind the page ---------- */
/* Everything here is opacity and transform only, and switches off for readers who
   ask for reduced motion. With JavaScript off, nothing is hidden and nothing moves. */
.card { transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out; }
.card .num, .card .heading-3 { transition: color 180ms ease-out; }
@media (hover: hover) {
  .card:not(.form):hover { border-color: var(--border-strong); box-shadow: 0 14px 30px -14px rgba(11, 14, 19, 0.22); }
  .card:not(.form):hover .num { color: var(--primary); }
  .card:not(.form):hover .heading-3 { color: var(--primary); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:not(.form):hover { transform: translateY(-4px); }
}

/* Arrive on scroll. site.js adds .reveal only to things still below the screen, so
   nothing already in view ever blinks, then .is-in as each one scrolls into view. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 520ms ease-out, transform 520ms ease-out;
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* The hero ring grows and fades as the hero scrolls away (site.js sets --hero-p, 0 to 1)... */
@media (prefers-reduced-motion: no-preference) {
  .hero-ring {
    transform: translateY(calc(var(--hero-p, 0) * 70px)) scale(calc(1 + var(--hero-p, 0) * 0.55));
    opacity: calc(1 - var(--hero-p, 0) * 0.9);
  }
}
/* ...and returns as a large, faint ring behind the rest of the page, turning slowly and
   shimmering. It sits above the section backgrounds and below all content. */
.bg-ring {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms ease-out;
}
.bg-ring.is-on { opacity: 1; }
@media (max-width: 767px) { .bg-ring.is-on { opacity: 0.6; } } /* on a phone it sits behind text, so quieter */
.bg-ring img {
  position: absolute;
  top: 50%;
  right: -16vmin;
  width: min(112vmin, 1040px);
  height: auto;
  aspect-ratio: 1;
  translate: 0 -50%;
  opacity: 0.06;
}
.bg-ring img + img { rotate: 11deg; scale: 1.04; opacity: 0.035; }
@media (prefers-reduced-motion: no-preference) {
  .bg-ring img { animation: bg-ring-turn 260s linear infinite, bg-ring-shimmer 7s ease-in-out infinite alternate; }
  .bg-ring img + img { animation: bg-ring-turn-back 340s linear infinite, bg-ring-shimmer-2 5.3s ease-in-out infinite alternate; }
}
@keyframes bg-ring-turn { to { rotate: 360deg; } }
@keyframes bg-ring-turn-back { from { rotate: 11deg; } to { rotate: -349deg; } }
@keyframes bg-ring-shimmer { from { opacity: 0.035; } to { opacity: 0.08; } }
@keyframes bg-ring-shimmer-2 { from { opacity: 0.06; } to { opacity: 0.015; } }
/* Content rides above the background ring. */
main .container, .site-footer .container { position: relative; z-index: 1; }
