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

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(13, 148, 136, 0.2);
  color: #0f766e;
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Hero Fade-Up ─── */
.hero-fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-fade-up:nth-child(1) { animation-delay: 0.1s; }
.hero-fade-up:nth-child(2) { animation-delay: 0.25s; }
.hero-fade-up:nth-child(3) { animation-delay: 0.4s; }
.hero-fade-up:nth-child(4) { animation-delay: 0.55s; }
.hero-fade-up:nth-child(5) { animation-delay: 0.7s; }

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Floating Blobs ─── */
.hero-blob,
.contact-blob {
  animation: float 8s ease-in-out infinite;
}

.blob-2 { animation-delay: -2s; animation-duration: 10s; }
.blob-3 { animation-delay: -4s; animation-duration: 12s; }

.contact-blob.blob-2 { animation-delay: -3s; animation-duration: 11s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.05); }
  50% { transform: translate(-10px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

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

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-link {
  color: rgba(30, 41, 59, 0.7) !important;
}

#navbar.scrolled .nav-link:hover {
  color: #0f766e !important;
  background: rgba(13, 148, 136, 0.08) !important;
}

#navbar.scrolled .w-9 {
  background: #0D9488 !important;
}

#navbar.scrolled .font-serif {
  color: #1e293b !important;
}

/* ─── Room Cards ─── */
.room-card {
  will-change: transform;
}

/* ─── Gallery Items ─── */
.gallery-item {
  cursor: pointer;
}

.gallery-item img {
  will-change: transform;
}

/* ─── Back to Top ─── */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ─── Mobile Menu Transition ─── */
#mobile-menu {
  animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ─── Focus Styles ─── */
input:focus,
textarea:focus,
button:focus {
  outline: none;
}

/* ─── Responsive Tweaks ─── */
@media (max-width: 768px) {
  .hero-fade-up {
    animation-duration: 0.6s;
  }
}

/* ─── 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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
