/* ============================================================
   QuaniumPortalWeb - custom.css
   Estilos custom que complementan tailwind.css
   ============================================================ */

/* ---------- Variables de la paleta Quanium ---------- */
:root {
  --qt-bg:        #050B14;
  --qt-bg2:       #0B1528;
  --qt-cyan:      #00F0FF;
  --qt-blue:      #0066FF;
  --qt-orange:    #FF5500;
  --qt-white:     #FFFFFF;
  --qt-gray:      #8A99AD;
  --qt-text-sec:  #8A99AD;
  --qt-grid-line: rgba(0, 240, 255, .035);
  --qt-glow-cyan:  0 0 10px rgba(0, 240, 255, .55), 0 0 24px rgba(0, 240, 255, .22);
  --qt-glow-orange: 0 0 10px rgba(255, 85, 0, .55), 0 0 24px rgba(255, 85, 0, .22);
}

/* ---------- Scrollbar custom (dark + cyan glow) ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, .5) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track {
  background: var(--qt-bg);
  border-left: 1px solid rgba(0, 240, 255, .08);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--qt-cyan), var(--qt-blue));
  border-radius: 0;
  box-shadow: 0 0 6px rgba(0, 240, 255, .55);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--qt-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, .9);
}

/* ---------- Body base ---------- */
html { scroll-behavior: smooth; }

/* Compensación del navbar fijo (altura ~68px) al navegar por anclas */
html { scroll-padding-top: 84px; }
section[id], [id^="qt-"] { scroll-margin-top: 84px; }
body {
  background: var(--qt-bg);
  color: var(--qt-white);
  font-family: Inter, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Fondo con grid pattern sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--qt-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--qt-grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}

/* Vignette radial para profundidad */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 11, 20, .8) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- HUD overlay (esquinas fijas + crosshairs) ---------- */
.hud-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  color: var(--qt-cyan);
  text-shadow: var(--qt-glow-cyan);
}
.hud-overlay .hud-corner {
  position: absolute;
  padding: .5rem .75rem;
  display: flex;
  gap: .35rem;
  align-items: center;
  letter-spacing: .12em;
  background: rgba(5, 11, 20, .5);
  border: 1px solid rgba(0, 240, 255, .25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hud-overlay .hud-corner.tl { top: 16px; left: 16px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.hud-overlay .hud-corner.tr { top: 16px; right: 16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.hud-overlay .hud-corner.bl { bottom: 16px; left: 16px; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.hud-overlay .hud-corner.br { bottom: 16px; right: 16px; clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }

.hud-overlay .hud-dot {
  width: 6px; height: 6px;
  background: var(--qt-cyan);
  border-radius: 50%;
  box-shadow: var(--qt-glow-cyan);
  animation: pulseGlow 2s ease-in-out infinite;
}
.hud-overlay .hud-dot.warn  { background: var(--qt-orange); box-shadow: var(--qt-glow-orange); }

/* Crosshair decorations en esquinas de viewport */
.hud-crosshair {
  position: fixed;
  width: 24px; height: 24px;
  border-color: rgba(0, 240, 255, .4);
  border-style: solid;
  pointer-events: none;
  z-index: 49;
}
.hud-crosshair.tl { top: 4px; left: 4px; border-width: 1px 0 0 1px; }
.hud-crosshair.tr { top: 4px; right: 4px; border-width: 1px 1px 0 0; }
.hud-crosshair.bl { bottom: 4px; left: 4px; border-width: 0 0 1px 1px; }
.hud-crosshair.br { bottom: 4px; right: 4px; border-width: 0 1px 1px 0; }
.hud-crosshair::before,
.hud-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(0, 240, 255, .35);
}
.hud-crosshair::before { top: 50%; left: -4px; width: 32px; height: 1px; }
.hud-crosshair::after  { left: 50%; top: -4px; height: 32px; width: 1px; }

/* ---------- Binary stream decorativo en bordes ---------- */
.binary-stream {
  position: fixed;
  top: 0; bottom: 0;
  width: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  line-height: 1;
  color: rgba(0, 240, 255, .25);
  overflow: hidden;
  pointer-events: none;
  z-index: 48;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: none;
}
.binary-stream.left  { left: 0; }
.binary-stream.right { right: 0; }
.binary-stream span {
  display: inline-block;
  animation: scrollDown 18s linear infinite;
}
.binary-stream.right span { animation: scrollUp 22s linear infinite; }

@keyframes scrollDown { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes scrollUp   { from { transform: translateY(100%); }  to { transform: translateY(-100%); } }

/* ---------- Form inputs ----------
   El markup actual usa `.qt-input`, `.qt-select` y `.qt-textarea`
   (antes sólo existían los alias históricos `.hud-*`). Se definen
   ambos conjuntos de selectores para no dejar ningún campo sin
   estilo. */
.hud-input,
.hud-textarea,
.hud-select,
.qt-input,
.qt-textarea,
.qt-select {
  width: 100%;
  padding: .85rem 1rem;
  background: rgba(11, 21, 40, .7);
  border: 1px solid rgba(0, 240, 255, .25);
  color: var(--qt-white);
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem;
  letter-spacing: .05em;
  outline: none;
  clip-path: polygon(
    0 8px, 8px 0,
    calc(100% - 8px) 0, 100% 8px,
    100% calc(100% - 8px), calc(100% - 8px) 100%,
    8px 100%, 0 calc(100% - 8px)
  );
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.hud-input::placeholder,
.hud-textarea::placeholder,
.qt-input::placeholder,
.qt-textarea::placeholder {
  color: rgba(138, 153, 173, .6);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
}
.hud-input:focus,
.hud-textarea:focus,
.hud-select:focus,
.qt-input:focus,
.qt-textarea:focus,
.qt-select:focus {
  border-color: var(--qt-cyan);
  background: rgba(11, 21, 40, .95);
  box-shadow: var(--qt-glow-cyan), inset 0 0 12px rgba(0, 240, 255, .08);
}
.hud-input.is-invalid,
.hud-textarea.is-invalid,
.qt-input.is-invalid,
.qt-textarea.is-invalid,
.qt-select.is-invalid {
  border-color: var(--qt-orange);
  box-shadow: var(--qt-glow-orange);
}
/* El <select> nativo muestra su propia flecha: se oculta para que el
   clip-path angular no la corte de forma antiestética. */
.qt-select, .hud-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(0, 240, 255, .8) 50%),
                    linear-gradient(135deg, rgba(0, 240, 255, .8) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.qt-select option, .hud-select option {
  background: var(--qt-bg2);
  color: var(--qt-white);
}

.hud-label,
.qt-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--qt-cyan);
  margin-bottom: .5rem;
  text-shadow: var(--qt-glow-cyan);
}

.hud-field-error {
  display: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--qt-orange);
  margin-top: .35rem;
  text-shadow: var(--qt-glow-orange);
}
.hud-field-error.is-visible { display: block; animation: flicker .3s ease; }

/* ---------- Navigation bar ---------- */
.hud-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.5rem;
  background: rgba(5, 11, 20, .65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 240, 255, .2);
  box-shadow: 0 2px 24px rgba(0, 240, 255, .1);
}
.hud-nav .nav-brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--qt-white);
  text-shadow: var(--qt-glow-cyan);
}
.hud-nav .nav-brand .brand-mark {
  width: 18px; height: 18px;
  border: 1px solid var(--qt-cyan);
  transform: rotate(45deg);
  box-shadow: var(--qt-glow-cyan);
  display: inline-block;
}
.hud-nav .nav-links {
  display: none;
  gap: 1.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.hud-nav .nav-links a {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--qt-gray);
  padding: .25rem 0;
  transition: color .25s ease;
}
.hud-nav .nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--qt-cyan);
  box-shadow: var(--qt-glow-cyan);
  transition: width .25s ease;
}
.hud-nav .nav-links a:hover,
.hud-nav .nav-links a.is-active {
  color: var(--qt-cyan);
  text-shadow: var(--qt-glow-cyan);
}
.hud-nav .nav-links a:hover::after,
.hud-nav .nav-links a.is-active::after { width: 100%; }

