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

/* ─── NAV SCROLL STATE ─── */
#site-header { background: transparent; transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s; }
#site-header.scrolled {
  background: rgba(250, 245, 249, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(107, 47, 91, 0.08);
}

/* ─── NAV LINKS ─── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E8A838;
  border-radius: 1px;
  transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* ─── HERO BLOBS ─── */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.blob-1 {
  width: 400px; height: 400px;
  background: #e8a838;
  top: 10%; left: -5%;
  animation-delay: 0s;
}
.blob-2 {
  width: 300px; height: 300px;
  background: #d4a8c8;
  top: 50%; right: 5%;
  animation-delay: -3s;
}
.blob-3 {
  width: 200px; height: 200px;
  background: #fbd380;
  bottom: 10%; left: 30%;
  animation-delay: -5s;
}
@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -30px) scale(1.1); }
}

/* ─── HERO STAT CARDS ─── */
.hero-stat-card {
  background: white;
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 4px 20px rgba(107, 47, 91, 0.1);
  display: flex;
  flex-direction: column;
  animation: statFloat 3s ease-in-out infinite alternate;
}
.hero-stat-card:nth-child(2) { animation-delay: -1s; }
.hero-stat-card:nth-child(4) { animation-delay: -2s; }
@keyframes statFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* ─── SERVICE CARDS ─── */
.service-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: #fef9ee;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.service-card {
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(107, 47, 91, 0.2);
}

/* ─── PROJECT CARDS ─── */
.project-card {
  box-shadow: 0 4px 24px rgba(107, 47, 91, 0.1);
  transition: transform 0.4s, box-shadow 0.4s;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(107, 47, 91, 0.2);
}

/* ─── TESTIMONIAL CARDS ─── */
.testimonial-card {
  transition: transform 0.3s, background 0.3s;
}
.testimonial-card:hover {
  transform: translateY(-4px);
}

/* ─── SCROLL REVEAL ─── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ─── BACK TO TOP ─── */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ─── MOBILE NAV ANIMATION ─── */
#mobile-nav {
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── FORM FOCUS RING FIX ─── */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* ─── RESPONSIVE TWEAKS ─── */
@media (max-width: 640px) {
  .font-serif { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  h1 { font-size: clamp(2rem, 7vw, 3rem); }
  .hero-stat-card { padding: 10px 14px; }
  .hero-stat-card .text-2xl { font-size: 1.25rem; }
}
