/* Construcciones Mundiales · landing
   Plano técnico azul (la cuadrícula del logo), el naranja del casco para la acción
   y los titulares con el estilo de los subtítulos de los vídeos. Móvil primero. */

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --fondo: #0a1426;
  --fondo-2: #0e1b33;
  --panel: rgba(17, 31, 58, 0.72);
  --linea: rgba(140, 185, 235, 0.09);
  --linea-2: rgba(140, 185, 235, 0.22);
  --texto: #eef1f4;
  --suave: #a7b4ca;
  --crema: #efe6d2;
  --naranja: #ffb000;
  --naranja-2: #f07a24;
  --hielo: #5fb8e6;
  --cifra: #ffe7a3;
  --tinta: #16181f;
  --bien: #3ddc97;
  --regular: #ffd23f;
  --mal: #ff7a6b;
  --radio: 22px;
  --lado: 20px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --rebote: cubic-bezier(0.34, 1.7, 0.6, 1);
  color-scheme: dark;
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  font: 400 17px/1.55 "Outfit", system-ui, sans-serif;
  color: var(--texto);
  background-color: var(--fondo);
  background-image:
    linear-gradient(var(--linea) 1px, transparent 1px),
    linear-gradient(90deg, var(--linea) 1px, transparent 1px),
    linear-gradient(rgba(140, 185, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 185, 235, 0.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  overflow-x: hidden;
}

img,
video,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--hielo);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--texto);
}

:focus-visible {
  outline: 3px solid var(--hielo);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(140, 185, 235, 0.12);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

/* --- Marcas de los subtítulos ------------------------------------------------------ */

mark {
  color: var(--tinta);
  padding: 0 0.16em;
  border-radius: 0.18em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

mark.clave {
  background: #fff;
}

mark.cifra {
  background: var(--cifra);
}

.titular,
.titulo {
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 0.09em #05080f;
  paint-order: stroke fill;
  text-shadow: 0 0.06em 0 rgba(0, 0, 0, 0.55);
}

.titular {
  font-size: clamp(2.75rem, 12.5vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.titulo {
  font-size: clamp(2.1rem, 9vw, 3.6rem);
}

/* Cada palabra entra de golpe con un pequeño rebote, como en los vídeos */
.palabra {
  display: inline-block;
}

/* La palabra marcada y su signo ("primero?") no se separan de línea */
.junto {
  white-space: nowrap;
}

.titular--pop .palabra {
  animation: pop 0.5s var(--rebote) both;
  animation-delay: calc(0.15s + var(--i) * 0.11s);
}

.palabras-listo .palabra {
  opacity: 0;
  transform: translateY(0.2em) scale(0.7);
}

.palabras-listo.visto .palabra {
  animation: pop 0.45s var(--rebote) both;
  animation-delay: calc(var(--i) * 0.08s);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(0.2em) scale(0.7);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Piezas comunes ------------------------------------------------------------------ */

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 14px;
}

.etiqueta::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: currentColor;
}

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--naranja);
  color: #0a1426;
  font: 700 1.05rem/1 "Outfit", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(255, 176, 0, 0.75), inset 0 -3px 0 rgba(0, 0, 0, 0.14);
  transition: transform 0.18s var(--rebote), box-shadow 0.2s, background 0.2s;
}

.boton:hover {
  color: #0a1426;
  transform: translateY(-2px);
  background: #ffbe2e;
}

.boton:active {
  transform: translateY(1px) scale(0.98);
}

.boton--sec {
  background: transparent;
  color: var(--texto);
  box-shadow: inset 0 0 0 1.5px var(--linea-2);
}

.boton--sec:hover {
  color: var(--texto);
  background: rgba(140, 185, 235, 0.08);
}

.boton--mini {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.95rem;
}

.boton--ancho {
  width: 100%;
}

form {
  margin: 0;
}

.letra-pequena {
  font-size: 0.86rem;
  color: var(--suave);
}

.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--naranja);
  border: 1px solid rgba(255, 176, 0, 0.45);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 8px;
}

/* Barra de "obra en curso" */
.progreso {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 50;
  pointer-events: none;
}

