/* ============================================================
   Quinta Cumbres de Curumo — sistema "Aura Residence"
   (extraído de Stitch: Minimalist Property Showcase)
   Playfair Display + Inter · marfil cálido · esquinas rectas ·
   hairlines taupe · sombras atmosféricas · ritmo 160px
   ============================================================ */

:root {
  /* Colores */
  --surface: #fcf9f5;
  --surface-low: #f6f3ef;
  --surface-container: #f0ede9;
  --surface-high: #eae8e4;
  --surface-highest: #e5e2de;
  --white: #ffffff;
  --ink: #1c1c1a;
  --ink-strong: #000000;
  --charcoal: #1a1a1a;
  --neutral: #706f6c;
  --on-variant: #444748;
  --taupe: #a89f91;
  --outline: rgba(168, 159, 145, 0.45);
  --dark-band: #161614;

  /* Tipografía */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: 32px;
  --edge: clamp(24px, 5vw, 64px);
  --section-gap: clamp(110px, 14vw, 160px);

  /* Sombra atmosférica */
  --shadow-atmos: 0 20px 40px -10px rgba(76, 70, 59, 0.10);
  --shadow-atmos-lg: 0 30px 60px -15px rgba(76, 70, 59, 0.14);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: #ece1d2; color: #201b12; }

:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 3px; }

/* ---------- Tipos compartidos ---------- */

.label-caps {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--neutral);
}
.label-caps.accent { color: var(--taupe); }
.label-caps.light { color: rgba(255, 255, 255, 0.65); }

.headline {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  margin-top: 18px;
}
.headline.light { color: var(--white); }
.headline em { font-style: italic; }

.body-lg { font-size: 18px; line-height: 1.6; letter-spacing: 0.01em; color: var(--on-variant); }
.body-md { font-size: 16px; line-height: 1.6; color: var(--on-variant); }
.muted { color: var(--neutral); }

.link-caps {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-decoration: none;
  color: var(--ink-strong);
  border-bottom: 1px solid var(--ink-strong);
  padding-bottom: 5px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.link-caps:hover { color: var(--neutral); border-color: var(--neutral); }

.skip-link {
  position: fixed;
  top: -60px; left: 16px;
  z-index: 200;
  background: var(--charcoal);
  color: var(--white);
  padding: 12px 18px;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus-visible { top: 16px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  border-radius: 0;
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
  min-height: 44px;
}

.btn--solid { background: var(--charcoal); color: var(--white); }
.btn--solid:hover { background: #3a3936; }

.btn--light { background: var(--white); color: var(--ink-strong); }
.btn--light:hover { background: rgba(255, 255, 255, 0.85); }

.btn--ghost { background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.55); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

.btn--ghost-dark { background: transparent; color: var(--ink-strong); border: 1px solid var(--ink-strong); }
.btn--ghost-dark:hover { background: rgba(0, 0, 0, 0.05); }

.btn--wide { flex: 1; }

/* ---------- Navegación ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: var(--white);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(252, 249, 245, 0.88);
  color: var(--ink);
  border-bottom-color: var(--outline);
}
@supports (backdrop-filter: blur(10px)) {
  .nav.scrolled { backdrop-filter: blur(10px); }
}

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--edge);
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__brand {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.22em;
  text-decoration: none;
  white-space: nowrap;
}

.nav__links { display: flex; gap: 32px; margin-left: auto; }

.nav__links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.nav__links a:hover { opacity: 1; border-bottom-color: currentColor; }
.nav__links a.is-active { opacity: 1; border-bottom-color: currentColor; }

.nav__cta { flex: none; padding: 13px 22px; }
.nav.scrolled .nav__cta { background: var(--charcoal); color: var(--white); }

.nav__toggle { display: none; padding: 10px; margin: -10px -6px -10px auto; }
.nav__toggle-close { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-open { display: none; }
.nav__toggle[aria-expanded="true"] .nav__toggle-close { display: block; }

.nav__mobile { display: none; }

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }

  .nav__mobile {
    display: none;
    flex-direction: column;
    padding: 8px var(--edge) 32px;
    background: var(--surface);
    color: var(--ink);
    border-bottom: 1px solid var(--outline);
  }
  .nav__mobile.open { display: flex; }
  .nav__mobile a {
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 24px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(168, 159, 145, 0.25);
  }
  .nav__mobile .btn { margin-top: 20px; border-bottom: 0; font-family: var(--font-sans); font-size: 12px; }
  .nav.menu-open { background: var(--surface); color: var(--ink); border-bottom-color: var(--outline); }
}

/* ---------- Hero · slideshow ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--dark-band);
}

.hero__slides { position: absolute; inset: 0; }

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease;
}
.hero__slide.is-active {
  opacity: 1;
  animation: hero-zoom 9s linear forwards;
}

@keyframes hero-zoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 10, 8, 0.42) 0%, rgba(10, 10, 8, 0.12) 30%),
    linear-gradient(to top, rgba(10, 10, 8, 0.55) 0%, rgba(10, 10, 8, 0.1) 45%),
    rgba(10, 10, 8, 0.12);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 96px var(--edge) 40px;
  max-width: 880px;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  opacity: 0.85;
  margin-bottom: 28px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(44px, 7.6vw, 92px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 26px;
}

.hero__sub {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.6;
  letter-spacing: 0.01em;
  max-width: 54ch;
  margin: 0 auto 40px;
  opacity: 0.94;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.hero__dots {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero__dot {
  width: 34px;
  height: 20px;
  position: relative;
}
.hero__dot::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 9px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.4);
  transition: background-color 0.3s ease;
}
.hero__dot.is-active::after { background: var(--white); }

/* ---------- Overview ---------- */

.overview {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-gap) var(--edge) 0;
}

.overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.overview__media img {
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-atmos-lg);
}

.specs {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 24px;
}

.specs dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--neutral);
  margin-bottom: 7px;
}

