/* Cartoncito — página de planes. Solo se carga en planes.html.
   Movimiento: solo transform y opacity (el círculo del título dibuja un trazo, como en el inicio); nada que se repita solo. */

/* ---------- Encabezado compacto: que las cards asomen en el primer pantallazo ---------- */
.p-hero { padding: 20px 0 64px; }
.p-head h1 { margin-top: 10px; font-size: 28px; font-weight: 900; letter-spacing: -.025em; line-height: 1.1; }
.p-head .lead { margin-top: 10px; max-width: 60ch; font-size: 17px; }
@media (min-width: 1040px) {
  .p-hero { padding: 14px 0 84px; }
  .p-head h1 { font-size: 36px; }
  .p-head .lead { font-size: 18px; }
}

/* El círculo rojo del inicio: el mismo trazo, estirado a lo ancho para "arrancar."; se dibuja una sola vez al cargar */
.p-head h1 .mark { position: relative; white-space: nowrap; }
.p-head h1 .mark svg { position: absolute; left: -7%; top: -14%; width: 114%; height: 132%; overflow: visible; pointer-events: none; }
.p-head h1 .mark path {
  fill: none; stroke: var(--sello); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1.03; animation: markDraw var(--dur-slow) cubic-bezier(.65,0,.35,1) .3s forwards;
}
@keyframes markDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .p-head h1 .mark path { animation: none; stroke-dashoffset: 0; } }

/* ---------- Cards de planes (sin sombras ni degradés) ---------- */
.plans { display: grid; gap: 26px; margin-top: 34px; }
.plan {
  position: relative; display: flex; flex-direction: column; padding: 28px 24px 26px; border-radius: var(--radius);
  transition: transform 200ms var(--ease-out);
}
.plan--piloto { padding: 36px 26px 30px; background: var(--tinta); color: var(--papel); }
.plan--base { background: var(--papel); color: var(--tinta); border: 2px solid var(--tinta); }
.plan--medida { background: var(--carton); color: var(--tinta); }
@media (min-width: 900px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; margin-top: 28px; }
  .plan { padding: 32px 28px 30px; }
  .plan--piloto { padding: 44px 32px 36px; }
  .plan:not(.plan--piloto) { margin-top: 16px; } /* el piloto queda 16 px más arriba */
}
@media (hover: hover) and (pointer: fine) {
  .plan:hover { transform: translateY(-4px); }
}

.pl-sticker {
  position: absolute; top: -15px; right: 18px; padding: 7px 14px 8px; border: 2px solid var(--tinta); border-radius: 10px;
  background: var(--carton); color: var(--tinta); font-size: 15px; font-weight: 900; line-height: 1.1; transform: rotate(-6deg);
}
.pl-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; }
.pl-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plan--piloto .pl-ico { background: var(--tinta-2); color: var(--carton); }
.plan--base .pl-ico { background: var(--papel-2); color: var(--tinta); }
.plan--medida .pl-ico { background: var(--papel); color: var(--tinta); }
.plan h3 { margin-top: 18px; font-size: 28px; letter-spacing: -.025em; line-height: 1.1; }
.pl-frase { margin-top: 6px; font-size: 17px; font-weight: 600; }
.plan--base .pl-frase { color: var(--tinta-suave); }

.pl-price { margin-top: 22px; padding: 6px 0 18px; border-top: 1.5px solid var(--linea); border-bottom: 1.5px solid var(--linea); }
.plan--piloto .pl-price { border-color: var(--tinta-2); }
.plan--medida .pl-price { border-color: rgb(var(--tinta-rgb) / .3); }
.pl-price div { margin-top: 14px; }
.pl-price dt { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tinta-suave); }
.plan--piloto .pl-price dt { color: var(--texto-sobre-tinta); }
.plan--medida .pl-price dt { color: var(--tinta); }
.pl-price dd { margin-top: 2px; font-size: 20px; font-weight: 900; letter-spacing: -.015em; line-height: 1.25; }
.pl-price .tbd { margin-top: 14px; }
.pl-price .pl-estado dd { font-size: inherit; line-height: 1; }
.pl-price .pl-estado .tbd { margin-top: 0; }
/* La etiqueta "a definir" tiene que dar AA sobre el fondo de cada card */
.plan--piloto .tbd { color: var(--papel); border-color: var(--carton); }
.plan--medida .tbd { color: var(--tinta); border-color: var(--tinta); }

