/* Pasaquina: luz de atardecer sobre pasto seco y la Panamericana */
:root {
  --cielo: #dfe5ea;
  --cielo-2: #cbd5dd;
  --tinta: #1f2b22;
  --gris: #56645c;
  --paja: #d4b25c;
  --letrero: #0f5a3c;
  --noche: #16222b;
  --rojo: #ff2a1f;
  --disp: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --txt: 'Instrument Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-snap-type: y mandatory; scroll-behavior: smooth; }
@media (max-width: 760px) { html { scroll-snap-type: y proximity; } }
body { margin: 0; background: var(--cielo); color: var(--tinta); font: 400 17px/1.5 var(--txt); -webkit-font-smoothing: antialiased; }
h1, h2, p, dl, dd, ul { margin: 0; }
img, svg { display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--paja); outline-offset: 3px; }

html[data-lang="en"] [lang="es"], html[data-lang="es"] [lang="en"] { display: none !important; }

section { min-height: 100vh; min-height: 100svh; scroll-snap-align: start; position: relative; }
.seccion { padding: clamp(28px, 6vh, 72px) clamp(20px, 6vw, 96px); display: flex; flex-direction: column; justify-content: center; }
.titulo { font: 600 clamp(34px, 4.4vw, 60px)/1 var(--disp); letter-spacing: -0.01em; }

/* riel e idioma */
.riel { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 12px; }
.riel a { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.45); box-shadow: 0 0 0 1.5px rgba(31,43,34,.35); transition: transform .2s, background .2s; }
.riel a.activo { background: var(--paja); transform: scale(1.45); }
.idioma { position: fixed; top: 16px; right: 16px; z-index: 21; background: rgba(22,34,43,.72); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-size: 14px; backdrop-filter: blur(6px); }

