/* ========================================
   Eagle Pointe Shores — Custom Styles
   ======================================== */

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100vh;
}

/* Header transition states */
#site-header {
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

#site-header.scrolled {
  background-color: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Navigation link hover underline effect */
.nav-link {
  position: relative;
}

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

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

/* Scroll reveal animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Staggered delays for child reveals */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal:nth-child(3) { transition-delay: 0.19s; }
.reveal:nth-child(4) { transition-delay: 0.26s; }
.reveal:nth-child(5) { transition-delay: 0.33s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal.reveal-visible {
    opacity: 1;
    transform: none;
  }
}

/* Focus styles */
:focus-visible {
  outline: 3px solid #2dd4bf;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

/* Header height fix */
#site-header {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Selection color */
::selection {
  background-color: rgba(13, 148, 136, 0.3);
  color: #0f172a;
}

/* Smooth image loading */
img {
  loading: lazy;
  display: block;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Mobile menu animation */
#mobile-menu {
  animation: menuSlideDown 0.3s ease forwards;
}

@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Back to top button */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#back-to-top {
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}
