/* ==========================================================================
   PixelToCode — Páginas web. Las cuatro opciones van en cards que se apilan (como "Para quién" del Inicio)
   y cada una trae un dibujo que se mueve solo: la web que se recorre, la landing que recibe el
   WhatsApp, la tienda que vende a las 3 de la mañana y la agenda que se llena de turnos.
   Los dibujos se miden con el ancho propio (cqw), así se achican enteros en el celular.
   ========================================================================== */

/* Card con dibujo: el título y el pie a la izquierda, el dibujo a la derecha */
.card.con-vis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 4vw, 64px);
  row-gap: 32px;
}
.card.con-vis .titulo { grid-column: 1; grid-row: 1; font-size: clamp(36px, 6.4vw, 112px); }
.card.con-vis .card-pie { grid-column: 1; grid-row: 2; align-self: end; }
.card.con-vis .vis { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

.vis {
  position: relative;
  container-type: inline-size;
  perspective: 1400px;
  --giro: rotateY(-12deg) rotateX(4deg) rotate(1.5deg);
}
.vis > .marco {
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
}

/* ---------- Una página web: la ventana del navegador y la página que se recorre sola ---------- */

.vis-web { width: min(440px, 30vw, calc(50vh * 1.25)); }
.vis-web .marco {
  aspect-ratio: 5 / 4;
  display: flex;
  flex-direction: column;
  border-radius: 3cqw;
  background: #f6f5f2;
}
.vw-barra {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  height: 9cqw;
  padding: 0 3.5cqw;
  background: #e6e3dd;
}
.vw-barra i { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: #ff5f57; }
.vw-barra i:nth-child(2) { background: #febc2e; }
.vw-barra i:nth-child(3) { background: #28c840; }
.vw-barra span {
  flex: 1;
  margin-left: 3cqw;
  height: 5.4cqw;
  padding: 0 3cqw;
  border-radius: 3cqw;
  background: #fff;
  font: 500 2.9cqw/5.4cqw system-ui, sans-serif;
  color: #666;
}
.vw-pantalla { position: relative; flex: 1; overflow: hidden; color: #0a0a0a; }
/* Baja hasta el final de la página (su alto menos lo que se ve: 80cqw del marco menos 9 de la barra) */
.vw-pagina { padding-bottom: 6cqw; animation: vw-recorre 9s ease-in-out infinite; }
@keyframes vw-recorre {
  0%, 16%  { transform: translateY(0); }
  46%, 66% { transform: translateY(calc(-100% + 71cqw)); }
  96%, 100% { transform: translateY(0); }
}
.vw-hero {
  position: relative;
  height: 50cqw;
  padding: 6cqw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 1.6cqw;
  color: #f2efe9;
  background: #172024;
}
.vw-hero > * { position: relative; }
.vw-hero .vw-local { position: absolute; inset: 0; width: 100%; height: 100%; }
.vw-local text { font: 800 2.6px/1 var(--cuerpo); fill: #0a0a0a; letter-spacing: .04em; }
.vw-hero b { font: 800 9cqw/.95 var(--titulo); text-transform: uppercase; }
.vw-hero small { font: 500 3.3cqw/1.3 var(--cuerpo); opacity: .9; }
.vw-hero em {
  margin-top: 1.6cqw;
  padding: 2.2cqw 4.4cqw;
  border-radius: 99px;
  background: var(--verde);
  color: #0a0a0a;
  font: 700 3.3cqw/1 var(--cuerpo);
  font-style: normal;
}
.vw-resenas { display: flex; align-items: center; gap: 1.4cqw; padding: 4.5cqw 6cqw 0; font: 500 3.3cqw/1 var(--cuerpo); color: #555; }
.vw-resenas span { color: #f5b301; letter-spacing: .1em; }
.vw-resenas b { color: #0a0a0a; }
.vw-servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; padding: 4.5cqw 6cqw 0; }
.vw-servicios div { display: grid; align-content: start; gap: 2.4cqw; padding: 3.6cqw; border-radius: 2.4cqw; background: #fff; box-shadow: 0 .4cqw 1.6cqw rgba(0, 0, 0, .06); }
.vw-servicios i { display: grid; place-items: center; width: 8cqw; height: 8cqw; border-radius: 50%; background: #d6f3f8; color: #0e7490; }
.vw-servicios svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vw-servicios b { font: 700 3.1cqw/1.2 var(--cuerpo); }
.vw-mapa { display: grid; grid-template-columns: 42% 1fr; align-items: center; gap: 4cqw; margin: 4.5cqw 6cqw 0; padding: 2.4cqw; border-radius: 2.4cqw; background: #fff; box-shadow: 0 .4cqw 1.6cqw rgba(0, 0, 0, .06); }
.vw-mapa svg { display: block; width: 100%; aspect-ratio: 10 / 7; border-radius: 1.6cqw; }
.vw-mapa div { display: grid; gap: 1.4cqw; }
.vw-mapa b { font: 800 4cqw/1 var(--titulo); text-transform: uppercase; }
.vw-mapa small { font: 500 3.1cqw/1.2 var(--cuerpo); color: #555; }
.vw-mapa em { font: 700 3.1cqw/1.2 var(--cuerpo); font-style: normal; color: #0e7490; }
.vw-pulso { transform-origin: 50px 40px; animation: vw-pulso 2.4s ease-out infinite; }
@keyframes vw-pulso {
  0%   { transform: scale(.4); opacity: .6; }
  100% { transform: scale(1.6); opacity: 0; }
}
/* El botón de WhatsApp que acompaña toda la página */
.vw-wa {
  position: absolute;
  right: 4cqw; bottom: 4cqw;
  display: grid;
  place-items: center;
  width: 10cqw; height: 10cqw;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .25);
}
.vw-wa svg { width: 58%; height: 58%; }

/* ---------- Una landing: una promo, un botón que se toca y el WhatsApp que llega ---------- */

.vis-landing { width: min(250px, 19vw, calc(52vh * .5)); }
.vis-landing .marco {
  aspect-ratio: 1 / 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4cqw;
  padding: 16cqw 8cqw 10cqw;
  border: 3cqw solid #1c1c1c;
  border-radius: 14cqw;
  background: #f6f5f2;
  color: #0a0a0a;
}
.vl-etiqueta {
  padding: 2cqw 4cqw;
  border-radius: 99px;
  background: #0a0a0a;
  color: var(--cian);
  font: 700 4.6cqw/1 var(--cuerpo);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.vl-titulo { font: 800 13cqw/.92 var(--titulo); text-transform: uppercase; }
.vl-titulo span { color: var(--cian); }
.vl-bajada { font: 500 5cqw/1.25 var(--cuerpo); color: #444; }
.vl-foto {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 6cqw;
  overflow: hidden;
  background: #0a0e0f;
}
.vl-foto svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vl-foto text { font: 800 9px/1 var(--titulo); fill: #f2efe9; opacity: .85; }
.vl-foto text.chico { font-size: 7px; fill: #0a0a0a; opacity: .7; }
.vl-sello {
  position: absolute;
  top: 4cqw; right: 4cqw;
  display: grid;
  place-items: center;
  width: 21cqw; height: 21cqw;
  border-radius: 50%;
  background: var(--cian);
  color: #0a0a0a;
  font: 800 7.6cqw/1 var(--titulo);
  font-style: normal;
  text-transform: uppercase;
  transform: rotate(-12deg);
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .4);
}
.vl-precio { display: flex; align-items: baseline; gap: 2cqw; white-space: nowrap; }
.vl-precio b { font: 800 9.4cqw/1 var(--titulo); }
.vl-precio small { font: 600 4.4cqw/1 var(--cuerpo); color: #555; }
.vl-boton {
  position: relative;
  width: 100%;
  padding: 6cqw 0;
  border-radius: 99px;
  background: var(--verde);
  color: #0a0a0a;
  font: 800 6.4cqw/1 var(--cuerpo);
  text-align: center;
  animation: vl-late 6s ease-in-out infinite;
}
.vl-toque {
  position: absolute;
  left: 50%; top: 50%;
  width: 16cqw; height: 16cqw;
  margin: -8cqw 0 0 -8cqw;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  opacity: 0;
  animation: vl-toque 6s ease-out infinite;
}
.vl-quedan { align-self: center; font: 600 4.6cqw/1 var(--cuerpo); color: #6b6b6b; }
.vl-quedan i { display: inline-block; width: 2.4cqw; height: 2.4cqw; margin: 0 1.6cqw .3cqw 0; border-radius: 50%; background: #ef4444; vertical-align: middle; }
.vl-num { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; color: #0a0a0a; }
.vl-num span { display: block; animation: vl-cuenta 6s ease-in-out infinite; }
@keyframes vl-cuenta {
  0%, 58%   { transform: translateY(0); }
  63%, 94%  { transform: translateY(-100%); }
  99%, 100% { transform: translateY(0); }
}
@keyframes vl-late {
  0%, 20%, 40%, 100% { transform: scale(1); }
  10%, 30% { transform: scale(1.04); }
  44% { transform: scale(.96); }
  50% { transform: scale(1); }
}
@keyframes vl-toque {
  0%, 42% { opacity: 0; transform: scale(.3); }
  44% { opacity: .9; transform: scale(.4); }
  56%, 100% { opacity: 0; transform: scale(2.4); }
}
/* El WhatsApp que llega después del toque */
.aviso {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 3cqw;
  align-items: flex-start;
  padding: 3.6cqw 4cqw;
  border-radius: 5cqw;
  background: rgba(250, 250, 250, .95);
  color: #111;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0;
}
.aviso-icono {
  flex: none;
  display: grid;
  place-items: center;
  width: 11cqw; height: 11cqw;
  border-radius: 3cqw;
  background: var(--verde);
  color: #fff;
}
.aviso-icono svg { width: 65%; height: 65%; }
.aviso b { display: flex; justify-content: space-between; gap: 3cqw; font-size: 4.6cqw; }
.aviso b small { font-weight: 400; color: #8a8a8a; }
.aviso p { font-size: 4.6cqw; line-height: 1.3; color: #333; }
.vis-landing .aviso { left: -14cqw; right: -14cqw; top: 9cqw; animation: aviso-cae 6s ease-in-out infinite; }
@keyframes aviso-cae {
  0%, 56%   { opacity: 0; transform: translateY(-6cqw) scale(.96); }
  62%, 92%  { opacity: 1; transform: none; }
  98%, 100% { opacity: 0; transform: translateY(-6cqw) scale(.96); }
}

/* ---------- Una tienda online: los productos y la venta que entra a las 3 de la mañana ---------- */

.vis-tienda { width: min(420px, 29vw, calc(50vh * 1.1)); --giro: rotateY(12deg) rotateX(4deg) rotate(-1.5deg); }
.vis-tienda .marco {
  aspect-ratio: 1.1 / 1;
  padding: 6cqw;
  border-radius: 4cqw;
  background: #f6f5f2;
  color: #0a0a0a;
}
.vt-cabeza { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5cqw; }
.vt-cabeza b { font: 800 7cqw/1 var(--titulo); text-transform: uppercase; }
.vt-cabeza b span { color: var(--cian); }
.vt-carrito { position: relative; width: 9cqw; height: 9cqw; }
.vt-carrito svg { width: 100%; height: 100%; }
.vt-carrito i {
  position: absolute;
  right: -2cqw; top: -2cqw;
  min-width: 5.4cqw; height: 5.4cqw;
  padding: 0 1.2cqw;
  border-radius: 99px;
  background: var(--cian);
  color: #0a0a0a;
  font: 800 3.4cqw/5.4cqw var(--cuerpo);
  font-style: normal;
  text-align: center;
  animation: vt-salta 5s ease-in-out infinite;
}
@keyframes vt-salta {
  0%, 54%, 66%, 100% { transform: scale(1); }
  58% { transform: scale(1.45); }
}
.vt-grilla { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4cqw; }
.vt-prod { display: grid; gap: 1.2cqw; }
.vt-foto { aspect-ratio: 4 / 3; border-radius: 3cqw; background: radial-gradient(circle at 50% 38%, #f7f5f1, #e0dcd3); }
.vt-foto.b { background: radial-gradient(circle at 50% 38%, #eefafc, #cbe9ef); }
.vt-foto.c { background: radial-gradient(circle at 50% 38%, #faf5ec, #e7dcc7); }
.vt-foto svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 .8cqw 1cqw rgba(0, 0, 0, .18)); }
.vt-prod b { font: 700 3.8cqw/1.2 var(--cuerpo); }
.vt-prod small { font: 600 3.6cqw/1 var(--cuerpo); color: #6b6b6b; }
.vis-tienda .aviso { left: -6cqw; right: 18cqw; bottom: -5cqw; animation: venta 5s ease-in-out infinite; }
.vis-tienda .aviso-icono { background: var(--cian); color: #0a0a0a; font: 800 6cqw/1 var(--titulo); }
@keyframes venta {
  0%, 40%   { opacity: 0; transform: translateY(6cqw) scale(.96); }
  48%, 90%  { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; transform: translateY(6cqw) scale(.96); }
}

/* ---------- ¿Otra idea?: una agenda de turnos que se va llenando sola ---------- */

.vis-idea { width: min(420px, 29vw, calc(50vh * 1.2)); }
.vis-idea .marco {
  aspect-ratio: 1.2 / 1;
  display: flex;
  flex-direction: column;
  gap: 3cqw;
  padding: 6cqw;
  border-radius: 4cqw;
  background: #161616;
  border: 1px solid #2c2c2c;
}
.vi-cabeza { display: flex; justify-content: space-between; align-items: baseline; }
.vi-cabeza b { font: 800 7cqw/1 var(--titulo); text-transform: uppercase; }
.vi-cabeza small { font: 600 3.8cqw/1 var(--cuerpo); color: var(--tenue); }
.vi-dias, .vi-grilla { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2.4cqw; }
.vi-dias span { font: 700 3.4cqw/1 var(--cuerpo); color: var(--tenue); text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.vi-grilla { flex: 1; grid-template-rows: repeat(4, 1fr); }
.vi-grilla i { border-radius: 2cqw; background: #242424; }
.vi-grilla i[style] { animation: vi-llena 10s ease-in-out infinite; animation-delay: calc(var(--d) * .4s); }
@keyframes vi-llena {
  0%, 4%    { background: #242424; transform: scale(1); }
  7%        { background: var(--cian); transform: scale(1.12); }
  10%, 80%  { background: var(--cian); transform: scale(1); }
  86%, 100% { background: #242424; transform: scale(1); }
}
.vi-pie { display: flex; align-items: center; gap: 2cqw; font: 600 3.8cqw/1 var(--cuerpo); color: var(--texto-suave); }
.vi-pie i { width: 3cqw; height: 3cqw; border-radius: 50%; background: var(--cian); }

/* ---------- Celular: el dibujo va entre el título y el pie, más chico ---------- */

@media (max-width: 760px) {
  .card.con-vis { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 20px; }
  .card.con-vis .titulo { font-size: 8.2vw; }
  .card.con-vis .vis { grid-column: 1; grid-row: 2; justify-self: center; }
  .card.con-vis .card-pie { grid-row: 3; }
  .vis-web, .vis-tienda, .vis-idea, .vis-landing { width: min(250px, 66vw, 26vh * 1.2); }
  /* La landing parada no entra: en el celular va apaisada, sin la bajada ni la foto */
  .vis-landing .marco { aspect-ratio: 1.2 / 1; gap: 3cqw; padding: 7cqw; border-width: 2cqw; border-radius: 7cqw; }
  .vis-landing .vl-bajada, .vis-landing .vl-foto, .vis-landing .vl-quedan { display: none; }
  .vis-landing .vl-titulo { font-size: 11cqw; }
  .vis-landing .vl-boton { padding: 5cqw 0; }
  .vis-landing .aviso { left: 8cqw; right: 8cqw; top: -6cqw; }
  .vis { --giro: rotate(0deg); }
}
/* Pantallas bajas: si el dibujo no entra, la card queda con el título y el botón */
@media (max-width: 760px) and (max-height: 640px) {
  .card.con-vis .vis { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vw-pagina, .vw-pulso, .vl-boton, .vl-toque, .vl-num span, .vt-carrito i, .vi-grilla i[style] { animation: none; }
  .vis-landing .aviso, .vis-tienda .aviso { animation: none; opacity: 1; }
  .vi-grilla i[style] { background: var(--cian); }
}