.hud-nav .nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: .25rem;
}
.hud-nav .nav-toggle span {
  width: 22px; height: 2px;
  background: var(--qt-cyan);
  box-shadow: var(--qt-glow-cyan);
  transition: transform .25s ease, opacity .25s ease;
}
.hud-nav .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hud-nav .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.hud-nav .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Audio toggle (botón esquina) */
.hud-audio-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0, 240, 255, .35);
  background: rgba(0, 240, 255, .05);
  color: var(--qt-cyan);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  transition: background-color .2s ease, box-shadow .2s ease;
}
.hud-audio-toggle:hover { background: rgba(0, 240, 255, .18); box-shadow: var(--qt-glow-cyan); }
.hud-audio-toggle.is-muted { color: var(--qt-orange); border-color: rgba(255, 85, 0, .35); }
.hud-audio-toggle.is-muted:hover { box-shadow: var(--qt-glow-orange); }

/* ---------- Botones de icono de la barra de navegación ----------
   `.qt-icon-btn` es la clase que usa el markup actual
   (#qt-audio-toggle, #qt-motion-toggle, #qt-mobile-menu). El clip-path
   y la forma "chamfered" los define el CSS; sin él, los botones se
   ven como cuadrados con el borde de Tailwind. */
.qt-icon-btn {
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(0, 240, 255, .05);
  border: 1px solid rgba(0, 240, 255, .3);
  color: rgba(0, 240, 255, .8);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.qt-icon-btn:hover {
  background: rgba(0, 240, 255, .16);
  color: var(--qt-cyan);
  box-shadow: var(--qt-glow-cyan);
}
.qt-icon-btn:focus-visible {
  outline: 2px solid var(--qt-cyan);
  outline-offset: 2px;
}

/* Iconos de audio: se muestra el que corresponde al estado actual.
   Por defecto suena el icono "muted" (audio desactivado al entrar). */
.qt-icon-btn .qt-icon-unmuted { display: none; }
.qt-icon-btn.is-unmuted .qt-icon-muted   { display: none; }
.qt-icon-btn.is-unmuted .qt-icon-unmuted { display: block; }
.qt-icon-btn.is-muted { color: rgba(255, 85, 0, .8); border-color: rgba(255, 85, 0, .35); }
.qt-icon-btn.is-muted:hover { color: var(--qt-orange); box-shadow: var(--qt-glow-orange); }

/* ---------- Toggle de movimiento (3 niveles) ----------
   El usuario necesita saber si el ajuste está activo y en qué modo.
   El estado se comunica por tres vías redundantes:
     1. Color del botón y del icono (cian = completo, naranja = off).
     2. Badge de texto con el nivel ("COMPLETO"/"REDUCIDO"/"OFF").
     3. `aria-pressed` + `aria-label` descriptivo para lectores de
        pantalla. */
.qt-motion-toggle { overflow: visible; }
.qt-motion-toggle .qt-motion-toggle__icon { transition: transform .25s ease, opacity .25s ease; }
.qt-motion-level {
  position: absolute;
  bottom: -.55rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 .18rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .42rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.3;
  color: var(--qt-cyan);
  background: var(--qt-bg);
  border: 1px solid rgba(0, 240, 255, .45);
  white-space: nowrap;
  pointer-events: none;
}
/* Estado "reducido": animación detenida, color de aviso. */
.qt-motion-toggle.is-active {
  color: var(--qt-orange);
  border-color: rgba(255, 85, 0, .5);
  background: rgba(255, 85, 0, .08);
}
.qt-motion-toggle.is-active:hover { color: var(--qt-orange); box-shadow: var(--qt-glow-orange); }
.qt-motion-toggle.is-active .qt-motion-level {
  color: var(--qt-orange);
  border-color: rgba(255, 85, 0, .55);
}
/* Estado "off": movimiento completamente desactivado. */
.qt-motion-toggle.is-motion-off .qt-motion-toggle__icon { opacity: .55; }
.qt-motion-toggle.is-motion-off .qt-motion-level {
  color: var(--qt-orange);
  border-color: rgba(255, 85, 0, .7);
  background: rgba(255, 85, 0, .14);
}

/* ---------- Menú desplegable móvil ----------
   El panel se oculta con la utilidad `hidden` de Tailwind y se muestra
   con la clase `is-open`, que además habilita la transición de entrada.
   `z-index` por encima de la cabecera y del canvas de partículas para
   que el clic llegue al panel y no a un overlay. */
.qt-mobile-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 45;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.qt-mobile-nav.is-open {
  display: block;
  animation: qt-mobile-nav-in .22s ease both;
}
.qt-mobile-nav.hidden { display: none; }
@keyframes qt-mobile-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Estado abierto del botón hamburguesa. */
.qt-icon-btn.is-open {
  color: var(--qt-cyan);
  background: rgba(0, 240, 255, .16);
  box-shadow: var(--qt-glow-cyan);
}

/* Menú mobile expandido */
.hud-nav .nav-links.is-open {
  display: flex;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  gap: 0;
  background: rgba(5, 11, 20, .95);
  border-bottom: 1px solid rgba(0, 240, 255, .25);
  padding: 1rem 1.5rem;
}
.hud-nav .nav-links.is-open li { padding: .75rem 0; border-bottom: 1px solid rgba(0, 240, 255, .08); }

/* ---------- Loading screen ---------- */
.hud-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--qt-bg);
  gap: 1.5rem;
  transition: opacity .6s ease, visibility .6s ease;
}
.hud-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hud-loader .loader-frame {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.hud-loader .loader-frame::before,
.hud-loader .loader-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--qt-cyan);
  clip-path: polygon(
    0 14px, 14px 0,
    calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px)
  );
}
.hud-loader .loader-frame::after {
  inset: 8px;
  border-color: rgba(0, 240, 255, .35);
  animation: spin 6s linear infinite;
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.hud-loader .loader-core {
  width: 28px; height: 28px;
  background: var(--qt-cyan);
  border-radius: 50%;
  box-shadow: 0 0 22px var(--qt-cyan), 0 0 44px rgba(0, 240, 255, .6);
  animation: pulseGlow 1.4s ease-in-out infinite;
}

.hud-loader .loader-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--qt-cyan);
  text-shadow: var(--qt-glow-cyan);
  animation: flicker 2s infinite;
}
.hud-loader .loader-bar {
  width: 220px; height: 3px;
  background: rgba(0, 240, 255, .15);
  position: relative;
  overflow: hidden;
}
.hud-loader .loader-bar::after {
  content: "";
  position: absolute;
  top: 0; left: -40%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--qt-cyan), transparent);
  box-shadow: var(--qt-glow-cyan);
  animation: loaderBar 1.4s ease-in-out infinite;
}
@keyframes loaderBar { 0% { left: -40%; } 100% { left: 100%; } }

