:root {
  --ink: #16191a;
  --forest: #1d2723;
  --cream: #f5f0e8;
  --sand: #ebe3d6;
  --gold: #b08d57;
  --gold-light: #cfb187;
  --muted: #6d665b;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --side: 248px;
  --pad-y: clamp(1.5rem, 6vh, 4.5rem);
  --pad-x: clamp(1.5rem, 4vw, 4.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(.92rem, .6rem + .9vh, 1.05rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.05; }
/* Los títulos escalan con el alto de la pantalla para que cada panel entre completo */
h2 { font-size: clamp(2rem, 1rem + 4.5vh, 3.8rem); margin-bottom: clamp(.75rem, 2.5vh, 1.5rem); }
h2 em { display: block; }
h3 { font-size: clamp(1.3rem, .8rem + 1.8vh, 1.9rem); }
em { font-style: italic; color: var(--gold); }

.label {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(.75rem, 2.5vh, 1.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.label span { color: var(--gold); }
.label span::after { content: ""; display: inline-block; width: 2rem; height: 1px; background: var(--gold); vertical-align: middle; margin-left: 1rem; }
.label-light { color: rgba(255,255,255,.75); }

.btn {
  display: inline-block;
  padding: .95rem 1.9rem;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn-gold { background: var(--gold); color: #fff; border: 1px solid var(--gold); }
.btn-gold:hover { background: transparent; border-color: var(--gold-light); color: var(--gold-light); }
.btn-ghost { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }

.link-arrow {
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--gold);
  padding-bottom: .3rem;
  display: inline-flex;
  gap: .75rem;
  transition: gap .4s var(--ease);
}
.link-arrow::after { content: "→"; color: var(--gold); }
.link-arrow:hover { gap: 1.25rem; }

/* ---------- Menú lateral ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side);
  z-index: 30;
  background: var(--forest);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 5vh, 3rem) 2rem;
}

.brand { display: block; margin-bottom: clamp(1.5rem, 6vh, 4rem); }
.brand-name { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1; font-weight: 400; }
.brand-sub { display: block; font-size: .6rem; letter-spacing: .4em; text-transform: uppercase; color: var(--gold-light); margin-top: .75rem; }

.sidebar-menu { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }

.nav { display: flex; flex-direction: column; gap: clamp(.15rem, 1vh, .6rem); }
.nav a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(245,240,232,.6);
  padding: .3rem 0;
  transition: color .3s, padding-left .4s var(--ease);
}
.nav a span { font-family: var(--serif); font-style: italic; font-size: .95rem; letter-spacing: 0; color: var(--gold); opacity: .7; }
.nav a:hover { color: var(--cream); }
.nav a.is-active { color: var(--cream); padding-left: .5rem; }
.nav a.is-active span { opacity: 1; }

.sidebar-foot .btn { display: block; margin-bottom: 1.25rem; }
.social { display: flex; justify-content: space-between; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(245,240,232,.6); }
.social a:hover { color: var(--gold-light); }

.burger { display: none; }

/* ---------- Paneles: cada sección ocupa la pantalla ---------- */
.content { margin-left: var(--side); }

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
}

/* ---------- Portada ---------- */
.hero { color: #fff; display: flex; align-items: flex-end; }
.hero-slides, .slide { position: absolute; inset: 0; }
.slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 2s var(--ease);
}
.slide.is-active { opacity: 1; animation: kenburns 9s linear forwards; }
.slide:nth-child(2) { background-position: center 70%; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.14); } }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,14,12,.65) 0%, rgba(10,14,12,.25) 55%, rgba(10,14,12,.1) 100%),
              linear-gradient(0deg, rgba(10,14,12,.55) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 2; padding: var(--pad-y) var(--pad-x) clamp(2.5rem, 10vh, 6rem); max-width: 52rem; }
.eyebrow { font-size: .74rem; letter-spacing: .4em; text-transform: uppercase; margin-bottom: clamp(.75rem, 3vh, 1.5rem); color: var(--gold-light); }
.hero h1 { font-size: clamp(3rem, 1rem + 9vh, 7.5rem); margin-bottom: clamp(.75rem, 3vh, 1.5rem); }
.hero h1 em { color: var(--gold-light); display: block; }
.hero-lead { font-size: clamp(1rem, .7rem + 1vh, 1.2rem); max-width: 30rem; margin-bottom: clamp(1.25rem, 4vh, 2.5rem); opacity: .9; }

