/* ───────────────────────────────────────────────────────
   Espacio de Domínguez — styles
   ─────────────────────────────────────────────────────── */

:root {
  --hueso: #F7F5F0;
  --hueso-2: #EFEBE2;
  --tinta: #1C1C1C;
  --tinta-soft: #2A2A2A;
  --pizarra: #5F7A78;
  --pizarra-deep: #3A4543;
  --lino: #E8E2D5;
  --ambar: #8C6A3D;
  --ambar-2: #A07D4A;
  --wa: #25D366;
  --wa-dark: #1FAD55;

  --serif: "Instrument Serif", "EB Garamond", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --section-y: clamp(6rem, 12vw, 12rem);
  --gutter-x: clamp(1.25rem, 5vw, 5rem);
  --max-w: 1280px;
  --read-w: 640px;
  --radius: 0.25rem;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hueso);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: clamp(1rem, 1vw + 0.6rem, 1.125rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* `clip` instead of `hidden` — doesn't create a scroll container, so position:sticky still works */
}
html { overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
:focus-visible {
  outline: 2px solid var(--ambar);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--ambar); color: var(--hueso); }

/* ─────────── Type system ─────────── */
.serif { font-family: var(--serif); letter-spacing: -0.01em; }
.italic { font-style: italic; }
.body.no-italics .italic { font-style: normal; }
.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pizarra-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 8.5vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 400;
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 400;
  text-wrap: balance;
}
.h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.lede {
  font-size: clamp(1.05rem, 1.05vw + 0.7rem, 1.25rem);
  line-height: 1.55;
}
.caption {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pizarra-deep);
}
.pz-italic { color: var(--pizarra); font-style: italic; }

/* ─────────── Layout ─────────── */
.shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter-x);
  padding-right: var(--gutter-x);
}
section { position: relative; }

/* ─────────── Buttons ─────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ambar);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn-primary { background: var(--ambar); color: var(--hueso); }
.btn-primary::before { background: var(--tinta); }
.btn-primary:hover { color: var(--hueso); }
.btn-ghost { background: transparent; color: var(--hueso); border-color: rgba(247,245,240,0.45); }
.btn-ghost::before { background: var(--hueso); }
.btn-ghost:hover { color: var(--tinta); border-color: var(--hueso); }
.btn-dark { background: var(--tinta); color: var(--hueso); }
.btn-dark::before { background: var(--ambar); }
.btn-arrow { display: inline-block; transition: transform 0.4s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-down:hover .btn-arrow { transform: translateY(3px); }
.btn-huge { padding: 1.3rem 2.2rem; font-size: 1rem; letter-spacing: 0.03em; }

/* ─────────── Nav (liquid glass) ─────────── */
.nav {
  position: fixed;
  top: clamp(0.75rem, 1.4vw, 1.25rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.4rem 0.4rem 0.55rem;
  border-radius: 999px;
  /* Hidden until the hero cinematic finishes (revealed via body.hero-done) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.5s var(--ease), background 0.45s var(--ease), color 0.45s var(--ease), top 0.4s var(--ease);

  /* liquid glass */
  background:
    linear-gradient(135deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0.32) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(0,0,0,0.04),
    0 12px 32px rgba(28,28,28,0.18),
    0 2px 4px rgba(28,28,28,0.08);
  color: var(--tinta);
  transition: background 0.45s var(--ease), color 0.45s var(--ease), top 0.4s var(--ease);
  max-width: calc(100vw - 1.5rem);
}
/* Reveal the nav once the hero cinematic has finished */
body.hero-done .nav { opacity: 1; pointer-events: auto; }
.nav.over-dark {
  /* Over dark hero video: tint glass darker for readability of the glass itself, but text stays light */
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.14) 100%);
  border-color: rgba(255,255,255,0.22);
  color: var(--hueso);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 12px 32px rgba(0,0,0,0.35);
}
.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tinta);
  color: var(--hueso);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.nav.over-dark .nav-logo {
  background: var(--hueso);
  color: var(--tinta);
}
.nav-items { display: flex; align-items: center; gap: 0.1rem; }
.nav-link {
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  color: inherit;
  opacity: 0.85;
  white-space: nowrap;
  transition: opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-popover a { white-space: nowrap; }
.nav-link:hover { opacity: 1; background: rgba(255,255,255,0.32); }
.nav.over-dark .nav-link:hover { background: rgba(255,255,255,0.12); }
.nav-link.cta {
  background: var(--ambar);
  color: var(--hueso);
  padding: 0.55rem 1.1rem;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}
.nav-link.cta:hover { background: var(--ambar-2); }
.nav-burger { display: none; width: 38px; height: 38px; border-radius: 50%; align-items: center; justify-content: center; }
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  display: block;
  width: 16px; height: 1px;
  background: currentColor;
  position: relative;
}
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; right: 0; }
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }
@media (max-width: 820px) {
  .nav-items { display: none; }
  .nav-burger { display: flex; }
}

