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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(27, 67, 50, 0.2);
  color: #1B4332;
}

/* ========== NAVIGATION ========== */
#site-header {
  background: rgba(253, 252, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 67, 50, 0.08);
}

#site-header.scrolled {
  background: rgba(253, 252, 250, 0.95);
  box-shadow: 0 4px 24px rgba(27, 67, 50, 0.08);
}

/* ========== MOBILE MENU ========== */
.mobile-link {
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
  padding-left: 0.75rem;
}

/* ========== HERO ========== */
.hero-stats-divider {
  background: linear-gradient(to bottom, transparent, rgba(27, 67, 50, 0.15), transparent);
}

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1B4332, #3d7a4a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 0 24px 24px;
}

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

/* ========== WORK CARDS ========== */
.work-card {
  position: relative;
}

.work-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(27, 67, 50, 0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.work-card:hover::before {
  opacity: 1;
}

/* ========== TESTIMONIAL CARDS ========== */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  left: 24px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 80px;
  line-height: 1;
  color: rgba(27, 67, 50, 0.07);
  pointer-events: none;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ========== 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) {
  html {
    scroll-behavior: auto;
  }

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

  .work-card img,
  .service-card > div:first-child {
    transition: none;
  }
}

/* ========== FORM ========== */
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='%231B4332' 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 1rem center;
  padding-right: 2.5rem;
}

/* ========== BUTTON HOVER ========== */
button[type="submit"]:active {
  transform: scale(0.98);
}

/* ========== FOCUS VISIBLE ========== */
:focus-visible {
  outline: 2px solid #1B4332;
  outline-offset: 2px;
  border-radius: 8px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #84b38e;
}
