/* src/styles/staggered-menu.css */
/*
 * Estado abierto del menú escalonado.
 *
 * Va en una hoja propia y no en el sistema de diseño porque el compilador de
 * clases del editor descarta estas reglas: las que dependen de una clase que
 * ningún nodo lleva (.sm-open, .is-open) desaparecen enteras, y de las
 * .sm-cb:checked ~ … solo emitió una de diez. Aquí el CSS se sirve tal cual.
 *
 * Abrir y cerrar es un <input type="checkbox"> oculto con su <label>, así que
 * el menú funciona sin JavaScript. La coreografía reproduce la del
 * StaggeredMenu de React Bits con transiciones y retardos:
 *
 *   capas 0 s y 0,07 s → panel 0,15 s → líneas 0,25 s (+0,1 s cada una) →
 *   numeración 0,35 s (+0,08 s) → contacto 0,41 s (+0,08 s)
 */

.sm-cb:checked ~ .hdr .sm-toggle-textInner {
  transform: translateY(-50%);
}

.sm-cb:checked ~ .hdr .sm-icon {
  transform: rotate(225deg);
}

.sm-cb:checked ~ .hdr {
  background-color: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.sm-cb:checked ~ .sm-prelayers .sm-prelayer {
  transform: translateX(0);
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-cb:checked ~ .sm-prelayers .sm-prelayer:nth-child(2) {
  transition-delay: 0.07s;
}

.sm-cb:checked ~ .sm-panel {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, visibility 0s linear 0s;
}

.sm-cb:checked ~ .sm-panel .sm-panel-itemLabel {
  transform: none;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(0.25s + var(--i, 0) * 0.1s);
}

.sm-cb:checked ~ .sm-panel .sm-panel-item::after {
  opacity: 1;
  transition: opacity 0.6s ease;
  transition-delay: calc(0.35s + var(--i, 0) * 0.08s);
}

.sm-cb:checked ~ .sm-panel .sm-socials-title {
  opacity: 1;
  transition: opacity 0.5s ease 0.41s;
}

.sm-cb:checked ~ .sm-panel .sm-socials-link {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
  transition-delay: calc(0.45s + var(--i, 0) * 0.08s);
}

@media (prefers-reduced-motion: reduce) {
  .sm-panel,
  .sm-prelayer,
  .sm-panel-itemLabel,
  .sm-socials-link,
  .sm-toggle-textInner,
  .sm-icon,
  .sm-cb:checked ~ .sm-panel,
  .sm-cb:checked ~ .sm-prelayers .sm-prelayer,
  .sm-cb:checked ~ .sm-panel .sm-panel-itemLabel,
  .sm-cb:checked ~ .sm-panel .sm-socials-link {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}


/* src/styles/bateria-pieza-a-pieza.css */
/*
 * Batería pieza a pieza — sección 3D de la página CEO (#pieza-a-pieza).
 *
 * Un escenario fijo a pantalla completa que avanza con un recorrido de scroll
 * muy largo: el equipo se monta, sigue dando luz en un apagón, se vuelve nueve
 * equipos en paralelo y acaba cargándose de varias fuentes para alimentar la casa. Textos del paso a la izquierda, lista de piezas (luego
 * el esquema de energía) a la derecha. En el apagón el escenario se oscurece.
 * En móvil el texto pasa a una tarjeta abajo.
 *
 * Todo va con prefijo bat- para no tocar las clases del sitio, y en px porque
 * el sitio usa html { font-size: 62.5% }. El escenario se pega debajo de la
 * cabecera (.hdr mide 57 px con su borde).
 */
.bat {
  --bat-paper: #e5e9ec;
  --bat-paper-hi: #f7f9fa;
  --bat-ink: #16202a;
  --bat-ink-soft: #526070;
  --bat-rule: #c4ccd3;
  --bat-copper: #9a5320;
  --bat-amber: #b87a0c;
  --bat-alert: #b8322a;
  --bat-green: #2a9455;
  --bat-green-ink: #1f7a43;
  --bat-card-solid: rgba(247, 249, 250, 0.96);
  --bat-shadow: rgba(22, 32, 42, 0.14);
  --bat-n-bg: #0a0f13;
  --bat-n-bg-hi: #17222b;
  --bat-n-ink: #e6ecef;
  --bat-n-ink-soft: #98a6b1;
  --bat-n-rule: #2b3740;
  --bat-n-copper: #ec9a60;
  --bat-n-amber: #ffc34d;
  --bat-n-alert: #ff6b5d;
  --bat-n-card-solid: rgba(14, 20, 25, 0.95);
  --bat-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --bat-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bat-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --bat-gut: clamp(16px, 3.2vw, 44px);
  --bat-top: 57px;
  /* dónde va la foto mientras carga (y en la versión ligera): centro y alto */
  --bat-poster-x: 50%;
  --bat-poster-y: 46%;
  --bat-poster-h: min(60%, 460px);
  position: relative;
  height: 1450vh;
  height: 1450svh;
  background: var(--bat-paper);
  color: var(--bat-ink);
  font-family: var(--bat-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.bat *, .bat *::before, .bat *::after { box-sizing: border-box; }

/* ---------- escenario fijo ---------- */
.bat-stage {
  position: sticky;
  top: var(--bat-top);
  height: calc(100vh - var(--bat-top));
  height: calc(100svh - var(--bat-top));
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(115% 85% at 56% 44%, var(--bat-paper-hi) 0%, var(--bat-paper) 64%);
}
.bat-stage.is-night {
  --bat-paper: var(--bat-n-bg); --bat-paper-hi: var(--bat-n-bg-hi); --bat-ink: var(--bat-n-ink); --bat-ink-soft: var(--bat-n-ink-soft);
  --bat-rule: var(--bat-n-rule); --bat-copper: var(--bat-n-copper); --bat-amber: var(--bat-n-amber); --bat-alert: var(--bat-n-alert);
  --bat-card-solid: var(--bat-n-card-solid);
}
.bat-veil {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(115% 85% at 56% 44%, var(--bat-n-bg-hi) 0%, var(--bat-n-bg) 64%);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.bat-stage.is-night .bat-veil { opacity: 1; }
.bat-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; transition: opacity 0.6s ease; }
.bat:not(.is-ready) .bat-scene { opacity: 0; }

/* ---------- carga: la foto del equipo (la versión ligera) y debajo la barra; al terminar, la foto se funde con el modelo ---------- */
.bat-fallback-img {
  position: absolute; z-index: 1;
  left: var(--bat-poster-x); top: var(--bat-poster-y);
  height: var(--bat-poster-h); width: auto; max-width: 92%;
  transform: translate(-50%, -50%);
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}
.bat.is-ready .bat-fallback-img { opacity: 0; visibility: hidden; }
.bat-loader {
  position: absolute; z-index: 1;
  left: var(--bat-poster-x);
  top: calc(var(--bat-poster-y) + var(--bat-poster-h) / 2 + 14px);
  width: min(232px, 64%);
  transform: translateX(-50%);
  display: grid; gap: 9px;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.bat-loader-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0;
  font: 500 11px/1 var(--bat-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bat-ink-soft);
}
.bat-loader-t { display: inline-flex; align-items: center; gap: 8px; }
.bat-loader-t::before {
  content: ""; flex: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bat-copper);
  animation: bat-pulse 1.1s ease-in-out infinite;
}
.bat-loader-pct { color: var(--bat-ink); font-variant-numeric: tabular-nums; }
.bat-loader-bar { position: relative; height: 2px; border-radius: 2px; background: var(--bat-rule); overflow: hidden; }
.bat-loader-fill {
  position: absolute; inset: 0; border-radius: inherit;
  background: var(--bat-copper);
  transform-origin: left center; transform: scaleX(0);
  transition: transform 0.25s ease-out;
}
/* sin porcentaje real (navegador sin descarga por partes): una franja que recorre la barra */
.bat-loader.is-indeterminate .bat-loader-fill { right: auto; width: 32%; animation: bat-indet 1.3s ease-in-out infinite; }
.bat-loader.is-indeterminate .bat-loader-pct { visibility: hidden; }
.bat.is-ready .bat-loader { opacity: 0; visibility: hidden; }
@keyframes bat-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes bat-indet { from { transform: translateX(-100%); } to { transform: translateX(320%); } }

/* ---------- globos, etiquetas y líneas de referencia ---------- */
.bat-callouts { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity 0.6s ease; }
.bat:not(.is-ready) .bat-callouts { opacity: 0; }   /* los globos llegan con el modelo, no encima de la foto */
.bat-leaders, .bat-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bat-leaders line { stroke: var(--bat-ink); stroke-width: 1; opacity: 0.75; transition: stroke 0.25s; }
.bat-leaders circle { fill: var(--bat-ink); transition: fill 0.25s; }
.bat-leaders .is-active line { stroke: var(--bat-copper); opacity: 1; }
.bat-leaders .is-active circle { fill: var(--bat-copper); }
.bat-links path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bat-links .bat-lk-wire { stroke: var(--bat-ink); stroke-width: 1.6; opacity: 0.55; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.bat-links .bat-lk-flow { stroke: var(--bat-copper); stroke-width: 3; stroke-dasharray: 0.1 9; animation: bat-stream 0.8s linear infinite; opacity: 0; transition: opacity 0.4s; }
.bat-links .bat-lk-node { fill: var(--bat-copper); opacity: 0; transition: opacity 0.3s; }
.bat-balloon, .bat-tag {
  position: absolute; left: 0; top: 0;
  opacity: 0;
  will-change: transform, opacity;
}
.bat-balloon {
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--bat-ink);
  background: var(--bat-paper-hi);
  color: var(--bat-ink);
  font: 600 13px/1 var(--bat-mono);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.bat-balloon.is-active { background: var(--bat-copper); border-color: var(--bat-copper); color: var(--bat-paper-hi); }
.bat-tag {
  padding: 5px 9px;
  border: 1.5px solid var(--bat-copper);
  border-radius: 6px;
  background: var(--bat-paper-hi);
  color: var(--bat-ink);
  font: 500 12.5px/1.2 var(--bat-sans);
  white-space: nowrap;
  transform-origin: 0 0;
}
.bat-tag-k { font: 600 11.5px/1 var(--bat-mono); color: var(--bat-copper); letter-spacing: 0.04em; margin-left: 6px; }
/* nombres de las fuentes de energía y de la vivienda, en la última fase */
.bat-label {
  position: absolute; left: 0; top: 0;
  opacity: 0;
  padding: 5px 10px;
  border: 1.5px solid var(--bat-rule);
  border-radius: 999px;
  background: var(--bat-paper-hi);
  color: var(--bat-ink);
  font: 600 12.5px/1.2 var(--bat-sans);
  white-space: nowrap;
  will-change: transform, opacity;
  transition: border-color 0.3s;
}
.bat-label.is-live { border-color: var(--bat-copper); }

/* ---------- textos y controles ---------- */
.bat-hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bat-panel { position: absolute; display: grid; gap: 22px; }
.bat-captions { display: grid; }
.bat-captions > .bat-cap { grid-area: 1 / 1; }
.bat-cap {
  display: grid; gap: 10px; align-content: start;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
.bat-cap.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s;
}
.bat-cap p { margin: 0; }
.bat-eyebrow {
  font: 500 12px/1.2 var(--bat-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bat-copper);
  transition: color 0.6s;
}
.bat-cap .bat-title, .bat-cap .bat-h {
  margin: 0;
  font-family: var(--bat-display);
  text-wrap: balance;
  color: var(--bat-ink);
  transition: color 0.6s;
}
.bat-cap .bat-title {
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.bat-cap .bat-h {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.bat-cap .bat-body { color: var(--bat-ink-soft); max-width: 38ch; font-size: 16.3px; transition: color 0.6s; }
.bat-cap .bat-lede { color: var(--bat-ink-soft); max-width: 36ch; font-size: 17.3px; }
.bat-cap .bat-spec {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--bat-rule);
  border-radius: 6px;
  font: 500 12.5px/1.3 var(--bat-mono);
  font-variant-numeric: tabular-nums;
  color: var(--bat-ink);
}
.bat-spec-note { color: var(--bat-ink-soft); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.bat-fleet-count { color: var(--bat-copper); font-weight: 600; font-size: 14px; min-width: 1ch; text-align: right; }
.bat-cap .bat-charge { gap: 10px; }
.bat-charge-l { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bat-ink-soft); }
.bat-charge-bar { position: relative; width: 120px; height: 8px; border-radius: 4px; background: var(--bat-rule); overflow: hidden; }
.bat-charge-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--bat-green); transform-origin: left center; transform: scaleX(0.1); }
.bat-charge-v { min-width: 5ch; text-align: right; color: var(--bat-green-ink); font-size: 14px; font-weight: 600; }
.bat-hint {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 12px/1.2 var(--bat-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bat-ink);
}
.bat-hint-arrow { position: relative; width: 14px; height: 26px; border: 1.5px solid var(--bat-ink); border-radius: 8px; }
.bat-hint-arrow::after {
  content: ""; position: absolute; left: 50%; top: 5px;
  width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px;
  background: var(--bat-copper);
  animation: bat-wheel 1.6s ease-in-out infinite;
}
@keyframes bat-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

.bat .bat-replay {
  pointer-events: auto;
  justify-self: start;
  margin-top: 6px;
  padding: 11px 18px;
  border: 1.5px solid var(--bat-ink);
  border-radius: 8px;
  background: transparent;
  color: var(--bat-ink);
  font: 600 14px/1 var(--bat-sans);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.bat .bat-replay:hover { background: var(--bat-ink); color: var(--bat-paper-hi); }
.bat .bat-replay:focus-visible { outline: 2px solid var(--bat-copper); outline-offset: 3px; }

/* progreso: 6 pasos de montaje, 3 estados de funcionamiento, 3 filas en paralelo y 2 de fuentes (carga y vivienda) */
.bat-meter { display: flex; gap: 12px; max-width: 432px; }
.bat-meter-group { flex: 6; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
.bat-meter-group + .bat-meter-group { flex: 3; }
.bat-meter-seg { position: relative; height: 3px; border-radius: 2px; background: var(--bat-rule); overflow: hidden; transition: background-color 0.6s; }
.bat-meter-fill { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); background: var(--bat-copper); }

/* columna derecha: lista de piezas y, después, el esquema de energía en el mismo hueco */
.bat-side { position: absolute; display: grid; transition: opacity 0.45s ease, visibility 0s; }
.bat-side > * { grid-area: 1 / 1; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }
.bat-side > .is-off { opacity: 0; visibility: hidden; }
.bat-side > :not(.is-off) { transition: opacity 0.45s ease, visibility 0s; }
.bat-stage.is-fleet .bat-side { opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }
.bat-panel-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 0 0 4px; padding-bottom: 10px;
  border-bottom: 1px solid var(--bat-ink);
  font: 500 11.5px/1.2 var(--bat-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bat-ink);
  transition: color 0.6s, border-color 0.6s;
}
.bat-count { font-variant-numeric: tabular-nums; color: var(--bat-ink-soft); }
.bat-bom { font-size: 14px; }
.bat-bom-list { list-style: none; margin: 0; padding: 0; display: grid; }
.bat-bom-item {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--bat-rule);
  color: var(--bat-ink-soft);
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.3s;
}
.bat-bom-item[data-state="active"], .bat-bom-item[data-state="done"] { color: var(--bat-ink); }
.bat-bom-n {
  position: relative;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid currentColor;
  font: 600 11px/1 var(--bat-mono);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
.bat-bom-item[data-state="active"] .bat-bom-n { background: var(--bat-copper); border-color: var(--bat-copper); color: var(--bat-paper-hi); }
.bat-bom-item[data-state="done"] .bat-bom-n { background: var(--bat-ink); border-color: var(--bat-ink); color: transparent; }
.bat-bom-item[data-state="done"] .bat-bom-n::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 9px; height: 5px; margin: -4px 0 0 -4.5px;
  border-left: 1.8px solid var(--bat-paper-hi); border-bottom: 1.8px solid var(--bat-paper-hi);
  transform: rotate(-45deg);
}
.bat-bom-name { font-weight: 500; }
.bat-bom-qty { font: 500 12px/1 var(--bat-mono); font-variant-numeric: tabular-nums; color: var(--bat-ink-soft); }

/* esquema de flujo de energía */
.bat-flow { margin: 0; display: grid; grid-template-rows: auto auto; align-content: start; gap: 10px; }
.bat-flow-state { color: var(--bat-copper); transition: color 0.4s; }
.bat-fs { display: none; }
.bat-flow:not([data-mode]) .bat-fs-grid,
.bat-flow[data-mode="grid"] .bat-fs-grid,
.bat-flow[data-mode="blackout"] .bat-fs-blackout,
.bat-flow[data-mode="island"] .bat-fs-island { display: inline; }
.bat-flow[data-mode="blackout"] .bat-flow-state { color: var(--bat-alert); }
.bat-flow-svg { display: block; justify-self: center; width: var(--bat-flow-svg-w, 100%); max-width: 100%; height: auto; overflow: visible; }
.bat-flow .f-wire, .bat-flow .f-icon { fill: none; stroke: var(--bat-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.5s; }
.bat-flow .f-icon { stroke-width: 1.5; }
.bat-flow .f-fill { fill: var(--bat-paper-hi); transition: fill 0.6s; }
.bat-flow .f-led { fill: var(--bat-copper); }
.bat-flow .f-stream {
  fill: none; stroke: var(--bat-copper); stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: 0.1 9; animation: bat-stream 0.8s linear infinite;
  transition: opacity 0.4s, stroke 0.6s;
}
@keyframes bat-stream { to { stroke-dashoffset: -9.1; } }
.bat-flow .f-t { font-family: var(--bat-mono); font-size: 9px; letter-spacing: 0.05em; fill: var(--bat-ink-soft); transition: fill 0.6s; }
.bat-flow .f-l { font-family: var(--bat-sans); font-size: 11.5px; font-weight: 600; fill: var(--bat-ink); transition: fill 0.6s; }
.bat-flow .f-sun { stroke: var(--bat-amber); }
.bat-flow .f-win { fill: var(--bat-amber); transition: fill 0.4s; }
.bat-flow .f-x { fill: none; stroke: var(--bat-alert); stroke-width: 2.6; stroke-linecap: round; opacity: 0; transition: opacity 0.4s; }
.bat-flow .f-off { fill: var(--bat-alert); opacity: 0; transition: opacity 0.4s; }
.bat-flow .f-sw { opacity: 0; transition: opacity 0.4s; }
.bat-flow .f-island { opacity: 0; transition: opacity 0.5s; }
.bat-flow .f-island rect { fill: var(--bat-copper); }
.bat-flow .f-island text { fill: var(--bat-paper-hi); font-family: var(--bat-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; }
.bat-flow[data-mode="blackout"] .f-grid-part, .bat-flow[data-mode="island"] .f-grid-part { stroke: var(--bat-alert); }
.bat-flow[data-mode="blackout"] .f-grid-wire, .bat-flow[data-mode="island"] .f-grid-wire { stroke-dasharray: 3 4; }
.bat-flow[data-mode="blackout"] .f-s-grid, .bat-flow[data-mode="island"] .f-s-grid { opacity: 0; }
.bat-flow[data-mode="blackout"] .f-x, .bat-flow[data-mode="island"] .f-x,
.bat-flow[data-mode="blackout"] .f-off, .bat-flow[data-mode="island"] .f-off,
.bat-flow[data-mode="blackout"] .f-sw, .bat-flow[data-mode="island"] .f-sw { opacity: 1; }
.bat-flow[data-mode="island"] .f-island { opacity: 1; }
.bat-flow[data-mode="blackout"] .f-wins { animation: bat-flicker 1s steps(1, end) 1; }
@keyframes bat-flicker { 0% { opacity: 1; } 12% { opacity: 0.15; } 24% { opacity: 1; } 36% { opacity: 0.25; } 48% { opacity: 1; } }

/* botón grande para empezar y reproductor pequeño que se queda */
.bat-start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 4px; }
.bat .bat-play {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 7px;
  border: 0; border-radius: 999px;
  background: var(--bat-ink); color: var(--bat-paper-hi);
  font: 600 15px/1 var(--bat-sans);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.6s, color 0.6s;
}
.bat .bat-play:hover { transform: translateY(-1px); }
.bat-disc { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bat-copper); color: #fff; }
.bat-disc-icon { width: 12px; height: 12px; margin-left: 2px; fill: currentColor; }
.bat-controls {
  position: absolute; right: var(--bat-gut); top: var(--bat-gut);
  display: flex; align-items: center; gap: 8px;
  pointer-events: auto;
}
.bat-speed {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1.5px solid var(--bat-ink); border-radius: 999px;
  background: var(--bat-card-solid);
  transition: border-color 0.6s;
}
.bat .bat-speed-opt {
  border: 0; border-radius: 999px;
  padding: 6px 11px;
  background: transparent; color: var(--bat-ink);
  font: 600 12.5px/1 var(--bat-sans);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.bat .bat-speed-opt:hover { color: var(--bat-copper); }
.bat .bat-speed-opt[aria-pressed="true"] { background: var(--bat-ink); color: var(--bat-paper-hi); }
.bat .bat-speed-opt:focus-visible { outline: 2px solid var(--bat-copper); outline-offset: 2px; }
.bat .bat-player {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 11px;
  border: 1.5px solid var(--bat-ink); border-radius: 999px;
  background: var(--bat-card-solid); color: var(--bat-ink);
  font: 600 13px/1 var(--bat-sans);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.6s;
}
.bat .bat-player:hover { background: var(--bat-ink); color: var(--bat-paper-hi); }
.bat-player svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.bat-player .bat-i-pause { display: none; }
.bat-player[data-state="playing"] .bat-i-play { display: none; }
.bat-player[data-state="playing"] .bat-i-pause { display: block; }
.bat-pl { display: none; }
.bat-player:not([data-state]) .bat-pl-idle,
.bat-player[data-state="idle"] .bat-pl-idle,
.bat-player[data-state="playing"] .bat-pl-playing,
.bat-player[data-state="paused"] .bat-pl-paused,
.bat-player[data-state="ended"] .bat-pl-ended { display: inline; }
.bat .bat-play:focus-visible, .bat .bat-player:focus-visible { outline: 2px solid var(--bat-copper); outline-offset: 3px; }
.bat-rotate-tip { display: none; }
.bat-stage.is-short .bat-rotate-tip {
  position: absolute; right: var(--bat-gut); bottom: var(--bat-gut);
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 8px 12px;
  border-radius: 999px; background: var(--bat-ink); color: var(--bat-paper-hi);
  font: 600 12.5px/1 var(--bat-sans);
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.bat-stage.is-short .bat-rotate-tip.is-gone { opacity: 0; visibility: hidden; }
.bat-rotate-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* versión ligera (sin WebGL 2, ahorro de datos, 2G o descarga fallida): el equipo montado en foto y el texto final */
.bat.bat-no3d { height: auto; --bat-poster-y: 46%; --bat-poster-h: min(78%, 544px); }
.bat.bat-no3d .bat-stage { position: relative; top: 0; height: max(560px, calc(100svh - var(--bat-top))); }
.bat.bat-no3d .bat-scene, .bat.bat-no3d .bat-callouts, .bat.bat-no3d .bat-meter, .bat.bat-no3d .bat-controls,
.bat.bat-no3d .bat-replay, .bat.bat-no3d .bat-start, .bat.bat-no3d .bat-side, .bat.bat-no3d .bat-loader { display: none !important; }
.bat.bat-no3d .bat-cap { opacity: 0; visibility: hidden; }
.bat.bat-no3d .bat-cap[data-cap="12"] { opacity: 1; visibility: visible; transform: none; }

/* escritorio: texto a la izquierda, piezas / esquema a la derecha, el equipo en medio */
@media (min-width: 900px) {
  .bat-panel { left: var(--bat-gut); top: 50%; transform: translateY(-50%); width: min(432px, 31vw); }
  .bat-side { right: var(--bat-gut); top: 50%; transform: translateY(-50%); width: 296px; }
  /* la foto, centrada en el hueco entre el texto y la lista de piezas */
  .bat { --bat-poster-x: calc((min(432px, 31vw) + 100% - 296px) / 2); --bat-poster-y: 47%; --bat-poster-h: min(64%, 500px); }
  .bat.bat-no3d { --bat-poster-x: 62%; --bat-poster-y: 46%; --bat-poster-h: min(78%, 544px); }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .bat-side { width: 256px; }
  .bat-panel { width: min(384px, 33vw); }
  .bat { --bat-poster-x: calc((min(384px, 33vw) + 100% - 256px) / 2); }
}
/* tableta y móvil: el texto pasa a una tarjeta abajo y el esquema ocupa la parte de arriba */
@media (max-width: 899.98px) {
  .bat-panel {
    left: var(--bat-gut); right: var(--bat-gut); bottom: var(--bat-gut);
    gap: 14px;
    padding: 16px 18px 18px;
    background: var(--bat-card-solid);
    border: 1px solid var(--bat-rule);
    border-radius: 16px;
    box-shadow: 0 14px 34px -18px var(--bat-shadow);
    transition: background-color 0.6s, border-color 0.6s;
  }
  .bat-meter { max-width: none; }
  .bat-side { display: none; }
  .bat-stage.is-flow .bat-side {
    display: grid;
    left: var(--bat-flow-x, var(--bat-gut)); top: var(--bat-flow-y, 64px);
    width: var(--bat-flow-w, calc(100% - 2 * var(--bat-gut))); height: var(--bat-flow-h, auto);
  }
  .bat .bat-player { padding: 8px 12px 8px 10px; font-size: 12.5px; }
  .bat-controls { gap: 6px; }
  .bat .bat-speed-opt { padding: 6px 9px; font-size: 12px; }
  .bat .bat-play { font-size: 14.5px; }
  .bat-cap .bat-title { font-size: clamp(33.6px, 9vw, 48px); }
  .bat-cap .bat-h { font-size: clamp(23.2px, 6vw, 30.4px); }
  .bat-cap .bat-body, .bat-cap .bat-lede { font-size: 15.5px; max-width: none; }
  /* móvil en vertical: una tarjeta más apretada deja más alto para el equipo */
  .bat-stage:not(.is-short) .bat-panel { padding: 13px 15px 14px; gap: 10px; }
  .bat-stage:not(.is-short) .bat-cap { gap: 7px; }
  .bat-stage:not(.is-short) .bat-cap .bat-title { font-size: clamp(30.4px, 8.4vw, 41.6px); }
  .bat-stage:not(.is-short) .bat-cap .bat-h { font-size: clamp(20.8px, 5.4vw, 27.2px); }
  .bat-stage:not(.is-short) .bat-cap .bat-body, .bat-stage:not(.is-short) .bat-cap .bat-lede { font-size: 14.7px; line-height: 1.45; }
  /* móvil de lado: texto a la izquierda, equipo a la derecha */
  .bat-stage.is-short .bat-panel {
    right: auto; top: var(--bat-gut); bottom: var(--bat-gut);
    width: min(44%, 368px);
    align-content: start; overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 14px 14px; gap: 10px;
  }
  .bat-stage.is-short .bat-cap .bat-title { font-size: clamp(25.6px, 5vw, 33.6px); }
  .bat-stage.is-short .bat-cap .bat-h { font-size: clamp(19.2px, 3.4vw, 24px); }
  .bat-stage.is-short .bat-cap .bat-body, .bat-stage.is-short .bat-cap .bat-lede { font-size: 14px; line-height: 1.45; }
  .bat-stage.is-short .bat-cap { gap: 6px; }
  .bat-stage.is-flow .bat-bom { display: none; }
  .bat-stage.is-flow .bat-scene { opacity: 0.1; }
  .bat-balloon { width: 24px; height: 24px; margin: -12px 0 0 -12px; font-size: 11.5px; }
  .bat-tag { font-size: 11.5px; padding: 4px 7px; }
  .bat-label { font-size: 11.5px; padding: 4px 8px; }
  /* la foto encima de la tarjeta del texto; de lado, a la derecha del texto */
  .bat { --bat-poster-y: 31%; --bat-poster-h: min(40%, 320px); }
  .bat-stage.is-short { --bat-poster-x: 73%; --bat-poster-y: 47%; --bat-poster-h: min(62%, 300px); }
  .bat.bat-no3d { --bat-poster-y: calc(9% + min(25%, 192px)); --bat-poster-h: min(50%, 384px); }
  .bat-charge-bar { width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .bat-hint-arrow::after, .bat-flow .f-stream, .bat-flow .f-wins, .bat-links .bat-lk-flow, .bat-loader-t::before { animation: none !important; }
  .bat-loader.is-indeterminate .bat-loader-fill { animation: none; width: 100%; opacity: 0.35; }
  .bat-flow .f-stream, .bat-links .bat-lk-flow { stroke-dasharray: 5 5; }
  .bat-cap, .bat-cap.is-active { transition: none; transform: none; }
}
