/**
 * Site foundation — mobile-first layout guardrails, motion, accessibility.
 * Loaded on every page before Tailwind (small file, cacheable).
 */

/* ─── Breakpoint reference (Tailwind-aligned) ─────────────────────────
   Default: mobile 0–639px
   sm: 640px  | md: 768px  | lg: 1024px  | xl: 1280px  | 2xl: 1536px
   ─────────────────────────────────────────────────────────────────── */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

/* Prevent common overflow from fixed-width children on 320px viewports */
img,
video,
svg,
canvas {
  max-width: 100%;
}

picture {
  display: contents;
}

/* Minimum touch target ~44px for injected nav controls (WCAG 2.5.5) */
#nav-mobile-toggle {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

/* Focus visibility baseline when pages omit Tailwind ring utilities */
#universal-nav a:focus-visible,
#universal-footer a:focus-visible,
#nav-panel a:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 3px;
}

/* Respect reduced motion: marquees / infinite CSS (nav.js adds .rc-motion-ok) */
@media (prefers-reduced-motion: reduce) {
  .marquee-content,
  .global-sponsor-track {
    animation: none !important;
  }

  .hero-slider img {
    transition: none !important;
  }
}