/* 1. portada */
.portada { background: var(--noche); overflow: hidden; color: #fff; }
.portada-mapa { position: absolute; inset: 0; width: 100%; height: 100%; }
.velo { fill: #16222b; opacity: .28; }
.borde { fill: rgba(255,42,31,.08); stroke: var(--rojo); stroke-width: 7; stroke-linejoin: round; }
.lim-vista .borde { stroke-width: 6; }
.js .portada .trazo { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; transition: stroke-dashoffset 2.4s cubic-bezier(.6,0,.2,1) .3s, fill-opacity .8s 2.5s; }
.js .portada.on .trazo { stroke-dashoffset: 0; fill-opacity: 1; }
.ca1 rect { fill: var(--letrero); stroke: #fff; stroke-width: 4; }
.ca1 text { fill: #fff; font: 800 34px var(--disp); text-anchor: middle; }
.portada-texto { position: absolute; left: clamp(20px, 6vw, 96px); bottom: clamp(28px, 8vh, 90px); text-shadow: 0 2px 24px rgba(10,18,24,.7); }
.portada h1 { font: 800 clamp(76px, 15vw, 230px)/.82 var(--disp); letter-spacing: -0.02em; }
.portada .sub { font: 500 clamp(22px, 2.6vw, 36px)/1.15 var(--disp); margin-top: 14px; }
.portada .lugar { font-size: 15px; opacity: .85; margin-top: 6px; }
.js .portada-texto { opacity: 0; transform: translateY(14px); transition: opacity .9s 1.6s, transform .9s 1.6s; }
.js .portada.on .portada-texto { opacity: 1; transform: none; }

/* 2. precio */
.precio-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px clamp(30px, 6vw, 110px); align-items: end; max-width: 1180px; width: 100%; margin: 0 auto; }
.precio .titulo { grid-column: 1 / -1; }
.cuenta { display: grid; gap: 4px; }
.fila { display: grid; grid-template-columns: 1.1em auto 1fr; align-items: baseline; gap: 0 18px; border-bottom: 1px solid rgba(31,43,34,.18); padding: 6px 0; }
.fila .op { font: 500 clamp(30px, 3.4vw, 46px) var(--disp); color: var(--gris); }
.fila .n { font: 600 clamp(52px, 7.2vw, 108px)/1 var(--disp); font-variant-numeric: tabular-nums; }
.fila .u { color: var(--gris); font-size: 16px; }
.fila.total { border-bottom: 0; }
.fila.total .n { color: var(--letrero); font-weight: 800; }
.equiv { display: grid; gap: 14px; padding-bottom: 14px; }
.equiv div { border-left: 3px solid var(--paja); padding-left: 14px; }
.equiv dt { color: var(--gris); font-size: 14px; }
.equiv dd { font: 600 34px/1.1 var(--disp); }

/* 3. rutas */
.rutas { background: var(--noche); color: #fff; padding: 0; }
.rutas-marco { position: relative; height: 100vh; height: 100svh; }
.rutas-mapa { position: absolute; inset: 0; width: 100%; height: 100%; background: #0e2433; }
.ruta-base { fill: none; stroke: rgba(10,16,20,.75); stroke-linecap: round; stroke-linejoin: round; }
.ruta { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ruta[data-r="launion"] { stroke: var(--paja); }
.ruta[data-r="aeropuerto"] { stroke: #8fd3ff; }
.ruta[data-r="acajutla"] { stroke: #fff; }
.punto circle { stroke: #fff; }
.punto text { font: 600 15px var(--txt); fill: #fff; paint-order: stroke; stroke: rgba(10,16,20,.85); stroke-width: 4px; stroke-linejoin: round; }
.punto.terreno circle { fill: var(--rojo); }
.js .punto.fin { opacity: 0; transition: opacity .5s; }
.js .punto.fin.on { opacity: 1; }
.letrero { position: absolute; right: 52px; top: 50%; transform: translateY(-50%); width: min(380px, 36vw); background: var(--letrero); border: 3px solid #fff; outline: 6px solid var(--letrero); border-radius: 14px; padding: 22px 24px; display: grid; gap: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.letrero .titulo { font-size: clamp(28px, 2.6vw, 36px); margin-bottom: 10px; }
.destino { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n k" "n t"; gap: 0 14px; padding: 12px 0 12px 16px; border-top: 1.5px solid rgba(255,255,255,.4); position: relative; }
.destino::before { content: ''; position: absolute; left: 0; top: 18px; width: 6px; height: 26px; border-radius: 3px; background: var(--c, #fff); }
.destino[data-r="launion"] { --c: var(--paja); }
.destino[data-r="aeropuerto"] { --c: #8fd3ff; }
.destino[data-r="acajutla"] { --c: #fff; }
.destino .nombre { grid-area: n; font: 600 22px/1.15 var(--disp); align-self: center; }
.destino small { display: block; font: 400 13px var(--txt); opacity: .8; margin-top: 3px; }
.destino .km { grid-area: k; text-align: right; font: 500 18px var(--disp); }
.destino .km b { font: 800 40px/1 var(--disp); font-variant-numeric: tabular-nums; }
.destino .tiempo { grid-area: t; text-align: right; font-size: 14px; opacity: .85; }
.js .destino { opacity: .35; transition: opacity .5s; }
.js .destino.on { opacity: 1; }

/* 4. ubicación */
.ubi-grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1280px; width: 100%; margin: 0 auto; }
.ubi-datos { margin: 26px 0 28px; display: grid; gap: 16px; }
.ubi-datos dt { color: var(--gris); font-size: 14px; }
.ubi-datos dd { font-size: 19px; font-weight: 600; }
.boton { display: inline-block; background: var(--letrero); color: #fff; text-decoration: none; padding: 12px 22px; border-radius: 8px; font-weight: 600; }
.boton:hover { background: #0b4a31; }
.marco-mapa { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--cielo-2); }
.marco-mapa iframe { width: 100%; height: 100%; border: 0; }

/* 5. límites */
.lim-cab { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; max-width: 1280px; width: 100%; margin: 0 auto 18px; }
.pestanas { display: flex; gap: 6px; background: var(--cielo-2); padding: 4px; border-radius: 10px; }
.pestanas button { border: 0; background: none; padding: 8px 16px; border-radius: 7px; }
.pestanas button[aria-selected="true"] { background: var(--tinta); color: #fff; }
.lim-vistas { max-width: 1280px; width: 100%; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #2a3830; }
.lim-vista { display: none; width: 100%; height: auto; }
.lim-vista.on { display: block; }
svg.lim-vista { aspect-ratio: 1900 / 760; }
.entrada { fill: var(--paja); stroke: #fff; stroke-width: 4; }

/* 6. relieve */
.relieve { background: var(--noche); color: #fff; }
.rel-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1360px; width: 100%; margin: 0 auto; }
.rel-foto { margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1780 / 940; position: relative; background: #2a3830; }
.rel-foto img { width: 100%; height: 100%; object-fit: cover; transition: opacity .16s; }
.rel-foto img.cambia { opacity: .2; }
.rel-vista { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 4px; background: rgba(22,34,43,.85); padding: 4px; border-radius: 999px; }
.rel-vista button { border: 0; background: none; color: #fff; padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.rel-vista button.on { background: #fff; color: var(--tinta); }
.relieve .titulo { padding-bottom: 14px; border-bottom: 2px solid #fff; }
.rel-datos div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.18); padding: 10px 0; }
.rel-datos dt { color: var(--paja); font-size: 15px; }
.rel-datos dd { font: 600 clamp(24px, 2.4vw, 32px)/1 var(--disp); text-align: right; }
.rel-grande { font-size: 17px; font-weight: 600; margin: 18px 0 14px; }
.rel-grande b { display: block; font: 800 clamp(64px, 7.5vw, 104px)/.9 var(--disp); color: #8fd07a; }
.rel-barra { display: flex; height: 12px; border-radius: 6px; overflow: hidden; }
.rel-barra span { flex: var(--p) 0 0; background: var(--c); }
.rel-clases { list-style: none; padding: 0; margin-top: 10px; display: grid; }
.rel-clases li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0 6px 22px; position: relative; font-size: 15px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.12); }
.rel-clases li::before { content: ''; position: absolute; left: 0; top: 10px; width: 13px; height: 13px; border-radius: 3px; background: var(--c); }
.rel-clases small { color: rgba(255,255,255,.6); font-weight: 400; }

/* ubicación (al final) */
.ubi-solo { display: grid; gap: 18px; justify-items: start; max-width: 1180px; width: 100%; margin: 0 auto; }
.ubi-solo .marco-mapa { width: 100%; aspect-ratio: 16 / 9; }

/* 7. 3D */
.tresd { background: var(--noche); color: #fff; padding: 0; }
.tresd-marco { position: relative; height: 100vh; height: 100svh; }
.mapa3d { position: absolute; inset: 0; background: url(media/suelo-pendiente.webp) center / cover; }
.mapa3d canvas { display: block; width: 100% !important; height: 100% !important; }
.tresd-titulo { position: absolute; left: clamp(20px, 6vw, 96px); top: clamp(24px, 6vh, 64px); pointer-events: none; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.tresd-capa, .tresd-ex, .tresd-zoom { position: absolute; display: flex; gap: 6px; }
.tresd-capa { left: clamp(20px, 6vw, 96px); bottom: 78px; }
.tresd-ex { left: clamp(20px, 6vw, 96px); bottom: 28px; }
.tresd-zoom { right: 48px; bottom: 28px; }
.tresd button { background: rgba(22,34,43,.8); border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 8px 14px; min-width: 44px; color: #fff; }
.tresd button[aria-pressed="true"] { background: var(--paja); color: var(--tinta); border-color: var(--paja); }
.sin3d .mapa3d { background: url(media/suelo-pendiente.webp) center / cover; }
.sin3d .tresd-capa, .sin3d .tresd-ex, .sin3d .tresd-zoom { display: none; }
.mapa3d canvas { touch-action: pan-y; }

/* 8. foto */
.foto { background: var(--noche); }
.foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* celular */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .riel { right: 8px; gap: 10px; }
  .riel a { width: 7px; height: 7px; }
  .portada .borde { stroke-width: 15; }
  .portada-texto { bottom: 6vh; }
  .precio-grid { grid-template-columns: 1fr; }
  .equiv { grid-template-columns: repeat(3, 1fr); }
  .equiv dd { font-size: 26px; }
  .fila .u { font-size: 14px; }
  .rutas-marco { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  .rutas-mapa { position: relative; height: 50svh; flex: none; }
  .letrero { position: static; transform: none; width: auto; margin: 14px 26px 22px 14px; padding: 16px 18px; outline-width: 4px; }
  .letrero .titulo { margin-bottom: 4px; }
  .destino { padding: 9px 0 9px 14px; }
  .destino .nombre { font-size: 19px; }
  .destino .km b { font-size: 32px; }
  .ubi-grid, .rel-grid { grid-template-columns: 1fr; }
  .ubi-datos { margin: 18px 0 20px; }
  .marco-mapa { aspect-ratio: 1 / 1; }
  svg.lim-vista { aspect-ratio: 4 / 3; }
  .rel-foto { aspect-ratio: auto; overflow: visible; background: none; }
  .rel-foto img { height: auto; aspect-ratio: 1780 / 940; border-radius: 12px; }
  .rel-vista { position: static; display: inline-flex; margin-top: 10px; }
  .rel-vista button { padding: 6px 14px; }
  .rel-grande { margin: 14px 0 10px; }
  .rel-datos div { padding: 7px 0; }
  .rel-clases li { padding: 4px 0 4px 22px; font-size: 14px; }
  .rel-clases li::before { top: 8px; }
  .tresd-zoom { right: 24px; }
  .tresd-ex { bottom: 22px; }
  .tresd-capa { bottom: 70px; }
  .ubi-solo .marco-mapa { aspect-ratio: 3 / 4; }
}

/* celulares bajos (iPhone SE y similares) */
@media (max-width: 760px) and (max-height: 760px) {
  .seccion { padding-top: 18px; padding-bottom: 18px; }
  .relieve .titulo { font-size: 30px; padding-bottom: 8px; }
  .rel-grid { gap: 12px; }
  .rel-vista { margin-top: 6px; }
  .rel-datos div { padding: 4px 0; }
  .rel-datos dt { font-size: 14px; }
  .rel-datos dd { font-size: 22px; }
  .rel-grande { font-size: 15px; margin: 8px 0 8px; }
  .rel-grande b { font-size: 50px; }
  .rel-clases li { padding: 2px 0 2px 22px; font-size: 13px; }
  .rel-clases li::before { top: 5px; }
  .rutas-mapa { height: 46svh; }
  .letrero { padding: 12px 16px; margin-top: 10px; margin-bottom: 14px; }
  .destino { padding: 6px 0 6px 14px; }
  .destino .km b { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .portada .trazo, .js .portada-texto, .js .destino, .js .punto.fin { transition: none; }
}
