/* ────────────────────────────────────────────────────────────────────
   PALET — José Javier Melián Santana
   Diseño cinematográfico panorámico — single page
   Paleta: heredada de la app
     bg #0D0D0D · surface #1A1A1A · accent ocre #E8A042
     accentAlt turquesa #4AABB8 · text #F5F0E8
   ──────────────────────────────────────────────────────────────────── */

:root {
  --bg:           #0D0D0D;
  --bg-soft:      #141414;
  --surface:      #1A1A1A;
  --surface-alt:  #252525;
  --line:         rgba(255,255,255,0.10);
  --line-strong:  rgba(255,255,255,0.18);

  --accent:       #E8A042;   /* ocre — Riscos */
  --accent-alt:   #4AABB8;   /* turquesa — Mecanos */
  --accent-3:     #7DB46C;   /* verde — Peces */
  --accent-4:     #C8956D;   /* arena — Botes */

  --text:         #F5F0E8;
  --text-soft:    #B8B0A8;
  --text-mute:    #6E6862;

  --available:    #2ECC71;
  --acquired:     #6E6862;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.6);
  --shadow-2: 0 24px 60px -16px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.06);
  --shadow-art: 0 40px 100px -20px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);

  --footer-h:    158px;     /* alto del strip de miniaturas */
  --header-h:    72px;
  --easing:      cubic-bezier(.2,.7,.2,1);
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
img {
  display: block; max-width: 100%;
  /* Anti-copia: bloquea selección, drag & drop y "save as" en iOS */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}
a { color: inherit; text-decoration: none; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;        /* página única — sin scroll vertical */
  min-height: 100vh;
  letter-spacing: 0.01em;
}

/* Scrollbar fino en zonas que sí scrollan */
::-webkit-scrollbar         { height: 6px; width: 6px; }
::-webkit-scrollbar-track   { background: transparent; }
::-webkit-scrollbar-thumb   { background: rgba(255,255,255,0.10); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ── Loader ──────────────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 70%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .9s var(--easing);
}
.boot.hidden { opacity: 0; pointer-events: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.boot-mark {
  font-size: 22px; color: var(--accent);
  animation: spin 2.4s linear infinite;
}
.boot-text {
  font-family: 'Fraunces', serif; font-weight: 800;
  letter-spacing: 0.6em; font-size: 13px;
  color: var(--text); opacity: .9;
  padding-left: 0.6em;     /* compensa letter-spacing */
}
.boot-bar {
  width: 240px; height: 2px;
  background: rgba(255,255,255,0.08);
  position: relative; overflow: hidden;
  border-radius: 2px;
}
.boot-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-alt), var(--accent));
  box-shadow: 0 0 12px rgba(232,160,66,0.5);
  transition: width .25s var(--easing);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Backdrop cinematográfico ────────────────────────────────────── */
.backdrop {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  background: var(--bg);
}
.backdrop-img {
  position: absolute; inset: -8%;
  background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.05) brightness(0.55);
  transform: scale(1.15);
  transition: background-image 1.4s var(--easing), opacity .9s var(--easing);
  animation: kenburns 30s ease-in-out infinite alternate;
}
@keyframes kenburns {
  0%   { transform: scale(1.15) translate(0, 0); }
  100% { transform: scale(1.30) translate(-1.5%, -1.5%); }
}
.backdrop-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.92) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.backdrop-grain {
  position: absolute; inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1, 0 0 0 0 1, 0 0 0 0 1, 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ── HUD superior ────────────────────────────────────────────────── */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.brand {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 4px;
  font-family: 'Fraunces', serif;
  letter-spacing: 0.18em;
  transition: opacity .25s var(--easing);
}
.brand:hover { opacity: .85; }
.brand-mark { color: var(--accent); font-size: 14px; }
.brand-name { font-weight: 800; font-size: 16px; color: var(--text); }
.brand-sep { color: var(--text-mute); }
.brand-sub { font-size: 11px; font-weight: 500; color: var(--text-soft); letter-spacing: 0.3em; }

.filters {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0; justify-content: center;
  overflow-x: auto;
  -ms-overflow-style: none; scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  white-space: nowrap;
  transition: background .25s var(--easing), color .25s var(--easing), border-color .25s var(--easing);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c, currentColor);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06);
}
.chip.is-active .chip-dot { box-shadow: 0 0 0 2px rgba(0,0,0,0.10); }
.chip-count {
  font-size: 10px; opacity: .65;
  font-variant-numeric: tabular-nums;
}
.chip-only {
  margin-left: 8px;
  border-color: rgba(46,204,113,0.35);
  color: #c5f1d6;
}
.chip-only.is-active {
  color: var(--bg);
  background: var(--available);
  border-color: var(--available);
}
.chip-mark { color: var(--available); font-size: 9px; }
.chip-only.is-active .chip-mark { color: rgba(0,0,0,0.6); }

