/* Custom styles for The Lakehouse at Patoka Lake */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Base font smoothing */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal base — content always visible by default */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Only animate when JS adds the animated class (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal.animate {
    opacity: 0;
    transform: translateY(24px);
  }

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

  /* Stagger children */
  .reveal.animate .room-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .reveal.animate .room-card.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal.animate .amenity-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .reveal.animate .amenity-item.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating stat cards */
.stat-card {
  animation: float 6s ease-in-out infinite;
}

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

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

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

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(2, 8, 20, 0.92) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200, 164, 78, 0.1);
}

.navbar-scrolled #navbar {
  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transitions */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Input autofill override for dark theme */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #0a1628 inset !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(200, 164, 78, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 164, 78, 0.5);
}

/* Selection color */
::selection {
  background: rgba(200, 164, 78, 0.3);
  color: #fff;
}

/* Subtle image hover parallax on hero */
#hero .absolute img {
  transition: transform 8s ease;
}

#hero:hover .absolute img {
  transform: scale(1.02);
}

/* Room card image container */
.room-card .relative {
  position: relative;
  overflow: hidden;
}

.room-card img {
  will-change: transform;
}

/* Thin line decoration */
.line-decoration {
  position: relative;
}

.line-decoration::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 1px;
  background: linear-gradient(to right, #C8A44E, transparent);
}

/* Button focus states */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #C8A44E;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
