/*
 * Taller Janchi - sitio comercial (propuesta visual, BORRADOR)
 * Mobile-first. Sin fuentes descargadas: pila de fuentes del sistema.
 * Paleta: base clara para lectura + bloques oscuros de marca (#0f172a) + acento naranja (#f97316).
 */
:root {
  --navy-950: #0b1120;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --orange-500: #f97316;   /* acento de marca: sobre fondos oscuros o como fondo con texto oscuro */
  --orange-700: #c2410c;   /* naranja accesible para texto sobre fondo claro (contraste ~5:1) */
  --orange-50: #fff7ed;
  --wa: #25d366;
  --wa-hover: #1ebe5a;
  --bg: #ffffff;
  --bg-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --on-dark: #f8fafc;
  --on-dark-muted: #cbd5e1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--orange-700); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--orange-500); color: var(--navy-900);
  padding: 10px 16px; border-radius: 8px; font-weight: 700; z-index: 100;
}
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

.placeholder {
  background: #fef9c3; color: #713f12;
  padding: 0 .3em; border-radius: 4px; font-weight: 600;
}

.draft-banner {
  background: #fef9c3; color: #713f12;
  font-size: .875rem; text-align: center; padding: 6px 16px;
  border-bottom: 1px solid #fde68a;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.25em;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn .icon { width: 1.3em; height: 1.3em; flex: none; }
.btn-sm { min-height: 44px; padding: .45em 1em; font-size: .95rem; }
.btn-lg { min-height: 54px; padding: .8em 1.5em; font-size: 1.05rem; }

.btn-whatsapp { background: var(--wa); color: #052e16; }
.btn-whatsapp:hover { background: var(--wa-hover); }

.btn-outline { border-color: var(--on-dark-muted); color: var(--on-dark); background: transparent; }
.btn-outline:hover { border-color: var(--orange-500); color: var(--orange-500); }

.btn-outline-dark { border-color: var(--navy-700); color: var(--navy-900); background: transparent; }
.btn-outline-dark:hover { border-color: var(--orange-700); color: var(--orange-700); }

.btn.is-soon { cursor: not-allowed; opacity: .75; border-style: dashed; box-shadow: none; }
.btn.is-soon:hover { border-color: inherit; color: inherit; }
.btn-outline.is-soon:hover { border-color: var(--on-dark-muted); color: var(--on-dark); }
.btn-outline-dark.is-soon:hover { border-color: var(--navy-700); color: var(--navy-900); }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; padding: .2em .6em; border-radius: 999px;
  background: var(--orange-500); color: var(--navy-900);
}
.badge-draft { background: #fef9c3; color: #713f12; }

/* ---------- Encabezado ---------- */
.site-header {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: var(--navy-900); color: var(--on-dark);
  border-bottom: 1px solid var(--navy-800);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-dark); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.1rem; }
.brand-text small { color: var(--orange-500); font-size: .78rem; font-weight: 600; }

.nav-toggle {
  display: none; width: 48px; height: 48px; border: 0; border-radius: 10px;
  background: transparent; color: var(--on-dark); cursor: pointer; position: relative;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  position: absolute; left: 13px; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  content: ""; transition: transform .2s;
}
.nav-toggle-bars { top: 23px; }
.nav-toggle-bars::before { left: 0; top: -7px; }
.nav-toggle-bars::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.main-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--on-dark); text-decoration: none; border-radius: 8px; font-weight: 600;
}
.main-nav a:not(.btn):hover { color: var(--orange-500); }