.hud-actions { display: flex; align-items: center; gap: 8px; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-soft);
  transition: all .25s var(--easing);
}
.iconbtn:hover { color: var(--text); border-color: var(--accent); }
.iconbtn.is-playing {
  color: var(--bg); background: var(--accent); border-color: var(--accent);
}

/* ── Stage cinematográfica ──────────────────────────────────────── */
.stage {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--footer-h);
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--header-h) + 20px) 90px 60px;
  overflow: hidden;
}

.canvas {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}

/* Imagen activa — múltiples capas posibles para crossfades */
.canvas .frame {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  pointer-events: none;
}
/* Las dos capas (placeholder borroso + picture nítida) se solapan ocupando
   .frame por completo. Cada una es un contenedor flex que centra su <img>. */
.canvas .frame > .frame-placeholder,
.canvas .frame > .frame-full {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.canvas .frame > .frame-placeholder > img,
.canvas .frame > .frame-full > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: var(--shadow-art);
  transform-origin: center center;
}
.canvas .frame > .frame-placeholder > img {
  filter: blur(8px) saturate(1.05);
}
.canvas .frame > .frame-full {
  opacity: 0;
  transition: opacity .2s var(--easing);
}
.canvas .frame > .frame-full.is-loaded { opacity: 1; }
.canvas .frame > .frame-full > img {
  pointer-events: auto;
  cursor: zoom-in;
}

/* ── Efectos de entrada (14, espejo de la app) ──────────────────── */
/* fx-quick: usado en clicks/flechas para sensación instantánea */
.fx-quick       { animation: fx-fade        220ms var(--easing) both; }
.fx-fade        { animation: fx-fade        700ms var(--easing) both; }
.fx-slideLeft   { animation: fx-slideLeft   700ms var(--easing) both; }
.fx-slideRight  { animation: fx-slideRight  700ms var(--easing) both; }
.fx-slideUp     { animation: fx-slideUp     700ms var(--easing) both; }
.fx-slideDown   { animation: fx-slideDown   700ms var(--easing) both; }
.fx-zoomIn      { animation: fx-zoomIn      900ms var(--easing) both; }
.fx-zoomOut     { animation: fx-zoomOut     900ms var(--easing) both; }
.fx-springPop   { animation: fx-springPop   850ms cubic-bezier(.34,1.56,.64,1) both; }
.fx-flipH       { animation: fx-flipH       950ms var(--easing) both; }
.fx-swing       { animation: fx-swing       950ms var(--easing) both; }
.fx-rotateFade  { animation: fx-rotateFade  900ms var(--easing) both; }
.fx-riseUp      { animation: fx-riseUp      850ms var(--easing) both; }
.fx-kenBurns    { animation: fx-kenBurns   1200ms var(--easing) both; }
.fx-drift       { animation: fx-drift      1100ms var(--easing) both; }

