/* ── 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 {
  background: rgba(5, 62, 46, 0.2);
  color: #042e22;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollLine {
  0%, 100% {
    opacity: 0.3;
    transform: scaleY(0.5);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.animate-scroll-line {
  animation: scrollLine 1.5s ease-in-out infinite;
}

/* ── Scroll Reveal ── */
.reveal-section {
  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-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* ── Navbar Scroll State ── */
#navbar.scrolled {
  background: rgba(250, 248, 242, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(5, 62, 46, 0.08);
}

#navbar.scrolled .nav-logo-text {
  color: #042e22;
}

#navbar.scrolled .nav-link {
  color: #053e32;
}

#navbar.scrolled .nav-link:hover {
  color: #047857;
}

/* ── Mobile Menu ── */
#mobile-menu.open {
  transform: translateX(0);
}

/* ── Form Styles ── */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 62, 46, 0.1);
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f0e3;
}
::-webkit-scrollbar-thumb {
  background: #059669;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* ── Print Styles ── */
@media print {
  #navbar, #contact-form, .reveal-section { display: none; }
  body { background: white; color: black; }
}
