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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

@keyframes floatDelayed {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-25px, 25px) scale(1.03); }
  66% { transform: translate(15px, -15px) scale(0.97); }
}

@keyframes pulseSlow {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.1); }
}

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

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}

.hero-gradient-orb {
  animation: float 8s ease-in-out infinite;
}

.hero-gradient-orb:nth-child(2) {
  animation: floatDelayed 10s ease-in-out infinite;
}

.hero-gradient-orb:nth-child(3) {
  animation: pulseSlow 6s ease-in-out infinite;
}

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

.animate-float-delayed {
  animation: floatDelayed 10s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulseSlow 6s ease-in-out infinite;
}

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

.animate-fade-in-up-delay {
  animation: fadeInUp 0.8s ease-out 0.15s forwards;
  opacity: 0;
}

.animate-fade-in-up-delayed {
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

.animate-fade-in-up-delayed-2 {
  animation: fadeInUp 0.8s ease-out 0.45s forwards;
  opacity: 0;
}

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

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Default state: visible (progressive enhancement) */
.reveal {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
  }

  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== NAVBAR ========== */
#navbar {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
  background: rgba(7, 13, 26, 0.9);
  border-bottom: 1px solid rgba(20, 184, 166, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ========== MOBILE MENU ========== */
#mobileMenu {
  animation: fadeInUp 0.3s ease-out;
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ========== CUSTOM SELECT ========== */
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='%2394a3b8' 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 1rem center;
  padding-right: 2.5rem;
}

/* ========== SELECTION ========== */
::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #f0fdfa;
}

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

::-webkit-scrollbar-track {
  background: #070d1a;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #14b8a6;
}

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

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