/* ==========================================================================
   Páginas de contenido (las de src/seo-pages.js con `route: true`, como /plano-de-mesas). Sólo las enlazan esas páginas,
   en este orden: /style.css, /landing.css y /paginas.css. Reusan el lenguaje de la landing (las clases lp- de
   landing.css: barra de títulos en Fraunces, eyebrow, botones, secciones, preguntas, cierre y pie) y acá va sólo lo
   propio de estas páginas, con prefijo pg- (más .seo-nav, el menú compartido del pie, siempre dentro de .pg).
   La estructura y las clases están explicadas en tools/seo/README.md.
   ========================================================================== */

:root {
  /* los estados de una mesa, como en el plano del panel (plano-draw.js): hay lugar, llena y excedida */
  --pg-ok: #15803d;
  --pg-ok-bg: #e7f3ea;
  --pg-full: #b45309;
  --pg-full-bg: #fdf0e1;
  --pg-over: #b91c1c;
  --pg-over-bg: #fbe7e7;
  --pg-chair: #d9c7bb;
  --pg-zone: #fdf3ec;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pg-ok: #4ade80;
    --pg-ok-bg: #16301f;
    --pg-full: #fbbf24;
    --pg-full-bg: #3a2a12;
    --pg-over: #f87171;
    --pg-over-bg: #3d1c1c;
    --pg-chair: #4d3f37;
    --pg-zone: #2a201b;
  }
}
:root[data-theme="dark"] {
  --pg-ok: #4ade80;
  --pg-ok-bg: #16301f;
  --pg-full: #fbbf24;
  --pg-full-bg: #3a2a12;
  --pg-over: #f87171;
  --pg-over-bg: #3d1c1c;
  --pg-chair: #4d3f37;
  --pg-zone: #2a201b;
}

/* ---------- encabezado: logo, Ejemplos · Precios · Ayuda y «Crear mi invitación» ---------- */
/* en el celular, dos renglones (logo y botón; abajo los tres enlaces) y sin quedar fijo; desde 720 px, uno solo y fijo */
.pg-bar { position: relative; z-index: 30; background: var(--lp-bg); border-bottom: 1px solid var(--lp-line); }
.pg-bar-in { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; padding-top: 10px; }
.pg-bar .rc-brand { min-height: 44px; }
.pg-bar .rc-brand img { height: 26px; width: auto; }
.pg .pg-bar-cta { flex: none; margin-left: auto; min-height: 44px; padding: 8px 16px; font-size: 0.88rem; white-space: nowrap; box-shadow: none; }
.pg-bar-nav { order: 3; flex: 1 1 100%; margin-top: 2px; border-top: 1px solid var(--lp-line); }
.pg .pg-bar-nav ul { display: flex; flex-wrap: wrap; gap: 0 22px; }
.pg-bar-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lp-muted); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
.pg-bar-nav a:hover { color: var(--lp-title); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 22.25em) { .pg .pg-bar-cta { padding-inline: 12px; font-size: 0.82rem; } }
@media (min-width: 720px) {
  .pg-bar { position: sticky; top: 0; background: color-mix(in srgb, var(--lp-bg) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
  .pg-bar-in { flex-wrap: nowrap; min-height: 68px; padding-top: 0; column-gap: 28px; }
  .pg-bar .rc-brand img { height: 30px; }
  .pg-bar-nav { order: 0; flex: 0 1 auto; margin: 0 0 0 auto; border-top: 0; }
  .pg .pg-bar-cta { margin-left: 0; padding-inline: 20px; font-size: 0.92rem; }
}

/* ---------- migas de pan ---------- */
.pg-crumbs { padding-top: 14px; color: var(--lp-muted); font-size: 0.88rem; }
.pg .pg-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.pg-crumbs li { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; }
.pg-crumbs li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.55; }
.pg-crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--lp-muted); text-decoration: underline; text-decoration-color: var(--lp-line-strong); text-underline-offset: 3px; }
.pg-crumbs a:hover { color: var(--lp-accent-deep); }
.pg-crumbs [aria-current="page"] { color: var(--lp-ink); font-weight: 600; }