@keyframes fx-fade        { from { opacity: 0 }                                         to { opacity: 1 } }
@keyframes fx-slideLeft   { from { opacity: 0; transform: translateX(80px) }            to { opacity: 1; transform: translateX(0) } }
@keyframes fx-slideRight  { from { opacity: 0; transform: translateX(-80px) }           to { opacity: 1; transform: translateX(0) } }
@keyframes fx-slideUp     { from { opacity: 0; transform: translateY(60px) }            to { opacity: 1; transform: translateY(0) } }
@keyframes fx-slideDown   { from { opacity: 0; transform: translateY(-60px) }           to { opacity: 1; transform: translateY(0) } }
@keyframes fx-zoomIn      { from { opacity: 0; transform: scale(0.86) }                 to { opacity: 1; transform: scale(1) } }
@keyframes fx-zoomOut     { from { opacity: 0; transform: scale(1.14) }                 to { opacity: 1; transform: scale(1) } }
@keyframes fx-springPop   { 0% { opacity: 0; transform: scale(0.5) } 60% { opacity: 1; transform: scale(1.06) } 100% { transform: scale(1) } }
@keyframes fx-flipH       { from { opacity: 0; transform: rotateY(80deg) }              to { opacity: 1; transform: rotateY(0) } }
@keyframes fx-swing       { from { opacity: 0; transform: rotate(-8deg) translateY(-30px) } to { opacity: 1; transform: rotate(0) translateY(0) } }
@keyframes fx-rotateFade  { from { opacity: 0; transform: rotate(8deg) scale(0.9) }     to { opacity: 1; transform: rotate(0) scale(1) } }
@keyframes fx-riseUp      { from { opacity: 0; transform: translateY(80px) scale(0.95) } to { opacity: 1; transform: translateY(0) scale(1) } }
@keyframes fx-kenBurns    { from { opacity: 0; transform: scale(1.04) translate(-1%,1%) } to { opacity: 1; transform: scale(1) translate(0,0) } }
@keyframes fx-drift       { from { opacity: 0; transform: translateX(-30px) scale(1.04) } to { opacity: 1; transform: translateX(0) scale(1) } }

/* Salida cuando una imagen es reemplazada */
.canvas .frame.exiting { animation: fx-exit 500ms var(--easing) forwards; }
@keyframes fx-exit { to { opacity: 0; transform: scale(0.985); } }

/* ── Flechas ────────────────────────────────────────────────────── */
.nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 28px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .25s var(--easing);
  opacity: 0.4;
}
.stage:hover .nav-arrow { opacity: 1; }
.nav-arrow:hover {
  background: rgba(232,160,66,0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.06);
}
.nav-prev { left: 16px; }
.nav-next { right: 16px; }
.nav-arrow:disabled { opacity: 0.15; cursor: not-allowed; }

.is-playing-mode .nav-arrow { opacity: 0; pointer-events: none; }

/* ── Info overlay ───────────────────────────────────────────────── */
.info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 32px 18px;
  z-index: 8;
  display: flex; align-items: flex-end; gap: 24px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.info > * { pointer-events: auto; }
.is-playing-mode .info { opacity: 0; transform: translateY(20px); transition: all .35s var(--easing); }

.info-left { flex: 1; min-width: 0; }
.info-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.info-index { font-variant-numeric: tabular-nums; color: var(--accent); }
.info-sep { opacity: .5; }
.info-serie { color: var(--text-soft); }

.info-title {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.info-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px;
}
.info-dim {
  font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.info-detail {
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-soft);
  padding: 4px 0;
  border-bottom: 1px solid var(--line-strong);
  transition: color .2s var(--easing), border-color .2s var(--easing);
}
.info-detail:hover { color: var(--accent); border-color: var(--accent); }

.info-right { flex-shrink: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge.is-disponible {
  color: var(--available);
  background: rgba(46,204,113,0.10);
  border: 1px solid rgba(46,204,113,0.40);
}
.badge.is-adquirido {
  color: var(--text-mute);
  background: rgba(99,99,99,0.10);
  border: 1px solid var(--line);
}

/* ── Progress slideshow ─────────────────────────────────────────── */
.progress {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.06);
  z-index: 9;
  opacity: 0;
  transition: opacity .35s var(--easing);
}
.is-playing-mode .progress { opacity: 1; }
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-alt), var(--accent));
  box-shadow: 0 0 20px rgba(232,160,66,0.6);
}
.progress-fill.tick { transition: width 4500ms linear; }

