/* =========================================================
   Chalé Serra Alta — Prototype styling
   ========================================================= */

:root{
  --color-bg: #0d0e0c;
  --color-bg-alt: #14150f;
  --color-cream: #f3ede1;
  --color-cream-dim: rgba(243,237,225,.7);
  --color-gold: #c8a165;
  --color-gold-light: #e0c48f;
  --color-forest: #2f3b2f;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Jost', sans-serif;
  --ease: cubic-bezier(.25,.8,.25,1);
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  background: var(--color-bg);
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-weight: 300;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6{
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-cream);
  letter-spacing: .01em;
}

a{ text-decoration: none; }

::selection{ background: var(--color-gold); color: #14150f; }

/* Scrollbar */
::-webkit-scrollbar{ width: 8px; }
::-webkit-scrollbar-track{ background: var(--color-bg); }
::-webkit-scrollbar-thumb{ background: var(--color-gold); border-radius: 4px; }

/* Grain overlay for cinematic texture */
.grain-overlay{
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* =========== Preloader =========== */
#preloader{
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s var(--ease);
}
#preloader.loaded{ opacity: 0; visibility: hidden; }
.preloader-inner{ text-align: center; }
.preloader-icon{
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin-bottom: 18px;
  animation: preloaderPulse 1.8s ease-in-out infinite;
}
@keyframes preloaderPulse{
  0%, 100%{ transform: scale(1); opacity: 1; }
  50%{ transform: scale(1.06); opacity: .85; }
}
.preloader-text{
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: .12em;
  color: var(--color-cream);
}
.preloader-text span{ color: var(--color-gold); }
.preloader-line{
  width: 0;
  height: 1px;
  background: var(--color-gold);
  margin: 18px auto 0;
  animation: growLine 1.6s var(--ease) forwards .3s;
}
@keyframes growLine{ to{ width: 140px; } }

/* =========== Navbar =========== */
#mainNav{
  padding: 22px 0;
  transition: all .4s var(--ease);
  background: transparent;
}
#mainNav.scrolled{
  padding: 12px 0;
  background: rgba(13,14,12,.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.navbar-brand{
  display: flex;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--color-cream) !important;
  letter-spacing: .05em;
}
.navbar-icon{
  width: 34px;
  height: 34px;
  border-radius: 9px;
  margin-right: 10px;
}
.navbar-brand .navbar-highlight{ color: var(--color-gold); }
.nav-link{
  color: var(--color-cream-dim) !important;
  font-size: .92rem;
  letter-spacing: .03em;
  margin: 0 6px;
  position: relative;
  transition: color .3s;
}
.nav-link::after{
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--color-gold);
  transition: width .3s var(--ease);
}
.nav-link:hover{ color: var(--color-cream) !important; }
.nav-link:hover::after{ width: 100%; }

.btn-outline-gold{
  border: 1px solid var(--color-gold);
  color: var(--color-gold-light) !important;
  border-radius: 2px;
  padding: 8px 22px;
  font-size: .88rem;
  letter-spacing: .05em;
  transition: all .35s var(--ease);
}
.btn-outline-gold:hover{
  background: var(--color-gold);
  color: #14150f !important;
}

.btn-gold{
  background: var(--color-gold);
  color: #14150f;
  border: 1px solid var(--color-gold);
  border-radius: 2px;
  letter-spacing: .05em;
  font-weight: 500;
  transition: all .35s var(--ease);
}
.btn-gold:hover{
  background: transparent;
  color: var(--color-gold-light);
}

.btn-ghost{
  border: 1px solid rgba(243,237,225,.4);
  color: var(--color-cream) !important;
  border-radius: 2px;
  letter-spacing: .05em;
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(6px);
  transition: all .35s var(--ease);
}
.btn-ghost:hover{
  border-color: var(--color-cream);
  background: rgba(255,255,255,.1);
}

