/* =====================================================================
   Casa Malaika — rediseño
   Concepto: "una ventana al bosque". Paleta cerrada de 5 colores.
   ===================================================================== */

:root {
  /* Paleta (exclusiva) */
  --ink: #001314;
  --pine: #0b6e4f;
  --ember: #d96c06;
  --plum: #773344;
  --mist: #eef0f2;

  /* Derivados por transparencia (misma paleta) */
  --ink-80: rgba(0, 19, 20, .8);
  --ink-70: rgba(0, 19, 20, .7);
  --ink-60: rgba(0, 19, 20, .6);
  --ink-08: rgba(0, 19, 20, .08);
  --line: rgba(0, 19, 20, .16);
  --mist-75: rgba(238, 240, 242, .75);
  --mist-60: rgba(238, 240, 242, .6);
  --line-dark: rgba(238, 240, 242, .18);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --header-h: 72px;
  --section-y: clamp(5rem, 12vw, 11rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --fs-xl: clamp(3rem, 8.2vw, 8.5rem);
  --fs-1: clamp(2.5rem, 5.6vw, 5.4rem);
  --fs-lead: clamp(1.2rem, 1.6vw, 1.45rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; }
::selection { background: var(--plum); color: var(--mist); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 400; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; }
.on-dark :focus-visible, .lightbox :focus-visible { outline-color: var(--ember); }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: 1rem; top: -5rem; z-index: 300;
  padding: .9em 1.2em; background: var(--ink); color: var(--mist);
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Tipografía de sección ---------- */
.kicker {
  display: flex; align-items: center; gap: .9rem;
  margin: 0 0 1.6rem;
  font-family: var(--mono); font-size: .875rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-70);
}
.kicker span { color: var(--plum); }
.kicker::after { content: ""; flex: 0 0 3.5rem; height: 1px; background: currentColor; opacity: .5; }
.on-dark .kicker { color: var(--mist-75); }
.on-dark .kicker span { color: var(--ember); }

.section-title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 460;
  font-size: var(--fs-1);
  line-height: .98;
  letter-spacing: -.03em;
  margin-bottom: 2rem;
  text-wrap: balance;
}
.section-title--xl { font-size: var(--fs-xl); line-height: .92; letter-spacing: -.035em; }
.section-title em { font-style: italic; font-weight: 420; color: var(--plum); }
.on-dark .section-title em { color: var(--ember); }

.lead { font-size: var(--fs-lead); line-height: 1.45; text-wrap: pretty; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 0 1.5rem;
  border: 1px solid transparent; border-radius: 2px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: .005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.on-dark .btn-primary:hover { background: var(--mist); color: var(--ink); }
.btn-line { border-color: currentColor; color: inherit; background: transparent; }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: var(--mist); }
.on-dark .btn-line:hover { background: var(--mist); border-color: var(--mist); color: var(--ink); }
.btn-arrow { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 1.1rem; font-size: .95rem; }
.wa-icon { width: 1.2em; height: 1.2em; flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5em;
  min-height: 44px;
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em;
  transition: text-underline-offset .3s var(--ease), color .3s;
}
.link-arrow:hover { text-underline-offset: .55em; color: var(--pine); }

.round-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s;
}
.round-btn:hover:not(:disabled) { background: var(--ink); color: var(--mist); border-color: var(--ink); }
.round-btn:disabled { opacity: .3; cursor: not-allowed; }
.on-dark .round-btn { border-color: var(--line-dark); }
.on-dark .round-btn:hover:not(:disabled) { background: var(--mist); color: var(--ink); border-color: var(--mist); }

