/* =========================================================================
   BIM aplicado a puentes · Iván Aichino · N+UNO
   Paleta corporativa N+UNO: verde oliva + naranja
   ========================================================================= */

:root {
  /* === Colores corporativos N+UNO (extraídos de los PDFs) === */
  --olive-deep: #3F4530;       /* verde oliva oscuro - fondo principal */
  --olive: #4A5139;            /* verde oliva medio */
  --olive-light: #5C6448;      /* verde oliva claro - cards/bloques */
  --olive-soft: #6B7355;       /* verde oliva suave - bordes */

  --orange: #E2742B;           /* naranja N+UNO - acento principal */
  --orange-bright: #F08537;    /* naranja brillante - hover/highlight */
  --orange-soft: #FDB87A;      /* naranja claro */

  --cream: #F4F1E8;            /* crema - texto principal */
  --white: #FFFFFF;
  --grey-light: #D4D2C8;       /* gris cálido - texto secundario */
  --grey-mid: #8C8B7E;
  --black-soft: #1F2118;

  /* === Tipografía === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* === Layout === */
  --slide-padding: 5vh 6vw;
  --transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--olive-deep);
  color: var(--cream);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================================
   HUD · barra de progreso, contador, controles
   ========================================================================= */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 100;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-bright));
  width: 0%;
  transition: width 0.6s var(--transition);
  box-shadow: 0 0 12px rgba(226, 116, 43, 0.5);
}

.hud {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
}
.counter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-light);
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.counter #currentSlide { color: var(--orange); font-weight: 700; }

.hud-btn {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--cream);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition);
  backdrop-filter: blur(8px);
}
.hud-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: scale(1.05);
}

/* =========================================================================
   Botones de navegación lateral
   ========================================================================= */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cream);
  font-size: 32px;
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition);
  backdrop-filter: blur(8px);
  font-weight: 300;
  line-height: 1;
}
.nav-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(226, 116, 43, 0.4);
}
.nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.nav-btn:disabled:hover { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1); transform: translateY(-50%); box-shadow: none; }

.nav-prev { left: 24px; }
.nav-next { right: 24px; }

/* =========================================================================
   Deck · contenedor de slides
   ========================================================================= */
.deck {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--transition), visibility 0.6s;
  overflow: hidden;
}
.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.slide-padded {
  padding: var(--slide-padding);
  justify-content: flex-start;
}

/* === Header genérico === */
.slide-header { margin-bottom: 5vh; }
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--orange);
  border-radius: 4px;
  margin-bottom: 24px;
}
h2 {
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--white);
}
h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
  color: var(--white);
}
h4 {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  font-weight: 700;
  color: var(--white);
}
.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 300;
  color: var(--grey-light);
  margin-top: 16px;
  max-width: 800px;
  line-height: 1.5;
}
.accent { color: var(--orange); }

/* =========================================================================
   SLIDE 01 · Portada
   ========================================================================= */
.slide-cover { padding: 0; }
.cover-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45) saturate(0.85);
  transform: scale(1.05);
}
.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(63, 69, 48, 0.85) 0%, rgba(31, 33, 24, 0.75) 100%);
}
.cover-content {
  position: relative;
  z-index: 2;
  padding: 8vh 8vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1100px;
}
.cover-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 3px;
  margin-bottom: 32px;
}
.cover-title {
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -3px;
  color: var(--white);
  margin-bottom: 32px;
}
.cover-subtitle {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 300;
  color: var(--grey-light);
  max-width: 720px;
  line-height: 1.5;
  margin-bottom: 60px;
}
.cover-author {
  display: flex;
  align-items: center;
  gap: 20px;
}
.author-line {
  width: 60px;
  height: 2px;
  background: var(--orange);
}
.author-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}
.author-role {
  font-size: 0.95rem;
  color: var(--grey-light);
  margin-top: 2px;
}
.authors-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =========================================================================
   SLIDE 02 · Hook
   ========================================================================= */
