/* Página que el bot transmite como su cámara (1280×720). Paleta y tipografía de business/brand/logo. */
:root {
  --ink: #2d333b;
  --blue: #0052b4;
  --teal: #5ba8b0;
  --muted: #6b7a8a;
  --line: #e5eaf1;
  --level: 0; /* nivel de la voz del agente 0..1 (voiceMeter.js) */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #f7f9fc;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px 40px 96px;
  text-align: center;
}

/* --- Marca animada --- */
.visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 320px;
  height: 260px;
}

.visual::before {
  content: '';
  position: absolute;
  inset: 10% 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(91, 168, 176, 0.28), rgba(0, 82, 180, 0.08) 60%, transparent);
  opacity: calc(0.25 + var(--level) * 0.75);
  transform: scale(calc(0.9 + var(--level) * 0.25));
  transition: opacity 120ms linear, transform 120ms linear;
}

.mark {
  position: relative;
  width: 300px;
  overflow: visible;
}

.hex {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 90ms linear;
}

.hex-blue {
  transform: translateX(calc(var(--level) * -8px)) scale(calc(1 + var(--level) * 0.06));
}

.hex-teal {
  mix-blend-mode: multiply;
  transform: translateX(calc(var(--level) * 8px)) scale(calc(1 + var(--level) * 0.06));
}

.hexes {
  transform-box: fill-box;
  transform-origin: center;
}

/* Escuchando: respiración lenta. Pensando: los hexágonos se buscan. Hablando: los mueve la voz. */
body[data-tone='listening'] .hexes {
  animation: breathe 4.5s ease-in-out infinite;
}

body[data-tone='thinking'] .hex-blue {
  animation: think-blue 0.9s ease-in-out infinite alternate;
}

body[data-tone='thinking'] .hex-teal {
  animation: think-teal 0.9s ease-in-out infinite alternate;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
}

@keyframes think-blue {
  to {
    transform: translateX(-4px);
  }
}

@keyframes think-teal {
  to {
    transform: translateX(4px);
  }
}

/* --- Identidad --- */
.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

h1 {
  margin: 0;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.role {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #a7b2bf;
}

body[data-tone='listening'] .dot {
  background: var(--teal);
}

body[data-tone='thinking'] .dot {
  background: #d4a017;
  animation: blink 0.9s ease-in-out infinite alternate;
}

body[data-tone='speaking'] .dot {
  background: var(--blue);
}

body[data-tone='speaking'] .status {
  color: var(--blue);
  border-color: rgba(0, 82, 180, 0.25);
}

body[data-tone='error'] .dot {
  background: #c2410c;
}

@keyframes blink {
  to {
    opacity: 0.35;
  }
}

.caption {
  max-width: 820px;
  min-height: 2.8em;
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Presentación (PDF página a página) --- */
#slides {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #f7f9fc;
}

#slides[hidden] {
  display: none;
}

#slideCanvas {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 40, 90, 0.12);
  background: #fff;
}

#slideNum {
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* --- Firma de marca --- */
.brand {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wordmark .ink {
  color: var(--ink);
}

.wordmark .blue {
  color: var(--blue);
}

.wordmark .teal {
  color: var(--teal);
}

.tagline {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