/* ── Strip de miniaturas ────────────────────────────────────────── */
.strip {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  z-index: 20;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 35%, rgba(0,0,0,0.96) 100%),
    var(--bg);
  border-top: 1px solid var(--line);
  display: flex; align-items: center;
}
.strip-track {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  height: 100%;
  transition: justify-content .35s var(--easing);
}
/* Cuando todas las miniaturas filtradas caben en el viewport, las centramos */
.strip-track.is-centered {
  justify-content: center;
}
.strip-track::-webkit-scrollbar { height: 4px; }
.strip-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 4px; }

.strip-edge {
  width: 44px; align-self: stretch;
  font-size: 24px;
  color: var(--text-soft);
  background: linear-gradient(90deg, rgba(13,13,13,0.95), rgba(13,13,13,0));
  z-index: 5;
  transition: color .2s var(--easing);
}
.strip-edge:hover { color: var(--accent); }
.strip-edge-right { background: linear-gradient(270deg, rgba(13,13,13,0.95), rgba(13,13,13,0)); }

.thumb {
  flex: 0 0 auto;
  /* El aspect-ratio se inyecta por inline-style desde JS según la obra */
  height: 110px;
  width: auto;
  aspect-ratio: var(--ratio, 0.87);
  min-width: 50px;
  max-width: 240px;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid transparent;
  background: var(--surface);
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform .35s var(--easing), border-color .25s var(--easing), box-shadow .25s var(--easing);
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--easing), filter .35s var(--easing);
}
.thumb:hover img { transform: scale(1.06); }
.thumb-num {
  position: absolute; top: 6px; left: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  font-variant-numeric: tabular-nums;
  z-index: 2;
}
.thumb-status {
  position: absolute; bottom: 6px; left: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.55);
}
.thumb-status.is-disponible { background: var(--available); }
.thumb-status.is-adquirido  { background: rgba(255,255,255,0.35); }

.thumb.is-acquired::after {
  content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.45);
  pointer-events: none;
}
.thumb.is-acquired img { filter: grayscale(0.4) brightness(0.85); }

.thumb.is-active {
  border-color: var(--accent);
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 24px -4px var(--accent),
    0 8px 20px rgba(0,0,0,0.6);
  transform: translateY(-6px);
}
.thumb.is-active::before {
  content: ''; position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--accent);
}

.thumb.is-hidden { display: none; }

/* Animación al revelarse tras un filtro */
.thumb.is-revealing {
  animation: thumb-fade-in .45s var(--easing) both;
}
@keyframes thumb-fade-in {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Encabezado de serie (separadores en strip) */
.strip-divider {
  flex: 0 0 auto;
  width: 1px; height: 60px;
  background: var(--line);
  margin: 0 4px;
}
.strip-empty {
  margin: 0 auto;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--text-mute);
  text-transform: uppercase;
}

/* ── Sheet de detalles (panel lateral) ──────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
}
.sheet[aria-hidden="false"] { pointer-events: auto; }

.sheet-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  opacity: 0;
  transition: opacity .4s var(--easing);
  backdrop-filter: blur(2px);
}
.sheet[aria-hidden="false"] .sheet-scrim { opacity: 1; }

.sheet-card {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .55s var(--easing);
  overflow: hidden;
}
.sheet[aria-hidden="false"] .sheet-card { transform: translateX(0); }

.sheet-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  color: var(--text);
  z-index: 5;
  font-size: 14px;
  transition: all .2s var(--easing);
}
.sheet-close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }

.sheet-img-wrap {
  height: 42%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
  padding: 30px;
}
.sheet-img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: var(--shadow-art); }

.sheet-body {
  padding: 32px 36px 36px;
  flex: 1;
  overflow-y: auto;
}
.sheet-eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}
.sheet-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 38px;
  line-height: 1.05;
  margin: 0 0 16px;
  color: var(--text);
}
.sheet-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.sheet-dim {
  font-size: 13px; letter-spacing: 0.06em;
  color: var(--text-soft);
}
.sheet-desc {
  font-size: 14px; line-height: 1.7;
  color: var(--text-soft);
  margin: 0 0 28px;
}
.sheet-actions {
  display: flex; gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all .25s var(--easing);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn.primary {
  background: var(--accent); color: var(--bg);
}
.btn.primary:hover { background: #f0b258; transform: translateY(-1px); box-shadow: 0 12px 30px -8px rgba(232,160,66,0.5); }
.btn.ghost {
  background: transparent; color: var(--text-soft);
  border-color: var(--line);
}
.btn.ghost:hover { color: var(--text); border-color: var(--line-strong); }

/* ── About — pantalla completa ──────────────────────────────────── */
.about {
  position: fixed; inset: 0; z-index: 70;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.about[aria-hidden="false"] { pointer-events: auto; }
.about-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity .5s var(--easing);
}
.about[aria-hidden="false"] .about-scrim { opacity: 1; }

