/* ============================================================
   VARIABLES / RESET
   ============================================================ */
:root {
  --verde: #36FF16;
  --azul: #00a6ff;
  --amarillo: #ffd706;
  --oscuro: #0a0a16;
  --negro: #000006;
  --borde: #1e1e3d;
  --text-white: #ffffff;
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100vh; scroll-behavior: smooth; }
/* ÚNICO scroll del sitio = el del navegador, con estilo neón verde.
   (Los elementos internos NO deben tener scroll propio.) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #050805; border-left: 1px solid rgba(54,255,22,.18); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#8dff74,#36FF16 45%,#1eaa12); border: 2px solid #050805; border-radius: 10px; box-shadow: 0 0 10px rgba(54,255,22,.55); }
::-webkit-scrollbar-thumb:hover { background: #36FF16; box-shadow: 0 0 14px #36FF16; }
::-webkit-scrollbar-corner { background: #050805; }
/* Firefox (no soporta ::-webkit-scrollbar) */
@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: #36FF16 #050805; } }

body {
  background-color: var(--negro);
  background-image: radial-gradient(circle at center, var(--oscuro), var(--negro));
  color: var(--text-white);
  font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  overflow-x: hidden;
}

/* ============================================================
   BANNER
   ============================================================ */
.banner-shell { width: 100%; max-width: 1100px; overflow: visible; flex-shrink: 0; }

.banner {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 300px;
  margin: 0 auto;
  border: 2px solid var(--verde);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 30px rgba(54,255,22,0.35), inset 0 0 25px rgba(54,255,22,0.08);
}

#matrixCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.85;
}

.banner-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* FILA SUPERIOR */
.banner-top { display: flex; align-items: stretch; gap: 20px; min-width: 0; }

/* LOGO: cuadrado con esquinas redondeadas + resplandor interior */
.logo-link {
  position: relative;
  display: flex;
  align-self: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #12122a;
  border: 2px solid var(--verde);
  text-decoration: none;
  box-shadow: 0 0 14px rgba(54,255,22,0.55);
  transition: box-shadow 0.3s, transform 0.2s;
}
.logo { width: 100%; height: 100%; object-fit: cover; display: block; }

/* capa del resplandor interior (encima de la imagen, no bloquea el clic) */
.logo-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 12px 2px rgba(54,255,22,0.55), inset 0 0 26px 4px rgba(54,255,22,0.18);
  animation: logoGlow 3s ease-in-out infinite alternate;
}
@keyframes logoGlow {
  from { box-shadow: inset 0 0 9px 1px rgba(54,255,22,0.40), inset 0 0 18px 2px rgba(54,255,22,0.12); }
  to   { box-shadow: inset 0 0 16px 3px rgba(54,255,22,0.80), inset 0 0 32px 6px rgba(54,255,22,0.28); }
}
.logo-link:hover { box-shadow: 0 0 22px rgba(54,255,22,0.9); transform: scale(1.04); }

.clock-style {
  background: var(--negro);
  border: 1px solid var(--borde);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

.title-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  min-width: 0;
}

.title-link { text-decoration: none; color: inherit; }

.title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: clamp(1.15rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  white-space: nowrap;
  transition: color 0.3s, text-shadow 0.3s;
  text-shadow: 0 0 8px rgba(255,255,255,0.25);
}

.banner:hover .title-text { animation: titleColorCycle 2.8s linear infinite; }
.zombie { display:inline-block; position:relative; pointer-events:auto; cursor:default; will-change:transform; transition:transform .12s ease-out; user-select:none; }

@keyframes titleColorCycle {
  0%, 100% { color: var(--verde); text-shadow: 0 0 12px var(--verde), 0 0 24px rgba(54,255,22,0.5); }
  33%      { color: var(--azul);  text-shadow: 0 0 12px var(--azul),  0 0 24px rgba(0,166,255,0.5); }
  66%      { color: var(--amarillo); text-shadow: 0 0 12px var(--amarillo), 0 0 24px rgba(255,215,6,0.5); }
}

