/* ============================================
   Carbondale High School Lifesavers
   Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

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

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
}

/* --- Navbar --- */
#navbar {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 81, 50, 0.08);
}

#navbar.scrolled {
  background: rgba(250, 248, 245, 0.97);
  box-shadow: 0 1px 20px rgba(15, 81, 50, 0.08);
}

/* --- Card Elevate --- */
.card-elevate {
  box-shadow: 0 1px 3px rgba(15, 81, 50, 0.06), 0 4px 16px rgba(15, 81, 50, 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-elevate:hover {
  box-shadow: 0 4px 12px rgba(15, 81, 50, 0.1), 0 16px 40px rgba(15, 81, 50, 0.08);
  transform: translateY(-4px);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }

  .reveal.revealed {
    opacity: 1;
    transform: none;
  }

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* --- Floating Cards Animation --- */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@keyframes float-fast {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.animate-float-slow {
  animation: float-slow 5s ease-in-out infinite;
}

.animate-float-medium {
  animation: float-medium 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

.animate-float-fast {
  animation: float-fast 3.5s ease-in-out infinite;
  animation-delay: 1s;
}

/* --- Scroll Line --- */
@keyframes scroll-line {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
  animation: scroll-line 1.8s ease-in-out infinite;
}

/* --- Mobile Menu --- */
.mobile-link {
  display: block;
}

/* --- Form Select Arrow --- */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230F5132' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
}

/* --- Selection --- */
::selection {
  background: rgba(15, 81, 50, 0.15);
  color: #0a3523;
}

/* --- Focus visible --- */
:focus-visible {
  outline: 2px solid #0F5132;
  outline-offset: 2px;
}

/* --- Responsive tweaks --- */
@media (max-width: 767px) {
  .font-serif {
    font-size: 2rem;
    line-height: 1.15;
  }
}