/* =========== Hero =========== */
.hero-section{
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom{
  from{ transform: scale(1.08); }
  to{ transform: scale(1); }
}
.hero-overlay{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,8,.55) 0%, rgba(10,10,8,.35) 40%, rgba(10,10,8,.85) 100%);
}
.hero-content{
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}
.hero-kicker{
  color: var(--color-gold-light);
  letter-spacing: .35em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: 18px;
}
.hero-title{
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.hero-title em{
  font-style: italic;
  color: var(--color-gold-light);
}
.hero-subtitle{
  font-size: 1.15rem;
  color: var(--color-cream-dim);
  max-width: 560px;
  margin: 18px auto 0;
  font-weight: 300;
}

.scroll-cue{
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid rgba(243,237,225,.6);
  border-radius: 20px;
  z-index: 2;
}
.scroll-cue span{
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  background: var(--color-gold-light);
  border-radius: 50%;
  animation: scrollCue 1.8s infinite;
}
@keyframes scrollCue{
  0%{ opacity: 1; top: 8px; }
  70%{ opacity: 0; top: 24px; }
  100%{ opacity: 0; top: 8px; }
}

/* =========== Section generic =========== */
section{ position: relative; padding: 130px 0; }
.section-kicker{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: .78rem;
  margin-bottom: 14px;
}
.section-kicker::before{
  content: '';
  width: 28px; height: 1px;
  background: var(--color-gold);
}
.section-kicker.justify-content-center::before{ display:none; }
.section-title{
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  margin-bottom: 6px;
}
.section-text{
  color: var(--color-cream-dim);
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 300;
}

/* =========== About =========== */
.section-about{ background: var(--color-bg); }
.about-img-wrap{ position: relative; }
.about-img-main{
  width: 100%;
  height: 480px;
  object-fit: cover;
}
.about-img-float{
  position: absolute;
  top: -50px;
  left: -30px;
  width: 55%;
  height: 220px;
  object-fit: cover;
  border: 6px solid var(--color-bg);
  box-shadow: 0 25px 60px rgba(0,0,0,.5);
}
/* =========== Rooms =========== */
.section-rooms{ background: var(--color-bg-alt); }
.room-card{
  border-radius: 6px;
  overflow: hidden;
  background: #101109;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  transition: transform .5s var(--ease);
}
.room-card:hover{ transform: translateY(-10px); }
.room-img{
  height: 320px;
  background-size: cover;
  background-position: center;
  transition: transform .8s var(--ease);
}
.room-card:hover .room-img{ transform: scale(1.08); }
.room-info{ padding: 20px; }
.room-info h5{ margin-bottom: 4px; font-size: 1.25rem; }
.room-info p{ color: var(--color-cream-dim); font-size: .88rem; margin: 0; }

/* =========== Parallax break =========== */
.parallax-break{
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.parallax-overlay{
  position: absolute; inset: 0;
  background: rgba(10,10,8,.55);
}
.parallax-content{ position: relative; z-index: 1; padding: 0 20px; }
.parallax-quote{
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  font-style: italic;
  color: #fff;
  max-width: 900px;
  line-height: 1.4;
}

/* =========== Amenities =========== */
.section-amenities{ background: var(--color-bg); }
.amenity-icon{
  font-size: 2.2rem;
  color: var(--color-gold);
  margin-bottom: 14px;
  display: inline-block;
  transition: transform .4s var(--ease);
}
svg.amenity-icon{ width: 1em; height: 1em; }
.col-6:hover .amenity-icon, .col-md-4:hover .amenity-icon{ transform: translateY(-6px); }
.section-amenities h6{ font-size: .92rem; font-weight: 400; color: var(--color-cream-dim); }

/* =========== Gallery =========== */
.section-gallery{ background: var(--color-bg-alt); }
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 6px;
  padding: 0 6px;
}
.gallery-item{
  position: relative;
  overflow: hidden;
  cursor: pointer;
  grid-column: span 1;
  grid-row: span 1;
}
.gallery-item.item-tall{ grid-row: span 2; }
.gallery-item.item-wide{ grid-column: span 2; }
.gallery-item img{
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .5s;
  filter: grayscale(15%);
}
.gallery-item:hover img{ transform: scale(1.1); filter: grayscale(0%); }
.gallery-overlay{
  position: absolute; inset: 0;
  background: rgba(10,10,8,0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem;
  opacity: 0;
  transition: all .4s;
}
.gallery-item:hover .gallery-overlay{
  opacity: 1;
  background: rgba(10,10,8,.35);
}
.lightbox-content{ background: transparent; border: none; }
.lightbox-content img{ width: 100%; border-radius: 4px; }
.lightbox-close{ position: absolute; top: -40px; right: 0; z-index: 2; }
.modal-backdrop.show{ opacity: .92; background: #0d0e0c; }

@media (max-width: 767px){
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-item.item-wide{ grid-column: span 2; }
}

/* =========== Testimonials =========== */
.section-testimonials{
  background: var(--color-forest);
  background: linear-gradient(160deg, #1a2018, #0d0e0c 70%);
}
.testimonial-card{
  max-width: 700px;
  text-align: center;
  padding: 20px;
}
.quote-icon{
  font-size: 2.6rem;
  color: var(--color-gold);
  margin-bottom: 10px;
  display: inline-block;
}
.testimonial-text{
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 22px;
}
.testimonial-author{ margin-bottom: 2px; }
.testimonial-role{ color: var(--color-cream-dim); font-size: .85rem; }
.carousel-dots{ display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.carousel-dots button{
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(243,237,225,.3);
  transition: background .3s;
}
.carousel-dots button.active{ background: var(--color-gold); }

/* =========== Location =========== */
.section-location{ padding: 0; background: var(--color-bg); }
.location-img{
  min-height: 480px;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.location-content{ padding: 90px 60px; }
.location-list{ list-style: none; padding: 0; margin-top: 20px; }
.location-list li{
  color: var(--color-cream-dim);
  padding: 10px 0;
  border-bottom: 1px solid rgba(243,237,225,.1);
}
.location-list i{ color: var(--color-gold); margin-right: 10px; }

@media (max-width: 991px){
  .location-img{ min-height: 320px; }
  .location-content{ padding: 60px 24px; }
}

/* =========== Reserva / CTA =========== */
.section-reserva{
  background-image: url('../img/reserva-bg-entardecer.jpg');
  background-size: cover;
  background-position: center;
}
.reserva-overlay{
  position: absolute; inset: 0;
  background: rgba(9,10,8,.82);
}
.reserva-form{ position: relative; }
.reserva-form label{
  color: var(--color-cream-dim);
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.reserva-form .form-control,
.reserva-form .form-select{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(243,237,225,.2);
  color: #fff;
  border-radius: 2px;
  padding: 12px 14px;
}
.reserva-form .form-control::placeholder{ color: rgba(243,237,225,.4); }
.reserva-form .form-control:focus,
.reserva-form .form-select:focus{
  background: rgba(255,255,255,.09);
  border-color: var(--color-gold);
  box-shadow: none;
  color: #fff;
}
.reserva-form .form-select option{ color: #14150f; }
.form-note{
  color: rgba(243,237,225,.45);
  font-size: .78rem;
  font-style: italic;
}

/* =========== Footer =========== */
.site-footer{ background: #0a0b09; padding: 80px 0 0; }
.footer-brand{
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-cream) !important;
}
.footer-brand span{ color: var(--color-gold); }
.footer-text{ color: var(--color-cream-dim); font-size: .92rem; margin-top: 12px; }
.footer-heading{
  color: var(--color-cream);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}
.footer-links{ list-style: none; padding: 0; }
.footer-links li{ color: var(--color-cream-dim); font-size: .9rem; margin-bottom: 10px; }
.footer-links a{ color: var(--color-cream-dim); transition: color .3s; }
.footer-links a:hover{ color: var(--color-gold); }
.social-icons{ margin-top: 18px; display: flex; gap: 12px; }
.social-icons a{
  width: 38px; height: 38px;
  border: 1px solid rgba(243,237,225,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-cream);
  transition: all .3s;
}
.social-icons a:hover{ background: var(--color-gold); border-color: var(--color-gold); color: #14150f; }
.footer-divider{ border-color: rgba(243,237,225,.1); margin-top: 60px; }
.footer-copy{ color: rgba(243,237,225,.4); font-size: .8rem; }
.footer-credit-link{ color: var(--color-gold); transition: color .3s; }
.footer-credit-link:hover{ color: var(--color-gold-light); }

/* =========== Back to top =========== */
#backToTop{
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  background: rgba(13,14,12,.8);
  color: var(--color-gold-light);
  font-size: 1.1rem;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .35s var(--ease);
}
#backToTop.show{ opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover{ background: var(--color-gold); color: #14150f; }
