/* Base — Reset, typography, layout primitives */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-regular);
  font-size: var(--text-body-lg);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--duration-normal) var(--ease-standard),
              color var(--duration-normal) var(--ease-standard);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-2) var(--space-4);
  background: var(--brand-secondary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: var(--space-4);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p {
  max-width: 68ch;
  color: var(--text-muted);
}

a {
  color: var(--brand-primary-bright);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-standard);
}
a:hover { opacity: 0.8; }

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (max-width: 640px) {
  .container { padding-inline: var(--space-4); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--brand-secondary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Section spacing */
.section {
  padding-block: var(--space-16);
}
.section--lg {
  padding-block: var(--space-24);
}

/* Text utilities */
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }

.label-tag {
  display: inline-block;
  font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-secondary);
  margin-bottom: var(--space-3);
}

.section-heading {
  font-size: var(--text-display-sm);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
}

.section-sub {
  font-size: var(--text-body-lg);
  color: var(--text-muted);
  max-width: 56ch;
}

/* Dividers */
hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin-block: var(--space-8);
}

/* Table of contents (legal pages) */
.toc {
  font-size: var(--text-body);
  color: var(--text-muted);
}
.toc a {
  color: var(--text-muted);
  display: block;
  padding: var(--space-1) 0;
}
.toc a:hover { color: var(--brand-secondary); }