/* ---------- Secciones genéricas ---------- */
.section {
  position: relative;
  z-index: 2;
  padding: 5rem 0;
}
.section--alt { background: var(--qt-bg2); }

/* ---------- Terminal output (mensajes HUD) ---------- */
.hud-terminal {
  background: rgba(5, 11, 20, .85);
  border: 1px solid rgba(0, 240, 255, .25);
  padding: 1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  color: var(--qt-cyan);
  text-shadow: var(--qt-glow-cyan);
  min-height: 80px;
  clip-path: polygon(
    0 10px, 10px 0,
    calc(100% - 10px) 0, 100% 10px,
    100% calc(100% - 10px), calc(100% - 10px) 100%,
    10px 100%, 0 calc(100% - 10px)
  );
}
.hud-terminal .term-line { display: block; opacity: 0; animation: qt-fade-in-up .35s ease forwards; }
.hud-terminal .term-line::before { content: "> "; color: var(--qt-orange); }
.hud-terminal .term-line.ok    { color: var(--qt-cyan); }
.hud-terminal .term-line.error { color: var(--qt-orange); text-shadow: var(--qt-glow-orange); }

/* ---------- Enlace al Panel de Control (footer) ----------
   El panel es una zona restringida: se marca de forma discreta para que
   el usuario pueda llegar a él, sin destacar sobre el contenido público. */
.qt-footer-link--admin {
  margin-top: .5rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(0, 240, 255, .12);
  color: rgba(0, 240, 255, .7) !important;
  letter-spacing: .06em;
}
.qt-footer-link--admin:hover { color: var(--qt-cyan) !important; }

