/* ===== BASE & RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #faf6f0;
}
::-webkit-scrollbar-thumb {
  background: #1B4332;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #314a31;
}

/* ===== SELECTION ===== */
::selection {
  background: #1B4332;
  color: #faf6f0;
}

/* ===== NAVBAR ===== */
#navbar.scrolled {
  box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

#mobile-menu.closed .mobile-link {
  transition-delay: 0s;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1B4332, #D4A574);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

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

/* ===== APPROACH STEPS ===== */
.approach-step {
  position: relative;
}

.approach-step::after {
  content: '';
  position: absolute;
  top: 40px;
  right: -40px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid #d9e4dc;
}

.approach-step:last-child::after {
  display: none;
}

@media (max-width: 767px) {
  .approach-step::after {
    display: none;
  }
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(27, 67, 50, 0.1);
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
section {
  position: relative;
}

/* ===== ANIMATION UTILITIES ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  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; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

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

/* ===== FORM FOCUS ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #1B4332 !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

/* ===== BUTTON HOVER ===== */
button[type="submit"],
a[href="#contact"],
a[href="tel:+12094080896"] {
  position: relative;
  overflow: hidden;
}

button[type="submit"]::after,
a[href="#contact"]::after,
a[href="tel:+12094080896"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

button[type="submit"]:hover::after,
a[href="#contact"]:hover::after,
a[href="tel:+12094080896"]:hover::after {
  opacity: 1;
}

/* ===== IMAGE CONTAINERS ===== */
img {
  max-width: 100%;
  height: auto;
}

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
