/* WebMatic · página de gracias después de pagar (/gracias/<ref>/<firma>). Solo usa las variables de app.css; siempre en claro. */

/* Encabezado: texto + vista del sitio en un navegador */
.gr-hero { display: grid; gap: 36px; align-items: center; grid-template-columns: minmax(0, 1fr); margin: 8px 0 48px; }
@media (min-width: 900px) { .gr-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; } .gr-hero.solo { grid-template-columns: minmax(0, 1fr); } }
.gr-hero.solo { max-width: 720px; margin-inline: auto; text-align: center; }
.gr-hero.solo .gr-acc, .gr-hero.solo .gr-espera { justify-content: center; }
.gr-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.4rem); line-height: 1.04; letter-spacing: -.035em; margin: 10px 0 14px; text-wrap: balance; }
.gr-hero h1 span { background: var(--degradado); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gr-hero .lead { max-width: 54ch; margin: 0; }
.gr-hero.solo .lead { margin-inline: auto; }
.gr-pre { margin: 0; font-weight: 600; font-size: .95rem; color: var(--tinta-2); }
.gr-pre b { color: var(--rosa-texto); font-weight: 600; }
.gr-aprobado .gr-pre { color: var(--verde); }

/* Sello con un pequeño festejo (solo si el sistema permite animaciones) */
.gr-sello { position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; margin-bottom: 14px; }
.gr-sello .ic { width: 30px; height: 30px; stroke-width: 2.2; }
.gr-sello.verde { background: var(--verde-suave); color: var(--verde); box-shadow: 0 14px 30px -14px rgba(11, 122, 80, .55); }
.gr-sello.ambar { background: var(--ambar-suave); color: var(--ambar); }
.gr-sello.rojo { background: var(--rojo-suave); color: var(--rojo); }
.gr-sello.violeta { background: var(--violeta-suave); color: var(--violeta-texto); }
@media (prefers-reduced-motion: no-preference) {
  .gr-aprobado .gr-sello { animation: gr-pop .7s cubic-bezier(.2, 1.4, .4, 1) both; }
  .gr-aprobado .gr-sello::before, .gr-aprobado .gr-sello::after { content: ""; position: absolute; inset: -14px; border-radius: 28px; border: 2px solid var(--verde-punto); opacity: 0; animation: gr-onda 1.4s .25s ease-out both; }
  .gr-aprobado .gr-sello::after { animation-delay: .55s; }
  .gr-aprobado .gr-sello .ic path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: gr-trazo .5s .3s ease-out forwards; }
}
@keyframes gr-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
@keyframes gr-onda { 0% { opacity: .55; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes gr-trazo { to { stroke-dashoffset: 0; } }

.gr-acc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
@media (max-width: 560px) { .gr-acc .btn { flex: 1 1 100%; justify-content: center; } }
.gr-espera { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: .9rem; color: var(--apagado); }
.gr-espera::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ambar-punto, #E5A21A); animation: latido 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .gr-espera::before { animation: none; } }
.gr-ref-sola { text-align: center; color: var(--apagado); margin: -20px 0 24px; }

/* Vista del sitio */
.gr-vista { position: relative; margin: 0; border-radius: var(--r-xl); background: var(--superficie); border: 1px solid var(--linea); box-shadow: var(--sombra-alta); overflow: hidden; }
.gr-vista::before { content: ""; position: absolute; inset: -60px -80px auto auto; width: 70%; aspect-ratio: 1; z-index: -1; background: radial-gradient(closest-side, rgba(240, 54, 225, .18), transparent); }
.gr-nav { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--linea); background: var(--lienzo); }
.gr-nav i { width: 10px; height: 10px; border-radius: 50%; background: var(--linea-fuerte); }
.gr-nav span { flex: 1; margin-left: 10px; padding: 4px 12px; border-radius: 99px; background: var(--superficie); border: 1px solid var(--linea); font-size: .8rem; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-vista a { display: block; }
.gr-vista img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gr-vista figcaption { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 10px; border-radius: 99px;
  background: var(--superficie); color: var(--verde); font-weight: 600; font-size: .9rem; box-shadow: var(--sombra-alta); }
.gr-vista figcaption .ic { width: 18px; height: 18px; }

/* Rejilla: lo que sigue + comprobante */
.gr-rejilla { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .gr-rejilla { grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: 24px; } .gr-lado { position: sticky; top: 88px; } }
.gr-col, .gr-lado { display: grid; gap: 18px; }
.gr-card { padding: clamp(20px, 3vw, 28px); border-radius: var(--r-xl); background: var(--superficie); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.gr-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; letter-spacing: -.01em; margin: 0 0 16px; }
.gr-card h2 .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--violeta-suave); color: var(--violeta-texto); flex: none; }
.gr-card > .muted { margin: -6px 0 16px; }