/* ---------- Contraste y legibilidad del footer (UI-10) ----------
   El texto secundario (#8A99AD al 70-80% de opacidad) sobre el fondo
   del footer (#0B1528 al 80%) no alcanzaba el contraste mínimo de
   WCAG AA. Se sube la opacidad del color de texto y se refuerza el
   borde inferior de la grilla. */
.qt-footer { background: rgba(11, 21, 40, .92); }
.qt-footer__grid { border-bottom: 1px solid rgba(0, 240, 255, .1); }
.qt-footer__grid h2 { color: var(--qt-cyan); }
.qt-footer__brand .text-qt-text-sec,
.qt-footer__links .text-qt-text-sec,
.qt-footer__contact .text-qt-text-sec {
  color: #B6C3D4; /* contraste >= 7:1 sobre --qt-bg2 */
}
.qt-footer-link {
  color: #B6C3D4 !important;
  text-decoration: none;
  transition: color .2s ease;
}
.qt-footer-link:hover,
.qt-footer-link:focus-visible { color: var(--qt-cyan) !important; }
.qt-footer-link:focus-visible {
  outline: 2px solid var(--qt-cyan);
  outline-offset: 3px;
}
.qt-footer__bar { background: rgba(5, 11, 20, .55); }
.qt-footer__bar .text-qt-text-sec { color: #A8B6C8; }
.qt-footer__contact a { color: #D3DEEC; }
.qt-footer__contact a:hover { color: var(--qt-cyan); }

/* ---------- Redes sociales del pie (UI-02) ----------
   Iconos de las principales redes, con el mismo tratamiento que el
   resto del footer: contorno de marca, relleno al pasar el ratón y
   foco visible para navegación por teclado. */
.qt-footer__social { list-style: none; margin: 0; padding: 0; }
.qt-footer__social__item { display: inline-flex; }
.qt-footer__social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: #B6C3D4;
  border: 1px solid rgba(0, 240, 255, .3);
  background: rgba(0, 240, 255, .06);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.qt-footer__social__link:hover,
.qt-footer__social__link:focus-visible {
  color: var(--qt-cyan);
  border-color: var(--qt-cyan);
  background: rgba(0, 240, 255, .16);
  transform: translateY(-2px);
}
.qt-footer__social__link:focus-visible {
  outline: 2px solid var(--qt-cyan);
  outline-offset: 3px;
}
/* Red sin enlace configurado: el icono se muestra, pero no navega. El
   trazo discontinuo señala que el destino está por configurar. */
.qt-footer__social__link--pending {
  color: #8A99AD;
  border-style: dashed;
  border-color: rgba(0, 240, 255, .28);
  background: transparent;
  cursor: default;
}
.qt-footer__social__link--pending:hover {
  color: #8A99AD;
  border-color: rgba(0, 240, 255, .28);
  background: transparent;
  transform: none;
}

/* ---------- Feedback del formulario de contacto ----------
   El bloque `#qt-contact-feedback` muestra la respuesta del terminal
   (éxito / error) tras el envío. */
.qt-feedback {
  position: relative;
}
.qt-feedback__output {
  margin: 0;
  max-height: 180px;
  overflow-y: auto;
  line-height: 1.7;
}
.qt-feedback .term-line {
  display: block;
  opacity: 0;
  animation: qt-fade-in-up .35s ease forwards;
}
.qt-feedback .term-line::before { content: "> "; color: var(--qt-orange); }
.qt-feedback .term-line.ok    { color: var(--qt-cyan); }
.qt-feedback .term-line.error { color: var(--qt-orange); text-shadow: var(--qt-glow-orange); }

/* Animación de entrada de las líneas de terminal.
   Se define aquí (y no sólo en Tailwind) porque el CSS compilado la
   purga al no detectar clases utilitarias que la usen. */
@keyframes qt-fade-in-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO — CABINA DE MANDO (cockpit futurista)
   ============================================================ */

.qt-hero {
  --qt-panel-cut: 18px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 18%, rgba(0, 72, 150, .28) 0%, transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 88%, rgba(0, 40, 92, .30) 0%, transparent 60%),
    var(--qt-bg);
  isolation: isolate;
}

/* Canvas 3D / 2D a pantalla completa */
.qt-hero-canvas { display: block; }
#qt-hero-fallback { opacity: 0; pointer-events: none; }
.qt-hero.is-fallback #qt-hero-fallback { opacity: 1; }
.qt-hero.is-fallback #qt-hero-canvas { display: none !important; }

/* Viñeta + barrido superior: da profundidad al canvas */
.qt-hero-vignette {
  background:
    radial-gradient(ellipse 78% 62% at 50% 40%, transparent 38%, rgba(5, 11, 20, .72) 100%),
    linear-gradient(180deg, rgba(5, 11, 20, .55) 0%, transparent 16%, transparent 78%, rgba(5, 11, 20, .78) 100%);
}

/* ---------- Marco angular general de la cabina ---------- */
.qt-hero-frame__corner {
  position: absolute;
  width: 56px; height: 56px;
  border: 1px solid rgba(0, 240, 255, .34);
  pointer-events: none;
}
.qt-hero-frame__corner--tl {
  top: 58px; left: 22px;
  border-right: 0; border-bottom: 0;
  clip-path: polygon(0 0, 100% 0, 100% 10px, 10px 10px, 10px 100%, 0 100%);
}
.qt-hero-frame__corner--tr {
  top: 58px; right: 22px;
  border-left: 0; border-bottom: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 10px, 90px 10px);
}
.qt-hero-frame__corner--bl {
  bottom: 22px; left: 22px;
  border-right: 0; border-top: 0;
  clip-path: polygon(0 0, 100% 0, 100% 10px, 10px 10px, 10px 100%, 0 100%);
}
.qt-hero-frame__corner--br {
  bottom: 22px; right: 22px;
  border-left: 0; border-top: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 10px, 90px 10px);
}

