/* ECO Hábitat Prádena · landing
   Sistema visual heredado de tiniliving.com: PP Mori, crema cálido, terracota, fotografía a gran formato. */

@font-face {
  font-family: "PP Mori";
  src: url("../assets/fonts/PPMori-Extralight.woff2") format("woff2");
  font-weight: 100 250;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Mori";
  src: url("../assets/fonts/PPMori-Regular.woff2") format("woff2");
  font-weight: 251 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Mori";
  src: url("../assets/fonts/PPMori-Semibold.woff2") format("woff2");
  font-weight: 501 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1d1d1b;
  --night: #211e19;
  --muted: #5e574b;
  --cream: #f6f3ec;
  --sand: #efebe1;
  --paper: #ffffff;
  --terra: #d76b32;
  --terra-deep: #b35523;
  --terra-dark: #8f431b;
  --wood: #7a5a3d;
  --line: rgba(29, 29, 27, 0.16);
  --line-light: rgba(255, 255, 255, 0.28);
  --danger: #a3261a;

  --radius: 3px;
  --gutter: clamp(1.5rem, 5.6vw, 6rem);
  --maxw: 1360px;
  --header-h: 72px;
  --section: clamp(4.5rem, 8vw, 8rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --fs-small: 0.8125rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h3: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  --fs-display: clamp(1.625rem, 1.2rem + 1.5vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  scrollbar-color: rgba(29, 29, 27, 0.4) var(--sand);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "PP Mori", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--terra-deep);
}

::selection { background: var(--terra-deep); color: #fff; }

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

h1, h2, h3, p, ul, dl, dd, figure, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--terra-deep);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.hero :focus-visible,
.built :focus-visible,
.deal__offer :focus-visible,
.site-footer :focus-visible { outline-color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

.display {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.42;
  max-width: 30em;
  text-wrap: pretty;
}

.note {
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--muted);
}

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn__arrow { transition: transform 0.45s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(5px); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--ink); color: #fff; }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--terra-deep); }
.btn--dark[disabled] { background: var(--muted); cursor: progress; }

.btn--line { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }

.btn--full { width: 100%; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
}
.link svg { transition: transform 0.45s var(--ease); }
.link:hover svg { transform: translate(2px, -2px); }

/* ---------- Cabecera ---------- */

.site-header {
  --header-gap: 1.5rem;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--header-gap);
  padding-inline: var(--gutter);
  color: var(--ink);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
/* Sobre la portada no hay barra: un velo claro que se desvanece y deja leer el texto oscuro sobre el cielo */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -2.5rem 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(246, 243, 236, 0.72), rgba(246, 243, 236, 0));
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.site-header.is-solid {
  background: var(--cream);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-solid::before { opacity: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  min-width: 0;
}
.brand__logo { width: auto; height: 34px; }
.brand__promo {
  padding-left: 1rem;
  border-left: 1px solid currentColor;
  font-size: 0.9375rem;
  line-height: 1.6;
  white-space: nowrap;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.site-nav {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
  margin-left: auto;
  font-size: 0.9375rem;
}
.site-nav a {
  padding-block: 0.5rem;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.35rem) / 0 1px no-repeat;
  transition: background-size 0.45s var(--ease);
}
.site-nav a:hover { background-size: 100% 1px; }

.btn--header {
  min-height: 44px;
  max-width: 16rem;
  padding: 0.6rem 1.125rem;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    max-width 0.55s var(--ease), padding 0.55s var(--ease), margin 0.55s var(--ease),
    opacity 0.35s var(--ease), visibility 0.55s;
}
.btn--header:hover { background: var(--terra-deep); border-color: var(--terra-deep); }

/* En la portada el nombre ya es el titular y el botón ya acompaña al precio: en la cabecera aparecen al pasarla */
.site-header:not(.is-solid) .brand__promo { opacity: 0; visibility: hidden; }
.site-header:not(.is-solid) .btn--header {
  max-width: 0;
  margin-left: calc(var(--header-gap) * -1);
  padding-inline: 0;
  border-inline-width: 0;
  opacity: 0;
  visibility: hidden;
}

/* ---------- 1 · Portada ---------- */

/* La fotografía ocupa toda la pantalla; abajo, el nombre con su frase a un lado y el precio con su botón al otro */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--night);
  color: #fff;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 58%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 19, 14, 0.76) 0%, rgba(22, 19, 14, 0.44) 22%, rgba(22, 19, 14, 0) 54%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem clamp(2rem, 5vw, 5rem);
  width: 100%;
  padding: calc(var(--header-h) + 2rem) var(--gutter) clamp(2rem, 4.2vw, 3.75rem);
}
.hero__copy { min-width: 0; }
.hero__title {
  font-size: clamp(2.375rem, 1rem + 4vw, 4.25rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
}
.hero__text {
  margin-top: clamp(1rem, 1.5vw, 1.5rem);
  max-width: 31em;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.hero__text span { display: block; color: #fff; }

.hero__deal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.1rem;
  flex-shrink: 0;
}
.hero__deal .btn { min-height: 52px; padding: 0.85rem 1.5rem; font-size: 1rem; }
.price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1;
  white-space: nowrap;
}
.price__from,
.price__tax { font-size: 0.9375rem; }
.price__value {
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Pie de foto en vertical, pegado al borde de la imagen */
.hero__note {
  position: absolute;
  z-index: 1;
  right: calc(var(--gutter) * 0.42);
  bottom: clamp(2rem, 4.2vw, 3.75rem);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

@media (max-width: 899px) {
  /* En vertical la foto queda arriba y se funde con el fondo oscuro, donde va el texto */
  .hero__img { height: 66%; }
  .hero::after {
    background: linear-gradient(to top, var(--night) 0%, var(--night) 36%, rgba(33, 30, 25, 0.78) 48%, rgba(33, 30, 25, 0) 70%);
  }
  .hero__inner { flex-direction: column; align-items: stretch; gap: 1.75rem; }
  .hero__deal { align-items: stretch; gap: 1rem; }
  .hero__note {
    top: calc(var(--header-h) + 0.4rem);
    right: var(--gutter);
    bottom: auto;
    writing-mode: horizontal-tb;
    transform: none;
    color: var(--ink);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero__img { animation: settle 2.8s var(--ease) both; }
}
@keyframes settle { from { transform: scale(1.08); } }

/* ---------- 2 · El proyecto ---------- */

.project { padding-bottom: clamp(3rem, 6vw, 6rem); }

/* Apertura de sección: un filete con el nombre de la sección y, debajo, titular y texto que arrancan a la misma altura */
.intro {
  display: grid;
  /* Las mismas dos columnas que el escenario de los pilares: titular sobre la foto, texto sobre los textos */
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  column-gap: clamp(3rem, 8vw, 9rem);
  align-items: start;
}
.intro__label {
  grid-column: 1 / -1;
  margin-bottom: clamp(1.5rem, 2.6vw, 2.25rem);
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.3;
}
.intro .display { grid-column: 1; }
.intro__text { grid-column: 2; max-width: 30rem; }

.pillars { margin-top: clamp(4rem, 8vw, 7.5rem); }
.pillar + .pillar { margin-top: 4.5rem; }

.pillar__media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-inline: var(--gutter);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}
.pillar__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pillar__media figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3.5rem 1.1rem 0.9rem;
  background: linear-gradient(to top, rgba(24, 21, 16, 0.7), rgba(24, 21, 16, 0));
  color: #fff;
  font-size: var(--fs-small);
}

.pillar__text { padding: 1.4rem var(--gutter) 0; }
.pillar__text h3 {
  font-size: var(--fs-h3);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.pillar__body p {
  margin-top: 0.7rem;
  max-width: 27em;
  color: var(--muted);
}

@media (min-width: 900px) {
  .pillar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(3rem, 8vw, 9rem);
    align-items: center;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .pillar__media { margin-inline: 0; }
  .pillar__text { padding: 0; }

  /* Con JS: escenario fijo guiado por el scroll */
  .js .pillars { height: 270vh; }
  .js .pillars__stage {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: clamp(3rem, 8vw, 9rem);
    height: 100vh;
    height: 100svh;
    max-width: var(--maxw);
    margin-inline: auto;
    padding: calc(var(--header-h) + 6vh) var(--gutter) 8vh;
  }
  .js .pillar { display: contents; }
  .js .pillar + .pillar { margin-top: 0; }

  .js .pillar__media {
    grid-column: 1;
    grid-row: 1 / -1;
    aspect-ratio: auto;
    height: 100%;
    opacity: 0;
    transition: opacity 0.9s var(--ease);
  }
  .js .pillar.is-active .pillar__media { opacity: 1; z-index: 1; }
  .js .pillar__media img { scale: 1.07; transition: scale 2s var(--ease), clip-path 1.25s var(--ease); }
  .js .pillar.is-active .pillar__media img { scale: 1; }

  .js .pillar__text {
    grid-column: 2;
    max-width: 30rem;
    border-top: 1px solid var(--line);
  }
  .js .pillar:nth-child(1) .pillar__text { grid-row: 2; }
  .js .pillar:nth-child(2) .pillar__text { grid-row: 3; }
  .js .pillar:nth-child(3) .pillar__text { grid-row: 4; border-bottom: 1px solid var(--line); }

  .js .pillar__text h3 {
    padding-block: 1.3rem;
    font-size: clamp(1.5rem, 0.9rem + 1.5vw, 2.25rem);
    color: rgba(29, 29, 27, 0.55);
    cursor: pointer;
    transition: color 0.5s var(--ease);
  }
  .js .pillar__text h3:hover { color: rgba(29, 29, 27, 0.72); }
  .js .pillar.is-active .pillar__text h3 { color: var(--ink); cursor: default; }

  .js .pillar__body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.85s var(--ease), opacity 0.6s var(--ease);
  }
  .js .pillar.is-active .pillar__body { grid-template-rows: 1fr; opacity: 1; }
  .js .pillar__body p { margin-top: 0; overflow: hidden; }
  .js .pillar__body p::after { content: ""; display: block; height: 1.6rem; }
}

/* ---------- 3 · La vivienda ---------- */

.home { background: var(--sand); }

/* Ficha de la vivienda: cinco datos, cada uno bajo su filete */
.ficha {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 0.75fr 0.9fr 1.65fr;
  column-gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}
.ficha > div {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.ficha dt {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.3;
}
.ficha dd {
  margin-top: 0.6rem;
  font-size: clamp(1.375rem, 1.05rem + 0.95vw, 1.75rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.ficha small {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}

/* Visor 3D */
.model3d {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: end;
  margin-top: clamp(4rem, 8vw, 8rem);
}
.model3d__head { grid-column: 1; grid-row: 1; }
.model3d__inside { grid-column: 2; grid-row: 1; }
.viewer3d {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  height: clamp(320px, 60vh, 600px);
  cursor: grab;
}
.viewer3d:active { cursor: grabbing; }
.viewer3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  touch-action: pan-y;
  transition: opacity 1s var(--ease);
}
.viewer3d.is-ready canvas { opacity: 1; }
.viewer3d__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted);
  font-size: var(--fs-small);
  text-align: center;
}
.btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }
.btn--line[aria-pressed="true"] { background: var(--ink); color: #fff; }

.plan {
  display: grid;
  grid-template-columns: minmax(280px, 4fr) minmax(0, 8fr);
  gap: 2.5rem var(--gutter);
  align-items: start;
  margin-top: clamp(4rem, 8vw, 8rem);
}
.plan h3,
.model3d h3 {
  font-size: var(--fs-h3);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.plan__hint { margin-top: 0.75rem; color: var(--muted); }

.rooms { margin-top: 1.75rem; border-bottom: 1px solid var(--line); }
.rooms button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.72rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease), padding 0.45s var(--ease);
}
.rooms button span:first-child { position: relative; }
.rooms button span:first-child::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--terra-deep);
  transform: translateY(-50%) scale(0);
  transition: transform 0.45s var(--ease);
}
.rooms button span:last-child { color: var(--muted); white-space: nowrap; }
.rooms.has-active button:not(.is-active) { color: var(--muted); }
.rooms button.is-active { padding-left: 1.1rem; font-weight: 600; }
.rooms button.is-active span:first-child::before { transform: translateY(-50%) scale(1); }
.rooms button.is-active span:last-child { color: var(--ink); }
.plan .note { margin-top: 1.25rem; max-width: 30em; }

