/* Pantalla de inicio de sesión: foto de la plaza translúcida, capas animadas y tarjeta de cristal. */

/* La pantalla ocupa todo el alto y el menú desaparece */
body.out .app {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  min-height: 100vh;
  min-height: 100dvh;
}
body.out .ct {
  padding: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}
body.out #v {
  width: 100%;
  padding: 24px 16px;
}

/* ---------- Fondo: foto + tinte con los colores del logo ---------- */
.fondo-login {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #04051a;
  transition:
    opacity 0.7s ease,
    visibility 0s linear 0.7s;
}
body.out .fondo-login {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease;
}
body.out .app {
  position: relative;
  z-index: 1;
}
.fondo-login .foto {
  position: absolute;
  inset: -6%;
  background: url("../assets/fachada-plaza.jpg") center 30% / cover no-repeat;
  opacity: 0.55;
  filter: blur(2px) saturate(1.1);
  animation: zoomLento 28s ease-in-out infinite alternate;
}
.fondo-login .tinte {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 560px at 8% -8%,
      rgba(253, 182, 0, 0.3),
      transparent 60%
    ),
    radial-gradient(
      800px 560px at 100% 105%,
      rgba(255, 93, 23, 0.34),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(8, 10, 40, 0.5), rgba(8, 10, 40, 0.82));
}
@keyframes zoomLento {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.5%, -2%, 0);
  }
}

/* Destellos de luz que flotan */
.fondo-login .luz {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: flotarLuz 14s ease-in-out infinite alternate;
}
.fondo-login .l1 {
  width: 340px;
  height: 340px;
  left: 6%;
  top: 14%;
  background: var(--ac);
}
.fondo-login .l2 {
  width: 300px;
  height: 300px;
  right: 8%;
  bottom: 10%;
  background: var(--or);
  animation-duration: 18s;
  animation-delay: -6s;
}
.fondo-login .l3 {
  width: 260px;
  height: 260px;
  right: 30%;
  top: -6%;
  background: #4a4fe0;
  animation-duration: 22s;
  animation-delay: -10s;
}
@keyframes flotarLuz {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(60px, -50px, 0) scale(1.25);
  }
}

/* Partículas que suben despacio */
.fondo-login .pt {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--ac);
  opacity: 0;
  box-shadow: 0 0 10px 2px rgba(253, 182, 0, 0.55);
  animation: subirPt var(--t) linear infinite;
  animation-delay: var(--w);
}
@keyframes subirPt {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-105vh) translateX(var(--dx));
    opacity: 0;
  }
}

/* ---------- Tarjeta de cristal ---------- */
@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.lgc {
  position: relative;
  max-width: 390px;
  margin: 0 auto;
  padding: 26px 26px 24px;
  border-radius: 20px;
  background: rgba(14, 17, 52, 0.58);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: entraTarjeta 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
/* Borde con un destello que da la vuelta */
.lgc::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--ang),
    rgba(255, 255, 255, 0.12),
    var(--ac) 12%,
    var(--or) 22%,
    rgba(255, 255, 255, 0.12) 36%,
    rgba(255, 255, 255, 0.12)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
  animation: girarBorde 6s linear infinite;
  pointer-events: none;
}
@keyframes girarBorde {
  to {
    --ang: 360deg;
  }
}
@keyframes entraTarjeta {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.lgc.sale {
  animation: saleTarjeta 0.38s ease forwards;
}
@keyframes saleTarjeta {
  to {
    opacity: 0;
    transform: translateY(-18px) scale(1.06);
    filter: blur(6px);
  }
}
.lgc.tiembla {
  animation: tiembla 0.45s ease;
}
@keyframes tiembla {
  20%,
  60% {
    transform: translateX(-9px);
  }
  40%,
  80% {
    transform: translateX(9px);
  }
}

/* Contenido: aparece pieza por pieza */
.lgc > * {
  animation: subir 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(0.25s + var(--i, 0) * 70ms);
}
.lgc .lg.big {
  height: 128px;
  margin: 0 auto 12px;
  animation:
    subir 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s backwards,
    flotaLogo 5s ease-in-out 0.9s infinite;
}
@keyframes flotaLogo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
.lgc h3 {
  font-size: 22px;
  margin: 6px 0 4px;
  text-align: center;
}
.lgc .eyebrow,
.lgc .sub {
  text-align: center;
}
.lgc label {
  color: #b9bde6;
}
.lgc input {
  background: rgba(28, 32, 80, 0.7);
  border-color: rgba(255, 255, 255, 0.14);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.lgc input:focus {
  outline: 0;
  border-color: var(--ac);
  background: rgba(28, 32, 80, 0.95);
  box-shadow: 0 0 0 3px rgba(253, 182, 0, 0.22);
}
.lgc #le:not(:empty) {
  animation: aparece 0.3s ease;
}

/* Botón con brillo que lo recorre */
.lgc .btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  box-shadow: 0 8px 22px rgba(253, 182, 0, 0.3);
}
.lgc .btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  transform: skewX(-18deg);
  animation: brillo 3.6s ease-in-out 1.6s infinite;
}
@keyframes brillo {
  0%,
  55% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}

@media (max-width: 480px) {
  .lgc {
    padding: 22px 18px 20px;
  }
  .fondo-login .luz {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fondo-login .foto,
  .fondo-login .luz,
  .fondo-login .pt,
  .lgc::before,
  .lgc .btn::after {
    animation: none !important;
  }
  .fondo-login .pt {
    display: none;
  }
}

.lgc .olv {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--mu);
  text-decoration: none;
  transition: color 0.2s ease;
}
.lgc .olv:hover {
  color: var(--ac);
  text-decoration: underline;
}
