/* ===== Base & Utilities ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

::selection {
  background: #a7f3d0;
  color: #064e3b;
}

/* ===== Animations ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes float-delay {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-15px) scale(1.03); }
}

@keyframes scroll-line {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 8s ease-in-out infinite;
  animation-delay: 1s;
}

.animate-scroll-line {
  animation: scroll-line 2s ease-in-out infinite;
}

/* ===== Scroll-triggered Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 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; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(254, 253, 248, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

/* ===== Service Cards ===== */
.service-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
  transform: translateY(-6px);
}

/* ===== Mobile Menu ===== */
.mobile-link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
  color: #059669;
  padding-left: 8px;
}

/* ===== Form ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2' 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 12px center;
  padding-right: 40px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #6ee7b7;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.1;
  }

  h1 {
    font-size: 2.75rem !important;
  }

  h2 {
    font-size: 2rem !important;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  h1 {
    font-size: 3.5rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  h1 {
    font-size: 4.5rem !important;
  }
}

/* ===== Print ===== */
@media print {
  #navbar, #mobile-menu, .animate-float, .animate-float-delay {
    display: none !important;
  }

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