:root {
  color-scheme: dark;
  --fondo: #030303;
  --margen-lateral: clamp(16px, 2vw, 40px);
  --borde: #202020;
  --naranja: #ff900b;
  --naranja-claro: #ffb342;
  --texto: #f8f8f8;
  --fuente-texto: "Encode Sans Expanded", Arial, sans-serif;
  --fuente-titulos: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente-texto);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: min(450px, 55vw);
  height: 440px;
  background: url("assets/network.svg") center / contain no-repeat;
  pointer-events: none;
}

body::before { top: 50px; right: -95px; width: min(330px, 48vw); height: 330px; transform: rotate(18deg); }
body::after { bottom: -40px; left: -130px; transform: rotate(-12deg); }

a { color: inherit; text-decoration: none; }
svg { display: block; width: 14px; height: 14px; }

.control-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.saltar-contenido {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 5;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--naranja);
  color: #161009;
  transform: translateY(-160%);
}
.saltar-contenido:focus { transform: translateY(0); }

.pagina {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 14px var(--margen-lateral);
}

.marca { display: inline-flex; align-items: center; gap: 9px; }
.logo-marca { display: block; width: 30px; height: 30px; object-fit: contain; }
.texto-marca { display: flex; flex-direction: column; }
.texto-marca strong {
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: .95;
  letter-spacing: .5px;
}
.texto-marca small {
  margin-top: 3px;
  font-family: Arial, sans-serif;
  font-size: 5.2px;
  line-height: 1;
  letter-spacing: .12px;
}

.contador-sistemas { display: flex; align-items: center; gap: 9px; font-size: 9px; font-weight: 700; }
.contador-sistemas strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding-inline: 8px;
  border-radius: 9px;
  background: var(--naranja);
  font-family: var(--fuente-titulos);
  font-size: 13px;
}

.contenido-principal {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: clamp(28px, 4vh, 48px) var(--margen-lateral) clamp(20px, 3vh, 32px);
}
h1 {
  margin: 0 0 25px;
  font-family: var(--fuente-titulos);
  font-size: clamp(26px, 3.05vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .5px;
  text-align: center;
  text-transform: uppercase;
}

.cuadricula-sistemas {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(175px, 1fr));
  gap: clamp(16px, 1.9vw, 23px);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.tarjeta-empresa { position: relative; min-width: 0; }
.contenido-tarjeta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 175px;
  height: 100%;
  padding: clamp(13px, 1.55vw, 20px);
  border: 1px solid var(--borde);
  border-radius: 11px;
  background: linear-gradient(135deg, #0c0c0cf5, #090909f5);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.seleccionar-empresa { position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.cabecera-tarjeta { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.icono-sistema {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(30px, 3.52vw, 42px);
  height: clamp(30px, 3.52vw, 42px);
  border: 1px solid #69400e;
  border-radius: 8px;
  background: linear-gradient(135deg, #35220b, #16130c);
}
.icono-sistema img { display: block; width: 90%; height: 90%; object-fit: contain; }
.enlace-externo, .enlace-ingresar { position: relative; z-index: 2; }
.enlace-externo {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  margin-right: -5px;
  border-radius: 4px;
  color: #626262;
}
.enlace-externo svg { width: 13px; height: 13px; }

.informacion-empresa { width: 100%; margin-top: auto; padding-top: 14px; line-height: 1; }
.etiqueta-categoria {
  display: inline-block;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #30200b;
  color: #ffab31;
  font-family: Arial, sans-serif;
  font-size: clamp(7px, .82vw, 10px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .65px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.nombre-empresa {
  margin: 8px 0 0;
  font-family: var(--fuente-titulos);
  font-size: clamp(16px, 1.88vw, 23px);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.enlace-ingresar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 20px;
  margin-top: 15px;
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--naranja);
  color: #171008;
  font-family: Arial, sans-serif;
  font-size: clamp(8px, .9vw, 11px);
  font-weight: 700;
  line-height: 1.1;
  transition: background-color .2s ease;
}
.enlace-ingresar svg { width: 10px; height: 10px; }
.enlace-ingresar:hover { background: var(--naranja-claro); }
.enlace-externo:hover { color: var(--naranja-claro); }

@media (hover: hover) {
  .tarjeta-empresa:hover .contenido-tarjeta {
    border-color: #c17808;
    background: radial-gradient(ellipse at 55% 45%, #81480b, #754007 65%, #302006);
    box-shadow: 0 0 22px #ff900b42, inset 0 0 18px #ff980021;
  }

  .tarjeta-empresa:hover .icono-sistema {
    border-color: #ffc05e;
    background: var(--naranja);
    box-shadow: 0 0 12px #ff900b33;
  }

  .tarjeta-empresa:hover .icono-sistema img { filter: brightness(0) invert(1); }
  .tarjeta-empresa:hover .etiqueta-categoria { background: #482704; color: #ffd18c; }
  .tarjeta-empresa:hover .enlace-externo { color: #ffb342; }
}

a:focus-visible,
.selector-empresa:focus-visible + .contenido-tarjeta {
  outline: 2px solid #ffc15b;
  outline-offset: 4px;
}

@media (min-width: 1100px) {
  .logo-marca { width: 38px; height: 38px; }
  .texto-marca strong { font-size: 30px; }
  .texto-marca small { font-size: 6.1px; }
  .contador-sistemas { font-size: 11px; }
  .contador-sistemas strong { min-width: 36px; height: 36px; }
  .enlace-ingresar { min-height: 28px; margin-top: 16px; padding: 7px 12px; }
}
@media (max-width: 740px) {
  .cuadricula-sistemas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(175px, auto);
  }
  .contenido-tarjeta { padding: 17px; }
  .icono-sistema { width: 35px; height: 35px; }
  .nombre-empresa { font-size: 20px; }
  .etiqueta-categoria { font-size: 8px; }
  .enlace-ingresar { min-height: 30px; font-size: 10px; padding: 8px 12px; }
}
@media (max-width: 440px) {
  .encabezado { gap: 12px; padding: 16px; }
  h1 { max-width: 300px; margin: 0 auto 26px; font-size: 28px; }
  .cuadricula-sistemas { grid-template-columns: 1fr; gap: 14px; }
  .contenido-tarjeta { min-height: 180px; padding: 18px; }
  .nombre-empresa { font-size: 23px; }
  .etiqueta-categoria { font-size: 9px; }
  .icono-sistema { width: 38px; height: 38px; }
  .enlace-externo { width: 36px; height: 36px; }
  .enlace-ingresar { min-height: 36px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