/* Sin JS el menú queda visible debajo del logo; con JS se colapsa en celular y tablet */
@media (max-width: 1023px) {
  .header-inner { flex-wrap: wrap; }
  .js .nav-toggle { display: block; }
  .js .main-nav { display: none; width: 100%; padding-bottom: 12px; }
  .js .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a:not(.btn) { width: 100%; min-height: 48px; border-bottom: 1px solid var(--navy-800); }
  .nav-cta { padding-top: 10px; }
  .nav-cta .btn { width: 100%; }
}
@media (min-width: 1024px) {
  .main-nav ul { align-items: center; flex-wrap: nowrap; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(249, 115, 22, .22), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: var(--on-dark);
  padding: 48px 0 56px;
}
.hero-inner { display: grid; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); letter-spacing: -.01em; }
.hero .accent { color: var(--orange-500); }
.lead { font-size: 1.12rem; color: var(--on-dark-muted); max-width: 40em; }
.hero-trayectoria {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin: 0 0 14px; padding: 6px 14px; border-radius: 999px;
  background: rgba(249, 115, 22, .14); border: 1px solid rgba(249, 115, 22, .45);
  color: var(--on-dark); font-weight: 700; font-size: .95rem;
}
.hero-trayectoria [data-desde] { color: var(--orange-500); }
.hero-trayectoria .sep { color: var(--orange-500); }
@media (max-width: 480px) {
  .hero-trayectoria { gap: 0 8px; padding: 6px 12px; font-size: .9rem; }
  .hero-trayectoria .sep { display: none; }
}
.hero-nota { font-size: .98rem; color: var(--on-dark-muted); max-width: 40em; margin-top: -.4em; padding-left: 12px; border-left: 3px solid var(--orange-500); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700;
  color: var(--orange-700); margin-bottom: .6em;
}
.hero .eyebrow, .section-dark .eyebrow { color: var(--orange-500); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--on-dark-muted); font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--orange-500); font-weight: 700; margin-right: .4em; }
.hero-visual { display: flex; justify-content: center; }
.hero-logo {
  width: min(70vw, 300px); height: auto; border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(249, 115, 22, .25), 0 20px 50px rgba(0, 0, 0, .5);
}
/* Foto opcional del hero: si existe assets/fotos/hero.*, reemplaza al logo */
.hero-foto { display: none; width: 100%; max-width: 560px; }
.hero--con-foto .hero-foto { display: block; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.hero--con-foto .hero-logo { display: none; }
@media (max-width: 599px) {
  .hero { padding: 28px 0 40px; }
  .hero-actions { margin-top: 18px; }
  .hero-actions .btn { width: 100%; }
  /* En celular el logo ya está en el encabezado: se oculta para que WhatsApp y el reclamo queden arriba */
  .hero-logo { display: none; }
}
@media (min-width: 900px) {
  .hero { padding: 80px 0 88px; }
  .hero-inner { grid-template-columns: 1.4fr 1fr; }
}

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--navy-900); color: var(--on-dark); }
.section-dark .section-lead { color: var(--on-dark-muted); }
.section-dark a:not(.btn) { color: var(--orange-500); }
@media (min-width: 900px) { .section { padding: 88px 0; } }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head-left { text-align: left; margin-left: 0; }
.section-head h2 { font-size: clamp(1.5rem, 4.2vw, 2.2rem); }
.section-lead { color: var(--muted); font-size: 1.08rem; }

/* ---------- Tarjetas ---------- */
.cards { display: grid; gap: 16px; }
@media (min-width: 640px) { .cards-4, .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin: 0;
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; }
.card-destacada { border-top: 4px solid var(--orange-500); }
.card-icon {
  width: 48px; height: 48px; padding: 10px; margin-bottom: 14px;
  border-radius: 12px; background: var(--orange-50); color: var(--orange-700);
}

.transparency {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: 28px; padding: 22px; border-radius: var(--radius);
  background: var(--orange-50); border: 1px solid #fed7aa; border-left: 6px solid var(--orange-500);
}
.transparency h3 { font-size: 1.1rem; }
.transparency p { margin: 0; }
.transparency-icon { width: 28px; height: 28px; flex: none; color: var(--orange-700); }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: none; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step {
  position: relative; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.step h3 { font-size: 1.08rem; }
.step p { color: var(--muted); margin: 0; font-size: .98rem; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 12px;
  background: var(--navy-900); color: var(--orange-500); font-weight: 800; font-size: 1.1rem;
}
.center-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
@media (max-width: 599px) { .center-actions .btn { width: 100%; } }

/* ---------- Split / por qué ---------- */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 36px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange-500); color: var(--navy-900);
  font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center;
}
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-wide { grid-column: 1 / -1; }

/* ---------- Ranuras de fotos ----------
 * <div class="foto foto--4x3" data-foto="clave"> <img> <span class="foto-ph"> </div>
 * La relación de aspecto es fija (padding-top), así la página no salta al cargar la foto
 * y la ranura vacía se ve prolija. La foto se muestra recién cuando carga (.has-foto). */
.foto {
  position: relative; overflow: hidden; margin: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
.foto::before { content: ""; display: block; padding-top: 75%; }   /* 4:3 por defecto */
.foto--4x3::before { padding-top: 75%; }
.foto--16x9::before { padding-top: 56.25%; }
.foto--3x2::before { padding-top: 66.667%; }
.foto img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; visibility: hidden;
}
.foto.has-foto img { visibility: visible; }
.foto-ph {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; text-align: center; font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  color: #64748b; border: 1px dashed #cbd5e1; border-radius: inherit;
}
.foto-ph svg { width: 34px; height: 34px; opacity: .55; }
.foto.has-foto .foto-ph { display: none; }
.foto--oscura { background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%); }
.foto--oscura .foto-ph { color: var(--on-dark-muted); border-color: var(--navy-700); }
.foto--oscura .foto-ph svg { color: var(--orange-500); opacity: .8; }

