/* Página de venta de Barbero App.
   Página: negro, blanco y grises. Teléfono: los colores reales de la app (src/constants/theme.ts). */

:root {
  --negro: #000;
  --casi-negro: #0b0b0d;
  --gris-1: #1a1a1d;
  --gris-2: #2a2a2d;
  --gris-3: #6b6f76;
  --gris-4: #9a9ea5;
  --gris-5: #c9c9ce;
  --blanco: #fff;

  /* App */
  --app-texto: #0b0b0d;
  --app-suave: #6b6f76;
  --app-tenue: #9a9ea5;
  --app-superficie: #f4f5f7;
  --app-borde: #e7e8eb;
  --app-azul: #1f6feb;
  --app-azul-suave: #e8f0fe;
  --app-verde: #1fa36a;
  --app-verde-suave: #e5f6ee;
  --app-rojo: #e5484d;
  --app-rojo-suave: #fdecec;

  --letra: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --alto: 100vh;
}
@supports (height: 100svh) {
  :root { --alto: 100svh; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--negro); color: var(--blanco); font-family: var(--letra); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { background: var(--negro); overflow-x: hidden; }
img, svg, canvas { display: block; }

/* ---------- Cabecera ---------- */
.cabecera {
  position: fixed; top: 0; left: 0; z-index: 30;
  padding: clamp(14px, 2.4vw, 28px) clamp(16px, 3vw, 40px);
  pointer-events: none;
}
.cabecera-logo { height: clamp(34px, 4.2vw, 48px); width: auto; opacity: .92; }

/* ---------- Recorrido ---------- */
.recorrido { position: relative; height: calc(var(--alto) * 13); }
.escenario { position: sticky; top: 0; height: var(--alto); width: 100%; overflow: hidden; background: var(--negro); }

/* El video cubre la pantalla, pero nunca se agranda más del doble (2560 px de ancho). */
.video {
  position: absolute; left: 50%; top: 50%;
  width: min(max(100vw, calc(var(--alto) * 16 / 9)), 2560px);
  aspect-ratio: 16 / 9;
  translate: -50% -50%;
  transform-origin: 50% 58%;
  will-change: transform;
}
.video .poster, .video canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Si el video quedó más chico que la pantalla, sus bordes se funden con el negro. */
@media (min-width: 2561px), (min-height: 1441px) {
  .video {
    -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 62%, transparent 100%);
  }
}

.capa { position: absolute; inset: 0; pointer-events: none; }
.luz {
  background: radial-gradient(ellipse 45% 60% at 50% 55%, rgba(255, 250, 240, .55), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: soft-light;
  opacity: 0;
}
.sombra { background: #000; opacity: .35; }
.vineta {
  background:
    radial-gradient(ellipse 85% 80% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .75) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .7));
}
@media (min-width: 1600px) {
  .vineta {
    background:
      radial-gradient(ellipse 80% 75% at 50% 50%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .9) 100%),
      linear-gradient(to bottom, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, .75));
  }
}

