/* ─── Base & Typography ─── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #1B4332;
  color: #FAFAF5;
}

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

#nav.scrolled {
  background: rgba(250, 250, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(27, 67, 50, 0.08);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
  position: relative;
}

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

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

#nav:not(.scrolled) .nav-link {
  color: #D4E4D1;
}

#nav:not(.scrolled) .nav-link:hover {
  color: #FAFAF5;
}

#nav:not(.scrolled) .nav-link::after {
  background: #D4E4D1;
}

#nav:not(.scrolled) .brand-text {
  color: #FAFAF5;
}

/* ─── Floating Cards ─── */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
  animation-delay: 0s;
}

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

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

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

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

/* ─── Marquee ─── */
.marquee-track {
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: inline-block;
  padding: 0 4px;
}

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

/* Progressive enhancement: content is visible by default; JS adds the animation */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
  }

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

/* ─── Mobile Menu ─── */
.mobile-link {
  position: relative;
  display: block;
}

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

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

/* ─── Menu list hover ─── */
#menu li {
  border-bottom: 1px solid rgba(27, 67, 50, 0.06);
  padding-bottom: 12px;
}

#menu li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ─── Button focus ─── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #1B4332;
  outline-offset: 2px;
}

/* ─── Utility ─── */
.py-18 {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.h-18 {
  height: 4.5rem;
}
