/* ==========================================================================
   Base — reset, typography, generic elements
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-hero);
  font-weight: var(--fw-extrabold);
}

h2 {
  font-size: var(--fs-3xl);
}

h3 {
  font-size: var(--fs-xl);
}

h4 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
}

p {
  color: var(--color-text-muted);
  line-height: var(--lh-normal);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input,
textarea,
select {
  border: none;
  background: none;
}

/* Focus visibility — WCAG AA */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-sm);
  z-index: 1000;
  background: var(--color-dark);
  color: #fff;
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-sm);
}

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

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

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

.section--dark {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-2xl);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section--dark .eyebrow {
  color: var(--color-cyan);
}

.section-head p {
  margin-top: var(--space-sm);
  font-size: var(--fs-md);
}

.section--dark .section-head p {
  color: var(--color-text-on-dark-muted);
}

.section--dark p {
  color: var(--color-text-on-dark-muted);
}

.section--dark strong {
  color: var(--color-text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-text-on-dark);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.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;
}
