/* ==========================================================================
   Base — reset, layout primitives, typography
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font: var(--md-sys-type-body-large);
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-background);
  -webkit-font-smoothing: antialiased;
  width: 100%;
}

img { max-width: 100%; display: block; }
svg { flex-shrink: 0; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--space-sm); color: var(--md-sys-color-on-surface); }
h1 { font: var(--md-sys-type-display-large); }
h2 { font: var(--md-sys-type-display-small); }
h3 { font: var(--md-sys-type-title-large); }
h4 { font: var(--md-sys-type-title-medium); }
p { margin: 0 0 var(--space-sm); }
address { font-style: normal; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ---- Focus visibility (accessibility) ---- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: 2px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--md-sys-shape-xs);
  font: var(--md-sys-type-label-large);
  z-index: 1000;
  transition: top var(--md-sys-motion-standard) var(--md-sys-motion-easing);
}
.skip-link:focus {
  top: 1rem;
}

/* ---- Visually hidden (screen-reader only) ---- */
.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;
}

/* ---- Layout ---- */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.container-wide {
  max-width: var(--content-max-wide);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-2xl);
}
.section-compact { padding-block: var(--space-xl); }

@media (max-width: 768px) {
  .section { padding-block: var(--space-xl); }
  .container, .container-wide { padding-inline: var(--space-sm); }
}

.section-header {
  max-width: 760px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}
.section-header p { color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-type-body-large); }
.section-header--start { text-align: left; margin-inline: 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--md-sys-shape-full);
  background: var(--md-sys-color-primary-container);
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
  font: var(--md-sys-type-label-large);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
  margin-bottom: var(--space-sm);
}
.section-label--on-dark { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); color: var(--md-sys-color-inverse-primary); }

.on-dark, .on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--md-sys-color-inverse-on-surface); }
.on-dark p { color: rgba(245, 244, 239, 0.78); }

.text-muted { color: var(--md-sys-color-on-surface-variant); }

.eyebrow { color: var(--md-sys-color-primary); }
