/* ============================================
   Squeak's Club Inc — Custom Styles
   Midnight Blue + Mint | Editorial Design
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-midnight-950: #030a12;
  --color-midnight-900: #071526;
  --color-midnight-800: #0f2b4c;
  --color-mint-400: #3fd49a;
  --color-mint-500: #1fbf7e;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--color-midnight-950);
  color: #dce6ef;
}

::selection {
  background: rgba(63, 212, 154, 0.3);
  color: #f0f4f8;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-midnight-950);
}
::-webkit-scrollbar-thumb {
  background: var(--color-midnight-700);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-mint-500);
}

/* --- Floating Card Animations --- */
@keyframes float1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(0.5deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-0.5deg); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(0.3deg); }
}

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

/* --- Navbar --- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(3, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(95, 234, 212, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-mint-400);
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: var(--color-mint-400) !important;
}

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

#mobile-menu.open .mobile-link {
  animation: slideUp 0.4s ease forwards;
  opacity: 1;
}

#mobile-menu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* --- Menu Toggle --- */
#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(3px, -3px);
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s 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; }
}

/* --- 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;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .floating-card {
    animation: none !important;
  }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-mint-400);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Image Loading --- */
img {
  loading: lazy;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.1;
  }
}
