/* ==========================================================================
   Chalés Ubatuba Paradise — Design System (Azul Oceano & Verde Mata Atlântica)
   ========================================================================== */

:root {
  --ocean-950: #051c2c;
  --ocean-900: #0b3954;
  --ocean-800: #114b6e;
  --ocean-700: #18648f;
  --forest-700: #0f766e;
  --forest-600: #0d9488;
  --forest-500: #14b8a6;
  --sun-500: #e09132;
  --sun-600: #c67a1e;
  --mist-50: #f2f8f7;
  --mist-100: #e3f0ee;
  --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: #0f172a;
  background-color: var(--mist-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
}

.font-editorial {
  font-family: var(--font-serif);
}

/* ==========================================================================
   Header Zero-Gap & Scroll States
   ========================================================================== */
#top-notification-bar {
  max-height: 44px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.28s ease,
              padding 0.35s ease;
}

#site-header.is-scrolled #top-notification-bar {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#main-navbar {
  background: linear-gradient(180deg, rgba(5, 28, 44, 0.62) 0%, rgba(5, 28, 44, 0) 100%);
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease, backdrop-filter 0.35s ease;
}

#site-header.is-scrolled #main-navbar {
  background: rgba(11, 57, 84, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(5, 28, 44, 0.45);
}

.nav-link {
  position: relative;
  transition: color 0.25s ease;
}

.nav-link.active-link {
  color: #5eead4;
}

/* ==========================================================================
   Hero Ken Burns & Overlays
   ========================================================================== */
@keyframes heroKenBurns {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.06) translate3d(-0.8%, -0.5%, 0);
  }
  100% {
    transform: scale(1) translate3d(0, 0, 0);
  }
}

.hero-ken-burns {
  animation: heroKenBurns 26s ease-in-out infinite;
  will-change: transform;
}

.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(5, 28, 44, 0.72) 0%,
    rgba(11, 57, 84, 0.48) 42%,
    rgba(5, 28, 44, 0.84) 100%
  );
}

/* ==========================================================================
   Assinaturas Visuais — Linhas Tropicais & Glass Booking
   ========================================================================== */
.accent-line::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest-600) 0%, var(--ocean-700) 65%, transparent 100%);
}

.accent-line-center::after {
  content: '';
  display: block;
  width: 78px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, var(--forest-600) 50%, transparent 100%);
}

.glass-booking {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 48px -18px rgba(11, 57, 84, 0.24), 0 0 0 1px rgba(11, 57, 84, 0.06);
  position: relative;
}

.glass-booking::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--ocean-900) 0%, var(--forest-600) 55%, var(--sun-500) 100%);
}

@keyframes bookingHighlight {
  0% {
    box-shadow: 0 24px 48px -18px rgba(11, 57, 84, 0.24), 0 0 0 0 rgba(13, 148, 136, 0.55);
  }
  55% {
    box-shadow: 0 24px 52px -14px rgba(11, 57, 84, 0.3), 0 0 0 14px rgba(13, 148, 136, 0);
  }
  100% {
    box-shadow: 0 24px 48px -18px rgba(11, 57, 84, 0.24), 0 0 0 0 rgba(13, 148, 136, 0);
  }
}

.highlight-booking-card {
  animation: bookingHighlight 1.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16) !important;
  background-color: #fef2f2 !important;
}

/* ==========================================================================
   Filtros e Miniaturas de Acomodações
   ========================================================================== */
.room-filter-btn {
  transition: all 0.25s ease;
}

.room-filter-btn.is-active {
  background-color: var(--ocean-900);
  color: #ffffff;
  border-color: var(--ocean-900);
  box-shadow: 0 8px 20px -8px rgba(11, 57, 84, 0.5);
}

.room-thumb {
  transition: all 0.2s ease;
  opacity: 0.72;
}

.room-thumb:hover {
  opacity: 1;
}

.room-thumb.is-selected {
  opacity: 1;
  box-shadow: 0 0 0 2.5px var(--forest-600);
}

.room-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px -18px rgba(11, 57, 84, 0.18);
}

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

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

.reveal-delay-100 { transition-delay: 90ms; }
.reveal-delay-200 { transition-delay: 180ms; }
.reveal-delay-300 { transition-delay: 270ms; }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-content > div {
  overflow: hidden;
}

.faq-item.faq-open .faq-content {
  grid-template-rows: 1fr;
}

.faq-item.faq-open .faq-chevron {
  transform: rotate(180deg);
}

/* ==========================================================================
   Pulso Flutuante de Reserva
   ========================================================================== */
@keyframes floatPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(13, 148, 136, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0);
  }
}

.booking-float-pulse {
  animation: floatPulse 2.5s infinite;
}

/* ==========================================================================
   Lightbox Modal
   ========================================================================== */
#lightbox-modal {
  transition: opacity 0.25s ease;
}

#lightbox-modal.is-hidden {
  opacity: 0;
  pointer-events: none;
}

#lightbox-modal:not(.is-hidden) {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Preferência de Movimento Reduzido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-ken-burns,
  .booking-float-pulse,
  .highlight-booking-card {
    animation: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