.slide-hook { padding: 0; }
.hook-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35) saturate(0.7);
}
.hook-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(63, 69, 48, 0.5) 0%, rgba(31, 33, 24, 0.92) 100%);
}
.hook-content {
  position: relative;
  z-index: 2;
  padding: 0 8vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hook-question {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2.5px;
  color: var(--white);
  margin-bottom: 40px;
}
.hook-answer {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 300;
  color: var(--grey-light);
  font-style: italic;
}

/* =========================================================================
   Pillars · 3 columnas
   ========================================================================= */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 4vh;
}
.pillar {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 36px 32px;
  border-left: 4px solid var(--orange);
  transition: all 0.3s var(--transition);
}
.pillar:hover { transform: translateY(-6px); border-left-color: var(--orange-bright); }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.pillar h3 { margin-bottom: 12px; }
.pillar p { color: var(--grey-light); line-height: 1.55; font-size: 1rem; }

/* Variante compacta para 6 pilares en grid 3x2 */
.pillars.pillars-compact {
  gap: 20px;
  margin-top: 2.5vh;
}
.pillars.pillars-compact .pillar {
  padding: 22px 22px;
  border-left-width: 3px;
}
.pillars.pillars-compact .pillar-num { margin-bottom: 10px; font-size: 12px; }
.pillars.pillars-compact .pillar h3 { font-size: 1.15rem; margin-bottom: 8px; line-height: 1.2; }
.pillars.pillars-compact .pillar p { font-size: 0.88rem; line-height: 1.45; }

/* Slides con contenido denso (12 · Cómputos, 13 · Interferencias) */
.slide-fit .slide-header { margin-bottom: 2vh; }
.slide-fit .lead { font-size: 1rem; }
.slide-fit .duo-grid { margin-top: 2vh; gap: 24px; }
.slide-fit .duo-card { padding: 14px; }
.slide-fit .duo-card img { max-height: 34vh; margin-bottom: 10px; }
.slide-fit .duo-caption { font-size: 0.9rem; }
.slide-fit .image-frame { margin-top: 2vh; max-height: 64vh; padding: 12px; }
.slide-fit .image-frame img { max-height: 62vh; }
.slide-fit .impact-num { margin-top: 2vh; padding: 16px 24px; gap: 18px; }
.slide-fit .big-num { font-size: clamp(2.4rem, 4.5vw, 3.8rem); letter-spacing: -2px; }
.slide-fit .big-num-text { font-size: 1rem; }
.slide-fit .split { margin: 2vh 0; gap: 24px; }
.slide-fit .split-side { padding: 16px; }
.slide-fit .split-side img { max-height: 30vh; margin: 10px 0; }
.slide-fit .split-caption { font-size: 0.9rem; margin-top: 8px; }
.slide-fit .quote-band { margin-top: 2vh; padding: 14px 20px; }
.slide-fit .quote-band p { font-size: clamp(1.1rem, 2vw, 1.6rem); }
.slide-fit .comparison { margin-top: 2vh; gap: 24px; }
.slide-fit .comp-col { padding: 20px; }
.slide-fit .comp-col h3 { margin-bottom: 14px; font-size: 1.2rem; }
.slide-fit .comp-col li { font-size: 0.95rem; }
.slide-fit .comp-col ul { gap: 10px; }
.slide-fit .ui-proof { margin: 2vh 0; }
.slide-fit .ui-proof img { max-height: 32vh; }
.slide-fit .before-after { margin: 2vh 0; gap: 18px; }
.slide-fit .ba-side img { max-height: 18vh; }
.slide-fit .evolution { margin-top: 2vh; gap: 20px; }
.slide-fit .evo-step { padding: 20px 18px; }
.slide-fit .evo-step h4 { font-size: 1.05rem; margin-bottom: 6px; }
.slide-fit .evo-step p { font-size: 0.9rem; line-height: 1.4; }
.slide-fit .evo-icon { font-size: 2rem; margin-bottom: 10px; }

/* =========================================================================
   UI proof · screenshot compacto como evidencia
   ========================================================================= */