.text-btn {
  min-height: 44px; padding: 0 .25rem;
  border: none; background: none; cursor: pointer;
  font-weight: 600; text-decoration: underline; text-underline-offset: .3em;
}
.text-btn:hover { color: var(--plum); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
.site-header.is-solid { background: var(--mist); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 400; letter-spacing: -.02em;
  text-decoration: none; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.wordmark { transition: opacity .4s var(--ease), visibility .4s; }
/* arriba de todo el nombre ya está gigante en la portada */
.js .site-header:not(.is-solid) .wordmark { opacity: 0; visibility: hidden; }
.nav { display: flex; align-items: center; gap: .5rem; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem;
  font-weight: 500; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-repeat: no-repeat; background-position: .9rem 72%;
  transition: background-size .35s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="true"] { background-size: calc(100% - 1.8rem) 1px; }
.nav-cta {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.2rem;
  background: var(--pine); color: #fff; font-weight: 600; text-decoration: none; border-radius: 2px;
  transition: background .3s var(--ease);
}
.nav-cta:hover { background: var(--ink); }

/* ---------- Portada: la ventana ---------- */
.hero {
  position: relative;
  --p: 0;     /* apertura de la ventana 0 → 1 */
  --c: 0;     /* aparición del epígrafe */
  /* posición de la ventana, como recorte desde cada borde */
  --wt: 30%; --wr: 12%; --wb: 9%; --wl: 57%;
  /* encuadre de la foto dentro de la ventana cerrada */
  --s0: .6; --qx: 45%; --qy: 52%;
}
.js .hero { height: 165svh; }
.hero-pin {
  position: relative;
  height: 100svh; min-height: 560px;
  overflow: hidden;
}
.js .hero-pin { position: sticky; top: 0; }

.hero-media {
  position: absolute; inset: 0;
  clip-path: inset(
    calc(var(--wt) * (1 - var(--p)))
    calc(var(--wr) * (1 - var(--p)))
    calc(var(--wb) * (1 - var(--p)))
    calc(var(--wl) * (1 - var(--p)))
  );
  will-change: clip-path;
  z-index: 2;
}
/* Con la ventana cerrada la foto se achica alrededor del centro de la
   ventana y se desplaza para que el punto --qx/--qy (la vista al valle)
   quede encuadrado. Al abrirse vuelve a escala 1 y sin desplazamiento. */
.hero-media img {
  --ox: calc(var(--wl) + (100% - var(--wl) - var(--wr)) / 2);
  --oy: calc(var(--wt) + (100% - var(--wt) - var(--wb)) / 2);
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%;
  transform-origin: var(--ox) var(--oy);
  transform:
    translate(
      calc((1 - var(--p)) * var(--s0) * (var(--ox) - var(--qx))),
      calc((1 - var(--p)) * var(--s0) * (var(--oy) - var(--qy)))
    )
    scale(calc(var(--s0) + (1 - var(--s0)) * var(--p)));
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,19,20,.62), rgba(0,19,20,0) 38%);
  opacity: var(--c);
}

.hero-title {
  position: absolute; z-index: 1;
  top: calc(var(--header-h) + 5svh); left: var(--gutter); right: var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; column-gap: .25em;
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 440;
  font-size: clamp(2.8rem, 7vw, 7.5rem);
  line-height: .95; letter-spacing: -.03em;
  pointer-events: none;
}
.hero-word { display: block; will-change: transform; }
.hero-word--a { transform: translateX(calc(var(--p) * -14vw)); }
.hero-word--b { transform: translateX(calc(var(--p) * 14vw)); }

.hero-intro {
  position: absolute; z-index: 1;
  left: var(--gutter); bottom: calc(var(--wb) + 0px);
  width: min(36rem, calc(var(--wl) - var(--gutter) - 3rem));
  opacity: calc(1 - var(--p) * 2.6);
}
.hero-place { color: var(--ink-70); margin-bottom: 1.1rem; }
.hero-lead { font-size: clamp(1.1rem, 1.45vw, 1.35rem); line-height: 1.45; margin-bottom: 1.6rem; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.5rem; }
.hero-price { margin: 0; color: var(--ink-70); }
.hero-price strong { color: var(--ink); font-weight: 600; }
.hero-cue {
  display: inline-flex; align-items: center; gap: .8rem;
  margin-top: 2.2rem; min-height: 44px;
  text-decoration: none; color: var(--ink-70);
}
.hero-cue-line { position: relative; width: 1px; height: 38px; background: var(--line); overflow: hidden; }
.hero-cue-line::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink);
  animation: cue 2.4s var(--ease-in-out) infinite;
}
@keyframes cue { 0% { top: -40%; } 60%, 100% { top: 100%; } }
.hero.is-open .hero-intro { pointer-events: none; }

.hero-caption {
  position: absolute; z-index: 3;
  left: var(--gutter); right: var(--gutter); bottom: 1.6rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 0; color: var(--mist);
  opacity: var(--c); transform: translateY(calc((1 - var(--c)) * 12px));
}

.promo-chip {
  display: inline-block; margin-top: 1rem; padding: .5em .9em;
  border: 1px solid var(--pine); color: var(--pine); text-decoration: none; font-size: .95rem;
}

