/* ============================================================
   GRUPO BONACINA — Mega presentación (deck)
   ============================================================ */

html, body { height: 100%; overflow: hidden; background: var(--ink); }

.deck { position: fixed; inset: 0; }
.deck:focus { outline: none; }

/* ---------- Slide base ---------- */
.slide {
  position: absolute; inset: 0; padding: clamp(2rem, 5vw, 4.5rem) clamp(2rem, 6vw, 5.5rem);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--paper); color: var(--ink);
  opacity: 0; visibility: hidden; transform: translateX(4.5%) scale(0.97);
  filter: blur(2px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out),
              filter 0.7s var(--ease-out), visibility 0.7s;
  overflow: hidden;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; filter: none; z-index: 2; }
.slide.is-prev { transform: translateX(-4.5%) scale(0.97); }
/* dirección inversa (navegar hacia atrás) */
.deck--rev .slide { transform: translateX(-4.5%) scale(0.97); }
.deck--rev .slide.is-prev { transform: translateX(4.5%) scale(0.97); }
.deck--rev .slide.is-active { transform: none; }

/* elementos que entran en cascada (rise + desenfoque) */
.slide .up {
  opacity: 0; transform: translateY(34px); filter: blur(8px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out),
              clip-path 0.9s var(--ease-out);
}
.slide.is-active .up { opacity: 1; transform: none; filter: none; }
.slide.is-active .up:nth-of-type(1), .slide.is-active [data-up='1'] { transition-delay: 0.15s; }
.slide.is-active [data-up='2'] { transition-delay: 0.3s; }
.slide.is-active [data-up='3'] { transition-delay: 0.45s; }
.slide.is-active [data-up='4'] { transition-delay: 0.6s; }
.slide.is-active [data-up='5'] { transition-delay: 0.75s; }