.progreso span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--naranja-2), var(--naranja));
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

/* --- Cabecera ---------------------------------------------------------------------- */

.cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--lado);
  max-width: 1200px;
  margin: 0 auto;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--texto);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.marca:hover {
  color: var(--texto);
}

.marca img {
  border-radius: 50%;
}

.cabecera__compra {
  display: none;
}

/* --- Hero ---------------------------------------------------------------------------- */

.hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px var(--lado) 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -80px 0 0;
  background:
    radial-gradient(55% 45% at 72% 52%, rgba(95, 184, 230, 0.16), transparent 70%),
    radial-gradient(40% 30% at 30% 92%, rgba(240, 122, 36, 0.14), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero__texto {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.hero__texto .etiqueta {
  margin-bottom: 0;
}

.entrada {
  font-size: 1.12rem;
  color: var(--suave);
  max-width: 34em;
}

.entrada a {
  color: var(--texto);
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.acciones form,
.acciones form .boton {
  width: 100%;
}

.acciones > .boton {
  width: 100%;
}

.hero__escena {
  position: relative;
  width: min(88vw, 400px);
  aspect-ratio: 400 / 640;
  margin: 34px auto 0;
}

.plano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plano .trazo {
  fill: none;
  stroke: var(--naranja-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: dibujar 2.4s 0.3s ease-out forwards;
  opacity: 0.85;
}

.plano .trazo--fino {
  stroke: var(--linea-2);
  stroke-width: 1.5;
  animation-delay: 0s;
}

.plano .cota path {
  fill: none;
  stroke: var(--hielo);
  stroke-width: 1.2;
  opacity: 0.8;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: dibujar 1.4s 0.6s ease-out forwards;
}

.plano .cota text {
  fill: var(--hielo);
  font: 500 13px var(--mono);
  text-anchor: middle;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: aparecer 0.6s 1.4s forwards;
}

@keyframes dibujar {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes aparecer {
  to {
    opacity: 1;
  }
}

.movil {
  position: absolute;
  left: 22%;
  top: 15.625%;
  width: 56%;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  overflow: hidden;
  background: #05080f;
  box-shadow:
    0 0 0 6px #05080f,
    0 0 0 7.5px rgba(140, 185, 235, 0.28),
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 90px -10px rgba(95, 184, 230, 0.35);
  animation: subir 0.9s 0.15s var(--rebote) both;
}

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.movil__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sonido {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font: 600 0.8rem "Outfit", system-ui, sans-serif;
  cursor: pointer;
}

.sonido__icono {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm13.6 3 2.7-2.7-1.4-1.4-2.7 2.7-2.7-2.7-1.4 1.4 2.7 2.7-2.7 2.7 1.4 1.4 2.7-2.7 2.7 2.7 1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm13.6 3 2.7-2.7-1.4-1.4-2.7 2.7-2.7-2.7-1.4 1.4 2.7 2.7-2.7 2.7 1.4 1.4 2.7-2.7 2.7 2.7 1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sonido[aria-pressed="true"] .sonido__icono {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z'/%3E%3C/svg%3E");
}

/* El obrero 3D (js/obrero.js); sin WebGL el hueco queda vacío y no estorba */
.obrero {
  position: absolute;
  pointer-events: none;
}

.obrero canvas {
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 0.6s;
}

.obrero canvas.listo {
  opacity: 1;
}

.obrero--hero {
  left: -9%;
  bottom: 2%;
  width: 44%;
  aspect-ratio: 3 / 4;
}

/* --- Cotas ---------------------------------------------------------------------- */

.cotas {
  list-style: none;
  margin: 0 auto;
  padding: 18px var(--lado);
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  border-block: 1px solid var(--linea-2);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--suave);
  text-transform: uppercase;
}

.cotas li {
  display: grid;
  gap: 2px;
}

.cotas b {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--crema);
}

/* --- Secciones --------------------------------------------------------------------- */

.seccion {
  max-width: 1200px;
  margin: 0 auto;
  padding: 84px var(--lado) 0;
}

.seccion__cabeza {
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 34px;
}

.seccion__cabeza .etiqueta {
  margin-bottom: 0;
}

.seccion__cabeza p {
  color: var(--suave);
  font-size: 1.06rem;
}

.mas {
  margin-top: 22px;
  font-weight: 600;
}

.mas a {
  text-decoration: none;
}

.nota {
  margin-top: 22px;
  color: var(--suave);
  font-size: 0.95rem;
  max-width: 46em;
}

/* Aparece al llegar (solo lo que está fuera de la pantalla al cargar) */
.oculto {
  opacity: 0;
  transform: translateY(26px);
}

.visto {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Así se ven --------------------------------------------------------------------- */

.carril {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--lado) * -1);
  padding: 4px var(--lado) 14px;
  scrollbar-width: none;
}

.carril::-webkit-scrollbar {
  display: none;
}

.reel {
  flex: 0 0 66%;
  max-width: 260px;
  margin: 0;
  scroll-snap-align: center;
}

.reel__marco {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #05080f;
  box-shadow: 0 0 0 1px var(--linea-2), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}

.reel__marco video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel__play {
  position: absolute;
  inset: 0;
  border: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 15, 0.45));
  cursor: pointer;
}

.reel__play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(255, 176, 0, 0.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230a1426' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 28px no-repeat;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s var(--rebote);
}

.reel__play:hover::after {
  transform: scale(1.08);
}

.reel.sonando .reel__play {
  background: transparent;
}

.reel.sonando .reel__play::after {
  opacity: 0;
}

.reel figcaption {
  padding: 14px 4px 0;
  color: var(--suave);
  font-size: 0.95rem;
  line-height: 1.4;
}

.reel figcaption .chip {
  display: table;
}

/* --- Cómo funciona ---------------------------------------------------------------- */

.pasos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 56px;
  counter-reset: paso;
}

