:root {
  --noche: #06204f;
  --azul: #0a4fd1;
  --celeste: #a9c8ff;
  --tinta: #0a1a36;
  --gris: #51617d;
  --blanco: #ffffff;
  --fuente: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --margen: clamp(1.25rem, 5vw, 4.5rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--fuente);
  font-optical-sizing: auto;
  background: var(--noche);
  color: var(--blanco);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .final p { text-wrap: balance; }

.columna { width: min(100% - 2 * var(--margen), 56rem); margin-inline: auto; }
.columna--ancha { width: min(100% - 2 * var(--margen), 72rem); }

/* ---------- Portada ---------- */

.hero__fijo {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  isolation: isolate;
}
.escenas .hero { height: 260vh; height: 260svh; }
.escenas .hero__fijo { position: sticky; top: 0; }

.hero__escenario {
  position: absolute;
  inset: 0;
  container-type: size;
  transform-origin: 62% 55%;
}

/* Cada escena cubre la pantalla igual que un object-fit: cover, y así las capas coinciden */
.escena {
  --px: .69;
  --py: .5;
  --ancho: max(100cqw, 179.17cqh);
  position: absolute;
  z-index: 0;
  width: var(--ancho);
  height: calc(var(--ancho) * .55814);
  left: calc((100cqw - var(--ancho)) * var(--px));
  top: calc((100cqh - var(--ancho) * .55814) * var(--py));
}
.escena img { position: absolute; display: block; }
.hero__foto { inset: 0; width: 100%; height: 100%; }
.escena--camion { z-index: 3; pointer-events: none; }
.hero__camion { left: 52.762%; top: 35.9375%; width: 37.573%; height: 42.969%; }

/* tinte azul del cielo: termina antes de llegar al camión */
.hero__escenario::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 36%;
  z-index: 1;
  background: linear-gradient(180deg,
    rgb(4 24 66 / .9) 0%,
    rgb(6 36 94 / .66) 34%,
    rgb(8 52 132 / .34) 66%,
    rgb(10 66 165 / 0) 100%);
}
/* sombra del suelo: va por encima de la foto y del camión por igual */
.hero__escenario::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent 56%,
    rgb(5 26 70 / .34) 70%,
    rgb(5 26 70 / .78) 84%,
    rgb(4 20 56 / .96) 100%);
}