.fade-in { opacity: 0; transform: translateY(24px); animation: fadeUp 1.4s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.hero-dots { position: absolute; z-index: 2; right: var(--pad-x); bottom: clamp(2.5rem, 10vh, 6rem); display: flex; gap: .6rem; }
.hero-dots span { width: 2.2rem; height: 1px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.hero-dots span.is-active::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: progress 7s linear forwards; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.scroll-cue { position: absolute; z-index: 2; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .6rem; color: #fff; }
.scroll-cue small { font-size: .62rem; letter-spacing: .35em; text-transform: uppercase; padding-left: .35em; opacity: .85; }
.scroll-cue i { position: relative; display: block; width: 1px; height: clamp(3rem, 9vh, 5rem); background: rgba(255,255,255,.35); overflow: hidden; }
.scroll-cue span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--gold-light); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- Pantalla dividida ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split-media { position: relative; overflow: hidden; }
.split-media img, .split-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 5vh, 3rem);
  padding: var(--pad-y) var(--pad-x);
}
.split-text p { color: var(--muted); max-width: 30rem; margin-bottom: .8rem; }
.split-alt { background: var(--sand); }
.map iframe { filter: grayscale(.85) sepia(.2) contrast(1.05); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 1px solid rgba(0,0,0,.12); padding-top: clamp(1rem, 3vh, 1.75rem); }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat strong { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 1rem + 3vh, 2.8rem); line-height: 1; color: var(--gold); }
.stat span { font-size: .78rem; color: var(--muted); line-height: 1.45; }
a.stat:hover strong { color: var(--ink); }

.arrive-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: clamp(.75rem, 2.5vh, 1.5rem) 0 clamp(1.25rem, 4vh, 2rem); }
.arrive-options h3 { font-size: clamp(1.2rem, .8rem + 1.4vh, 1.5rem); margin-bottom: .35rem; }
.arrive-options p { font-size: .88rem; }

/* ---------- Cabañas ---------- */
.cabins {
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x);
}
.panel-head h2 em { display: inline; }
.cabin-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3vw, 2.5rem); min-height: 0; }
.cabin { display: flex; flex-direction: column; min-height: 0; }
.cabin figure { flex: 1; min-height: 180px; position: relative; overflow: hidden; }
.cabin figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.cabin:hover figure img { transform: scale(1.05); }
.cabin-text { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .25rem 1.5rem; padding-top: clamp(.75rem, 2.5vh, 1.25rem); }
.cabin-text h3 span { font-style: italic; color: var(--gold); font-size: .7em; margin-right: .4rem; }
.cabin-text p { color: var(--muted); font-size: .9rem; grid-column: 1; }
.cabin-text .link-arrow { grid-column: 2; grid-row: 1 / 3; }

/* ---------- Mosaico interior ---------- */
.mosaic {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
}
.mosaic figure { position: relative; overflow: hidden; }
.mosaic figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-big { grid-row: 1 / 3; }
.m-text {
  grid-column: 2 / 4;
  background: var(--forest);
  color: var(--cream);
  padding: clamp(1.25rem, 5vh, 3rem) clamp(1.5rem, 3vw, 3rem);
  display: flex;
  align-items: center;
}
.m-text .label { color: rgba(245,240,232,.6); }
.amenities { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.amenities li {
  font-family: var(--serif);
  font-size: clamp(1.05rem, .7rem + 1.3vh, 1.35rem);
  padding: clamp(.3rem, 1.1vh, .6rem) 0;
  border-bottom: 1px solid rgba(245,240,232,.12);
}
.amenities li::before { content: "—"; color: var(--gold); margin-right: .6rem; }

/* ---------- Pantalla completa ---------- */
.fullbleed, .booking { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.fullbleed::after, .booking::after { content: ""; position: absolute; inset: 0; background: rgba(10,14,12,.4); }
.fullbleed > *:not(.bg), .booking > *:not(.bg) { position: relative; z-index: 2; }
.fullbleed-caption .label, .booking .label { justify-content: center; }
.fullbleed-caption h2 { font-size: clamp(2.6rem, 1rem + 7vh, 5.6rem); }
.fullbleed em, .booking em { color: var(--gold-light); }

/* ---------- Experiencias ---------- */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
}
.exp-intro {
  background: var(--forest);
  color: var(--cream);
  padding: clamp(1.25rem, 5vh, 3rem) clamp(1.5rem, 3vw, 3rem);
  display: flex;
  align-items: center;
}
.exp-intro .label { color: rgba(245,240,232,.6); }
.exp-intro em { color: var(--gold-light); }
.exp-intro p:not(.label) { color: rgba(245,240,232,.7); }
.exp { position: relative; overflow: hidden; }
.exp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.exp::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8,12,10,.8)); }
.exp:hover img { transform: scale(1.07); }
.exp-caption { position: absolute; z-index: 2; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; color: #fff; }
.exp-caption p { font-size: .85rem; opacity: 0; max-height: 0; transition: opacity .5s var(--ease), max-height .5s var(--ease); }
.exp:hover .exp-caption p { opacity: .85; max-height: 3rem; }

/* ---------- Galería ---------- */
/* Alto fijo de pantalla: las fotos se ajustan a la fila sobrante sin recortarse */
.gallery {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  padding: var(--pad-y) 0;
}
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; padding: 0 var(--pad-x) clamp(1rem, 3vh, 2rem); }
.gallery-head h2 { margin-bottom: 0; }
.gallery-nav { display: flex; align-items: center; gap: .75rem; }
.gallery-nav .link-arrow { margin-right: 1.25rem; }
.gallery-nav button {
  width: 3rem; height: 3rem;
  border: 1px solid rgba(0,0,0,.25);
  background: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  transition: background .4s, color .4s, border-color .4s;
}
.gallery-nav button:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.gallery-track {
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad-x);
  padding: 0 var(--pad-x);
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img {
  height: 100%;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  scroll-snap-align: start;
  cursor: zoom-in;
  transition: opacity .4s;
}
.gallery-track img:hover { opacity: .88; }

