/* ============================================================
   Tarjeta digital · L&A Wood Design · el boceto de Daniel, pulido
   Paleta, tipografias y estructura del boceto; profundidad (aurora + grano + sombras tintadas),
   micro-motion con significado (GPU-only, reduced-motion-safe) y relojeria del grupo.
   Las fuentes las referencia build.mjs con su hash (fonts/<nombre>.woff2 -> /assets/fonts/...).
   ============================================================ */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-latin-var.d80df8ff.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/jost-latin-var.7726a5cd.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* respaldos metricos: Cormorant es estrecha y de ojo pequeno; Jost es geometrica */
@font-face { font-family: 'Cormorant fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 92%; ascent-override: 92%; descent-override: 28%; }
@font-face { font-family: 'Jost fallback'; src: local('Century Gothic'), local('Avenir Next'), local('Helvetica Neue'), local('Arial'); size-adjust: 97%; }

:root {
  --bg: #0b211c;
  --bg-2: #0f2d26;
  --card: #123630;
  --card-2: #16423a;
  --wood: #6b3f24;
  --wood-2: #3d2314;
  --gold: #d9b07a;
  --gold-2: #e6c391;
  --gold-deep: #b08a52;
  --cream: #f3ead9;
  --muted: #b9c4bd;
  --ink: #1b120a;
  --line: rgba(217, 176, 122, .4);
  --line-strong: rgba(217, 176, 122, .62);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 2px 6px -2px rgba(0, 0, 0, .45), 0 20px 40px -24px rgba(0, 10, 8, .7);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 6px 14px -6px rgba(0, 0, 0, .5), 0 28px 48px -26px rgba(0, 10, 8, .8);
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --ease-quint: cubic-bezier(.25, .8, .25, 1);
  --ease-signature: cubic-bezier(.2, 0, 0, 1);
  --ease-overshoot: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 150ms;
  --dur-base: 240ms;
  --dur-slow: 460ms;
  --grain: repeating-linear-gradient(98deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 6px, rgba(255, 200, 140, .07) 6px 8px, transparent 8px 13px);
  --f-serif: 'Cormorant Garamond', 'Cormorant fallback', Georgia, serif;
  --f-sans: 'Jost', 'Jost fallback', system-ui, sans-serif;
  color-scheme: dark;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }   /* una clase con display (.ph) le ganaba al [hidden] del navegador */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 400 16px/1.55 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--f-serif); font-weight: 600; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- el campo: aurora + grano + los pilares de madera del boceto ---------- */
.page {
  position: relative;
  overflow: clip;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 70% at 8% -10%, rgba(22, 66, 58, .85), transparent 58%),
    radial-gradient(70% 50% at 100% 0%, rgba(217, 176, 122, .10), transparent 55%),
    radial-gradient(130% 90% at 90% 110%, rgba(15, 45, 38, .95), transparent 60%);
}
.page::before, .page::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 560px;
  border-radius: 50%;
  background:
    linear-gradient(160deg, rgba(255, 220, 170, .14), transparent 42%),
    var(--grain),
    linear-gradient(160deg, #8a5330, var(--wood) 45%, var(--wood-2));
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .55), 0 40px 80px -30px rgba(0, 0, 0, .7);
  opacity: .78;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 55%, transparent 100%);
}
.page::before { left: -150px; top: 70px; transform: rotate(14deg); }
.page::after { right: -150px; top: -60px; transform: rotate(-12deg); }
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
.in { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- conmutador de idioma (enlace a la otra pagina) ---------- */
.lang {
  position: fixed;
  z-index: 5;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 33, 28, .86);
  box-shadow: var(--shadow-card);
  font: 500 13px/1 var(--f-sans);
  letter-spacing: .12em;
  color: var(--muted);
  text-decoration: none;
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.lang__code { position: relative; padding: 4px 2px; transition: color .35s ease; }
.lang__code::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  border-radius: 9999px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-overshoot);
}
.lang__code.on { color: var(--gold); }
.lang__code.on::after { transform: scaleX(1); }
.lang__dot { color: var(--line-strong); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lang:hover { border-color: var(--gold); transform: translateY(-1px); }
  .lang:hover .lang__code.on::after, .lang:focus-visible .lang__code.on::after { transform: scaleX(0); }
  .lang:hover .lang__code:not(.on)::after, .lang:focus-visible .lang__code:not(.on)::after { transform: scaleX(1); }
  .lang:hover .lang__code:not(.on), .lang:focus-visible .lang__code:not(.on) { color: var(--gold); }
}