.slide--dark { background: var(--ink); color: #fff; }
.slide--red { background: linear-gradient(135deg, var(--red-deep), var(--red) 55%, var(--red-bright)); color: #fff; }

.slide__kicker { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.3rem; }
.slide__kicker::before { content: ''; width: 44px; height: 2px; background: var(--red); }
.slide--red .kicker { color: #fff; }
.slide--red .slide__kicker::before { background: #fff; }

.slide h2 { font-size: clamp(2rem, 5vw, 4.2rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.0; }
.slide__body { margin-top: 1.4rem; font-size: clamp(0.95rem, 1.4vw, 1.15rem); line-height: 1.68; color: var(--smoke); max-width: 64ch; }
.slide--dark .slide__body, .slide--red .slide__body { color: rgba(255, 255, 255, 0.78); }

/* ---------- Portada ---------- */
.slide--cover { align-items: center; text-align: center; }
.slide--cover .cover-clover { width: clamp(110px, 16vh, 170px); margin-bottom: 2.2rem; }
.slide--cover .cover-clover .leaf { transform-origin: 0 0; animation: leafin 1.1s var(--ease-out) both; }
.slide--cover .cover-clover .leaf:nth-child(2) { animation-delay: 0.2s; }
@keyframes leafin { from { opacity: 0; scale: 0.3; } to { opacity: 1; scale: 1; } }
.slide--cover h1 { font-size: clamp(2.2rem, min(8vh, 10vw), 5.4rem); font-weight: 300; letter-spacing: 0.12em; line-height: 1.06; }
.slide--cover h1 b { font-weight: 780; color: var(--red-bright); display: block; letter-spacing: 0.12em; }
.slide--cover .cover-sub { margin-top: 1.6rem; font-size: 0.8rem; letter-spacing: 0.42em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.slide--cover .cover-domain { margin-top: 3.2rem; font-size: 0.78rem; letter-spacing: 0.3em; color: rgba(255,255,255,0.45); }

/* ---------- Capítulo (división) ---------- */
.slide--chapter { justify-content: flex-end; color: #fff; }
.slide--chapter .bg { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; transform: scale(1.02); }
.slide--chapter::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(15, 12, 11, 0.96) 8%, rgba(15, 12, 11, 0.42) 60%, rgba(15, 12, 11, 0.34));
}
.slide--chapter > div { position: relative; z-index: 2; }
.slide--chapter .chapter-num {
  font-size: clamp(5rem, 16vh, 10rem); font-weight: 120; line-height: 0.85;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.5);
}
.slide--chapter h2 { font-size: clamp(2.6rem, 8vh, 5.6rem); margin-top: 0.8rem; }
.slide--chapter p { margin-top: 1rem; font-size: clamp(0.85rem, 1.6vh, 1.05rem); letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); max-width: 60ch; line-height: 1.9; }
.slide--chapter .chapter-brands { display: flex; gap: 0.7rem; margin-top: 1.8rem; flex-wrap: wrap; }
.slide--chapter .chapter-brands img { height: 52px; border-radius: 8px; box-shadow: var(--shadow-deep); }

/* ---------- Marca ---------- */
.slide--brand { flex-direction: row; align-items: stretch; gap: clamp(1.6rem, 4vw, 3.5rem); }
.brandcol { flex: 0 0 30%; display: flex; flex-direction: column; justify-content: center; gap: 1.4rem; min-width: 0; }
.brandcol .blogo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-deep); max-width: 340px; }
.brandcol .blogo img { width: 100%; height: auto; }
.brandcol .bsoc { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--smoke); line-height: 1.9; }
.brandcol .bsoc b { display: block; font-size: 1rem; letter-spacing: 0.06em; color: var(--ink); font-weight: 680; }
.slide--dark .brandcol .bsoc b { color: #fff; }
.brandmain { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.brandmain h2 { font-size: clamp(2rem, 6vh, 3.6rem); }
.brandmain .btag { margin-top: 0.4rem; font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--red); font-weight: 620; }
.brandmain .bdesc { margin-top: 1.2rem; font-size: clamp(0.92rem, 2vh, 1.12rem); line-height: 1.65; color: var(--charcoal); max-width: 60ch; }
.slide--dark .brandmain .bdesc { color: rgba(255, 255, 255, 0.78); }
.brandmain .bfacts { display: flex; gap: 2.6rem; margin-top: 1.6rem; flex-wrap: wrap; }
.bfact b { font-size: clamp(1.8rem, 4.6vh, 2.8rem); font-weight: 760; color: var(--red); line-height: 1; }
.bfact span { display: block; font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--smoke); margin-top: 0.35rem; }
.brandmain .bsucs { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1.6rem; max-width: 640px; }
.brandmain .bsucs li { list-style: none; font-size: clamp(0.78rem, 1.7vh, 0.92rem); color: var(--charcoal); position: relative; padding-left: 0.95rem; line-height: 1.5; }
.slide--dark .brandmain .bsucs li { color: rgba(255,255,255,0.75); }
.brandmain .bsucs { padding: 0; }
.brandmain .bsucs li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 5px; height: 5px; background: var(--red); }
.brandmain .bsucs li small { color: var(--smoke); }
.brandpics { flex: 0 0 26%; display: flex; flex-direction: column; gap: 0.9rem; justify-content: center; min-width: 0; }
.brandpics figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }
.brandpics img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 11; }
.brandpics figure.pad { background: #fff; border: 1px solid var(--line); }
.brandpics figure.pad img { object-fit: contain; padding: 8%; }
/* Slides con una sola foto: formato cuadrado más alto para llenar la columna */
.brandpics figure:only-child img { aspect-ratio: 1 / 1; }
/* Ciudad de la sucursal sin quebrar en dos líneas */
.brandmain .bsucs li small { white-space: nowrap; }
/* Marca sin fotos (CETSE): composición centrada */
.slide--brand.slide--center { justify-content: center; gap: clamp(2.5rem, 6vw, 5rem); }
.slide--brand.slide--center .brandmain { flex: 0 1 auto; max-width: 640px; }
/* Adorno del trébol en slides de texto */
.slide__deco {
  position: absolute; right: -3%; top: 50%; transform: translateY(-50%);
  width: 36vw; max-width: 500px; opacity: 0.07; pointer-events: none;
}

/* dúo de marcas */
.slide--duo { flex-direction: row; gap: clamp(1.8rem, 4vw, 4rem); align-items: stretch; }
.duo { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.1rem; min-width: 0; }
.duo + .duo { border-left: 1px solid var(--line); padding-left: clamp(1.8rem, 4vw, 4rem); }
.slide--dark .duo + .duo { border-color: var(--line-dark); }
.duo .blogo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); max-width: 230px; }
.duo .blogo img { width: 100%; height: auto; }
.duo h3 { font-size: clamp(1.5rem, 4vh, 2.3rem); font-weight: 730; letter-spacing: -0.01em; }
.duo .btag { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--red); font-weight: 620; margin-top: -0.5rem; }
.duo p { font-size: clamp(0.85rem, 1.9vh, 1rem); line-height: 1.6; color: var(--charcoal); max-width: 48ch; }
.slide--dark .duo p { color: rgba(255, 255, 255, 0.75); }
.duo .bfacts { display: flex; gap: 2rem; }
.duo ul { margin: 0; padding: 0; }
.duo ul li { list-style: none; font-size: clamp(0.76rem, 1.6vh, 0.88rem); color: var(--smoke); padding-left: 0.9rem; position: relative; line-height: 1.65; }
.duo ul li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 4px; height: 4px; background: var(--red); }
.duo .dphoto { margin: 0.4rem 0 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); max-width: 440px; }
.duo .dphoto img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Pilares ---------- */
.slide--pillars .pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 2.2rem; }
.slide--pillars .pcard {
  border: 1px solid var(--line-dark); border-radius: var(--radius-lg); padding: 1.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.04); display: flex; flex-direction: column; gap: 0.8rem;
}
.slide--pillars .pcard svg { width: 42px; height: 42px; color: var(--red-bright); }
.slide--pillars .pcard h3 { font-size: clamp(1.05rem, 2.6vh, 1.4rem); font-weight: 700; }
.slide--pillars .pcard p { font-size: clamp(0.78rem, 1.7vh, 0.92rem); line-height: 1.55; color: rgba(255, 255, 255, 0.66); }
.slide--pillars .pcard span { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-bright); font-weight: 620; margin-top: auto; }

