/*
  Tema Reveal — identidad Magíster IA / uai.cl
  Misma gramática que el sitio: navbar negra + logo, fondo claro,
  labels primary extrabold, Corporativo 300/800, sin “tech dark”.
*/
:root {
  --uai-negro: #15171a;
  --uai-blanco: #ffffff;
  --uai-bg-soft: #f3f5f7;
  --uai-primary: #00afd8;
  --uai-primary-dark: #007fb5;
  --uai-cyan: #009fe3;
  --uai-celeste: #6493b5;
  --uai-gray: #616365;
  --uai-border: #e5e7eb;
  --uai-top-h: 56px;
  --uai-chrome-h: 40px;

  --r-background-color: #ffffff;
  --r-main-font: "Roboto", "Open Sans", system-ui, sans-serif;
  --r-main-font-size: 34px;
  --r-main-color: #15171a;
  --r-block-margin: 16px;
  --r-heading-margin: 0 0 0.5em 0;
  --r-heading-font: "UAI Corporativo", "Roboto", system-ui, sans-serif;
  --r-heading-color: #15171a;
  --r-heading-line-height: 1.15;
  --r-heading-letter-spacing: -0.01em;
  --r-heading-text-transform: none;
  --r-heading-text-shadow: none;
  --r-heading-font-weight: 300;
  --r-heading1-size: 2.35em;
  --r-heading2-size: 1.45em;
  --r-heading3-size: 1.1em;
  --r-heading4-size: 1em;
  --r-link-color: #007fb5;
  --r-link-color-dark: #005f88;
  --r-link-color-hover: #00afd8;
  --r-selection-background-color: #00afd8;
  --r-selection-color: #fff;
}

html,
body {
  background: var(--uai-blanco);
  color: var(--uai-negro);
}

.reveal {
  font-size: var(--r-main-font-size); /* sin esto, em de h1/h2 cae a 16px del root */
  font-weight: 400;
  color: var(--uai-negro);
}

.reveal .slides {
  text-align: left;
}

.reveal .slides section {
  text-align: left;
  padding: calc(1.4rem + var(--uai-top-h)) 3rem calc(1.6rem + var(--uai-chrome-h));
  box-sizing: border-box;
}

.reveal .slides section.center {
  text-align: left;
}

.reveal h1 {
  font-family: "UAI Corporativo", "Roboto", system-ui, sans-serif;
  font-weight: 300;
  font-size: 2.35em; /* reveal.css sin theme no aplica --r-heading1-size */
  color: var(--uai-negro);
  letter-spacing: -0.02em;
  max-width: 20ch; /* títulos ES largos (p.ej. Operación de sistemas…) */
  line-height: 1.12;
}

.reveal h2 {
  font-family: "UAI Corporativo", "Roboto", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.45em;
  color: var(--uai-negro);
  max-width: 28ch;
  line-height: 1.15;
}

.reveal .slides section.slide-content h2 {
  max-width: 32ch;
}

.reveal h3 {
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1em;
  color: var(--uai-negro);
}

.reveal p,
.reveal li {
  color: var(--uai-negro);
  font-family: "Roboto", system-ui, sans-serif;
}

.reveal .slides section.slide-prose p {
  max-width: 34em;
  font-size: 0.82em;
  line-height: 1.4;
  margin: 0 0 0.55em;
}

.reveal .slides section.slide-prose p.uai-lab {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.62em;
  color: var(--uai-gray);
  background: var(--uai-bg-soft);
  border-left: 3px solid var(--uai-primary);
  padding: 0.55em 0.75em;
  max-width: 42em;
}

.reveal .slides section.slide-image .slide-shot {
  margin-top: 0.35em;
}

/* Igual que h4.label-uai del sitio */
.reveal .uai-kicker {
  color: var(--uai-primary);
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.55em;
  letter-spacing: 0.01em;
  margin: 0 0 0.65em;
  text-transform: none;
}

.reveal .uai-muted {
  color: var(--uai-gray);
  font-size: 0.58em;
  font-weight: 400;
  line-height: 1.45;
  max-width: 42ch;
}

.reveal ul {
  display: block;
  margin: 0.35em 0 0;
  padding-left: 1.05em;
  list-style: none;
  max-width: 34em;
}

.reveal li {
  position: relative;
  margin: 0.38em 0;
  padding-left: 0.15em;
  line-height: 1.35;
  font-size: 0.88em;
}

