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

::selection {
  background: rgba(27, 122, 110, 0.3);
  color: #d4f5ef;
}

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

.animate-fade-in {
  animation: fadeIn 0.9s ease-out forwards;
  opacity: 0;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

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

  .reveal:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Always-visible fallback for reduced-motion or no-JS */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
  background: rgba(10, 31, 63, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Mobile menu animation ── */
#bar3 {
  width: 1.5rem;
}

#menu-toggle[aria-expanded="true"] #bar1 {
  transform: translateY(5px) rotate(45deg);
}

#menu-toggle[aria-expanded="true"] #bar2 {
  opacity: 0;
}

#menu-toggle[aria-expanded="true"] #bar3 {
  transform: translateY(-5px) rotate(-45deg);
  width: 1.5rem;
}

/* ── Menu list item hover ── */
#menu ul li {
  transition: padding-left 0.2s ease;
}

#menu ul li:hover {
  padding-left: 0.25rem;
}

/* ── Form focus states ── */
input:focus,
textarea:focus {
  box-shadow: 0 0 0 1px rgba(109, 212, 187, 0.2);
}

/* ── Smooth image loading ── */
img {
  image-rendering: auto;
}

/* ── Map contrast fix ── */
iframe[title*="Maps"] {
  border-radius: 0 0 0 0;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a1f3f;
}

::-webkit-scrollbar-thumb {
  background: rgba(109, 212, 187, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(109, 212, 187, 0.5);
}

/* ── Focus visible for accessibility ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6dd4bb;
  outline-offset: 2px;
}

/* ── Print styles ── */
@media print {
  #navbar,
  #gallery,
  #contact-form,
  #form-success {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }
}
