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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

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

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

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
  background: rgba(253, 252, 250, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .nav-logo-text {
  color: #1B4332;
}

#navbar.scrolled .nav-logo-sub {
  color: #1B4332/60;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #C1694F;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 60%;
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #C1694F;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.mobile-link:hover::after {
  width: 60%;
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  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);
}

/* Staggered delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.35s; }

/* ===== HERO DECORATIVE SHAPES ANIMATION ===== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-15px) rotate(45deg); }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-10px) rotate(12deg); }
}

@keyframes float-circle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-shape-1 { animation: float-slow 6s ease-in-out infinite; }
.hero-shape-2 { animation: float-medium 5s ease-in-out infinite; }
.hero-shape-3 { animation: float-circle 7s ease-in-out infinite; }
.hero-shape-4 { animation: float-medium 4s ease-in-out infinite reverse; }
.hero-shape-5 { animation: float-circle 5s ease-in-out infinite; }
.hero-shape-6 { animation: float-circle 6s ease-in-out infinite reverse; }

/* ===== CUSTOM SELECT ARROW ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231B4332' stroke-width='2.5' 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 1rem center;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
}

/* ===== FOCUS VISIBLE ===== */
*:focus-visible {
  outline: 2px solid #1B4332;
  outline-offset: 2px;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  h1, #hero h1 {
    font-size: 2.75rem;
  }

  .font-display.text-4xl {
    font-size: 2.25rem;
  }
}

/* ===== 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;
  }

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

/* ===== SELECTION COLOR ===== */
::selection {
  background: #95D17C;
  color: #0f251a;
}