/* ---------- Galería de trabajos ---------- */
.sub-head { font-size: 1.15rem; margin: 0 0 14px; color: var(--navy-800); }
.grupo-fotos + .grupo-fotos { margin-top: 40px; }
/* Ranuras/bloques ocultos desde js/fotos-datos.js (mostrar: 'si-hay-foto' o 'nunca') */
.tj-oculto { display: none !important; }
.ad-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .ad-grid { grid-template-columns: 1fr 1fr; } }
.ad { margin: 0; }
.ad-par { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ad-par .foto:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.ad-par .foto:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
/* Etiqueta de etapa REAL de la foto (sale de js/fotos-datos.js): en proceso, terminado, al ingresar, instalaciones */
.etapa-tag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: .25em .7em; border-radius: 999px;
  background: rgba(15, 23, 42, .85); color: var(--on-dark);
}
.etapa-tag[data-etapa="terminado"] { background: var(--orange-500); color: var(--navy-900); }
.etapa-tag[data-etapa="instalaciones"] { background: rgba(255, 255, 255, .9); color: var(--navy-900); }
.etapa-tag:empty { display: none; }
.etapa-txt { color: var(--text); }
.ad figcaption, .galeria-item figcaption { margin-top: 10px; font-size: .95rem; color: var(--muted); }
/* Galería compacta: miniaturas parejas (2 por fila en celular, 4 en PC), centradas si hay menos */
.galeria { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.galeria-item { flex: 0 0 calc(50% - 6px); max-width: calc(50% - 6px); }
/* En PC las columnas se adaptan a las fotos visibles (2, 3 o 4), sin huecos */
@media (min-width: 900px) {
  .galeria { gap: 16px; }
  .galeria-item { flex-basis: calc(25% - 12px); max-width: calc(25% - 12px); }
}
.galeria-item { margin: 0; }
.galeria-item figcaption { font-size: .88rem; }

/* ---------- Fachada (contacto) ---------- */
.fachada { margin: 0; }
.fachada figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; color: var(--on-dark-muted);
}

