/* ============================================
   Action Snow Removal — Custom Styles
   Leadville, CO | Bold Editorial Design
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* --- Selection --- */
::selection {
  background: #166534;
  color: #fefce8;
}

/* --- Navigation --- */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #16a34a;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Navbar scroll state */
nav.scrolled {
  background: rgba(254, 253, 248, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(20, 83, 45, 0.1);
}

nav.scrolled .nav-brand-text {
  color: #14532d !important;
}

nav.scrolled .nav-sub-text {
  color: #16a34a !important;
}

nav.scrolled .menu-line {
  background: #14532d !important;
}

/* --- Mobile Menu --- */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
  transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 1.5rem;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Hero Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.animate-slide-up-delay {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.animate-slide-up-delay-2 {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

/* --- Service Cards --- */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #166534, #22c55e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* --- Testimonial Cards --- */
.testimonial-card {
  position: relative;
}

.testimonial-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #166534, #22c55e);
  transition: width 0.4s ease;
  border-radius: 3px;
}

.testimonial-card:hover::after {
  width: 60%;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* --- Parallax-like subtle effect on hero --- */
.hero-bg {
  will-change: transform;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #166534;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #15803d;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  .hero-bg {
    background-attachment: scroll !important;
  }
}

/* --- Print styles --- */
@media print {
  nav, #contact, footer {
    display: none;
  }
}