.ui-proof {
  margin: 3vh 0;
  display: flex;
  justify-content: center;
}
.ui-proof img {
  width: 100%;
  max-width: 1100px;
  max-height: 38vh;
  border-radius: 10px;
  border: 1px solid var(--olive-soft);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

/* =========================================================================
   Before / After banner · dos imágenes con flecha (caso transferencia)
   ========================================================================= */
.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin: 3vh 0;
}
.ba-side {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.ba-side img {
  width: 100%;
  max-height: 22vh;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 8px;
  min-height: 120px;
  background: var(--olive-deep);
}
.ba-side img::before {
  content: attr(alt);
  display: block;
  text-align: center;
  padding: 40px 10px;
  font-size: 0.85rem;
  color: var(--grey-mid);
  font-style: italic;
}
.ba-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--grey-light);
}
.ba-label.accent { color: var(--orange); }
.ba-arrow {
  font-size: 2.4rem;
  color: var(--orange);
  font-weight: 200;
}

/* =========================================================================
   Split · 2D vs 3D
   ========================================================================= */
.split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
  margin: 4vh 0;
}
.split-side {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}
.split-side img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  margin: 16px 0;
  max-height: 38vh;
  object-fit: cover;
}
.split-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.split-label.accent { color: var(--orange); }
.split-caption { font-size: 0.95rem; color: var(--grey-light); margin-top: 12px; }
.split-arrow {
  font-size: 3rem;
  color: var(--orange);
  font-weight: 200;
}

.quote-band {
  margin-top: 4vh;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--olive-soft);
  border-bottom: 1px solid var(--olive-soft);
}
.quote-band p {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
}

/* =========================================================================
   Slide 05 · Imagen full
   ========================================================================= */
.slide-image-full { padding: 0; }
.full-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-caption-box {
  position: absolute;
  bottom: 6vh;
  left: 6vw;
  max-width: 600px;
  background: rgba(31, 33, 24, 0.92);
  backdrop-filter: blur(12px);
  padding: 32px 36px;
  border-radius: 12px;
  border-left: 4px solid var(--orange);
  z-index: 2;
}
.image-caption-box h2 { font-size: 2.6rem; margin: 16px 0 24px; }
.caption-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.caption-stats > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
}
.caption-stats strong {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  min-width: 100px;
}
.caption-stats span { color: var(--grey-light); }

/* =========================================================================
   Evolution · 3 pasos
   ========================================================================= */
.evolution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 6vh;
  flex-wrap: wrap;
}
.evo-step {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  flex: 1;
  max-width: 280px;
  transition: all 0.3s var(--transition);
}
.evo-step:hover { transform: translateY(-8px); border-color: var(--orange); }
.evo-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  filter: grayscale(0.3);
}
.evo-step h4 { margin-bottom: 8px; }
.evo-step p { color: var(--grey-light); font-size: 0.95rem; }
.evo-arrow {
  font-size: 2.5rem;
  color: var(--orange);
  font-weight: 200;
}

/* =========================================================================
   Federated · imagen + lista
   ========================================================================= */
.federated-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
}
.federated-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.federated-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fed-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--olive);
  padding: 20px 24px;
  border-radius: 10px;
  border: 1px solid var(--olive-soft);
  font-size: 1.05rem;
}
.fed-item strong { color: var(--orange); margin-right: 6px; }
.fed-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fed-1 { background: #5DADE2; }
.fed-2 { background: #E2742B; }
.fed-3 { background: #58D68D; }
.fed-4 { background: #BDC3C7; }

/* =========================================================================
   Anatomy
   ========================================================================= */
.anatomy {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.anatomy-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.anatomy-tags {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tag {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--olive);
  padding: 16px 22px;
  border-radius: 8px;
  border-left: 3px solid var(--orange);
  font-size: 1rem;
  color: var(--cream);
}
.tag-num {
  width: 32px;
  height: 32px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* =========================================================================
   Slide image-split (imagen 50% + texto 50%)
   ========================================================================= */
.slide-image-split { padding: 0; flex-direction: row; }
.split-image-side {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.split-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-text-side {
  width: 50%;
  height: 100%;
  padding: 8vh 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--olive-deep);
}
.split-text-side h2 { margin: 16px 0 24px; }
.split-text-side p {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--grey-light);
  line-height: 1.6;
  margin-bottom: 28px;
}
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.05rem;
  color: var(--cream);
}
.bullet { color: var(--orange); font-weight: 700; }

/* =========================================================================
   CDE Diagram
   ========================================================================= */
.cde-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 6vh;
}
.cde-actor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--cream);
}
.cde-icon {
  font-size: 2.5rem;
  width: 80px;
  height: 80px;
  background: var(--olive);
  border: 2px solid var(--olive-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cde-center { display: flex; justify-content: center; }
.cde-orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange) 0%, #C5601E 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: var(--white);
  font-size: 1.05rem;
  position: relative;
  box-shadow: 0 0 60px rgba(226, 116, 43, 0.5);
}
.cde-pulse {
  position: absolute;
  inset: -8px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  animation: pulse 2.5s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* =========================================================================
   Duo grid (2 imágenes lado a lado)
   ========================================================================= */
.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 4vh;
}
.duo-card {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s var(--transition);
}
.duo-card:hover { transform: translateY(-4px); border-color: var(--orange); }
.duo-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  max-height: 42vh;
  object-fit: cover;
}
.duo-caption {
  font-size: 1rem;
  color: var(--grey-light);
  text-align: center;
}
.duo-caption strong { color: var(--orange); }