/* ---------- hero ---------- */
.hero { display: grid; gap: 28px; padding-top: 34px; text-align: center; }
.logo { width: 190px; height: 190px; margin: 0 auto 14px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); }
h1 { font-size: 46px; line-height: 1.05; letter-spacing: -.01em; }
.role { margin: 6px 0 0; color: var(--gold); letter-spacing: .28em; padding-left: .28em; text-transform: uppercase; font-size: 14px; font-weight: 500; }
.tag { margin: 16px 0 4px; font-size: 18px; font-weight: 300; letter-spacing: .01em; text-wrap: balance; }
.sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; letter-spacing: .16em; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 auto 16px; max-width: 420px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; color: var(--cream); }
.ic {
  width: 60px; height: 60px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(90% 70% at 10% 0%, rgba(255, 255, 255, .08), transparent 60%),
    linear-gradient(160deg, rgba(18, 54, 48, .9), rgba(11, 33, 28, .9));
  box-shadow: var(--shadow-card);
  display: grid; place-items: center;
  transition: transform var(--dur-fast) var(--ease-quint), border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--ease-quint);
}
.ic svg, .btn svg { width: 24px; height: 24px; stroke: var(--gold); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.btns { display: grid; gap: 10px; max-width: 420px; margin: 0 auto; }
.btns__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(22, 66, 58, .92), rgba(18, 54, 48, .92));
  box-shadow: var(--shadow-card);
  color: var(--cream);
  font: 400 16px/1.2 var(--f-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-quint), border-color var(--dur-fast) ease, box-shadow var(--dur-base) var(--ease-quint);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.main {
  overflow: hidden;
  isolation: isolate;          /* el destello (::after, z-index -1) pasa por debajo del texto */
  border-color: transparent;
  background: linear-gradient(135deg, #ecd0a4 0%, var(--gold) 36%, #c99c62 72%, #e3bf88 100%);
  color: var(--ink);
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 12px 26px -14px rgba(217, 176, 122, .75), 0 1px 2px rgba(0, 0, 0, .35);
}
.btn.main svg { stroke: var(--ink); }
/* filo luminoso de 1 px (gradiente asimetrico con mascara), estatico */
.btn.main::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .18) 38%, rgba(110, 72, 24, .4) 70%, rgba(255, 255, 255, .65));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
/* destello unico cuando el boton entra en vista: "esta es la accion" */
.btn.main::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0; width: 46%; z-index: -1;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .5) 48%, transparent 64%);
  transform: translateX(-140%);
  pointer-events: none;
}
html.reveal-js .btn.main.is-glint::after { animation: glint 1.1s var(--ease-signature) .35s 1 both; }
@keyframes glint { to { transform: translateX(340%); } }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover, .quick a:hover .ic { transform: translateY(-2px); border-color: var(--gold); box-shadow: var(--shadow-lift); }
  .btn.main:hover { border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 18px 30px -14px rgba(217, 176, 122, .85), 0 1px 2px rgba(0, 0, 0, .35); }
}
.btn:active, .quick a:active .ic, .chip:active, .qrbox:active { transform: translateY(0) scale(.98); transition-duration: 80ms; }

/* marcos de foto (boceto): fondo de madera mientras carga, imagen a cubrir */
.ph {
  position: relative; overflow: hidden;
  background: var(--grain), linear-gradient(135deg, #7a4a2b, #2b180d 75%);
  display: grid; place-items: center;
  color: rgba(243, 234, 217, .5); font-size: 12px;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heroimg {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}
.heroimg::after {   /* luz de borde y viñeta: la foto gana cuerpo sin filtros */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 30%, transparent 70%, rgba(0, 0, 0, .28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
/* foco de cada foto (fotos.json: "pos") sin style= (la CSP no lo admite) */
[data-pos="top"] img { object-position: 50% 18%; }
[data-pos="bottom"] img { object-position: 50% 82%; }
[data-pos="left"] img { object-position: 18% 50%; }
[data-pos="right"] img { object-position: 82% 50%; }

/* ---------- secciones ---------- */
h2 { font-size: 32px; margin: 52px 0 6px; }
h2::after { content: ""; display: block; width: 56px; height: 1px; background: var(--gold); margin-top: 8px; }
.lead { margin: 12px 0 0; max-width: 46ch; color: var(--muted); text-wrap: balance; }

.svcs { display: grid; gap: 14px; margin-top: 18px; }
.svc {
  display: grid; grid-template-columns: 120px 1fr;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, rgba(22, 66, 58, .85), rgba(18, 54, 48, .85));
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-quint), box-shadow var(--dur-base) var(--ease-quint);
}
.svc .ph { aspect-ratio: 1; min-height: 110px; }
.svc__txt { padding: 14px 16px; align-self: center; }
.svc h3 { font-size: 24px; line-height: 1.1; }
.svc p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
/* v0 (sin foto): baldosa de madera con el icono incrustado en oro, una veta por tarjeta */
.svc:nth-child(1) { --t1: #7a4a2b; --t2: #3d2314; }
.svc:nth-child(2) { --t1: #9a6238; --t2: #4a2c18; }
.svc:nth-child(3) { --t1: #5a3520; --t2: #1f1109; }
.svc__ico {
  display: grid; place-items: center; min-height: 110px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(90% 70% at 25% 8%, rgba(255, 220, 170, .18), transparent 60%),
    var(--grain),
    linear-gradient(150deg, var(--t1), var(--t2) 85%);
  box-shadow: inset 0 1px 0 rgba(255, 220, 170, .16), inset 0 -20px 28px -20px rgba(0, 0, 0, .55);
}
.svc__ico svg { width: 34px; height: 34px; stroke: var(--gold-2); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .55)); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a.svc:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.chip {
  min-height: 44px; padding: 10px 13px;
  border: 1px solid rgba(217, 176, 122, .5); border-radius: 99px;
  background: none; color: var(--cream);
  font: 400 14px/1 var(--f-sans); cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-overshoot);
}
.chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 500; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .chip:hover { border-color: var(--gold); } }

.car { position: relative; }
.track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px; -webkit-overflow-scrolling: touch; }
.track::-webkit-scrollbar { display: none; }
.slide {
  position: relative;
  flex: 0 0 82%; height: 230px; padding: 0;
  border: 1px solid rgba(217, 176, 122, .35); border-radius: 14px;
  scroll-snap-align: start; cursor: zoom-in;
  font: inherit; color: inherit;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-quint);
}
.slide__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.25rem .85rem .7rem;
  text-align: left; font-size: 14px; color: var(--cream);
  background: linear-gradient(to top, rgba(11, 33, 28, .78), transparent);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .slide:hover { border-color: var(--gold); transform: translateY(-2px); } }