/* ---------- 01 Manifiesto ---------- */
.manifesto { padding: var(--section-y) 0 calc(var(--section-y) * .8); }
.manifesto-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2vw, 2rem); }
.manifesto .kicker { grid-column: 1 / -1; }
.manifesto-text {
  grid-column: 1 / 12;
  font-family: var(--serif); font-optical-sizing: auto; font-weight: 440;
  font-size: clamp(1.9rem, 4.3vw, 4.4rem); line-height: 1.08; letter-spacing: -.025em;
  margin-bottom: 2.5rem; text-wrap: pretty;
}
.manifesto-text .w { transition: opacity .5s var(--ease), color .5s var(--ease); }
.js .manifesto-text .w { opacity: .16; }
.js .manifesto-text .w.is-lit { opacity: 1; }
.manifesto-sign { grid-column: 7 / 13; font-size: var(--fs-lead); color: var(--ink-70); margin: 0; }
.manifesto-sign::before { content: "— "; color: var(--plum); }

/* ---------- Fotos editoriales ---------- */
.photo { margin: 0; }
.photo-frame { position: relative; overflow: hidden; background: var(--ink-08); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption {
  display: flex; gap: .9rem; align-items: baseline;
  margin-top: .8rem; font-size: .95rem; color: var(--ink-70);
}
.photo figcaption .mono { color: var(--plum); font-size: .8125rem; }
.on-dark .photo figcaption { color: var(--mist-75); }
.on-dark .photo figcaption .mono { color: var(--ember); }

/* Revelado tipo persiana: la foto se abre de abajo hacia arriba */
.js [data-reveal] .photo-frame { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); }
.js [data-reveal] .photo-frame img { transform: scale(1.12); transition: transform 1.8s var(--ease); }
.js [data-reveal].is-in .photo-frame { clip-path: inset(0 0 0 0); }
.js [data-reveal].is-in .photo-frame img { transform: scale(1); }
.js [data-reveal] figcaption { opacity: 0; transition: opacity .8s .5s var(--ease); }
.js [data-reveal].is-in figcaption { opacity: 1; }

/* ---------- 02 La casa ---------- */
.casa { padding-bottom: var(--section-y); }
.casa-grid { display: grid; grid-template-columns: 1fr; gap: 3.5rem; }
.casa-text .lead { margin-bottom: 2.5rem; max-width: 34ch; }

.ficha { margin: 0 0 2rem; border-top: 1px solid var(--line); }
.ficha > div {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem;
  padding: .95rem 0; border-bottom: 1px solid var(--line);
}
.ficha dt { font-family: var(--mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-70); padding-top: .2rem; }
.ficha dd { margin: 0; }

.casa-photos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2.4vw, 2.2rem); align-items: start; }
.photo--full { grid-column: 1 / -1; }
.photo--full .photo-frame { aspect-ratio: 4 / 5; }
.photo--wide .photo-frame { aspect-ratio: 4 / 3; }
.photo--half .photo-frame { aspect-ratio: 4 / 5; }
.photo--drop { margin-top: clamp(2rem, 8vw, 7rem); }

@media (min-width: 1024px) {
  .casa-grid { grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2vw, 2rem); gap: 0 clamp(1rem, 2vw, 2rem); }
  .casa-photos { grid-column: 1 / 8; grid-row: 1; }
  .casa-text { grid-column: 9 / 13; grid-row: 1; position: sticky; top: calc(var(--header-h) + 2.5rem); align-self: start; }
  .photo--full .photo-frame { aspect-ratio: 5 / 6; }
}

/* ---------- 03 El río ---------- */
.on-dark { background: var(--ink); color: var(--mist); }
.rio { padding: var(--section-y) 0; position: relative; }
.rio .section-title { max-width: 14ch; margin-bottom: clamp(3rem, 6vw, 5.5rem); }
.rio-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
.rio-text .lead { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.015em; font-weight: 440; margin-bottom: 1.5rem; }
.rio-text p { color: var(--mist-75); max-width: 44ch; }

.datos { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.5rem 0 0; border-top: 1px solid var(--line-dark); }
.datos > div { padding: 1.1rem 1rem 0 0; }
.datos > div + div { padding-left: 1rem; border-left: 1px solid var(--line-dark); }
.datos dt { font-family: var(--mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mist-60); margin-bottom: .35rem; }
.datos dd { margin: 0; font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.6rem); line-height: 1.15; }

