:root {
  --blue-950: #001b3f;
  --blue-900: #002653;
  --blue-800: #003c78;
  --blue-700: #0656b6;
  --blue-600: #0d63da;
  --white: #ffffff;
  --card-text: #082f62;
  --muted-text: #27456d;
  --card-radius: 24px;
  --shadow: 0 18px 45px rgba(0, 14, 42, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--blue-950);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--white);
  background: var(--blue-950);
}

a {
  color: inherit;
  text-decoration: none;
}

.portal {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 6%, rgba(18, 106, 209, 0.45), transparent 31%),
    radial-gradient(circle at 75% 52%, rgba(4, 66, 139, 0.28), transparent 38%),
    linear-gradient(125deg, #064b92 0%, #002e62 43%, #001f49 100%);
}

.portal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.background-glow {
  position: absolute;
  z-index: -1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.24;
  pointer-events: none;
}

.background-glow--left {
  top: 80px;
  left: -250px;
  background: #1680ff;
}

.background-glow--right {
  right: -300px;
  bottom: 50px;
  background: #001f4b;
}

.portal__content {
  width: min(1520px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 54px;
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto 45px;
}

.brand__logo {
  display: block;
  width: clamp(240px, 28vw, 430px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.system-card {
  min-height: 440px;
  padding: 34px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--card-text);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--card-radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.99), rgba(248,250,253,0.97));
  box-shadow: var(--shadow);
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    border-color 240ms ease;
}

.system-card:hover {
  transform: translateY(-7px);
  border-color: #ffffff;
  box-shadow: 0 25px 58px rgba(0, 14, 42, 0.34);
}

.system-card__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  color: #0654af;
}

.system-card__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.system-card__title {
  min-height: 74px;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: clamp(1.25rem, 1.65vw, 1.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.system-card__title span:last-child {
  white-space: nowrap;
}

.system-card__divider {
  width: 26px;
  height: 3px;
  margin: 18px 0 18px;
  border-radius: 99px;
  background: #0b5bbd;
}

.system-card__description {
  max-width: 285px;
  min-height: 106px;
  margin: 0 auto 27px;
  color: var(--muted-text);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.55;
}

.system-card__button {
  width: min(100%, 235px);
  min-height: 60px;
  margin-top: auto;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(100deg, #074898 0%, #0860cd 100%);
  box-shadow: 0 8px 17px rgba(0, 55, 132, 0.22);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.system-card__button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 22px rgba(0, 55, 132, 0.3);
}

.system-card__button:active {
  transform: translateY(0);
}

.system-card__button:focus-visible,
.socials a:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
}

.system-card__button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.system-card__button:hover svg {
  transform: translateX(4px);
}

.footer {
  padding: 27px 20px 17px;
  background: rgba(0, 24, 59, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.footer__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.footer__content p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.footer__separator {
  width: 1px;
  height: 42px;
  background: rgba(255, 255, 255, 0.44);
}

.socials {
  display: flex;
  align-items: center;
  gap: 27px;
}

.socials a {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.socials a:hover {
  transform: translateY(-3px);
  color: #063e84;
  background: #fff;
}

.socials svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.socials a:first-child svg {
  fill: currentColor;
  stroke: none;
}

.footer__copyright {
  display: block;
  margin-top: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.72rem;
}

/* TABLET */
@media (max-width: 1180px) {
  .portal__content {
    width: min(920px, calc(100% - 40px));
    padding-top: 42px;
  }

  .systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .system-card {
    min-height: 455px;
    padding-inline: 34px;
  }

  .system-card__title {
    font-size: 1.8rem;
  }

  .system-card__title span:last-child {
    white-space: normal;
  }

  .system-card__description {
    max-width: 360px;
    min-height: 88px;
    font-size: 0.98rem;
  }
}

/* MÓVIL */
@media (max-width: 760px) {
  .portal__content {
    width: min(100% - 28px, 560px);
    padding: 32px 0 38px;
  }

  .brand {
    margin-bottom: 30px;
  }

  .brand__icon {
    width: 54px;
    height: 54px;
  }

  .brand__name {
    font-size: 2.35rem;
  }

  .systems-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .system-card {
    min-height: 430px;
    padding: 36px 25px 30px;
  }

  .system-card__title {
    min-height: auto;
    font-size: 1.85rem;
  }

  .system-card__description {
    max-width: 390px;
    min-height: auto;
    font-size: 0.95rem;
  }

  .footer__content {
    flex-direction: column;
    gap: 18px;
  }

  .footer__separator {
    width: 80px;
    height: 1px;
  }

  .socials {
    gap: 15px;
  }

  .socials a {
    width: 45px;
    height: 45px;
  }
}

/* RESPETO A PREFERENCIAS DE MOVIMIENTO */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}


@media (max-width: 760px) {
  .brand {
    margin-bottom: 30px;
  }

  .brand__logo {
    width: clamp(210px, 72vw, 310px);
  }
}