.plan__canvas {
  position: relative;
  aspect-ratio: 1700 / 1119;
}
.plan__canvas img,
.plan__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.plan__canvas img { mix-blend-mode: multiply; }
.plan__overlay g { opacity: 0; transition: opacity 0.5s var(--ease); cursor: pointer; }
.plan__overlay g.is-active { opacity: 1; }
.plan__overlay .veil { fill: var(--sand); fill-opacity: 0.68; }
.plan__overlay .edge {
  fill: transparent;
  stroke: var(--ink);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
}
.plan__overlay .veil { pointer-events: none; }

.views {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem) clamp(1rem, 2vw, 2rem);
  margin-top: clamp(4rem, 8vw, 8rem);
}
.views figure img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--cream);
}
.views figcaption,
.plot figcaption,
.strip figcaption {
  margin-top: 0.7rem;
  font-size: var(--fs-small);
  line-height: 1.4;
}
.views figcaption, .plot figcaption { color: var(--muted); }
.views__main { grid-column: 1 / span 7; }
.views__side { grid-column: 9 / span 4; align-self: end; }
.views__wide { grid-column: 3 / -1; }

/* ---------- Viviendas construidas ---------- */

.built {
  background: var(--night);
  color: var(--cream);
  scrollbar-color: rgba(246, 243, 236, 0.45) transparent;
}
.built__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}
.built__head .lead { margin-top: 1rem; color: rgba(246, 243, 236, 0.78); }
.built__controls { display: flex; gap: 0.75rem; flex-shrink: 0; }