/* ---------- Números ---------- */
.slide--stats .sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem 2rem; margin-top: 2.4rem; max-width: 1100px; }
.slide--stats .stat b { font-size: clamp(2.6rem, 9vh, 5rem); font-weight: 780; line-height: 0.95; display: block; font-variant-numeric: tabular-nums; }
.slide--stats .stat b sup { font-size: 0.4em; }
.slide--stats .stat span { display: block; margin-top: 0.5rem; font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }

/* ---------- Mapa / presencia ---------- */
.slide--map { flex-direction: row; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.slide--map > div { flex: 1; min-width: 0; }
.slide--map svg { width: 100%; max-height: 62vh; }
.slide--map .prow { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-dark); padding-block: 0.7rem; font-size: clamp(0.85rem, 2vh, 1.05rem); }
.slide--map .prow span { color: rgba(255, 255, 255, 0.55); font-size: 0.8em; }

/* ---------- Por qué / cierre ---------- */
.slide--why .wgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.2rem; }
.slide--why .wcard { border-left: 3px solid var(--red); padding: 0.4rem 0 0.4rem 1.4rem; }
.slide--why .wcard h3 { font-size: clamp(1rem, 2.6vh, 1.3rem); font-weight: 700; }
.slide--why .wcard p { margin-top: 0.5rem; font-size: clamp(0.8rem, 1.8vh, 0.95rem); line-height: 1.6; color: var(--smoke); }

/* ---------- Contacto por división ---------- */
.slide--contact .cgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2.2rem; }
.slide--contact .ccard {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.4vh, 1.8rem);
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; min-width: 0;
}
.slide--contact .ccard svg { width: 28px; height: 28px; color: var(--red); margin-bottom: 0.7rem; }
.slide--contact .cdiv { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--smoke); font-weight: 620; }
.slide--contact .ccard h3 { font-size: clamp(1rem, 2.4vh, 1.24rem); font-weight: 700; margin-top: 0.2rem; }
/* el mail más largo tiene que entrar en una sola línea en la tarjeta de escritorio;
   anywhere es la red de seguridad para anchos intermedios */