/* =========================================================================
   Image frame (única imagen centrada con marco)
   ========================================================================= */
.image-frame {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 16px;
  margin-top: 4vh;
  max-height: 60vh;
  overflow: hidden;
}
.image-frame img {
  width: 100%;
  border-radius: 8px;
  display: block;
  max-height: 56vh;
  object-fit: contain;
}

/* =========================================================================
   Impact number
   ========================================================================= */
.impact-num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 4vh;
  padding: 24px;
  background: var(--olive);
  border-radius: 12px;
  border: 1px solid var(--orange);
}
.big-num {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--orange);
  letter-spacing: -3px;
  line-height: 1;
}
.big-num-text {
  font-size: 1.1rem;
  color: var(--grey-light);
  max-width: 400px;
  text-align: left;
  line-height: 1.35;
}

/* =========================================================================
   Comparison
   ========================================================================= */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 4vh;
}
.comp-col {
  background: var(--olive);
  border-radius: 12px;
  padding: 36px 32px;
  border-top: 4px solid var(--olive-soft);
}
.comp-col-accent { border-top-color: var(--orange); }
.comp-col h3 { margin-bottom: 24px; }
.comp-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.comp-col li { color: var(--cream); font-size: 1.05rem; }

/* =========================================================================
   Task mock
   ========================================================================= */
.task-mock {
  background: var(--black-soft);
  border: 1px solid var(--olive-soft);
  border-radius: 10px;
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.task-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--olive-soft);
}
.task-row:last-child { border-bottom: none; }
.task-label {
  color: var(--grey-mid);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.badge-high { background: rgba(226, 116, 43, 0.2); color: var(--orange); }
.badge-done { background: rgba(88, 214, 141, 0.2); color: #58D68D; }

/* =========================================================================
   Trio grid
   ========================================================================= */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 4vh;
}
.trio-card {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s var(--transition);
}
.trio-card:hover { transform: translateY(-6px); border-color: var(--orange); }
.trio-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  height: 32vh;
  object-fit: cover;
}
.trio-card h4 { margin-bottom: 6px; }
.trio-card p { color: var(--grey-light); font-size: 0.9rem; }

/* =========================================================================
   Sync flow
   ========================================================================= */
.sync-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 6vh 0 4vh;
}
.sync-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  padding: 28px 36px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  min-width: 160px;
}
.sync-node.sync-cloud {
  border-color: var(--orange);
  background: linear-gradient(135deg, var(--olive), var(--olive-light));
}
.sync-icon { font-size: 2.5rem; }
.sync-arrow { font-size: 2rem; color: var(--orange); font-weight: 200; }

.sync-features {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.sync-feat {
  background: var(--olive);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.92rem;
  color: var(--grey-light);
  border: 1px solid var(--olive-soft);
}

/* =========================================================================
   Rule example (organizador)
   ========================================================================= */
.rule-example {
  background: var(--black-soft);
  border-left: 3px solid var(--orange);
  padding: 20px 24px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-top: 24px;
}
.rule-line { margin-bottom: 8px; color: var(--grey-light); }
.rule-prop { color: #5DADE2; }
.rule-val { color: var(--orange); }
.rule-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--olive-soft);
  color: var(--cream);
}

/* =========================================================================
   Status sharing (slide estrella)
   ========================================================================= */