.pl-list { flex: 1; list-style: none; display: grid; gap: 12px; align-content: start; margin-top: 22px; }
.pl-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.pl-list svg { width: 22px; height: 22px; flex: none; margin-top: 0; fill: none; stroke: var(--tinta); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plan--piloto .pl-list svg { stroke: var(--carton); }
.pl-list .pl-tbd { padding-left: 32px; }

.pl-btn { width: 100%; margin-top: 28px; min-height: 54px; padding: 0 22px; font-size: 17px; text-align: center; }
.plan--piloto .pl-btn { background: var(--carton); color: var(--tinta); }
.plan--base .pl-btn, .plan--medida .pl-btn { background: var(--tinta); color: var(--papel); }
.plan--piloto :focus-visible { outline-color: var(--papel); }
@media (hover: hover) and (pointer: fine) {
  .plan--piloto .pl-btn:hover { background: var(--papel); }
  .plan--base .pl-btn:hover, .plan--medida .pl-btn:hover { background: var(--tinta-2); }
}

/* Entrada única: las cards suben con fade, una tras otra (200 ms, 100 ms de desfase: 400 ms en total) */
.js .plans:not(.in) .plan { opacity: 0; transform: translateY(24px); }
.plans.in .plan { animation: planIn 200ms var(--ease-out) calc(var(--i) * 100ms) backwards; }
@keyframes planIn { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  .plan { animation: none !important; opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---------- Del piloto al plan base ---------- */
.p-pasos { padding: 72px 0; }
.p-pasos h2 { max-width: 20ch; }
.ps-steps { list-style: none; display: grid; gap: 34px; margin-top: 40px; }
.ps-step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; }
.ps-num { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--tinta); color: var(--papel); font-size: 24px; font-weight: 900; line-height: 1; }
.ps-step h3 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; padding-top: 2px; }
.ps-step p { margin-top: 6px; color: var(--tinta-suave); }
/* Línea punteada que une los pasos: vertical en mobile */
.ps-step:not(:last-child)::after { content: ""; position: absolute; left: 27px; top: 64px; bottom: -26px; border-left: 3px dotted var(--pliegue); }
@media (min-width: 800px) {
  .ps-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .ps-step { display: block; }
  .ps-step h3 { margin-top: 18px; padding-top: 0; }
  .ps-step:not(:last-child)::after { left: 68px; right: -28px; top: 27px; bottom: auto; border-left: 0; border-top: 3px dotted var(--pliegue); }
}

/* ---------- Tabla: qué incluye cada plan ---------- */
.p-tabla { padding: 72px 0; }
.pt-wrap { position: relative; margin-top: 32px; overflow-x: auto; border: 2px solid var(--linea); border-radius: 20px; background: var(--papel); }
.pt-wrap:focus-visible { border-radius: 20px; }
.pt { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; }
.pt th, .pt td { padding: 16px 18px; border-bottom: 1px solid var(--linea); font-size: 16px; line-height: 1.35; text-align: center; vertical-align: middle; }
.pt tbody tr:last-child th, .pt tbody tr:last-child td { border-bottom: 0; }
.pt thead th { padding-top: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--tinta); font-size: 18px; font-weight: 900; letter-spacing: -.01em; }
.pt thead .pt-esq { border-bottom: 2px solid var(--tinta); }
.pt tbody th { position: sticky; left: 0; z-index: 1; width: 230px; min-width: 150px; background: var(--papel); box-shadow: 1px 0 0 var(--linea); font-weight: 800; text-align: left; }
.pt thead .pt-esq { position: sticky; left: 0; z-index: 1; background: var(--papel); }
.pt td .tbd { display: table; margin: 8px auto 0; }
.pt-yes, .pt-no { display: inline-block; width: 24px; height: 24px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.pt-yes { stroke: var(--tinta); }
.pt-no { stroke: var(--tinta-suave); }
.chip-soon { display: inline-block; padding: 2px 10px; border: 1.5px solid var(--linea); border-radius: 999px; background: var(--papel-2); color: var(--tinta-suave); font-size: 12px; font-weight: 800; line-height: 1.4; }
@media (max-width: 599px) {
  .pt tbody th { width: 140px; padding: 14px 12px; font-size: 15px; }
  .pt th, .pt td { padding: 14px 12px; font-size: 15px; }
  .pt thead th { font-size: 16px; }
}

/* ---------- Preguntas frecuentes ---------- */
.p-faq { padding: 72px 0; }
.faq-list { display: grid; gap: 12px; max-width: 820px; margin-top: 32px; }
.fq { border: 2px solid var(--linea); border-radius: 18px; background: var(--papel); }
.fq[open] { border-color: var(--tinta); }
.fq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 20px;
  font-size: 18px; font-weight: 800; line-height: 1.3; cursor: pointer; list-style: none; border-radius: 16px;
}
.fq summary::-webkit-details-marker { display: none; }
.fq summary::after {
  content: ""; flex: none; width: 11px; height: 11px; margin-right: 4px; border: solid var(--tinta); border-width: 0 2.5px 2.5px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform 200ms var(--ease-out);
}
.fq[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.fq p { padding: 0 20px 20px; color: var(--tinta-suave); font-size: 17px; }
.fq p .tbd { margin-left: 4px; }
@media (prefers-reduced-motion: reduce) { .fq summary::after { transition: none; } }