.slide--contact .ccard a.cmail { margin-top: 0.6rem; font-size: clamp(0.68rem, 1.4vh, 0.78rem); color: var(--red); font-weight: 560; line-height: 1.5; overflow-wrap: anywhere; }

.slide--end { align-items: center; text-align: center; }
.slide--end h2 { font-size: clamp(2.4rem, 9vh, 5rem); max-width: 18ch; }
.slide--end h2 em { font-style: normal; color: var(--red-bright); }
.slide--end .end-domain { margin-top: 2rem; font-size: clamp(1rem, 2.6vh, 1.4rem); letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); border-bottom: 2px solid var(--red); padding-bottom: 0.4rem; }
.slide--end .end-city { margin-top: 1.2rem; font-size: 0.76rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }

/* ---------- HUD ---------- */
.hud {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem; pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__brand { display: flex; align-items: center; gap: 0.55rem; opacity: 0.85; }
.hud__brand svg { width: 26px; height: 26px; }
.hud__brand span { font-size: 0.68rem; letter-spacing: 0.22em; font-weight: 640; color: currentColor; }
.hud__count { font-size: 0.78rem; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; opacity: 0.8; }
.hud__nav { display: flex; gap: 0.5rem; }
.hud__nav button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid currentColor;
  background: transparent; color: inherit; display: grid; place-items: center; opacity: 0.75;
  transition: opacity 0.25s, background 0.25s, transform 0.25s;
}
.hud__nav button:hover { opacity: 1; background: rgba(128, 128, 128, 0.15); transform: scale(1.06); }
.hud__nav svg { width: 20px; height: 20px; }
.deck-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.deck-progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width 0.5s var(--ease-out); }

