/* Macre Propiedades · demo "Planos". Tokens = Variables "Primitivos" del Figma. */
@font-face { font-family: "Josefin Sans"; src: url("fonts/josefin-sans-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("fonts/josefin-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Onest"; src: url("fonts/onest-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Onest"; src: url("fonts/onest-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --noche: #142440;
  --blanco: #ffffff;
  --niebla: #eef0f4;
  --acero: #525e76;
  --linea: #9aa6bc;
  --tinta: #121b2e;
  --margen: clamp(20px, 6vw, 96px);
  --gap: clamp(12px, 2vw, 28px);
  --sec: clamp(88px, 10vw, 150px);
  --display: "Josefin Sans", "Futura", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; scrollbar-color: var(--noche) var(--niebla); }
body { margin: 0; background: var(--blanco); color: var(--tinta); font: 400 17px/1.6 "Onest", system-ui, sans-serif; overflow-x: clip; }
::selection { background: var(--noche); color: var(--blanco); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--noche); outline-offset: 3px; }
.pie :focus-visible { outline-color: var(--blanco); }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--noche); color: var(--blanco); padding: 12px 16px; }
.saltar:focus { top: 12px; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: 0.02em; color: var(--noche); }
h2 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.1; }

.franja { background: var(--noche); color: var(--blanco); font-size: 16px; text-align: center; padding: 8px var(--margen); }

.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--noche); color: var(--blanco); font: 600 16px/1 "Onest", sans-serif; text-decoration: none; border: 0; cursor: pointer; transition: background-color .25s var(--ease), color .25s; }
.boton:hover { background: var(--tinta); }
.boton-chico { min-height: 44px; padding: 0 20px; }
.boton-borde { background: var(--blanco); color: var(--noche); border: 2px solid var(--noche); }
.boton-borde:hover { background: var(--noche); color: var(--blanco); }
.enlace { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; transition: text-underline-offset .25s var(--ease); }
.enlace:hover { text-underline-offset: 8px; }

/* Los edificios de línea. */
.marca-edif path, .edif-plano path, .pie-edif path { fill: none; stroke: var(--noche); stroke-linecap: round; stroke-linejoin: round; }
.marca-edif path { stroke-width: 12; }
.edif-plano path { stroke-width: 3; }
.pie-edif path { stroke: var(--blanco); stroke-width: 10; }

.cabecera { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--margen); background: var(--blanco); }
.marca { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.marca-edif { width: 52px; height: auto; }
.marca-n { font-family: var(--display); font-weight: 300; font-size: 24px; letter-spacing: 0.18em; color: var(--noche); white-space: nowrap; }
.cabecera ul { display: flex; gap: 26px; }
.cabecera nav a { text-decoration: none; font-weight: 600; font-size: 16px; display: inline-flex; min-height: 44px; align-items: center; white-space: nowrap; }
.cabecera nav a:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Portada: el plano que se vuelve casa. */
.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; padding: 40px var(--margen) 56px; background: var(--niebla); }
.hero-texto { grid-column: 1 / 6; }
.hero h1 { font-size: clamp(36px, 3.8vw, 54px); line-height: 1.08; }
.hero-bajada { margin-top: 20px; max-width: 40ch; font-size: 18px; color: var(--acero); }
.hero-acc { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 28px; }
.hero-pieza { grid-column: 6 / 13; position: relative; aspect-ratio: 1.45; }
.edif-plano { position: absolute; inset: 8% 10%; width: 80%; height: 84%; transition: opacity .8s var(--ease); }
#planos-3d { position: absolute; left: -8%; top: -12%; width: 116%; height: 124%; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease); }
html.planos-3d-on #planos-3d { opacity: 1; }
html.planos-3d-on .edif-plano { opacity: 0; }

/* Capítulos y láminas. */
.capitulo { padding: var(--sec) var(--margen); }
.cap-lotes { background: var(--niebla); }
.cap-cab { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; margin-bottom: 40px; }
.cap-cab h2 { grid-column: 1 / 7; }
.cap-cab p { grid-column: 7 / 13; color: var(--acero); max-width: 56ch; }
.cap-lotes .cap-cab { align-items: start; }
.cap-lotes .cap-cab p { grid-column: 1 / 7; margin-top: 12px; }

