/* Recorrido Marena. El lienzo es 16:9 y escala con la pantalla; dentro, 1cqw = 1/100 de su ancho. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }

:root {
  --azul: #0447a4;
  --verde: #45a455;
  --tinta: #1d2733;
  --suave: #5b6673;
  --fondo: #f3f5f8;
  --papel: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fondo); color: var(--tinta); font-family: "Inter", system-ui, sans-serif; overflow: hidden; }

.escenario { position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(ellipse at 35% 45%, #ffffff 0%, #eef2f7 55%, #e4e9f0 100%); }
.lienzo { position: relative; width: min(100vw, 177.78vh); aspect-ratio: 16 / 9; container-type: inline-size; overflow: hidden; }
#svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* La cámara: recorrido.js le pone el transform; acá solo el movimiento. */
#camara { transform-origin: 0 0; transition: transform 1.3s cubic-bezier(.45, .05, .25, 1); }

/* El destape: primero sube el techo, después bajan el frente y el toldo. Al volver, al revés. */
#techo, .frente { transition: transform 1.1s cubic-bezier(.5, 0, .3, 1), opacity .9s ease; }
#techo { transition-delay: .55s; }
.abierto #techo { transform: translateY(-190px); opacity: 0; transition-delay: 0s; }
.abierto .frente { transform: translateY(110px); opacity: 0; transition-delay: .55s; }

#nube, #enlace { opacity: 0; transition: opacity .8s ease; }
.abierto #nube, .abierto #enlace { opacity: 1; transition-delay: 1.5s; }
#enlace { stroke: var(--azul); stroke-width: 2.2; stroke-dasharray: 2 9; stroke-linecap: round; }
.abierto #enlace { animation: correr 1.4s linear infinite; }
@keyframes correr { to { stroke-dashoffset: -22; } }
.nube-flota { animation: flotar 5s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-5px); } }
.led { animation: led 1.6s steps(2) infinite; }
@keyframes led { 50% { opacity: .35; } }

.etiqueta { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease; }
.etiquetas .etiqueta { opacity: 1; transform: none; }

/* --- El texto que acompaña --------------------------------------------- */
.texto { position: absolute; right: 3.2cqw; top: 50%; transform: translateY(-50%); width: 30cqw;
  background: rgba(255, 255, 255, .92); border-radius: 1.4cqw; padding: 2.4cqw 2.4cqw 2.2cqw;
  box-shadow: 0 1.2cqw 3cqw rgba(4, 71, 164, .10); border: 1px solid #e5eaf1; }
.texto.izq { right: auto; left: 2cqw; top: 41%; }   /* el paso donde la animación pasa a la derecha */
.texto.cambia { animation: entrar .55s ease both; }
@keyframes entrar { from { opacity: 0; transform: translate(1.5cqw, -50%); } }
.eyebrow { margin: 0 0 .8cqw; font-size: .95cqw; letter-spacing: .08em; text-transform: uppercase; color: var(--verde); font-weight: 600; }
.texto h1 { margin: 0; font-size: 5.2cqw; line-height: 1; color: var(--azul); letter-spacing: -.02em; }
.texto h2 { margin: 0 0 1cqw; font-size: 2.15cqw; line-height: 1.15; color: var(--azul); letter-spacing: -.01em; }
.texto p { margin: 0 0 1cqw; font-size: 1.2cqw; line-height: 1.5; color: var(--suave); }
.texto .frase { font-size: 1.75cqw; color: var(--tinta); margin-top: 1.2cqw; }
.texto .logo { width: 4.6cqw; display: block; margin-bottom: 1cqw; }
.texto .pista { font-size: .95cqw; color: #8a94a1; margin-top: 2cqw; }
.texto ul { list-style: none; margin: 1.2cqw 0 0; padding: 0; }
.texto li { position: relative; padding-left: 1.8cqw; margin: 0 0 .9cqw; font-size: 1.12cqw; line-height: 1.45; color: var(--tinta); opacity: .35; }
.texto li::before { content: ""; position: absolute; left: 0; top: .5cqw; width: .75cqw; height: .75cqw; border-radius: 50%; background: var(--verde); }
.texto li b { color: var(--azul); }

/* --- La ventana flotante con la captura real ----------------------------- */
.ventana { position: absolute; margin: 0; background: #0d1b2a; border-radius: 1cqw; padding: .5cqw;
  box-shadow: 0 1.6cqw 4cqw rgba(13, 27, 42, .28); transform-origin: 50% 100%; }
.ventana figcaption { color: #e7edf5; font-size: .9cqw; font-weight: 600; padding: .35cqw .5cqw .6cqw; }
.ventana__img { position: relative; line-height: 0; border-radius: .5cqw; overflow: hidden; }
.ventana img { width: 100%; height: auto; display: block; }
.marca { position: absolute; border-radius: .5cqw; border: .25cqw solid #ffd34d; box-shadow: 0 0 0 .4cqw rgba(255, 211, 77, .35); opacity: 0; }
.marca--listo { background: rgba(69, 164, 85, .82); border-color: #45a455; box-shadow: 0 0 0 .4cqw rgba(69, 164, 85, .35);
  display: grid; place-items: center; color: #fff; font: 600 1.5cqw/1 "Inter", sans-serif; }
.marca--anillo { border-radius: 50%; border-color: #ffd34d; }

/* --- Pasos y controles --------------------------------------------------- */
.pasos { position: absolute; left: 2cqw; bottom: 1.7cqw; display: flex; gap: .4cqw; align-items: center; }
.pasos button { border: 0; min-width: 1.9cqw; height: 1.9cqw; padding: 0 .55cqw; border-radius: 99px; background: rgba(4, 71, 164, .08);
  color: var(--suave); font: 600 .78cqw/1 "Inter", sans-serif; cursor: pointer; }
.pasos button.actual { background: var(--azul); color: #fff; }
.controles { position: absolute; right: 1.6cqw; bottom: 1.3cqw; display: flex; gap: .5cqw; transition: opacity .4s; }
.controles.quieto { opacity: 0; }
.ctl { border: 1px solid #d6dde7; background: #fff; color: var(--azul); width: 2.8cqw; height: 2.8cqw; border-radius: 50%;
  font: 600 1.5cqw/1 "Inter", sans-serif; cursor: pointer; display: grid; place-items: center; }
.ctl--repetir { font-size: 1.2cqw; }
.ctl--texto { width: auto; border-radius: 99px; padding: 0 1.1cqw; font-size: .85cqw; }
.ctl:hover, .pasos button:hover { filter: brightness(.95); }

@media (prefers-reduced-motion: reduce) {
  #camara, #techo, .frente { transition-duration: .01s !important; }
  .nube-flota, .led, .abierto #enlace { animation: none; }
}
.plato, #empleada, #gerente, #repartidor, #hacienda, #comprobantes, #enlace-hacienda { opacity: 0; }
#enlace-hacienda { stroke: #45a455; stroke-width: 2.2; stroke-dasharray: 2 9; stroke-linecap: round; animation: correr 1.4s linear infinite; }
.texto .logo--uber { width: 9cqw; height: auto; margin-bottom: 1.2cqw; }
.texto .nota { font-size: 1cqw; color: var(--verde); font-weight: 600; margin-top: 1.2cqw; }
.texto .correo { font-size: 1.6cqw; font-weight: 600; color: var(--azul); }