/* RELOJ */
.clock-box {
  background: var(--negro);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 6px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

.linea { display: flex; align-items: center; gap: 2px; }
.dg { width: 9px; height: 16px; display: block; }
.dg .on  { fill: var(--verde); filter: drop-shadow(0 0 2px rgba(54,255,22,0.85)); }
.dg .off { fill: rgba(54,255,22,0.08); }

#relojFecha .dg { width: 6px; height: 11px; }
#relojFecha .dg .on  { fill: var(--azul); filter: drop-shadow(0 0 2px rgba(0,166,255,0.8)); }
#relojFecha .dg .off { fill: rgba(0,166,255,0.08); }

.sep {
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  color: var(--verde);
  text-shadow: 0 0 4px rgba(54,255,22,0.8);
  font-size: 0.75rem;
}
#relojHora .sep { animation: parpadeo 1s infinite; }
#relojFecha .sep { color: var(--azul); font-size: 0.65rem; text-shadow: 0 0 4px rgba(0,166,255,0.75); }

@keyframes parpadeo {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}

/* IMAGEN PNG: el CONTENEDOR se ilumina (el PNG no tiene bordes) */
.banner-image-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 5px 0;
}
.banner-image-box::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72%, 680px);
  height: 88%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(54,255,22,0.24) 0%, rgba(0,166,255,0.10) 45%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  animation: imgGlow 4s ease-in-out infinite alternate;
}
@keyframes imgGlow {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.94); }
  to   { opacity: 1;    transform: translate(-50%, -50%) scale(1.04); }
}

.banner-image {
  position: relative;
  z-index: 1;
  height: 140px;
  max-height: 140px;
  max-width: min(72%, 500px);
  width: auto;
  object-fit: contain;
  border: none;
  outline: none;
  background: transparent;
  display: block;
  filter: drop-shadow(0 0 6px rgba(54,255,22,0.35));
}

/* MENÚ */
.banner-bottom { display: flex; justify-content: center; }
.menu-box { display: flex; gap: 6px; align-items: center; padding: 5px 12px; }

.menu-btn {
  background: transparent;
  border: none;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.menu-btn:hover,
.menu-btn.active {
  color: var(--verde);
  background: rgba(54,255,22,0.12);
  text-shadow: 0 0 6px var(--verde);
}

/* LAYOUT BASE PARA CONTENIDO */
.page-content { width: 100%; max-width: 1100px; }

.section-title {
  max-width: 1100px;
  margin: 50px auto 20px;
  color: var(--azul);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
}

/* ============================================================
   RELOJ + REDES SOCIALES (columna vertical bajo el reloj)
   ============================================================ */
.top-right { position: relative; display: flex; flex-shrink: 0; }
.top-right .clock-box { flex: 1; }
/* v13 · el reloj del banner copia la ALTURA del cuadro del título (align-items: stretch) y apila hora sobre fecha, con dígitos grandes que llenan el cuadro */
.top-right .clock-box { flex-direction: column; gap: 5px; padding: 6px 16px; min-width: 150px; }
.top-right #relojHora .dg { width: 13px; height: 23px; }
.top-right #relojFecha .dg { width: 9px; height: 16px; }
.top-right #relojHora .sep { font-size: 1.1rem; }
.top-right #relojFecha .sep { font-size: .95rem; }

.social-rail {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

/* Cuadradito de esquinas redondeadas. --c = color de la red (se define en banner.php) */
.social-btn {
  --c: #00a6ff;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--negro);
  border: 1px solid var(--borde);
  color: #c9d1e0;
  font-size: 1.2rem;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}
/* Hover: se ilumina con su color */
.social-btn:hover,
.social-btn:focus-visible {
  color: var(--c);
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, var(--negro));
  box-shadow: 0 0 10px var(--c), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 8px color-mix(in srgb, var(--c) 35%, transparent);
  outline: none;
}
/* Click: más intenso */
.social-btn:active {
  color: #fff;
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 55%, var(--negro));
  box-shadow: 0 0 14px var(--c), 0 0 34px var(--c), inset 0 0 12px color-mix(in srgb, var(--c) 70%, transparent);
  transform: scale(0.92);
}