.about-card {
  position: relative;
  width: min(1200px, 92vw);
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(40px) scale(0.97);
  opacity: 0;
  transition: transform .55s var(--easing), opacity .4s var(--easing);
}
.about[aria-hidden="false"] .about-card { transform: translateY(0) scale(1); opacity: 1; }

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  height: 100%;
  max-height: 92vh;
}

.about-text {
  padding: 56px 56px 48px;
  overflow-y: auto;
}
.about-eyebrow {
  font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.about-name {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 12px 0 6px;
  color: var(--text);
}
.about-prof {
  font-size: 14px;
  color: var(--text-soft);
  font-style: italic;
  margin: 0 0 32px;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}
.about-stat {
  background: var(--surface);
  padding: 18px 12px;
  text-align: center;
}
.about-stat-value {
  font-family: 'Fraunces', serif;
  font-size: 32px; font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.about-stat-value.is-accent { color: var(--accent); }
.about-stat-label {
  font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 6px;
}
.about-section-title {
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 22px 0 10px;
}
.about-body {
  font-size: 14px; line-height: 1.75;
  color: var(--text-soft);
  margin: 0 0 8px;
}
.about-expos {
  list-style: none; padding: 0; margin: 0;
}
.about-expos li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}
.about-expos li::before {
  content: '◆';
  color: var(--accent);
  font-size: 8px;
  margin-top: 8px;
}
.about-expos b { color: var(--text); font-weight: 600; margin-right: 6px; }
.about-expos span { color: var(--text-mute); }
#about-web { margin-top: 28px; }

.about-portrait {
  background: linear-gradient(160deg, #181818, #0d0d0d);
  padding: 56px 36px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  border-left: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.about-portrait::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(232,160,66,0.10), transparent 50%);
}
.portrait-frame {
  position: relative;
  width: 86%; aspect-ratio: 1/1.3;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
  transform: rotate(-1.4deg);
}
.portrait-img {
  position: absolute; inset: 12px;
  background-image:
    linear-gradient(135deg, rgba(232,160,66,0.10), rgba(74,171,184,0.10)),
    repeating-linear-gradient(45deg, #2a221a 0 8px, #1f1810 8px 16px);
  display: flex; align-items: center; justify-content: center;
}
.portrait-img::after {
  content: 'J · M';
  font-family: 'Fraunces', serif;
  font-weight: 800; font-size: 64px;
  color: var(--accent);
  letter-spacing: 0.1em;
  opacity: 0.9;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.portrait-tape {
  position: absolute;
  width: 80px; height: 22px;
  background: rgba(232,160,66,0.45);
  mix-blend-mode: screen;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.portrait-tape-tl { top: -10px; left: 12px; transform: rotate(-12deg); }
.portrait-tape-br { bottom: -8px; right: 8px; transform: rotate(8deg); }
.portrait-quote {
  margin-top: 28px;
  text-align: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.5;
  max-width: 280px;
}

/* ── Contact modal ──────────────────────────────────────────────── */
.contact {
  position: fixed; inset: 0; z-index: 80;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.contact[aria-hidden="false"] { pointer-events: auto; }
.contact-scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .4s var(--easing);
}
.contact[aria-hidden="false"] .contact-scrim { opacity: 1; }

.contact-card {
  position: relative;
  width: min(440px, 92vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 44px 36px 36px;
  text-align: center;
  transform: scale(0.95);
  opacity: 0;
  transition: transform .35s var(--easing), opacity .3s var(--easing);
}
.contact[aria-hidden="false"] .contact-card { transform: scale(1); opacity: 1; }
.contact-title {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 600;
  margin: 14px 0 12px;
}
.contact-body {
  font-size: 13px; color: var(--text-soft);
  margin: 0 0 24px; line-height: 1.6;
}
.contact-card .btn { width: 100%; margin-bottom: 10px; }

/* ── Lightbox (zoom imagen completa) ────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; animation: fx-fade .35s var(--easing); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: var(--shadow-art); }

/* ── Welcome screen (primera visita) ───────────────────────────── */
.welcome {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s var(--easing);
  background: var(--bg);
  overflow: hidden;
}
.welcome[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}
.welcome-bg {
  position: absolute; inset: -4%;
  background-size: cover; background-position: center;
  filter: blur(40px) saturate(1.05) brightness(0.4);
  transform: scale(1.08) translateZ(0);
  will-change: auto;
  /* Sin Ken Burns: la welcome dura 5-10s, una imagen estática queda más limpia */
}
.welcome-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.6) 75%, rgba(0,0,0,0.95) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.4) 100%);
}

.welcome-content {
  position: relative;
  text-align: center;
  max-width: 720px;
  padding: 40px 32px;
  animation: welcome-rise 1.2s var(--easing) both;
  animation-delay: .1s;
}
@keyframes welcome-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.welcome-eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 22px;
  padding: 6px 16px;
  border: 1px solid rgba(232,160,66,0.4);
  border-radius: 999px;
}
.welcome-name {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--text);
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.welcome-tagline {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 0 0 26px;
  font-style: italic;
}
.welcome-place {
  font-style: normal;
  font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.welcome-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 28px;
  margin: 0 0 36px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.welcome-stats .ws {
  text-align: center;
}
.welcome-stats .ws-value {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 600;
  color: var(--text); line-height: 1;
}
.welcome-stats .ws-value.is-accent { color: var(--accent); }
.welcome-stats .ws-label {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 5px;
}
.welcome-stats .ws-sep {
  width: 1px; height: 28px;
  background: var(--line);
}

.welcome-apps {
  margin-bottom: 36px;
}
.welcome-apps-label {
  display: block;
  font-size: 10px; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 12px;
}
.welcome-apps-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}