/* ---------- Reservas + pie ---------- */
.booking { flex-direction: column; }
.booking::after { background: rgba(10,14,12,.58); }
.booking-content { max-width: 44rem; padding: var(--pad-y) var(--pad-x); margin: auto 0; }
.booking h2 em { display: inline; }
.booking-content > p:not(.label):not(.platforms) { opacity: .85; margin-bottom: clamp(1.25rem, 4vh, 2.25rem); }
.booking-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: clamp(1.25rem, 4vh, 2rem); }
.platforms { font-size: .8rem; letter-spacing: .06em; opacity: .75; }
.platforms a { border-bottom: 1px solid rgba(255,255,255,.35); }
.platforms a:hover { border-color: #fff; }

.footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  padding: 1.25rem var(--pad-x);
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .75rem;
  letter-spacing: .05em;
  color: rgba(255,255,255,.65);
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer a:hover { color: var(--gold-light); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(12,14,13,.95); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; }
.lightbox-close { position: absolute; top: 1rem; right: 1.5rem; background: none; border: 0; color: #fff; font-size: 2.5rem; font-weight: 200; cursor: pointer; }

/* ---------- Animaciones al entrar en pantalla ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .zoom-in img, .js .zoom-in.bg { transform: scale(1.12); transition: transform 2.4s var(--ease); }
.js .zoom-in.is-visible img, .js .zoom-in.bg.is-visible { transform: scale(1); }

/* ---------- Tablet y celular: el menú lateral pasa a barra superior ---------- */
@media (max-width: 900px) {
  :root { --bar: 64px; }
  html { scroll-snap-type: none; }

  .sidebar { inset: 0 0 auto 0; width: auto; height: var(--bar); flex-direction: row; align-items: center; justify-content: space-between; padding: 0 1.25rem; }
  .brand { margin: 0; }
  .brand-name { font-size: 1.3rem; }
  .brand-name br { display: none; }
  .brand-sub { display: none; }

  .burger { display: block; width: 2rem; height: 1.2rem; background: none; border: 0; position: relative; cursor: pointer; color: var(--cream); }
  .burger span { position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
  .burger span:first-child { top: 25%; }
  .burger span:last-child { top: 75%; }
  .burger[aria-expanded="true"] span:first-child { top: 50%; transform: rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { top: 50%; transform: rotate(-45deg); }

  .sidebar-menu {
    position: fixed;
    inset: var(--bar) 0 0 0;
    background: var(--forest);
    padding: 2rem 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s var(--ease);
  }
  .sidebar-menu.is-open { opacity: 1; pointer-events: auto; }
  .nav a { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .01em; text-transform: none; }

  .content { margin-left: 0; padding-top: var(--bar); }
  .panel { min-height: 0; }
  .hero { min-height: calc(100svh - var(--bar)); }
  .hero-content { padding-bottom: 6.5rem; }
  .scroll-cue i { height: 3.5rem; }
  .hero-dots { display: none; }
  .fullbleed { min-height: 70svh; }
  .booking { min-height: 100svh; }

  .split, .split-alt { grid-template-columns: 1fr; }
  .split-media { height: 55svh; }
  .split-alt .split-media { order: 2; }
  .split-text { padding: 3rem 1.5rem; }

  .cabins { padding: 3rem 1.5rem; }
  .cabin-grid { grid-template-columns: 1fr; }
  .cabin figure { flex: none; height: 50svh; }

  .mosaic { height: auto; min-height: 0; grid-template-columns: 1fr 1fr; grid-template-rows: 55svh 30svh auto; }
  .m-big { grid-row: auto; grid-column: 1 / 3; }
  .m-text { grid-column: 1 / 3; padding: 2.5rem 1.5rem; }

  .exp-grid { height: auto; min-height: 0; grid-template-columns: 1fr 1fr; grid-template-rows: auto; grid-auto-rows: 45svh; }
  .exp-intro { grid-column: 1 / 3; padding: 3rem 1.5rem; }
  .exp-caption p { opacity: .85; max-height: none; }

  .gallery { height: auto; min-height: 0; padding: 3rem 0; }
  .gallery-track { height: 55svh; }
  .gallery-nav button { display: none; }
  .gallery-nav .link-arrow { margin-right: 0; }

  .footer { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  .amenities { grid-template-columns: 1fr; }
  .arrive-options { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .exp-grid { grid-template-columns: 1fr; grid-auto-rows: 50svh; }
  .exp-intro { grid-column: auto; }
  .gallery-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .fade-in { opacity: 1; transform: none; }
  .js .zoom-in img, .js .zoom-in.bg { transform: none; }
  .slide.is-active { transform: none; }
}
