:root {
  --navy: #192848;
  --navy-dark: #0f192e;
  --navy-light: #243963;
  --slate: #94a3b8;
  --gold: #d4af37;
  --gold-bright: #fde68a;
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.18);
  --amber-border: rgba(245, 158, 11, 0.45);
  --white: #ffffff;
  --glass-bg: rgba(15, 25, 46, 0.78);
  --glass-dev-bg: rgba(15, 25, 46, 0.72);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--white);
}

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--navy-dark);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(
      180deg,
      rgba(15, 25, 46, 0.58) 0%,
      rgba(15, 25, 46, 0.36) 50%,
      rgba(15, 25, 46, 0.72) 100%
    ),
    url("imag/fondo_nva_imagen.png");
  background-size: cover;
  background-position: center 70%;
  background-repeat: no-repeat;
  transform: scale(1.12);
  transform-origin: center bottom;
}

.header {
  width: 100%;
  padding: 28px 24px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header img {
  height: 105px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.intro {
  text-align: center;
  margin-bottom: 36px;
}

.intro h1 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  margin-bottom: 8px;
}

.intro p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
}

@property --gold-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes spinGold {
  from {
    --gold-angle: 0deg;
  }
  to {
    --gold-angle: 360deg;
  }
}

.portal-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  padding: 36px 28px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--white);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
  transition: transform 0.28s ease, box-shadow 0.28s ease, background-color 0.28s ease;
  cursor: pointer;
  font-family: inherit;
}

.portal-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 20px;
  background: conic-gradient(
    from var(--gold-angle),
    rgba(255, 255, 255, 0.16) 0deg 235deg,
    rgba(212, 175, 55, 0.55) 265deg,
    var(--gold) 305deg,
    var(--gold-bright) 335deg,
    var(--gold) 350deg,
    rgba(255, 255, 255, 0.16) 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: spinGold 4.5s linear infinite;
  pointer-events: none;
}

.portal-btn > * {
  position: relative;
  z-index: 1;
}

.portal-btn:hover,
.portal-btn:focus-visible {
  transform: translateY(-7px) scale(1.015);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.52);
  outline: none;
}

.portal-btn--active:hover,
.portal-btn--active:focus-visible {
  background: rgba(25, 40, 72, 0.9);
}

.portal-btn--active:active {
  transform: translateY(-2px) scale(1.005);
}

.portal-btn--dev {
  background: var(--glass-dev-bg);
  cursor: not-allowed;
}

.portal-btn--dev::before {
  animation-duration: 6.5s;
  opacity: 0.8;
}

.portal-btn--dev:hover,
.portal-btn--dev:focus-visible {
  background: rgba(15, 25, 46, 0.84);
}

.btn-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.28s ease, background-color 0.28s ease, border-color 0.28s ease;
}

.portal-btn--active .btn-icon {
  background: rgba(255, 255, 255, 0.16);
}

.portal-btn:hover .btn-icon {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-title {
  font-size: clamp(1.15rem, 1.8vw, 1.38rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.portal-btn--active:hover .btn-action {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(2px);
}

.badge-dev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: #fcd34d;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 25, 46, 0.94);
  border: 1px solid var(--amber-border);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.footer {
  text-align: center;
  padding: 16px 24px 22px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}

@media (max-width: 720px) {
  .buttons-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portal-btn {
    min-height: 175px;
    padding: 28px 22px;
  }

  .header img {
    height: 76px;
  }
}