.round {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(246, 243, 236, 0.4);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s;
}
.round:hover { background: var(--cream); color: var(--night); border-color: var(--cream); }
.round[disabled] { opacity: 0.3; pointer-events: none; }

.strip {
  display: flex;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding: 0 var(--gutter) 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.strip figure {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.strip { cursor: grab; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.strip img { -webkit-user-drag: none; user-select: none; }
.strip img {
  width: auto;
  height: clamp(240px, 46vh, 460px);
  max-width: none;
  border-radius: var(--radius);
  background: #2c2822;
}
.strip figcaption { color: rgba(246, 243, 236, 0.78); }

/* ---------- 4 · Ubicación ---------- */

.place__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 3rem var(--gutter);
  align-items: start;
}
.place__text .lead { margin-top: 1.75rem; }

.routes { margin-top: 2.5rem; border-bottom: 1px solid var(--line); }
.routes > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}
.routes dt { font-size: var(--fs-lead); }
.routes dd { color: var(--muted); }
.routes strong { color: var(--ink); font-weight: 600; }

.place__address {
  margin-top: 2rem;
  font-size: var(--fs-lead);
  line-height: 1.3;
}

.map__canvas {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}
.map__canvas iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) sepia(0.18) contrast(0.95);
}

.map__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin-top: 1.25rem;
}

