/* ═══════════════════════════════════════════════════════
   American Legion Post 354 — Custom Styles
   Palette: Midnight Blue (#0a1f3f) + Mint (#2dd4bf)
   ═══════════════════════════════════════════════════════ */

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

body {
  overflow-x: hidden;
}

::selection {
  background-color: #2dd4bf;
  color: #0a1f3f;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #2dd4bf;
  transition: all 0.2s ease;
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #5eead4 !important;
}

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

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

/* ── Reveal Animations (progressive enhancement) ─────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }

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

  /* Stagger children */
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* When JS is disabled, all content is visible by default */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ── Header scroll state ─────────────────────────────── */
#site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Form focus states ───────────────────────────────── */
input:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

/* ── Button hover lift ───────────────────────────────── */
button, a {
  transition: all 0.2s ease;
}

/* ── Image hover ─────────────────────────────────────── */
img {
  transition: transform 0.4s ease;
}

/* ── Responsive adjustments ──────────────────────────── */
@media (max-width: 640px) {
  .font-display {
    word-break: break-word;
  }
}

@media (min-width: 1024px) {
  /* Subtle parallax on hero section */
  #top {
    will-change: transform;
  }
}

/* ── Print styles ────────────────────────────────────── */
@media print {
  #site-header,
  #menu-toggle,
  #mobile-menu {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
  }
}
