/* =====================================================================
   STONE HOUSE · Condominio Campestre
   Hoja de estilos principal
   ===================================================================== */

/* ---------- Tipografía de marca: Butler ---------- */
@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-Lgt.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-Rmn.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-Med.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-SBd.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-Bd.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-XBd.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap
}

@font-face {
  font-family: 'Butler';
  src: url('../assets/fonts/Butler-Free-Blk.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap
}

/* ---------- Tokens ---------- */
:root {
  --verde: #212804;
  --verde-2: #2A320A;
  --oliva: #696753;
  --oliva-2: #53573B;
  --marron: #6E5038;
  --marron-osc: #331D0D;
  --beige: #ECE6E0;
  --beige-soft: #D8D2C7;

  --txt: #F2EFE9;
  --txt-mute: rgba(242, 239, 233, .42);

  --serif: 'Butler', "Playfair Display", Georgia, 'Times New Roman', serif;
  --sans: 'Inter', 'Helvetica Neue', Arial, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(20px, 4.2vw, 64px);
  --maxw: 1520px;

  /* Carril reservado para el rail fijo: hasta dónde llega y cuánto hay que
     apartar el contenido. Si los márgenes de la página ya bastan, es 0. */
  --rail-left: clamp(14px, 2.2vw, 34px);
  --rail-reach: calc(var(--rail-left) + 66px + 22px);
  --rail-space: max(0px, calc(var(--rail-reach) - max(0px, (100vw - var(--maxw))/2)));
  --r-lg: 28px;
  --r-md: 22px;
  --r-sm: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Curva de la transición de tema (theme-toggle.rdsx.dev) */
  --expo-out: linear(0 0%, 0.1684 2.66%, 0.3165 5.49%, 0.446 8.52%, 0.5581 11.78%,
      0.6535 15.29%, 0.7341 19.11%, 0.8011 23.3%, 0.8557 27.93%, 0.8962 32.68%,
      0.9283 38.01%, 0.9529 44.08%, 0.9711 51.14%, 0.9833 59.06%, 0.9915 68.74%, 1 100%);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box
}

html {
  -webkit-text-size-adjust: 100%
}

html:focus-within {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--verde);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%
}

img {
  height: auto
}

button,
input {
  font: inherit;
  color: inherit
}

button {
  background: none;
  border: 0;
  cursor: pointer
}

a {
  color: inherit;
  text-decoration: none
}

ul {
  margin: 0;
  padding: 0;
  list-style: none
}

h1,
h2,
h3,
p {
  margin: 0
}

:focus-visible {
  outline: 2px solid var(--beige);
  outline-offset: 3px;
  border-radius: 6px
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--beige);
  color: var(--verde);
  padding: 10px 16px;
  border-radius: 0 0 10px 0
}

.skip-link:focus {
  left: 0
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: calc(var(--pad) + var(--rail-space)) var(--pad);
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .005em
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease)
}

.reveal.is-in {
  opacity: 1;
  transform: none
}

@media (prefers-reduced-motion:reduce) {
  html:focus-within {
    scroll-behavior: auto
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none
  }

  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important
  }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  padding: clamp(10px, 1.4vw, 20px)
}

.hero__frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  height: clamp(520px, 92vh, 940px);
  clip-path: url(#heroNotch);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 24, 4, .42) 0%, rgba(20, 24, 4, 0) 28%),
    linear-gradient(0deg, rgba(20, 24, 4, .55) 0%, rgba(20, 24, 4, 0) 45%);
}

.hero__isotipo {
  position: absolute;
  top: clamp(18px, 3vw, 42px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(60px, 6vw, 90px);
  perspective: 600px;
}

.hero__isotipo svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .35));
}

.hero__isotipo .isotipo__inner {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform 1.5s var(--ease);
}

.hero__isotipo:hover .isotipo__inner {
  transform: rotateY(360deg);
}

.hero__title {
  position: absolute;
  left: clamp(20px, 4vw, 58px);
  bottom: clamp(28px, 5vw, 64px);
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 58px);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 4px 26px rgba(0, 0, 0, .45);
  max-width: min(94%, 21ch);
}