/* Raíles finos: líneas angulares que--"arman" la cabina */
.qt-hero-frame__rail { position: absolute; pointer-events: none; }
.qt-hero-frame__rail--top {
  top: 58px; left: 78px; right: 78px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, .18) 12%, rgba(0, 240, 255, .18) 88%, transparent);
}
.qt-hero-frame__rail--bottom {
  bottom: 22px; left: 78px; right: 78px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, .18) 12%, rgba(0, 240, 255, .18) 88%, transparent);
}
.qt-hero-frame__rail--left {
  top: 114px; bottom: 78px; left: 22px; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, .18) 10%, rgba(0, 240, 255, .18) 90%, transparent);
}
.qt-hero-frame__rail--right {
  top: 114px; bottom: 78px; right: 22px; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, .18) 10%, rgba(0, 240, 255, .18) 90%, transparent);
}

/* ---------- Readouts superiores (SYSTEM STATUS / COORDINATES) ---------- */
.qt-hero-readouts {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 5.5rem);
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  letter-spacing: .22em;
  color: rgba(0, 240, 255, .82);
  text-shadow: 0 0 10px rgba(0, 240, 255, .45);
}
.qt-hero-readout {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .7rem;
  background: linear-gradient(180deg, rgba(11, 21, 40, .55), rgba(5, 11, 20, .25));
  border: 1px solid rgba(0, 240, 255, .18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.qt-hero-readout--left { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.qt-hero-readout--right { clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.qt-hero-readout__label { opacity: .72; }
.qt-hero-readout__value b { color: #7dfcff; font-weight: 700; }

/* Enlaces configurables de las barras de estado del hero. Siguen el
   mismo patrón que las redes sociales del pie: icono, nombre y enlace. */
.qt-hero-readout__sep {
  width: 1px;
  align-self: stretch;
  min-height: 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, .45), transparent);
}
.qt-hero-readout__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.qt-hero-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  /* El contenedor del hero no recibe eventos de puntero: los enlaces
    sí deben ser clicables, así que los reactivan aquí. */
  pointer-events: auto;
  color: rgba(0, 240, 255, .82);
  text-decoration: none;
  transition: color .2s ease, text-shadow .2s ease;
}
.qt-hero-link:hover,
.qt-hero-link:focus-visible {
  color: #EAFDFF;
  text-shadow: 0 0 10px rgba(0, 240, 255, .8);
  outline: none;
}
.qt-hero-link__icon { width: .85rem; height: .85rem; flex: none; }
.qt-hero-link:hover .qt-hero-link__icon,
.qt-hero-link:focus-visible .qt-hero-link__icon {
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, .75));
}
.qt-hero-link__label { text-transform: uppercase; }
.qt-hero-link--pending { opacity: .5; cursor: default; }
.qt-hero-link--pending:hover { color: rgba(0, 240, 255, .82); text-shadow: 0 0 10px rgba(0, 240, 255, .45); }
.qt-hero-readout__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--qt-cyan);
  box-shadow: 0 0 8px #00F0FF, 0 0 16px rgba(0, 240, 255, .6);
  animation: qt-pulse 2s ease-in-out infinite;
}

/* ---------- Paneles laterales angulares ---------- */
.qt-hero-panel {
  position: absolute;   /* sobreescribe cualquier utilidad de Tailwind */
  padding: 1.1rem 1.15rem 1rem;
  background: linear-gradient(160deg, rgba(11, 21, 40, .72) 0%, rgba(5, 11, 20, .58) 100%);
  border: 1px solid rgba(0, 240, 255, .22);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  /* `hidden` recorta el fondo con el clip-path angular; el contenido
     interior gestiona su propio scroll, así que no se pierde texto. */
  overflow: hidden;
  /* Tope de altura del panel: evita que en ventanas muy bajas se
     solape con la consola inferior. */
  max-height: 76vh;
  transition: border-color .35s ease, box-shadow .35s ease, transform .35s ease;
}
.qt-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(0, 240, 255, .09) 0%, transparent 45%);
  pointer-events: none;
}
.qt-hero-panel--left {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.qt-hero-panel--right {
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 22px);
}
.qt-hero-panel:hover {
  border-color: rgba(0, 240, 255, .45);
  box-shadow: 0 0 26px rgba(0, 240, 255, .16), inset 0 0 26px rgba(0, 102, 255, .08);
}

.qt-hero-panel__head {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(0, 240, 255, .16);
}
.qt-hero-panel__head::before {
  content: "";
  width: 3px; height: 14px;
  background: var(--qt-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, .8);
  flex: none;
}
.qt-hero-panel--right .qt-hero-panel__head { justify-content: flex-end; }
.qt-hero-panel--right .qt-hero-panel__head::before { order: 2; }
.qt-hero-panel__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .3em;
  color: #cfeefb;
  text-shadow: 0 0 12px rgba(0, 240, 255, .45);
  margin: 0;
}

/* ---------- Cuerpo de los paneles laterales ----------
   Antes el texto se recortaba verticalmente (`max-height` + `overflow:
   hidden`), lo que truncaba el contenido y mostraba fragmentos
   aislados al redimensionar.

   Ahora el cuerpo tiene un tope de altura RELATIVO al viewport
   (vh), de modo que nunca se recorta en ventanas normales, y si
   aun así no cabe (ventanas muy bajas) ofrece scroll vertical
   propio sin generar scroll horizontal. */