/* Badge de tienda — mismo diseño en welcome, apps modal y about */
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  color: var(--text);
  transition: all .25s var(--easing);
  text-decoration: none;
}
.store-badge:hover {
  border-color: var(--accent);
  background: #0a0a0a;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -8px rgba(232,160,66,0.4);
}
.store-badge svg { flex: 0 0 auto; }
.store-badge-text {
  display: flex; flex-direction: column;
  text-align: left; line-height: 1.1;
}
.store-badge-text small {
  font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.store-badge-text strong {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
}

.welcome-enter {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s var(--easing);
}
.welcome-enter:hover {
  background: #f0b258;
  transform: translateY(-1px);
  box-shadow: 0 14px 40px -10px rgba(232,160,66,0.5);
}
.welcome-arrow {
  font-size: 16px;
  animation: bounce 1.6s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

.welcome-skip {
  display: block;
  margin: 20px auto 0;
  padding: 8px 16px;
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  cursor: pointer;
  transition: color .2s var(--easing);
}
.welcome-skip:hover { color: var(--text); }

@media (max-width: 640px) {
  .welcome-stats { gap: 16px; }
  .welcome-stats .ws-value { font-size: 22px; }
  .welcome-apps-row { flex-direction: column; }
  .store-badge { width: 100%; max-width: 240px; justify-content: center; }
}

/* ── Apps modal ────────────────────────────────────────────────── */
.apps-modal {
  position: fixed; inset: 0; z-index: 75;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.apps-modal[aria-hidden="false"] { pointer-events: auto; }
.apps-modal .contact-scrim { opacity: 0; transition: opacity .4s var(--easing); }
.apps-modal[aria-hidden="false"] .contact-scrim { opacity: 1; }

.apps-card {
  position: relative;
  width: min(960px, 96vw);
  max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  opacity: 0;
  transition: transform .35s var(--easing), opacity .3s var(--easing);
}
.apps-modal[aria-hidden="false"] .apps-card { transform: scale(1); opacity: 1; }

/* Carrusel arriba — scroll horizontal manual con scroll-snap */
.apps-shots {
  position: relative;
  background: linear-gradient(160deg, #181818, #0a0a0a);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.apps-shots::before, .apps-shots::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: 36px; z-index: 2;
  pointer-events: none;
}
.apps-shots::before {
  left: 0; background: linear-gradient(90deg, rgba(20,20,20,0.92), transparent);
}
.apps-shots::after {
  right: 0; background: linear-gradient(270deg, rgba(20,20,20,0.92), transparent);
}
.apps-shots-track {
  display: flex; gap: 12px;
  padding: 24px 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.apps-shots-track::-webkit-scrollbar { display: none; }

/* Marco simulado de iPhone — flex 1 distribuye espacio.
   - min-width 90px: nunca más pequeño (legible)
   - max-width 140px: nunca más grande (proporcionado)
   - Si todos caben con su min-width, se reparten; si no, scroll horizontal */
.phone-frame {
  flex: 1 1 0;
  min-width: 90px;
  max-width: 140px;
  aspect-ratio: 480 / 1039;
  background: #000;
  border-radius: 18px;
  padding: 4px;
  border: 2px solid #1f1f1f;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  scroll-snap-align: center;
  transition: transform .35s var(--easing);
}
.phone-frame:hover { transform: translateY(-4px) scale(1.03); }
.phone-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* Contenido abajo */
.apps-card-body {
  padding: 28px 36px 32px;
  text-align: center;
}
.apps-title {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 600;
  margin: 12px 0 12px;
  line-height: 1.05;
  color: var(--text);
}
.apps-desc {
  font-size: 13px; color: var(--text-soft);
  margin: 0 auto;
  max-width: 460px;
  line-height: 1.7;
}
.apps-card-body .welcome-apps-row {
  justify-content: center;
}

@media (max-width: 640px) {
  .apps-card-body { padding: 22px 22px 26px; }
  .phone-frame { min-width: 100px; max-width: 130px; }
  .apps-shots-track { padding: 20px 20px; gap: 10px; }
}

/* ── Toast de protección ───────────────────────────────────────── */
.protect-toast {
  position: fixed;
  bottom: calc(var(--footer-h) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  padding: 12px 22px;
  background: rgba(0,0,0,0.92);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--easing), transform .35s var(--easing);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px -8px rgba(0,0,0,0.6);
}
.protect-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.protect-toast span {
  color: var(--accent);
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 16px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .filters { display: none; }
  .stage { padding: calc(var(--header-h) + 12px) 60px 50px; }
  .info { padding: 14px 20px 14px; }
  .nav-arrow { width: 44px; height: 44px; font-size: 22px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { display: none; }
  .about-text { padding: 32px 28px; }
}

@media (max-width: 640px) {
  :root { --footer-h: 130px; --header-h: 60px; }
  .hud-top { padding: 0 14px; gap: 10px; }
  .brand-sub, .brand-sep { display: none; }
  .iconbtn { padding: 8px 12px; }
  .iconbtn span:not([class]) { display: none; }
  .stage { padding: calc(var(--header-h) + 8px) 12px 40px; }
  .nav-arrow { width: 38px; height: 38px; font-size: 20px; opacity: 1; }
  .nav-prev { left: 8px; } .nav-next { right: 8px; }
  .info-title { font-size: 26px; }
  .info { gap: 12px; }
  .thumb { height: 86px; min-width: 42px; max-width: 180px; }
  .strip-edge { width: 32px; }
  .sheet-card { width: 100vw; }
  .sheet-img-wrap { height: 35%; padding: 18px; }
  .sheet-body { padding: 22px; }
  .sheet-title { font-size: 28px; }
}

/* ── Accesibilidad: respeto a reduce-motion ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .backdrop-img { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