.hero__title span {
  display: block
}

.hero__title-strong {
  font-weight: 700
}

.hero__title-soft {
  font-weight: 400
}

.hero__social {
  position: absolute;
  right: clamp(20px, 2.5vw, 36px);
  bottom: clamp(18px, 2vw, 28px);
  display: flex;
  gap: clamp(10px, 1.2vw, 16px);
  z-index: 10;
}

.hero__social a {
  display: grid;
  place-items: center;
  width: clamp(36px, 3.2vw, 44px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transition: transform .35s var(--ease), background .35s var(--ease);
}

.hero__social a:hover {
  transform: translateY(-3px);
  background: var(--beige)
}

.hero__social svg {
  width: 55%;
  fill: #141804
}

.hero__social a:hover svg {
  fill: var(--verde)
}

/* ---------- Rail de navegación ---------- */
.rail {
  position: fixed;
  left: var(--rail-left);
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  background: rgba(236, 230, 224, .14);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(236, 230, 224, .16);
  border-radius: var(--r-md);
  padding: 14px 10px;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.rail ul {
  display: grid;
  gap: 4px
}

.rail a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 15px;
  color: rgba(242, 239, 233, .8);
  white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease);
}

/* Colapsado: solo icono. El texto se despliega al pasar el mouse por el rail */
.rail li span {
  display: block;
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-6px);
  transition: max-width .5s var(--ease), margin-left .5s var(--ease),
    opacity .32s var(--ease), transform .5s var(--ease);
}

.rail:hover li span,
.rail:focus-within li span {
  max-width: 160px;
  margin-left: 11px;
  opacity: 1;
  transform: none;
}

/* Apertura escalonada: el texto entra de arriba a abajo */
.rail:hover li:nth-child(2) span,
.rail:focus-within li:nth-child(2) span {
  transition-delay: .04s
}

.rail:hover li:nth-child(3) span,
.rail:focus-within li:nth-child(3) span {
  transition-delay: .08s
}

.rail:hover li:nth-child(4) span,
.rail:focus-within li:nth-child(4) span {
  transition-delay: .12s
}

.rail:hover li:nth-child(5) span,
.rail:focus-within li:nth-child(5) span {
  transition-delay: .16s
}

.rail:hover li:nth-child(7) span,
.rail:focus-within li:nth-child(7) span {
  transition-delay: .2s
}

.rail a svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rail a:hover,
.rail a.is-active {
  color: #fff;
  background: rgba(236, 230, 224, .18)
}

/* ---------- Rail · botón de tema ---------- */
.rail__sep {
  height: 1px;
  margin: 6px 10px;
  background: currentColor;
  opacity: .16;
}

.rail__theme {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  text-align: left;
  color: rgba(242, 239, 233, .8);
  white-space: nowrap;
  transition: background .3s var(--ease), color .3s var(--ease);
}

.rail__theme:hover {
  color: #fff;
  background: rgba(236, 230, 224, .18)
}

.ico-theme {
  width: 19px;
  height: 19px;
  flex: none;
  overflow: visible;
}

.ico-theme__core {
  fill: currentColor;
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .55s var(--ease);
}

.ico-theme__cut {
  transition: transform .55s var(--ease);
}

.ico-theme__rays {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .55s var(--ease), opacity .35s var(--ease);
}

/* Claro: la máscara muerde el disco (luna) y los rayos se repliegan */
:root[data-theme="light"] .ico-theme__cut {
  transform: translate(-5.9px, 4.1px)
}

:root[data-theme="light"] .ico-theme__core {
  transform: scale(1.12)
}

:root[data-theme="light"] .ico-theme__rays {
  transform: rotate(-45deg) scale(.45);
  opacity: 0;
}

/* =====================================================================
   Bloques comunes
   ===================================================================== */
.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 110px)
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px
}

.sec-label {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(242, 239, 233, .85);
  letter-spacing: .02em
}

.sec-label b {
  font-weight: 700
}

.sec-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em
}