.qt-hero-panel__body {
  font-family: 'JetBrains Mono', monospace;
  /* Tamaño legible: .615rem (~9.8px) era ilegible a escala normal.
     Se sube a .72rem (~11.5px) manteniendo el aire de la composición. */
  font-size: .72rem;
  line-height: 1.85;
  letter-spacing: .015em;
  color: rgba(178, 192, 210, .95);
  /* Tope generoso: el texto completo cabe con holgura en pantallas
     de 700px o más. Por debajo, entra el scroll vertical. */
  max-height: min(58vh, 460px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  position: relative;
  /* Evita que el texto largo desborde horizontalmente el panel. */
  overflow-wrap: anywhere;
  word-break: break-word;
  /* Compensa el ancho del scrollbar vertical para no desplazar el texto. */
  scrollbar-gutter: stable;
  /* Discreto: el scrollbar sólo se nota al interactuar. */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, .35) transparent;
}
.qt-hero-panel__body::-webkit-scrollbar { width: 4px; }
.qt-hero-panel__body::-webkit-scrollbar-track { background: transparent; }
.qt-hero-panel__body::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, .3);
  border-radius: 0;
}
.qt-hero-panel__body::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, .55); }
.qt-hero-panel__body p { margin: 0 0 .9rem; }
.qt-hero-panel__body p:last-child { margin-bottom: 0; }

.qt-hero-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .9rem;
  padding-top: .55rem;
  border-top: 1px solid rgba(0, 240, 255, .14);
  font-family: 'JetBrains Mono', monospace;
  font-size: .56rem;
  letter-spacing: .18em;
  min-width: 0;
}
.qt-hero-panel__key { color: rgba(138, 153, 173, .7); flex: 0 0 auto; }
.qt-hero-panel__val {
  color: var(--qt-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, .5);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

/* Contenido central del hero.
   `.qt-hero-content` y `.qt-hero-console` comparten el mismo ancho de
   columna (62rem) y el mismo padding lateral, de modo que el bloque de
   texto y la consola quedan exactamente en el mismo eje vertical.
   El padding deja libre el espacio de los paneles ABOUT US / SERVICES. */
.qt-hero {
  --qt-hero-col: 62rem;
}
.qt-hero-content__inner { max-width: 100%; }
@media (min-width: 1024px) {
  .qt-hero-content {
    max-width: var(--qt-hero-col);
    margin-left: auto;
    margin-right: auto;
    padding-left: 290px;
    padding-right: 290px;
  }
}
@media (min-width: 1536px) {
  .qt-hero-content {
    max-width: var(--qt-hero-col);
    margin-left: auto;
    margin-right: auto;
    padding-left: 330px;
    padding-right: 330px;
  }
}

/* Consola: mismo ancho de columna y mismo padding que el bloque de texto. */
.qt-hero-console .qt-console,
.qt-hero-console .qt-scroll-cue {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .qt-hero-console {
    max-width: var(--qt-hero-col);
    margin-left: auto;
    margin-right: auto;
    padding-left: 290px;
    padding-right: 290px;
  }
}
@media (min-width: 1536px) {
  .qt-hero-console {
    max-width: var(--qt-hero-col);
    margin-left: auto;
    margin-right: auto;
    padding-left: 330px;
    padding-right: 330px;
  }
}

/* ---------- Slot del holograma 3D ----------
   Caja vacía que reserva el espacio vertical de la escena Three.js.
   hero.js mide este rectángulo y escala/posiciona el holograma para
   que encaje exactamente en esta banda, sin solaparse con el texto. */
.qt-hero-holo-slot {
  position: relative;
  z-index: 0;
  width: 100%;
  flex: 0 0 auto;
  pointer-events: none;
}
@media (min-width: 1024px) {
  .qt-hero-holo-slot { height: 24vh; margin-bottom: .25rem; }
}
@media (min-width: 1536px) {
  .qt-hero-holo-slot { height: 26vh; }
}
@media (max-width: 1023px) {
  .qt-hero-holo-slot { height: 28vh; margin-bottom: .25rem; }
}
@media (max-width: 767px) {
  .qt-hero-holo-slot { height: 22vh; }
}

/* Hero: columna flex para que el contenido y la consola fluyan sin solaparse */
.qt-hero {
  flex-direction: column;
  justify-content: center;
  /* Espacio para la barra de navegación fija (evita que el holograma
     quede cortado por debajo del header). `box-sizing: border-box`
     hace que este padding no aumente la altura total. */
  padding-top: 64px;
  box-sizing: border-box;
  overflow: hidden;
}
@media (max-width: 767px) {
  /* En móvil los readouts ocupan dos líneas: se deja espacio suficiente
     para que el holograma no quede debajo de ellos. */
  .qt-hero { padding-top: 112px; }
}
.qt-hero-content { text-align: center; flex: 0 1 auto; width: 100%; }
.qt-hero-console { flex: 0 0 auto; margin-top: auto; width: 100%; }
.qt-hero-console .qt-console { margin-left: auto; margin-right: auto; }

/* En desktop, bajar el bloque de texto para dejar sitio al holograma superior */
@media (min-width: 1024px) {
  .qt-hero-content { padding-top: 2vh; }
}
@media (min-width: 1536px) {
  .qt-hero-content { padding-top: 1vh; }
}

/* Línea de barrido dentro del panel */
.qt-hero-panel__scan {
  position: absolute;
  left: 0; right: 0;
  height: 46px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, .10) 45%, rgba(0, 240, 255, .20) 50%, rgba(0, 240, 255, .10) 55%, transparent);
  animation: qt-panel-scan 5.5s linear infinite;
}