.specs dd {
  font-family: var(--font-serif);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.2;
  color: var(--ink-strong);
  font-variant-numeric: lining-nums;
}

@media (max-width: 900px) {
  .overview__grid { grid-template-columns: 1fr; }
}

/* ---------- Recorrido · inmersivo ---------- */

.tour {
  margin-top: var(--section-gap);
  background: var(--dark-band);
  color: var(--white);
  padding: clamp(90px, 11vw, 140px) 0 clamp(56px, 7vw, 88px);
}

.tour__head {
  max-width: var(--container);
  margin: 0 auto clamp(48px, 6vw, 72px);
  padding: 0 var(--edge);
  text-align: center;
}

.tour__head .headline { margin-top: 18px; }

/* Panorámico de borde a borde */
.tour__stage { margin: 0; width: 100%; }

.tour__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 92svh;
  object-fit: cover;
  background: #000;
  display: block;
}

.tour__caption {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 0 var(--edge);
}

/* ---------- Niveles ---------- */

.levels {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-gap) var(--edge) 0;
}

.level {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: end;
  margin-top: clamp(64px, 8vw, 110px);
}

.level--flip { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
.level--flip .level__media { order: 2; }
.level--flip .level__text { order: 1; padding-top: 24px; }

.level__media img {
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-atmos);
}

.level__text { padding-bottom: 10px; }

.level__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-strong);
  margin: 14px 0 20px;
}

.level__list {
  list-style: none;
  padding: 0;
}

.level__list li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-variant);
  padding: 11px 0;
  border-top: 1px solid rgba(168, 159, 145, 0.28);
}
.level__list li:first-child { border-top: 0; padding-top: 0; }

@media (max-width: 900px) {
  .level, .level--flip { grid-template-columns: 1fr; align-items: start; }
  .level--flip .level__media { order: 1; }
  .level--flip .level__text { order: 2; padding-top: 0; }
}

/* ---------- Espacios · tiras horizontales (3 por vista, márgenes alineados) ---------- */

.spaces { margin: var(--section-gap) 0 0; }

.spaces__head {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge);
}
.spaces__head .body-md { margin-top: 18px; max-width: 62ch; }

.space { margin-top: clamp(56px, 7vw, 84px); }

.space__head {
  max-width: var(--container);
  margin: 0 auto 22px;
  padding: 0 var(--edge);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.space__title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-strong);
  margin-top: 8px;
}

.space__nav { display: flex; gap: 6px; flex: none; }