.h-xl {
  font-size: clamp(34px, 4.3vw, 62px);
  line-height: 1;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: .012em;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}

.btn__ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--beige);
}

.btn__ico svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--oliva);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.btn__ico--dark svg {
  stroke: var(--verde)
}

.btn--ghost {
  background: rgba(236, 230, 224, .16);
  color: var(--beige)
}

.btn--ghost:hover {
  background: rgba(236, 230, 224, .26);
  transform: translateY(-2px)
}

.btn--solid {
  background: var(--beige);
  color: var(--verde)
}

.btn--solid:hover {
  transform: translateY(-2px);
  background: #fff
}

.btn--solid .btn__ico {
  background: var(--verde)
}

.btn--solid .btn__ico svg {
  stroke: var(--beige)
}

/* ---------- Flechas / dots ---------- */
.round {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--beige);
  transition: transform .3s var(--ease), background .3s var(--ease);
}

.round svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--oliva);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.round:hover {
  transform: scale(1.08);
  background: #fff
}

.round[disabled] {
  opacity: .35;
  cursor: default;
  transform: none
}

.carousel-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: clamp(22px, 3vw, 38px)
}

.carousel-ui--left {
  justify-content: flex-start;
  gap: 12px
}

.dots {
  display: flex;
  align-items: center;
  gap: 9px
}

.dot {
  flex: none;
  padding: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(236, 230, 224, .35);
  transition: background .3s, transform .3s
}

.dot.is-active {
  background: var(--beige);
  transform: scale(1.25)
}

/* =====================================================================
   01 · ESENCIA
   ===================================================================== */
.esencia {
  padding-top: clamp(38px, 4.5vw, 72px)
}

.esencia .sec-label {
  margin-bottom: clamp(20px, 2.6vw, 34px)
}

.esencia__head {
  font-family: var(--sans);
  font-size: clamp(26px, 3.6vw, 50px);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -.015em;
  max-width: min(68%, 25ch);
  margin-bottom: clamp(22px, 2.8vw, 38px);
}

.esencia__head b {
  font-weight: 800
}

.esencia__head i {
  font-style: normal;
  color: var(--txt-mute)
}

.esencia__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
}

.esencia__slides {
  position: relative;
  max-width: 66ch
}

.esencia__p {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.62;
  color: rgba(242, 239, 233, .92);
  display: none;
}

.esencia__p.is-active {
  display: block;
  animation: fade .6s var(--ease)
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.esencia .dots {
  margin-top: clamp(18px, 2.2vw, 30px)
}

/* =====================================================================
   PILARES
   ===================================================================== */
.pilares {
  padding-top: clamp(30px, 3vw, 50px);
  /* Altura única de las tarjetas: nunca cambia. Solo se expande el ancho. */
  --pilar-h: clamp(240px, 28vw, 450px);
}

.pilares__title {
  text-align: center;
  padding-left: var(--rail-space);
  font-size: clamp(30px, 4.4vw, 60px);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .015em;
  margin-bottom: clamp(26px, 3.4vw, 48px);
}

.pilares__title b {
  font-weight: 700
}

.pilares__viewport {
  overflow: hidden;
  padding-inline: 0
}

/* Los controles se centran en el mismo eje que el título */
.pilares .carousel-ui {
  padding-left: var(--rail-space)
}

.pilares__track {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 20px);
  padding-inline: calc(clamp(12px, 1.4vw, 20px) + var(--rail-space)) clamp(12px, 1.4vw, 20px);
  transition: transform .75s var(--ease);
  will-change: transform;
  /* Altura fija: el hover no puede mover el borde con la sección siguiente. */
  min-height: var(--pilar-h);
}

.pilar {
  position: relative;
  flex: 0 0 auto;
  width: clamp(220px, 26vw, 340px);
  height: var(--pilar-h);
  border-radius: var(--r-md);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: width .75s var(--ease), box-shadow .5s var(--ease);
  isolation: isolate;
}

.pilar[data-pilar="naturaleza"] {
  background-image: url('../assets/img/pilar-naturaleza.jpg')
}

