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

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

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== NAVBAR ===== */
#navbar {
  background: transparent;
}

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

.nav-link {
  position: relative;
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  display: block;
}

/* ===== HERO ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out 0.2s both;
}

.animate-slide-up-delay {
  animation: slideUp 0.8s ease-out 0.4s both;
}

.animate-slide-up-delay-2 {
  animation: slideUp 0.8s ease-out 0.6s both;
}

.animate-slide-up-delay-3 {
  animation: slideUp 0.8s ease-out 0.8s both;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  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; }

/* ===== BACK TO TOP ===== */
#back-to-top {
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}

#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  box-shadow: 0 8px 30px rgba(6, 95, 70, 0.4);
}

/* ===== FORM STYLES ===== */
input:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #34d399;
}

/* ===== SELECTION ===== */
::selection {
  background: #d1fae5;
  color: #064e3b;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 640px) {
  h1 {
    font-size: 2.75rem !important;
    line-height: 1.1 !important;
  }

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

  .animate-slide-up,
  .animate-slide-up-delay,
  .animate-slide-up-delay-2,
  .animate-slide-up-delay-3 {
    animation-delay: 0.1s;
  }
}

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

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

  html {
    scroll-behavior: auto;
  }

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