/* ===== Custom Styles for Brandenberger House ===== */

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
  background: rgba(5, 13, 26, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #3dd9b6;
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: #3dd9b6 !important;
}

/* Mobile Menu */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.open .mobile-link {
  animation: fadeUp 0.4s ease forwards;
  opacity: 0;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Menu Button */
#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
  margin-top: -4px;
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg);
  top: 50%;
  margin-top: 4px;
  width: 5;
}

/* ===== Hero Floating Cards ===== */
.floating-card {
  animation: float 6s ease-in-out infinite;
}

.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -1.5s; }
.card-3 { animation-delay: -3s; }
.card-4 { animation-delay: -4.5s; }

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

/* Scroll Indicator */
@keyframes scrollIndicator {
  0% { top: -16px; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 32px; opacity: 0; }
}

.animate-scroll-indicator {
  animation: scrollIndicator 1.8s ease-in-out infinite;
}

/* ===== Room Cards ===== */
.room-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.room-card:nth-child(2) { transition-delay: 0.15s; }
.room-card:nth-child(3) { transition-delay: 0.3s; }

/* ===== Section Headers ===== */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Button Hover Glow ===== */
a:hover {
  transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: #050d1a;
}

::-webkit-scrollbar-thumb {
  background: rgba(61, 217, 182, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(61, 217, 182, 0.5);
}

/* ===== Selection ===== */
::selection {
  background: rgba(61, 217, 182, 0.3);
  color: #fff;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .floating-card {
    display: none;
  }

  #hero {
    min-height: 100vh;
  }

  .font-serif {
    line-height: 1.15;
  }
}

/* ===== Image Loading ===== */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