/* ---------- Grid de servicios ----------
   Los rótulos usan la denominación oficial de la empresa y son
   largos ("Implementación de SOC con IA"), por lo que la grilla pasa
   a una columna en pantallas estrechas y se permite el salto de línea
   con altura de línea compacta. */
.qt-hero-services { margin: 0; padding: 0; list-style: none; }
.qt-hero-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .8rem .45rem .7rem;
  border: 1px solid rgba(0, 240, 255, .16);
  background: rgba(0, 102, 255, .05);
  transition: background-color .3s ease, border-color .3s ease, transform .3s ease;
}
.qt-hero-service:hover {
  background: rgba(0, 240, 255, .10);
  border-color: rgba(0, 240, 255, .45);
  transform: translateY(-2px);
}
.qt-hero-service__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  color: var(--qt-cyan);
  filter: drop-shadow(0 0 7px rgba(0, 240, 255, .55));
}
.qt-hero-service__icon svg { width: 26px; height: 26px; }
.qt-hero-service__label {
  font-family: 'JetBrains Mono', monospace;
  /* .5rem (~8px) era ilegible. Se sube a .625rem (~10px) con más
     interlineado y sin apretar la retícula. */
  font-size: .625rem;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(178, 192, 210, .95);
  line-height: 1.55;
  /* Los rótulos largos no deben desbordar la celda. */
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* ---------- Consola de terminal ---------- */
.qt-console {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(180deg, rgba(5, 11, 20, .88) 0%, rgba(11, 21, 40, .78) 100%);
  border: 1px solid rgba(0, 240, 255, .26);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 16px);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 0 26px rgba(0, 102, 255, .16), inset 0 0 30px rgba(0, 102, 255, .07);
}
.qt-console__bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border-bottom: 1px solid rgba(0, 240, 255, .16);
  background: rgba(0, 240, 255, .04);
}
.qt-console__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(0, 240, 255, .38);
}
.qt-console__dot:first-child { background: rgba(0, 240, 255, .85); box-shadow: 0 0 7px #00F0FF; }
.qt-console__title {
  margin-left: .5rem;
  font-size: .56rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(138, 153, 173, .8);
}
.qt-console__body {
  padding: .55rem .8rem .65rem;
  font-size: .68rem;
  line-height: 1.85;
  color: rgba(0, 240, 255, .9);
  text-shadow: 0 0 9px rgba(0, 240, 255, .45);
}
.qt-console__line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-console__line--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.qt-console__meta {
  color: rgba(138, 153, 173, .75);
  font-size: .58rem;
  letter-spacing: .12em;
  text-shadow: none;
  white-space: nowrap;
}
.qt-console__ok { color: #7dfcff; }
.qt-console__cursor {
  display: inline-block;
  width: .5rem; height: .95em;
  vertical-align: text-bottom;
  background: var(--qt-cyan);
  box-shadow: 0 0 9px #00F0FF;
  animation: qt-cursor-blink 1.1s steps(1) infinite;
}

/* ---------- Botones del hero ---------- */
.qt-btn { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.qt-btn--primary { box-shadow: 0 0 22px rgba(0, 240, 255, .28); }
.qt-btn--primary:hover { box-shadow: 0 0 34px rgba(0, 240, 255, .5); }
.qt-btn--ghost { box-shadow: inset 0 0 18px rgba(0, 240, 255, .06); }
.qt-btn__scan { opacity: 0; transition: opacity .25s ease; }
.qt-btn:hover .qt-btn__scan { opacity: 1; animation: qt-btn-scan 1.5s linear infinite; }

/* ---------- Contenido central ---------- */
.qt-hero-title {
  text-wrap: balance;
  /* Interlineado amplio: las dos lineas del titular estaban encimadas. */
  line-height: 1.22 !important;
}
.qt-hero-subtitle {
  text-wrap: balance;
  /* Interlineado y holgura para que el subtítulo no se pegue al titular
     ni al bloque de CTAs. */
  line-height: 1.7 !important;
  max-width: 46rem;
}
/* Separación vertical entre el eyebrow y el titular. */
.qt-hero-eyebrow { margin-bottom: 1.25rem; }
@media (min-width: 640px) {
  .qt-hero-eyebrow { margin-bottom: 1.6rem; }
}

/* ---------- Menú orbital (Consultoría 360°) ----------
   Los cuatro nodos comparten la misma estructura, pero cada uno recibe
   un acento cromático distinto de la paleta de la marca para que se
   distingan entre sí (UI-08). El acento se aplica al borde, al icono
   y al halo; el estado activo mantiene el contraste con el texto. */
.qt-orbital__node {
  color: var(--qt-cyan);
  border-color: rgba(0, 240, 255, .5);
}
.qt-orbital__node--1 {
  --qt-node-accent: #00F0FF;
  --qt-node-accent-rgb: 0, 240, 255;
}
.qt-orbital__node--2 {
  --qt-node-accent: #0066FF;
  --qt-node-accent-rgb: 0, 102, 255;
}
.qt-orbital__node--3 {
  --qt-node-accent: #FF5500;
  --qt-node-accent-rgb: 255, 85, 0;
}
.qt-orbital__node--4 {
  --qt-node-accent: #22C55E;
  --qt-node-accent-rgb: 34, 197, 94;
}
.qt-orbital__node[class*="qt-orbital__node--"] {
  color: var(--qt-node-accent, var(--qt-cyan));
  border-color: rgba(var(--qt-node-accent-rgb, 0, 240, 255), .55);
  box-shadow: 0 0 18px rgba(var(--qt-node-accent-rgb, 0, 240, 255), .18);
}
.qt-orbital__node[class*="qt-orbital__node--"]:hover {
  color: var(--qt-node-accent, var(--qt-cyan));
  border-color: var(--qt-node-accent, var(--qt-cyan));
  background: rgba(var(--qt-node-accent-rgb, 0, 240, 255), .12);
  box-shadow: 0 0 26px rgba(var(--qt-node-accent-rgb, 0, 240, 255), .38);
}

/* ---------- Keyframes del cockpit ---------- */
@keyframes qt-panel-scan {
  0%   { transform: translateY(-60px); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(280px); opacity: 0; }
}
@keyframes qt-cursor-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes qt-btn-scan {
  0%   { transform: translateY(0); opacity: .1; }
  50%  { opacity: .8; }
  100% { transform: translateY(44px); opacity: .1; }
}
@keyframes qt-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .45; transform: scale(.82); }
}
@keyframes qt-fall {
  0%   { transform: translateY(-8px); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Keyframes orbitales (Consultoría) ---------- */
/* El anillo gira en sentido horario; los nodos contra-rotan para
   mantener sus iconos siempre verticales. */
@keyframes qt-spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes qt-spin-slow-reverse {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ---------- Responsive del hero ---------- */
@media (max-width: 1279px) {
  .qt-hero-panel { width: 220px; padding: .9rem .95rem .85rem; }
  .qt-hero-panel__body { font-size: .575rem; max-height: min(52vh, 360px); }
  .qt-hero-service__icon { width: 32px; height: 32px; }
  .qt-hero-service__icon svg { width: 22px; height: 22px; }
}
@media (max-width: 1023px) {
  .qt-hero-panel { display: none; }
  .qt-hero-frame__rail--left,
  .qt-hero-frame__rail--right { display: none; }
}
@media (max-width: 767px) {
  .qt-hero-readouts { font-size: .55rem; letter-spacing: .12em; padding: 0 1rem; }
  .qt-hero-readout { padding: .22rem .5rem; gap: .35rem; }
  .qt-console__body { font-size: .58rem; }
  .qt-console__title { display: none; }
  .qt-hero-frame__corner { width: 40px; height: 40px; }
  .qt-hero-frame__corner--tl { top: 54px; left: 12px; }
  .qt-hero-frame__corner--tr { top: 54px; right: 12px; }
  .qt-hero-frame__corner--bl { bottom: 14px; left: 12px; }
  .qt-hero-frame__corner--br { bottom: 14px; right: 12px; }
  .qt-hero-frame__rail--top { top: 54px; left: 52px; right: 52px; }
  .qt-hero-frame__rail--bottom { bottom: 14px; left: 52px; right: 52px; }
}

/* ---------- Responsive overrides ---------- */
@media (min-width: 768px) {
  .hud-nav .nav-links { display: flex; }
  .hud-nav .nav-toggle { display: none; }
}

@media (max-width: 640px) {
  .hud-overlay .hud-corner { font-size: .6rem; padding: .35rem .5rem; }
  .hud-overlay .hud-corner.tr,
  .hud-overlay .hud-corner.br { display: none; }
  .binary-stream { display: none; }
  .section { padding: 3rem 0; }
  .hud-nav { padding: .6rem 1rem; }
}

/* ---------- Smart TV (large displays >= 1920px) ---------- */
@media (min-width: 1920px) {
  html { font-size: 18px; }
  .container-qt { max-width: 1600px; padding: 0 3rem; }
  .hud-nav { padding: 1.25rem 3rem; }
  .hud-nav .nav-links a { font-size: .9rem; letter-spacing: .22em; }
  .section { padding: 7rem 0; }
  .hud-overlay .hud-corner { font-size: .85rem; padding: .75rem 1.25rem; }
  .hud-card { padding: 2.25rem; }
  .hud-btn { padding: 1rem 2rem; font-size: 1rem; }
}

/* ---------- Reduced motion ----------
   Dos vías de activación:
     1. La preferencia del sistema operativo (media query).
     2. El toggle manual del usuario, que añade la clase `qt-reduced`
        al elemento <html> (ver js/nav.js). Esta vía tiene prioridad:
        el usuario puede activar el modo accesible aunque el sistema no
        lo pida. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .scan-line::after,
  .binary-stream span,
  .hud-loader .loader-bar::after,
  .hud-loader .loader-frame::after,
  .hud-loader .loader-core { animation: none !important; }
  .hud-card:hover { transform: none; }
}

/* Modo reducido activado manualmente (toggle del usuario). */
html.qt-reduced *,
html.qt-reduced *::before,
html.qt-reduced *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
html.qt-reduced .scan-line::after,
html.qt-reduced .binary-stream span,
html.qt-reduced .hud-loader .loader-bar::after,
html.qt-reduced .hud-loader .loader-frame::after,
html.qt-reduced .hud-loader .loader-core { animation: none !important; }
html.qt-reduced .hud-card:hover { transform: none; }
html.qt-reduced .qt-hero-panel__scan { display: none; }
html.qt-reduced .qt-console__cursor { animation: none !important; opacity: 1; }

/* ---------- Print ---------- */
@media print {
  .hud-overlay, .hud-crosshair, .binary-stream, .hud-nav, .hud-loader { display: none !important; }
  body::before, body::after { display: none; }
}