.paso {
  display: grid;
  gap: 22px;
}

.paso__texto {
  display: grid;
  gap: 10px;
  align-content: center;
}

.paso__texto p {
  color: var(--suave);
}

.paso__num {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--naranja);
  letter-spacing: 0.1em;
}

.paso__num::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 1px;
  margin-left: 10px;
  vertical-align: middle;
  background: rgba(255, 176, 0, 0.5);
}

.paso h3 {
  font-size: 1.6rem;
  font-weight: 800;
}

.paso__visual {
  width: 100%;
  max-width: 300px;
}

.terminal {
  max-width: 420px;
  background: #060a13;
  border-radius: 16px;
  padding: 0 18px 20px;
  box-shadow: 0 0 0 1px var(--linea-2), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.terminal__barra {
  display: flex;
  gap: 6px;
  padding: 14px 0 16px;
}

.terminal__barra i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(140, 185, 235, 0.25);
}

.terminal__linea {
  min-height: 3em;
  color: var(--texto);
}

.terminal__prompt {
  color: var(--naranja);
}

.terminal__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--naranja);
  animation: parpadeo 1s steps(2) infinite;
}

@keyframes parpadeo {
  50% {
    opacity: 0;
  }
}

.terminal__resp {
  margin-top: 12px;
  color: var(--suave);
}

.terminal__resp b {
  color: var(--hielo);
  font-weight: 500;
}

/* --- Empezar ---------------------------------------------------------------------- */

.empezar {
  display: grid;
  gap: 32px;
}

.empezar__pasos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  counter-reset: empezar;
}

.empezar__pasos li {
  counter-increment: empezar;
  display: grid;
  grid-template-columns: 2.4em 1fr;
  gap: 10px;
  color: var(--suave);
}

.empezar__pasos li::before {
  content: counter(empezar, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--naranja);
  padding-top: 0.3em;
}

.empezar__pasos b {
  color: var(--texto);
}

.terminal--empezar {
  width: 100%;
}

.terminal--empezar .terminal__linea {
  min-height: 0;
}

.terminal__lista {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  color: var(--suave);
  font-size: 0.84rem;
}

.terminal__lista .t-paso {
  margin-top: 6px;
  color: var(--hielo);
}

.terminal__lista .t-paso:first-child {
  margin-top: 0;
}

.t-ok {
  color: var(--bien);
}

