/* Base & Reset */
*, *::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 */
::selection {
  background: rgba(44, 168, 142, 0.3);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #050D1A;
}
::-webkit-scrollbar-thumb {
  background: #1A3566;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2CA88E;
}

/* Hero image */
.hero-img {
  will-change: transform;
}

/* Nav scroll state */
nav.scrolled {
  background: rgba(5, 13, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.7);
}

nav.scrolled .nav-link:hover {
  color: #3FC1A4;
}

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

/* Scroll reveal — progressive enhancement: hidden by default, JS adds .revealed */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.35, 1);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gallery scroll animation */
@keyframes scrollGallery {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: no-preference) {
  .animate-scroll {
    animation: scrollGallery 30s linear infinite;
  }
}

/* Image lazy fade-in */
img[loading="lazy"] {
  opacity: 1;
}

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

/* Button hover lift */
button, a {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.35, 1);
}

/* Card hover */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* Mobile link animations */
.mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