/* ---------- portada de la página (sobre .lp-hero de la landing) ---------- */
.pg .pg-hero { padding-top: 10px; }
.pg-hero h1 { font-size: clamp(2.15rem, 1.35rem + 3.5vw, 3.7rem); line-height: 1.05; letter-spacing: -0.02em; max-width: 14em; }
.pg-hero .lp-eyebrow { margin-bottom: 14px !important; }
.pg-hero .lp-hero-cta .btn.secondary { background: var(--lp-surface); }
@media (max-width: 599px) { .pg-hero .lp-hero-cta .btn { flex: 1 1 100%; } }
@media (min-width: 720px) { .pg .pg-hero { padding-top: 22px; } }
@media (min-width: 1024px) {
  .pg-hero .lp-hero-in { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 56px; }
  .pg-hero h1 { font-size: min(3.7rem, 4.6vw); }
}

/* ---------- imágenes: el panel durazno, la captura de escritorio, el teléfono y el pie de foto ---------- */
.pg-art { position: relative; padding: clamp(14px, 3.6vw, 32px); border-radius: var(--lp-radius); background: var(--lp-peach); overflow: hidden; }
.pg-art--center { display: grid; justify-items: center; gap: 14px; }
.pg-art--phone { display: grid; place-items: center; padding-block: clamp(24px, 5vw, 44px); }
.pg-shot { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--lp-line), var(--lp-shadow-lg); }
/* una parte de la pantalla del celular (una tarjeta o una pantalla larga): angosta y, si es muy alta, cortada abajo */
.pg-shot--narrow { width: min(340px, 86%); border-radius: 16px; }
.pg-shot--tall { max-height: 640px; object-fit: cover; object-position: top; }
/* una pantalla entera de celular (alto ≈ 2,16 × ancho): el marco del teléfono de la landing (.lp-phone), en el flujo */
.pg .pg-phone { position: relative; width: min(270px, 66%); }
.pg-photo { display: block; width: 100%; height: auto; border-radius: 18px; object-fit: cover; }
.pg-cap { margin-top: 12px !important; color: var(--lp-muted); font-size: 0.88rem; line-height: 1.45; }

/* ---------- cómo funciona: pasos numerados ---------- */
.pg-steps { display: grid; gap: 0; }
.pg-step { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 16px; align-content: start; padding: 22px 0; border-top: 1px solid var(--lp-line); }
.pg-step:first-child { border-top: 0; padding-top: 0; }
.pg-step .lp-chip-ic { grid-row: span 3; }
.pg-step-n { color: var(--lp-accent); font: italic 500 0.95rem/1.2 var(--lp-serif); letter-spacing: 0.03em; }
.pg-step h3 { font: 400 1.4rem/1.15 var(--lp-serif); letter-spacing: -0.01em; }
.pg-step p:not(.pg-step-n) { margin-top: 4px !important; color: var(--lp-muted); font-size: 0.97rem; }
@media (min-width: 720px) {
  .pg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
  .pg-step:nth-child(2) { border-top: 0; padding-top: 0; }
}
@media (min-width: 1100px) {
  .pg-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
  .pg-step { grid-template-columns: 1fr; gap: 10px; padding: 0; border-top: 0; }
  .pg-step .lp-chip-ic { grid-row: auto; margin-bottom: 6px; }
}