.route { margin: 0; }
.route-svg { width: 100%; height: auto; display: block; overflow: hidden; }
.route figcaption { margin-top: .8rem; color: var(--mist-60); font-size: .8125rem; }
.route-contours path { stroke: var(--mist); stroke-opacity: .13; stroke-width: 1; }
.route-contours path.major { stroke-opacity: .28; }
.route-river { fill: none; stroke: var(--pine); stroke-width: 9; stroke-linecap: round; }
.route-river-label { fill: var(--mist); font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.route-path, .route-path-ghost { fill: none; stroke-linecap: round; stroke-width: 3; }
.route-path { stroke: var(--ember); stroke-dasharray: .1 9; }
.route-path-ghost { stroke: var(--mist); stroke-opacity: .12; stroke-dasharray: .1 9; }
.route-mask { fill: none; stroke: #fff; stroke-width: 14; stroke-dasharray: 1; stroke-dashoffset: var(--route-off, 0); }
.js .route-mask { stroke-dashoffset: var(--route-off, 1); }
.route-walker { fill: var(--ember); }
.route-home rect { fill: var(--ink); stroke: var(--mist); stroke-width: 1.5; }
.route-home path { stroke: var(--ember); stroke-width: 1.2; }
.route-label { fill: var(--mist); }
.route-label--home { font-family: var(--serif); font-style: italic; font-size: 22px; }
.route-label--mono { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; fill-opacity: .7; }
.route-time { fill: var(--ember); font-family: var(--serif); font-size: 46px; font-weight: 440; letter-spacing: -.02em; }

.rio-photos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(1rem, 2.4vw, 2.2rem);
  margin-top: clamp(4rem, 9vw, 8rem); align-items: start;
}
.rio-photo .photo-frame { aspect-ratio: 4 / 5; }
.rio-photo--a { grid-column: 1 / -1; }
.rio-photo--b { grid-column: 1 / 4; }
.rio-photo--c { grid-column: 4 / 7; margin-top: 3rem; }

@media (min-width: 1024px) {
  .rio-grid { grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2vw, 2rem); }
  .route { grid-column: 1 / 8; }
  .rio-text { grid-column: 9 / 13; }
  .rio-photos { grid-template-columns: repeat(12, 1fr); }
  .rio-photo--a { grid-column: 1 / 6; }
  .rio-photo--b { grid-column: 7 / 10; margin-top: 9rem; }
  .rio-photo--c { grid-column: 10 / 13; margin-top: 3rem; }
}

/* ---------- 04 Habitaciones ---------- */
.rooms { padding: var(--section-y) 0; }
.rooms-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; }
.room .photo-frame { aspect-ratio: 4 / 5; }
.room--b .photo:first-child .photo-frame { aspect-ratio: 16 / 9; }
.room-body { padding-top: 1.4rem; max-width: 30rem; }
.room-num { color: var(--plum); margin-bottom: .6rem; }
.room h3 { font-family: var(--serif); font-size: clamp(1.8rem, 2.8vw, 2.6rem); font-weight: 460; letter-spacing: -.02em; line-height: 1.05; margin-bottom: .7rem; }
.room-body p:last-child { color: var(--ink-70); }
.room-detail { margin-top: 3rem; width: min(68%, 22rem); margin-left: auto; }
.room-detail .photo-frame { aspect-ratio: 4 / 5; }

@media (min-width: 1024px) {
  .rooms-grid { grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2vw, 2rem); }
  .room--a { grid-column: 1 / 7; }
  .room--b { grid-column: 8 / 13; margin-top: 10rem; }
}

/* ---------- 05 Fotos (tira) ---------- */
.fotos { padding: var(--section-y) 0 calc(var(--section-y) * .8); overflow: hidden; }
.fotos-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.fotos-head .section-title { margin-bottom: 1rem; }
.fotos-note { color: var(--mist-75); margin: 0; }
.strip-controls { display: flex; align-items: center; gap: .75rem; }
.strip-count { margin: 0 .75rem 0 0; color: var(--mist-75); }

.strip {
  display: flex; gap: clamp(.75rem, 1.4vw, 1.25rem);
  --edge: max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter)));
  margin: 0; padding: 0 var(--edge); list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.is-dragging .strip-item { pointer-events: none; }
.strip li { flex: none; scroll-snap-align: start; }
.strip-item {
  display: block; padding: 0; border: none; background: var(--line-dark);
  height: min(66svh, 620px); aspect-ratio: 4 / 5;
  overflow: hidden; cursor: zoom-in;
}
.strip-item--wide { aspect-ratio: 4 / 3; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), opacity .4s; }
.strip-item:hover img { transform: scale(1.04); }
.strip-progress { position: relative; height: 1px; margin-top: 2rem; background: var(--line-dark); }
.strip-progress span { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--mist); transform-origin: 0 50%; transform: scaleX(var(--strip, .1)); transition: transform .2s linear; }

/* ---------- 06 Fechas y precios ---------- */
.availability { padding: var(--section-y) 0; }
.avail-head { display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); align-items: end; }
.avail-intro { margin: 0; max-width: 36ch; color: var(--ink-80); }
@media (min-width: 1024px) { .avail-head { grid-template-columns: 7fr 5fr; } .avail-head .section-title { margin-bottom: 0; } }

