/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Header ── */
#site-header {
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
#site-header.scrolled {
  background: rgba(4, 120, 87, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #34d399;
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Hero ── */
.hero-bg { will-change: transform; }
.hero-overlay { background: linear-gradient(135deg, rgba(2, 44, 34, 0.9) 0%, rgba(4, 120, 87, 0.75) 50%, rgba(6, 95, 70, 0.6) 100%); }

/* Hero scroll indicator */
.scroll-dot {
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* ── Service Cards ── */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #047857, #34d399);
  border-radius: 3xl 3xl 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card:hover::before { opacity: 1; }

/* ── Gallery ── */
.gallery-item {
  aspect-ratio: 4 / 3;
  cursor: pointer;
}

/* ── Testimonial Cards ── */
.testimonial-card {
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 6rem;
  font-family: 'Lora', serif;
  color: #d1fae5;
  line-height: 1;
  pointer-events: none;
}

/* ── Input Fields ── */
.input-field {
  font-family: 'Nunito', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-field:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* ── Buttons ── */
.btn-primary, .btn-secondary, .btn-submit {
  position: relative;
  overflow: hidden;
}
.btn-primary::after, .btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn-primary:hover::after, .btn-submit:hover::after { opacity: 1; }

/* ── Scroll Reveal ── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal.revealed:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal.revealed:nth-child(6) { transition-delay: 0.5s; }

/* ── Mobile Menu ── */
#mobile-menu {
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-nav-link {
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .hero-title { font-size: 2.75rem; }
  .service-card { padding: 1.5rem; }
  .testimonial-card::before { font-size: 4rem; top: 12px; right: 16px; }
  #about .grid { gap: 2rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-title { font-size: 3.5rem; }
}

/* ── Focus visible ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* ── Selection ── */
::selection {
  background: #a7f3d0;
  color: #064e3b;
}