/* ---------- bloques de detalle: texto e imagen, alternados en escritorio ---------- */
.pg-details { display: grid; gap: 64px; }
.pg-detail { display: grid; gap: 26px; align-items: center; }
.pg-detail-text { display: grid; gap: 14px; align-content: start; }
.pg-detail-text h3 { font: 400 clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem)/1.12 var(--lp-serif); letter-spacing: -0.01em; }
.pg-detail-text p { color: var(--lp-muted); max-width: 60ch; text-wrap: pretty; }
.pg-detail-text .lp-chip-ic { margin-bottom: 2px; }
.pg-detail-art { min-width: 0; }
.pg-detail-text a:not(.lp-link), .pg-know a, .pg-plain a { color: var(--lp-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .pg-details { gap: 96px; }
  .pg-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
  .pg-detail:nth-child(even) .pg-detail-art { order: -1; }
}

/* ---------- dibujos en HTML y SVG (como las tarjetas de la landing): siempre con datos inventados ---------- */
.pg-mini { width: 100%; max-width: 440px; padding: 16px; border-radius: 16px; background: var(--lp-surface); border: 1px solid var(--lp-line); box-shadow: var(--lp-shadow); color: var(--lp-ink); font-size: 0.9rem; line-height: 1.4; }
.pg-mini-title { margin-bottom: 10px !important; color: var(--lp-title); font: 400 1.15rem/1.2 var(--lp-serif); }

/* el salón dibujado: zonas, mesas con sus sillas y su estado */
.pg-room { display: block; width: 100%; height: auto; }
.pg-room-floor { fill: var(--lp-surface); stroke: var(--lp-line-strong); stroke-width: 1.5; }
.pg-room-zone { fill: var(--pg-zone); stroke: var(--lp-accent); stroke-width: 1.2; stroke-dasharray: 4 3; opacity: 0.9; }
.pg-room-zlabel { fill: var(--lp-muted); font: 700 7.5px/1 var(--lp-sans); letter-spacing: 0.12em; }
.pg-room-chairs { fill: var(--pg-chair); }
.pg-room-t { stroke-width: 1.6; }
.pg-room-t--ok { fill: var(--pg-ok-bg); stroke: var(--pg-ok); }
.pg-room-t--full { fill: var(--pg-full-bg); stroke: var(--pg-full); }
.pg-room-t--over { fill: var(--pg-over-bg); stroke: var(--pg-over); }
.pg-room-tlabel { fill: var(--lp-title); font: 700 7.5px/1 var(--lp-sans); text-anchor: middle; dominant-baseline: central; }

/* los tres estados de una mesa y el resumen de arriba del plano */
.pg .pg-states { display: grid; gap: 8px; }
.pg-states li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--lp-line); border-radius: 12px; background: var(--lp-bg); }
.pg-states b { color: var(--lp-title); font-weight: 650; }
.pg-states small { grid-column: 2; color: var(--lp-muted); font-size: 0.82rem; }
.pg-states em { grid-row: span 2; grid-column: 3; padding: 4px 10px; border-radius: 999px; font: 650 0.78rem/1.2 var(--lp-sans); font-style: normal; white-space: nowrap; }
.pg-dot { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid; }
.pg-dot--ok { border-color: var(--pg-ok); background: var(--pg-ok-bg); }
.pg-dot--full { border-color: var(--pg-full); background: var(--pg-full-bg); }
.pg-dot--over { border-color: var(--pg-over); background: var(--pg-over-bg); }
.pg-states .pg-tag--ok { background: var(--pg-ok-bg); color: var(--pg-ok); }
.pg-states .pg-tag--full { background: var(--pg-full-bg); color: var(--pg-full); }
.pg-states .pg-tag--over { background: var(--pg-over-bg); color: var(--pg-over); }
.pg-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pg-totals div { padding: 10px 12px; border: 1px solid var(--lp-line); border-radius: 12px; background: var(--lp-bg); }
.pg-totals dt { color: var(--lp-muted); font-size: 0.8rem; line-height: 1.3; }
.pg-totals dd { margin: 2px 0 0; color: var(--lp-title); font: 400 1.6rem/1.1 var(--lp-serif); font-variant-numeric: lining-nums tabular-nums; }
.pg-totals .is-warn dd { color: var(--lp-accent); }

/* asignar por lote: lo que se pega y lo que contesta */
.pg-lote-in { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--lp-line-strong); border-radius: 10px; background: var(--lp-bg); color: var(--lp-ink); font: 500 0.84rem/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-lote-out { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; color: var(--lp-ink); font-size: 0.86rem; }
.pg-lote-out .lp-ic { width: 18px; height: 18px; margin-top: 1px; }
.pg-lote-out--ok .lp-ic { color: var(--pg-ok); }
.pg-lote-out--warn .lp-ic { color: var(--pg-full); }

