/* ============================================================
   globals.css — Right of Way Driving School
   Reset, CSS variables, body, typography, shared keyframes
   ============================================================ */

/* --- Self-hosted fonts (Inter, Poppins) --- */
/* Inter: single @font-face covering the full weight range to avoid duplicate
   requests for the same file. Poppins covers 600/700 heading weights. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/poppins-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/poppins-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: #050a14;
  color: #e0e0e0;
  font-family: 'Inter', 'Poppins', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- CSS Variables --- */
:root {
  --r-bg: #050a14;
  --r-accent: #00d4ff;
  --r-purple: #9b51e0;
  --r-text: #ffffff;
  --r-text-muted: #94a3b8;
  --brand-blue: #00d4ff;
  --brand-red: #ff4757;
  --brand-winter: #aefeff;
  --brand-gold: #ffd700;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.8em;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.5em;
}

h4 {
  font-size: 1.25em;
}

h5 {
  font-size: 1.1em;
}

h6 {
  font-size: 1em;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
  color: #e0e0e0;
}

a {
  color: var(--r-accent, #00d4ff);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ffffff;
}

strong {
  color: #ffffff;
  font-weight: 700;
}

/* --- Images --- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Inline icon SVGs (replaces Font Awesome) --- */
.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
  color: inherit;
}
.icon-svg svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Shared Keyframe Animations --- */

@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes neonFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


/* ============================================================
   Accessibility / performance: respect prefers-reduced-motion.
   Decorative animations collapse to their final frame; nothing
   is hidden and no layout changes. JS-driven pieces (fleet
   reveal, carousels) already check this media query themselves.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------
   Accessibility utilities (added 2026-07-25)
   ------------------------------------------------------------------ */

/* Skip link - WCAG 2.4.1 Bypass Blocks. Visible only on keyboard focus. */
.row-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 12px 20px;
  background: #00d4ff;
  color: #050a14;
  font-weight: 700;
  font-size: 15px;
  border-radius: 0 0 10px 0;
  text-decoration: none;
}
.row-skip-link:focus {
  left: 0;
  outline: 3px solid #fff;
  outline-offset: -3px;
}

/* Visually hidden, still announced. Used for headings that keep the
   document outline valid without changing the visual design. */
.row-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
