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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0d0519;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #facc15, #f97316);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fde047, #fb923c);
}

/* ===== Selection ===== */
::selection {
  background: rgba(250, 204, 21, 0.3);
  color: #fff;
}

/* ===== Navbar ===== */
#navbar.scrolled {
  background: rgba(13, 5, 25, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Feature Cards Glow Effect ===== */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(250, 204, 21, 0.03),
    transparent
  );
  transition: left 0.6s ease;
}

.feature-card:hover::before {
  left: 100%;
}

/* ===== FAQ Accordion ===== */
.faq-item {
  transition: border-color 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(250, 204, 21, 0.2);
}

.faq-toggle {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

.faq-toggle:focus {
  outline: none;
}

.faq-toggle:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: -2px;
  border-radius: 1rem;
}

.faq-icon.rotated {
  transform: rotate(180deg);
}

.faq-content {
  animation: faqOpen 0.3s ease-out;
}

@keyframes faqOpen {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

/* ===== Particle Canvas ===== */
#particles {
  opacity: 0.5;
}

/* ===== Nostalgic Glow Overlays ===== */
.nostalgic-glow {
  position: relative;
}

.nostalgic-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.1),
    transparent 40%,
    transparent 60%,
    rgba(249, 115, 22, 0.1)
  );
  pointer-events: none;
}

/* ===== Counter Number Formatting ===== */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ===== Smooth Link Transitions ===== */
a {
  transition: color 0.2s ease;
}

/* ===== Active Nav Link ===== */
nav a.nav-active {
  color: #facc15 !important;
  position: relative;
}

nav a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #facc15, #f97316);
  border-radius: 1px;
}

/* ===== Inline Internal Links (body content) ===== */
.inline-link {
  color: #facc15;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 204, 21, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
  color: #fde047;
  border-bottom-color: #fde047;
}

/* ===== CTA Button Pulse Ring ===== */
@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(250, 204, 21, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(250, 204, 21, 0);
  }
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

/* ===== Responsive Typography Tweaks ===== */
@media (max-width: 640px) {
  .font-display {
    letter-spacing: -0.01em;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  #particles {
    display: none;
  }
}

/* ===== Print Styles ===== */
@media print {
  #navbar,
  #particles,
  #mobile-menu-btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
