/* ─────────────────────────────────────────────────────────────────────────
   Constraint Fix — component + page styles
   Built on the tokens in tokens.css. No hex codes in this file (by rule).
   Plain CSS on plain HTML: no JavaScript, no build step.
   Sections:
     1. Reset + base           (from the design-system source of truth)
     2. Buttons + nav          (design-system components used by the page)
     3. Landing primitives     (.lp .w .kk .cr .dh — from the export)
     4. Local additions        (skip link, anchor offsets, responsive)
   ───────────────────────────────────────────────────────────────────────── */

/* 1. Reset + base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

p { margin: 0 0 var(--space-3); }

/* Body links use accent-700 for a ≥ 4.5:1 ratio on --color-bg
   (the lighter --color-accent clears large text only). */
a { color: var(--color-accent-700); text-underline-offset: 3px; }

img { display: block; max-width: 100%; }
figure { margin: 0; }

.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent-700); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.hr { height: 1px; border: 0; margin: var(--space-4) 0; background: var(--color-divider); }

/* 2. Buttons + nav ───────────────────────────────────────────────────── */
/* "Blueprint frame" look: square, hairline-bordered. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-divider);
  border-radius: 0;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-600); border-color: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); border-color: var(--color-accent-700); }

.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
}
.nav-brand {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 18px;
  margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent-700); }

/* 3. Landing primitives (from the export's second style block) ────────── */
.lp { color: var(--color-text); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
.lp * { box-sizing: border-box; }

.w { max-width: 1040px; margin: 0 auto; padding: 0 48px; }

.kk {
  display: block;
  font-size: 13px;
  line-height: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-accent-700);
  font-feature-settings: "tnum" 1;
  margin: 0 0 12px;
}

.cr { height: 1px; border: 0; margin: 0 0 28px; background: var(--color-divider); }

.dh {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.04;
  margin-left: -0.052em;
}
.dh .ln { display: block; }

/* 4. Local additions ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-heading);
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

section[id] { scroll-margin-top: 80px; }

@media (max-width: 720px) {
  .w { padding: 0 20px; }

  .nav { flex-wrap: wrap; gap: 12px 16px; padding: 12px 20px; }
  .nav .btn { order: 3; }

  /* Collapse every multi-column inline grid to a single column. */
  .lp [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* Let inline horizontal flex rows (the flow diagram) wrap. */
  .lp [style*="display:flex"][style*="align-items:center"] { flex-wrap: wrap; }

  /* Rein in the large display type set inline. */
  .lp [style*="font-size:84px"],
  .lp [style*="font-size:80px"],
  .lp [style*="font-size:72px"] { font-size: clamp(38px, 12vw, 64px) !important; }
  .lp [style*="font-size:56px"],
  .lp [style*="font-size:48px"] { font-size: clamp(34px, 10vw, 48px) !important; }

  /* Full-bleed panel (1b final CTA) — match the reduced page gutter. */
  .lp [style*="margin:0 -48px"] { margin-left: -20px !important; margin-right: -20px !important; }
  .lp [style*="padding:64px 48px"] { padding-left: 24px !important; padding-right: 24px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