.pilar[data-pilar="bienestar"] {
  background-image: url('../assets/img/pilar-bienestar.jpg')
}

.pilar[data-pilar="comunidad"] {
  background-image: url('../assets/img/pilar-comunidad.jpg')
}

.pilar[data-pilar="legado"] {
  background-image: url('../assets/img/pilar-legado.jpg')
}

.pilar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(20, 20, 10, .15), rgba(20, 20, 10, .45));
  transition: opacity .5s var(--ease);
}

.pilar__num {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .75);
  display: grid;
  place-items: center;
  font-size: 10px;
  letter-spacing: .02em;
  color: #fff;
}

.pilar__name {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 2vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(22px, 2.4vw, 38px);
  text-transform: uppercase;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .35);
  transition: top .75s var(--ease), transform .75s var(--ease);
}

.pilar__desc {
  position: absolute;
  z-index: 2;
  left: clamp(14px, 1.4vw, 20px);
  right: clamp(14px, 1.4vw, 20px);
  bottom: clamp(14px, 1.4vw, 20px);
  padding: 13px 18px;
  border-radius: var(--r-sm);
  background: rgba(236, 230, 224, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: clamp(12.5px, .95vw, 14.5px);
  line-height: 1.45;
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}

.pilar__desc b {
  font-weight: 700
}

.pilar.is-open {
  width: clamp(320px, 45vw, 720px)
}

.pilar.is-open .pilar__name {
  top: 58%
}

.pilar.is-open .pilar__desc {
  opacity: 1;
  transform: none
}

.pilar.is-open::after {
  opacity: .85
}

@media (hover:hover) {
  .pilares__track:hover .pilar.is-open:not(:hover) {
    width: clamp(220px, 26vw, 340px)
  }

  .pilares__track:hover .pilar.is-open:not(:hover) .pilar__desc {
    opacity: 0;
    transform: translateY(14px)
  }

  .pilares__track:hover .pilar.is-open:not(:hover) .pilar__name {
    top: 50%
  }

  .pilares__track .pilar:hover {
    width: clamp(320px, 45vw, 720px)
  }

  .pilares__track .pilar:hover .pilar__desc {
    opacity: 1;
    transform: none
  }

  .pilares__track .pilar:hover .pilar__name {
    top: 58%
  }
}

/* =====================================================================
   02 · RESIDENCIAS
   ===================================================================== */
.residencias {
  background: var(--marron);
  overflow: hidden
}

.residencias__grid {
  padding-left: calc(var(--rail-space) + max(var(--pad), calc((100% - var(--maxw))/2 + var(--pad))));
  display: grid;
  grid-template-columns: minmax(260px, 32%) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(26px, 3.4vw, 52px);
}

.residencias__text {
  display: grid;
  gap: clamp(18px, 3vw, 44px);
  padding-top: clamp(4px, 1vw, 14px)
}

.residencias__text .h-xl {
  margin-bottom: -6px
}

.residencias__text p {
  font-size: clamp(14px, 1.02vw, 15.5px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .94)
}

.residencias__media {
  min-width: 0
}

.rail-scroll {
  display: flex;
  gap: clamp(12px, 1.4vw, 20px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.rail-scroll::-webkit-scrollbar {
  display: none
}

.res-card {
  flex: 0 0 clamp(240px, 42vw, 560px);
  margin: 0;
  scroll-snap-align: start;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 1.06/1;
  background: rgba(0, 0, 0, .12);
}

.res-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease)
}

.res-card:hover img {
  transform: scale(1.05)
}

.residencias .round {
  background: var(--beige)
}

.residencias .round svg {
  stroke: var(--marron)
}

/* =====================================================================
   03 · EXPERIENCIAS
   ===================================================================== */
.experiencias {
  overflow: hidden;
  padding-bottom: clamp(40px, 5vw, 80px)
}

.exp__title {
  text-align: center;
  margin-top: clamp(16px, 2vw, 30px)
}

.exp__claim {
  position: relative;
  margin-top: clamp(18px, 2.4vw, 34px);
  padding-block: clamp(30px, 2vw, 24px)
}

.exp__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .18em;
  overflow: hidden;
  pointer-events: none;
  font-size: clamp(19px, 3vw, 42px);
  line-height: 1.34;
  font-weight: 500;
  color: rgba(236, 230, 224, .075);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.exp__bg-row {
  display: flex;
  width: max-content;
  animation: slide-l 34s linear infinite
}

.exp__bg-row--rev {
  animation-name: slide-r
}

.exp__bg-row span {
  padding-right: .35em
}

@keyframes slide-l {
  from {
    transform: translateX(0)
  }

  to {
    transform: translateX(-50%)
  }
}

@keyframes slide-r {
  from {
    transform: translateX(-50%)
  }

  to {
    transform: translateX(0)
  }
}

.exp__lead {
  position: relative;
  z-index: 1;
  /* El carril del rail va dentro de la caja: el texto conserva su ancho
     y el bloque queda centrado en el espacio libre */
  max-width: calc(min(94%, 50ch) + var(--rail-space));
  padding-left: var(--rail-space);
  margin-inline: auto;
  text-align: center;
  font-size: clamp(19px, 3vw, 42px);
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -.012em;
}

.exp__lead b {
  font-weight: 800
}

.exp__lead i {
  font-style: normal;
  color: rgba(236, 230, 224, .32)
}

.gallery {
  margin-top: clamp(26px, 3.4vw, 48px);
  overflow: hidden
}

.gallery__track {
  display: flex;
  gap: clamp(10px, 1vw, 14px);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-inline: clamp(10px, 1vw, 14px);
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none
}

.gallery figure {
  flex: 0 0 clamp(200px, 23vw, 330px);
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 1.14/1;
}

.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease)
}