/* ---------- Reloj ---------- */
.reloj {
  position: absolute; left: 50%; top: 40%;
  translate: -50% -50%;
  display: flex;
  font-size: clamp(5.5rem, 19vw, 15rem);
  font-weight: 200; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .6);
}
.reloj span { display: inline-block; }
.reloj .dos-puntos { margin: 0 .02em; translate: 0 -.06em; opacity: .8; }
.reloj .cambia { animation: cambia .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes cambia {
  from { opacity: 0; transform: translateY(.18em); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- Frases ---------- */
.frase {
  position: absolute;
  left: clamp(20px, 7vw, 120px);
  bottom: clamp(56px, 14vh, 160px);
  max-width: min(12ch, 44vw);
  font-size: clamp(2.4rem, 5.4vw, 5.6rem);
  font-weight: 600; letter-spacing: -.035em; line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .55);
  opacity: 0;
  will-change: opacity, transform;
}
.frase-reloj {
  left: 50%; bottom: auto; top: 62%;
  max-width: none; text-align: center;
  font-size: clamp(1.6rem, 3.4vw, 3rem); font-weight: 500; letter-spacing: -.02em;
  color: var(--gris-5);
  translate: -50% 0;
}
.frase-control { max-width: min(36vw, 560px); }
.frase-control > p:first-child { max-width: 12ch; }
.indice { list-style: none; margin-top: clamp(20px, 3.4vh, 36px); display: grid; gap: 6px; }
.indice li {
  font-size: clamp(1rem, 1.4vw, 1.3rem); font-weight: 500; letter-spacing: 0;
  color: var(--gris-3);
  transition: color .35s, transform .35s;
  display: flex; align-items: center; gap: 12px;
}
.indice li::before { content: ""; width: 18px; height: 1px; background: currentColor; transition: width .35s; }
.indice li.activo { color: var(--blanco); }
.indice li.activo::before { width: 36px; }
.nota { margin-top: 18px; font-size: .8rem; font-weight: 400; letter-spacing: .02em; color: var(--gris-4); text-shadow: none; }

/* ---------- Cierre ---------- */
.cierre {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding: 0 20px;
  opacity: 0;
}
.cierre-logo { height: clamp(84px, 13vh, 132px); width: auto; margin-bottom: 10px; filter: drop-shadow(0 10px 40px rgba(31, 111, 235, .25)); }
.cierre-marca { font-size: clamp(2.6rem, 7.5vw, 6.5rem); font-weight: 700; letter-spacing: .14em; line-height: 1; margin-right: -.14em; }
.cierre-lema { font-size: clamp(1.05rem, 2vw, 1.6rem); color: var(--gris-5); letter-spacing: .01em; }

/* ---------- Avisos de la escena 5 ---------- */
.avisos {
  position: absolute; right: clamp(16px, 3vw, 44px); top: clamp(76px, 12vh, 120px);
  display: grid; gap: 10px; width: min(360px, calc(100vw - 32px));
}
.aviso {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: rgba(22, 22, 24, .62);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0;
}
.aviso-icono { width: 26px; height: 38px; object-fit: contain; flex: none; margin: 0 4px; }
.aviso-titulo { font-size: .98rem; font-weight: 600; }
.aviso-texto { font-size: .86rem; color: var(--gris-5); margin-top: 1px; }

/* ---------- Indicador de scroll ---------- */
.desliza {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gris-4);
}
.desliza i { width: 1px; height: 38px; background: linear-gradient(var(--gris-4), transparent); animation: baja 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes baja { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Teléfono ---------- */
.telefono-pos {
  position: absolute; left: 50%; top: 50%;
  translate: -50% -50%;
  opacity: 0;
  will-change: transform, opacity;
}
.telefono {
  --b: calc(var(--tw, 300px) * .036);
  position: relative;
  width: var(--tw, 300px);
  padding: var(--b);
  border-radius: calc(var(--tw, 300px) * .155);
  background: #050505;
  box-shadow:
    0 0 0 1.5px #3a3a3e,
    0 0 0 3px #111,
    0 40px 120px rgba(0, 0, 0, .7),
    0 10px 30px rgba(0, 0, 0, .5);
}
.isla {
  position: absolute; z-index: 5; left: 50%; top: calc(var(--b) + var(--tw, 300px) * .03);
  translate: -50% 0;
  width: 30%; height: calc(var(--tw, 300px) * .085);
  background: #000; border-radius: 999px;
}
.pantalla-app {
  position: relative; overflow: hidden;
  width: calc(var(--tw, 300px) - 2 * var(--b));
  aspect-ratio: 390 / 844;
  border-radius: calc(var(--tw, 300px) * .12);
  background: #fff;
}
/* Cada vista mide 390 × 844 (un iPhone) y se escala para caber en el teléfono. */
.vista {
  position: absolute; left: 0; top: 0;
  width: 390px; height: 844px;
  transform-origin: 0 0;
  transform: scale(var(--k, .7));
  opacity: 0;
  color: var(--app-texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fff;
}
.vista.visible { opacity: 1; }

.estado {
  height: 54px; padding: 18px 30px 0 36px;
  display: flex; justify-content: space-between; align-items: flex-start;
  font-size: 16px; font-weight: 600; line-height: 20px;
}
/* Señal, wifi y batería (dibujo en index.html, #i-estado), centrados con la hora. */
.estado-iconos { width: 68px; height: 13px; margin-top: 3.5px; }
.estado-claro { color: #fff; }

/* Pantalla bloqueada */
.bloqueo { background: radial-gradient(ellipse 120% 70% at 50% 0%, #2b2b30, #0c0c0e 70%); color: #fff; }
.bloqueo-fecha { text-align: center; margin-top: 30px; font-size: 19px; font-weight: 500; color: rgba(255, 255, 255, .8); }
.bloqueo-hora { text-align: center; font-size: 92px; font-weight: 600; letter-spacing: -2px; line-height: 1.05; }
.notis { position: absolute; left: 14px; right: 14px; top: 300px; display: grid; gap: 10px; }
.noti {
  display: flex; gap: 12px; align-items: center;
  padding: 14px; border-radius: 22px;
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  opacity: 0; transform: translateY(-12px) scale(.98);
  transition: opacity .45s cubic-bezier(.2, .7, .2, 1), transform .45s cubic-bezier(.2, .7, .2, 1);
}
.noti.visible { opacity: 1; transform: none; }
.noti-icono { width: 38px; height: 38px; object-fit: contain; padding: 4px; border-radius: 10px; background: #0c0c0c; flex: none; }
.noti-cuerpo { flex: 1; }
.noti-app { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: rgba(255, 255, 255, .7); display: flex; justify-content: space-between; }
.noti-app span { font-weight: 400; letter-spacing: 0; }
.noti-titulo { font-size: 16px; font-weight: 600; margin-top: 2px; }
.noti-texto { font-size: 15px; color: rgba(255, 255, 255, .85); }

/* Pantallas de la app */
.contenido { padding: 6px 16px 16px; display: grid; gap: 12px; align-content: start; }
.titulo-app { font-size: 26px; font-weight: 700; margin: 4px 0 4px; }
.encabezado-app { height: 52px; display: flex; align-items: center; padding: 0 16px; }
.encabezado-app .ic { width: 24px; height: 24px; }
.encabezado-app span { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.encabezado-app i { width: 24px; }
.ic { width: 20px; height: 20px; flex: none; color: var(--app-texto); }
.ic.gris { color: var(--app-suave); }
.ic.tenue { color: var(--app-tenue); width: 18px; height: 18px; }
.ic.verde { color: var(--app-verde); width: 22px; height: 22px; }
.ic.rojo { color: var(--app-rojo); }
.ic.blanco { color: #fff; }
.suave { font-size: 13px; color: var(--app-suave); }
.nombre { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.crece { flex: 1; display: grid; gap: 2px; }
.link { font-size: 13px; color: var(--app-azul); font-weight: 600; margin-top: 2px; }
.azul-texto { font-size: 13px; color: var(--app-azul); }

.semana { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dia { flex: 1; display: grid; justify-items: center; gap: 6px; }
.dia span { font-size: 13px; color: var(--app-suave); }
.dia span.azul { color: var(--app-azul); }
.dia b { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; font-weight: 600; }
.dia b.activo { background: var(--app-azul); color: #fff; }
.punto { width: 5px; height: 5px; border-radius: 3px; }
.punto.lleno { background: var(--app-tenue); }
.punto.azulado { background: var(--app-azul); }
.subtitulo-app { font-size: 15px; font-weight: 700; margin-bottom: 0; }

.fila-agenda { display: flex; align-items: center; gap: 12px; }
.hora { width: 46px; font-size: 13px; font-weight: 500; }
.tarjeta-agenda {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 12px; min-height: 58px;
  border: 1px solid var(--app-borde); border-radius: 12px;
}
.tarjeta-agenda.proxima { border-left: 3px solid var(--app-azul); }
.tarjeta-agenda.libre { border-style: dashed; background: var(--app-superficie); }
.mas { width: 28px; height: 28px; border-radius: 14px; background: var(--app-azul); display: grid; place-items: center; }
.etiqueta { border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.etiqueta.grande { font-size: 13px; padding: 5px 12px; }
.etiqueta-azul { background: var(--app-azul-suave); color: var(--app-azul); }
.etiqueta-verde { background: var(--app-verde-suave); color: var(--app-verde); }
.etiqueta-roja { background: var(--app-rojo-suave); color: var(--app-rojo); }

.tarjeta { border: 1px solid var(--app-borde); border-radius: 16px; padding: 16px; display: grid; gap: 12px; background: #fff; }
.titulo-tarjeta { font-size: 15px; font-weight: 700; }
.cabecera-reserva { display: flex; align-items: center; justify-content: space-between; }
.cliente { font-size: 24px; font-weight: 700; }
.linea { display: flex; gap: 12px; align-items: center; }
.texto { font-size: 15px; font-weight: 500; }
.fila-monto { display: flex; justify-content: space-between; align-items: center; }
.valor { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fuerte { font-size: 15px; font-weight: 700; color: var(--app-texto); }
.boton-app { height: 52px; border-radius: 999px; background: var(--app-texto); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 600; }
.boton-app.suave { background: var(--app-superficie); color: var(--app-texto); }

.alerta { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; background: var(--app-rojo-suave); color: var(--app-rojo); font-size: 13px; font-weight: 600; }
.tarjeta-cliente { display: flex; align-items: center; gap: 12px; border: 1px solid var(--app-borde); border-radius: 16px; padding: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--app-superficie); display: grid; place-items: center; font-size: 17px; font-weight: 700; color: var(--app-suave); flex: none; }

.periodos { display: flex; background: var(--app-superficie); border-radius: 999px; padding: 4px; }
.periodos span { flex: 1; text-align: center; padding: 8px 0; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--app-suave); }
.periodos span.activo { background: var(--app-texto); color: #fff; }
.total { padding: 16px; border-radius: 16px; background: var(--app-azul-suave); }
.total .suave { display: flex; align-items: center; justify-content: space-between; }
.ejemplo { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--app-azul); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; }
.monto { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }

.barra {
  position: absolute; left: 0; right: 0; bottom: 0; height: 84px;
  border-top: 1px solid var(--app-borde); background: #fff;
  display: flex; padding: 8px 6px 0;
}
.barra .pestana { flex: 1; display: grid; justify-items: center; align-content: start; gap: 3px; font-size: 11px; font-weight: 500; color: var(--app-tenue); }
.barra .pestana svg { width: 24px; height: 24px; }
.barra .pestana.activa { color: var(--app-texto); }

/* ---------- Descarga ---------- */
.descarga {
  position: relative;
  min-height: 72vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; text-align: center;
  padding: 90px 16px 80px;
  background: linear-gradient(#000, #0b0b0d);
  border-top: 1px solid var(--gris-1);
}
.descarga-logo { width: min(240px, 52vw); height: auto; }
.descarga h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 600; letter-spacing: -.03em; }
.tiendas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.tienda {
  display: flex; align-items: center; gap: 12px;
  min-width: 210px; padding: 12px 22px 12px 18px;
  border-radius: 14px; border: 1px solid #3a3a3e;
  background: #fff; color: #000; text-decoration: none; text-align: left;
  transition: transform .2s, background .2s;
}
.tienda:hover { transform: translateY(-2px); }
.tienda:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.tienda-icono { width: 28px; height: 28px; flex: none; }
.tienda span { display: grid; line-height: 1.15; }
.tienda small { font-size: .74rem; font-weight: 500; letter-spacing: .02em; }
.tienda b { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.tienda.pronto { background: transparent; color: var(--gris-5); cursor: default; }
.tienda.pronto:hover { transform: none; }
.tienda.pronto small { color: var(--blanco); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.contacto { color: var(--gris-4); font-size: 1rem; }
.contacto a { color: var(--blanco); text-underline-offset: 3px; }

/* ---------- Teléfono vertical y pantallas angostas ---------- */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .frase {
    left: 20px; right: 20px;
    bottom: auto; top: calc(var(--alto) * .13);
    max-width: 14ch;
    font-size: clamp(2.1rem, 9.6vw, 3.6rem);
  }
  .frase-reloj { left: 50%; right: auto; top: 60%; max-width: none; font-size: clamp(1.4rem, 6vw, 2rem); }
  .frase-control { max-width: none; top: calc(var(--alto) * .1); }
  .frase-control > p:first-child { font-size: clamp(1.6rem, 7vw, 2.6rem); max-width: 16ch; }
  .indice { display: flex; gap: 14px; margin-top: 14px; }
  .indice li { font-size: .9rem; }
  .indice li::before { display: none; }
  .nota { display: none; }
  .avisos { left: 16px; right: 16px; width: auto; top: auto; bottom: 22px; gap: 8px; }
  .aviso { padding: 9px 12px 9px 8px; border-radius: 14px; gap: 8px; }
  .aviso-icono { width: 20px; height: 28px; }
  .aviso-titulo { font-size: .88rem; }
  .aviso-texto { font-size: .78rem; }
  .cierre-marca { font-size: clamp(1.9rem, 9vw, 3rem); letter-spacing: .1em; margin-right: -.1em; }
  .reloj { top: 42%; }
}

/* ---------- Versión sin animación ---------- */
.quieta { display: none; }
.quieto .recorrido { display: none; }
.quieto .quieta { display: block; }
.quieto .cabecera { position: absolute; }
.quieta .bloque {
  position: relative; min-height: 86vh;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 100px clamp(20px, 7vw, 120px) 70px;
  isolation: isolate;
  overflow: hidden;
}
.quieta .fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.quieta .bloque::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 85% 80% at 50% 50%, rgba(0, 0, 0, .25) 40%, rgba(0, 0, 0, .85)); }
.quieta h2, .quieta .q-grande { font-size: clamp(2.2rem, 5.4vw, 5rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.03; max-width: 14ch; }
.quieta .reloj-quieto { font-size: clamp(4.5rem, 15vw, 11rem); font-weight: 200; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.quieta .q-gris { color: var(--gris-5); font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 500; }
.quieta .telefonos { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.quieta .telefonos figure { display: grid; gap: 12px; justify-items: center; }
.quieta .telefonos figcaption { color: var(--gris-4); font-size: .95rem; }
.quieta .telefono .vista { opacity: 0; }
.quieta .telefono .vista.visible { opacity: 1; }
.quieta .lista-avisos { display: grid; gap: 10px; width: min(360px, 100%); }
.quieta .lista-avisos .aviso { opacity: 1; }
.quieta .centro { align-items: center; text-align: center; }
.quieta .centro .q-grande { max-width: 18ch; }
