/* ==========================================================================
   La portada de personas (/) · rescate del 10-nov-2026 (sobre la Fase 3)
   views/pages/public/pricing.ejs · public/js/red-viva.js · public/js/portada.js

   Solo tokens de brand.css y sistema.css; ni un #RRGGBB aquí.
     cian = tu red · rosa = se enfría · morado = Shiver (solo cuando entra él)
     --sn-grad (rosa → azul): UN elemento por pantalla, el botón de reserva.
       En la red, el degradado es el hilo que se enfría (lo pinta el lienzo).
   Ritmo: la primera pantalla entera sin bajar; después, secciones con
   80–120 px de aire que alternan fondo plano y superficie elevada.
   ========================================================================== */

/* Aquí no manda «una pantalla por bloque» (pricing.css): solo la primera. */
main.pr.pt > section { min-height: 0; scroll-snap-align: none; display: block; }
html:has(main.pt) { scroll-snap-type: none; }

.pt { --pt-aire: clamp(80px, 12vh, 120px); --pt-ancho: 1120px; }
.pt-wrap { max-width: var(--pt-ancho); margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.pt-wrap--texto { max-width: 720px; }
.pt-sec { padding: var(--pt-aire) 0; }
.pt-sec--alta { background: var(--sn-surface); border-block: 1px solid var(--sn-line); }
.pt-h2 {
  margin: 0 0 16px; max-width: 22ch;
  font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -0.028em; font-weight: 500; text-wrap: balance;
}
.pt-lede { margin: 0 0 40px; max-width: 60ch; font-size: 20px; line-height: 1.5; color: var(--sn-muted); }
.pt-centro { margin: 40px 0 0; text-align: center; }
.pt-kicker {
  margin: 0 0 14px; font: 400 13px/1.2 var(--sn-font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sn-accent);
}
.pt-ejemplo {
  flex: none; font: 400 12px/1 var(--sn-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sn-muted);
  padding: 6px 8px; border: 1px solid var(--sn-line); border-radius: 6px;
}
.pt-ejemplo--suelto { display: inline-block; }

/* ---- LA PRIMERA PANTALLA: mensaje + red, sin bajar ------------------------ */
.pt-pantalla {
  box-sizing: border-box; min-height: calc(100svh - var(--header-h, 64px));
  display: flex; flex-direction: column;
}
.pt-hero {
  flex: none; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(20px, 5vh, 56px) 16px clamp(14px, 2.4vh, 24px); gap: clamp(10px, 1.8vh, 18px);
}
.pt .pt-h1 { margin: 0; max-width: 16ch; font-weight: 500; font-size: min(clamp(40px, 7vw, 84px), 11vh); }
.pt-sub { margin: 0; max-width: 46ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; color: var(--sn-muted); text-wrap: balance; }
.pt-acciones { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 20px; margin-top: 4px; }
.pt-gratis {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 4px;
  color: var(--sn-text); font-size: 17px; text-decoration: underline; text-decoration-color: var(--sn-muted);
  text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.pt-gratis:hover { text-decoration-color: var(--sn-accent); }
.pt-gratis:focus-visible { outline: 2px solid var(--sn-accent); outline-offset: 2px; border-radius: 4px; }

/* ---- 2 · La red viva: una pieza con su marco y su pie --------------------- */
.pt-red { flex: 1 1 auto; display: flex; min-height: 0; padding: 0 16px clamp(12px, 2.4vh, 24px); }
.rv-marco {
  flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0;
  width: 100%; max-width: var(--pt-ancho); margin: 0 auto; box-sizing: border-box;
  border: 1px solid var(--sn-line); border-radius: 20px; background: var(--sn-surface); overflow: hidden;
}
.rv { position: relative; flex: 1 1 auto; width: 100%; min-height: clamp(260px, 38vh, 420px); }
.rv-lienzo, .rv-poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rv-lienzo[hidden], .rv-poster[hidden] { display: none; }
.rv-lienzo { touch-action: pan-y; cursor: grab; outline: none; }
.rv-lienzo:active { cursor: grabbing; }
.rv-lienzo:focus-visible { outline: 2px solid var(--sn-accent); outline-offset: -3px; border-radius: 19px 19px 0 0; }
/* Con el lienzo vivo, el póster se va. */
.rv[data-rv-estado] .rv-poster { display: none; }
.rv-poster line { stroke: var(--sn-accent); stroke-width: 2.4; opacity: 0.85; }
.rv-poster line.is-frio { stroke: url(#rv-enfria); opacity: 1; }
.rv-g-a { stop-color: var(--sn-accent); }
.rv-g-b { stop-color: var(--sn-enfria); }
.rv-poster circle { fill: var(--sn-accent); }
.rv-poster .is-frio circle { fill: var(--sn-enfria); }
.rv-poster .rv-poster-tu { fill: var(--sn-text); }
.rv-poster text { text-anchor: middle; font-family: var(--sn-font); }
.rv-poster-ini { fill: var(--sn-bg); font-weight: 600; }
.rv-poster-ini--tu { font-size: 16px; }
.rv-poster-rol { fill: var(--sn-text); opacity: 0.86; font-size: 17px; font-weight: 400; }

.rv-pie {
  flex: none; display: flex; align-items: center; gap: 14px; min-height: 52px; box-sizing: border-box;
  padding: 8px 16px; border-top: 1px solid var(--sn-line); background: var(--sn-bg);
}
.rv-estado { font-size: 16px; line-height: 1.3; color: var(--sn-text); }

/* Shiver: su burbuja, en su morado. */
.rv-shiver {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 12px;
  border-radius: 999px; border: 1px solid rgb(var(--sn-shiver-rgb) / 0.6);
  background: rgb(var(--sn-shiver-rgb) / 0.16); color: var(--sn-text);
  font: 400 17px/1 var(--sn-font); cursor: pointer;
  box-shadow: 0 0 0 6px rgb(var(--sn-shiver-rgb) / 0.08), 0 12px 40px -12px rgb(var(--sn-shiver-rgb) / 0.6);
  animation: rv-entra 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rv-shiver[hidden] { display: none; }
.rv-shiver:focus-visible { outline: 2px solid var(--sn-shiver); outline-offset: 3px; }
@keyframes rv-entra { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .rv-shiver { animation: none; } }

/* ---- 3 · Antes / después con tu IA ----------------------------------------- */
.pt-ia-fig { margin: 32px 0 0; }
.pt-ia-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.pt-chat {
  display: flex; flex-direction: column; gap: 12px; padding: 24px;
  border: 1px solid var(--sn-line); border-radius: 16px; background: var(--sn-bg);
}
.pt-chat--con { border-color: rgb(var(--sn-accent-rgb) / 0.55); }
.pt-chat-t { margin: 0 0 4px; font: 400 13px/1.2 var(--sn-font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sn-muted); }
.pt-chat--con .pt-chat-t { color: var(--sn-accent); }
.pt-burbuja {
  margin: 0; max-width: 46ch; padding: 12px 16px; border-radius: 16px 16px 16px 4px;
  background: var(--sn-surface); color: var(--sn-muted); font-size: 17px; line-height: 1.45;
}
.pt-burbuja--yo { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: transparent; border: 1px solid var(--sn-line); color: var(--sn-text); }
.pt-burbuja--con { color: var(--sn-text); background: rgb(var(--sn-accent-rgb) / 0.1); }

/* ---- 4 · Los planes: nombre, tope y promesa. Sin precios. ------------------ */
.pt-niveles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pt-niveles > li { display: flex; }
.pt-nivel {
  flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 24px; min-height: 168px; box-sizing: border-box;
  border: 1px solid var(--sn-line); border-radius: 16px; background: var(--sn-surface);
  color: var(--sn-text); text-decoration: none; transition: border-color 200ms, transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pt-nivel:hover { border-color: var(--sn-accent); transform: translateY(-2px); }
.pt-nivel:focus-visible { outline: 2px solid var(--sn-accent); outline-offset: 3px; }
.pt-nivel-n { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.pt-nivel-tope { font: 400 13px/1.3 var(--sn-font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sn-accent); }
.pt-nivel-l { font-size: 17px; line-height: 1.45; color: var(--sn-muted); }

/* ---- 5 · Cómo funciona: tres pasos en línea de tiempo ---------------------- */
.pt-linea {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative;
}
/* El hilo que une los tres pasos. */
.pt-linea::before { content: ""; position: absolute; top: 24px; left: 24px; right: 24px; height: 1px; background: var(--sn-line); }
.pt-linea li { position: relative; display: grid; gap: 10px; align-content: start; }
.pt-paso-ico {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--sn-bg); border: 1px solid var(--sn-line); color: var(--sn-accent);
}
.pt-paso-ico svg { width: 22px; height: 22px; }
.pt-paso-t { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.pt-paso-d { margin: 0; max-width: 34ch; font-size: 17px; line-height: 1.5; color: var(--sn-muted); }

/* ---- 6 · Lo tuyo es tuyo ---------------------------------------------------- */
.pt-frases { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 0; }
.pt-frases li { padding: 18px 0; border-top: 1px solid var(--sn-line); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; letter-spacing: -0.01em; }
.pt-frases li:last-child { border-bottom: 1px solid var(--sn-line); }

/* ---- 7 · ¿Organizas eventos? ------------------------------------------------- */
.pt-org-caja {
  position: relative; display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 48px; align-items: center;
  padding: 40px; border: 1px solid var(--sn-line); border-radius: 20px; background: var(--sn-bg);
  transition: border-color 200ms;
}
.pt-org-caja:hover { border-color: var(--sn-accent); }
.pt-org-txt p:last-child { margin: 8px 0 0; }
/* Todo el bloque lleva a /organizers; el enlace es el texto. */
.pt-org-enlace::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.pt-org-enlace:focus-visible { outline: none; }
.pt-org-enlace:focus-visible::after { outline: 2px solid var(--sn-accent); outline-offset: 3px; }
.pt-mini { margin: 0; padding: 20px; border: 1px solid var(--sn-line); border-radius: 14px; background: var(--sn-surface); }
.pt-mini-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
.pt-mini-t { font-size: 15px; color: var(--sn-muted); }
.pt-mini-filas { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pt-mini-filas li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(40px, 1fr) auto; gap: 12px; align-items: center; font-size: 15px; }
.pt-mini-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-mini-barra { height: 6px; border-radius: 3px; background: var(--sn-line); overflow: hidden; }
.pt-mini-barra i { display: block; height: 100%; border-radius: 3px; background: var(--sn-accent); }
.pt-mini-filas b { font: 400 15px/1 var(--sn-font-mono); font-variant-numeric: tabular-nums; }

/* ---- 8 · El cierre ------------------------------------------------------------ */
.pt-cierre { text-align: center; }
.pt-cierre .pt-h1 { margin: 0 auto; }

/* ---- 900 px: dos columnas donde había cuatro ---------------------------------- */
@media (max-width: 900px) {
  .pt-niveles { grid-template-columns: repeat(2, 1fr); }
  .pt-org-caja { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
}

/* ---- 700 px: una columna -------------------------------------------------------- */
@media (max-width: 700px) {
  .pt-wrap { padding: 0 16px; }
  .pt-hero { padding-top: clamp(16px, 3vh, 32px); }
  .pt .pt-h1 { font-size: min(clamp(38px, 11vw, 52px), 9vh); }
  .pt-reservar { padding: 0 20px; font-size: 16px; }
  .rv { min-height: clamp(240px, 34vh, 380px); }
  .rv-pie { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px 12px; }
  .rv-estado { font-size: 15px; min-height: 2.6em; }
  .pt-ia-cols { grid-template-columns: 1fr; gap: 16px; }
  .pt-chat { padding: 18px; }
  .pt-niveles { grid-template-columns: 1fr; }
  .pt-nivel { min-height: 0; }
  .pt-linea { grid-template-columns: 1fr; gap: 28px; }
  .pt-linea::before { top: 24px; bottom: 24px; left: 24px; right: auto; width: 1px; height: auto; }
  .pt-linea li { grid-template-columns: 48px 1fr; column-gap: 16px; }
  .pt-paso-ico { grid-row: span 2; margin: 0; }
  .pt-paso-t { align-self: center; }
  .pt-org-caja { padding: 20px; }
  .pt-mini { padding: 16px; }
}

/* ---- Móviles bajos (360×640, 375×667): la primera pantalla sigue cabiendo ---- */
@media (max-width: 700px) and (max-height: 720px) {
  .pt-hero { padding: 12px 16px 10px; gap: 8px; }
  .pt .pt-h1 { font-size: min(clamp(32px, 10vw, 44px), 8vh); }
  .pt-sub { font-size: 16px; line-height: 1.35; }
  .pt-acciones { margin-top: 0; gap: 0 20px; }
  .pt-gratis { min-height: 44px; }
  .pt-red { padding-bottom: 10px; }
  .rv { min-height: 150px; }
  .rv-pie { min-height: 0; gap: 6px; padding: 8px 12px 10px; }
  .rv-estado { min-height: 0; font-size: 14px; }
  .pt-ejemplo { font-size: 11px; padding: 4px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .pt-nivel, .pt-org-caja { transition: none; }
  .pt-nivel:hover { transform: none; }
}
/* Lo que abre cada nivel: «Al abrir» y «En camino» (del mapa de capacidades). */
.pt-nivel-lt { margin-top: 10px; font: 400 12px/1.3 var(--sn-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sn-accent); }
.pt-nivel-lt--enCamino { color: var(--sn-muted); }
.pt-nivel-caps { display: flex; flex-direction: column; gap: 6px; }
.pt-nivel-cap { font-size: 15px; line-height: 1.4; color: var(--sn-text); }
[data-lista="enCamino"] .pt-nivel-cap { color: var(--sn-muted); }

/* ---- La entrada (10-nov-2026) ----------------------------------------------
   La primera pantalla llega en cascada: titular, frase, botones y el marco de
   la red, 90 ms entre uno y otro, subiendo 14 px y enfocándose. Dentro del
   marco, la red se teje sola (public/js/red-viva.js, `intro`). El póster sin
   JS espera un instante para no asomarse antes del lienzo.
   Con movimiento reducido: todo quieto y entero desde el primer fotograma. */
@keyframes pt-llega {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes pt-aparece { from { opacity: 0; } to { opacity: 1; } }
.pt-hero > * , .pt-red { animation: pt-llega 760ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.pt-hero > :nth-child(1) { animation-delay: 40ms; }
.pt-hero > :nth-child(2) { animation-delay: 130ms; }
.pt-hero > :nth-child(3) { animation-delay: 220ms; }
.pt-red { animation-name: pt-sube; animation-delay: 320ms; }
@keyframes pt-sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rv-poster { animation: pt-aparece 300ms ease 700ms both; }

/* Las secciones de abajo: el revelado de motion.css, un poco más largo y con
   el mismo enfoque que la primera pantalla. Los botones de nivel se elevan
   al pasar por encima. */
.pt [data-reveal] {
  transform: translateY(18px); filter: blur(4px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 700ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.pt [data-reveal].is-in { transform: none; filter: none; }
.pt-reservar { transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms; }
.pt-reservar:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .pt-hero > *, .pt-red, .rv-poster { animation: none; }
  .pt [data-reveal] { transform: none; filter: none; transition: none; }
  .pt-reservar, .pt-reservar:hover { transition: none; transform: none; }
}

/* Las anclas de la cabecera (Para ti, Con tu IA) caen bajo la barra fija, no detrás. */
.pt-sec { scroll-margin-top: var(--header-h, 64px); }