.gallery figure:hover img {
  transform: scale(1.06)
}

.exp__foot {
  margin-top: clamp(26px, 3.4vw, 48px);
  display: grid;
  justify-items: center;
  gap: clamp(20px, 2.6vw, 34px);
  text-align: center;
}

.exp__foot p {
  max-width: 62ch;
  font-size: clamp(14px, 1.02vw, 15.5px);
  line-height: 1.6;
  color: rgba(242, 239, 233, .9)
}

/* =====================================================================
   04 · UBICACIÓN
   ===================================================================== */
.ubicacion-outer {
  padding-inline: clamp(10px, 1.4vw, 20px)
}

.ubicacion {
  background: var(--marron-osc);
  border-radius: var(--r-lg);
  padding-block: clamp(34px, 4.4vw, 64px);
  overflow: hidden;
}

.ubicacion__grid {
  display: grid;
  grid-template-columns: minmax(240px, 33%) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
  margin-top: clamp(22px, 3vw, 44px);
}

.ubicacion__text {
  display: grid;
  gap: clamp(14px, 1.8vw, 24px)
}

.ubicacion__text .h-xl {
  margin-bottom: 2px
}

.ubicacion__text p {
  font-size: clamp(14px, 1.02vw, 15.5px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .92)
}

.datos {
  margin-top: clamp(8px, 1.4vw, 18px)
}

.datos li {
  font-size: 14px;
  font-weight: 700;
  padding: 11px 0 11px 22px;
  border-top: 1px solid rgba(236, 230, 224, .55);
}

.datos li:last-child {
  border-bottom: 1px solid rgba(236, 230, 224, .55)
}

.ubicacion__map {
  position: relative
}

.ubicacion__map img {
  width: 100%;
  border-radius: var(--r-md);
  aspect-ratio: 1.5/1;
  object-fit: cover;
}

.ubicacion__cta {
  position: absolute;
  right: clamp(-6px, 0.6vw, 10px);
  bottom: clamp(-46px, -3.4vw, -26px);
}

/* =====================================================================
   05 · CONTACTO
   ===================================================================== */
.contacto {
  padding-bottom: clamp(38px, 4.6vw, 72px)
}

.contacto .sec-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 0
}

.contacto__intro {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: calc(var(--pad) + var(--rail-space)) var(--pad);
  text-align: center;
  display: grid;
  gap: clamp(16px, 2vw, 26px);
  justify-items: center;
  margin-top: clamp(26px, 3.4vw, 52px);
}