.arr {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); background: rgba(11, 33, 28, .88); color: var(--gold);
  font-size: 22px; line-height: 1; cursor: pointer; display: none;
  transition: transform var(--dur-fast) var(--ease-overshoot), background var(--dur-fast) ease;
}
.arr.l { left: -8px; } .arr.r { right: -8px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .arr:hover { background: var(--card); transform: scale(1.06); } }
.dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--gold); transition: background var(--dur-base) ease, transform var(--dur-base) var(--ease-overshoot); }
.dots i.on { background: var(--gold); transform: scale(1.15); }
.btn--ig { max-width: 420px; margin: 0 auto; }

/* ---------- contacto + QR ---------- */
.cgrid { display: grid; gap: 26px; }
.qrbox {
  position: relative;
  display: grid; gap: 8px; justify-items: center;
  width: max-content; margin: 16px 0 0; padding: 18px 18px 14px;
  border: 0; border-radius: 18px;
  background: linear-gradient(160deg, #fbf5e8, var(--cream) 60%, #ebdfc7);
  color: #1a1a1a; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 6px -2px rgba(0, 0, 0, .45), 0 26px 44px -26px rgba(0, 10, 8, .9);
  transition: transform var(--dur-fast) var(--ease-quint), box-shadow var(--dur-base) var(--ease-quint);
}
.qrbox::before {   /* filo champan de 1 px */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--gold-2), rgba(217, 176, 122, .25) 40%, var(--gold-deep) 75%, var(--gold-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.qrbox__code svg { width: 200px; height: 200px; }
/* el SVG del QR trae su propio fondo plano: sobre la placa degradada fabricaba una losa; la zona de silencio sigue (margen de 4 módulos sobre la placa clara) */
.qrbox__code svg path:first-child, .qrf__code svg path:first-child { fill: transparent; }
.qrbox small { display: block; max-width: 220px; letter-spacing: .18em; font-size: 13px; line-height: 1.4; font-weight: 500; text-transform: uppercase; color: #4a3b24; text-wrap: balance; }
@media (max-width: 759px) {
  .qrbox { width: 100%; }
  .qrbox__code svg { width: 220px; height: 220px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .qrbox:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 6px 14px -6px rgba(0, 0, 0, .5), 0 32px 52px -28px rgba(0, 10, 8, .95); } }

.rows { border-top: 1px solid rgba(217, 176, 122, .5); margin-bottom: 16px; }
.rows a, .rows .row-static { display: flex; align-items: center; gap: 14px; min-height: 46px; margin: 0; padding: 11px 0; text-decoration: none; word-break: break-word; }
.rows .ic { width: 46px; height: 46px; border-radius: 14px; flex: none; }
.rows .row-static { color: var(--muted); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .rows a:hover { color: var(--gold); } }

/* el pie lleva un zocalo de madera (el toe-kick de un mueble): la madera tambien abajo, no solo en el hero */
footer { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 13px; margin-top: 40px; padding: 44px 20px 22px; letter-spacing: .04em; }
footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: linear-gradient(180deg, rgba(255, 220, 170, .2), transparent 45%), var(--grain), linear-gradient(90deg, var(--wood-2), var(--wood) 50%, var(--wood-2));
  box-shadow: 0 -1px 0 var(--line-strong), 0 -16px 28px -14px rgba(0, 0, 0, .55);
}

/* ---------- visor ---------- */
dialog.lb {
  border: 1px solid var(--gold); border-radius: 16px;
  background: var(--bg); color: var(--cream);
  padding: 12px; width: min(92vw, 900px); max-width: 92vw;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
}
dialog.lb::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(8px); }
.lb__fig { margin: 0; display: grid; gap: 8px; }
.lb__fig img { width: 100%; height: auto; max-height: min(62vh, 560px); object-fit: contain; border-radius: 10px; background: #061511; }
.lb__fig figcaption { font-size: 14px; color: var(--muted); min-height: 1.3em; }
.lbbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lbbar button { min-height: 44px; background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: 10px; padding: 8px 14px; font: inherit; cursor: pointer; }
.lbbar span { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .lbbar button:hover { background: var(--card); } }
/* movil: el visor es la pantalla entera (sobre dialog[open], nunca dialog{display}: dejaria el visor siempre abierto) */
@media (max-width: 759px) {
  dialog.lb[open] { display: grid; grid-template-rows: 1fr auto; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .lb__fig { grid-template-rows: 1fr auto; gap: 0; min-height: 0; }
  .lb__fig img { height: 100%; max-height: none; border-radius: 0; }
  .lb__fig figcaption { padding: 10px 16px 0; }
  .lbbar { margin: 0; padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px); }
  .car { margin-inline: -20px; }
  .track { padding: 2px 20px; scroll-padding-inline: 20px; }
}

/* ---------- QR a pantalla completa (la placa clara: el momento de la reunion) ---------- */
dialog.qrf {
  border: 0; margin: 0; padding: 0;
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: linear-gradient(160deg, #fbf5e8, var(--cream) 55%, #ecdfc6);
  color: #1a1a1a;
}
dialog.qrf::backdrop { background: var(--cream); }
dialog.qrf::after {   /* zocalo de madera al pie de la placa */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: var(--grain), linear-gradient(90deg, var(--wood-2), var(--wood) 50%, var(--wood-2));
  box-shadow: 0 -1px 0 var(--gold-deep);
}
.qrf__in { position: relative; display: grid; align-content: center; justify-items: center; gap: 10px; height: 100%; padding: calc(env(safe-area-inset-top, 0px) + 24px) 24px calc(env(safe-area-inset-bottom, 0px) + 40px); }
.qrf__emb { width: 56px; height: 56px; margin-bottom: 4px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .25)); }
.qrf__code svg { width: min(84vw, 62vh); height: auto; }
.qrf__h { margin: 14px 0 0; font: 600 clamp(22px, 5.5vw, 30px)/1.1 var(--f-serif); color: #14110b; text-align: center; }
.qrf__h::after { content: ""; display: block; width: 56px; height: 1px; background: var(--gold-deep); margin: 12px auto 0; }
.qrf__p { margin: 0; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #5b4a2c; text-align: center; }
.qrf__close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--gold-deep); background: rgba(255, 255, 255, .55); color: #14110b; cursor: pointer;
  display: grid; place-items: center;
}
.qrf__close svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- reveal de una vez (nunca el hero ni el H1) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s cubic-bezier(.16, 1, .3, 1); }
  html.reveal-js .reveal.is-revealed { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 404 ---------- */
body.p404 { min-height: 100dvh; display: grid; place-items: center; text-align: center; background-image: radial-gradient(120% 70% at 8% -10%, rgba(22, 66, 58, .85), transparent 58%); }
.p404__in { display: grid; gap: 28px; justify-items: center; padding: 40px 20px; }
.p404__logo { width: 120px; height: 120px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .5)); }
.p404__bloque { display: grid; gap: 10px; justify-items: center; }
.p404__bloque h1, .p404__bloque h2 { font-size: 30px; margin: 0; }
.p404__bloque h2::after { display: none; }
.p404__bloque p { margin: 0; color: var(--muted); }
.p404__bloque .btn { width: auto; min-width: 220px; margin-top: 6px; }

/* ---------- escritorio ---------- */
@media (min-width: 760px) {
  .svcs { grid-template-columns: repeat(3, 1fr); }
  .svc { grid-template-columns: 1fr; }
  .svc .ph { aspect-ratio: 16 / 10; min-height: 190px; }
  .svc__ico { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--line); }
  .slide { flex-basis: calc((100% - 24px) / 3); }
  .arr { display: block; }
  .cgrid { grid-template-columns: auto 1fr; gap: 56px; align-items: start; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding-top: 56px; }
  .hero--v0 { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }   /* sin foto: una columna centrada, sin hueco */
  .heroimg { aspect-ratio: auto; min-height: 520px; }
  h1 { font-size: 54px; }
}