.space__arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--outline);
  color: var(--ink);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.space__arrow:hover { background: var(--white); border-color: var(--taupe); }

.strip {
  --strip-gap: clamp(10px, 1.2vw, 16px);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--edge) 16px;
  display: flex;
  gap: var(--strip-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--taupe) transparent;
  cursor: grab;
  /* desvanecido suave exactamente en los márgenes */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--edge), #000 calc(100% - var(--edge)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--edge), #000 calc(100% - var(--edge)), transparent 100%);
}
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.strip::-webkit-scrollbar { height: 4px; }
.strip::-webkit-scrollbar-thumb { background: var(--outline); }
.strip::-webkit-scrollbar-track { background: transparent; }

.strip__item {
  position: relative;
  flex: 0 0 auto;
  width: calc((100% - 2 * var(--strip-gap)) / 3);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--surface-high);
  display: block;
}

@media (max-width: 1000px) {
  .strip__item { width: calc((100% - var(--strip-gap)) / 2); }
}
@media (max-width: 640px) {
  .strip__item { width: 84%; }
}

.strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.strip__item:hover img, .strip__item:focus-visible img { transform: scale(1.04); }

.strip__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(22, 22, 20, 0.72);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

/* ---------- Comparador antes / después ---------- */

.compare {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  --pos: 50%;
  box-shadow: var(--shadow-atmos-lg);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
}

.compare__before,
.compare__after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 1.5px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--ink-strong);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
}
.compare__handle:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.compare__chip {
  position: absolute;
  top: 14px;
  padding: 7px 11px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  background: rgba(22, 22, 20, 0.65);
  color: var(--white);
  transition: opacity 0.3s ease;
}
.compare__chip--a { left: 14px; }
.compare__chip--b { right: 14px; }
.compare[data-at="0"] .compare__chip--a { opacity: 0; }
.compare[data-at="100"] .compare__chip--b { opacity: 0; }

.seg {
  position: relative;
  display: inline-flex;
  margin-top: 24px;
  border: 1px solid var(--outline);
  background: var(--white);
}

.seg__btn {
  position: relative;
  z-index: 1;
  padding: 12px 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--neutral);
  transition: color 0.25s ease;
}
.seg__btn.is-active { color: var(--white); }

.seg__thumb {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 50%;
  background: var(--charcoal);
}

/* ---------- Renders ---------- */

.renders {
  margin-top: var(--section-gap);
  background: var(--surface-highest);
}

.renders__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(90px, 11vw, 150px) var(--edge);
}

.renders__head { max-width: 62ch; margin-bottom: clamp(56px, 7vw, 90px); }
.renders__head .body-md { margin-top: 20px; }

.render {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: end;
  margin-top: clamp(64px, 8vw, 100px);
}
.render:first-of-type { margin-top: 0; }

.render--flip { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
.render--flip .render__media { order: 2; }
.render--flip .render__text { order: 1; padding-top: 24px; }

.render__media { width: 100%; }

.render__text { padding-bottom: 10px; }

.render__title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-strong);
  margin: 14px 0 16px;
}

@media (max-width: 900px) {
  .render, .render--flip { grid-template-columns: 1fr; align-items: start; }
  .render--flip .render__media { order: 1; }
  .render--flip .render__text { order: 2; padding-top: 0; }
}

/* ---------- Ficha técnica (MercadoLibre) ---------- */

.ficha {
  margin-top: var(--section-gap);
  background: var(--surface-low);
}

.ficha__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(90px, 11vw, 140px) var(--edge);
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.ficha__prices {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 44px;
}

.ficha__price {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.6vw, 48px);
  color: var(--ink-strong);
  line-height: 1.1;
}
.ficha__price small {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--neutral);
  display: block;
  margin-top: 8px;
}
.ficha__price--alt { font-size: clamp(22px, 2.2vw, 29px); color: var(--on-variant); }
.ficha__price--alt em { font-style: normal; font-size: 0.6em; color: var(--neutral); }

.ficha__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.chip {
  padding: 9px 14px;
  border: 1px solid var(--outline);
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--on-variant);
}

.ficha__desc { margin-top: 34px; border-top: 1px solid var(--outline); }

