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

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

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(212, 168, 56, 0.3);
  color: #fef9ee;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #040a14;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #e8a020;
}

/* ===== Floating Cards Animation ===== */
@keyframes float-main {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes float-stat-1 {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-8px) translateX(4px); }
}

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

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

.floating-card-main {
  animation: float-main 6s ease-in-out infinite;
}

.floating-card-stat.stat-1 {
  animation: float-stat-1 5s ease-in-out infinite;
}

.floating-card-stat.stat-2 {
  animation: float-stat-2 4.5s ease-in-out infinite;
}

.floating-card-stat.stat-3 {
  animation: float-stat-3 5.5s ease-in-out infinite;
}

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

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

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

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

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

/* ===== Mobile Menu ===== */
.mobile-link {
  display: block;
}

.mobile-link:hover {
  color: #f5c03e;
}

/* ===== Card Hover Effects ===== */
.reveal:hover {
  transform: translateY(-4px);
}

/* ===== Button Focus ===== */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #e8a020;
  outline-offset: 2px;
}

/* ===== Input Autofill ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0a1628 inset !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ===== Smooth Image Loading ===== */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
  h1 {
    line-height: 1.15;
  }
}

/* ===== Print Styles ===== */
@media print {
  nav, #mobile-menu-btn, .floating-card-stat, .floating-card-main {
    display: none !important;
  }
}