.hud--light { color: #fff; }
.hud--ink { color: var(--ink); }

/* ---------- Vista general (Esc) ---------- */
.deck.is-overview { overflow: auto; }
.deck.is-overview .slide {
  position: relative; opacity: 1; visibility: visible; transform: none;
  height: 272px; min-height: 0; margin: 0.6rem; border-radius: 14px; cursor: pointer;
  transition: outline 0.2s; outline: 2px solid transparent; outline-offset: 3px;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(2rem, 6vw, 5.5rem); zoom: 0.3;
}
.deck.is-overview .slide:hover { outline-color: var(--red); }
.deck.is-overview .slide { filter: none; }
.deck.is-overview .slide .up,
.deck.is-overview .slide .blogo { opacity: 1; transform: none; filter: none; transition: none; }
.deck.is-overview .slide h1, .deck.is-overview .slide h2,
.deck.is-overview .slide figure { clip-path: none; transition: none; }
.deck.is-overview .slide figure img { transform: none; }
.deck.is-overview .pcard svg path, .deck.is-overview .pcard svg circle,
.deck.is-overview .slide--map svg line { stroke-dasharray: none; stroke-dashoffset: 0; }
.deck.is-overview .slide--map svg circle, .deck.is-overview .slide--map svg text { opacity: 1; }
.deck.is-overview .chapter-brands img { opacity: 1; transform: none; }
.deck.is-overview { display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; background: #000; }
@media (min-width: 1400px) { .deck.is-overview { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Ayuda inicial ---------- */
.hint {
  position: fixed; z-index: 70; bottom: 5.4rem; left: 50%; transform: translateX(-50%);
  background: rgba(15, 12, 11, 0.85); color: #fff; border: 1px solid var(--line-dark);
  border-radius: 100px; padding: 0.7rem 1.4rem; font-size: 0.78rem; letter-spacing: 0.08em;
  display: flex; gap: 1.2rem; backdrop-filter: blur(8px);
  animation: hintfade 0.6s var(--ease-out) 1s both;
}
.hint kbd { background: rgba(255,255,255,0.14); border-radius: 6px; padding: 0.1rem 0.5rem; font-family: inherit; }
.hint.is-hidden { opacity: 0; visibility: hidden; transition: 0.4s; }
@keyframes hintfade { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Responsive vertical ---------- */
@media screen and (max-width: 900px), screen and (orientation: portrait) {
  html, body { overflow: hidden; }
  .slide { padding-bottom: 5.5rem; }
  .slide--duo, .slide--why, .slide--stats { justify-content: flex-start; overflow-y: auto; padding-bottom: 6.5rem; }
  .slide--brand, .slide--duo, .slide--map { flex-direction: column; justify-content: flex-start; gap: 1.2rem; }
  /* Centrado vertical + overflow oculto recortaba el logo por arriba y las fotos
     por abajo en cuanto el contenido superaba la pantalla: ahora arrancan desde
     arriba y la slide scrollea lo que no entra. */
  .slide--brand, .slide--map { overflow-y: auto; padding-bottom: 6.5rem; }
  /* Margen automático arriba y abajo: centra cuando el contenido entra y se anula
     solo cuando desborda, dejando scrollear desde el principio. */
  .slide--brand > :first-child, .slide--map > :first-child { margin-top: auto; }
  .slide--brand > :last-child, .slide--map > :last-child { margin-bottom: auto; }
  .brandmain { flex: 0 0 auto; }
  .brandcol { flex-direction: row; align-items: center; gap: 1.2rem; flex: 0 0 auto; }
  .brandcol .blogo { max-width: 130px; }
  /* En vertical las fotos pasan a una tira horizontal en vez de ocultarse:
     ahora son las fotos reales de cada local y aportan más que el espacio que ocupan. */
  .brandpics { flex-direction: row; flex: 0 0 auto; gap: 0.5rem; width: 100%; }
  .brandpics img { aspect-ratio: 1 / 1; }
  /* La foto única a ancho completo era un cuadrado gigante (Temple, Croccantino…)
     que garantizaba el desborde: apaisada entra en cualquier pantalla. */
  .brandpics figure:only-child img { aspect-ratio: 16 / 10; }
  .brandpics figure { flex: 1 1 0; min-width: 0; }
  .brandpics figure:nth-child(n+4) { display: none; }
  /* La slide ya scrollea entera: el scroll interno de la lista sobra. */
  .brandmain .bsucs { grid-template-columns: 1fr; }
  .duo + .duo { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 1.2rem; }
  /* minmax(0,…) para que el contenido no fuerce columnas más anchas que la pantalla */
  .slide--pillars .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
  .slide--pillars .pcard { padding: 1.1rem 0.9rem; }
  .slide--pillars .pcard p { display: none; }
  /* Los títulos de capítulo escalaban sólo con la altura: en pantallas angostas
     "Gastronomía" o "Comunicación" no entraban y se cortaban contra el borde. */
  .slide--chapter h2 { font-size: clamp(1.9rem, 8.2vw, 3.4rem); }
  .slide--chapter p { font-size: 0.72rem; letter-spacing: 0.22em; line-height: 1.8; }
  /* El número de capítulo escalaba con la altura (16vh) y la fila de logos con sus
     52px envolvía en tres renglones: entre ambos empujaban el contenido fuera del
     recorte en pantallas cortas. */
  .slide--chapter .chapter-num { font-size: clamp(3.2rem, 12vw, 6rem); }
  .slide--chapter .chapter-brands { gap: 0.5rem; margin-top: 1.2rem; }
  .slide--chapter .chapter-brands img { height: 38px; }
  .slide--end .end-domain { font-size: 0.95rem; letter-spacing: 0.16em; }
  .slide--why .wgrid { grid-template-columns: 1fr; }
  .slide--contact { justify-content: flex-start; overflow-y: auto; padding-bottom: 6.5rem; }
  /* Compacto para que las cuatro divisiones entren de una sin scrollear:
     el rótulo de división ya identifica cada tarjeta, así que el ícono sobra. */
  .slide--contact .cgrid { grid-template-columns: 1fr; gap: 0.55rem; margin-top: 1.4rem; }
  .slide--contact .ccard { padding: 0.85rem 1rem; }
  .slide--contact .ccard svg { display: none; }
  .slide--contact .ccard h3 { font-size: 1.02rem; }
  /* sin el teléfono delante, el mail es el único dato: entra holgado a tamaño legible */
  .slide--contact .ccard a.cmail { margin-top: 0.35rem; font-size: 0.82rem; }
  /* En pantallas angostas el interletrado ancho y los títulos largos
     ("Comunicación", "Pilares de negocio") se salían de su columna. */
  .slide--stats .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1rem; }
  .slide--stats .stat span { letter-spacing: 0.14em; }
  .slide--pillars .pcard h3 { font-size: 1rem; hyphens: auto; }
  .slide--pillars .pcard span { letter-spacing: 0.12em; font-size: 0.64rem; }
  .deck.is-overview { grid-template-columns: 1fr; }
  .hint { display: none; }
}

/* ============================================================
   ANIMACIONES CINEMATOGRÁFICAS
   ============================================================ */

/* Títulos: revelado con máscara (wipe ascendente) */
.slide h1, .slide h2 { clip-path: inset(-10% -3% 108% -3%); transition: clip-path 1s var(--ease-out) 0.1s, opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out); }
.slide.is-active h1, .slide.is-active h2 { clip-path: inset(-10% -3% -10% -3%); }

/* Imágenes: clip-reveal + asentamiento tipo Ken Burns */
.slide figure { clip-path: inset(0 0 102% 0 round var(--radius)); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out), clip-path 1.05s var(--ease-out); }
.slide.is-active figure { clip-path: inset(0 0 0 0 round var(--radius)); }
.slide figure img { transform: scale(1.16); transition: transform 1.6s var(--ease-out); }
.slide.is-active figure img { transform: none; }

/* Tarjetas de logo: entrada con leve giro 3D */
.slide .blogo {
  opacity: 0; transform: perspective(900px) rotateY(-16deg) translateY(26px);
  transition: opacity 0.85s var(--ease-out), transform 0.95s var(--ease-out), filter 0.8s var(--ease-out);
}
.slide.is-active .blogo { opacity: 1; transform: none; filter: none; }

/* Íconos de pilares: trazo que se dibuja */
.pcard svg path, .pcard svg circle {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s ease 0.45s;
}
.slide.is-active .pcard svg path, .slide.is-active .pcard svg circle { stroke-dashoffset: 0; }

/* Logos de capítulo: pop escalonado */
.chapter-brands img { opacity: 0; transform: translateY(18px) scale(0.78); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.slide.is-active .chapter-brands img { opacity: 1; transform: none; }
.slide.is-active .chapter-brands img:nth-child(1) { transition-delay: 0.55s; }
.slide.is-active .chapter-brands img:nth-child(2) { transition-delay: 0.63s; }
.slide.is-active .chapter-brands img:nth-child(3) { transition-delay: 0.71s; }
.slide.is-active .chapter-brands img:nth-child(4) { transition-delay: 0.79s; }
.slide.is-active .chapter-brands img:nth-child(5) { transition-delay: 0.87s; }
.slide.is-active .chapter-brands img:nth-child(6) { transition-delay: 0.95s; }
.slide.is-active .chapter-brands img:nth-child(7) { transition-delay: 1.03s; }

/* Capítulos: Ken Burns lento del fondo mientras la slide está activa */
.slide--chapter.is-active .bg { animation: chapterkb 16s var(--ease-out) forwards; }
@keyframes chapterkb { from { transform: scale(1.12); } to { transform: scale(1.02); } }

/* Portada: respiración de brillo + latido del corazón rojo */
.slide--cover::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(227, 44, 30, 0.16), transparent 46%);
  animation: breathe 7s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: 0.5; } to { opacity: 1; } }