.avail-promo { border: 1px solid var(--pine); padding: 1.2rem 1.4rem; margin-bottom: 2rem; }
.avail-promo .mono { color: var(--pine); margin-bottom: .4rem; }
.avail-promo p:last-child { margin: 0; }

.avail-loading, .avail-error { padding: 3rem 0; border-top: 1px solid var(--line); color: var(--ink-70); }
.avail-error p { max-width: 40ch; margin-bottom: 1.4rem; color: var(--ink); }
.loading-bar { display: block; width: 100%; height: 1px; margin-bottom: 1.2rem; background: linear-gradient(90deg, transparent, var(--ink) 50%, transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: loading 1.4s linear infinite; }
@keyframes loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.avail-app > * { min-width: 0; }
.avail-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: start; border-top: 1px solid var(--ink); padding-top: 2rem; }
@media (min-width: 1024px) {
  .avail-app { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(2rem, 4vw, 4.5rem); }
  .avail-panel { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

.avail-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.avail-cal-hint { margin: 0; text-align: center; color: var(--ink-70); }

.avail-calendar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
@media (min-width: 700px) { .avail-calendar { grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 3vw, 3rem); } }
.avail-calendar.has-error { outline: 2px solid var(--plum); outline-offset: 12px; }

.avail-month-title { font-family: var(--serif); font-size: 1.6rem; font-weight: 470; letter-spacing: -.015em; margin: 0 0 1rem; }
.avail-weekdays, .avail-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.avail-weekdays { margin-bottom: .4rem; }
.avail-weekdays span { font-family: var(--mono); font-size: .8125rem; text-align: center; color: var(--ink-70); padding: .4rem 0; }
.avail-days { gap: 2px; }

.avail-day {
  position: relative; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: none; border-radius: 0;
  background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 1rem; font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.avail-day:hover:not(:disabled) { background: var(--ink-08); }
.avail-day--empty { cursor: default; }
.avail-day.is-past { color: var(--ink); opacity: .28; cursor: not-allowed; }
.avail-day.is-booked {
  background: var(--ink-60); color: var(--mist);
  text-decoration: line-through; text-decoration-thickness: 1px;
  cursor: not-allowed;
}
.avail-day.is-selected, .avail-day.is-selected:hover:not(:disabled) { background: var(--plum); color: var(--mist); font-weight: 600; }
.avail-day.is-in-range, .avail-day.is-in-range:hover:not(:disabled) { background: rgba(119, 51, 68, .14); }

/* Días de cambio de huésped: media celda en diagonal */
.avail-day.is-edge-leave, .avail-day.is-edge-leave:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--ink-60) 50%, transparent 50%);
  box-shadow: inset 0 0 0 1px var(--line);
  align-items: flex-end; justify-content: flex-end; padding: 0 .4em .25em 0;
}
.avail-day.is-edge-arrive, .avail-day.is-edge-arrive:hover:not(:disabled) {
  background: linear-gradient(135deg, transparent 50%, var(--ink-60) 50%);
  box-shadow: inset 0 0 0 1px var(--line);
  align-items: flex-start; justify-content: flex-start; padding: .25em 0 0 .4em;
}
.avail-day.is-edge-leave.is-selected { background: linear-gradient(135deg, var(--ink-60) 50%, var(--plum) 50%); color: var(--mist); }
.avail-day.is-edge-arrive.is-selected { background: linear-gradient(135deg, var(--plum) 50%, var(--ink-60) 50%); color: var(--mist); }
.avail-day.is-free { box-shadow: inset 0 0 0 2px var(--pine); }
.avail-free-badge { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; color: var(--pine); }
.avail-free-badge svg { width: 100%; height: 100%; }

.avail-field-error {
  display: flex; align-items: flex-start; gap: .5em;
  margin: 1rem 0 0; color: var(--plum); font-weight: 600; font-size: .95rem; line-height: 1.4;
}
.avail-field-error svg { width: 18px; height: 18px; flex: none; margin-top: .1em; }
.avail-message { margin: 1.2rem 0 0; padding: .8rem 1rem; border-left: 2px solid var(--plum); background: rgba(119, 51, 68, .08); color: var(--plum); font-weight: 600; }
.avail-legend { display: flex; align-items: center; gap: .5em; margin: 1rem 0 0; color: var(--pine); font-weight: 600; }
.avail-legend svg { width: 1.1em; height: 1.1em; }

