/* Base Layout */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  color: var(--color-text);
  background: var(--color-bg-fallback);
  background: var(--color-bg);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

/* Scroll Reveal: H2 */
html.js h2 {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

html.js h2.is-inview {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js h2 {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ============================= */
/* Cleanup: Legacy Class Removal */
/* ============================= */
body:has(.c-nav-overlay.is-open) {
  overflow: hidden;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility / Focus States */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Accessibility / Reduced Motion */
@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;
  }
}