.contacto__head {
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.14;
  font-weight: 400;
  letter-spacing: -.02em;
}

.contacto__head b {
  font-weight: 800
}

.contacto__head i {
  font-style: normal;
  color: var(--txt-mute)
}

.contacto__intro p {
  font-size: clamp(15px, 1.35vw, 21px);
  line-height: 1.5;
  color: rgba(242, 239, 233, .95)
}

/* ---------- Banda del formulario ---------- */
.form-band {
  background: var(--oliva);
  padding-block: clamp(34px, 4.4vw, 64px)
}

.form-band__lead {
  text-align: center;
  max-width: 70ch;
  margin-inline: auto;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.55;
  color: rgba(255, 255, 255, .9);
}

.form-band__lead b {
  font-weight: 700;
  color: #fff
}

.form {
  max-width: min(880px, 100%);
  margin: clamp(24px, 3vw, 42px) auto 0;
  display: grid;
  gap: 14px
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

.field {
  display: block
}

.field input {
  width: 100%;
  background: rgba(236, 230, 224, .72);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--marron-osc);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

.field input::placeholder {
  color: rgba(51, 29, 13, .6);
  font-weight: 700;
  letter-spacing: .06em
}

.field input:focus {
  outline: none;
  background: var(--beige);
  border-color: var(--verde)
}

.field input.is-error {
  border-color: #8c2f1d;
  background: rgba(236, 230, 224, .9)
}

.form__submit {
  justify-self: center;
  margin-top: clamp(10px, 1.6vw, 22px)
}

.form__msg {
  text-align: center;
  font-size: 13.5px;
  min-height: 1.2em;
  color: #fff
}

.form__msg.is-ok {
  color: var(--beige)
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  background: var(--beige);
  padding-block: clamp(18px, 2.2vw, 30px);
  display: grid;
  place-items: center;
}

.footer__logo {
  width: clamp(150px, 15vw, 215px)
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width:1080px) {

  .residencias__grid,
  .ubicacion__grid {
    grid-template-columns: 1fr
  }

  .residencias__grid {
    padding-inline: calc(var(--pad) + var(--rail-space)) var(--pad);
  }

  .residencias__media {
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad)
  }

  .ubicacion__cta {
    position: static;
    margin-top: 16px;
    justify-self: end
  }

  .ubicacion__map {
    display: grid;
    justify-items: end
  }

  .esencia__body {
    grid-template-columns: 1fr;
    align-items: start
  }

  .esencia__aside {
    justify-self: start
  }
}

