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

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

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== NAVBAR ========== */
#navbar {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(27, 94, 32, 0.08);
}

/* ========== MOBILE MENU ========== */
.mobile-link {
  text-decoration: none;
}

#mobileMenu.open {
  display: block;
  animation: slideDown 0.25s ease;
}

#mobileMenu.hidden {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== 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, #1B5E20, #4d9e4d);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

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

/* ========== PROJECT CARDS ========== */
.project-card {
  cursor: pointer;
}

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

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 72px;
  font-family: Georgia, serif;
  color: #1B5E20;
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
}

/* ========== SCROLL REVEAL (progressive enhancement) ========== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

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

  /* Default state is visible for no-JS fallback */
  .reveal {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== GEOMETRIC DECORATIONS ========== */
.geo-diamond {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #F4A623;
  opacity: 0.3;
  transform: rotate(45deg);
  border-radius: 2px;
}

.geo-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

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

a[href="#contact"]::before,
button[type="submit"]::before {
  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;
}

a[href="#contact"]:hover::before,
button[type="submit"]:hover::before {
  opacity: 1;
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1B5E20;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========== FORM FOCUS STATES ========== */
input:focus,
select:focus,
textarea:focus {
  border-color: #1B5E20 !important;
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 640px) {
  .service-card {
    padding: 1.5rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .contact-form-section {
    padding: 1.5rem;
  }
}

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

/* ========== PRINT STYLES ========== */
@media print {
  #navbar,
  #contact,
  button[type="submit"] {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  a[href]::after {
    content: none;
  }
}