.terminal--empezar.anima .terminal__lista li {
  opacity: 0;
  transform: translateY(4px);
}

.terminal--empezar.hecho .terminal__lista li {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transition-delay: calc(var(--i, 0) * 0.28s);
}

.guion {
  max-width: 420px;
  display: grid;
  gap: 2px;
  padding: 16px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--linea-2);
}

.guion__fila {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--linea-2);
  font-size: 0.95rem;
}

.guion__fila span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hielo);
  padding-top: 3px;
}

.guion__ok {
  padding: 12px 4px 2px;
  color: var(--bien);
  font-weight: 600;
  font-size: 0.95rem;
}

.pantalla {
  position: relative;
  aspect-ratio: 9 / 16;
  max-width: 260px;
  border-radius: 20px;
  overflow: hidden;
  background: #05080f;
  box-shadow: 0 0 0 1px var(--linea-2), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
}

.pantalla video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subtitulos {
  background: #05080f url("/media/paso-subtitulos.webp") center / cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 40%;
  gap: 2px;
}

.subtitulos__linea {
  font-weight: 900;
  font-size: 1.9rem;
  line-height: 1.15;
  color: #fff;
  -webkit-text-stroke: 7px #000;
  paint-order: stroke fill;
  text-align: center;
}

.subtitulos__linea span {
  display: inline-block;
}

/* Con JS la frase se dice en bucle: cada palabra entra de golpe y luego sale la frase entera */
.subtitulos.dice span {
  animation: pop 0.38s var(--rebote) both;
}

.subtitulos.calla .subtitulos__linea {
  opacity: 0;
  transition: opacity 0.25s;
}

.subtitulos__linea span.clave {
  background: #fff;
  color: var(--tinta);
  -webkit-text-stroke: 0;
  border-radius: 10px;
  padding: 0 6px;
}

.subtitulos__linea:first-child span:nth-child(1) { animation-delay: 0.1s; }
.subtitulos__linea:first-child span:nth-child(2) { animation-delay: 0.4s; }
.subtitulos__linea:first-child span:nth-child(3) { animation-delay: 0.7s; }
.subtitulos__linea:last-child span:nth-child(1) { animation-delay: 1.25s; }
.subtitulos__linea:last-child span:nth-child(2) { animation-delay: 1.45s; }
.subtitulos__linea:last-child span:nth-child(3) { animation-delay: 1.65s; }

/* --- Galería en desfile ------------------------------------------------------------ */

/* Sin JS, cada fila se desliza a mano; con JS (.listo) las filas se duplican y desfilan solas */
.desfile {
  display: grid;
  gap: 12px;
  margin: 0 calc(var(--lado) * -1);
  overflow-x: auto;
  padding: 0 var(--lado);
}

.desfile.listo {
  overflow: hidden;
  padding: 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.desfile__fila {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  width: max-content;
}

.desfile.listo .desfile__fila {
  animation: desfile 70s linear infinite;
}

.desfile.listo .desfile__fila--al-reves {
  animation-direction: reverse;
  animation-duration: 64s;
}

.desfile:hover .desfile__fila {
  animation-play-state: paused;
}

@keyframes desfile {
  to {
    transform: translateX(-50%);
  }
}

.desfile li {
  position: relative;
  width: 148px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--fondo-2);
  box-shadow: 0 0 0 1px var(--linea-2);
}

.desfile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desfile span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 10px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 15, 0.85));
}

/* --- Qué incluye ------------------------------------------------------------------ */

.tarjetas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.tarjeta {
  position: relative;
  padding: 24px 22px;
  border-radius: var(--radio);
  background: linear-gradient(160deg, rgba(25, 45, 82, 0.7), rgba(13, 25, 47, 0.7));
  box-shadow: 0 0 0 1px var(--linea-2);
}

/* Esquinas de plano */
.tarjeta::before,
.tarjeta::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--naranja);
}

.tarjeta::before {
  top: 10px;
  left: 10px;
  border-width: 1.5px 0 0 1.5px;
}

.tarjeta::after {
  right: 10px;
  bottom: 10px;
  border-width: 0 1.5px 1.5px 0;
}

.tarjeta h3 {
  margin-bottom: 10px;
}

