/* =========================================================
   WARQ.COM
   PORTADA PÚBLICA / LOGIN
   ========================================================= */


/* =========================================================
   01. PÁGINA GENERAL
   ========================================================= */

.auth-page-body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #111;
  color: #20201d;
}

.auth-page-body::before {
  display: none;
}


/* =========================================================
   02. VIDEO DE FONDO
   ========================================================= */

.auth-video-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #111;
}

.auth-video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Oscurecimiento general muy suave */
.auth-video-background::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, .10);
  pointer-events: none;
}


/* =========================================================
   03. CONTENIDO SOBRE EL VIDEO
   ========================================================= */

.auth-page,
.auth-footer,
.auth-page-body > .skip-link {
  position: relative;
  z-index: 2;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, .82fr);
  min-height: calc(100vh - 58px);
}


/* =========================================================
   04. PANEL IZQUIERDO FLOTANTE
   ========================================================= */

.auth-identity {
  position: relative;

  display: flex;
  min-width: 0;

  min-height: 0;
  height: clamp(1100px, 88vh, 900px);
  
  flex-direction: column;
  justify-content: space-between;

  margin:
    clamp(1.3rem, 3vw, 3rem)
    clamp(.8rem, 1.8vw, 2rem)
    clamp(1.3rem, 3vw, 3rem)
    clamp(1.3rem, 4vw, 4.5rem);

  padding:
    clamp(.8rem, 1.5vw, 1.5rem)
    clamp(.5rem, 5vw, 5.5rem);

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 42px;

  background: rgba(15, 15, 14, .40);

  color: #f5f3ec;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, .16),
    inset 0 1px 0 rgba(255, 255, 255, .04);

  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}


/* Cuadrícula arquitectónica */
.auth-identity::before {
  position: absolute;
  inset: 0;

  content: "";
  pointer-events: none;

  opacity: .15;

  background-image:
    linear-gradient(
      90deg,
      transparent 0,
      transparent calc(100% - 1px),
      rgba(240, 211, 141, .55) calc(100% - 1px)
    ),
    linear-gradient(
      0deg,
      transparent 0,
      transparent calc(100% - 1px),
      rgba(240, 211, 141, .55) calc(100% - 1px)
    );

  background-size:
    clamp(5rem, 10vw, 10rem)
    clamp(5rem, 10vw, 10rem);
}


/* Rombo decorativo */
.auth-identity::after {
  position: absolute;

  right: clamp(2rem, 7vw, 7rem);
  bottom: clamp(2.5rem, 7vw, 6rem);

  width: clamp(8rem, 18vw, 16rem);
  aspect-ratio: 1;

  border: 1px solid rgba(228, 184, 81, .55);

  content: "";
  pointer-events: none;

  transform: rotate(45deg);
}


/* Todo el contenido por encima de decoraciones */
.auth-wordmark,
.auth-identity-copy,
.auth-identity-note {
  position: relative;
  z-index: 2;
}


/* =========================================================
   05. LOGO WARQ DORADO
   ========================================================= */

.auth-wordmark {
  display: flex;
  align-items: center;
  gap: 22px;

  width: fit-content;
  max-width: 78%;

  color: inherit;
  text-decoration: none;

  animation: warqLogoBreath 6s ease-in-out infinite;
}

.auth-wordmark-icon {
  display: block;

  width: clamp(105px, 9vw, 155px);
  height: clamp(105px, 9vw, 155px);

  flex: 0 0 auto;
  object-fit: contain;

  filter:
    drop-shadow(0 5px 13px rgba(0, 0, 0, .22))
    drop-shadow(0 0 12px rgba(228, 184, 81, .10));
}

.auth-wordmark-image {
  display: block;

  width: clamp(550px, 30vw, 468px);
  height: auto;

  object-fit: contain;

  filter:
    drop-shadow(0 5px 13px rgba(0, 0, 0, .20))
    drop-shadow(0 0 10px rgba(228, 184, 81, .08));
}

.auth-wordmark:hover {
  opacity: 1;
}


/*
   El logo nunca desaparece por completo.
   Respira visualmente para no distraer.
*/
@keyframes warqLogoBreath {
  0%,
  100% {
    opacity: .60;
  }

  50% {
    opacity: 1;
  }
}


