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

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

body {
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
}

::selection {
  background: #047857;
  color: white;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    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);
  }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== HERO ORB ANIMATIONS ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-orb {
    animation: float 8s ease-in-out infinite;
  }

  .orb-2 {
    animation-delay: -3s;
    animation-duration: 10s;
  }

  .orb-3 {
    animation-delay: -5s;
    animation-duration: 12s;
  }

  @keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
  }

  .hero-badge {
    animation: fadeDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.2s;
  }

  h1, .hero-badge + * {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.4s;
  }

  p:has(> .text-lg) {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.6s;
  }

  .hero-badge ~ * ~ * > div {
    animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.8s;
  }

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

  @keyframes fadeDown {
    from {
      opacity: 0;
      transform: translateY(-16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ===== NAVBAR ===== */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(6, 78, 59, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding-top: 0;
  padding-bottom: 0;
}

#navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

#navbar.scrolled .nav-link:hover {
  color: #ffffff;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CARD HOVER EFFECTS ===== */
.group:hover .w-14 {
  transform: scale(1.05) rotate(-2deg);
  transition: transform 0.3s ease;
}

/* ===== FOCUS STYLES ===== */
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: #047857;
  color: #fff;
}

/* ===== FORM STYLES ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%23047857' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  appearance: none;
  cursor: pointer;
}

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

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

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

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

/* ===== PRINT ===== */
@media print {
  #navbar, #mobile-menu, button, iframe {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
