/* ==========================================================================
   RALLY NUTRITION — Base Reset & Accessibility Defaults
   ========================================================================== */

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

html {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  scroll-behavior: auto;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  min-height: 100svh;
  overflow-x: clip;
  line-height: 1.45;
}

body.is-preloading {
  overflow: hidden;
  height: 100svh;
}

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

button,
a {
  font: inherit;
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

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

/* Ensure page remains usable when JS is disabled or fails */
.no-js .preloader {
  display: none !important;
}

.no-js .hero-character {
  opacity: 1 !important;
}

.no-js .hero-canvas-layer,
.no-js .hero-canvas {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