/* =========================================================
   06. TEXTO PRINCIPAL
   ========================================================= */

.auth-identity-copy {
  width: min(100%, 47rem);
  max-width: 47rem;

  margin: auto 0;

  padding:
    clamp(2.5rem, 5vw, 5rem)
    0
    clamp(1.5rem, 3vw, 3rem);
}

.auth-kicker {
  margin: 0 0 1rem;

  color: #d4a83d;

  font-size: .70rem;
  font-weight: 700;

  letter-spacing: .16em;
  line-height: 1.3;
}

.auth-identity h1 {
  max-width: 14ch;

  margin: 0;

  color: #fff;

  font-family: var(--warq-font-display);
  font-size: clamp(2.2rem, 4vw, 4.45rem);
  font-weight: 400;

  letter-spacing: -.045em;
  line-height: 1.04;

  text-shadow: 0 3px 15px rgba(0, 0, 0, .20);
}

.auth-subtitle {
  max-width: 40rem;

  margin: 1.5rem 0 0;

  color: rgba(255, 255, 255, .78);

  font-size: clamp(.95rem, 1.3vw, 1.22rem);
  font-weight: 300;

  line-height: 1.5;
}


/* =========================================================
   07. PROPAGANDA / MÁQUINA DE ESCRIBIR
   ========================================================= */

.auth-dynamic-message {
  display: flex;
  min-height: 3.1rem;
  align-items: center;
  gap: .65rem;

  max-width: 42rem;

  margin-top: 1.65rem;
  padding: .8rem 1rem;

  border-left: 2px solid rgba(228, 184, 81, .85);

  background: rgba(0, 0, 0, .13);

  color: rgba(255, 255, 255, .94);

  font-size: clamp(.78rem, 1vw, .95rem);
  line-height: 1.45;
}

.auth-dynamic-prefix {
  flex: 0 0 auto;

  color: #e4b851;

  font-size: .66rem;
  font-weight: 800;

  letter-spacing: .15em;
}

.auth-typewriter {
  min-width: 0;
}

.auth-typewriter-cursor {
  width: 1px;
  height: 1.1rem;

  flex: 0 0 auto;

  background: #e4b851;

  animation: warqCursorBlink .8s steps(1) infinite;
}

@keyframes warqCursorBlink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0;
  }
}


/* =========================================================
   08. BOTONES DE DESCARGA EN PANEL IZQUIERDO
   ========================================================= */

.auth-download-actions {
  display: grid;

  width: min(100%, 30rem);

  gap: .65rem;

  margin-top: 1.45rem;
}