@media (max-width:860px) {

  /* El rail sube a barra superior: no hay que reservarle carril lateral */
  :root {
    --rail-space: 0px
  }

  /* Rail pasa a barra superior con solo iconos */
  .rail {
    left: 50%;
    top: clamp(10px, 2vw, 18px);
    transform: translateX(-50%);
    padding: 8px 10px;
    border-radius: 999px;
  }

  .rail ul {
    display: flex;
    gap: 2px
  }

  /* Los 6 objetivos táctiles llenan la barra sin desbordar a 320px.
     El padding lateral cede antes que el icono en pantallas estrechas. */
  .rail a {
    padding: 11px clamp(9px, 3.2vw, 14px);
    border-radius: 999px
  }

  .rail li span {
    display: none
  }

  .rail a svg,
  .ico-theme {
    width: clamp(24px, 6.8vw, 30px);
    height: clamp(24px, 6.8vw, 30px)
  }

  /* Trazo proporcional: a 20px se veía filiforme al ampliar el icono */
  .rail a svg {
    stroke-width: 1.75
  }

  /* En fila el separador es vertical, no horizontal */
  .rail__sep {
    width: 1px;
    height: 20px;
    margin: 0 6px;
    align-self: center;
  }

  .rail__theme {
    width: auto;
    padding: 11px clamp(9px, 3.2vw, 14px);
    border-radius: 999px;
  }

  .hero__frame {
    height: clamp(430px, 66vh, 620px)
  }

  /* Debe despejar la barra del rail: comparte el eje central con ella */
  .hero__isotipo {
    top: clamp(90px, 15vw, 108px)
  }

  .hero__title {
    /* Se apoya sobre la muesca: si baja más, el clip-path le corta el texto */
    bottom: calc(var(--notch-h, 52px) + 14px);
    max-width: min(90%, 24ch);
    font-size: clamp(18px, 4.9vw, 34px)
  }

  .pilares__viewport {
    overflow: visible
  }

  .pilares__track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    transform: none !important;
    gap: 12px;
    padding-inline: var(--pad);
    min-height: 0;
  }

  .pilar,
  .pilar.is-open {
    width: auto;
    height: auto;
    aspect-ratio: 1/1.05;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 14px;
  }

  .pilar__name {
    position: static;
    transform: none;
    top: auto;
    text-align: center;
    font-size: clamp(19px, 5.4vw, 28px);
    margin-bottom: 8px;
  }

  .pilar.is-open .pilar__name {
    top: auto
  }

  .pilar__desc {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    opacity: 1;
    transform: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    font-size: 11.5px;
    line-height: 1.4;
  }

  .pilar.is-open::after,
  .pilar::after {
    opacity: 1;
    background: linear-gradient(180deg, rgba(20, 20, 10, .1), rgba(20, 20, 10, .62))
  }

  .pilares .carousel-ui {
    display: none
  }

  .exp__lead {
    max-width: 100%;
    padding-inline: var(--pad);
    font-size: clamp(18px, 5.2vw, 26px)
  }

  .contacto__intro p br {
    display: none
  }

  .form__row {
    grid-template-columns: 1fr
  }

  .res-card {
    flex-basis: clamp(230px, 72vw, 340px)
  }

  .gallery figure {
    flex-basis: clamp(160px, 44vw, 240px)
  }
}

@media (max-width:520px) {
  .hero__social a {
    width: 32px
  }

  .btn {
    padding: 8px 8px 8px 20px;
    font-size: 14px
  }

  .btn__ico {
    width: 30px;
    height: 30px
  }

  .datos li {
    padding-left: 12px
  }
}

/* Pantallas ultra-estrechas (SE 1ª gen): el rail cede padding, no tamaño de icono */
@media (max-width:360px) {

  .rail a,
  .rail__theme {
    padding-inline: 7px
  }

  .rail {
    padding-inline: 7px
  }
}

/* =====================================================================
   TEMA CLARO
   Misma paleta del cliente, invertida: beige de base, verde de tinta.
   Hero y pilares no cambian: su texto va sobre fotografía.
   ===================================================================== */
:root[data-theme="light"] {
  --txt: #212804;
  --txt-mute: rgba(33, 40, 4, .45);
  --arena: #CDB9A6;
  --arena-claro: #DFD3C7;
  --oliva-claro: #B4B29A;
  color-scheme: light;
}

:root[data-theme="light"] body {
  background: var(--beige);
  color: var(--txt);
}

:root[data-theme="light"] :focus-visible {
  outline-color: var(--verde)
}

/* El rail flota sobre la foto del hero: en claro necesita pastilla propia */
:root[data-theme="light"] .rail {
  background: rgba(236, 230, 224, .74);
  border-color: rgba(33, 40, 4, .14);
  box-shadow: 0 12px 34px rgba(33, 40, 4, .14);
}

:root[data-theme="light"] .rail a,
:root[data-theme="light"] .rail__theme {
  color: rgba(33, 40, 4, .78)
}

:root[data-theme="light"] .rail a:hover,
:root[data-theme="light"] .rail a.is-active,
:root[data-theme="light"] .rail__theme:hover {
  color: var(--verde);
  background: rgba(33, 40, 4, .1);
}

:root[data-theme="light"] .rail__sep {
  opacity: .22
}

:root[data-theme="light"] .sec-label {
  color: rgba(33, 40, 4, .8)
}

:root[data-theme="light"] .esencia__p,
:root[data-theme="light"] .exp__foot p,
:root[data-theme="light"] .contacto__intro p {
  color: rgba(33, 40, 4, .9)
}