.plot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
  margin-top: clamp(4rem, 8vw, 8rem);
}
.plot img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--sand);
}
.plot__a { grid-column: 2 / span 4; }
.plot__b { grid-column: 7 / span 4; margin-top: clamp(2.5rem, 8vw, 8rem); }


/* Las imágenes se descubren como un panel corredero de la fachada.
   El recorte va en los hijos: recortar la propia figura la haría invisible para el observador. */
.reveal-on [data-reveal] > * {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.25s var(--ease);
}
.reveal-on [data-reveal].is-in > * { clip-path: inset(0 0 0 0); }

/* ---------- 5 · Precio y contacto ---------- */

.deal {
  background: var(--terra-deep);
  color: #fff;
}
.deal ::selection { background: var(--ink); }
.deal__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 3rem clamp(2rem, 8vw, 9rem);
  align-items: start;
}
.deal__offer {
  position: sticky;
  top: calc(var(--header-h) + 3rem);
}
.deal__includes { margin-top: clamp(2rem, 4vw, 3.5rem); }
.deal__price {
  display: grid;
  font-weight: 300;
  line-height: 1;
}
.deal__from, .deal__tax { font-size: var(--fs-body); font-weight: 400; }
.deal__value {
  margin-block: 0.35rem 0.6rem;
  font-size: clamp(2.75rem, 1.5rem + 5.2vw, 4.5rem);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.deal__includes { font-weight: 600; }
.deal__list { margin-top: 0.9rem; border-bottom: 1px solid var(--line-light); max-width: 32em; }
.deal__list li { padding: 0.8rem 0; border-top: 1px solid var(--line-light); }

.form-card {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
}
.form-card ::selection { background: var(--terra-deep); }
.form h3, .form-done h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.form__intro { margin-top: 0.6rem; color: var(--muted); }

.field { margin-top: 1.25rem; }
.field label { display: block; margin-bottom: 0.4rem; font-size: 0.9375rem; }
.optional { color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(29, 29, 27, 0.5);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(179, 85, 35, 0.35);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error {
  margin-top: 0.4rem;
  color: var(--danger);
  font-size: var(--fs-small);
}
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.2rem 0.75rem;
  align-items: start;
  margin-block: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.4;
}
.check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.05rem 0 0;
  accent-color: var(--terra-deep);
}
.check .field__error { grid-column: 2; margin-top: 0; }

