body {
  display: grid;
  place-items: center;
  margin: 0;
  height: 100vh;
  background: #00016B;
  font-family: "Euclid Circular A", "Poppins";
  color: #f9f8fa;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

:root {
  --color-primary: #FD7C14;
  --color-muted: #86BE00;
  --color-texto: #d1cece;
}

.background {
  position: fixed;
  z-index: -1;
  top: 70%;
  left: 50%;
  right: 0;
  bottom: -70vh;
  translate: -50% 0;
  width: 150vw;
}

svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleY(3) scaleX(2.25);
  transform-origin: bottom;
  box-sizing: border-box;
  display: block;
  pointer-events: none;
}

.login {
  position: relative;
  z-index: 2;
  background: rgba(131, 131, 131, 0.25);
  backdrop-filter: blur(40px);
  box-shadow: 0 40px 30px rgb(0 0 0 / 10%);
  border-radius: 20px;
  padding: 40px 32px 30px;
  width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.login img {
  width: 240px;
  margin: 0 0 32px;
}

.login :is(h2, h3) {
  font-weight: 500;
}

.login h2 {
  font-size: 24px;
  margin: 0 0 6px;
}

.login h3 {
  color: var(--color-texto);
  font-size: 12px;
  margin:0 0 30px;

}

.login form {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 0 0 32px;
}

.login :is(input, button) {
  height: 56px;
  font-family: inherit;
  font-size: 16px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
}

.login .textbox {
  position: relative;
}

label,
input {
  transition: 0.3s;
}

.textbox label {
  position: absolute;
  top: 50%;
  left: 16px;
  translate: 0 -50%;
  transform-origin: 0 50%;
  pointer-events: none;
  color: var(--color-texto);
}

.textbox input {
  width: 100%;
  padding-top: 10px;
  background: #00016b;
  outline: none;
  color: inherit;
  box-shadow: 0 0 0 2px transparent;
}

.textbox input:focus {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.textbox input:is(:focus, :not(:invalid)) ~ label {
  scale: 0.725;
  translate: 0 -112%;
}

.login button {
  position: relative;
  color: #f9f9f9;
  font-size: 17px;
  background: var(--color-primary);
  cursor: pointer;
}

.login :is(button span, button p) {
  transition: 0.3s;
}

.login button span {
  position: absolute;
  top: 52%;
  left: 58%;
  translate: 10px -50%;
  opacity: 0;
  font-size: 22px;
}

.login button:hover p {
  translate: -10px 0;
}

.login button:hover span {
  opacity: 1;
  translate: 20px -50%;
}

.login a {
  font-size: 15px;
  color: var(--color-primary);
}

.login > p {
  margin: 56px 0 0;
  font-size: 15px;
  color: var(--color-texto);
}



@media (max-width: 767px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    min-height: 100vh;  /* asegura ocupar toda la pantalla */
    height: auto;
  }

  .login {
    width: 90%;              /* que use casi toda la pantalla */
    max-width: 420px;        /* no se pase en tablets */
    padding: 28px 20px;      /* ajustamos padding */
    border-radius: 16px;
    margin: auto;
  }

  .login img {
    width: 160px;            /* logo proporcional */
    margin: 0 0 20px;
  }

  .login h2 {
    font-size: 22px;
  }

  .login h3 {
    font-size: 12px;
    margin-bottom: 18px;
  }

  .login :is(input, button) {
    height: 52px;
    font-size: 16px;
  }

  .login > p {
    font-size: 13px;
    margin-top: 28px;
  }
}





.wrapper {
  position: relative;
  width: 250px;   /* Ajusta al tamaño de tu logo */
  height: 60px;  /* Ajusta al tamaño de tu logo */
  overflow: hidden;
  margin-bottom: 50px;
  margin-top: 20px;
}

.item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  animation: fade 16s infinite;
}

.item:nth-child(1) { animation-delay: 0s; }
.item:nth-child(2) { animation-delay: 4s; }
.item:nth-child(3) { animation-delay: 8s; }
.item:nth-child(4) { animation-delay: 12s; }

@keyframes fade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  25%  { opacity: 1; }
  30%  { opacity: 0; }
  100% { opacity: 0; }
}

.item img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
}


@media (max-width: 767px) {
  .wrapper {
    width: 250px;   /* más compacto */
    height: 70px;
    margin-bottom: 0px;
    margin-top: 0px;
  }

  .item img {
    max-width: 100%;
    height: auto;
  }

  /* Opcional: aceleramos un poco la animación en móviles */
  .item {
    animation: fade 12s infinite;
  }

  .item:nth-child(1) { animation-delay: 0s; }
  .item:nth-child(2) { animation-delay: 3s; }
  .item:nth-child(3) { animation-delay: 6s; }
  .item:nth-child(4) { animation-delay: 9s; }
}