.laminas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.laminas-lotes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.lamina { display: flex; flex-direction: column; gap: 6px; padding: 26px 26px 18px; background: var(--niebla); }
.cap-lotes .lamina { background: var(--blanco); }
.l-dir { font-size: 26px; line-height: 1.15; }
.l-sub { font-size: 16px; color: var(--acero); }
.l-dl { display: grid; gap: 0; margin-top: 10px; }
.l-dl div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 6px 8px; }
.l-dl div:nth-child(odd) { background: color-mix(in srgb, var(--noche) 4%, transparent); }
.l-dl dt { font-size: 16px; color: var(--acero); }
.l-dl dd { font-size: 16px; }
.l-precio { margin-top: auto; padding-top: 12px; font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--noche); font-variant-numeric: tabular-nums; }
.l-acc { display: flex; flex-wrap: wrap; gap: 0 22px; font-size: 16px; }
.l-acc .enlace { min-height: 44px; display: inline-flex; align-items: center; }
.fx-ver-360 { color: inherit; font-size: 16px; font-weight: 600; padding: 0; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.ciudad { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 0 var(--margen) var(--sec); }
.ciudad figure { position: relative; overflow: hidden; }
.ciudad img { width: 100%; height: 100%; object-fit: cover; }
.c-a { grid-column: 1 / 9; aspect-ratio: 16 / 7; }
.c-b { grid-column: 9 / 13; aspect-ratio: auto; }
.c-c { grid-column: 1 / 5; aspect-ratio: 4 / 3; }
.c-d { grid-column: 5 / 13; aspect-ratio: 16 / 7; }
.c-c, .c-d { aspect-ratio: auto; height: clamp(240px, 24vw, 380px); }
figcaption { position: absolute; left: 0; bottom: 0; background: var(--noche); color: var(--blanco); font-size: 16px; padding: 6px 12px; }

.contacto { padding: var(--sec) var(--margen); display: grid; justify-items: start; gap: 22px; }
.contacto-frase { font-size: 19px; max-width: 40ch; color: var(--acero); }
.contacto-datos { display: grid; gap: 2px; width: min(640px, 100%); }
.contacto-datos li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 10px 0; }
.contacto-datos li > span:first-child { color: var(--acero); }

.pie { background: var(--noche); color: #d3d9e4; padding: 64px var(--margen) 48px; font-size: 16px; display: grid; gap: 8px; }
.pie p { max-width: 64ch; }
.pie-prop { font-size: .55em; letter-spacing: .3em; display: block; }
.pie-marca { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 300; letter-spacing: 0.14em; font-size: 24px; color: var(--blanco); margin-bottom: 10px; }
.pie-edif { width: 64px; height: auto; }
.pie-creditos { margin-top: 10px; }

/* Mapa del kit. */
.fx-mapa { max-width: none; margin: 0; padding: var(--sec) var(--margen); background: var(--blanco); }
.fx-mapa h2 { margin-bottom: 16px; }
.fx-mapa-lista a, .fx-mapa-frame { border-radius: 0; }
.fx-mapa-lista a { border: 0; background: var(--niebla); }
.fx-mapa-lista a[aria-current="true"], .fx-mapa-lista a:hover { background: var(--noche); color: var(--blanco); }
@media (min-width: 860px) { .fx-mapa-frame { height: 100%; min-height: 460px; } .fx-mapa-lista a { min-height: 44px; padding: .45rem .9rem; } }
.fx-mapa-lista a[aria-current="true"]::before, .fx-mapa-lista a:hover::before { background: var(--blanco); }
.fx-mapa-frame { background: var(--niebla); }
.fx-luz { display: none; }
html:not(.mouse-movido) .fx-cursor, html:not(.mouse-movido) .fx-cursor-punto { opacity: 0; }

/* Movimiento: lo oculto se oculta solo con JS (.anim). */
html.anim .hero-bajada, html.anim .hero-acc { opacity: 0; }
html.anim .lamina.entra { opacity: 0; transform: translateY(18px); }
.lamina.entrada { transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (min-width: 901px) {
  .hero { min-height: calc(100svh - 106px); }
  .contacto { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr auto; column-gap: var(--gap); align-items: start; }
  .contacto h2, .contacto-frase { grid-column: 1 / 6; }
  .contacto-datos { grid-column: 7 / 13; grid-row: 1 / 3; }
  .contacto > .boton { grid-column: 7 / 13; grid-row: 3; justify-self: start; }
}
@media (max-width: 900px) {
  .cabecera nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .hero-texto, .hero-pieza { grid-column: 1; }
  .hero-pieza { order: -1; width: min(100%, 520px); justify-self: center; }
  #planos-3d { left: 0; top: 0; width: 100%; height: 100%; }
  .cap-cab { display: block; }
  .cap-cab p { margin-top: 12px; }
  .ciudad figure { grid-column: 1 / 13 !important; aspect-ratio: 16 / 10 !important; height: auto !important; }
}
@media (max-width: 720px) {
  .contacto-datos li { grid-template-columns: 1fr; gap: 2px; }
  .l-dl div { grid-template-columns: 96px 1fr; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* fx: colores para la capa de efectos */
:root { --fx-acento: #142440; --fx-oscuro: #121b2e; --fx-claro: #eef0f4; }

/* cumplimiento 09/11 */
h1 .palabra { display: inline-block; white-space: nowrap; }
h1 .letra { display: inline-block; transform-origin: 50% 80%; }
@media (max-width: 360px) { .marca-edif { display: none; } }
