/* Base & Typography */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Scroll Reveal - progressive enhancement */
.reveal {
  opacity: 1;
  transform: none;
  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: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
  }
  .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; }
}

/* Hero animations */
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .hero-headline {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
    opacity: 0;
  }
  .hero-subtext {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    opacity: 0;
  }
  .hero-cta {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
    opacity: 0;
  }
  .hero-stats {
    animation: slideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
    opacity: 0;
  }
}

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

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.navbar-scrolled .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}

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

.menu-btn-open .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn-open .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-btn-open .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Room cards */
.room-card {
  cursor: pointer;
}

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

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Selection color */
::selection {
  background: rgba(13, 148, 136, 0.3);
  color: inherit;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
  border-radius: 4px;
}

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