/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Navbar ── */
#navbar {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

.nav-text {
  color: #1e293b;
  transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
  color: #1e293b;
}

/* ── Scroll Reveal ── */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Default visible state for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* ── Bounce Animation ── */
@keyframes bounce-slow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

.animate-bounce-slow {
  animation: bounce-slow 2s ease-in-out infinite;
}

/* ── Mobile Menu ── */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
  translate: 0;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ── Selection ── */
::selection {
  background: #0d9488;
  color: white;
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* ── Utility ── */
.nav-link {
  position: relative;
}

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

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

/* ── Mobile Menu Button Animation ── */
#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Image Hover Parallax ── */
.group img {
  will-change: transform;
}

/* ── Print Styles ── */
@media print {
  #navbar, #backToTop, .animate-bounce-slow {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
