/* Base: reset · typography · layout utilities */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.62 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 64ch; }
[hidden] { display: none !important; }
ul, ol { margin: 0; padding: 0; }

/* ── headings (golden ratio type scale) ── */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-wrap: balance;
  color: var(--text);
}
/* φ-derived scale: h2 × 1.618 ≈ h1 */
h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); letter-spacing: -.015em; line-height: 1.2; }
h4 { font-family: var(--f-body); font-size: var(--font-h4); font-weight: 700; letter-spacing: 0; }

/* ── focus / selection ── */
:focus-visible { outline: 2px solid var(--blue-d); outline-offset: 3px; border-radius: 6px; }
::selection    { background: var(--magenta); color: #fff; }

/* ── skip link ── */
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 16px; border-radius: 12px; background: var(--ink);
  color: #fff; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── layout ── */
.wrap    { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: var(--space); position: relative; }
.section.tight { padding-block: var(--space-tight); }
.view    { min-height: 60vh; }

/* Golden-ratio split: 1fr : φ (≈ 5:8) */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr);
  gap: clamp(24px, 4.5vw, 68px);
  align-items: start;
}

/* card grids */
.cards      { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; perspective: 1200px; }
.cards.two  { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.cards.four { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }

@media (max-width: 980px) {
  .split { grid-template-columns: minmax(0,1fr); gap: 28px; }
}
@media (min-width: 580px) and (max-width: 980px) {
  .cards, .cards.two, .cards.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 580px) {
  .cards, .cards.two, .cards.four { grid-template-columns: minmax(0,1fr); }
}

/* ── type utilities ── */
.lede   { font-size: var(--font-lede); line-height: 1.55; color: var(--text-2); max-width: 60ch; }
.muted  { color: var(--text-2); }
.small  { font-size: var(--font-sm); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .88rem; font-weight: 600; color: var(--text-2);
  margin-bottom: 16px; letter-spacing: .01em;
}
.kicker i { width: 22px; height: 2px; background: var(--iri); border-radius: 2px; }
.head  { display: grid; gap: 14px; max-width: 820px; margin-bottom: var(--sp-5); }
.head p { margin: 0; }

/* gradient text */
.grad {
  background: var(--deep);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* accessible colour aliases */
.c-h { color: var(--magenta-d); }
.c-m { color: var(--blue-d); }
.c-v { color: var(--violet-d); }
.c-o { color: var(--orange-d); }
.c-g { color: var(--mint-d); }