:root[data-theme="light"] .exp__bg {
  color: rgba(33, 40, 4, .07)
}

:root[data-theme="light"] .exp__lead i {
  color: rgba(33, 40, 4, .32)
}

/* Botones: el pastilla claro pasa a verde para conservar el contraste */
:root[data-theme="light"] .btn__ico,
:root[data-theme="light"] .round {
  background: var(--verde)
}

:root[data-theme="light"] .btn__ico svg,
:root[data-theme="light"] .btn__ico--dark svg,
:root[data-theme="light"] .round svg {
  stroke: var(--beige)
}

:root[data-theme="light"] .round:hover {
  background: var(--verde-2)
}

:root[data-theme="light"] .btn--ghost {
  background: rgba(33, 40, 4, .1);
  color: var(--verde);
}

:root[data-theme="light"] .btn--ghost:hover {
  background: rgba(33, 40, 4, .16)
}

:root[data-theme="light"] .btn--solid {
  background: var(--verde);
  color: var(--beige);
}

:root[data-theme="light"] .btn--solid:hover {
  background: var(--verde-2)
}

:root[data-theme="light"] .btn--solid .btn__ico {
  background: var(--beige)
}

:root[data-theme="light"] .btn--solid .btn__ico svg {
  stroke: var(--verde)
}

:root[data-theme="light"] .dot {
  background: rgba(33, 40, 4, .3)
}

:root[data-theme="light"] .dot.is-active {
  background: var(--verde)
}

:root[data-theme="light"] .residencias {
  background: var(--arena);
  color: var(--marron-osc);
}

:root[data-theme="light"] .residencias__text p {
  color: rgba(51, 29, 13, .88)
}

:root[data-theme="light"] .residencias .round {
  background: var(--marron-osc)
}

:root[data-theme="light"] .residencias .round svg {
  stroke: var(--beige)
}

:root[data-theme="light"] .ubicacion {
  background: var(--arena-claro);
  color: var(--marron-osc);
}

:root[data-theme="light"] .ubicacion__text p {
  color: rgba(51, 29, 13, .9)
}

:root[data-theme="light"] .datos li {
  border-color: rgba(51, 29, 13, .35)
}

:root[data-theme="light"] .form-band {
  background: var(--oliva-claro)
}

:root[data-theme="light"] .form-band__lead {
  color: rgba(33, 40, 4, .85)
}

:root[data-theme="light"] .form-band__lead b,
:root[data-theme="light"] .form__msg,
:root[data-theme="light"] .form__msg.is-ok {
  color: var(--verde)
}

:root[data-theme="light"] .field input {
  background: rgba(255, 255, 255, .8)
}

:root[data-theme="light"] .field input:focus {
  background: #fff
}

:root[data-theme="light"] .footer {
  background: #DAD2C9
}

/* =====================================================================
   Transición de tema · polygon — theme-toggle.rdsx.dev
   ===================================================================== */
::view-transition-group(root) {
  animation-duration: .7s;
  animation-timing-function: var(--expo-out);
}

::view-transition-old(root) {
  animation: none;
  animation-fill-mode: both;
  z-index: -1;
}

::view-transition-new(root) {
  animation-name: reveal-light;
  animation-fill-mode: both;
}

:root[data-theme="dark"]::view-transition-new(root) {
  animation-name: reveal-dark
}

@keyframes reveal-dark {
  from {
    clip-path: polygon(50% -71%, -50% 71%, -50% 71%, 50% -71%)
  }

  to {
    clip-path: polygon(50% -71%, -50% 71%, 50% 171%, 171% 50%)
  }
}

@keyframes reveal-light {
  from {
    clip-path: polygon(171% 50%, 50% 171%, 50% 171%, 171% 50%)
  }

  to {
    clip-path: polygon(171% 50%, 50% 171%, -50% 71%, 50% -71%)
  }
}

@media (prefers-reduced-motion:reduce) {

  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important
  }

  .ico-theme__core,
  .ico-theme__cut,
  .ico-theme__rays {
    transition: none
  }
}