:root {
  --azul: #2e3092;
  --azul-hondo: #25277a;
  --celeste: #27aae1;
  --tinta: #1c1e5e;
  --papel: #f3f4fb;
  --papel-linea: #cfd2ea;
  --blanco: #ffffff;
  --blanco-70: rgba(255, 255, 255, .78);
  --linea-azul: rgba(255, 255, 255, .34);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 5vw, 40px);
  --max: 1120px;
  --barra: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--barra) + 8px); -webkit-text-size-adjust: 100%; scrollbar-color: var(--celeste) var(--azul-hondo); }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--azul);
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; }
::selection { background: var(--celeste); color: var(--azul-hondo); }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; border-radius: 2px; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* barra */
.barra {
  position: sticky; top: 0; z-index: 10;
  height: var(--barra);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  background: rgba(46, 48, 146, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--linea-azul);
}
.barra__logo img { width: 124px; height: auto; }

/* botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font: 600 .9375rem/1.2 "Montserrat", sans-serif; letter-spacing: .01em; text-decoration: none; text-align: center;
  border: 1.5px solid transparent; border-radius: 999px;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.boton:active { transform: scale(.97); }
.boton--claro { background: var(--blanco); color: var(--azul); box-shadow: 0 1px 0 rgba(0,0,0,.18), 0 8px 20px -10px rgba(0, 0, 0, .4); }
.boton--azul { background: var(--azul); color: var(--blanco); }
.boton--chico { min-height: 44px; padding: 8px 16px; }
.boton--grande { font-size: 1.0625rem; min-height: 56px; padding: 14px 28px; }
.ico { width: 20px; height: 20px; flex: none; }
@media (hover: hover) {
  .boton--claro:hover { background: var(--celeste); color: var(--azul-hondo); }
  .boton--azul:hover { background: var(--azul-hondo); }
}

/* hojas */
.hoja { position: relative; }
.hoja--azul { background: var(--azul); color: var(--blanco); }
.hoja--papel { background: var(--papel); color: var(--tinta); }
.hoja__in { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 9vw, 104px) var(--gutter) clamp(40px, 7vw, 72px); }
.cajetin {
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px;
  font: 600 .75rem/1 "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase;
}
.cajetin span { padding: 14px 0 22px; }
.cajetin { border-top: 1px solid; border-color: var(--linea-azul); width: calc(100% - 2 * var(--gutter)); padding: 0; }
.hoja--papel .cajetin { border-color: var(--papel-linea); color: #4a4d8a; }
.hoja--azul .cajetin { color: var(--blanco-70); }

h1, h2 { margin: 0; font-weight: 900; text-transform: uppercase; text-wrap: balance; }
h1 { font-size: clamp(2rem, 7.4vw, 3.9rem); line-height: 1.02; letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 5.2vw, 2.7rem); line-height: 1.06; letter-spacing: -.015em; font-weight: 800; }
.h2--chico { font-size: clamp(1.4rem, 3.6vw, 1.9rem); margin-top: 0; }
.bajada, .intro { max-width: 60ch; margin: 18px 0 0; font-size: 1.125rem; }
.intro { margin-bottom: 28px; }
.hoja--azul .bajada, .hoja--azul .intro { color: var(--blanco-70); font-weight: 400; }

