/* ============================================
   Mountain States Plumbing & Heating
   Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #3ECFB2;
  color: #0A1628;
}

/* --- Navigation --- */
.nav-logo-text {
  color: #0A1628;
  transition: color 0.3s ease;
}

.nav-logo-sub {
  color: #3ECFB2;
}

.nav-link {
  position: relative;
}

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

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

.nav-link:hover {
  color: #0A1628 !important;
}

/* Navbar scroll state */
nav.scrolled {
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

nav.scrolled .nav-logo-text {
  color: #0A1628;
}

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

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

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

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* --- Hero --- */
.hero-tag {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-title {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.hero-subtitle {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-cta-primary,
.hero-cta-secondary {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.8s;
  opacity: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-image-wrap {
  animation: fadeIn 1s ease forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.hero-float-card {
  animation: floatCard 0.8s ease forwards;
  animation-delay: 1.2s;
  opacity: 0;
  transform: translateY(20px);
}

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

@keyframes floatCard {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Section Labels --- */
.section-label {
  position: relative;
  display: inline-block;
}

.section-label::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 12px;
  height: 1px;
  background: #3ECFB2;
}

/* --- Service Cards --- */
.service-card {
  transition: background 0.3s ease;
}

.service-card:hover {
  background: #FAFAF8;
}

/* --- Area Cards --- */
.area-card {
  transition: background 0.3s ease;
}

/* --- Process Steps --- */
.process-step-num {
  font-variant-numeric: tabular-nums;
}

.process-step-dot {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.process-step:hover .process-step-dot {
  opacity: 1;
}

/* --- CTA Buttons --- */
.cta-btn-primary {
  position: relative;
  overflow: hidden;
}

.cta-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s ease;
}

.cta-btn-primary:hover::before {
  left: 100%;
}

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

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

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

/* --- Divider Lines --- */
.divider-line {
  width: 60px;
  height: 1px;
  background: #3ECFB2;
}

/* --- Form Styles --- */
select option {
  background: #fff;
  color: #0A1628;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #3ECFB2 !important;
}

/* --- Responsive --- */
@media (max-width: 767px) {
  .section-label::before {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: clamp(3rem, 5vw, 5.5rem);
  }
}
