/* ═══════════════════════════════════════════════════════════
   ADVENNT — base.css
   Reset · Page shell · Grid (12-col) · Type scale · Link defaults
   Authority: AD-DESIGN-LANGUAGE-V1 §3 A5, BRIEF-3 §3.
   Loaded AFTER tokens.css and BEFORE components.css.
   Zero hex literals — every colour/size/spacing reference is var(--*).
   ═══════════════════════════════════════════════════════════ */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

:root { font-size: var(--font-size-base); }   /* cure defect 5 — root type scale */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: var(--line-height-relaxed);
  overflow-x: hidden;                  /* defect 7 — right-edge scroll cure */
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Page shell (cures defects 1, 2, 4, 7) ── */
.container,
main.container,
.jurisdiction-page-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--px);
  padding-right: var(--px);
}

main,
footer {
  width: 100%;
}

.section { padding: var(--space-10) 0; }
.section + .section { padding-top: 0; }

/* ── Grid (12-col, cures defect 3) ── */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: var(--grid-gap);
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}

.col-3  { grid-column: span 3;  }
.col-4  { grid-column: span 4;  }
.col-6  { grid-column: span 6;  }
.col-8  { grid-column: span 8;  }
.col-12 { grid-column: span 12; }

@media (max-width: 720px) {
  .col-3, .col-4, .col-6, .col-8, .col-12 { grid-column: span 1; }
}

/* Legacy grid helpers retained for backwards-compat with current markup. */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Type scale + heading hierarchy (cures defect 5) ── */
h1, .h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  color: var(--text);
  margin-bottom: var(--space-4);
}

h2, .h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: var(--space-3);
}

h3, .h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: var(--space-3);
}

h4, .h4 {
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  margin-bottom: var(--space-2);
}

h5, .h5 {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-medium);
  color: var(--text);
  margin-bottom: var(--space-2);
}

.eyebrow,
.section-label {
  font-family: var(--mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