.nav-popover {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(28,28,28,0.92);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  color: var(--hueso);
  border-radius: 1.25rem;
  padding: 0.85rem;
  z-index: 79;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  border: 1px solid rgba(247,245,240,0.1);
}
.nav-popover.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-popover a {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: rgba(247,245,240,0.85);
}
.nav-popover a.cta { background: var(--ambar); color: var(--hueso); }

/* ─────────── Floating WhatsApp button ─────────── */
.fab-wa {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.6rem);
  bottom: clamp(1rem, 2.5vw, 1.6rem);
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.1rem 0.65rem 0.65rem;
  background: var(--wa);
  color: #fff;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    0 12px 28px rgba(37, 211, 102, 0.35),
    0 4px 10px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.4s var(--ease-out), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.fab-wa:hover {
  background: var(--wa-dark);
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 18px 36px rgba(37, 211, 102, 0.45),
    0 4px 10px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.35);
}
.fab-wa-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.fab-wa-icon svg { width: 22px; height: 22px; fill: #fff; }
.fab-wa-label { line-height: 1; padding-right: 0.2rem; }
.fab-wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(37,211,102,0.55);
  animation: waPulse 2.5s var(--ease-out) infinite;
}
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.55); }
  70% { box-shadow: 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 540px) {
  .fab-wa-label { display: none; }
  .fab-wa { padding: 0.5rem; }
  .fab-wa-icon { width: 44px; height: 44px; }
}

