/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; overflow-x: hidden; }
img { display: block; max-width: 100%; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f5f0e8; }
::-webkit-scrollbar-thumb { background: #1a3a2a; border-radius: 4px; }

/* ─── Hero Animations ─── */
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeInUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes growWidth {
  from { width: 0; }
  to { width: 80px; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(60px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.hero-line {
  display: inline-block;
  animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
hero-line:nth-child(3) { animation-delay: 0.3s; }
.hero-line:nth-child(4) { animation-delay: 0.4s; }
.hero-line:nth-child(5) { animation-delay: 0.5s; }

.hero-eyebrow {
  animation: fadeIn 0.6s 0s both;
}
.hero-divider {
  animation: growWidth 0.8s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-fade {
  animation: fadeInUp 0.8s 0.7s both;
}
.hero-img-main {
  animation: scaleIn 1s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-img-accent {
  animation: slideInRight 1s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-badge {
  animation: fadeInUp 0.8s 0.9s both;
}

/* ─── Nav ─── */
#navbar {
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 58, 42, 0.06);
}
#navbar.scrolled {
  box-shadow: 0 1px 20px rgba(26, 58, 42, 0.08);
}

/* ─── Mobile Menu ─── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}
.mobile-nav-link {
  transition: all 0.3s ease;
}
.menu-line {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.menu-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
menu-open .menu-line:nth-child(2) {
  opacity: 0;
}
menu-open .menu-line:nth-child(3) {
  width: 6;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Service Cards ─── */
.service-card {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid transparent;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(26, 58, 42, 0.15);
}

/* ─── Coverage Items ─── */
.coverage-item {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid transparent;
}
.coverage-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(26, 58, 42, 0.12);
}

/* ─── Reveal on Scroll ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ─── Selection ─── */
::selection {
  background: #1a3a2a;
  color: #faf8f4;
}

/* ─── Focus Styles ─── */
:focus-visible {
  outline: 2px solid #2d6f3a;
  outline-offset: 2px;
}

/* ─── Responsive Tweaks ─── */
@media (max-width: 768px) {
  .hero-img-main {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 1rem;
  }
  .hero-img-accent {
    position: relative;
    width: 60%;
    height: 200px;
    margin-top: -2rem;
    margin-left: 1rem;
  }
  .hero-badge {
    position: relative;
    bottom: auto;
    right: auto;
    display: inline-block;
    margin-top: 1rem;
  }
}
