/* 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;
}

/* Scroll reveal base — content is visible by default, JS adds the animated state */
.section-label,
.section-title,
.section-subtitle,
.section-card,
.hero-element {
  opacity: 1;
  transform: none;
}

/* Scroll-reveal enhanced state (applied by JS only) */
@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.36, 1);
  }

  .reveal.from-left {
    transform: translateX(-24px);
  }

  .reveal.from-right {
    transform: translateX(24px);
  }

  .reveal.delay-1 { transition-delay: 0.1s; }
  .reveal.delay-2 { transition-delay: 0.2s; }
  .reveal.delay-3 { transition-delay: 0.3s; }
  .reveal.delay-4 { transition-delay: 0.4s; }
  .reveal.delay-5 { transition-delay: 0.5s; }
  .reveal.delay-6 { transition-delay: 0.6s; }
}

.reveal.revealed,
.no-reveal-anim .reveal {
  opacity: 1;
  transform: none;
}

/* Hero entrance animations */
.hero-element {
  opacity: 0;
  transform: translateY(20px);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-element {
    animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .hero-element:nth-child(1) { animation-delay: 0.1s; }
  .hero-element:nth-child(2) { animation-delay: 0.25s; }
  .hero-element:nth-child(3) { animation-delay: 0.4s; }
  .hero-element:nth-child(4) { animation-delay: 0.55s; }
  .hero-element:nth-child(5) { animation-delay: 0.7s; }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar transitions */
.nav-link {
  position: relative;
}

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

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

/* Mobile menu */
.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Form focus styles */
input:focus,
textarea:focus {
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgb(205, 215, 230);
}

/* Selection */
::selection {
  background: rgba(200, 164, 78, 0.2);
  color: inherit;
}

/* Subtle scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgb(240, 243, 249);
}

::-webkit-scrollbar-thumb {
  background: rgb(184, 198, 224);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(143, 165, 204);
}

/* Print styles */
@media print {
  nav, #contact-form, .hero-element { display: none; }
  body { color: #0a1f3f; }
}