/* ─────────── Hero (autoplay, locks scroll until card appears) ─────────── */
.hero {
  position: relative;
  height: 100vh;
  background: #0d0d0d;
  overflow: hidden;
}
.hero-sticky, .hero-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Lock body scroll while hero cinematic is playing */
body.scroll-lock { overflow: hidden; height: 100vh; }
body.scroll-lock .fab-wa { opacity: 0; pointer-events: none; }
.hero-video, .hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-poster { opacity: 0; transition: opacity 0.6s var(--ease); }
.hero.use-fallback .hero-video { display: none; }
.hero.use-fallback .hero-poster { opacity: 1; }
.hero-grain {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Hide deprecated Skip button if ever rendered */
.hero-skip { display: none !important; }

/* Brand wordmark above the card (between navbar and card) */
.hero-brand {
  position: absolute;
  left: 50%;
  top: clamp(6.5rem, 16vh, 10.5rem);
  z-index: 5;
  transform: translateX(-50%) translateY(-14px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease-out);
  pointer-events: none;
  width: max-content;
  max-width: calc(100% - 2rem);
}
.hero-brand .eyebrow {
  color: rgba(247,245,240,0.75);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
}
.hero-brand .eyebrow::before { background: rgba(247,245,240,0.55); width: 22px; }
.hero-brand-name {
  color: var(--hueso);
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
  text-shadow: 0 2px 32px rgba(0,0,0,0.45);
}
.hero-brand-rule {
  display: block;
  width: 32px;
  height: 1px;
  background: rgba(247,245,240,0.55);
  margin-top: 0.2rem;
}
.hero-brand.in { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Card centered-lower, translucent — appears when video ends */
.hero-card {
  position: absolute;
  left: 50%;
  top: 68%;
  z-index: 5;
  width: min(620px, calc(100% - 2.5rem));
  padding: clamp(1.75rem, 3vw, 2.6rem);
  color: var(--tinta);
  border-radius: 1.5rem;
  text-align: left;
  background: rgba(247, 245, 240, 0.62);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 30px 80px rgba(0,0,0,0.35),
    0 4px 12px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 24px)) scale(0.97);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease-out);
  pointer-events: none;
}
.hero-card.in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.hero-card .eyebrow { color: var(--pizarra-deep); }
.hero-headline {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--tinta);
  max-width: 14ch;
}
.hero-card .hero-sub {
  color: var(--tinta);
  opacity: 0.78;
  font-size: clamp(0.98rem, 1vw + 0.5rem, 1.1rem);
  line-height: 1.55;
  max-width: 40ch;
}
.hero-card .hero-ctas {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.hero-card .btn-ghost {
  color: var(--tinta);
  border-color: rgba(28,28,28,0.22);
}
.hero-card .btn-ghost::before { background: var(--tinta); }
.hero-card .btn-ghost:hover { color: var(--hueso); border-color: var(--tinta); }
@media (max-width: 640px) {
  .hero-card { top: 62%; padding: 1.5rem; }
}

/* Hint shown while video is playing */
.hero-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(2rem, 5vh, 3.5rem);
  transform: translateX(-50%);
  color: rgba(247,245,240,0.7);
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
  z-index: 4;
}
.hero-hint::before, .hero-hint::after {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.hero-hint.hide { opacity: 0; }

/* ─────────── Problema (cinematic) ─────────── */
.problema {
  position: relative;
  height: 240vh;            /* taller track gives the slide-left animation room */
  background: var(--hueso);
}
.problema-track { position: relative; height: 100%; }
.problema-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;         /* clip the oversized image here, not on .problema */
}
.problema-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}
.problema-media {
  position: absolute;
  top: 50%;
  left: 50%;
  /* width / height / left are written inline by JS for precise interpolation */
  transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 6px;
  background: var(--lino);
  box-shadow:
    0 calc(60px * (1 - var(--p, 0))) calc(120px * (1 - var(--p, 0))) rgba(28,28,28, calc(0.25 * (1 - var(--p, 0)))),
    0 6px 18px rgba(28,28,28, calc(0.08 * var(--p, 0)));
  margin: 0;
  will-change: width, height, left;
}
.problema-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(calc(1.04 - 0.04 * var(--p, 0)));
  transition: transform 0.1s linear;
}
.problema-inner {
  position: absolute;
  top: 50%;
  right: 0;
  width: min(560px, 48%);
  transform: translate(calc(40px * (1 - var(--p2, 0))), -50%);
  opacity: var(--p2, 0);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (max-width: 880px) {
  .problema { height: auto; overflow: visible; }
  .problema-track { height: auto; }
  .problema-sticky { position: relative; height: auto; padding: var(--section-y) 0; display: block; }
  .problema-stage { height: auto; padding: 0 var(--gutter-x); }
  .problema-media {
    position: relative;
    top: auto;
    left: auto !important;        /* override inline left written by the desktop cinematic JS */
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2;          /* matches the photo so it shows whole, no crop */
    transform: none;
    margin-bottom: 2.5rem;
    box-shadow: 0 12px 32px rgba(28,28,28,0.18);
    /* scroll reveal on mobile */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.9s var(--ease-out);
  }
  .problema-media.m-in { opacity: 1; transform: translateY(0); }
  .problema-media img { transform: none; object-fit: cover; }
  .problema-inner {
    position: relative;
    top: auto; right: auto;
    width: 100%;
    transform: translateY(30px);
    opacity: 0;
    transition: opacity 0.8s var(--ease), transform 0.9s var(--ease-out);
    transition-delay: 0.08s;
  }
  .problema-inner.m-in { opacity: 1; transform: translateY(0); }
}
.problema p.pull {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tinta);
  text-wrap: pretty;
  margin-top: 1.5rem;
}
.problema-meta {
  margin-top: clamp(2rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(58, 69, 67, 0.18);
}
.problema-meta dt {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pizarra-deep);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}
.problema-meta dd {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ─────────── Beneficios (sticky scroll lock) ─────────── */
.beneficios {
  position: relative;
  height: 260vh;
  background: var(--hueso);
}
.beneficios-track { position: relative; height: 100%; }
.beneficios-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.beneficios-stage { width: 100%; }
.beneficios-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  flex-wrap: wrap;
}
.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}
@media (max-width: 820px) {
  .beneficios { height: auto; }
  .beneficios-sticky { position: relative; height: auto; padding: var(--section-y) 0; }
  .beneficios-grid { grid-template-columns: 1fr; gap: 3rem; }
}
.benefit { display: flex; flex-direction: column; gap: 1rem; }
.benefit-num {
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: 0.85;
  color: var(--pizarra);
  letter-spacing: -0.04em;
  font-style: italic;
}
.benefit h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.benefit p { color: var(--pizarra-deep); max-width: 32ch; }
.benefit-divider { margin-top: 0.5rem; width: 36px; height: 1px; background: var(--pizarra); opacity: 0.4; }

