:root {
  --blanco: #ffffff;
  --negro: #000000;
  --tinta: #0e0d13;
  --azul: #2255ff;
  --azul-vivo: #4f7bff;
  --gris: #6b6b76;
  --gris-oscuro: #a8a8b3;
  --gris-claro: #f2f2f5;
  --linea: rgba(14,13,19,.12);
  --linea-oscura: rgba(255,255,255,.14);
  --sans: 'Inter', system-ui, -apple-system, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --curva: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--blanco); color: var(--tinta); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.envoltura { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); position: relative; }
.banda { padding-block: 120px; }
.banda-negra { background: var(--negro); color: var(--blanco); }
.titulo { font-size: clamp(36px, 5vw, 56px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; }
.titulo .acento { color: var(--azul); }
.banda-negra .titulo .acento { color: var(--azul-vivo); }
.subtitulo { font-size: clamp(17px, 1.6vw, 20px); font-weight: 300; line-height: 1.5; max-width: 52ch; margin-top: 18px; }
.banda-negra .subtitulo { color: var(--gris-oscuro); }
.placa { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--tinta); color: var(--blanco); }
.banda-negra .placa { background: var(--blanco); color: var(--tinta); }
.capitulo-titulo { margin-top: 20px; }
.sticker { background: var(--blanco); border: 5px solid var(--blanco); box-shadow: 0 10px 28px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.12); }
.var { font-family: var(--mono); font-size: .92em; padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 4px; white-space: nowrap; }
.var.llena { background: var(--tinta); color: var(--blanco); border-color: var(--tinta); }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--azul); color: var(--blanco); font: 700 16px/1 var(--sans); text-decoration: none; cursor: pointer; transition: transform 250ms var(--curva), background 200ms, box-shadow 250ms; box-shadow: 0 10px 24px rgba(34,85,255,.28); -webkit-tap-highlight-color: transparent; }
.boton:hover { background: #1a47e6; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(34,85,255,.36); }
.boton:active { transform: scale(.97); }
.boton:focus-visible, input:focus-visible { outline: 3px solid var(--azul-vivo); outline-offset: 3px; }
.boton-claro { background: var(--blanco); color: var(--tinta); box-shadow: none; }
.boton-claro:hover { background: #e9ecff; box-shadow: none; }
.boton-contorno { background: transparent; color: var(--blanco); box-shadow: inset 0 0 0 1.5px var(--linea-oscura); }
.boton-contorno:hover { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.boton-contorno-oscuro { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.boton-contorno-oscuro:hover { background: var(--gris-claro); box-shadow: inset 0 0 0 1.5px var(--linea); }
.boton-grande { min-height: 60px; font-size: 17px; padding: 0 32px; }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.acciones-centro { justify-content: center; }

/* Portada */
.portada { position: relative; min-height: 100svh; padding-block: 56px 96px; overflow: clip; display: flex; flex-direction: column; }
.portada > .envoltura { width: 100%; z-index: 2; pointer-events: none; }
.portada a, .portada .barra { pointer-events: auto; }
.barra { display: flex; justify-content: space-between; align-items: center; }
.barra img { width: 108px; height: auto; }
.barra span { font-size: 14px; font-weight: 500; color: var(--gris); }
.portada-texto { margin-top: clamp(72px, 14vh, 140px); max-width: 640px; }
.portada-titulo { font-size: clamp(54px, 9vw, 112px); font-weight: 300; letter-spacing: -0.045em; line-height: .98; }
.portada-titulo .linea { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.portada-titulo b { font-weight: 900; font-style: italic; color: var(--azul); letter-spacing: -0.05em; padding-right: .06em; }
.portada-titulo .letra { display: inline-block; will-change: transform; }
.mensaje { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding: 14px 22px; border-radius: 22px 22px 22px 6px; font-size: 18px; line-height: 1.6; max-width: 100%; outline: 1.5px solid var(--linea); transform: rotate(-2.5deg); transform-origin: left center; }
.coma { margin-left: -8px; }
.cursor { display: inline-block; width: 2px; height: 1.15em; background: var(--tinta); animation: parpadeo 1s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.portada-datos { margin-top: 36px; font-size: 16px; font-weight: 500; color: var(--gris); }
.portada .boton { margin-top: 24px; }

/* Calcomanías de la portada */
.calcomanias { position: absolute; inset: 0; z-index: 1; }
.calco { position: absolute; left: var(--x); top: var(--y); width: var(--t, auto); translate: -50% -50%; pointer-events: none; user-select: none; -webkit-user-select: none; will-change: transform; }
.calco-capa { will-change: transform; }
.calco-cuerpo { rotate: var(--r); pointer-events: auto; touch-action: pan-y; cursor: grab; will-change: transform; }
.calco img, .calco svg { width: 100%; height: auto; display: block; pointer-events: none; -webkit-user-drag: none; }
.calco-flota .calco-flota-caja { animation: flota var(--dur, 6s) ease-in-out var(--delay, 0s) infinite alternate; }
.calco.arrastrando .calco-flota-caja { animation-play-state: paused; }
@keyframes flota { from { transform: translateY(-8px); } to { transform: translateY(8px); } }
.calco-chat { width: auto; }
.calco-chat .calco-cuerpo { display: flex; flex-direction: column; gap: 8px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.14)); }
.burbuja { background: #dcf8c6; color: var(--tinta); border: 4px solid var(--blanco); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-size: clamp(12px, 1.2vw, 15px); font-weight: 500; white-space: nowrap; }
.burbuja:nth-child(2) { background: var(--blanco); margin-left: 18px; border-color: var(--blanco); outline: 1px solid var(--linea); }
.burbuja small { font-size: .72em; color: var(--gris); margin-left: 6px; }
.calco-estrella { width: clamp(44px, 5vw, 72px); }
.calco-estrella .calco-cuerpo { filter: drop-shadow(0 8px 14px rgba(0,0,0,.16)); }
.calco-cursor { width: clamp(38px, 4.5vw, 62px); }
.calco-cursor .calco-cuerpo { filter: drop-shadow(0 8px 14px rgba(0,0,0,.16)); }
.calco-boleto { width: clamp(70px, 7vw, 100px); }
.calco-boleto .calco-cuerpo { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; border-radius: 22px; background: var(--azul); color: var(--blanco); border: 5px solid var(--blanco); box-shadow: 0 10px 24px rgba(0,0,0,.18); font-weight: 900; }
.calco-boleto span { font-size: clamp(28px, 3vw, 42px); line-height: 1; letter-spacing: -0.04em; }
.calco-boleto small { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.calco.arrastrando .calco-cuerpo, body.arrastrando-calco { cursor: grabbing; }


/* Posiciones de las calcomanías: escritorio a la derecha del texto, móvil arriba del texto */
.calco:nth-child(1) { --x: 77%; --y: 26%; --r: -10deg; --t: clamp(110px, 13vw, 190px); }
.calco:nth-child(2) { --x: 91%; --y: 50%; --r: 12deg;  --t: clamp(90px, 10vw, 150px); }
.calco:nth-child(3) { --x: 64%; --y: 76%; --r: -6deg;  --t: clamp(80px, 9vw, 130px); }
.calco:nth-child(4) { --x: 71%; --y: 44%; --r: 8deg;   --t: clamp(64px, 7vw, 110px); }
.calco:nth-child(5) { --x: 91%; --y: 85%; --r: -14deg; --t: clamp(70px, 8vw, 120px); }
.calco:nth-child(6) { --x: 58%; --y: 30%; --r: -4deg; }
.calco:nth-child(7) { --x: 60%; --y: 92%; --r: 14deg; }
.calco:nth-child(8) { --x: 82%; --y: 68%; --r: -8deg; }
.calco:nth-child(9) { --x: 77%; --y: 90%; --r: 6deg; }
@media (max-width: 820px) {
  .calco:nth-child(1) { --x: 79%; --y: 19%; --t: 104px; }
  .calco:nth-child(2) { --x: 18%; --y: 35%; --t: 92px; }
  .calco:nth-child(3) { --x: 14%; --y: 17%; --t: 76px; }
  .calco:nth-child(4) { --x: 51%; --y: 34%; --t: 76px; }
  .calco:nth-child(5) { --x: 84%; --y: 36%; --t: 86px; }
  .calco:nth-child(6) { --x: 43%; --y: 16%; }
  .calco:nth-child(7) { --x: 67%; --y: 26%; }
  .calco:nth-child(8) { --x: 34%; --y: 43%; }
  .calco:nth-child(9) { --x: 90%; --y: 27%; }
  .mensaje { font-size: 16px; gap: 6px; padding: 12px 18px; }
  .coma { margin-left: -6px; }
}

/* Chat */
.chat-seccion { background: var(--gris-claro); border-top: 1px solid var(--linea); }
.chat-pin { min-height: 100svh; display: flex; align-items: center; padding-block: 64px; }
.chat-envoltura { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 72px; align-items: center; width: 100%; }
.telefono { background: var(--blanco); border-radius: 36px; border: 8px solid var(--tinta); box-shadow: 0 30px 60px rgba(14,13,19,.18); overflow: hidden; height: min(640px, 76svh); display: flex; flex-direction: column; }
.telefono-barra { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--linea); background: var(--blanco); }
.telefono-barra img { width: 40px; height: 40px; border-radius: 12px; background: #eaf1ff; }
.telefono-barra b { display: block; font-size: 16px; }
.telefono-barra small { font-size: 12px; color: var(--gris); }
.chat-vista { position: relative; flex: 1; min-height: 0; background: #f6f7fb; overflow: hidden; }
.chat { list-style: none; margin: 0; padding: 18px 14px 64px; display: flex; flex-direction: column; gap: 10px; will-change: transform; }
.msj { align-self: flex-start; max-width: 86%; background: var(--blanco); border-radius: 18px 18px 18px 6px; padding: 10px 14px; font-size: 15px; line-height: 1.45; box-shadow: 0 1px 2px rgba(14,13,19,.08); transform-origin: left bottom; }
.msj-yo { align-self: flex-end; background: var(--azul); color: var(--blanco); border-radius: 18px 18px 6px 18px; transform-origin: right bottom; }
.tarjeta { padding: 14px 16px; border: 1px solid var(--linea); box-shadow: none; }
.tarjeta-etiqueta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--azul); }
.tarjeta-dato { font-size: 19px; font-weight: 900; letter-spacing: -0.02em; margin-top: 4px; }
.tarjeta-sub { font-size: 14px; color: var(--gris); margin-top: 2px; }
.tarjeta-enlace { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--azul); text-decoration: none; }
.escribiendo { position: absolute; left: 14px; bottom: 14px; display: flex; box-shadow: 0 1px 2px rgba(14,13,19,.08); gap: 4px; padding: 12px 14px; background: var(--blanco); border-radius: 18px; }
.escribiendo i { width: 7px; height: 7px; border-radius: 50%; background: var(--gris-oscuro); animation: punto 1s infinite ease-in-out; }
.escribiendo i:nth-child(2) { animation-delay: .15s; } .escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes punto { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Lugar */
.lugar { overflow: clip; }
.lugar-escena { margin-top: 64px; perspective: 1400px; }
.lugar-inclina { transform-style: preserve-3d; will-change: transform; max-width: 1000px; margin: 0 auto; }
.lugar-arte { position: relative; border-radius: 28px; overflow: hidden; background: #1d1d1b; padding: clamp(16px, 4vw, 48px); transform-style: preserve-3d; will-change: transform; }
.lugar-arte img { width: 100%; height: auto; }
.lugar-brillo { position: absolute; left: -30%; top: -30%; width: 160%; height: 160%; pointer-events: none; opacity: 0; will-change: transform, opacity; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.28) 0%, rgba(79,123,255,.14) 26%, rgba(255,255,255,0) 58%); mix-blend-mode: screen; }

/* Cuenta regresiva */
.cuenta { text-align: center; }
.reloj { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.reloj-celda { background: var(--gris-claro); border-radius: 28px; padding: clamp(18px, 3vw, 36px) 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow: hidden; }
.reloj-num { font-size: clamp(44px, 9vw, 120px); font-weight: 900; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; }
.reloj-celda:first-child .reloj-num { color: var(--azul); }
.reloj-txt { font-family: var(--mono); font-size: clamp(11px, 1.2vw, 14px); color: var(--gris); text-transform: uppercase; letter-spacing: .08em; }

/* Cinta del logo con stickers */
.cinta { overflow: hidden; background: var(--blanco); border-block: 1px solid var(--linea); padding-block: 24px; }
.cinta-pista { display: flex; gap: 48px; width: max-content; will-change: transform; }
.cinta-pista img { height: clamp(140px, 18vw, 240px); width: auto; }

/* Muro de confirmados */
.muro { list-style: none; margin: 56px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px 14px; }
.persona { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 104px; rotate: var(--r, 0deg); }
.persona-foto { width: 88px; height: 88px; border-radius: 50%; border: 4px solid var(--blanco); background: var(--color, #2255ff); box-shadow: 0 10px 24px rgba(0,0,0,.4); overflow: hidden; display: grid; place-items: center; font-weight: 900; font-size: 28px; color: var(--blanco); letter-spacing: -0.03em; }
.persona-foto img { width: 100%; height: 100%; object-fit: cover; }
.persona-nombre { font-size: 13px; font-weight: 500; text-align: center; line-height: 1.3; color: var(--gris-oscuro); }
.persona.yo .persona-foto { outline: 3px solid var(--azul-vivo); outline-offset: 3px; }

/* Confirmar */
.confirmar { background: radial-gradient(1200px 600px at 50% 0%, #eef2ff 0%, var(--blanco) 60%); }
.confirmar-caja { max-width: 640px; margin: 0 auto; text-align: center; }
.confirmar .subtitulo { margin-inline: auto; }
.formulario { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; text-align: left; }
.campo { display: flex; flex-direction: column; gap: 8px; }
.campo span { font-size: 14px; font-weight: 700; }
.campo input { height: 60px; border-radius: 18px; border: 1.5px solid var(--linea); padding: 0 20px; font: 400 18px var(--sans); color: var(--tinta); background: var(--blanco); transition: border-color 200ms, box-shadow 200ms; }
.campo input:focus { border-color: var(--azul); box-shadow: 0 0 0 5px rgba(34,85,255,.12); outline: none; }
.formulario-error { min-height: 1.4em; font-size: 14px; color: #d92d2d; font-weight: 500; }
.formulario .boton[disabled] { opacity: .6; cursor: progress; }
.confirmar-listo img { width: 150px; height: auto; margin: 0 auto 24px; }
.confirmar-listo .subtitulo { margin-inline: auto; }
.confirmar-intercambio { margin-top: 20px; background: var(--tinta); box-shadow: 0 10px 24px rgba(14,13,19,.25); }
.confirmar-intercambio:hover { background: #26252e; box-shadow: 0 14px 30px rgba(14,13,19,.3); }

/* Cierre */
.cierre { padding-block: 140px calc(140px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.cierre img { width: 120px; margin: 56px auto 0; }

/* Botón flotante en móvil */
.boton-flotante { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 20; display: none; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity 300ms, transform 300ms var(--curva); }
.boton-flotante.visible { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 820px) {
  .banda { padding-block: 80px; }
  .portada { padding-block: 32px 64px; }
  .portada-texto { margin-top: 44vh; }
  .portada .boton { display: none; }
  .boton-flotante { display: inline-flex; }
  .calco { --t: clamp(72px, 22vw, 120px); }
  .chat-envoltura { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .chat-intro .subtitulo { display: none; }
  .chat-pin { padding-block: 24px; }
  .telefono { height: min(560px, 68svh); border-width: 6px; border-radius: 30px; }
  .reloj { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .persona { width: 84px; }
  .persona-foto { width: 72px; height: 72px; font-size: 22px; }
  .acciones .boton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .calco-flota .calco-flota-caja, .escribiendo i { animation: none; }
  .boton { transition: none; }
  .lugar-brillo { display: none; }
}