/* ============================================================
   MENÚ · 🛠️ HERRAMIENTAS (emoji → "se escribe" el nombre al hover)
   ============================================================ */
.menu-tools { display: inline-flex; align-items: center; }

.tool-emoji {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  animation: herraPop 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s both;
}
@keyframes herraPop {
  0%   { transform: scale(0) rotate(-40deg); opacity: 0; filter: drop-shadow(0 0 0 transparent); }
  60%  { transform: scale(1.35) rotate(12deg); opacity: 1; filter: drop-shadow(0 0 8px var(--verde)); }
  100% { transform: scale(1) rotate(0); opacity: 1; filter: drop-shadow(0 0 0 transparent); }
}

/* Texto estilo "bloc de notas": monoespaciado, aparece letra por letra con cursor */
.tool-label {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  margin-left: 0;
  font-family: 'Courier New', ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-right: 0 solid transparent;
  /* salida (al quitar el mouse): se "borra" rápido */
  transition: width 0.35s steps(12, end), margin-left 0.35s;
}
/* El nombre se queda escrito mientras el mouse está en el submenú (evita que el menú se encoja y se mueva) */
.menu-tools-wrap:hover .tool-label,
.menu-tools:focus-visible .tool-label {
  width: calc(12ch + 14px);        /* 12 letras = "Herramientas" */
  margin-left: 6px;
  border-right: 2px solid var(--verde);
  transition: width 0.9s steps(12, end), margin-left 0.2s;   /* entrada: se escribe */
  animation: cursorBlink 0.7s step-end infinite;
}
@keyframes cursorBlink { 50% { border-right-color: transparent; } }


@media (prefers-reduced-motion: reduce) {
  .tool-emoji, .logo-link::after, .banner-image-box::before { animation: none; }
  .tool-label { transition: none; }
}

/* ============================================================
   SUBMENÚ DE 🛠️ HERRAMIENTAS  (►🛡️ ►🌹 ►🔛 …)
   Se abre hacia ARRIBA porque el banner recorta lo que sale por abajo.
   Cada fila = píldora con ► + icono; el nombre se "escribe" al pasar el
   mouse, igual que Herramientas pero más rápido (~30 ms por letra).
   ============================================================ */
.menu-box { position: relative; }
.banner-bottom { position: relative; z-index: 5; }

.menu-tools-wrap { position: relative; display: inline-flex; }

.submenu {
  position: absolute;
  left: 0;
  bottom: 100%;
  min-width: 100%;                 /* cubre todo el ancho del botón: el hover no se pierde al subir */
  padding-bottom: 10px;            /* puente: el mouse no pierde el hover al subir */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
  z-index: 50;
}
.menu-tools-wrap:hover .submenu,
.menu-tools-wrap:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s, transform 0.18s, visibility 0s;
}

