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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(125, 232, 193, 0.3);
  color: #D9FBEF;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #061226;
}
::-webkit-scrollbar-thumb {
  background: rgba(125, 232, 193, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 232, 193, 0.5);
}

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

#navbar.scrolled {
  background: rgba(6, 18, 38, 0.92);
  backdrop-filter: blur(20px);
  -webkit-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: #7DE8C1;
  transition: width 0.3s ease;
}

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

.nav-link:hover {
  color: #7DE8C1;
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

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

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

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

/* Menu toggle animation */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}
.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(8px);
}
.menu-toggle.active .menu-line:nth-child(3) {
  width: 6px;
  transform: rotate(-45deg) translate(2px, -2px);
}

/* ===== REVEAL ANIMATIONS ===== */
/* Default state: visible (progressive enhancement — works without JS) */
.reveal {
  opacity: 1;
  transform: none;
  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);
}

/* When JS adds the class, animate */
.reveal.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Default state for scroll-reveal (visible by default for no-JS fallback) */
.reveal[data-animate="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* If JS is enabled, set initial hidden state via class */
.reveal.reveal-hidden {
  opacity: 0;
  transform: translateY(32px);
}

.reveal.reveal-visible {
  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);
}

/* ===== PARALLAX HERO ===== */
#hero {
  will-change: scroll-position;
}

#hero img {
  transition: transform 0.1s linear;
}

/* ===== ROOM CARDS ===== */
.reveal.group:hover .aspect-\[4\/3\] img {
  transform: scale(1.05);
}

/* ===== BUTTON HOVER EFFECTS ===== */
button[type="submit"]:active {
  transform: scale(0.98);
}

/* ===== FORM INPUTS ===== */
input:focus,
textarea:focus {
  background: rgba(10, 31, 63, 0.8);
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
section {
  position: relative;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    /* JS will handle animation */
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .font-serif {
    line-height: 1.1;
  }
}

/* ===== PRINT ===== */
@media print {
  #navbar,
  #hero .absolute.bottom-10,
  .reveal {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
}
