/* ============================================================================
   Base — reset, typography, layout primitives
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}

/* A fixed, fine vertical grain so the navy is never flat — matches the
   firm's quiet, low-glare surface without looking like a "dark mode". */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(138,170,214,0.06), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}

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

a { color: inherit; text-decoration: none; }
::selection { background: rgba(138, 170, 214, 0.22); }

/* --- Headings: serif display, tight, understated --- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: var(--lh-tight);
  letter-spacing: 0.005em; color: var(--text); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-family: var(--sans); font-weight: 600; font-size: var(--fs-h4);
  line-height: var(--lh-snug); letter-spacing: 0.005em; }

p { max-width: var(--wrap-rd); }
strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }

/* Eyebrow / section label — letter-spaced uppercase sans, echoes the wordmark */
.eyebrow {
  font-family: var(--sans); font-weight: 500; font-size: var(--fs-eyebrow);
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--steel);
}

/* --- Links in prose --- */
.prose a:not(.btn) {
  color: var(--text); border-bottom: 1px solid var(--steel-line);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.prose a:not(.btn):hover { border-bottom-color: var(--steel); color: #fff; }

/* --- Reading rhythm --- */
.prose > * + * { margin-top: var(--s4); }
.prose h2 { margin-top: var(--s7); }
.prose h3 { margin-top: var(--s6); }
.prose h4 { margin-top: var(--s5); }
.prose p, .prose li { color: var(--text-2); }
.prose p { font-size: var(--fs-body); }
.prose .lead { font-size: var(--fs-lead); color: var(--text); line-height: var(--lh-snug);
  max-width: var(--wrap-rd); }

.prose ul, .prose ol { padding-left: 1.3em; max-width: var(--wrap-rd); }
.prose li + li { margin-top: var(--s2); }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.4em; }
.prose ul > li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border: 1px solid var(--steel); transform: rotate(45deg);
}

code, kbd, samp { font-family: var(--mono); font-size: 0.9em; }
.prose code {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  padding: 0.08em 0.4em; border-radius: 3px; color: var(--text);
}

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }

/* --- Layout primitives --- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-inline: var(--gut); }
.section { padding-block: var(--s7); }
.measure { max-width: var(--wrap-rd); }

/* Utility */
.muted { color: var(--text-2); }
.fine  { color: var(--text-3); font-size: var(--fs-small); }
.center { text-align: center; }
.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.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;
}

/* Focus visibility for keyboard users */
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; border-radius: 2px; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--panel); color: var(--text); padding: 10px 16px;
  border: 1px solid var(--line-2);
}
.skip-link:focus { left: 8px; top: 8px; }