.form__status { margin-top: 0.9rem; color: var(--danger); font-size: 0.9375rem; }
.form .note { margin-top: 1rem; }
.form__preview {
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px dashed rgba(29, 29, 27, 0.4);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--fs-small);
}

.form-done { color: var(--ink); outline: none; }
.form-done svg { color: var(--terra-deep); }
.form-done h3 { margin-top: 1.25rem; }
.form-done p { margin-top: 0.75rem; color: var(--muted); }

[hidden] { display: none !important; }

/* ---------- Pie ---------- */

.site-footer {
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9375rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem var(--gutter);
}
.site-footer__brand img { width: auto; height: 38px; filter: brightness(0) invert(1); }
.site-footer__brand p { margin-top: 1.25rem; color: #fff; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  align-content: start;
  justify-content: flex-end;
}
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal {
  grid-column: 1 / -1;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-right: max(0px, calc(100% - 62em));
  font-size: var(--fs-small);
  line-height: 1.5;
}
.site-footer__copy { grid-column: 1 / -1; font-size: var(--fs-small); }

/* ---------- Adaptación ---------- */

@media (max-width: 1100px) {
  .brand__promo { display: none; }
}

@media (max-width: 899px) {
  :root { --header-h: 64px; }

  .site-nav { display: none; }
  .brand__logo { height: 30px; }

  .intro .display,
  .intro__text { grid-column: 1 / -1; }
  .intro__text { margin-top: 1.25rem; }
  .ficha { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
  .ficha > div:last-child { grid-column: 1 / -1; }

  .place__grid,
  .deal__grid,
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }

  .plan { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .plan__aside { display: contents; }
  .plan h3 { order: 1; }
  .plan__hint { order: 2; }
  .plan__sheet { order: 3; margin-top: 1.5rem; margin-inline: calc(var(--gutter) * -0.5); }
  .rooms {
    order: 4;
    display: flex;
    gap: 0.5rem;
    margin: 1.25rem calc(var(--gutter) * -1) 0;
    padding: 0 var(--gutter) 0.75rem;
    border: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .rooms li { flex: 0 0 auto; }
  .rooms button {
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    white-space: nowrap;
  }
  .rooms button span:first-child::before { display: none; }
  .rooms.has-active button:not(.is-active) { color: var(--ink); }
  .rooms button.is-active {
    padding-left: 0.85rem;
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    font-weight: 400;
  }
  .rooms button.is-active span:last-child { color: rgba(255, 255, 255, 0.8); }
  .plan .note { order: 5; margin-top: 0.75rem; }

  .views__main, .views__side, .views__wide { grid-column: 1 / -1; }

  .built__head { align-items: start; flex-direction: column; }
  .strip figure { width: 74vw; }
  .strip img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .plot__a { grid-column: 1 / span 6; }
  .plot__b { grid-column: 7 / span 6; margin-top: 3rem; }
  .model3d { grid-template-columns: minmax(0, 1fr); }
  .model3d__inside { grid-column: 1; grid-row: 3; justify-self: start; }
  .viewer3d { height: clamp(260px, 84vw, 400px); margin-inline: calc(var(--gutter) * -0.5); }

  .site-footer__links { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .btn--header { padding-inline: 0.9rem; font-size: 0.9375rem; }
  .routes > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}

/* ---------- Idioma ---------- */

.lang {
  padding: 0.5rem 0.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.lang:hover { text-decoration: underline; }

/* ---------- Ajustes de la revisión de estilo ---------- */

/* Sin barras de desplazamiento del sistema en las tiras horizontales */
.strip,
.rooms,
.pillars__stage { scrollbar-width: none; }
.strip::-webkit-scrollbar,
.rooms::-webkit-scrollbar,
.pillars__stage::-webkit-scrollbar { display: none; }

/* Flechas desnudas, como en tiniliving.com */
.round { width: 44px; height: 44px; border: 0; }

@media (max-width: 899px) {
  .lang { margin-left: auto; }

  .btn--header { min-height: 40px; padding: 0.5rem 0.8rem; font-size: 0.875rem; }

  /* Los tres pilares, en una tira que se desliza */
  .pillars__stage {
    display: flex;
    gap: 0.75rem;
    padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
  }
  .pillar { flex: 0 0 82%; scroll-snap-align: start; }
  .pillar + .pillar { margin-top: 0; }
  .pillar__media { margin-inline: 0; aspect-ratio: 4 / 5; }
  .pillar__text { padding-inline: 0; }

  .views__side { grid-column: 4 / -1; }

  .viewer3d { height: clamp(240px, 72vw, 340px); margin-inline: calc(var(--gutter) * -1); }

  .rooms {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  }
}

/* ---------- Ajustes tras la revisión del cliente ---------- */

/* Menos aire muerto entre el titular de cada sección y lo que sigue */
.pillars { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.model3d,
.plan,
.views,
.plot { margin-top: clamp(3rem, 6vw, 6rem); }
.plot__b { margin-top: 0; }

@media (min-width: 900px) {
  /* El escenario ya trae su propio margen superior: sin hueco añadido tras la apertura */
  .js .pillars { margin-top: 0; }
  .js .pillars__stage { padding: calc(var(--header-h) + 4vh) var(--gutter) 6vh; }

  /* Plano: el dibujo manda y las estancias son su leyenda, a su lado */
  .plan {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "title title"
      "hint hint"
      "sheet rooms"
      "sheet note";
    gap: 0 clamp(2rem, 5vw, 5rem);
  }
  .plan__aside { display: contents; }
  .plan h3 { grid-area: title; }
  .plan__hint { grid-area: hint; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
  .plan__sheet { grid-area: sheet; }
  .rooms {
    grid-area: rooms;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.5rem;
    margin-top: 0;
    border-bottom: 0;
  }
  .rooms button { display: block; padding: 0.7rem 0 0.85rem; }
  .rooms button span { display: block; }
  .rooms button span:last-child { margin-top: 0.1rem; font-size: 0.875rem; }
  .plan .note { grid-area: note; }

  /* Imágenes sobre una misma retícula: dos arriba a igual altura y una ancha debajo */
  .views { row-gap: clamp(1.5rem, 2.5vw, 2.5rem); }
  .views__main { grid-column: 1 / span 7; }
  .views__side { grid-column: 8 / span 5; align-self: auto; }
  .views__main img,
  .views__side img { height: clamp(300px, 33vw, 480px); object-fit: cover; }
  .views__wide { grid-column: 1 / -1; }

  .plot__a { grid-column: 1 / span 6; }
  .plot__b { grid-column: 7 / span 6; }
  .plot img { aspect-ratio: 4 / 3; object-position: 50% 62%; }
}

@media (max-width: 899px) {
  .views__side { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
