:root {
  --azul: #2e3092;
  --celeste: #27aae1;
  --ink: #14163f;
  --ink-soft: #3e4172;
  --paper: #eef3f8;
  --paper-2: #e1eaf3;
  --line: rgba(46, 48, 146, .22);
  --fix: #c8105a;
  --azul-press: #24267a;
  --noche: #0f1155;
  --noche-text: #dfe4f5;
  --noche-soft: #b9c0e3;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  scrollbar-color: var(--azul) var(--paper-2);
}
::selection { background: var(--azul); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--azul); border-radius: 0; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .25em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--azul); color: #fff;
  padding: 10px 14px; z-index: 100; font-weight: 600;
}
.skip:focus { left: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 1.4em; border-radius: 2px;
  font: 600 .95rem/1 var(--font); text-decoration: none; letter-spacing: .01em;
  border: 1.5px solid var(--azul);
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--azul); color: #fff; }
.btn-ghost { background: rgba(238, 243, 248, .9); color: var(--azul); }
.btn-light { background: #fff; color: var(--azul); border-color: #fff; min-height: 56px; font-size: 1.05rem; }
.ico, .sym { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--azul-press); }
  .btn-ghost:hover { background: var(--azul); color: #fff; }
  .btn-light:hover { background: var(--paper); }
}

/* Hero: la carta */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: var(--paper); isolation: isolate; }
.chart-wrap { position: absolute; inset: 0; z-index: -1; will-change: transform; }
.chart { width: 100%; height: 100%; display: block; }
.band { stroke: none; }
.b0 { fill: rgba(39, 170, 225, .34); }
.b1 { fill: rgba(39, 170, 225, .22); }
.b2 { fill: rgba(39, 170, 225, .12); }
.b3 { fill: rgba(39, 170, 225, .05); }
.land { fill: var(--paper); stroke: none; }
.streets path { fill: none; stroke: var(--azul); stroke-opacity: .13; stroke-width: 1.2; }
.iso { fill: none; stroke: var(--azul); stroke-width: 1.2; stroke-opacity: .55; stroke-dasharray: 6 5; }
.coast { fill: none; stroke: var(--azul); stroke-width: 2.4; }
.soundings text { font: italic 300 15px var(--font); fill: var(--azul); fill-opacity: .8; }
.sea-name { font: italic 500 14px var(--font); letter-spacing: .3em; fill: var(--azul); fill-opacity: .7; }
.land-name { font: 500 15px var(--font); letter-spacing: .3em; fill: var(--azul); fill-opacity: .55; }
.bearing { fill: none; stroke: var(--fix); stroke-width: 1.4; stroke-dasharray: 2 7; stroke-linecap: round; }
.fix-ring { fill: none; stroke: var(--fix); stroke-width: 2.4; }
.fix-ping { fill: none; stroke: var(--fix); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; opacity: 0; }
.fix-dot { fill: var(--fix); }
.fix-leader { stroke: var(--fix); stroke-width: 1.4; fill: none; }
.fix-label { font: 600 15px var(--font); fill: var(--ink); }

.neatline { position: absolute; inset: 10px; border: 1px solid rgba(20, 22, 63, .55); pointer-events: none; }
.neatline::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(20, 22, 63, .35);
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 28px) top / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 28px) bottom / 100% 3px no-repeat;
  opacity: .55;
}

.rose { position: absolute; z-index: 0; width: 112px; height: 112px; top: 92px; right: 14px; overflow: visible; }
.rose .r-line { fill: none; stroke: var(--azul); stroke-width: 1.2; }
.rose .thin { stroke-width: .8; }
.rose .r-ticks { fill: none; stroke: var(--azul); stroke-width: 7; stroke-dasharray: 1 6.14; opacity: .7; }
.rose .r-star { stroke: var(--azul); stroke-width: .8; stroke-linejoin: round; }
.rose .a { fill: var(--azul); }
.rose .b { fill: #fff; }
.rose .c { fill: rgba(39, 170, 225, .35); stroke-width: .6; }
.rose .r-hub { fill: var(--fix); }
.rose .r-letters text { font: 800 13px var(--font); fill: var(--azul); }
.rose-needle { transform-origin: 0 0; transform: rotate(calc(var(--p, 0) * 80deg - 20deg)); }

.hero-inner {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 24px) calc(var(--gutter) + 6px) calc(env(safe-area-inset-bottom) + 24px);
}
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brand img { width: 154px; height: auto; }
.topcta { display: none; }

