/* ── Base & Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: #250c19;
}

::selection {
  background: #F5C518;
  color: #250c19;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #250c19;
}
::-webkit-scrollbar-thumb {
  background: #7B2D5B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a53d70;
}

/* ── Floating Card Animations ── */
@keyframes float-1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(1deg); }
}

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

@keyframes float-3 {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-22px) scale(1.02); }
}

@keyframes float-4 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

.floating-card {
  will-change: transform;
}

.card-1 { animation: float-1 6s ease-in-out infinite; }
.card-2 { animation: float-2 7s ease-in-out infinite; }
.card-3 { animation: float-3 5s ease-in-out infinite; }
.card-4 { animation: float-4 6.5s ease-in-out infinite; }

/* ── Feature Card Hover ── */
.feature-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ── Navbar Scroll State ── */
#navbar.scrolled {
  background: rgba(37, 12, 25, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(123, 45, 91, 0.3);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Mobile Menu ── */
.mobile-menu-open #mobileMenu {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

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

/* ── Focus Visible ── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #F5C518;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Image Optimization ── */
img {
  max-width: 100%;
  height: auto;
}