/* ---------- Reseñas ---------- */
.review { display: flex; flex-direction: column; gap: 12px; }
.review.is-example { border-style: dashed; box-shadow: none; }
.review-stars { color: #b45309; font-size: 1.2rem; letter-spacing: .12em; line-height: 1; }
.review-stars-vacio { color: #94a3b8; }
.review blockquote { margin: 0; font-size: 1.05rem; color: var(--text); flex: 1; }
.review blockquote p { margin: 0; }
.review.is-example blockquote { color: var(--muted); font-style: italic; }
.review figcaption { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.review-name { color: var(--text); }
.review-meta { font-size: .88rem; color: var(--muted); }
.example-tag {
  align-self: flex-start; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  background: #fef9c3; color: #713f12; padding: .2em .6em; border-radius: 6px;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; min-height: 48px;
  font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; line-height: 1; color: var(--orange-700);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* ---------- Contacto ---------- */
.contact-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .icon { width: 26px; height: 26px; color: var(--orange-500); flex: none; margin-top: 2px; }
.contact-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--on-dark-muted); }
.contact-list a { font-weight: 700; font-size: 1.1rem; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-muted); padding: 40px 0 96px; font-size: .95rem; }
.footer-inner { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) {
  .site-footer { padding-bottom: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr 1.6fr; }
}
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand img { border-radius: 50%; }
.footer-brand strong { display: block; color: var(--on-dark); }
.footer-data { font-style: normal; }
.site-footer a { color: var(--orange-500); }
.footer-legal p { margin: 0 0 .6em; font-size: .88rem; }
.copyright { color: #94a3b8; }

/* ---------- WhatsApp flotante (solo celular) ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--wa); color: #052e16; box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.wa-float svg { width: 32px; height: 32px; }
@media (min-width: 900px) { .wa-float { display: none; } }

/* ---------- Aviso de pendiente (solo modo borrador; en publicación se elimina) ---------- */
.pendiente-box {
  max-width: 720px; margin: 0 auto; padding: 18px 20px; border-radius: var(--radius);
  border: 2px dashed #eab308; background: #fefce8; color: #713f12; text-align: center;
}
.pendiente-box strong { display: inline-block; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin-bottom: 4px; }
.pendiente-box p { margin: 0; }
.pendiente-box code { font-size: .9em; }
[hidden] { display: none !important; }

/* ---------- Ampliar fotos ---------- */
.foto-ampliar {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2;
  margin: 0; padding: 0; border: 0; background: transparent; cursor: zoom-in;
  border-radius: inherit;
}
.foto-ampliar-ico {
  position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .72); color: #fff; transition: transform .15s, background-color .15s;
}
.foto-ampliar-ico svg { width: 20px; height: 20px; }
.foto-ampliar:hover .foto-ampliar-ico, .foto-ampliar:focus-visible .foto-ampliar-ico { background: var(--orange-500); color: var(--navy-900); transform: scale(1.06); }
.foto-ampliar:focus-visible { outline: 3px solid var(--orange-500); outline-offset: -3px; }
.foto .etapa-tag { z-index: 3; pointer-events: none; }

/* ---------- Lightbox ---------- */
html.lb-abierto, html.lb-abierto body { overflow: hidden; }
.lb {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200;
  background: rgba(2, 6, 23, .97);
  display: flex; align-items: center; justify-content: center;
}
.lb-marco {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 16px 24px;
}
.lb-fig { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-img {
  display: block; max-width: min(1200px, 100%); max-height: calc(100vh - 190px);
  width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #0b1120;
}
.lb-cap {
  margin-top: 14px; max-width: 900px; text-align: center; color: var(--on-dark); font-size: 1rem; line-height: 1.5;
}
.lb-cap .etapa-tag { position: static; display: inline-block; vertical-align: middle; margin-right: 6px; }
.lb-cont { margin: 6px 0 0; color: var(--on-dark-muted); font-size: .9rem; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.lb-btn svg { width: 26px; height: 26px; }
.lb-btn:hover, .lb-btn:focus-visible { background: var(--orange-500); color: var(--navy-900); }
.lb-cerrar { top: 10px; right: 10px; }
.lb-ant { left: 10px; top: 50%; margin-top: -24px; }
.lb-sig { right: 10px; top: 50%; margin-top: -24px; }
@media (max-width: 599px) {
  .lb-marco { padding: 64px 8px 16px; }
  .lb-img { max-height: calc(100vh - 230px); border-radius: 6px; }
  .lb-ant, .lb-sig { top: auto; bottom: 14px; margin-top: 0; }
  .lb-cont { margin-bottom: 52px; }
}

/* ---------- Pie: datos fiscales y QR de Data Fiscal ---------- */
.footer-fiscal { color: var(--on-dark); font-weight: 600; }
.footer-resumen { color: var(--on-dark-muted); }
.footer-qr { display: flex; align-items: center; gap: 14px; margin: 12px 0 14px; }
.footer-qr > div { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.footer-legal-link { font-weight: 700; font-size: 1rem; }
/* QR: fondo blanco con margen (zona de silencio) y escalado suave. El QR original tiene módulos de
   ~10,8 px, no enteros: el escalado "pixelado" los dejaría desparejos. */
.footer-qr-img, .qr-fiscal {
  display: inline-block; background: #fff; padding: 6px; border-radius: 8px; line-height: 0;
}
.footer-qr-img img { width: 88px; height: 88px; }
.footer-qr-img:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 3px; }

/* ---------- Página de información legal ---------- */
.legal-page { padding: 40px 0 56px; }
@media (min-width: 900px) { .legal-page { padding: 64px 0 88px; } }
.legal-page h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); margin-bottom: .8em; }
.legal-page h2 { font-size: 1.3rem; margin: 2em 0 .6em; padding-top: .2em; border-top: 1px solid var(--line); padding-top: 1.2em; }
.legal-page p { max-width: 46em; }
.legal-datos {
  display: grid; grid-template-columns: 1fr; gap: 4px 20px; margin: 0; padding: 18px 20px;
  background: var(--bg-alt); border-radius: var(--radius); border: 1px solid var(--line);
}
.legal-datos dt { font-weight: 700; color: var(--text); }
.legal-datos dd { margin: 0 0 10px; color: var(--muted); overflow-wrap: anywhere; }
@media (min-width: 640px) {
  .legal-datos { grid-template-columns: max-content 1fr; }
  .legal-datos dd { margin: 0; }
}
.qr-fiscal { padding: 10px; border: 1px solid var(--line); margin: 6px 0 10px; }
.qr-fiscal img { width: 160px; height: 160px; }
.legal-volver { margin-top: 2.2em; }
.legal-copy { margin-top: 2em; color: var(--muted); font-size: .95rem; }