.avail-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.avail-key { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 0; padding: 0; list-style: none; font-size: .95rem; color: var(--ink-80); }
.avail-key li { display: flex; align-items: center; gap: .55em; }
.avail-key-swatch { width: 20px; height: 20px; flex: none; box-shadow: inset 0 0 0 1px var(--line); }
.avail-key-swatch.is-busy { background: var(--ink-60); box-shadow: none; }
.avail-key-swatch.is-leave { background: linear-gradient(135deg, var(--ink-60) 50%, transparent 50%); }
.avail-key-swatch.is-arrive { background: linear-gradient(135deg, transparent 50%, var(--ink-60) 50%); }
.avail-key-note { margin: .9rem 0 0; font-size: .95rem; color: var(--ink-70); max-width: 62ch; }

/* Panel "Tu estadía" */
.avail-panel { border-top: 1px solid var(--line); padding-top: 1.6rem; }
@media (min-width: 1024px) { .avail-panel { border-top: none; padding-top: 0; } }
.panel-title { font-family: var(--serif); font-size: 2rem; font-weight: 460; letter-spacing: -.02em; margin-bottom: 1.2rem; }
.avail-summary { min-height: 4rem; margin-bottom: 1.6rem; }
.avail-summary-empty { color: var(--ink-70); margin: 0; padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sum-dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sum-dates div { display: flex; flex-direction: column; gap: .2rem; }
.sum-dates .mono { font-size: .8125rem; color: var(--ink-70); }
.sum-dates strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sum-arrow { color: var(--plum); padding-bottom: .3rem; }
.avail-summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.avail-summary-row span { color: var(--ink-70); }
.avail-breakdown { padding: .6rem 0; }
.avail-breakdown-row { font-size: .95rem; color: var(--ink-70); padding: .15rem 0; }
.avail-breakdown-row.is-free { display: flex; justify-content: space-between; color: var(--pine); font-weight: 600; }
.avail-breakdown-row.is-free svg { width: 1em; height: 1em; margin-right: .35em; vertical-align: -.1em; }
.avail-free-price s { opacity: .6; margin-right: .3em; }
.avail-promo-note { margin: .6rem 0 0; color: var(--pine); font-weight: 600; font-size: .95rem; }
.avail-promo-note svg { width: 1em; height: 1em; margin-right: .4em; vertical-align: -.1em; }
.avail-summary-total { margin: .4rem 0 0; padding-top: .8rem; border-top: 1px solid var(--ink); font-family: var(--serif); font-size: 1.6rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.2; }
.avail-times { margin-top: .8rem; }
.avail-time-row { margin: 0; font-size: .95rem; color: var(--ink-70); }

.avail-fields { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-bottom: 1.2rem; }
@media (min-width: 560px) and (max-width: 1023px) { .avail-fields { grid-template-columns: 1fr 1fr; } }
.avail-field label { display: block; margin-bottom: .45rem; font-weight: 600; font-size: .95rem; }
.avail-field input, .avail-field select {
  width: 100%; min-height: 52px; padding: 0 1rem;
  border: 1px solid var(--ink-60); border-radius: 2px;
  background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 1rem;
}
.avail-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
.avail-field input::placeholder { color: var(--ink-60); }
.avail-field input:focus-visible, .avail-field select:focus-visible { outline: 3px solid var(--pine); outline-offset: 1px; }
.avail-field input.has-error { border: 2px solid var(--plum); }

.avail-rules { font-size: .95rem; color: var(--ink-70); margin: 0 0 1.2rem; padding-left: .9rem; border-left: 2px solid var(--pine); }
.avail-form-error { margin: 0 0 1rem; padding: .8rem 1rem; background: rgba(119, 51, 68, .08); border-left: 2px solid var(--plum); color: var(--plum); font-weight: 600; font-size: .95rem; }
.panel-note { margin: .9rem 0 0; font-size: .9rem; color: var(--ink-70); }

/* Cómo se reserva */
.steps { margin-top: clamp(4rem, 8vw, 7rem); }
.steps-title { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 460; letter-spacing: -.02em; margin-bottom: 2rem; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
.steps-list li { padding: 1.4rem 0 1.6rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; }
.step-num { grid-row: span 2; font-family: var(--serif); font-style: italic; font-weight: 420; font-size: 2.6rem; line-height: .9; color: var(--plum); }
.steps-list h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: .4rem; }
.steps-list p { margin: 0; color: var(--ink-70); }
.steps-note { margin: 1.4rem 0 0; color: var(--ink-80); font-weight: 500; }
@media (min-width: 900px) {
  .steps-list { grid-template-columns: repeat(4, 1fr); }
  .steps-list li { display: block; padding: 1.6rem 1.6rem 0 0; border-bottom: none; }
  .steps-list li + li { padding-left: 1.6rem; border-left: 1px solid var(--line); }
  .step-num { display: block; font-size: 3.4rem; margin-bottom: 1.4rem; }
}

/* ---------- 07 Cómo llegar ---------- */
.llegar { padding: 0 0 var(--section-y); }
.llegar-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-top: var(--section-y);
  /* filete superior alineado al contenido, no al padding */
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.llegar-text .lead { max-width: 30ch; }
.llegar-coords { color: var(--plum); margin: 1.5rem 0 2rem; }
.llegar-map { position: relative; aspect-ratio: 4 / 5; background: var(--ink-08); }
.llegar-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.55) contrast(1.05); transition: filter .5s var(--ease); }
.llegar-map:hover iframe, .llegar-map:focus-within iframe { filter: none; }
@media (min-width: 1024px) {
  .llegar-grid { grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2vw, 2rem); align-items: end; }
  .llegar-text { grid-column: 1 / 5; }
  .llegar-map { grid-column: 6 / 13; aspect-ratio: 16 / 10; }
}