.tarjeta p {
  color: var(--suave);
  font-size: 0.98rem;
}

/* --- Requisitos ----------------------------------------------------------------- */

.ficha {
  display: grid;
  gap: 14px;
}

.ficha__bloque {
  padding: 22px 20px 8px;
  border-radius: var(--radio);
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--linea-2);
}

.ficha__bloque h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--linea-2);
}

.ficha__bloque h3 small {
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--naranja);
}

.ficha dl {
  margin: 0;
}

.ficha dt {
  padding-top: 16px;
  font: 500 0.74rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hielo);
}

.ficha dd {
  margin: 6px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--linea-2);
  color: var(--suave);
  font-size: 0.98rem;
}

.ficha dd:last-child {
  border-bottom: 0;
}

.ficha dd b {
  color: var(--texto);
  font-weight: 600;
}

.ficha dd a {
  white-space: nowrap;
}

.comprobar {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: 24px 20px;
  border-radius: var(--radio);
  border: 1.5px dashed rgba(255, 176, 0, 0.45);
  background: rgba(255, 176, 0, 0.04);
}

.comprobar h3 {
  margin-bottom: 8px;
}

.comprobar p {
  color: var(--suave);
  font-size: 0.95rem;
}

.comprobar__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.comprobar__lista li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.95rem;
}

.comprobar__lista b {
  display: block;
  color: var(--texto);
  font-weight: 600;
}

.comprobar__lista span {
  color: var(--suave);
}

.marca-estado {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0a1426;
}

.marca-estado--bien { background: var(--bien); }
.marca-estado--regular { background: var(--regular); }
.marca-estado--mal { background: var(--mal); }

.comprobar__nota {
  font-size: 0.85rem !important;
}

/* --- Precio ----------------------------------------------------------------------- */

.precio {
  display: grid;
  justify-items: center;
}

.precio__tarjeta {
  position: relative;
  width: 100%;
  max-width: 460px;
  padding: 34px 24px 28px;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255, 176, 0, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(25, 45, 82, 0.85), rgba(13, 25, 47, 0.9));
  box-shadow: 0 0 0 1px rgba(255, 176, 0, 0.35), 0 40px 90px -40px rgba(255, 176, 0, 0.45);
}

.precio__tarjeta .etiqueta {
  justify-content: center;
}

.precio__cifra {
  font-weight: 900;
  font-size: clamp(4rem, 20vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.precio__sub {
  margin-top: 10px;
  color: var(--suave);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.precio__lista {
  list-style: none;
  margin: 26px 0;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}

.precio__lista li {
  position: relative;
  padding-left: 32px;
}

.precio__lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--naranja) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230a1426' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.precio .letra-pequena {
  margin-top: 16px;
  line-height: 1.5;
}

/* --- Preguntas ------------------------------------------------------------------ */

.faq {
  max-width: 820px;
  border-top: 1px solid var(--linea-2);
}

.faq details {
  border-bottom: 1px solid var(--linea-2);
}

.faq summary {
  position: relative;
  list-style: none;
  padding: 20px 44px 20px 0;
  font-weight: 600;
  font-size: 1.08rem;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--linea-2);
  background:
    linear-gradient(var(--naranja), var(--naranja)) center / 10px 2px no-repeat,
    linear-gradient(var(--naranja), var(--naranja)) center / 2px 10px no-repeat;
  transition: transform 0.25s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 0 22px;
  color: var(--suave);
  max-width: 44em;
}

/* --- Cierre y pie --------------------------------------------------------------------- */

.cierre {
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px var(--lado) 100px;
  display: grid;
  justify-items: center;
  gap: 26px;
  text-align: center;
}

.cierre .titular {
  font-size: clamp(2.4rem, 11vw, 4.6rem);
  max-width: 12em;
}

.obrero--cierre {
  position: relative;
  width: 200px;
  aspect-ratio: 3 / 4;
  margin-bottom: -26px;
}

.pie {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px var(--lado) 120px;
  border-top: 1px solid var(--linea-2);
  display: grid;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--suave);
}

.pie nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.pie nav a {
  color: var(--suave);
}