.status-main {
  margin-top: 3vh;
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 16px;
  max-height: 50vh;
  overflow: hidden;
}
.status-main img {
  width: 100%;
  border-radius: 8px;
  display: block;
  max-height: 46vh;
  object-fit: contain;
}
.status-legend {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--cream);
}
.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}
.ld-grey  { background: #95a5a6; }
.ld-blue  { background: #5DADE2; }
.ld-amber { background: #F39C12; }
.ld-red   { background: #E74C3C; }
.ld-green { background: #27AE60; }

/* =========================================================================
   Obra grid (4 cards)
   ========================================================================= */
.obra-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 4vh;
}
.obra-card {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  border-bottom: 3px solid var(--orange);
  transition: all 0.3s var(--transition);
}
.obra-card:hover { transform: translateY(-6px); }
.obra-icon { font-size: 2.4rem; margin-bottom: 14px; }
.obra-card h4 { margin-bottom: 8px; }
.obra-card p { color: var(--grey-light); font-size: 0.92rem; line-height: 1.5; }

/* =========================================================================
   Benefits
   ========================================================================= */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 5vh;
}
.benefit {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  border-top: 4px solid var(--orange);
}
.benefit-num {
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 900;
  color: var(--orange);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 14px;
}
.benefit-label {
  color: var(--grey-light);
  font-size: 1rem;
  line-height: 1.4;
}
.benefit-note {
  text-align: center;
  margin-top: 4vh;
  color: var(--grey-mid);
  font-size: 0.85rem;
  font-style: italic;
}

/* =========================================================================
   Closing slide
   ========================================================================= */
.slide-closing { padding: 0; }
.closing-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3) blur(2px);
  transform: scale(1.1);
}
.closing-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(31, 33, 24, 0.92) 0%, rgba(63, 69, 48, 0.85) 100%);
}
.closing-content {
  position: relative;
  z-index: 2;
  padding: 8vh 8vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.closing-quote {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2.5px;
  color: var(--white);
  max-width: 1100px;
  margin-bottom: 60px;
}
.closing-quote .strike {
  text-decoration: line-through;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 4px;
  color: var(--grey-light);
  font-weight: 400;
}
.closing-author {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 60px;
}
.closing-brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* =========================================================================
   ANIMACIONES (se activan al mostrar el slide)
   ========================================================================= */
.slide:not(.active) [class*="anim-"] {
  opacity: 0;
}

.slide.active .anim-fade-in {
  animation: fadeIn 0.8s var(--transition) forwards;
}
.slide.active .anim-fade-in-delay {
  animation: fadeIn 0.8s var(--transition) 0.4s forwards;
  opacity: 0;
}
.slide.active .anim-rise {
  animation: rise 0.8s var(--transition) forwards;
}
.slide.active .anim-rise-delay-1 { animation: rise 0.8s var(--transition) 0.15s forwards; opacity: 0; }
.slide.active .anim-rise-delay-2 { animation: rise 0.8s var(--transition) 0.3s forwards; opacity: 0; }
.slide.active .anim-rise-delay-3 { animation: rise 0.8s var(--transition) 0.45s forwards; opacity: 0; }
.slide.active .anim-rise-delay-4 { animation: rise 0.8s var(--transition) 0.6s forwards; opacity: 0; }

.slide.active .anim-slide-left {
  animation: slideFromLeft 0.8s var(--transition) forwards;
}
.slide.active .anim-slide-right {
  animation: slideFromRight 0.8s var(--transition) forwards;
}
.slide.active .anim-pop {
  animation: pop 0.7s var(--transition) forwards;
}
.slide.active .anim-pop-delay-1 { animation: pop 0.7s var(--transition) 0.15s forwards; opacity: 0; }
.slide.active .anim-pop-delay-2 { animation: pop 0.7s var(--transition) 0.3s forwards; opacity: 0; }
.slide.active .anim-pop-delay-3 { animation: pop 0.7s var(--transition) 0.45s forwards; opacity: 0; }
.slide.active .anim-zoom-in {
  animation: zoomIn 1s var(--transition) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideFromLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}

/* =========================================================================
   Responsive básico (la presentación está pensada para PC / monitor)
   ========================================================================= */
@media (max-width: 1024px) {
  .pillars, .obra-grid, .benefits { grid-template-columns: repeat(2, 1fr); }
  .trio-grid { grid-template-columns: 1fr; }
  .cde-diagram { grid-template-columns: 1fr; gap: 20px; }
  .slide-image-split { flex-direction: column; }
  .split-image-side, .split-text-side { width: 100%; height: 50%; }
  .federated-layout, .anatomy { grid-template-columns: 1fr; gap: 24px; }
  .split { grid-template-columns: 1fr; }
  .split-arrow { transform: rotate(90deg); margin: 0 auto; }
}

/* =========================================================================
   Split image variant para screenshots de UI (fondo oscuro + contain)
   ========================================================================= */
.split-image-ui {
  background: var(--olive-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 3vw;
}
.split-image-ui img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--olive-soft);
}

