/* ═══════════════════════════════════════════════════════
   Deschutes Driver Education — Custom Styles
   ═══════════════════════════════════════════════════════ */

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
  .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
  .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
  .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Fallback: always visible if JS disabled */
.no-js .scroll-reveal,
html:not(.js-enabled) .scroll-reveal {
  opacity: 1;
  transform: none;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1823; }
::-webkit-scrollbar-thumb { background: #34518c; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #cf9b1e; }

/* ── Selection color ── */
::selection { background: #cf9b1e; color: #0d1823; }

/* ── Smooth focus outlines ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #cf9b1e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Nav link underline on hover ── */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #f4dfa4;
  transition: width 0.2s ease, left 0.2s ease;
}
.nav-link:hover::after {
  width: 60%;
  left: 20%;
}

/* ── Hero floating card subtle float animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.hero-float-1 { animation: float 4s ease-in-out infinite; }
.hero-float-2 { animation: float 5s ease-in-out infinite 0.5s; }
.hero-float-3 { animation: float 4.5s ease-in-out infinite 1s; }
.hero-float-4 { animation: float 3.5s ease-in-out infinite 0.3s; }

/* ── Mobile menu transition ── */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}
