/* ============================================================
   base.css — reset, typography, layout primitives
   Mobile-first. One <h1> per page; h1→h6 sequential.
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--grad-page);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  /* room for the sticky Book bar so content never hides behind it */
  padding-bottom: var(--cta-h);
}
body.modal-open { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
  border-radius: 6px;
}

ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent-strong); color: #fff; }

/* ---------- Skip link (keyboard a11y) ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: var(--z-modal);
  background: var(--accent-strong); color: #fff;
  padding: 10px 18px; border-radius: var(--r-pill); font-weight: 700;
  transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------- Typography ----------
   Large type is lightened (300/400) so it reads calm and premium and
   lets the gradient words pop harder against it. H2/H3 stay punchy —
   they do the page's scanning work (clear hierarchy, lower load). */
h1, .h1 { font-size: var(--fs-h1); font-weight: 300; line-height: 1.04; letter-spacing: -0.025em; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h4, .h4 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: 0.01em; }
.display { font-size: var(--fs-display); font-weight: 300; line-height: 1.0; letter-spacing: -0.035em; }
/* gradient words inside light headings carry their own weight */
h1 .grad-text, .h1 .grad-text, .display .grad-text { font-weight: 700; }

p { width: min(100%, var(--measure)); }
.lead {
  font-size: var(--fs-lead); color: var(--ink-soft);
  font-weight: 400; line-height: 1.55; width: min(100%, var(--measure-lead));
}
.eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--accent); display: inline-block;
}
.eyebrow.center::before { display: none; }
.muted { color: var(--ink-soft); }
.meta { font-size: var(--fs-meta); color: var(--ink-faint); font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums; }

/* gradient text accent for hero words */
.grad-text {
  background: var(--grad-violet);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--maxw-wide); }
.container-narrow { max-width: 860px; }
.section { padding-block: var(--section-y); }
.section-tight { padding-block: var(--section-y-tight); }
.section-alt { background: var(--bg-1); }
.center { text-align: center; }
.center .lead, .center p { margin-inline: auto; }
.stack > * + * { margin-top: var(--sp-04); }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; }
.section-head h2 { margin-top: var(--sp-03); }
.section-head .lead { margin-top: var(--sp-04); }

/* Brand logo image (header, footer, drawer) — bigger masthead in header */
.brand-logo { height: 26px; width: auto; display: block; }
.site-footer .brand-logo { height: 36px; }
.drawer .brand-logo { height: 20px; }

/* Grids — gaps stepped up one notch so content breathes (whitespace rule) */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

/* Breadcrumb */
/* Breadcrumb: sits in its own contrasting bar between header and hero */
.breadcrumb { background: var(--bg-1); border-bottom: 1px solid var(--line); }
.breadcrumb.container { max-width: none; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-size: 14px; color: var(--ink-faint);
  max-width: var(--maxw-wide); margin-inline: auto;
  padding: 14px var(--gutter);
}
.breadcrumb li { display: flex; align-items: center; gap: 10px; }
.breadcrumb li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-dim); display: inline-block; }
.breadcrumb a { color: var(--ink-faint); transition: color var(--t-fast) var(--ease-out); }
.breadcrumb a:hover { color: var(--accent-soft); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Responsive grid collapse */
@media (max-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .cols-2, .cols-3, .split { grid-template-columns: 1fr; }
  .split { gap: 32px; }
}
@media (max-width: 560px) {
  .cols-4 { grid-template-columns: 1fr; }
}

/* Utility */
.hidden { display: none !important; }

/* ---------- Spacing utilities (replace inline margin styles) ----------
   On the 4px scale. Keeps the design system the single source of truth
   instead of hand-typed margins scattered through the markup. */
.mt-2 { margin-top: var(--sp-02); }   /*  8 */
.mt-3 { margin-top: var(--sp-03); }   /* 12 */
.mt-4 { margin-top: var(--sp-04); }   /* 16 */
.mt-5 { margin-top: var(--sp-05); }   /* 24 */
.mt-6 { margin-top: var(--sp-06); }   /* 32 */
.mt-8 { margin-top: var(--sp-08); }   /* 48 */
.mb-3 { margin-bottom: var(--sp-03); }

/* ---------- Measure helpers (line-length rule) ---------- */
.measure        { width: min(100%, var(--measure)); }
.measure-lead   { width: min(100%, var(--measure-lead)); }
.measure-narrow { width: min(100%, var(--measure-narrow)); }
.measure-tight  { width: min(100%, var(--measure-tight)); }
.center .measure, .center .measure-lead,
.center .measure-narrow, .center .measure-tight { margin-inline: auto; }

.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;
}
.full { width: 100%; }
.nowrap { white-space: nowrap; }