/* ─────────── La Casa intro ─────────── */
.casa-intro {
  padding: clamp(4rem, 8vw, 7rem) 0 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.casa-intro p { color: var(--pizarra-deep); max-width: 48ch; }

/* ─────────── Estancia (room sections) ─────────── */
.estancia {
  padding: clamp(4rem, 8vw, 7rem) 0;
}
.estancia-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.estancia-grid.reverse {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
}
.estancia-grid.reverse .estancia-copy { order: 2; }
.estancia-grid.reverse .estancia-media { order: 1; }
@media (max-width: 880px) {
  .estancia-grid,
  .estancia-grid.reverse { grid-template-columns: 1fr; gap: 2rem; }
  .estancia-grid.reverse .estancia-copy,
  .estancia-grid.reverse .estancia-media { order: initial; }
}
@media (max-width: 640px) {
  /* A touch more breathing room on the sides of the room text + chips on phones */
  .estancia-copy { padding-left: 0.5rem; padding-right: 0.5rem; }
}
.estancia-copy { display: flex; flex-direction: column; gap: 1.25rem; }
.estancia-copy .room-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--pizarra);
  margin-bottom: -0.5rem;
}
.estancia-copy p { color: var(--pizarra-deep); max-width: 46ch; }
.estancia-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  margin-top: 0.4rem;
}
.estancia-meta li {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pizarra-deep);
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(58, 69, 67, 0.22);
  border-radius: 999px;
}

/* Static media */
.estancia-media {
  position: relative;
  overflow: hidden;
  background: var(--lino);
  border-radius: 6px;
}
.estancia-media.aspect-43 { aspect-ratio: 4/3; }
.estancia-media.aspect-169 { aspect-ratio: 16/9; }
.estancia-media img,
.estancia-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.estancia-media:hover img:not(.parallax-img) { transform: scale(1.02); }



/* ─────────── Carousel ─────────── */
.carousel {
  position: relative;
  background: var(--lino);
  border-radius: 6px;
  overflow: hidden;
}
.carousel-stage {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-slide .slide-cap {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  color: var(--hueso);
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.carousel-slide .slide-cap .slide-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  line-height: 1.1;
}
.carousel-slide .slide-cap .slide-meta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}
.carousel-controls {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(247,245,240,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 0.35rem 0.45rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.carousel-controls button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--tinta);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.carousel-controls button:hover { background: var(--tinta); color: var(--hueso); }
.carousel-controls button:disabled { opacity: 0.35; cursor: not-allowed; }
.carousel-controls button svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.carousel-counter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 0 0.4rem;
  color: var(--tinta);
  min-width: 56px;
  text-align: center;
}
.carousel-counter b { font-weight: 500; }

/* keyboard hint shown on focus */
.carousel:focus-within .carousel-controls { box-shadow: 0 0 0 2px var(--ambar), 0 6px 18px rgba(0,0,0,0.18); }

/* ─────────── Servicios ─────────── */
.servicios {
  padding: var(--section-y) 0;
  background: var(--lino);
  position: relative;
}
.servicios::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(58, 69, 67, 0.15);
}
.servicios-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(3.5rem, 6vw, 5.5rem);
}
@media (max-width: 820px) {
  .servicios-head { grid-template-columns: 1fr; }
}
.servicios-head p { color: var(--pizarra-deep); max-width: 36ch; }
.servicios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
}
@media (max-width: 820px) { .servicios-grid { grid-template-columns: 1fr; gap: 3rem; } }
.servicio-col h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  margin-bottom: 1.5rem;
  color: var(--tinta);
}
.servicio-col ul li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(58, 69, 67, 0.18);
  font-size: 0.98rem;
}
.servicio-col ul li:last-child { border-bottom: none; }
.servicio-col .ico {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  color: var(--pizarra-deep);
}
.servicio-col .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.servicio-col .key { color: var(--tinta); font-weight: 500; }
.servicio-col .val { color: var(--pizarra-deep); font-size: 0.82rem; text-align: right; letter-spacing: 0.02em; opacity: 0.9; }