.ficha__desc summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--ink-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ficha__desc summary::-webkit-details-marker { display: none; }
.ficha__desc summary::after { content: "+"; font-size: 18px; font-weight: 400; }
.ficha__desc[open] summary::after { content: "–"; }

.ficha__desc-body { padding: 4px 0 22px; }
.ficha__desc-body p { font-size: 15px; line-height: 1.65; color: var(--on-variant); margin-bottom: 14px; white-space: pre-line; }

.ficha__link { margin-top: 10px; display: inline-block; }

.attrs {
  background: var(--white);
  box-shadow: var(--shadow-atmos-lg);
  padding: clamp(26px, 3vw, 44px);
}

.attrs__title { margin-bottom: 18px; color: var(--ink-strong); }

.attrs dl { display: grid; grid-template-columns: 1fr; }

.attrs .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid rgba(168, 159, 145, 0.28);
}
.attrs .row:first-child { border-top: 0; padding-top: 0; }

.attrs dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--neutral);
  text-transform: uppercase;
}

.attrs dd {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink-strong);
  text-align: right;
}

@media (max-width: 900px) {
  .ficha__inner { grid-template-columns: 1fr; }
}

/* ---------- WhatsApp flotante ---------- */

.wa-fab {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 150;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(18, 68, 41, 0.35);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.wa-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 38px rgba(18, 68, 41, 0.45); }
.wa-fab svg { width: 30px; height: 30px; }

.wa-fab__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.55);
  pointer-events: none;
}

/* ---------- Servicios ---------- */

.services {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-gap) var(--edge) 0;
}

.services__head { margin-bottom: 56px; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
}

.service {
  background: var(--white);
  padding: 34px 28px 30px;
  box-shadow: var(--shadow-atmos);
}

.service svg {
  width: 26px;
  height: 26px;
  color: var(--taupe);
  margin-bottom: 18px;
}

.service h4 { color: var(--ink-strong); margin-bottom: 10px; }

.service p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--neutral);
}

@media (max-width: 1000px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .services__grid { grid-template-columns: 1fr; } }

/* ---------- Ubicación · mapa inmersivo ---------- */

.location {
  margin-top: var(--section-gap);
  background: var(--surface-low);
  padding: clamp(90px, 11vw, 140px) 0 0;
}

.location__head {
  max-width: var(--container);
  margin: 0 auto clamp(48px, 6vw, 72px);
  padding: 0 var(--edge);
}
.location__head .body-md { margin-top: 18px; max-width: 58ch; }

.map {
  position: relative;
  width: 100%;
  height: clamp(480px, 78svh, 760px);
  background: var(--surface-highest);
}

.map__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(0.92);
}

.map__card {
  position: absolute;
  left: max(var(--edge), calc((100vw - var(--container)) / 2));
  bottom: clamp(24px, 4vw, 48px);
  background: var(--white);
  padding: 28px 32px;
  box-shadow: var(--shadow-atmos-lg);
  max-width: 340px;
}

.map__addr {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink-strong);
  margin: 12px 0 18px;
}

@media (max-width: 640px) {
  .map__card { left: 16px; right: 16px; max-width: none; padding: 22px 24px; }
}

/* ---------- Contacto ---------- */

.contact {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--section-gap) var(--edge) 0;
  text-align: center;
}

.contact__inner .body-md { margin-top: 16px; }

.contact__form {
  margin-top: 48px;
  background: var(--white);
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-atmos-lg);
  text-align: left;
  display: grid;
  gap: 30px;
}

.contact__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 640px) { .contact__row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 8px; }