.slide--cover.is-active .cover-clover .leaf:nth-child(2) {
  animation: leafin 1.1s var(--ease-out) 0.2s both, heartbeat 3.4s ease-in-out 2.2s infinite;
}
@keyframes heartbeat {
  0%, 26%, 100% { scale: 1; }
  6% { scale: 1.09; }
  12% { scale: 1; }
  18% { scale: 1.06; }
}

/* Números rojos: brillo animado de fondo en la slide de cifras */
.slide--red::after {
  content: ''; position: absolute; inset: -20%; pointer-events: none;
  background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.12), transparent 40%);
  animation: sheen 9s ease-in-out infinite alternate;
}
@keyframes sheen { from { transform: translate3d(-4%, 3%, 0); } to { transform: translate3d(6%, -4%, 0); } }

/* Mapa de red: líneas que se trazan, nodos que aparecen, centro que pulsa */
.slide--map svg line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease-out); }
.slide--map.is-active svg line { stroke-dashoffset: 0; }
.slide--map.is-active svg g:nth-of-type(1) line { transition-delay: 0.35s; }
.slide--map.is-active svg g:nth-of-type(2) line { transition-delay: 0.75s; }
.slide--map svg circle, .slide--map svg text { opacity: 0; transition: opacity 0.7s var(--ease-out); }
.slide--map.is-active svg circle, .slide--map.is-active svg text { opacity: 1; }
.slide--map.is-active svg > circle:nth-of-type(1) { transition-delay: 0.15s; }
.slide--map.is-active svg > circle:nth-of-type(2) { transition-delay: 0.25s; }
.slide--map.is-active svg g circle { transition-delay: 0.9s; }
.slide--map.is-active svg g text { transition-delay: 1.15s; }
.slide--map svg .pulse { opacity: 0; }
.slide--map.is-active svg .pulse {
  opacity: 1; transform-box: fill-box; transform-origin: center;
  animation: netpulse 2.8s ease-out 1.4s infinite;
}
@keyframes netpulse {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(1.85); opacity: 0; }
  100% { transform: scale(1.85); opacity: 0; }
}