.pie nav a:hover {
  color: var(--texto);
}

/* Barra de compra fija en el móvil (aparece al pasar el hero) */
.barra-compra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--lado) calc(12px + env(safe-area-inset-bottom));
  background: rgba(8, 15, 29, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--linea-2);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.barra-compra.visible {
  transform: none;
}

.barra-compra p {
  display: grid;
  line-height: 1.25;
  font-size: 0.92rem;
}

.barra-compra p span {
  color: var(--suave);
  font-size: 0.82rem;
}

/* --- Páginas sencillas (gracias, recuperar, legales, errores) -------------------------- */

.sencilla .aviso,
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px var(--lado) 90px;
}

.sencilla .aviso {
  display: grid;
  gap: 18px;
  padding-top: 40px;
}

.sencilla .aviso h1 {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  font-weight: 900;
}

.sencilla .aviso p {
  color: var(--suave);
}

.sencilla .aviso h2 {
  font-size: 1.5rem;
  margin-top: 14px;
}

.sencilla .aviso p b {
  color: var(--texto);
}

.estado {
  display: grid;
  gap: 18px;
}

.estado[hidden] {
  display: none;
}

.pasos-instalar {
  margin: 4px 0 0;
  padding-left: 1.3em;
  display: grid;
  gap: 10px;
  color: var(--suave);
}

.pasos-instalar b {
  color: var(--texto);
}

.campo {
  display: grid;
  gap: 8px;
}

.campo input {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1.5px solid var(--linea-2);
  background: rgba(5, 8, 15, 0.5);
  color: var(--texto);
  font: 400 1.05rem "Outfit", system-ui, sans-serif;
}

.campo input:focus {
  outline: none;
  border-color: var(--hielo);
}

.legal h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  margin: 18px 0 8px;
}

.legal h2 {
  font-size: 1.3rem;
  margin: 34px 0 10px;
}

.legal p,
.legal li {
  color: var(--suave);
  margin: 0 0 12px;
}

.legal ul {
  padding-left: 1.2em;
}

.legal .actualizado {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--hielo);
}

.legal .volver {
  display: inline-block;
  margin-top: 30px;
}

/* --- Tamaños mayores ----------------------------------------------------------------- */

@media (min-width: 560px) {
  .acciones {
    width: auto;
  }

  .acciones form,
  .acciones form .boton,
  .acciones > .boton {
    width: auto;
  }

  .cotas {
    grid-template-columns: repeat(4, 1fr);
  }

  .tarjetas {
    grid-template-columns: 1fr 1fr;
  }

  .desfile li {
    width: 180px;
  }
}

@media (min-width: 900px) {
  :root {
    --lado: 40px;
  }

  body {
    font-size: 18px;
  }

  .cabecera__compra {
    display: block;
  }

  .hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 40px;
    min-height: min(88vh, 860px);
    padding-top: 10px;
  }

  .hero__escena {
    margin: 0 auto;
    width: min(100%, 420px);
  }

  .titular {
    font-size: clamp(3.6rem, 6.4vw, 5.8rem);
  }

  .seccion {
    padding-top: 130px;
  }

  .carril {
    margin: 0;
    padding: 4px 0 14px;
  }

  .reel {
    flex: 1 1 0;
  }

  .paso {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
  }

  .paso:nth-child(even) .paso__texto {
    order: 2;
  }

  .empezar {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
  }

  .terminal--empezar {
    justify-self: center;
  }

  .paso__visual {
    justify-self: center;
  }

  .paso:nth-child(odd) .paso__texto {
    padding-left: 6%;
  }

  .ficha {
    grid-template-columns: 1fr 1fr;
  }

  .comprobar {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 28px 30px;
  }

  .comprobar__lista,
  .comprobar__nota {
    grid-column: 1 / -1;
  }

  .barra-compra {
    display: none;
  }

  .pie {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding-bottom: 50px;
  }

  .pie nav {
    justify-content: flex-end;
  }

  .pie > p {
    grid-column: 1 / -1;
  }

  .obrero--cierre {
    width: 240px;
  }
}

@media (min-width: 1100px) {
  .tarjetas {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }

}