.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(168, 159, 145, 0.5);
  border-radius: 0;
  padding: 8px 0 10px;
  transition: border-color 0.2s ease;
  resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: #b3aca1; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink-strong); }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.contact__cta {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.btn--wa {
  background: #128c4b;
  color: var(--white);
  padding: 20px 38px;
  font-size: 13px;
  gap: 12px;
}
.btn--wa:hover { background: #0f7a41; }

.contact__direct {
  text-align: center;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid rgba(168, 159, 145, 0.28);
}

.contact__phone {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 38px);
  color: var(--ink-strong);
  text-decoration: none;
  margin: 12px 0 6px;
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 4px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact__phone:hover { color: #128c4b; border-color: #128c4b; }

/* ---------- Chat asistente ---------- */

.chat-fab {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: calc(clamp(16px, 3vw, 32px) + 74px);
  z-index: 150;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(20, 20, 18, 0.35);
  transition: transform 0.25s var(--ease-out), background-color 0.25s ease;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.05); background: #33322f; }
.chat-fab[aria-expanded="true"] { background: var(--taupe); }

.chat {
  position: fixed;
  right: clamp(12px, 3vw, 32px);
  bottom: clamp(12px, 3vw, 32px);
  z-index: 200;
  width: min(400px, calc(100vw - 24px));
  max-height: min(620px, calc(100svh - 48px));
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(20, 18, 14, 0.35);
  border: 1px solid var(--outline);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat[hidden] { display: none; }

.chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--charcoal);
  color: var(--white);
}

.chat__title { font-family: var(--font-serif); font-size: 19px; letter-spacing: 0.04em; }
.chat__sub { font-size: 11px; letter-spacing: 0.08em; opacity: 0.65; margin-top: 3px; }
.chat__close { color: var(--white); opacity: 0.7; padding: 6px; line-height: 0; }
.chat__close:hover { opacity: 1; }

.chat__log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}

.chat__msg {
  max-width: 86%;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: break-word;
}
.chat__msg--bot { align-self: flex-start; background: var(--white); color: var(--ink); box-shadow: var(--shadow-atmos); }
.chat__msg--user { align-self: flex-end; background: var(--charcoal); color: var(--white); }
.chat__msg--bot a { color: #128c4b; font-weight: 600; }

.chat__typing { display: inline-flex; gap: 5px; padding: 14px 16px; align-self: flex-start; background: var(--white); box-shadow: var(--shadow-atmos); }
.chat__typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--taupe);
  animation: chat-dot 1.2s infinite ease-in-out;
}
.chat__typing i:nth-child(2) { animation-delay: 0.15s; }
.chat__typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

.chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chat__chip {
  padding: 8px 12px;
  border: 1px solid var(--outline);
  background: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--on-variant);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.chat__chip:hover { border-color: var(--charcoal); color: var(--ink-strong); }

.chat__bar {
  display: flex;
  border-top: 1px solid var(--outline);
  background: var(--white);
}
.chat__input {
  flex: 1;
  border: 0;
  padding: 15px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
}
.chat__input:focus { outline: none; }
.chat__send { padding: 0 18px; color: var(--ink-strong); }
.chat__send:disabled { opacity: 0.4; }

.chat__wa {
  display: block;
  text-align: center;
  padding: 12px;
  background: #128c4b;
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.chat__wa:hover { background: #0f7a41; }

@media (max-width: 640px) {
  .chat { right: 12px; left: 12px; width: auto; bottom: 12px; max-height: calc(100svh - 24px); }
  .chat-fab { bottom: calc(clamp(16px, 3vw, 32px) + 68px); }
}

/* ---------- Footer ---------- */

.footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--outline);
  background: var(--surface);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px var(--edge) 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  justify-content: space-between;
  align-items: baseline;
}

.footer__brand {
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}