/* Línea de tiempo */
.gr-pasos { list-style: none; margin: 0; padding: 0; display: grid; position: relative; counter-reset: gr; }
.gr-pasos li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 0 0 20px; counter-increment: gr; }
.gr-pasos li:last-child { padding-bottom: 0; }
.gr-pasos li:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 32px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--linea); }
.gr-pasos li.hecho:not(:last-child)::before { background: var(--verde-punto); }
.gr-punto { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--linea-fuerte); background: var(--superficie); font: 600 .85rem var(--f-texto); color: var(--tinta-2); }
.gr-punto:empty::before { content: counter(gr); }
.gr-pasos .hecho .gr-punto { border-color: var(--verde-punto); background: var(--verde-punto); color: #fff; }
.gr-punto .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.gr-pasos b { display: block; margin: 4px 0 2px; }
.gr-pasos span:not(.gr-punto) { display: block; color: var(--tinta-2); font-size: .93rem; }

/* Adelántanos esto */
.gr-prepara { background: linear-gradient(160deg, var(--violeta-suave), var(--superficie) 55%); border-color: color-mix(in srgb, var(--violeta) 22%, var(--linea)); }
.gr-prepara form { display: grid; gap: 16px; }
.gr-prepara fieldset { border: 0; padding: 0; margin: 0; }
.gr-prepara legend { font-weight: 600; margin: 0 0 10px; padding: 0; }
.gr-prepara .opciones { margin: 0; }
.gr-dominio { display: grid; gap: 6px; font-weight: 600; }
.gr-checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.gr-checks legend { grid-column: 1 / -1; }
.gr-checks .check { display: flex; align-items: center; gap: 10px; min-height: 46px; margin: 0; padding: 0 14px; border-radius: 12px; border: 1px solid var(--linea-fuerte); background: var(--superficie); cursor: pointer; transition: border-color .15s, background .15s; }
.gr-checks .check:has(input:checked) { border-color: var(--violeta); background: var(--violeta-suave); color: var(--violeta-texto); }
.gr-checks input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--violeta); flex: none; }

/* Comprobante, formas de pago y contacto */
.gr-recibo dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 16px; }
.gr-recibo dt { color: var(--apagado); font-size: .9rem; }
.gr-recibo dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.gr-recibo dd b { font: 600 1.25rem var(--f-titulo); letter-spacing: -.02em; }
.gr-recibo .muted { margin: 0 0 12px; }
.gr-formas { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gr-formas li { display: grid; gap: 2px; padding: 0 0 12px; border-bottom: 1px solid var(--linea); }
.gr-formas li:last-child { border: 0; padding: 0; }
.gr-formas span { color: var(--tinta-2); font-size: .92rem; }
.gr-portal .muted, .gr-contacto .muted { margin: 0 0 14px; }
.gr-tel { font: 600 1.6rem var(--f-titulo); letter-spacing: -.02em; margin: 0 0 6px; font-variant-numeric: tabular-nums; }

/* Imprimir: solo el comprobante */
@media print {
  .pub-top, .pub-pie, .gr-acc, .gr-espera, .gr-vista, .gr-col, .gr-portal, .gr-contacto, .gr-recibo .btn, .barra-admin { display: none !important; }
  .gr-hero { display: block; margin: 0 0 16px; } .gr-hero h1 span { color: inherit; background: none; }
  .gr-rejilla { display: block; } .gr-lado { position: static; } .gr-card { box-shadow: none; border-color: #ccc; }
}
