/* Catálogo DigitalPro: Apple (aire, tipografía grande) + Vercel (blanco y negro, líneas finas, Geist). Tema claro y oscuro. */
:root {
  --bg: #ffffff; --bg-soft: #fafafa; --card: #ffffff; --ink: #0a0a0a; --muted: #666666; --line: #eaeaea; --chip: #f2f2f2; --chip-ink: #4d4d4d;
  --btn: #0a0a0a; --btn-ink: #ffffff; --wa: #1f8f5f; --glass: rgba(255, 255, 255, .78); --gridline: rgba(0, 0, 0, .06);
  --shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 4px rgba(0, 0, 0, .04), 0 12px 24px -8px rgba(0, 0, 0, .12), 0 28px 48px -24px rgba(0, 0, 0, .18);
  --glow-a: #f0a6c4; --glow-b: #a99cf0; --glow-c: #8fc6ee; --glow-d: #8fd8b5;
  --r-lg: 20px; --r-md: 14px; --pill: 999px;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --sc: 0;
  color-scheme: light;
}
/* Oscuro: elección guardada o, si no hay, el ajuste del teléfono. */
:root[data-theme="dark"] {
  --bg: #0a0a0a; --bg-soft: #111111; --card: #111111; --ink: #ededed; --muted: #a1a1a1; --line: #262626; --chip: #1f1f1f; --chip-ink: #b4b4b4;
  --btn: #ededed; --btn-ink: #0a0a0a; --glass: rgba(10, 10, 10, .72); --gridline: rgba(255, 255, 255, .07);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 28px -10px rgba(0, 0, 0, .8), 0 30px 60px -30px rgba(0, 0, 0, .9);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a; --bg-soft: #111111; --card: #111111; --ink: #ededed; --muted: #a1a1a1; --line: #262626; --chip: #1f1f1f; --chip-ink: #b4b4b4;
    --btn: #ededed; --btn-ink: #0a0a0a; --glass: rgba(10, 10, 10, .72); --gridline: rgba(255, 255, 255, .07);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 28px -10px rgba(0, 0, 0, .8), 0 30px 60px -30px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-viewing { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .3s ease, color .3s ease; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* Barra superior */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.top__tools { display: flex; gap: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -.02em; }
.brand__mark { width: 32px; height: 32px; border-radius: 50%; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); cursor: pointer; }
.ico { display: contents; } /* envoltura de los íconos de la biblioteca (biblioteca.js): el svg se acomoda como antes */
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: var(--pill);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s ease, opacity .2s ease; }
.btn:active { transform: scale(.96); }
.btn--dark { background: var(--btn); color: var(--btn-ink); }
.btn--light { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--wa { background: var(--wa); color: #fff; }

/* Portada: cuadrícula fina que se desvanece (Vercel) y título grande (Apple) */
.hero { position: relative; isolation: isolate; padding: 64px 16px 48px; text-align: center; overflow: hidden; }
.grid-bg { position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--gridline) 1px, transparent 1px), linear-gradient(90deg, var(--gridline) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 65% at 50% 30%, #000 30%, transparent 75%); }
.eyebrow { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); font-size: 13px; font-weight: 500; color: var(--muted); }
.hero h1 { max-width: 15ch; margin: 18px auto 16px; font-size: clamp(36px, 10vw, 68px); line-height: 1.04; font-weight: 700; letter-spacing: -.045em; }
.lead { max-width: 32ch; margin: 0 auto 28px; color: var(--muted); font-size: 18px; }

/* Entrada: letras del título y luego el resto */
.w { display: inline-block; white-space: nowrap; }
.l { display: inline-block; opacity: 0; transform: translateY(.45em); filter: blur(4px);
  animation: letter .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i) * 18ms + .15s); }