/* ---- Nombre: el tamaño y la altura los ajusta script.js según el camión ---- */
.marca {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 12%;
  translate: -50% 0;
  width: max-content;
  font-size: min(33vw, 22vh);
  line-height: .8;
  text-transform: lowercase;
  white-space: nowrap;
}
.marca__nombre {
  display: block;
  font-weight: 750;
  letter-spacing: -.062em;
  padding-right: .062em;
  text-shadow: 0 .02em .18em rgb(3 18 54 / .35);
}
.marca__base { display: inline-block; width: 0; height: 0; }
.marca__rubro {
  position: absolute;
  right: .12em;
  top: 0; /* la altura exacta la calcula script.js */
  font-size: max(.16em, 1.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.015em;
}

/* ---- Frase y aviso, abajo, sobre la ruta ---- */
.hero__texto {
  position: absolute;
  z-index: 5;
  left: var(--margen);
  right: var(--margen);
  bottom: calc(3.25rem + env(safe-area-inset-bottom));
  text-align: center;
  text-shadow: 0 2px 24px rgb(2 14 44 / .6);
}
.lema {
  font-size: clamp(1.5rem, 7vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.lema--en {
  margin-top: .25rem;
  font-size: clamp(1rem, 4.4vw, 1.25rem);
  font-weight: 400;
  letter-spacing: -.01em;
  color: rgb(222 234 255 / .84);
}

/* aviso, no botón: solo texto con una división fina */
.pronto {
  display: inline-flex;
  align-items: center;
  margin-top: .9rem;
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
}
.pronto span + span {
  margin-left: .9rem;
  padding-left: .9rem;
  border-left: 1px solid rgb(255 255 255 / .45);
  font-weight: 400;
}

/* una sola entrada al cargar */
.marca > *, .hero__texto > * { animation: enfocar 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.marca__rubro { animation-delay: .2s; }
.hero__texto > :nth-child(1) { animation-delay: .3s; }
.hero__texto > :nth-child(2) { animation-delay: .38s; }
.hero__texto > :nth-child(3) { animation-delay: .46s; }
@keyframes enfocar {
  from { opacity: 0; translate: 0 .75rem; filter: blur(10px); }
}

.bajar {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: calc(.75rem + env(safe-area-inset-bottom));
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: var(--blanco);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
  white-space: nowrap;
}
.bajar svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a:focus-visible { outline: 3px solid var(--celeste); outline-offset: 4px; border-radius: 4px; }

/* en celular alcanza con la flecha */
.bajar span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (min-width: 900px) and (orientation: landscape) {
  .escena { --px: .7; --py: .6; }
  .hero__escenario::after {
    background:
      radial-gradient(ellipse 60% 62% at 0% 100%,
        rgb(4 22 62 / .92) 0%, rgb(5 28 76 / .74) 40%, rgb(7 40 104 / .3) 70%, transparent 100%),
      linear-gradient(180deg, transparent 68%, rgb(4 20 56 / .86) 100%);
  }
  .hero__texto { right: auto; bottom: clamp(3rem, 11svh, 7rem); text-align: left; }
  .lema { font-size: clamp(1.9rem, min(3.2vw, 5.6svh), 3.25rem); }
  .lema--en { margin-top: .4rem; font-size: clamp(1.15rem, min(1.7vw, 3svh), 1.6rem); }
  .pronto { margin-top: 1.5rem; font-size: 1.125rem; }
  .bajar { bottom: 1.25rem; }
  .bajar span { position: static; width: auto; height: auto; clip-path: none; }
}

/* ---------- Significado ---------- */

.significado { background: var(--blanco); color: var(--tinta); }

.significado__fijo {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 2.5rem;
}
/* La definición no "sube": se queda sobre la portada y el blanco gana la pantalla */
.escenas .significado {
  position: relative;
  z-index: 2;
  height: 460vh;
  height: 460svh;
  margin-top: -180vh;
  margin-top: -180svh;
  background: transparent;
  pointer-events: none;
}
.escenas .significado__fijo {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  background: rgb(255 255 255 / var(--velo, 0));
}
.escenas .significado__fijo.activa { pointer-events: auto; }

.palabra {
  white-space: nowrap; /* "suora" nunca se parte */
  font-size: min(31vw, 22svh, 12rem);
  font-weight: 750;
  line-height: .82;
  letter-spacing: -.062em;
  margin-left: -.03em;
  padding-bottom: .1em;
  color: var(--azul);
}
.palabra .grupo > span { display: inline-block; padding-inline: .004em; }

.pronunciacion {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem 1rem;
  margin-top: .75rem;
  font-size: 1.0625rem;
  color: var(--gris);
}
.pronunciacion abbr { font-style: italic; font-weight: 600; color: var(--azul); text-decoration: none; }

/* acepciones numeradas, como en un diccionario */
.acepciones {
  list-style: none;
  counter-reset: acepcion;
  display: grid;
  gap: clamp(1rem, 2.6svh, 1.75rem);
  margin-top: clamp(1.5rem, 4svh, 2.75rem);
}
.acepciones li {
  --leido: 1;
  counter-increment: acepcion;
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: baseline;
  padding-top: clamp(.8rem, 2svh, 1.25rem);
}
/* la raya de arriba es una línea recta que se completa al leer */
.acepciones li::before,
.acepciones li::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #e3e9f4;
}
.acepciones li::after {
  background: var(--azul);
  transform-origin: left;
  transform: scaleX(var(--leido));
}
.acepciones li > :first-child { grid-column: 2; }
.acepciones li > :last-child { grid-column: 2; }
.acepciones li:not(:empty) strong::before {
  content: counter(acepcion) ".";
  position: absolute;
  left: 0;
  font-weight: 500;
  color: var(--azul);
}
.acepciones strong {
  font-size: clamp(1.65rem, min(7.6vw, 4.4svh), 2.25rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.acepciones li > span {
  margin-top: .2rem;
  font-size: clamp(1.125rem, min(5vw, 2.8svh), 1.375rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.012em;
}
.grupo { display: inline-block; }

.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.definicion-en { margin-top: clamp(1.25rem, 3svh, 2rem); font-size: 1rem; color: var(--gris); }

/* todo centrado sobre el mismo eje */
.significado .columna { text-align: center; }
.palabra { margin-left: 0; }
.pronunciacion { justify-content: center; }
.acepciones { max-width: 26rem; margin-inline: auto; }
.acepciones li { display: flex; flex-direction: column; align-items: center; }
.acepciones li:not(:empty) strong::before { position: static; margin-right: .35em; }
.acepciones li > span { max-width: 22ch; text-wrap: balance; }

.indice { display: none; }

/* ---- Celular: una acepción por vez, grande ---- */
.uno-a-uno .palabra { font-size: min(35vw, 21svh, 14rem); }
.uno-a-uno .pronunciacion { margin-top: .5rem; }
.uno-a-uno .acepciones { grid-template-areas: "una"; gap: 0; margin-top: clamp(1.5rem, 6svh, 3.5rem); }
.uno-a-uno .acepciones li { grid-area: una; padding-top: 0; justify-content: flex-start; }
.uno-a-uno .acepciones li::before,
.uno-a-uno .acepciones li::after { display: none; }
.uno-a-uno .acepciones li:not(:empty) strong::before {
  display: block;
  margin: 0 0 .5rem;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: 0;
}
.uno-a-uno .acepciones strong { font-size: min(12vw, 7svh, 4rem); line-height: 1.05; letter-spacing: -.04em; }
.uno-a-uno .acepciones li > span {
  max-width: 17ch;
  margin-top: .8rem;
  font-size: clamp(1.35rem, min(7vw, 3.8svh), 2.25rem);
  line-height: 1.28;
  letter-spacing: -.018em;
}
.uno-a-uno .indice {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: clamp(1.5rem, 5svh, 3rem);
}
.indice b {
  --leido: 0;
  width: 3.25rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--azul), var(--azul)) left / calc(var(--leido) * 100%) 100% no-repeat #e0e7f4;
}
.uno-a-uno .definicion-en { margin-top: clamp(1rem, 3svh, 2rem); }

@media (min-width: 900px) and (orientation: landscape) {
  .acepciones { max-width: none; }
  .palabra { font-size: min(27vw, 45svh, 26rem); }
  .pronunciacion { margin-top: 1rem; font-size: 1.375rem; }
  .acepciones { grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(2rem, 6svh, 4rem); }
  .acepciones li { align-content: start; grid-template-columns: 2.25rem 1fr; }
  .acepciones strong { font-size: clamp(1.9rem, min(3vw, 5.4svh), 3rem); }
  .acepciones li > span { margin-top: .6rem; font-size: clamp(1.15rem, min(1.7vw, 3svh), 1.5rem); }
  .definicion-en { margin-top: clamp(1.5rem, 4svh, 3rem); font-size: 1.125rem; }
}

/* ---------- Trayecto: la ruta se endereza ---------- */

.trayecto { background: var(--azul); }

.trayecto__fijo {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 3rem;
}
.js .trayecto { height: 280vh; }
.js .trayecto__fijo { position: sticky; top: 0; }

.trayecto__intro {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 500;
  color: #dbe8ff;
}

.trayecto__titulo {
  margin-top: .5rem;
  max-width: 13ch;
  font-size: clamp(2.9rem, min(9.5vw, 15svh), 7.25rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.04em;
}

.ruta {
  position: relative;
  height: clamp(8rem, 26svh, 17rem);
  margin-top: clamp(1.5rem, 5svh, 3.5rem);
  margin-inline: .75rem;
}
.ruta svg { width: 100%; height: 100%; overflow: visible; }
.ruta path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ruta__asfalto { stroke: var(--noche); stroke-width: 22px; }
.ruta__linea { stroke: var(--blanco); stroke-width: 2.5px; stroke-dasharray: 12 14; }

.ruta__carga {
  position: absolute;
  left: 100%;
  top: 50%;
  width: 1.5rem;
  height: 1.5rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--blanco);
  border: 6px solid var(--noche);
  box-sizing: content-box;
}

.ruta__puntas {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1rem;
}

.trayecto__cierre {
  margin-top: clamp(1.75rem, 5svh, 3.5rem);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -.025em;
  text-align: right;
  transition: opacity .4s ease, translate .4s ease;
}
.js .trayecto__cierre { opacity: 0; translate: 0 .5rem; }
.js .trayecto__cierre.visible { opacity: 1; translate: 0 0; }

/* ---------- Cierre ---------- */

.final {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.final__contenido { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 3rem; }
.final h2 {
  font-size: clamp(2.8rem, min(10vw, 15svh), 7rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.final__contenido > p { margin-top: 1.25rem; font-size: clamp(1.15rem, 3vw, 1.5rem); }
.final__contenido > p.final__en { margin-top: .35rem; font-size: 1.0625rem; color: var(--celeste); }

.contacto { margin-top: clamp(2rem, 6svh, 3.5rem); }
.aviso label { display: block; font-size: 1.0625rem; color: rgb(255 255 255 / .86); }
.aviso__fila {
  display: flex;
  gap: .35rem;
  width: min(100%, 27rem);
  margin: 1.1rem auto 0;
  padding: .3rem;
  border-radius: 999px;
  background: rgb(255 255 255 / .06);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.aviso__fila:focus-within {
  background: rgb(255 255 255 / .1);
  box-shadow: inset 0 0 0 1.5px var(--celeste);
}
.aviso input {
  flex: 1;
  min-width: 0;
  padding: .65rem .5rem .65rem 1.15rem;
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blanco);
  font: inherit;
  font-size: 1rem; /* 16px evita el zoom automático en iPhone */
}
.aviso input::placeholder { color: rgb(255 255 255 / .5); }
/* que el autocompletado no pinte el campo de otro color */
.aviso input:-webkit-autofill {
  -webkit-text-fill-color: var(--blanco);
  transition: background-color 9999s;
}
.aviso button {
  padding: .65rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--blanco);
  color: var(--azul);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease;
}
.aviso button:hover { background: #dce9ff; }
.aviso button:focus-visible { outline: 2px solid var(--celeste); outline-offset: 3px; }
.aviso button:disabled { opacity: .6; cursor: wait; }
.contacto .aviso__estado { min-height: 1.5em; margin-top: .75rem; color: var(--blanco); }
.contacto p { margin-top: .75rem; color: var(--celeste); }
.contacto p a { color: var(--blanco); display: inline-block; text-underline-offset: .25em; }

/* en pantallas anchas el título del cierre va en un solo renglón */
@media (min-width: 900px) {
  .final h2 { font-size: min(7.4vw, 15svh, 6.75rem); white-space: nowrap; }
}

/* validación y agradecimiento */
.aviso.con-error .aviso__fila { box-shadow: inset 0 0 0 1.5px #ffb4b4; animation: sacudir .35s ease; }
.contacto .aviso.con-error .aviso__estado { color: #ffd0d0; }
@keyframes sacudir {
  25% { translate: -6px 0; }
  75% { translate: 6px 0; }
}
.gracias { outline: 0; animation: llegar .6s cubic-bezier(.2, .7, .2, 1) both; }
.gracias[hidden], .aviso[hidden] { display: none; }
.gracias svg {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin-inline: auto;
  fill: none;
  stroke: var(--blanco);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gracias circle { stroke: var(--azul); fill: var(--azul); }
.gracias path { stroke-dasharray: 40; animation: tildar .5s .25s ease both; }
.contacto .gracias__titulo { margin-top: 1rem; font-size: 1.5rem; font-weight: 700; color: var(--blanco); }
.contacto .gracias__texto { margin-top: .35rem; overflow-wrap: anywhere; }
.gracias__texto strong { color: var(--blanco); font-weight: 600; }
@keyframes llegar { from { opacity: 0; translate: 0 1rem; } }
@keyframes tildar { from { stroke-dashoffset: 40; } }

/* escalonado del cierre */
.final [data-aparece]:nth-child(2) { transition-delay: .12s; }
.final [data-aparece]:nth-child(3) { transition-delay: .2s; }
.final [data-aparece]:nth-child(4) { transition-delay: .34s; }

.pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding: 1.5rem var(--margen) calc(1.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgb(169 200 255 / .2);
  color: var(--celeste);
  font-size: .875rem;
}
.pie .pronto { margin: 0; font-size: .9375rem; color: var(--blanco); }

/* ---------- Botón para volver arriba ---------- */

.subir {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--noche);
  color: var(--blanco);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .35), 0 6px 20px rgb(3 15 45 / .3);
  opacity: 0;
  visibility: hidden;
  translate: 0 .75rem;
  transition: opacity .3s ease, translate .3s ease, visibility .3s;
}
.subir.visible { opacity: 1; visibility: visible; translate: 0 0; }
.subir:focus-visible { border-radius: 50%; }
.subir svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.js .pie { padding-right: calc(var(--margen) + 3.5rem); }

/* ---------- Aparición al hacer scroll ---------- */

.js [data-aparece] {
  opacity: 0;
  translate: 0 1.5rem;
  transition: opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1);
}
.js [data-aparece].visible { opacity: 1; translate: 0 0; }

/* Pantallas bajas (celular acostado) */
@media (max-height: 520px) {
  .bajar { display: none; }
  .palabra { font-size: 6rem; }
  .final__contenido { padding-block: 1.5rem; }
  .contacto { margin-top: 1.25rem; }
  .ruta { height: 5rem; margin-top: 1rem; }
  .trayecto__titulo { font-size: 2.5rem; max-width: none; }
  .trayecto__cierre { margin-top: .75rem; font-size: 1.75rem; }
  .trayecto__fijo { padding-block: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js [data-aparece] { opacity: 1; translate: none; }
  .marca > *, .hero__texto > *, .gracias, .gracias path, .aviso.con-error .aviso__fila { animation: none; }
  .js .trayecto { height: auto; }
  .js .trayecto__fijo { position: static; }
  .js .trayecto__cierre { opacity: 1; translate: none; }
}

/* Textos secundarios un poco más grandes en pantallas amplias */
@media (min-width: 900px) {
  .ruta__puntas { font-size: 1.25rem; }
}

/* =========================================================
   Celular: camino y cierre (no afecta a la computadora)
   ========================================================= */
@media (max-width: 899px) and (min-height: 521px) {

  /* ---- Camino: de arriba (origen) hacia abajo (destino) ---- */
  .trayecto__fijo {
    height: 100vh;
    height: 100svh;
    min-height: 34rem;
    padding: clamp(1.75rem, 6svh, 3.5rem) 0 calc(4.75rem + env(safe-area-inset-bottom));
    align-items: stretch;
  }
  .trayecto__fijo .columna {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .trayecto__intro { font-size: clamp(1.0625rem, 4.8vw, 1.35rem); }
  .trayecto__titulo {
    max-width: 11ch;
    margin-top: .4rem;
    font-size: clamp(2.5rem, min(12.5vw, 7.2svh), 4.5rem);
    line-height: 1.02;
  }
  .ruta__puntas { display: contents; }
  .ruta__puntas span {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.2;
    padding: .3rem .9rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .4);
  }
  .ruta__puntas span:first-child { order: 1; margin-top: clamp(1rem, 3.5svh, 2.25rem); }
  .ruta {
    order: 2;
    flex: 1;
    width: min(62%, 16rem);
    height: auto;
    min-height: 10rem;
    margin: 1.1rem 0;
  }
  .ruta svg { position: absolute; inset: 0; }
  .ruta__puntas span:last-child { order: 3; }
  .trayecto__cierre {
    order: 4;
    margin-top: clamp(.9rem, 2.8svh, 1.75rem);
    font-size: clamp(2rem, 10vw, 3rem);
    text-align: center;
  }

  /* ---- Cierre: todo centrado y fácil de tocar ---- */
  .final { min-height: 100svh; }
  .final__contenido { padding-block: 2.5rem 2rem; }
  .final h2 { font-size: clamp(2.75rem, min(14vw, 8.5svh), 4.5rem); line-height: 1; }
  .final__contenido > p { max-width: 20ch; margin-inline: auto; font-size: clamp(1.125rem, 5vw, 1.4rem); line-height: 1.4; }
  .final__contenido > p.final__en { max-width: 28ch; margin-top: .6rem; font-size: .9375rem; text-wrap: balance; }

  .contacto { width: 100%; max-width: 26rem; margin: clamp(1.75rem, 5svh, 3rem) auto 0; }
  .aviso label { max-width: 24ch; margin-inline: auto; font-size: 1.0625rem; text-wrap: balance; }
  .aviso__fila,
  .aviso__fila:focus-within,
  .aviso.con-error .aviso__fila {
    flex-direction: column;
    gap: .7rem;
    width: 100%;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  /* campo y botón apilados, a todo el ancho */
  .aviso input {
    flex: none;
    width: 100%;
    height: 3.5rem;
    padding: 0 1rem;
    border-radius: .9rem;
    background: rgb(255 255 255 / .08);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .24);
    font-size: 1.0625rem;
    text-align: center;
  }
  .aviso input:focus { background: rgb(255 255 255 / .12); box-shadow: inset 0 0 0 1.5px var(--celeste); }
  .aviso.con-error input { box-shadow: inset 0 0 0 1.5px #ffb4b4; }
  .aviso button { width: 100%; height: 3.5rem; border-radius: .9rem; font-size: 1.0625rem; font-weight: 650; }
  .contacto .aviso__estado { font-size: .9375rem; line-height: 1.4; text-wrap: balance; }
  .contacto .aviso__estado:empty { min-height: 0; margin: 0; }
  .contacto > p { margin-top: 1.25rem; font-size: .9375rem; }
  .contacto > p a { display: block; padding-block: .5rem; font-size: 1.0625rem; }

  /* pie centrado; abajo queda lugar para el botón de subir */
  .pie,
  .js .pie {
    flex-direction: column-reverse;
    justify-content: center;
    gap: .5rem;
    padding: 1.1rem var(--margen) calc(4.75rem + env(safe-area-inset-bottom));
    text-align: center;
  }
}

/* celulares bajos: el cierre se compacta */
@media (max-width: 899px) and (min-height: 521px) and (max-height: 700px) {
  .final__contenido { padding-block: 1rem .5rem; }
  .final__contenido > p { margin-top: .75rem; }
  .final__contenido > p.final__en { margin-top: .35rem; }
  .contacto { margin-top: 1.25rem; }
  .aviso input, .aviso button { height: 3.125rem; }
  .aviso__fila { margin-top: .75rem; }
  .contacto > p { margin-top: .75rem; }
}

/* Celular: cierre despejado, solo el título, la pregunta, el campo y el contacto */
@media (max-width: 899px) and (min-height: 521px) {
  /* estas frases repiten lo que ya dicen el título y la portada */
  .final__contenido > p { display: none; }
  .pie .pronto { display: none; }

  .final__contenido { padding-block: 2rem; }
  .contacto { margin-top: clamp(2.25rem, 7svh, 4rem); }
  .aviso label {
    max-width: none;
    white-space: nowrap;
    font-size: min(3.85vw, 1.125rem);
    letter-spacing: -.01em;
    text-wrap: nowrap;
  }
  .aviso__fila { margin-top: 1.1rem; }
  .contacto > p { margin-top: clamp(1.5rem, 4svh, 2.25rem); }
  .contacto > p a { display: inline-block; margin-left: .25em; font-size: inherit; }

  .pie,
  .js .pie { padding-block: 1.5rem calc(1.5rem + env(safe-area-inset-bottom)); justify-content: flex-start; text-align: left; flex-direction: row; }
}