/* ---------- Contacto y pie ---------- */
.contacto { position: relative; overflow: hidden; padding: var(--section-y) 0; }
.contacto-contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contacto-contours path { stroke: var(--mist); stroke-opacity: .08; stroke-width: 1; }
.contacto-contours path.major { stroke: var(--ember); stroke-opacity: .28; }
.contacto-inner { position: relative; }
.contacto .section-title { max-width: 13ch; }
.contacto-phone {
  display: inline-block;
  font-family: var(--serif); font-weight: 440; font-size: clamp(2rem, 5.2vw, 4.6rem); letter-spacing: -.025em; line-height: 1.1;
  text-decoration: none; font-variant-numeric: lining-nums;
  background-image: linear-gradient(var(--ember), var(--ember)); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .5s var(--ease);
}
.contacto-phone:hover { background-size: 100% 2px; }
.contacto-sub { margin: 1rem 0 2.2rem; color: var(--mist-75); max-width: 44ch; }
.contacto-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.site-footer { padding: 0 0 2rem; overflow: hidden; }
.site-footer { padding-top: 1px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dark); color: var(--mist-75); font-size: .95rem; }
.footer-row p { margin: 0; }

/* ---------- Barra de acciones (celular) ---------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
  background: var(--mist); box-shadow: 0 -1px 0 var(--line);
  transform: translateY(110%); transition: transform .45s var(--ease);
}
.action-bar.is-visible { transform: none; }
.action-bar-price { margin: 0 auto 0 0; font-size: .95rem; line-height: 1.2; color: var(--ink-70); }
.action-bar-from { display: block; font-size: .85rem; }
.action-bar-price strong { color: var(--ink); font-size: 1.05rem; }
.action-bar-price span { font-size: .85rem; }
.action-bar .btn-primary { margin-left: auto; }
.action-bar-price + .btn-primary { margin-left: 0; }
.action-bar-wa { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--ink-60); color: var(--ink); border-radius: 2px; }
.action-bar-wa svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .action-bar { display: none; } }

/* ---------- Visor de fotos ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--ink); color: var(--mist);
  padding: 1rem var(--gutter) calc(1rem + env(safe-area-inset-bottom));
}
.lightbox .round-btn { border-color: var(--line-dark); }
.lightbox .round-btn:hover { background: var(--mist); color: var(--ink); }
.lightbox-top, .lightbox-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lightbox-count { margin: 0; color: var(--mist-75); }
.lightbox-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 1rem 0; }
.lightbox-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-caption { margin: 0; text-align: center; font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 460; }
::view-transition-group(lb-photo) { animation-duration: .55s; animation-timing-function: var(--ease); }

/* ---------- Responsive: portada ---------- */
@media (max-width: 1023px) {
  /* ventana a lo ancho; el texto va debajo */
  .hero { --wt: 24%; --wr: 4%; --wb: 36%; --wl: 4%; --s0: 1.08; --qx: 50%; --qy: 48%; }
  .hero-intro { left: var(--gutter); right: var(--gutter); bottom: max(1.5rem, 4svh); width: auto; }
  .hero-lead { max-width: 46ch; }
  .hero-cue { display: none; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .js .hero { height: 140svh; }
  .hero { --wt: 22%; --wr: 5%; --wb: 33%; --wl: 5%; --s0: 1.08; --qx: 50%; --qy: 47%; }
  .hero-title {
    font-size: clamp(2.4rem, 12.5vw, 4rem);
    top: calc(var(--header-h) + 3svh);
  }
  .hero-intro { left: var(--gutter); right: var(--gutter); top: auto; bottom: max(1.2rem, 3svh); width: auto; }
  .hero-place { display: none; }
  .hero-lead { font-size: 1.02rem; margin-bottom: 1rem; max-width: none; }
  .hero-actions { gap: .6rem 1rem; }
  .hero-caption span:first-child { display: none; }
  .wordmark { font-size: 1.25rem; }
  .nav-link { padding: 0 .6rem; }
  .nav-link:hover, .nav-link[aria-current="true"] { background-size: calc(100% - 1.2rem) 1px; }
  .nav-link { background-position: .6rem 72%; }
  .nav-cta { padding: 0 .9rem; }
  .manifesto-text, .manifesto-sign { grid-column: 1 / -1; }
  .ficha > div { grid-template-columns: 1fr; gap: .25rem; }
  .datos { grid-template-columns: 1fr; }
  .datos > div + div { padding-left: 0; border-left: none; border-top: 1px solid var(--line-dark); }
  .datos > div { padding-bottom: 1rem; }
  /* la foto siguiente asoma para invitar a deslizar */
  .strip-item { height: auto; width: 76vw; }
  .strip-item--wide { width: 88vw; }
  .strip-controls .round-btn { display: none; }
  .site-footer { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}
.nav-short { display: none; }
@media (max-width: 480px) {
  .nav-long { display: none; }
  .nav-short { display: inline; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 1.1rem; }
  .nav-link { padding: 0 .45rem; font-size: .92rem; }
  .nav-cta { padding: 0 .7rem; font-size: .92rem; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .hero { --wt: 20%; --wb: 38%; }
  .hero-lead { font-size: .98rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero { height: auto; }
  .js .hero-pin { position: relative; }
  .hero { --p: 0 !important; --c: 0 !important; }
  .hero-cue-line::after { animation: none; }
  .js [data-reveal] .photo-frame, .js [data-reveal] .photo-frame img, .js [data-reveal] figcaption { clip-path: none; transform: none; opacity: 1; transition: none; }
  .js .manifesto-text .w { opacity: 1; }
  .js .route-mask { stroke-dashoffset: 0; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.rooms-lead { max-width: 36ch; margin: -.5rem 0 clamp(2.5rem, 5vw, 4rem); color: var(--ink-80); }

/* ---------- Web más corta: la casa y las fotos juntas, ubicación con el río ---------- */
.casa { padding: var(--section-y) 0 calc(var(--section-y) * .8); overflow: hidden; }
.casa-grid { gap: 2.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.casa-text .lead { margin-bottom: 1.6rem; max-width: 40ch; color: var(--mist-75); }
.on-dark .ficha { border-top-color: var(--line-dark); margin: 0; }
.on-dark .ficha > div { border-bottom-color: var(--line-dark); }
.on-dark .ficha dt { color: var(--mist-60); }
.on-dark .link-arrow { color: var(--mist); }
.casa .fotos-head { margin-bottom: 1.5rem; align-items: center; }
.casa .strip-item { height: min(58svh, 540px); }
@media (min-width: 1024px) {
  .casa-grid { align-items: start; }
  .casa-text { grid-column: 1 / 6; grid-row: 1; position: static; }
  .ficha { grid-column: 7 / 13; grid-row: 1; }
}
.llegar { padding-top: 0; }
.llegar-text > p:not(.lead):not(.kicker):not(.llegar-coords) { color: var(--ink-80); max-width: 46ch; }
.llegar-coords { margin: 1.2rem 0 1.6rem; }
@media (max-width: 767px) {
  .casa .strip-item { height: auto; }
  .llegar-map { aspect-ratio: 1 / 1; }
}
@media (min-width: 1024px) { .llegar-grid { align-items: center; } }
@media (max-width: 767px) {
  /* ficha en dos columnas: entra en menos alto */
  .casa .ficha > div { grid-template-columns: 6.6rem 1fr; gap: .75rem; padding: .7rem 0; }
  .casa .ficha dt { font-size: .75rem; padding-top: .25rem; }
  .casa-grid { gap: 1.8rem; }
}
@media (max-width: 899px) {
  /* "Cómo se reserva" más compacto en celular */
  .steps-list li { padding: .85rem 0 1rem; grid-template-columns: 2.4rem 1fr; column-gap: .6rem; }
  .step-num { font-size: 1.9rem; }
  .steps-list h4 { font-size: 1.05rem; margin-bottom: .2rem; }
  .steps-list p { font-size: .95rem; }
}
@media (min-width: 1024px) {
  .llegar-text { grid-column: 1 / 6; }
  .llegar-map { grid-column: 7 / 13; }
  .llegar .section-title { font-size: clamp(2.4rem, 3.8vw, 3.8rem); }
}
.availability { padding-bottom: calc(var(--section-y) * .5); }
.llegar-grid { padding-top: calc(var(--section-y) * .6); }