@keyframes letter { to { opacity: 1; transform: none; filter: blur(0); } }
.rise { opacity: 0; transform: translateY(14px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, .05s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Aparecen al llegar a la pantalla */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in, .no-reveal .reveal { opacity: 1; transform: none; }

/* Contorno de color que recorre el borde al desplazarse (--sc lo mueve landing.js) */
.glow { position: relative; }
.glow::before { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from calc(var(--sc) * 1deg + var(--i, 0) * 47deg),
    transparent 0deg, var(--glow-a) 30deg, var(--glow-b) 60deg, transparent 100deg,
    transparent 180deg, var(--glow-c) 210deg, var(--glow-d) 240deg, transparent 280deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }

/* Personalización */
.promise { display: grid; gap: 14px; padding: 8px 16px; max-width: 1120px; margin: 0 auto; }
.panel { padding: 24px 22px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.panel h2 { font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.panel p { margin-top: 8px; color: var(--muted); }
.feats { display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; font-weight: 500; font-size: 16px; line-height: 1.3; }
.feats li { display: flex; align-items: center; gap: 12px; }
.dot { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); flex: none; }
.panel--idea .btn { margin-top: 18px; width: 100%; }

/* Lista de plantillas: dos por renglón en celular */
.list { max-width: 1200px; margin: 0 auto; padding: 56px 12px 24px; scroll-margin-top: 64px; }
.list__head { padding: 0 4px; }
.list__head h2 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.04em; }
.list__head p { margin-top: 6px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.card { display: flex; flex-direction: column; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); }
.card__shot { position: relative; display: block; margin: 6px 6px 0; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--bg-soft); cursor: pointer; aspect-ratio: 390 / 844; }
.card__shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: var(--pill); background: rgba(255, 255, 255, .9); color: #0a0a0a;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; flex: 1; }
.tags { align-self: flex-start; padding: 3px 8px; border-radius: 8px; background: var(--chip); color: var(--chip-ink); font-size: 11.5px; line-height: 1.35; font-weight: 500; }
.card h3 { margin-top: 2px; font-size: 18px; line-height: 1.15; font-weight: 600; letter-spacing: -.03em; }
.card__desc { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.card__actions { display: grid; gap: 8px; margin-top: auto; padding-top: 8px; }
.card__actions .btn { width: 100%; min-height: 42px; padding: 0 12px; font-size: 14.5px; }

/* Deslizar / Cuadrícula */
.list__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 12px; }
.list__head > p { flex-basis: 100%; order: 1; }
.views { order: 2; display: flex; gap: 4px; padding: 3px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); }
.views button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border: 0; border-radius: var(--pill); background: none; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.views svg { width: 18px; height: 18px; }
.views button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); }

/* Vista Deslizar: una a la vez, como la galería "Detrás de cámaras" de Noche de gala.
   La del centro crece un poco y las de los lados se encogen (--k lo pone landing.js al deslizar). */
/* La tira ocupa todo el ancho de la ventana. Es un ciclo: landing.js pone copias antes y después y salta en silencio a las reales.
   La tarjeta completa cabe en la pantalla (--h): la foto toma el espacio que sobra y se recorta desde arriba. */
.grid.is-slide { --w: min(74vw, 320px); --h: clamp(380px, calc(100svh - 150px), 780px); position: relative; display: flex; gap: 14px; margin-inline: calc(50% - 50vw);
  padding: 18px calc(50vw - var(--w) / 2) 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.grid.is-slide::-webkit-scrollbar { display: none; }
.grid:not(.is-slide) .is-clone { display: none; }
.is-slide .card { flex: none; width: var(--w); height: var(--h); scroll-snap-align: center; scroll-snap-stop: always; scale: var(--k, 1); transform-origin: center; will-change: scale; }
.is-slide .card__shot { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
.is-slide .card__shot img { object-position: top; }
.is-slide .card__body { flex: none; }
.is-slide .tags { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-slide .card__desc { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: -8px; }
.slide-nav[hidden] { display: none; }
.slide-nav__pos { min-width: 68px; text-align: center; color: var(--muted); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.slide-nav__pos [data-pos] { color: var(--ink); font-weight: 600; }

.foot { padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 24px; }
.foot__legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; }
.foot__legal a { color: var(--ink); text-underline-offset: 3px; }

/* Visor de demo: nombre centrado (rejilla de 3 columnas iguales a los lados) */
.viewer { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg-soft); color: var(--ink); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(0, 0, 0, .5); }
.viewer__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.viewer__bar .pill-btn { justify-self: start; }
.viewer__tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.pill-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 8px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); font-weight: 500; text-decoration: none; cursor: pointer; }
.viewer__name { min-width: 0; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 16px; font-weight: 600; }
.devices { display: none; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); }
.devices button { display: grid; place-items: center; width: 38px; height: 32px; border: 0; border-radius: var(--pill); background: none; cursor: pointer; color: var(--muted); }
.devices button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); }
.viewer__stage { flex: 1; display: flex; justify-content: center; min-height: 0; }
.viewer__stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.viewer__quote { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.viewer__quote:active { transform: translateX(-50%) scale(.97); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 10; padding: 12px 18px; border-radius: var(--pill); background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 15px;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .3s ease, opacity .3s ease; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 700px) {
  .hero { padding: 104px 24px 72px; }
  .promise { grid-template-columns: 1.3fr 1fr; padding: 8px 24px; }
  .list { padding: 80px 24px 32px; }
  .grid.is-slide { --w: 340px; gap: 22px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .card__body { padding: 14px 14px 16px; }
  .card h3 { font-size: 21px; }
  .card__desc { font-size: 14.5px; }
  .devices { display: flex; }
  .viewer__stage { padding: 24px; }
  .viewer__stage[data-device="phone"] iframe { width: 390px; max-height: 844px; border-radius: 36px; box-shadow: 0 0 0 10px #1d1d1f, 0 30px 60px rgba(0, 0, 0, .25); }
  .viewer__stage[data-device="tablet"] iframe { width: min(820px, 100%); border-radius: 24px; box-shadow: 0 0 0 10px #1d1d1f, 0 30px 60px rgba(0, 0, 0, .25); }
  .viewer__stage[data-device="desktop"] { padding: 0; }
  .viewer__stage[data-device="desktop"] iframe { border-radius: 0; }
}
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .l, .rise { animation: none; opacity: 1; transform: none; filter: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
