/* ── 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(45, 212, 191, 0.3);
  color: #fff;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on-scroll {
    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);
  }

  .reveal-on-scroll[data-revealed="false"] {
    opacity: 0;
    transform: translateY(32px);
  }
}

/* ── Floating Cards Animation ── */
@media (prefers-reduced-motion: no-preference) {
  .floating-card {
    animation: float 6s ease-in-out infinite;
  }

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

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

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

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

/* ── Navbar ── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(2, 12, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-link {
  position: relative;
}

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

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

.nav-link:hover {
  color: #fff !important;
}

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

.mobile-nav-link {
  position: relative;
}

.mobile-nav-link::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: #2DD4BF;
  transition: width 0.3s ease;
  margin: 4px auto 0;
}

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

/* ── Image Hover ── */
.rounded-3xl.overflow-hidden img {
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-3xl.overflow-hidden:hover img {
  transform: scale(1.05);
}

/* ── Button Focus ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #2DD4BF;
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #020C16;
}

::-webkit-scrollbar-thumb {
  background: rgba(45, 212, 191, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 212, 191, 0.5);
}