/* Velo rojo: barrido al entrar a un capítulo */
.veil {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: linear-gradient(115deg, var(--red-deep), var(--red) 55%, var(--red-bright));
  transform: scaleX(0); transform-origin: left;
  display: grid; place-items: center;
}
.veil svg { width: clamp(70px, 10vh, 110px); opacity: 0; }
.veil.run { animation: veilsweep 0.95s cubic-bezier(0.77, 0, 0.18, 1) forwards; }
.veil.run svg { animation: veilmark 0.95s ease forwards; }
@keyframes veilsweep {
  0% { transform: scaleX(0); transform-origin: left; }
  46% { transform: scaleX(1); transform-origin: left; }
  54% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
@keyframes veilmark {
  0%, 30% { opacity: 0; transform: scale(0.6); }
  48% { opacity: 1; transform: scale(1); }
  62% { opacity: 1; }
  78%, 100% { opacity: 0; transform: scale(1.1); }
}

/* Autoplay: indicador */
.hud__count .play { color: var(--red-bright); margin-right: 0.5rem; }

/* Movimiento reducido: sin acrobacias */
@media (prefers-reduced-motion: reduce) {
  .slide, .slide .up, .slide h1, .slide h2, .slide figure, .slide figure img, .slide .blogo { filter: none !important; clip-path: none !important; transform: none !important; }
  .veil { display: none !important; }
  .slide--cover::before, .slide--red::after, .slide--cover .cover-clover .leaf,
  .slide--chapter .bg, .slide--map svg .pulse, .hint { animation: none !important; }
  .slide--map svg .pulse { opacity: 0 !important; }
  .pcard svg path, .pcard svg circle, .slide--map svg line { stroke-dasharray: none !important; }
  .slide--map svg circle, .slide--map svg text { opacity: 1 !important; }
  .chapter-brands img { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Impresión (PDF) ---------- */
@media print {
  html, body { overflow: visible; background: #fff; }
  .deck { position: static; }
  .deck.is-overview { display: block; }
  .slide, .deck.is-overview .slide {
    position: relative; opacity: 1 !important; visibility: visible !important; transform: none !important;
    filter: none !important;
    page-break-after: always; height: 100vh; inset: auto;
    zoom: 1; margin: 0; border-radius: 0; outline: none;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .slide:last-child { page-break-after: auto; }
  .slide .up, .slide .blogo { opacity: 1 !important; transform: none !important; filter: none !important; }
  .slide h1, .slide h2, .slide figure { clip-path: none !important; }
  .slide figure img { transform: none !important; }
  .pcard svg path, .pcard svg circle, .slide--map svg line { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .slide--map svg circle, .slide--map svg text { opacity: 1 !important; }
  .chapter-brands img { opacity: 1 !important; transform: none !important; }
  .hud, .deck-progress, .hint, .veil { display: none !important; }
}