.auth-download-button {
  display: flex;
  min-height: 3.25rem;

  align-items: center;

  gap: .8rem;

  padding: .65rem 1rem;

  border: 1px solid rgba(242, 202, 101, .75);
  border-radius: 15px;

  background:
    linear-gradient(
      135deg,
      rgba(218, 170, 59, .94),
      rgba(183, 132, 30, .94)
    );

  color: #19160e;

  box-shadow:
    0 7px 18px rgba(0, 0, 0, .15),
    inset 0 1px 0 rgba(255, 245, 196, .50);

  text-decoration: none;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.auth-download-button:hover {
  color: #15120b;

  filter: brightness(1.08);

  transform: translateY(-2px);

  box-shadow:
    0 10px 22px rgba(0, 0, 0, .20),
    inset 0 1px 0 rgba(255, 245, 196, .60);
}

.auth-download-button:focus-visible {
  outline: 2px solid #fff0bd;
  outline-offset: 3px;
}

.auth-download-symbol {
  display: grid;

  width: 1.8rem;
  height: 1.8rem;

  flex: 0 0 auto;

  place-items: center;

  border: 1px solid rgba(30, 24, 10, .30);
  border-radius: 50%;

  font-size: 1rem;
  font-weight: 800;
}

.auth-download-button > span:last-child {
  display: grid;
  min-width: 0;

  gap: .08rem;
}

.auth-download-button strong {
  display: block;

  font-size: .72rem;
  font-weight: 800;

  letter-spacing: .055em;
}

.auth-download-button small {
  display: block;

  color: rgba(25, 22, 14, .72);

  font-size: .65rem;
  font-weight: 500;

  letter-spacing: 0;
}


/* =========================================================
   09. NOTA INFERIOR IZQUIERDA
   ========================================================= */

.auth-identity-note {
  max-width: 32rem;

  margin: 1.25rem 0 0;

  color: rgba(255, 255, 255, .48);

  font-size: .72rem;
  font-weight: 300;

  line-height: 1.55;
}


/* =========================================================
   10. ZONA DERECHA
   ========================================================= */

.auth-access {
  display: grid;

  min-width: 0;

  place-items: center;

  padding:
    clamp(2rem, 5vw, 5rem)
    clamp(1.5rem, 4vw, 4rem);

  background: rgba(238, 237, 233, .32);
}


/* =========================================================
   11. TARJETA LOGIN
   ========================================================= */

.auth-card {
  width: min(100%, 28rem);

  padding: clamp(1.75rem, 3.5vw, 2.7rem);

  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 22px;

  background: rgba(255, 255, 252, .72);

  box-shadow:
    10px 12px 0 rgba(184, 148, 71, .09),
    0 18px 45px rgba(0, 0, 0, .08);

  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}


/* =========================================================
   12. ENCABEZADO LOGIN
   ========================================================= */

.auth-card-heading {
  margin-bottom: 1.75rem;
}

.auth-card-brand {
  display: flex;
  align-items: center;

  gap: .5rem;

  margin-bottom: .5rem;
}

.auth-card-brand img {
  width: 26px;
  height: 26px;

  object-fit: contain;

  filter: drop-shadow(0 2px 5px rgba(116, 77, 4, .18));
}

.auth-card-brand .auth-kicker {
  margin: 0;

  color: #a87817;
}

.auth-card-heading h2 {
  margin: 0;

  color: #20201d;

  font-family: var(--warq-font-display);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 400;

  letter-spacing: -.035em;
}

.auth-card-heading > p:last-child {
  margin: .45rem 0 0;

  color: #66645d;

  font-size: .86rem;
}


/* =========================================================
   13. FORMULARIO
   ========================================================= */

.auth-form {
  max-width: none;
}

.auth-form .errorlist {
  margin: .45rem 0 0;

  color: #963b2c;

  font-size: .76rem;
}

.auth-field + .auth-field {
  margin-top: 1rem;
}

.auth-field label {
  display: block;

  margin: 0 0 .42rem;

  color: #37362f;

  font-size: .76rem;
  font-weight: 600;

  letter-spacing: .015em;
}

.auth-field input {
  box-sizing: border-box;

  width: 100%;
  min-height: 3.1rem;

  padding: .75rem .85rem;

  border: 1px solid rgba(168, 148, 100, .42);
  border-radius: 15px;

  outline: none;

  background: rgba(255, 255, 252, .66);

  color: #20201d;

  font-family: inherit;
  font-size: .94rem;

  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.auth-field input:hover {
  border-color: rgba(184, 148, 71, .60);
}

.auth-field input:focus {
  border-color: #b89447;

  background: rgba(255, 255, 252, .90);

  box-shadow: 0 0 0 3px rgba(184, 148, 71, .15);
}


/* =========================================================
   14. BOTONES DORADOS
   ========================================================= */

.auth-submit,
.auth-register-button,
.auth-social-button {
  box-sizing: border-box;

  width: 100%;
  min-height: 3.15rem;

  justify-content: center;

  border-radius: 15px;

  font-family: inherit;
  font-size: .75rem;
  font-weight: 700;

  letter-spacing: .045em;

  text-decoration: none;

  transition:
    transform .18s ease,
    filter .18s ease,
    box-shadow .18s ease;
}


/* Iniciar sesión */
.auth-submit {
  margin-top: 1.4rem;

  border: 1px solid #c49a3d;

  background:
    linear-gradient(
      135deg,
      #d9ad49,
      #b9892e
    );

  color: #201a0c;

  box-shadow:
    inset 0 1px 0 rgba(255, 239, 182, .50),
    0 6px 14px rgba(121, 83, 14, .10);

  cursor: pointer;
}

.auth-submit:hover {
  border-color: #b58629;

  color: #181308;

  filter: brightness(1.06);

  transform: translateY(-1px);
}


/* =========================================================
   15. RECUPERACIÓN DE CONTRASEÑA
   ========================================================= */

.auth-recovery-link {
  display: block;

  width: fit-content;

  margin: 1rem auto 0;

  color: #686157;

  font-size: .73rem;

  text-underline-offset: .28em;
}

.auth-recovery-link:hover {
  color: #8f681c;
}

.auth-rule {
  height: 1px;

  margin: 1.55rem 0;

  background: rgba(156, 135, 91, .28);
}


/* =========================================================
   16. GOOGLE / FACEBOOK
   ========================================================= */

.auth-social-actions {
  display: grid;

  gap: .65rem;
}

.auth-social-button {
  position: relative;

  display: inline-flex;

  align-items: center;

  border: 1px solid rgba(190, 148, 52, .68);

  background:
    linear-gradient(
      135deg,
      rgba(230, 189, 91, .32),
      rgba(198, 147, 41, .23)
    );

  color: #40361f;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .40);
}

.auth-social-button:hover {
  border-color: rgba(181, 132, 32, .90);

  background:
    linear-gradient(
      135deg,
      rgba(230, 189, 91, .48),
      rgba(198, 147, 41, .36)
    );

  color: #292113;

  transform: translateY(-1px);
}

.auth-social-mark {
  position: absolute;

  left: .9rem;

  display: grid;

  width: 1.45rem;
  height: 1.45rem;

  place-items: center;

  border: 1px solid rgba(137, 97, 22, .65);
  border-radius: 50%;

  background: rgba(255, 255, 255, .35);

  font-family: Arial, sans-serif;
  font-size: .80rem;
  font-weight: 700;

  letter-spacing: 0;
}

.auth-social-mark-google {
  color: #8c6420;
}

.auth-social-mark-facebook {
  color: #8c6420;
}

.auth-social-note {
  margin: .75rem 0 0;

  color: #827d72;

  font-size: .67rem;

  line-height: 1.45;

  text-align: center;
}


/* =========================================================
   17. SEPARADOR
   ========================================================= */

.auth-or {
  display: flex;

  align-items: center;

  gap: .8rem;

  margin: 1.45rem 0;

  color: #9b8b66;

  font-size: .70rem;

  text-align: center;
}

.auth-or::before,
.auth-or::after {
  flex: 1;

  height: 1px;

  background: rgba(159, 137, 90, .30);

  content: "";
}


/* =========================================================
   18. CREAR CUENTA
   ========================================================= */

.auth-register-button {
  display: inline-flex;

  align-items: center;

  border: 1px solid #b98b2e;

  background:
    linear-gradient(
      135deg,
      rgba(220, 174, 69, .92),
      rgba(184, 132, 32, .92)
    );

  color: #1e180c;

  box-shadow:
    inset 0 1px 0 rgba(255, 240, 187, .45),
    0 5px 12px rgba(121, 83, 14, .08);
}

.auth-register-button:hover {
  border-color: #a97921;

  color: #171208;

  filter: brightness(1.06);

  transform: translateY(-1px);
}


/* =========================================================
   19. CONTROL DE SONIDO
   Discreto y escondido en esquina inferior derecha
   ========================================================= */

.auth-sound-toggle {
  position: fixed;

  right: 12px;
  bottom: 12px;

  z-index: 50;

  display: grid;

  width: 29px;
  height: 29px;

  place-items: center;

  padding: 0;

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;

  background: rgba(18, 18, 17, .20);

  color: rgba(255, 255, 255, .48);

  cursor: pointer;

  opacity: .38;

  box-shadow: none;

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  transition:
    opacity .20s ease,
    background .20s ease,
    color .20s ease,
    transform .20s ease;
}

.auth-sound-toggle:hover {
  background: rgba(18, 18, 17, .60);

  color: rgba(255, 255, 255, .95);

  opacity: 1;

  transform: scale(1.05);
}

.auth-sound-toggle:focus-visible {
  outline: 1px solid rgba(228, 184, 81, .85);
  outline-offset: 2px;

  opacity: 1;
}

.auth-sound-toggle[aria-pressed="true"] {
  color: rgba(228, 184, 81, .70);
}

.auth-sound-icon {
  display: block;

  font-family: Arial, sans-serif;
  font-size: .72rem;
  font-weight: 400;

  line-height: 1;
}


/* =========================================================
   20. FOOTER
   ========================================================= */

.auth-footer {
  display: flex;

  min-height: 58px;

  align-items: center;
  justify-content: space-between;

  gap: 1.25rem;

  padding:
    .9rem
    clamp(1.25rem, 4vw, 4rem);

  border-top: 1px solid rgba(255, 255, 255, .18);

  background: rgba(247, 246, 241, .74);

  color: #69665e;

  font-size: .66rem;

  letter-spacing: .035em;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-footer nav {
  display: flex;

  flex-wrap: wrap;

  gap: .65rem 1.1rem;
}

.auth-footer a {
  color: #4c4a43;

  text-decoration: none;
}

.auth-footer a:hover {
  color: #8d671e;

  text-decoration: underline;

  text-underline-offset: .25em;
}

.auth-footer small {
  color: inherit;

  font-size: inherit;

  white-space: nowrap;
}


/* =========================================================
   21. RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

  .auth-page {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(360px, .78fr);
  }

  .auth-identity {
    margin:
      1.25rem
      .7rem
      1.25rem
      1.25rem;

    padding:
      clamp(2rem, 4vw, 3.5rem);
  }

  .auth-identity h1 {
    font-size: clamp(2rem, 4.6vw, 3.6rem);
  }

  .auth-access {
    padding:
      2rem
      1.5rem;
  }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 860px) {

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-identity {
    min-height: 620px;

    margin:
      1rem
      1rem
      .5rem;

    padding:
      clamp(2rem, 7vw, 4rem);

    border-radius: 32px;
  }

  .auth-wordmark {
    width: clamp(170px, 36vw, 270px);
    max-width: 60%;
  }

  .auth-identity-copy {
    margin: 0;

    padding:
      clamp(3rem, 8vw, 5rem)
      0
      2rem;
  }

  .auth-identity h1 {
    max-width: 18ch;
  }

  .auth-download-actions {
    width: min(100%, 29rem);
  }

  .auth-access {
    padding:
      2rem
      1.25rem
      3rem;

    background: rgba(238, 237, 233, .25);
  }

  .auth-card {
    width: min(100%, 30rem);
  }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 520px) {

  .auth-video-background::after {
    background: rgba(0, 0, 0, .18);
  }

  .auth-identity {
    min-height: 590px;

    margin:
      .65rem
      .65rem
      .4rem;

    padding:
      1.5rem;

    border-radius: 25px;
  }

  .auth-wordmark {
    width: 180px;
    max-width: 68%;
  }

  .auth-identity-copy {
    padding:
      3rem
      0
      1.5rem;
  }

  .auth-identity h1 {
    max-width: 16ch;

    font-size: clamp(1.9rem, 10vw, 2.8rem);
  }

  .auth-subtitle {
    font-size: .92rem;
  }

  .auth-dynamic-message {
    align-items: flex-start;

    min-height: 4rem;

    padding: .7rem .8rem;

    font-size: .76rem;
  }

  .auth-dynamic-prefix {
    display: none;
  }

  .auth-download-actions {
    margin-top: 1rem;
  }

  .auth-download-button {
    min-height: 3.15rem;

    border-radius: 13px;
  }

  .auth-download-button strong {
    font-size: .66rem;
  }

  .auth-download-button small {
    font-size: .60rem;
  }

  .auth-identity-note {
    display: none;
  }

  .auth-identity::after {
    right: -3rem;
    bottom: 3rem;

    opacity: .55;
  }

  .auth-access {
    padding:
      1.25rem
      .9rem
      2rem;
  }

  .auth-card {
    padding:
      1.5rem
      1.25rem;

    border-radius: 20px;

    box-shadow:
      6px 7px 0 rgba(184, 148, 71, .08),
      0 15px 35px rgba(0, 0, 0, .07);
  }

  .auth-footer {
    align-items: flex-start;

    flex-direction: column;

    gap: .85rem;

    padding: 1.2rem;
  }

  .auth-sound-toggle {
    right: 8px;
    bottom: 8px;

    width: 27px;
    height: 27px;
  }

}


/* =========================================================
   22. ACCESIBILIDAD / REDUCIR MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .auth-wordmark,
  .auth-typewriter-cursor {
    animation: none;
  }

  .auth-wordmark {
    opacity: 1;
  }

  .auth-submit,
  .auth-register-button,
  .auth-social-button,
  .auth-download-button,
  .auth-sound-toggle {
    transition: none;
  }

}