html {
  scroll-behavior: smooth;
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid #ba0013;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(186, 0, 19, 0.18);
}

:where(button, [type="button"], [type="submit"], [type="reset"], a) {
  transition:
    box-shadow 0.2s ease,
    outline-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

body.menu-open {
  overflow: hidden;
}

.form-input-field[aria-invalid="true"] {
  border-color: #ba0013;
}

.form-error:empty::before {
  content: "\00a0";
}

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

/* View Transitions for cross-document page loads */
@view-transition {
  navigation: auto;
}

/* Desktop Navbar Link Underlines */
header nav div.hidden.md\:flex > a,
header nav div.hidden.md\:flex > div.group > a {
  position: relative;
  padding-bottom: 4px;
}
header nav div.hidden.md\:flex > a::after,
header nav div.hidden.md\:flex > div.group > a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #ba0013; /* Primary red */
  transform-origin: bottom center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
header nav div.hidden.md\:flex > a:hover::after,
header nav div.hidden.md\:flex > div.group > a:hover::after {
  transform: scaleX(1);
}

/* Scroll-Driven Entrance Reveals */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Native CSS Scroll-Driven Animation (Chrome, Safari 19+) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal-on-scroll {
      animation: reveal-up both;
      animation-timeline: view();
      animation-range: entry 10% entry 30%;
    }
  }
}

/* Fallback style for JS-driven transitions */
.reveal-on-scroll-fallback {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll-fallback.visible {
  opacity: 1;
  transform: translateY(0);
}

