/* ============================================
   THE GROVE HOUSE — Custom Styles
   ============================================ */

/* Grain texture overlay for warmth */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.02;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Hero Ken Burns */
.hero-zoom {
  animation: kenBurns 25s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }
.reveal-delay-5 { transition-delay: 0.6s; }
.reveal-delay-6 { transition-delay: 0.72s; }

/* Image hover zoom */
.img-zoom { overflow: hidden; }
.img-zoom img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom:hover img {
  transform: scale(1.06);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.375rem;
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}
.lightbox.active .lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: white;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox-btn:hover {
  background: rgba(201, 169, 110, 0.25);
  border-color: rgba(201, 169, 110, 0.5);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}
.lightbox-close:hover { color: #C9A96E; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-family: 'Outfit', system-ui, sans-serif;
}

/* Nav states */
.nav-scrolled {
  background: rgba(44, 74, 62, 0.97) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.12);
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.active {
  transform: translateX(0);
}

/* Scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #C9A96E #FAF7F2;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #FAF7F2; }
::-webkit-scrollbar-thumb { background: #C9A96E; border-radius: 3px; }

/* Selection */
::selection { background: #C9A96E; color: white; }

/* Decorative line grow animation */
.line-grow {
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.line-grow.active { width: 4rem; }

/* Parallax hint */
.parallax-img { will-change: transform; }

/* Space section image overlay gradient */
.space-overlay {
  background: linear-gradient(135deg, rgba(44,74,62,0.85) 0%, rgba(44,74,62,0.4) 100%);
}