.sub-btn {
  --n: 12;                          /* nº de letras del nombre (lo pone banner.php) */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  background: var(--negro);
  border: 1px solid var(--borde);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sub-arrow {
  font-size: 0.6rem;
  color: var(--verde);
  text-shadow: 0 0 5px rgba(54,255,22,0.8);
  transition: transform 0.2s;
}
.sub-emoji { font-size: 1rem; line-height: 1; }

/* Nombre estilo "bloc de notas": aparece letra por letra con cursor */
.sub-label {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  font-family: 'Courier New', ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-right: 0 solid transparent;
  /* salida: se "borra" casi al instante */
  transition: width 0.15s steps(var(--n), end);
}
.sub-btn:hover .sub-label,
.sub-btn:focus-visible .sub-label {
  width: calc(var(--n) * (1ch + 1px) + 1ch + 4px);
  border-right: 2px solid var(--verde);
  transition: width calc(var(--n) * 0.03s) steps(var(--n), end);   /* entrada rápida */
  animation: cursorBlink 0.5s step-end infinite;
}
.sub-btn:hover,
.sub-btn:focus-visible,
.sub-btn.active {
  color: var(--verde);
  border-color: var(--verde);
  background: rgba(54,255,22,0.10);
  box-shadow: 0 0 10px rgba(54,255,22,0.35), inset 0 0 8px rgba(54,255,22,0.12);
  text-shadow: 0 0 6px var(--verde);
  outline: none;
}
.sub-btn:hover .sub-arrow,
.sub-btn:focus-visible .sub-arrow { transform: translateX(2px); }

@media (prefers-reduced-motion: reduce) {
  .submenu, .sub-label { transition: none; }
}

/* ============================================================
   TIPOGRAFÍA GLOBAL "ESTILO ÜRIEL" (tomada de las herramientas)
   Títulos y subtítulos: Orbitron + resplandor neón verde #0bab16.
   Uso:  <h1 class="page-title neon-text">…</h1>
         <div class="subtitle pulse">…</div>
         <h3 class="section-label"><i class="fas fa-paste"></i> TEXTO</h3>
         Texto "bloc de notas": clase .mono
   ============================================================ */
:root { --neon: #0bab16; --font-titulo: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; --font-mono: 'Courier New', ui-monospace, Consolas, monospace; }

.neon-text {
  color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px var(--neon), 0 0 20px var(--neon), 0 0 28px var(--neon);
}
.page-title {
  font-family: var(--font-titulo);
  text-align: center;
  margin: 12px 0 20px;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 2px;
}
.subtitle {
  font-family: var(--font-titulo);
  text-align: center;
  color: var(--neon);
  margin-bottom: 12px;
  text-shadow: 0 0 6px rgba(11,171,22,0.8);
  font-size: 0.78rem;
  letter-spacing: 0.6px;
}
.section-label {
  font-family: var(--font-titulo);
  color: var(--neon);
  text-shadow: 0 0 6px rgba(11,171,22,0.8);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.mono { font-family: var(--font-mono); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@media (max-width: 768px) {
  .page-title { font-size: 1.35rem; }
  .subtitle { font-size: 0.7rem; }
}

/* ============================================================
   v4 · MENÚ AUTO-ESCRITO PARA TODOS + SUBMENÚ HACIA ABAJO
   ============================================================ */
.banner-shell { overflow: visible; position: relative; z-index: 30; }
@media (max-width: 1140px) { .banner-shell { overflow: visible; } .banner { width: 100%; } }
.banner { overflow: visible; }
#matrixCanvas { border-radius: 14px; }

.menu-auto { display: inline-flex; align-items: center; }
.tool-label { transition: width calc(var(--n, 12) * 0.03s) steps(var(--n, 12), end), margin-left 0.35s; }
.menu-auto:hover .tool-label,
.menu-auto:focus-visible .tool-label,
.menu-tools-wrap:hover .tool-label {
  width: calc(var(--n, 12) * (1ch + 1px) + 2px);
  margin-left: 6px;
  border-right: 2px solid var(--verde);
  transition: width calc(var(--n, 12) * 0.075s) steps(var(--n, 12), end), margin-left 0.2s;
  animation: cursorBlink 0.7s step-end infinite;
}

.submenu { bottom: auto; top: 100%; padding-bottom: 0; padding-top: 10px; transform: translateY(-6px); }
.menu-tools-wrap:hover .submenu,
.menu-tools-wrap:focus-within .submenu { transform: translateY(0); }

/* Marco donde se muestran tus HTML de /tools */
.tool-frame { display: block; width: 100%; height: 600px; min-height: 300px; border: 0; background: transparent; margin-top: 20px; overflow: hidden; }

/* ============================================================
   v5 · FONDO GLOBAL "ESCÁNER" (de FONDO {ESCANER}.html) — todas las páginas
   Ajuste rápido: variables de abajo. --banner-fondo = alto del banner (300px)
   + padding superior del body (30px): de ahí sale el escáner.
   ============================================================ */
:root {
  --color-verde: #0bab16;
  --margen-esquinas: 12px;
  --tamano-esquinas: 14px;
  --grosor-esquinas: 2px;
  --velocidad-escaner: 4s;
  --banner-fondo: 330px;
}

body {
  background-color: #000;
  background-image: radial-gradient(circle at center, #050510, #000000);
  position: relative;
}

/* Capa de luz verde */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(11,171,22,0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(11,171,22,0.1) 0%, transparent 40%);
  z-index: -2;
  pointer-events: none;
}

/* Cuadrícula verde */
.grid-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(11,171,22,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,171,22,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 1;
}

/* Esquinas */
.corner {
  position: fixed;
  width: var(--tamano-esquinas);
  height: var(--tamano-esquinas);
  border: var(--grosor-esquinas) solid var(--color-verde);
  box-shadow: 0 0 8px rgba(11,171,22,0.8);
  pointer-events: none;
  z-index: 9000;
}
.corner-tl { top: var(--margen-esquinas);    left: var(--margen-esquinas);  border-right: none; border-bottom: none; }
.corner-tr { top: var(--margen-esquinas);    right: var(--margen-esquinas); border-left: none;  border-bottom: none; }
.corner-bl { bottom: var(--margen-esquinas); left: var(--margen-esquinas);  border-right: none; border-top: none; }
.corner-br { bottom: var(--margen-esquinas); right: var(--margen-esquinas); border-left: none;  border-top: none; }

/* Zona del escáner: empieza donde termina el banner y llega al final de la página */
.scan-zone {
  position: absolute;
  top: var(--banner-fondo);
  left: 0; right: 0; bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}
.scanline {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to bottom, rgba(11,171,22,0), rgba(11,171,22,0.8));
  box-shadow: 0 0 18px 4px rgba(11,171,22,0.7);
  animation: scan var(--velocidad-escaner) linear infinite;
  opacity: 0.8;
}
@keyframes scan { 0% { top: -10px; } 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .scan-zone { display: none; } }

/* ============================================================
   v5 · SUBMENÚ: fondo oscuro SÓLIDO bajo el texto (sin transparencias)
   ============================================================ */
.sub-btn { background: #000006; }
.sub-btn:hover,
.sub-btn:focus-visible,
.sub-btn.active {
  background: linear-gradient(rgba(54,255,22,0.10), rgba(54,255,22,0.10)), #000006;
}


/* ============================================================
   v6 · AJUSTE RESPONSIVE, GIF, ZOMBIS Y REGRESO AL INICIO
   ============================================================ */
body { padding: 20px clamp(10px, 2vw, 20px); }
.banner-inner { padding: 16px clamp(12px, 2.2vw, 26px); }
.banner-image { object-fit: contain; }
@media (max-width: 760px) {
  .banner { height: 290px; }
  .banner-inner { padding: 12px 10px; }
  .banner-top { gap: 9px; }
  .title-box { padding: 6px 5px; }
  .title { gap: 4px; letter-spacing: .4px; font-size: clamp(.88rem, 3.1vw, 1.25rem); }
  .top-right { flex-shrink: 0; }
  .top-right .clock-box { padding: 4px 8px; gap: 3px; min-width: 0; }
  .top-right #relojHora .dg { width: 10px; height: 18px; }
  .top-right #relojFecha .dg { width: 7px; height: 12px; }
  .top-right #relojHora .sep { font-size: .85rem; }
  .top-right #relojFecha .sep { font-size: .7rem; }
  .social-rail { margin-top: 5px; }
  .social-btn { width: 34px; height: 34px; font-size: 1rem; }
  .menu-box { gap: 2px; padding: 4px; flex-wrap: wrap; justify-content: center; }
  .menu-btn { padding: 5px 6px; font-size: .72rem; }
  .tool-label { letter-spacing: 0; }
}
@media (max-width: 480px) {
  body { padding: 12px 8px; }
  .banner { height: 270px; }
  .banner-top { gap: 5px; }
  .title { font-size: .78rem; gap: 2px; }
  .top-right .clock-box { padding: 3px 5px; gap: 2px; }
  .top-right #relojHora .dg { width: 8px; height: 14px; }
  .top-right #relojFecha .dg { width: 5px; height: 9px; }
  .menu-btn { padding: 4px 5px; }
}
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 10020;
  width: 42px; height: 42px; border: 1px solid rgba(54,255,22,.65);
  border-radius: 50%; background: rgba(0,0,6,.82); color: #36FF16;
  font: 700 17px/1 'Orbitron', monospace; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, visibility .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 0 10px rgba(54,255,22,.18);
}
.back-to-top.visible { opacity: .78; visibility: visible; transform: translateY(0); }
.back-to-top:hover { opacity: 1; background: #36FF16; color: #000; box-shadow: 0 0 18px #36FF16; }
@media (max-width: 600px) { .back-to-top { right: 12px; bottom: 12px; width: 38px; height: 38px; } }


/* v7 · MARCO ORGÁNICO NEÓN PARA EL LOGO (inspirado en el contorno morph de la referencia) */
.logo-link {
  overflow: visible;
  border: 0;
  background: transparent;
  isolation: isolate;
  box-shadow: none;
}
.logo-link::before {
  content: '';
  position: absolute;
  inset: -4px;
  z-index: 0;
  border: 2px solid var(--verde);
  border-radius: 60% 40% 55% 45% / 40% 55% 45% 60%;
  box-shadow: 0 0 12px var(--verde), 0 0 22px rgba(54,255,22,.35);
  pointer-events: none;
  animation: logoFrameMorph 3s ease-in-out infinite alternate,
             logoFrameSpin 12s linear infinite;
}
.logo {
  position: relative;
  z-index: 1;
  border-radius: 9px;
}
.logo-link::after { z-index: 2; }
@keyframes logoFrameMorph {
  0% {
    border-radius: 60% 40% 55% 45% / 40% 55% 45% 60%;
    border-color: var(--verde);
    box-shadow: 0 0 12px var(--verde), 0 0 22px rgba(54,255,22,.35);
  }
  50% {
    border-radius: 45% 55% 40% 60% / 55% 40% 60% 45%;
    border-color: var(--azul);
    box-shadow: 0 0 14px var(--azul), 0 0 24px rgba(0,166,255,.35);
  }
  100% {
    border-radius: 55% 45% 60% 40% / 45% 60% 40% 55%;
    border-color: var(--amarillo);
    box-shadow: 0 0 14px var(--amarillo), 0 0 24px rgba(255,215,6,.30);
  }
}
@keyframes logoFrameSpin { to { transform: rotate(360deg); } }

/* Movimiento 3D sutil del contenido al recorrer el banner con el cursor */
.banner-inner {
  transform-style: preserve-3d;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .logo-link::before { animation: none; }
  .banner-inner { transform: none !important; }
}


/* ============================================================
   v8 · LOGO + LogBan.gif EN LA MISMA LÍNEA Y MISMA ALTURA
   --logban-h = alto común del logo y del GIF (cámbialo aquí).
   El GIF (960×540) tiene mucho margen vacío: .logban lo recorta por
   CSS a su zona útil (x 20-945, y 10-420) y así el texto se ve ~40 % mayor.
   ============================================================ */
:root { --logban-h: 150px; }

.banner-image-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0;
}
.banner-image-box::before { height: 100%; }

.banner-image-box .logo-link {
  grid-column: 1;
  justify-self: start;
  width: var(--logban-h);
  height: var(--logban-h);
  border-radius: 26px;
}
.banner-image-box .logo { border-radius: 22px; object-fit: contain; }  /* contain: el GIF animado no se recorta aunque no sea cuadrado */
.banner-image-box .logo-link::before { inset: -3px; }

.logban {
  grid-column: 2;
  position: relative;
  z-index: 1;
  height: var(--logban-h);
  aspect-ratio: 925 / 410;
  overflow: hidden;
}
.logban .banner-image {
  position: absolute;
  top: -2.439%;
  left: -2.162%;
  width: 103.784%;
  height: auto;
  max-width: none;
  max-height: none;
}
@media (max-width: 760px) { :root { --logban-h: 118px; } }
@media (max-width: 480px) { :root { --logban-h: 72px; } }


/* ============================================================
   v10 · MENÚ EN TÁCTIL (celular y tablet)  ·  html.touch-menu lo pone shared.js
   Táctil no tiene hover, así que el efecto de ESCRITURA se dispara por clases:
     .active      → la página actual "escribe" su nombre al cargar
     .is-typing   → el botón tocado "escribe" su nombre (y luego navega)
     .is-open     → submenú de Herramientas ABIERTO y FIJO (no depende de :hover)
   Las reglas están calificadas con html.touch-menu para ganar a los :hover que
   el navegador deja "pegados" después de un toque.
   ============================================================ */
@keyframes touchType { from { width: 0; } }   /* "to" = ancho completo del texto */

/* — Etiquetas del menú principal: cerradas salvo la activa / la que se toca — */
html.touch-menu .menu-btn .tool-label {
  width: 0; margin-left: 0; border-right: 0 solid transparent; animation: none; transition: none;
}
html.touch-menu .menu-btn.active .tool-label,
html.touch-menu .menu-btn.is-typing .tool-label {
  width: calc(var(--n, 12) * (1ch + 1px) + 2px);
  margin-left: 6px;
  border-right: 2px solid var(--verde);
  animation: touchType calc(var(--n, 12) * 0.045s) steps(var(--n, 12), end) 0.15s backwards,
             cursorBlink 0.7s step-end infinite;
}
/* Si hay uno escribiendo, solo ese muestra su nombre (en pantallas angostas no caben dos) */
html.touch-menu .menu-box.has-typing .menu-btn:not(.is-typing) .tool-label {
  width: 0; margin-left: 0; border-right: 0 solid transparent; animation: none;
}

/* — Submenú: anclado al menú (no al botón) para que no se salga de la pantalla — */
html.touch-menu .menu-tools-wrap { position: static; }
html.touch-menu .submenu { max-width: 100%; }
html.touch-menu .menu-tools-wrap:not(.is-open) .submenu {
  opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
}
html.touch-menu .menu-tools-wrap.is-open .submenu {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
  transition: opacity 0.18s, transform 0.18s, visibility 0s;
}
/* El submenú empuja el contenido hacia abajo en vez de taparlo (alto medido por shared.js) */
html.touch-menu.sub-open .banner-shell { margin-bottom: var(--sub-h, 120px); transition: margin-bottom 0.2s; }

/* — Nombres del submenú: se escriben uno tras otro al abrir — */
html.touch-menu .sub-btn .sub-label {
  width: 0; border-right: 0 solid transparent; animation: none; transition: none;
}
html.touch-menu .menu-tools-wrap.is-open .sub-label {
  width: calc(var(--n) * (1ch + 1px) + 1ch + 4px);
  border-right: 2px solid var(--verde);
  animation: touchType calc(var(--n) * 0.03s) steps(var(--n), end) calc(0.12s + var(--i, 0) * 0.28s) backwards,
             cursorBlink 0.5s step-end infinite;
}
.sub-btn:nth-child(1) { --i: 0; } .sub-btn:nth-child(2) { --i: 1; } .sub-btn:nth-child(3) { --i: 2; }
.sub-btn:nth-child(4) { --i: 3; } .sub-btn:nth-child(5) { --i: 4; } .sub-btn:nth-child(6) { --i: 5; }
.sub-btn:nth-child(7) { --i: 6; } .sub-btn:nth-child(8) { --i: 7; }
/* Botones cómodos de tocar */
html.touch-menu .sub-btn { padding-top: 8px; padding-bottom: 8px; }

@media (max-width: 480px) {
  html.touch-menu .tool-label, html.touch-menu .sub-label { font-size: 0.72rem; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html.touch-menu .tool-label, html.touch-menu .sub-label { animation: none !important; }
}


/* ============================================================
   v11 · PIE DE PÁGINA — mismo estilo que el banner (borde neón, cascada,
   paneles oscuros) + monitor de procesos en la base.
   ============================================================ */
.footer-shell { width: 100%; max-width: 1100px; margin-top: auto; padding-top: 44px; flex-shrink: 0; }
.site-footer {
  position: relative;
  width: 100%;
  border: 2px solid var(--verde);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 30px rgba(54,255,22,0.35), inset 0 0 25px rgba(54,255,22,0.08);
}
#footerMatrix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.85; }

.footer-inner {
  position: relative; z-index: 1;
  padding: 20px clamp(12px, 2.2vw, 26px) 26px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.f-box {
  background: var(--negro);
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 8px 16px;
  color: #e8ecf5;
  font-size: 1.02rem;
  line-height: 1.35;
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
}
.f-main { max-width: 760px; }
.f-tagline { margin: 0 0 4px; color: #fff; font-weight: 500; text-shadow: 0 0 8px rgba(54,255,22,0.45); }
.f-support { margin: 0; color: var(--azul); font-weight: 500; text-shadow: 0 0 8px rgba(0,166,255,0.45); }
.f-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: stretch; }
.f-box { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.f-main { display: block; }

.f-box a { color: var(--verde); text-decoration: none; text-shadow: 0 0 6px rgba(54,255,22,0.6); transition: color .2s, text-shadow .2s; }
.f-box a:hover, .f-box a:focus-visible { color: #fff; text-shadow: 0 0 10px var(--verde), 0 0 18px var(--verde); outline: none; }

.f-coffee {
  font-family: 'Orbitron', sans-serif; font-size: .82rem; letter-spacing: 1px;
  color: var(--amarillo) !important; border-color: var(--amarillo); text-decoration: none; text-shadow: 0 0 6px rgba(255,215,6,.6) !important;
  box-shadow: 0 0 12px rgba(255,215,6,0.25);
  transition: background .2s, box-shadow .2s !important;
}
.f-coffee:hover, .f-coffee:focus-visible { background: rgba(255,215,6,0.12); box-shadow: 0 0 18px rgba(255,215,6,0.55); }
.f-fb {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  color: var(--azul) !important; border: 1px solid var(--azul); text-shadow: none !important; font-size: .9rem;
  box-shadow: 0 0 8px rgba(0,166,255,0.45);
}
.f-fb:hover { background: var(--azul); color: #000 !important; }
.f-dot { color: var(--verde); opacity: .8; }
.f-copy { font-family: 'Orbitron', sans-serif; font-size: .78rem; letter-spacing: 1px; color: #fff; }
.f-mx { width: 26px; height: 26px; vertical-align: middle; filter: drop-shadow(0 0 3px rgba(255,255,255,.55)); }   /* pequeño; el efecto de huida lo da .f-flee */
.f-legal { font-size: .95rem; gap: 10px; }

/* Los emojis ☕ 🌐 📍 huyen del puntero (lo mueve shared.js) */
.f-flee { display: inline-block; transition: transform .2s ease-out; will-change: transform; }

/* Monitor de procesos (base del pie) */
.f-graph {
  position: relative; z-index: 2; height: 70px;
  border-top: 1px solid rgba(54,255,22,0.55);
  background: rgba(0, 0, 6, 0.82);
  box-shadow: 0 -4px 14px rgba(54,255,22,0.12);
}
#footerGraph { display: block; width: 100%; height: 100%; }
.f-runner {
  position: absolute; left: 0; top: 0; z-index: 3;
  font-size: 1.7rem; line-height: 1;
  filter: drop-shadow(0 0 8px var(--verde));
  pointer-events: none; will-change: transform;
}
@media (max-width: 600px) {
  .f-box { font-size: .92rem; padding: 7px 12px; }
  .f-copy { font-size: .7rem; }
  .f-graph { height: 58px; }
  .f-runner { font-size: 1.45rem; }
}

/* v14 · el contenedor del MENÚ ocupa el mismo ancho que el del título y el reloj.
   Los botones y los títulos no cambian: quedan centrados dentro. */
.banner-bottom { width: 100%; }
.menu-box { width: 100%; justify-content: center; }
