/* Base typography, layout primitives and accessibility helpers. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--sp-4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--c-heading);
}
h1, .h1 { font-size: var(--fs-h1); font-weight: 800; }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }

a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color var(--t); }
a:hover { color: var(--c-primary-hover); }

img { max-width: 100%; height: auto; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 2000;
  background: var(--c-deep); color: #fff; padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

.visually-hidden-focusable:not(:focus):not(:focus-within) { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; }

/* Layout */
.ds-container { width: 100%; max-width: calc(var(--container) + 2 * var(--sp-5)); margin-inline: auto; padding-inline: var(--sp-5); }
.ds-narrow { max-width: calc(var(--container-narrow) + 2 * var(--sp-5)); }
@media (max-width: 575.98px) { .ds-container { padding-inline: var(--sp-4); } }

.section { padding-block: var(--sp-8); }
.section-sm { padding-block: var(--sp-7); }
.section-tint { background: var(--c-tint-1); }
.section-surface { background: var(--c-surface); }
.section-deep { background: var(--c-deep); color: var(--c-text-on-dark); }
.section-deep h1, .section-deep h2, .section-deep h3, .section-deep h4 { color: #fff; }
@media (max-width: 767.98px) { .section { padding-block: var(--sp-7); } }

.grid-3 { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.grid-4 { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.stack > * + * { margin-top: var(--sp-4); }

/* Text utilities */
.lead { font-size: var(--fs-lead); color: var(--c-text-muted); font-weight: 400; }
.text-muted-ds { color: var(--c-text-muted) !important; }
.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-primary); margin-bottom: var(--sp-2);
}
.section-deep .eyebrow { color: var(--c-accent-on-dark); }
.fw-800 { font-weight: 800 !important; }
.tabular { font-variant-numeric: tabular-nums; }