/* una planilla de ejemplo (mesas.csv): tabla de verdad, con scroll propio si no entra */
.pg-table-wrap { width: 100%; max-width: 480px; overflow-x: auto; border-radius: 14px; border: 1px solid var(--lp-line); background: var(--lp-surface); box-shadow: var(--lp-shadow); }
.pg-table { width: 100%; border-collapse: collapse; color: var(--lp-ink); font-size: 0.84rem; line-height: 1.35; }
.pg-table caption { padding: 12px 14px 4px; color: var(--lp-title); font: 400 1.1rem/1.2 var(--lp-serif); text-align: left; caption-side: top; }
.pg-table th, .pg-table td { padding: 8px 6px; border-top: 1px solid var(--lp-line); text-align: left; vertical-align: top; }
.pg-table th:first-child, .pg-table td:first-child { padding-left: 12px; white-space: nowrap; }
.pg-table th:last-child, .pg-table td:last-child { padding-right: 12px; }
.pg-table th { color: var(--lp-muted); font-size: 0.78rem; font-weight: 650; white-space: nowrap; }
.pg-table td:nth-child(3) { text-align: center; font-variant-numeric: tabular-nums; }
/* en el celular la planilla usa casi todo el ancho: el panel durazno queda como un borde fino */
@media (max-width: 479px) { .pg-art--table { padding: 8px; } .pg-table { font-size: 0.8rem; } }
@media (min-width: 720px) { .pg-table th, .pg-table td { padding-inline: 10px; } }

/* ---------- lo que tenés que saber (sobre .lp-sec--cacao) ---------- */
.pg-know { display: grid; gap: 0 48px; }
.pg-know li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--lp-cacao-line); color: var(--lp-on-cacao-muted); font-size: 0.98rem; }
.pg-know .lp-ic { color: #fdba74; margin-top: 2px; }
.pg-know b { color: var(--lp-on-cacao); font-weight: 650; }
.pg-know a { color: #fdba74; }
@media (min-width: 900px) { .pg-know { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- páginas relacionadas: tres tarjetas con el enlace estirado ---------- */
.pg-related { display: grid; gap: 16px; }
.pg-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px 22px; border: 1px solid var(--lp-line); border-radius: var(--lp-radius); background: var(--lp-surface); box-shadow: var(--lp-shadow); transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s; }
.pg-card h3 { font: 400 1.45rem/1.15 var(--lp-serif); letter-spacing: -0.01em; }
.pg-card h3 a { color: var(--lp-title); text-decoration: none; }
.pg-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pg-card p { color: var(--lp-muted); font-size: 0.97rem; }
.pg-card-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--lp-accent); font-weight: 600; }
.pg-card-more .lp-ic { width: 18px; height: 18px; }
.pg-card:hover { border-color: var(--lp-line-strong); box-shadow: var(--lp-shadow-lg); }
.pg-card:hover h3 a { color: var(--lp-accent); }
.pg-card:focus-within { outline: 3px solid var(--lp-ring); outline-offset: 3px; }
.pg-card h3 a:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) { .pg-card:hover { transform: translateY(-2px); } }
@media (min-width: 900px) { .pg-related { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* ---------- cierre y pie (sobre .lp-close y .lp-pie de la landing) ---------- */
.pg .lp-close { padding-top: 0; }
.pg-close-help { color: var(--lp-muted); font-size: 0.95rem; }
.pg-close-help a { color: var(--lp-accent-deep); font-weight: 600; }

/* el menú compartido «Más sobre Recuerdos» (lo escribe tools/seo/build-nav.mjs): tres columnas en el pie */
.pg .seo-nav { display: grid; gap: 28px; }
.pg .lp-pie .seo-nav-title { margin-bottom: 4px !important; color: var(--lp-title); font: 600 0.78rem/1.3 var(--lp-sans); letter-spacing: 0.14em; text-transform: uppercase; }
.pg .lp-pie .seo-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pg .lp-pie .seo-nav a { line-height: 1.3; }
.pg .lp-pie .seo-nav a[aria-current="page"] { color: var(--lp-accent-deep); font-weight: 650; }
@media (min-width: 720px) {
  .pg .seo-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
  .pg .lp-pie .seo-nav ul { grid-template-columns: 1fr; }
}
