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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(74, 222, 128, 0.3);
  color: #0d1442;
}

/* ========== SCROLL REVEAL (progressive enhancement) ========== */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal-up.revealed,
  .reveal-left.revealed,
  .reveal-right.revealed {
    opacity: 1;
    transform: translate(0);
  }
}

/* ========== NAVBAR SCROLLED STATE ========== */
#navbar.scrolled {
  background: rgba(240, 253, 244, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(13, 20, 66, 0.08);
}

/* ========== MOBILE MENU ========== */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

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

/* ========== BUTTON HOVER EFFECTS ========== */
a {
  text-decoration: none;
}

/* ========== FOCUS STYLES ========== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #7986cb;
}

/* ========== TRANSITION UTILITIES ========== */
.transition-all {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== SELECTION ANIMATION ========== */
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='%23303f9f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