/* =========================================================================
   Stacked blocks · lista vertical de bloques comparativos
   ========================================================================= */
.stacked-blocks {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}
.stacked-block {
  background: var(--olive);
  border: 1px solid var(--olive-soft);
  border-radius: 10px;
  padding: 18px 22px;
  border-left: 3px solid var(--grey-mid);
}
.stacked-block.stacked-block-accent {
  border-left-color: var(--orange);
}
.stacked-block h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: var(--cream);
}
.stacked-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stacked-block li {
  font-size: 0.95rem;
  color: var(--grey-light);
  line-height: 1.4;
}

/* =========================================================================
   Rail sidebar · indice colapsable
   ========================================================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 52px;
  background: rgba(31, 33, 24, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  z-index: 90;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 72px;
  padding-bottom: 24px;
  transition: width 0.3s var(--transition);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.sidebar:hover { width: 300px; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--grey-light);
  user-select: none;
}
.sidebar-item:hover { background: rgba(255, 255, 255, 0.04); }
.sidebar-item.active {
  border-left-color: var(--orange);
  color: var(--orange);
  background: rgba(226, 116, 43, 0.08);
}
.sidebar-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  min-width: 22px;
  text-align: right;
  color: var(--grey-mid);
  flex-shrink: 0;
}
.sidebar-item.active .sidebar-num { color: var(--orange); }
.sidebar-title {
  font-size: 0.85rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.2s 0.1s;
  flex: 1;
  min-width: 0;
}
.sidebar:hover .sidebar-title { opacity: 1; }

/* Desplazar el boton prev para no taparlo con el rail */
.nav-prev { left: 72px; }
.sidebar:hover ~ .nav-prev { left: 316px; }

/* =========================================================================
   Impresión · exportar a PDF (Ctrl+P → Guardar como PDF)
   ========================================================================= */
@page {
  size: 297mm 167mm;   /* 16:9 aprox, misma proporcion que el deck */
  margin: 0;
}

@media print {
  html, body {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: var(--olive-deep) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  /* Ocultar toda la cromía interactiva */
  .progress-bar,
  .hud,
  .nav-btn,
  .sidebar { display: none !important; }

  /* Contenedor del deck: que fluya vertical */
  .deck,
  main.deck {
    display: block !important;
    position: static !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* TODAS las slides visibles, apiladas verticalmente, 1 por pagina */
  .slide,
  section.slide {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    width: 100% !important;
    height: 167mm !important;
    min-height: 167mm !important;
    max-height: 167mm !important;
    margin: 0 !important;
    page-break-after: always !important;
    page-break-inside: avoid !important;
    break-after: page !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    z-index: auto !important;
    transform: none !important;
  }
  .slide:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  /* Desactivar animaciones y forzar estado final */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .anim-fade-in, .anim-fade-in-delay,
  .anim-rise, .anim-rise-delay-1, .anim-rise-delay-2, .anim-rise-delay-3, .anim-rise-delay-4,
  .anim-slide-left, .anim-slide-right,
  .anim-pop, .anim-pop-delay-1, .anim-pop-delay-2, .anim-pop-delay-3,
  .anim-zoom-in, .anim-zoom-in-delay {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* Fondos con imagen (portada, cierre, slide 5) se imprimen */
  .cover-bg, .hook-bg, .closing-bg,
  .full-image, img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