.reveal li::before {
  content: "";
  position: absolute;
  left: -0.95em;
  top: 0.55em;
  width: 0.38em;
  height: 0.38em;
  background: var(--uai-primary);
  border-radius: 1px;
}

/* Top bar = site-header */
.slide-topbar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: var(--uai-top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem 0 1.35rem;
  background: var(--uai-negro);
  color: #fff;
  font-family: "Roboto", system-ui, sans-serif;
  z-index: 38;
}

.slide-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.slide-topbar__logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.slide-topbar__program {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-topbar__exit {
  font: 700 13px/1 "Roboto", system-ui, sans-serif;
  color: #fff;
  text-decoration: none;
  background: var(--uai-primary);
  padding: 10px 16px;
  border-radius: 2px;
  flex-shrink: 0;
}

.slide-topbar__exit:hover {
  background: var(--uai-primary-dark);
}

/* Footer meta bar */
.slide-chrome {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--uai-chrome-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.35rem;
  background: var(--uai-bg-soft);
  border-top: 1px solid var(--uai-border);
  color: var(--uai-gray);
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  z-index: 35;
  pointer-events: none;
}

.slide-chrome__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--uai-primary);
}

.slide-chrome__meta {
  color: var(--uai-gray);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slide-chrome__meta--unit {
  flex: 1;
  padding-right: 1rem;
}

.slide-chrome__meta--org {
  flex-shrink: 0;
}

.slide-chrome__meta strong {
  color: var(--uai-negro);
  font-weight: 700;
}

/* Portada: brand first, left composition like sitio.
   Reveal fuerza display:block en section — hay que ganar con !important. */
.reveal .slides section.slide-title {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding-top: calc(1.2rem + var(--uai-top-h));
}

.reveal .slides section.slide-title h1 {
  font-size: 2.1em; /* un poco bajo el h1 genérico para caber en ≤2 líneas */
  max-width: 22ch; /* 16ch partía “Arquitectura del …” en 3 líneas */
  margin: 0;
}

.reveal .title-rule {
  width: 56px;
  height: 4px;
  background: var(--uai-primary);
  margin: 0.85em 0 1em;
  border: 0;
}

/* Separadores: tema grande, bloque como label; fill vertical sin “vacío muerto” */
.reveal .slides section.slide-section {
  background: var(--uai-bg-soft);
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.reveal .slides section.slide-section .slide-section__inner {
  max-width: 18ch;
}

.reveal .slides section.slide-section h2 {
  font-weight: 300;
  font-size: 2.2em;
  max-width: 16ch;
  margin: 0;
}

.reveal .progress {
  color: var(--uai-primary);
  height: 3px;
  bottom: var(--uai-chrome-h);
  z-index: 36;
}

.reveal .controls {
  color: var(--uai-primary);
  right: 14px;
  bottom: calc(var(--uai-chrome-h) + 12px);
  opacity: 0.28;
  transition: opacity 0.2s ease;
}

.reveal:hover .controls,
.reveal .controls:focus-within {
  opacity: 1;
}

.reveal .slide-number {
  right: 18px;
  bottom: calc(var(--uai-chrome-h) + 12px);
  background: transparent;
  color: var(--uai-gray);
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.reveal .slide-number a {
  color: inherit;
  text-decoration: none;
}

.reveal .slide-shot {
  display: block;
  max-width: min(100%, 920px);
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0.45em 0 0.35em;
  border: 1px solid var(--uai-border);
  border-radius: 2px;
  background: var(--uai-bg-soft);
  box-shadow: none;
}

.reveal .slide-caption {
  text-align: left;
  font-size: 0.48em;
  color: var(--uai-gray);
  margin-top: 0.25em;
  max-width: 52ch;
}

/* Ilustraciones D3 */
.reveal .slides section.slide-viz h2 {
  margin-bottom: 0.35em;
}

.reveal .uai-viz {
  width: 100%;
  height: 380px;
  margin: 0.15em 0 0.2em;
  background: var(--uai-blanco);
  border: 1px solid var(--uai-border);
  border-radius: 2px;
  overflow: hidden;
}

.reveal .uai-viz svg {
  display: block;
  width: 100%;
  height: 100%;
}

.reveal .uai-viz text {
  pointer-events: none;
}

.reveal .slides section .fragment {
  opacity: 0.15;
}
.reveal .slides section .fragment.visible {
  opacity: 1;
}