.footer__fine {
  font-size: 13px;
  line-height: 1.6;
  color: var(--neutral);
  max-width: 52ch;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(16, 15, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
}
.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: min(1400px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lightbox__img {
  max-height: 80svh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.lightbox__close, .lightbox__arrow {
  position: absolute;
  color: var(--white);
  padding: 14px;
  line-height: 0;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.lightbox__close:hover, .lightbox__arrow:hover { opacity: 1; }

.lightbox__close { top: 18px; right: 18px; }
.lightbox__arrow { top: 50%; transform: translateY(-50%); }
.lightbox__arrow--prev { left: 12px; }
.lightbox__arrow--next { right: 12px; }

/* ---------- Reveal ---------- */

/* Estados iniciales para animaciones (solo con JS; Anime.js los lleva a 1) */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js .reveal.in { opacity: 1; transform: none; }

.js [data-hero] { opacity: 0; }
.js.no-anime [data-hero], .js [data-hero].in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js [data-hero] { opacity: 1; transform: none; transition: none; }
  .hero__slide, .hero__slide.is-active { animation: none; transform: none; transition: opacity 0.5s ease; }
  .strip__item img { transition: none; }
}

/* ---------- Optimización móvil (agente) ---------- */

/* — Tablet y menores (≤900px) — */
@media (max-width: 900px) {
  :root { --section-gap: clamp(88px, 12vw, 120px); }

  /* Menú móvil: botón con área táctil ≥44px y panel con scroll propio */
  .nav__toggle { padding: 12px; margin: -12px -8px -12px auto; }
  .nav__mobile.open { max-height: calc(100svh - 62px); overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* Comparador: manija con área táctil ampliada (52px + halo invisible) */
  .compare__handle { width: 52px; height: 52px; }
  .compare__handle::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
}

/* — Móvil (≤640px) — */
@media (max-width: 640px) {
  :root { --section-gap: clamp(72px, 13vw, 92px); }

  /* Ritmo interno de las bandas de sección en móvil */
  .tour { padding: 72px 0 52px; }
  .renders__inner { padding: 76px var(--edge) 84px; }
  .ficha__inner { padding: 76px var(--edge); gap: 48px; }
  .location { padding-top: 76px; }
  .location__head { margin-bottom: 40px; }

  /* Tipografía: headline móvil coherente */
  .headline { font-size: clamp(30px, 7vw, 34px); }
  .body-lg { font-size: 17px; }

  /* Hero: botones apilados a ancho cómodo, dots despejados */
  .hero__content { width: 100%; padding: 110px var(--edge) 96px; }
  .hero__actions { flex-direction: column; align-items: center; gap: 12px; }
  .hero__actions .btn { width: min(100%, 340px); }
  .hero__dots { bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .hero__dot { height: 28px; }
  .hero__dot::after { top: 13px; }

  /* Tiras: cabecera del área en columna, flechas sin desbordar */
  .space__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .strip { scroll-padding-left: var(--edge); }

  /* Comparador: chips compactos y seg centrado a ancho completo */
  .compare__chip { top: 10px; padding: 6px 9px; }
  .compare__chip--a { left: 10px; }
  .compare__chip--b { right: 10px; }
  .seg { display: flex; width: 100%; max-width: 380px; margin-left: auto; margin-right: auto; }
  .seg__btn { flex: 1 1 50%; min-height: 48px; padding: 14px 10px; }

  /* Ficha: tarjeta y filas cómodas */
  .attrs { padding: 26px 22px 30px; }
  .attrs .row { gap: 14px; }
  .attrs dd { font-size: 17px; }
  .ficha__chips { gap: 8px; }

  /* Mapa: altura contenida y tarjeta bajo el mapa (sin taparlo) */
  .map { height: auto; }
  .map__frame { height: min(68svh, 480px); }
  .map__card { position: static; margin: 20px var(--edge) 0; max-width: none; padding: 24px; box-shadow: var(--shadow-atmos); }

  /* Formulario: sin zoom iOS y botones apilados a ancho completo */
  .field input, .field textarea { font-size: 16px; }
  .contact__form { padding: 34px 22px 38px; gap: 26px; }
  .contact__actions { flex-direction: column; }
  .contact__actions .btn { width: 100%; }

  /* FAB de WhatsApp: safe-area y colchón en el footer */
  .wa-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .footer__inner { padding: 48px var(--edge) calc(104px + env(safe-area-inset-bottom, 0px)); }
}

/* — Móvil compacto (≤430px) — */
@media (max-width: 430px) {
  :root { --edge: 20px; }

  .hero__title { font-size: clamp(34px, 10.5vw, 42px); }
  .hero__eyebrow { font-size: 11px; letter-spacing: 0.22em; }
  .headline { font-size: clamp(27px, 8.6vw, 31px); }

  .specs { gap: 24px 18px; }
  .specs dd { font-size: 20px; }

  .chip { padding: 8px 11px; font-size: 10px; letter-spacing: 0.1em; }
  .attrs dd { font-size: 16px; }

  .btn { padding-left: 20px; padding-right: 20px; }
  .contact__form { padding: 28px 18px 32px; }

  .wa-fab { width: 54px; height: 54px; }
  .wa-fab svg { width: 27px; height: 27px; }
}
