/* ===== BASE ===== */
*, *::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(251, 191, 36, 0.3);
  color: #faf5ff;
}

/* ===== NAVBAR ===== */
#navbar.scrolled {
  background: rgba(30, 0, 51, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fbbf24;
  transition: width 0.3s ease;
}

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

/* ===== MOBILE MENU ===== */
.mobile-link {
  position: relative;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

.menu-line {
  display: block;
}

#menuToggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuToggle.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== FLOATING CARDS ===== */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
  animation-delay: 0s;
}

.floating-card:nth-child(2) {
  animation-delay: -1.5s;
}

.floating-card:nth-child(3) {
  animation-delay: -3s;
}

.floating-card:nth-child(4) {
  animation-delay: -4.5s;
}

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

/* ===== SERVICE CARDS ===== */
.service-card {
  perspective: 1000px;
}

.service-card > div {
  transform-style: preserve-3d;
}

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

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

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

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

::-webkit-scrollbar-track {
  background: #1e0033;
}

::-webkit-scrollbar-thumb {
  background: #581c87;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7e22ce;
}

/* ===== SELECT STYLING ===== */
select option {
  background: #1e0033;
  color: #f3e8ff;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .floating-card {
    display: none;
  }
}