/* portada */
.portada__grid { display: grid; gap: 40px; }
.cajetin-datos { margin: 30px 0 28px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--linea-azul); border-radius: 14px; overflow: hidden; }
.cajetin-datos div { padding: 12px 14px; border-top: 1px solid var(--linea-azul); }
.cajetin-datos div:first-child { grid-column: 1 / -1; border-top: 0; }
.cajetin-datos div:nth-child(3) { border-left: 1px solid var(--linea-azul); }
.cajetin-datos dt { font: 600 .75rem/1 "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--blanco-70); }
.cajetin-datos dd { margin: 8px 0 0; font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.precio { font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; }
.cajetin-datos .precio { font-size: 1.5rem; }

.plano { margin: 0; }
.plano svg { width: 100%; height: auto; display: block; max-width: 460px; margin: 0 auto; overflow: visible; }
.plano figcaption, .distancia figcaption { margin-top: 14px; font-size: .8125rem; font-weight: 400; color: var(--blanco-70); max-width: 460px; margin-inline: auto; }
.plano text { font-family: "Montserrat", sans-serif; fill: var(--blanco); }
.cota text { font-size: 13px; font-weight: 600; fill: var(--celeste); letter-spacing: .04em; }
.cota path { fill: none; stroke: var(--celeste); stroke-width: 1.4; stroke-linecap: square; }
.trazo path { fill: none; stroke: var(--blanco); stroke-linejoin: miter; }
.area__r { font-size: 11px; font-weight: 600; letter-spacing: .14em; fill: var(--blanco-70); }
.area__n { font-size: 22px; font-weight: 800; }
.marca circle, .ref circle { fill: var(--azul); stroke: var(--blanco); stroke-width: 1.4; }
.marca text, .ref__l { font-size: 12px; font-weight: 800; }
.ref__n { font-size: 14px; font-weight: 800; }
.ref__s { font-size: 12.5px; font-weight: 400; fill: var(--blanco-70); }
.calle { font-size: 12px; font-weight: 600; letter-spacing: .1em; }

.draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .plano .draw { animation: dibujar 1.6s var(--ease) .15s both; }
.js .distancia .draw { stroke-dashoffset: 1; }
.js .distancia.in .draw { animation: dibujar 1.4s var(--ease) both; }
@keyframes dibujar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* vistas */
.vistas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.vista { margin: 0; }
.vista--ancha { grid-column: 1 / -1; }
.vista img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: #dde0f3; }
.vista--ancha img { aspect-ratio: 16 / 10; }
.vista figcaption { margin-top: 8px; font: 600 .8125rem/1.3 "Montserrat", sans-serif; letter-spacing: .02em; color: var(--azul); }

/* planilla */
.planilla { display: grid; gap: 48px; }
.tabla { width: 100%; margin-top: 24px; border-collapse: collapse; border-top: 1px solid var(--linea-azul); }
.tabla th, .tabla td { text-align: left; vertical-align: top; padding: 14px 0; border-bottom: 1px solid var(--linea-azul); }
.tabla thead th { font: 600 .75rem/1 "Montserrat", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--blanco-70); padding-block: 12px; }
.tabla tbody th { width: 40%; padding-right: 16px; font-weight: 600; }
.tabla td { font-weight: 300; }
.tabla td.precio { font-size: 1.375rem; font-weight: 800; }
.nota { font-weight: 400; color: var(--blanco-70); font-size: .9375rem; }

/* ubicación */
.ubicacion { display: grid; gap: 40px; align-items: center; }
.distancia { margin: 0; }
.distancia svg { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.distancia figcaption { color: #4a4d8a; }
.cota-azul path { fill: none; stroke: var(--azul); stroke-width: 1.6; stroke-linecap: square; }
.cota-azul text { font: 800 20px "Montserrat", sans-serif; fill: var(--azul); }
.icono-azul path { fill: none; stroke: var(--azul); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rotulo { font: 600 12px "Montserrat", sans-serif; letter-spacing: .08em; text-transform: uppercase; fill: #4a4d8a; }

/* contacto */
.contacto__in { padding-bottom: clamp(56px, 9vw, 104px); }
.mail { margin: 22px 0 0; font-weight: 400; }
.mail a { color: var(--blanco); }

/* pie */
.pie { background: var(--azul-hondo); color: var(--blanco-70); font-size: .875rem; font-weight: 400; line-height: 1.6; padding-bottom: env(safe-area-inset-bottom); }
.pie__in { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 44px; display: grid; gap: 24px; }
.pie__logo { width: 124px; height: auto; }
.pie__texto p { margin: 0 0 10px; max-width: 76ch; }
.pie a { color: var(--blanco); }

/* escritorio */
@media (min-width: 900px) {
  body { font-size: 1.125rem; }
  .portada__grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 72px; }
  .cajetin-datos { grid-template-columns: 1.5fr 1.3fr .8fr; }
  .cajetin-datos .precio { white-space: nowrap; }
  .cajetin-datos div { border-top: 0; }
  .cajetin-datos div:first-child { grid-column: auto; }
  .cajetin-datos div + div { border-left: 1px solid var(--linea-azul); }
  .vistas { grid-template-columns: repeat(6, 1fr); gap: 24px 16px; }
  .vista { grid-column: span 2; }
  .vista--ancha { grid-column: span 4; }
  .vista img, .vista--ancha img { aspect-ratio: auto; height: clamp(200px, 22vw, 290px); }
  .planilla { grid-template-columns: 1.15fr 1fr; gap: 80px; }
  .ubicacion { grid-template-columns: 1fr 1fr; gap: 80px; }
  .pie__in { grid-template-columns: auto 1fr; gap: 56px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .plano .draw, .js .distancia.in .draw { animation: none; }
  .js .distancia .draw { stroke-dashoffset: 0; }
  .boton { transition: none; }
}

/* ---------- movimiento ---------- */
.progreso { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--celeste); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progreso { animation: progreso linear both; animation-timeline: scroll(root); }
}
@keyframes progreso { to { transform: scaleX(1); } }

/* entrada de la portada */
.js .rise { animation: subir .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
@keyframes subir { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* el esquema se arma: trazo, zonas, marcas */
.js .esquema .zona { animation: aparece .8s ease-out backwards; }
.js .esquema .zona[data-z="A"] { animation-delay: 1.2s; }
.js .esquema .zona[data-z="B"] { animation-delay: 1.4s; }
.js .esquema .zona[data-z="C"] { animation-delay: 1.6s; }
.js .esquema .zona[data-z="D"] { animation-delay: 1.8s; }
.js .esquema .marca, .js .esquema .ref, .js .esquema .area { animation: aparece .7s var(--ease) backwards; }
.js .esquema [data-z="A"].marca, .js .esquema [data-z="A"].ref { animation-delay: 1.6s; }
.js .esquema [data-z="B"].marca, .js .esquema [data-z="B"].ref { animation-delay: 1.8s; }
.js .esquema [data-z="C"].marca, .js .esquema [data-z="C"].ref { animation-delay: 2s; }
.js .esquema [data-z="D"].marca, .js .esquema [data-z="D"].ref { animation-delay: 2.2s; }
.js .esquema .area { animation-delay: 1.3s; }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

.zona--c { fill: #fff; fill-opacity: .14; }
.zona--d { fill: var(--celeste); fill-opacity: .38; }
.esquema .zona--c rect { stroke: none; }
.trazo .de-hecho { stroke-dasharray: .02 .016; }
.js .plano .trazo .de-hecho { animation: none; }
.esquema .zona, .esquema .marca { transition: opacity .3s, fill-opacity .3s; }
.esquema .ref { cursor: pointer; transition: opacity .3s; outline: none; }
.esquema .ref:focus-visible circle { stroke: var(--celeste); stroke-width: 3; }
.esquema[data-activa] .zona, .esquema[data-activa] .marca, .esquema[data-activa] .ref { opacity: .28; }
.esquema[data-activa="A"] [data-z="A"], .esquema[data-activa="B"] [data-z="B"],
.esquema[data-activa="C"] [data-z="C"], .esquema[data-activa="D"] [data-z="D"] { opacity: 1; animation: none; }
.esquema[data-activa="C"] .zona--c { fill-opacity: .45; }
.esquema[data-activa="D"] .zona--d { fill-opacity: .7; }
.esquema .ref:hover circle { fill: var(--celeste); }

/* revelado al scroll */
.js .rev { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .rev.in { opacity: 1; transform: none; }
.js .vista img { clip-path: inset(0 0 100% 0 round 12px); transform: scale(1.12); transition: clip-path 1s var(--ease), transform 1.4s var(--ease); transition-delay: var(--d, 0ms); }
.js .vista.in img { clip-path: inset(0 0 0 0 round 12px); transform: none; }
.vista { overflow: hidden; }
.vista img { cursor: zoom-in; transition: filter .3s; }
@media (hover: hover) { .vista.in img:hover { filter: brightness(1.06); transform: scale(1.02); } }
.js .vista.in img { transition: clip-path 1s var(--ease), transform .6s var(--ease), filter .3s; }

/* distancia: el punto recorre la cota, las olas respiran */
.punto { fill: var(--celeste); }
.js .distancia.in .punto { animation: recorre 3.2s var(--ease) 1.2s infinite; }
@keyframes recorre { 0% { transform: translateX(0); opacity: 0; } 12% { opacity: 1; } 80% { transform: translateX(248px); opacity: 1; } 100% { transform: translateX(248px); opacity: 0; } }
.js .distancia.in .olas { animation: olas 3.6s ease-in-out infinite alternate; }
@keyframes olas { from { transform: translateX(-4px); } to { transform: translateX(4px); } }

/* botones con vida */
.js .barra .boton { animation: subir .8s var(--ease) .5s both; }
.boton { position: relative; }
@media (hover: hover) { .boton:hover { transform: translateY(-2px); } .boton:active { transform: scale(.97); } }

/* visor de fotos */
.visor { border: 0; padding: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; background: rgba(20, 22, 70, .94); color: #fff; }
.visor[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: aparece .3s ease-out; }
.visor::backdrop { background: rgba(20, 22, 70, .6); }
.visor__fig { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 0 8px; min-width: 0; }
.visor__fig img { max-height: 78vh; max-width: 100%; width: auto; border-radius: 12px; animation: zoom .45s var(--ease); }
@keyframes zoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.visor__fig figcaption { font-weight: 600; font-size: .9375rem; }
.visor button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; width: 48px; height: 48px; font: 400 28px/1 "Montserrat", sans-serif; cursor: pointer; transition: background .2s; }
.visor button:hover { background: var(--celeste); color: var(--azul-hondo); }
.visor__x { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.visor__nav { margin: 0 8px; }
@media (max-width: 600px) { .visor__nav { width: 40px !important; height: 40px !important; margin: 0 2px; } }
body:has(.visor[open]) { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .esquema .zona, .js .esquema .marca, .js .esquema .ref, .js .esquema .area, .js .barra .boton { animation: none; }
  .js .rev, .js .vista img { opacity: 1; transform: none; clip-path: none; transition: none; }
  .js .distancia.in .punto, .js .distancia.in .olas { animation: none; }
  .progreso { animation: none; transform: scaleX(0); }
  .visor__fig img, .visor[open] { animation: none; }
}

/* ---------- entrada cinematográfica ---------- */
.apertura { display: none; }
.intro-on .apertura { display: grid; }
.apertura {
  position: fixed; inset: 0; z-index: 100; place-items: center; align-content: center; gap: 28px;
  background: var(--azul); color: var(--blanco);
  animation: cortina 1s cubic-bezier(.76, 0, .24, 1) 3.1s forwards;
}
@keyframes cortina { to { transform: translateY(-101%); } }
.intro__logo { position: absolute; top: max(20px, env(safe-area-inset-top)); left: var(--gutter); width: 124px; height: auto; animation: aparece .8s ease-out .1s backwards; }
.intro__marco { position: relative; width: min(78vw, 560px, 62vh * 1.333); aspect-ratio: 4 / 3; margin-top: 18px; }
.intro__vista { position: absolute; inset: 0; overflow: hidden; border-radius: 12px; clip-path: inset(100% 0 0 0 round 12px); animation: marco 1.3s var(--ease) .25s forwards; }
.intro__foto { width: 100%; height: 100%; object-fit: cover; display: block; animation: lento 4.4s linear .25s both; }
@keyframes marco { to { clip-path: inset(0 0 0 0 round 12px); } }
@keyframes lento { from { transform: scale(1.22); } to { transform: scale(1); } }
.intro__cotas { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.intro__cotas path { fill: none; stroke: var(--celeste); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: dibujar 1.3s var(--ease) .7s forwards; }
.intro__titulo { margin: 0; display: grid; gap: 4px; justify-items: center; text-align: center; overflow: hidden; }
.intro__titulo span { display: block; font-weight: 900; font-size: clamp(1.5rem, 6vw, 2.6rem); letter-spacing: -.01em; text-transform: uppercase; line-height: 1.1; animation: subir .9s var(--ease) 1.1s backwards; }
.intro__titulo span + span { font-weight: 300; font-size: clamp(1rem, 3.4vw, 1.4rem); letter-spacing: .24em; color: var(--blanco-70); animation-delay: 1.3s; }
html.intro-on:not(.go) { overflow: hidden; }
html.intro-on:not(.go) .portada * { animation-play-state: paused !important; }
html.intro-on.go .apertura { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .apertura { display: none !important; } }