/* ─────────── Testimonios ─────────── */
.testimonios { padding: var(--section-y) 0; overflow: hidden; }
.testimonios-head {
  text-align: center;
  margin-bottom: clamp(3rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.testimonios-head .h2 { max-width: 18ch; text-align: center; }

/* Slider */
.t-slider { position: relative; }
.t-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * clamp(1.5rem, 3vw, 3rem)) / 3);
  gap: clamp(1.5rem, 3vw, 3rem);
  overflow-x: auto;
  /* snap disabled — JS auto-loop is smooth */
  scroll-behavior: auto;
  padding-bottom: 1.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.t-track::-webkit-scrollbar { display: none; }
.t-track:focus-visible { outline: 2px solid var(--ambar); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 1024px) {
  .t-track { grid-auto-columns: calc((100% - clamp(1.5rem, 3vw, 3rem)) / 2); }
}
@media (max-width: 720px) {
  .t-track { grid-auto-columns: 88%; }
}
.testimonio { scroll-snap-align: none; }
.testimonio .mark.float { display: inline-block; }

/* Hide testimonios controls (arrows + progress) — auto-loop is enough */
.t-controls { display: none !important; }
.t-prev, .t-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(58,69,67,0.25);
  display: grid;
  place-items: center;
  color: var(--tinta);
  background: transparent;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.t-prev:hover, .t-next:hover {
  background: var(--tinta);
  color: var(--hueso);
  border-color: var(--tinta);
  transform: translateY(-1px);
}
.t-prev:disabled, .t-next:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.t-prev svg, .t-next svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.t-progress {
  flex: 1;
  height: 1px;
  background: rgba(58,69,67,0.18);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.t-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 16.66%;
  background: var(--tinta);
  transition: width 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.t-counter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--pizarra-deep);
  min-width: 56px;
  text-align: right;
}
.t-counter b { color: var(--tinta); font-weight: 500; }
@media (max-width: 820px) {
  .testimonios-track {
    grid-auto-flow: column;
    grid-auto-columns: 82%;
    grid-template-columns: unset;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    margin: 0 calc(var(--gutter-x) * -1);
    padding-left: var(--gutter-x);
    padding-right: var(--gutter-x);
  }
  .testimonio { scroll-snap-align: start; }
}
.testimonio {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 0;
}
.testimonio .mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--pizarra);
  height: 1.6rem; /* clip the descender so spacing is predictable */
  overflow: visible;
}
.testimonio blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--tinta);
  text-wrap: pretty;
}
.testimonio .author-block {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(58,69,67,0.18);
}
.testimonio .author { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.testimonio .ctx { font-size: 0.8rem; color: var(--pizarra-deep); opacity: 0.75; margin-top: 0.2rem; }

/* ─────────── Ubicación ─────────── */
.ubicacion {
  padding: var(--section-y) 0;
  background: var(--tinta);
  color: var(--hueso);
}
.ubicacion .eyebrow { color: rgba(247,245,240,0.7); }
.ubicacion .eyebrow::before { background: rgba(247,245,240,0.45); }
.ubicacion-grid {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) { .ubicacion-grid { grid-template-columns: 1fr; } }
.ubicacion-copy { display: flex; flex-direction: column; gap: 1.5rem; }
.ubicacion-copy h2 { color: var(--hueso); }
.ubicacion-copy p { color: rgba(247,245,240,0.7); max-width: 38ch; }
.ubicacion-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 2rem;
  padding-top: 2.5rem;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  border-top: 1px solid rgba(247,245,240,0.12);
}
@media (max-width: 720px) {
  .ubicacion-meta { grid-template-columns: 1fr 1fr; }
}
.ubicacion-meta dt {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247,245,240,0.55);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.ubicacion-meta dd {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.6vw, 1.7rem);
  line-height: 1.1;
  margin: 0;
  color: var(--hueso);
}
.map-frame {
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(95,122,120,0.4);
  aspect-ratio: 4/3;
  background: var(--pizarra-deep);
  position: relative;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ─────────── Reserva ─────────── */
.reserva {
  padding: var(--section-y) 0 clamp(4rem, 8vw, 6rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.reserva-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.reserva .eyebrow { justify-content: center; }
.reserva h2 .from { color: var(--pizarra); font-style: italic; }
.reserva-sub { color: var(--pizarra-deep); max-width: 44ch; font-size: 1.05rem; }
.reserva .btn-huge { margin-top: 1rem; }
.reserva-note { font-size: 0.85rem; color: var(--pizarra-deep); opacity: 0.7; margin-top: 0.5rem; }

/* ─────────── Footer ─────────── */
footer {
  border-top: 1px solid rgba(58, 69, 67, 0.2);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 5vw, 4rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: 3rem;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-brand { display: flex; flex-direction: column; gap: 1rem; }
.footer-mark { font-family: var(--serif); font-style: italic; font-size: 1.85rem; letter-spacing: -0.02em; }
.footer-grid h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pizarra-deep);
  opacity: 0.7;
  margin-bottom: 1rem;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-grid a:hover { color: var(--ambar); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(58, 69, 67, 0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--pizarra-deep);
  opacity: 0.7;
}

/* ─────────── Reveal motion ─────────── */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 1s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-l { opacity: 0; transform: translateX(-40px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal-l.in { opacity: 1; transform: translateX(0); }
.reveal-r { opacity: 0; transform: translateX(40px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal-r.in { opacity: 1; transform: translateX(0); }
.reveal-img { opacity: 0; transition: opacity 1s var(--ease); }
.reveal-img.in { opacity: 1; }
.reveal-img img:not(.parallax-img) { transform: scale(1.08); transition: transform 1.6s var(--ease); }
.reveal-img.in img:not(.parallax-img) { transform: scale(1); }

/* Scroll-driven motion utilities */
.parallax-wrap { overflow: hidden; position: relative; }
.parallax-wrap .parallax-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 118%;
  top: -9%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.float {
  display: inline-block;
  transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) rotate(var(--fr, 0deg));
  transition: transform 0.18s linear;
  transform-origin: center;
  will-change: transform;
}

/* Scroll-tied opacity: appear/disappear as the element passes through viewport */
.scroll-fade {
  opacity: var(--sf, 1);
  transform: translateY(calc((1 - var(--sf, 1)) * 18px));
  transition: opacity 0.15s linear, transform 0.25s var(--ease-out);
  will-change: opacity, transform;
}

/* Sequential step reveal — driven by --seq (0→1), set per-element from scroll */
.step {
  opacity: var(--seq, 0);
  transform: translateY(calc((1 - var(--seq, 0)) * 32px));
  transition: opacity 0.12s linear, transform 0.18s linear;
  will-change: opacity, transform;
}
.slide-l {
  opacity: var(--seq, 0);
  transform: translateX(calc((1 - var(--seq, 0)) * -56px));
  transition: opacity 0.12s linear, transform 0.2s linear;
  will-change: opacity, transform;
}
.slide-r {
  opacity: var(--seq, 0);
  transform: translateX(calc((1 - var(--seq, 0)) * 56px));
  transition: opacity 0.12s linear, transform 0.2s linear;
  will-change: opacity, transform;
}

/* Floating chip animation — each child gets transform from JS */
.estancia-meta.floats > li {
  display: inline-block;
  transform: translate3d(var(--fx, 0px), var(--fy, 0px), 0) rotate(var(--fr, 0deg));
  transition: transform 0.2s linear;
  will-change: transform;
  transform-origin: center;
}

/* Headline that reveals word-by-word (we keep CSS available; JS wraps words). */
.split-h2 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(2deg);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.split-h2.in .w { opacity: 1; transform: translateY(0) rotate(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-l, .reveal-r, .reveal-img, .reveal-img img,
  .split-h2 .w { transition: none; opacity: 1; transform: none; }
  .parallax-img { transform: none !important; }
  .float { transform: none !important; }
  .hero-card { opacity: 1; transform: translate(-50%, -50%); }
  .fab-wa-pulse { animation: none; }
}