.titleblock {
  background: var(--paper); border: 1.5px solid var(--ink); padding: 14px 16px 12px;
  width: 100%; margin-top: auto;
}
.titleblock h1 {
  font-weight: 900; font-size: clamp(1.55rem, 6.4vw, 3.6rem); line-height: 1.02; letter-spacing: -.02em; color: var(--azul);
}
.sub { margin-top: 8px; font-weight: 500; font-size: .86rem; color: var(--ink-soft); line-height: 1.4; }
.rotulo { margin: 10px 0 12px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.rotulo > div { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.rotulo > div:nth-child(n + 3) { padding-left: 12px; border-left: 1px solid var(--line); }
.rotulo .price { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
.rotulo dt { font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.rotulo dd { margin: 0; font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rotulo .price { flex-direction: row; align-items: baseline; gap: 10px; }
.rotulo .price dd strong { font-weight: 900; font-size: 1.55rem; letter-spacing: -.01em; color: var(--azul); }
.rotulo .price dd span { font-weight: 400; font-size: .9rem; color: var(--ink-soft); }
.titleblock .btn { width: 100%; }
.chart-note { display: none; margin-top: 10px; font-size: .75rem; font-style: italic; font-weight: 300; color: var(--ink-soft); }

/* Ficha */
section { position: relative; }
.ficha { padding: clamp(64px, 10vw, 128px) 0; }
.ficha-grid { display: grid; gap: 36px; }
h2 { font-weight: 800; font-size: clamp(1.8rem, 4.6vw, 3rem); line-height: 1.05; letter-spacing: -.02em; color: var(--azul); }
.ficha-intro h2 { margin-bottom: 18px; }
.ficha-intro p { max-width: 46ch; font-weight: 400; color: var(--ink); }
.legend { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); position: relative; }
.legend li {
  display: grid; grid-template-columns: 28px 1fr; column-gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.legend .sym { color: var(--azul); width: 26px; height: 26px; grid-row: span 2; }
.legend .term { font-weight: 600; font-size: .98rem; }
.legend .val { font-style: italic; font-weight: 300; font-size: 1.05rem; color: var(--azul); font-variant-numeric: tabular-nums; }
@media (hover: hover) { .legend li { transition: background-color .25s; } .legend li:hover { background: var(--paper-2); } }

/* Vistas */
.vistas { padding: clamp(48px, 8vw, 96px) 0; background: var(--paper-2); border-block: 1px solid var(--line); }
.vistas-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.vistas-ctrl { display: none; gap: 8px; }
.round {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--azul); background: transparent; color: var(--azul);
  display: grid; place-items: center; cursor: pointer; transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.round:active { transform: scale(.92); }
@media (hover: hover) { .round:hover { background: var(--azul); color: #fff; } }
.strip {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0 var(--gutter) 18px; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.strip figure { margin: 0; flex: 0 0 min(78vw, 340px); scroll-snap-align: start; }
.strip img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--paper);
  border: 1px solid var(--ink); padding: 5px; background-clip: content-box;
}
.strip figcaption { margin-top: 10px; font-size: .86rem; font-weight: 500; color: var(--ink); }

/* Notas */
.notas { padding: clamp(64px, 10vw, 120px) 0; }
.notas-grid { display: grid; gap: 28px; }
.notas .wrap { }
.notas h3 { font-weight: 600; font-size: 1.05rem; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); margin-bottom: 4px; }
.notas ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.notas li { counter-increment: n; display: grid; grid-template-columns: 2.2em 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); max-width: 58ch; }
.notas li::before { content: counter(n); font-style: italic; font-weight: 300; color: var(--azul); font-variant-numeric: tabular-nums; }

/* Cierre */
.cierre { background: var(--azul); color: #fff; padding: clamp(72px, 11vw, 140px) 0; overflow: hidden; }
.cierre::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background:
    repeating-linear-gradient(0deg, transparent 0 59px, rgba(255, 255, 255, .08) 59px 60px),
    repeating-linear-gradient(90deg, transparent 0 59px, rgba(255, 255, 255, .08) 59px 60px);
}
.cierre-in { position: relative; display: grid; gap: 18px; justify-items: start; }
.cierre h2 { color: #fff; font-size: clamp(2.2rem, 6.5vw, 4.4rem); }
.cierre p { max-width: 44ch; font-weight: 300; font-size: 1.1rem; }
.cierre .tel { font-weight: 500; font-variant-numeric: tabular-nums; font-size: 1rem; }

/* Pie */
.foot { background: var(--noche); color: var(--noche-text); padding: 48px 0 calc(48px + 72px); font-size: .9rem; }
.foot-grid { display: grid; gap: 28px; }
.foot img { width: 170px; height: auto; }
.foot-brand p { margin-top: 12px; font-weight: 300; }
.foot address { font-style: normal; display: grid; gap: 4px; }
.foot a { text-decoration-color: rgba(255, 255, 255, .35); }
.legal { font-size: .78rem; font-weight: 300; color: var(--noche-soft); max-width: 90ch; line-height: 1.6; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 20px; }

/* CTA fijo en celular */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: .6em; min-height: 52px; border-radius: 2px;
  background: var(--azul); color: #fff; text-decoration: none; font: 600 .92rem/1 var(--font);
  border: 1.5px solid #fff;
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.sticky-cta.show { transform: none; }

/* Escritorio */
@media (min-width: 760px) {
  .rose { width: clamp(180px, 22vw, 300px); height: auto; aspect-ratio: 1; top: auto; bottom: 9vh; right: 7vw; }
  .rose .r-letters text { font-size: 11px; }
  .topcta { display: inline-flex; }
  .titleblock { width: min(560px, 46vw); padding: 26px 28px 20px; margin-top: auto; }
  .rotulo > div:nth-child(n + 3) { padding-left: 16px; }
  .rotulo > div:nth-child(2) { padding-left: 0; border-left: 0; }
  .chart-note { display: block; }
  .ficha-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .ficha-intro { position: sticky; top: 48px; }
  .vistas-ctrl { display: flex; }
  .strip figure { flex-basis: min(30vw, 380px); }
  .strip { padding-inline: max(var(--gutter), calc((100vw - 1180px) / 2)); scroll-padding-inline: max(var(--gutter), calc((100vw - 1180px) / 2)); }
  .notas-grid { grid-template-columns: 4fr 4fr 4fr; gap: 48px; align-items: start; }
  .notas-grid h2 { grid-column: auto; }
  .foot-grid { grid-template-columns: 1.1fr 1fr; }
  .legal { grid-column: 1 / -1; }
  .foot { padding-bottom: 48px; }
  .sticky-cta { display: none; }
}

/* Movimiento: solo si el usuario no pidió reducirlo. El estado por defecto es el final. */
@media (prefers-reduced-motion: no-preference) {
  .coast, .iso { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s var(--ease) forwards; }
  .iso { stroke-dasharray: 1; animation-delay: .5s; }
  .iso:nth-child(2) { animation-delay: .7s; }
  .iso:nth-child(3) { animation-delay: .9s; }
  .coast { animation-duration: 2s; }
  .band, .land { animation: fade 1.2s ease-out both; }
  .b1 { animation-delay: .3s; } .b2 { animation-delay: .5s; } .b3 { animation-delay: .7s; }
  .soundings text { animation: fade 1s ease-out both; }
  .soundings text:nth-child(odd) { animation-delay: 1.2s; }
  .soundings text:nth-child(even) { animation-delay: 1.5s; }
  .sea-drift { animation: drift 16s ease-in-out 3s infinite alternate; }
  .bearing { transform-box: fill-box; transform-origin: left center; animation: bearing 1.8s var(--ease) 1.1s both; }
  .fix-dot, .fix-ring, .fix-leader, .fix-label { animation: fade .6s ease-out 1s both; }
  .fix-ping { animation: ping 2.6s ease-out 1.6s infinite; }
  .rose { animation: rose-in 1.6s var(--ease) .4s both; }
  .titleblock { animation: rise .9s var(--ease) .3s both; }
  .topbar { animation: fade .8s ease-out both; }

  html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  html.js .reveal.in { opacity: 1; transform: none; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(10px); } }
@keyframes bearing { from { transform: scaleX(0); } to { transform: none; } }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(3.4); } }
@keyframes rose-in { from { opacity: 0; transform: rotate(-50deg) scale(.85); } to { opacity: 1; transform: none; } }

/* Carta en el resto de la página */
.isoline { display: block; width: 100%; height: 24px; }
.isoline path { fill: none; stroke: var(--azul); stroke-opacity: .5; stroke-width: 1.2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }
.aviso { border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 5px; padding: clamp(20px, 4vw, 40px); margin-block: 6px; }
.rail { position: fixed; left: 6px; top: 0; bottom: 0; width: 0; border-left: 1.5px dotted var(--fix); z-index: 40; pointer-events: none; opacity: 0; transition: opacity .4s; }
.rail.show { opacity: .85; }
.rail i { position: absolute; left: -5px; top: 0; width: 8.5px; height: 8.5px; border-radius: 50%; background: var(--fix); transform: translateY(calc(var(--p, 0) * (100vh - 12px))); }
@media (min-width: 760px) { .rail { left: 14px; } }

.strip figure.wide { flex-basis: min(88vw, 620px); }
.strip figure.wide img { aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .strip figure.wide { flex-basis: min(46vw, 640px); } }
