/*
 * Pantalla de acceso (rediseño de octubre de 2026).
 *
 * Es la puerta del portal de los clientes: tiene que sentirse como el
 * sitio. A la izquierda, una banda oscura con la huella de la marca que se
 * dibuja al entrar; a la derecha, el fondo crema cálido con el formulario
 * nativo de WordPress en una tarjeta blanca. La autenticación no cambia.
 */

:root {
  --t-oscuro:     #1E150F;
  --t-crema:      #FCFAF7;
  --t-tinta:      #241C15;
  --t-tinta-media:#4C4038;
  --t-apagado:    #6C6257;
  --t-tenue:      #837969;
  --t-borde:      rgba(36, 28, 21, 0.12);
  --t-naranja:    #E8590C;
  --t-naranja-claro: #F37331;
  --t-naranja-tex:#B8430A;
  --t-ambar:      #F2A100;
  --t-durazno:    #FCD8BE;
  --t-salida:     cubic-bezier(0.16, 1, 0.3, 1);

  /* Botón de Google: blanco con texto oscuro, como piden sus pautas. */
  --t-google-fondo: #FFFFFF;
  --t-google-texto: #1F1F1F;

  /* El mismo grano fino del sitio, oscuro para el crema y claro para la
     banda oscura. */
  --t-grano-oscuro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .14 0 0 0 0 .1 0 0 0 0 .06 0 0 0 .2 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --t-grano-claro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .96 0 0 0 0 .9 0 0 0 .22 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ─────────── Estructura de dos columnas ─────────── */
/*
 * WordPress deja tres bloques sueltos como hijos del body: la columna
 * que inyectamos, su propio #login, y el pie con la nota. Se ubican con
 * filas y columnas explícitas; las dos filas de 1fr, arriba y abajo,
 * centran vertical la columna derecha.
 */
body.login {
  background:
    var(--t-grano-oscuro),
    radial-gradient(48vw 48vw at 92% 4%, rgba(243, 115, 49, 0.16), transparent 62%),
    radial-gradient(40vw 40vw at 60% 108%, rgba(255, 216, 190, 0.5), transparent 66%),
    var(--t-crema);
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--t-tinta);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  -webkit-font-smoothing: antialiased;
}

.thera-acceso    { grid-column: 1; grid-row: 1 / -1; }
body.login #login       { grid-column: 2; grid-row: 2; }
body.login .thera-login-pie { grid-column: 2; grid-row: 3; }

body.login #login {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 42px 40px 36px;
  box-sizing: border-box;
  justify-self: center;
  align-self: end;
  background: #FFFFFF;
  border: 1px solid rgba(36, 28, 21, 0.07);
  border-radius: 26px;
  box-shadow:
    0 1px 2px rgba(36, 28, 21, 0.04),
    0 14px 30px -16px rgba(70, 38, 14, 0.18),
    0 44px 80px -40px rgba(70, 38, 14, 0.35);
}

/* El h1 del logo nativo estorba en este diseño: la marca ya está en la
   columna izquierda. */
body.login #login h1 { display: none; }

/* ─────────── Columna izquierda: la banda oscura ─────────── */
.thera-acceso {
  margin: 18px 0 18px 18px;
  border-radius: 30px;
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  color: #FFFFFF;
  background:
    var(--t-grano-claro),
    radial-gradient(70% 60% at 100% 0%, rgba(232, 89, 12, 0.5), transparent 66%),
    radial-gradient(60% 50% at -10% 110%, rgba(242, 161, 0, 0.22), transparent 70%),
    linear-gradient(165deg, #241911 0%, #150E09 100%);
  box-shadow: 0 40px 80px -40px rgba(46, 24, 8, 0.6);
  /* clip y no hidden: hidden convierte la columna en un área con
     desplazamiento propio, y en el celular su alto contaba como cero. */
  overflow: hidden;
  overflow: clip;
}
.thera-acceso > * { position: relative; z-index: 1; }

/* Luz que sigue al mouse (activos/login.js): un brillo ámbar suave en la
   banda y un borde que se enciende cerca del cursor en cada tarjeta. */
.thera-acceso::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.6s var(--t-salida);
  background: radial-gradient(520px circle at var(--t-mx, 50%) var(--t-my, 50%), rgba(242, 161, 0, 0.12), transparent 62%);
}
.thera-acceso__destacados li::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  opacity: 0; transition: opacity 0.6s var(--t-salida);
  background: radial-gradient(220px circle at var(--t-mx, 50%) var(--t-my, 50%), rgba(255, 186, 70, 0.75), transparent 70%) border-box;
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.thera-acceso.es-con-mouse::before,
.thera-acceso.es-con-mouse .thera-acceso__destacados li::after { opacity: 1; }

/* La huella, grande y detrás del texto. */
.thera-acceso > .thera-acceso__huella {
  position: absolute; z-index: 0;
  right: -12%; bottom: -6%;
  width: min(78%, 560px); height: auto;
  overflow: visible; pointer-events: none;
  opacity: 0.22;
}
.thera-acceso__huella path { fill: none; stroke: var(--t-naranja-claro); stroke-width: 19; stroke-linecap: round; }

.thera-acceso__marca img { display: block; height: auto; }

.thera-acceso__rotulo {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-durazno);
  margin-bottom: 20px;
}
.thera-acceso__rotulo::after { content: ""; width: 56px; height: 1px; background: rgba(255, 255, 255, 0.22); }

.thera-acceso__titular {
  margin: 0 0 24px;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 300;
  color: #FFFFFF;
}
.thera-acceso__titular span { display: block; }
.thera-acceso__titular span + span { font-weight: 800; color: var(--t-naranja-claro); }

.thera-acceso__texto {
  margin: 0;
  max-width: 40ch;
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(255, 247, 240, 0.72);
}

.thera-acceso__destacados {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.thera-acceso__destacados li {
  position: relative;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.thera-acceso__icono {
  width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--t-ambar);
  background: linear-gradient(160deg, rgba(242, 161, 0, 0.26) 0%, rgba(242, 161, 0, 0.08) 100%);
  border: 1px solid rgba(242, 161, 0, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.35), inset 0 -3px 6px rgba(0, 0, 0, 0.25), 0 10px 18px -10px rgba(0, 0, 0, 0.6);
}
.thera-acceso__icono svg { filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, 0.18)); }
.thera-acceso__destacados strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}
.thera-acceso__destacados .thera-acceso__detalle {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 247, 240, 0.62);
}

/* ─────────── Formulario ─────────── */
body.login form {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.thera-login-intro { order: -1; margin-bottom: 24px; }
.thera-login-intro h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--t-tinta);
}
.thera-login-intro p { margin: 0; font-size: 14.5px; color: var(--t-apagado); }

/* Entrar con Google: debajo del título y antes del correo. */
.thera-google { order: -1; margin-bottom: 4px; }
.thera-google__boton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--t-google-fondo);
  border: 1px solid rgba(36, 28, 21, 0.14);
  color: var(--t-google-texto);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px -14px rgba(70, 38, 14, 0.5);
  transition: translate 0.5s var(--t-salida), box-shadow 0.4s var(--t-salida), border-color 0.3s;
}
body.login .thera-google__boton:hover,
body.login .thera-google__boton:focus { color: var(--t-google-texto); translate: 0 -2px; border-color: rgba(36, 28, 21, 0.22); box-shadow: 0 16px 28px -16px rgba(70, 38, 14, 0.5); }
.thera-google__o {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  font-size: 12px;
  color: var(--t-tenue);
}
.thera-google__o::before,
.thera-google__o::after { content: ""; flex: 1; height: 1px; background: var(--t-borde); }

body.login label {
  color: var(--t-apagado);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.login input[type="text"],
body.login input[type="password"] {
  background: #FBF8F5;
  border: 1px solid rgba(36, 28, 21, 0.14);
  border-radius: 13px;
  color: var(--t-tinta);
  font-family: inherit;
  font-size: 15px;
  padding: 13px 15px;
  box-shadow: none;
  margin: 8px 0 18px;
  width: 100%;
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
body.login input::placeholder { color: var(--t-tenue); }
body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
  background: #FFFFFF;
  border-color: var(--t-naranja);
  box-shadow: 0 0 0 4px rgba(232, 89, 12, 0.14);
  outline: none;
}

/* El botón de "mostrar contraseña" que agrega WordPress dentro del campo. */
body.login .wp-pwd button.wp-hide-pw {
  background: none;
  border: none;
  color: var(--t-tenue);
}
body.login .wp-pwd button.wp-hide-pw:hover { color: var(--t-naranja); }
body.login .wp-pwd .dashicons { color: inherit; }

/* "Recuérdame" y "¿Olvidaste la contraseña?" en la misma línea. */
body.login .forgetmenot {
  float: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
body.login .forgetmenot label {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--t-tinta-media);
}
body.login input[type="checkbox"] { border-color: rgba(36, 28, 21, 0.3); border-radius: 5px; }
body.login input[type="checkbox"]:checked::before { filter: hue-rotate(160deg) saturate(3); }
/* "¿Has olvidado tu contraseña?" y "Ir a Huella Digital" quedan debajo
   de la tarjeta del formulario, centrados y con aire. */
body.login #nav {
  display: block;
  float: none;
  margin: 18px 0 0;
  padding: 0;
  text-align: center;
}
body.login #nav a { color: var(--t-naranja-tex); font-size: 13.5px; font-weight: 600; text-decoration: none; }
body.login #nav a:hover { color: var(--t-naranja); }

body.login .submit { clear: both; }
/* El botón principal, como los del sitio: degradado naranja y una luz que
   lo cruza al pasar el mouse. */
body.login .button.button-primary {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(135deg, var(--t-naranja-claro), var(--t-naranja));
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  height: auto;
  line-height: 1.4;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-shadow: none;
  box-shadow: 0 16px 28px -14px rgba(232, 89, 12, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: translate 0.5s var(--t-salida), box-shadow 0.4s var(--t-salida);
}
body.login .button.button-primary:hover,
body.login .button.button-primary:focus {
  background: linear-gradient(135deg, var(--t-naranja-claro), var(--t-naranja));
  translate: 0 -2px;
  box-shadow: 0 22px 34px -14px rgba(232, 89, 12, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* wp-login pinta un halo azul al recibir foco. Se apaga en el foco por
   clic; con teclado queda un foco sobrio. */
body.login :where( .button, a ):focus { box-shadow: none; outline: none; }
body.login :where( .button, a ):focus-visible {
  outline: 3px solid var(--t-naranja);
  outline-offset: 3px;
}

/* ─────────── Pie ─────────── */
.thera-login-pie {
  width: 100%;
  max-width: 440px;
  margin: 22px 0 0;
  padding: 0 40px;
  box-sizing: border-box;
  justify-self: center;
  align-self: start;
}
.thera-login-pie__nota {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--t-tenue);
  text-align: center;
}
.thera-login-pie__nota a { color: var(--t-naranja-tex); font-weight: 600; text-decoration: none; }

/* ─────────── Mensajes ─────────── */
body.login .message,
body.login #login_error,
body.login .notice {
  background: #FFF6EF;
  border: 1px solid rgba(232, 89, 12, 0.2);
  border-left: 4px solid var(--t-naranja);
  border-radius: 12px;
  color: var(--t-tinta);
  box-shadow: none;
  font-size: 13.5px;
  margin-bottom: 18px;
}

body.login #backtoblog { text-align: center; margin: 10px 0 0; padding: 0; }
body.login #backtoblog a { color: var(--t-tenue); font-size: 12.5px; text-decoration: none; }
body.login #backtoblog a:hover { color: var(--t-naranja); }

body.login .language-switcher,
body.login .privacy-policy-page-link { display: none; }

/* ─────────── Entrada ───────────
   La huella se dibuja, el titular sube y la tarjeta llega desde abajo. */
@media (prefers-reduced-motion: no-preference) {
  .thera-acceso__huella path {
    stroke-dasharray: 1 1.2;
    stroke-dashoffset: 1.1;
    animation: thera-trazo 2.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
  }
  .thera-acceso__huella path:nth-child(2) { animation-delay: 0.38s; }
  .thera-acceso__huella path:nth-child(3) { animation-delay: 0.56s; }
  .thera-acceso__marca, .thera-acceso__rotulo, .thera-acceso__texto { animation: thera-subir 1.1s var(--t-salida) both; }
  .thera-acceso__rotulo { animation-delay: 0.1s; }
  .thera-acceso__titular span { animation: thera-subir 1.3s var(--t-salida) both; }
  .thera-acceso__titular span:nth-child(1) { animation-delay: 0.18s; }
  .thera-acceso__titular span:nth-child(2) { animation-delay: 0.3s; }
  .thera-acceso__texto { animation-delay: 0.45s; }
  .thera-acceso__destacados li { animation: thera-subir 1.1s var(--t-salida) both; }
  .thera-acceso__destacados li:nth-child(1) { animation-delay: 0.6s; }
  .thera-acceso__destacados li:nth-child(2) { animation-delay: 0.7s; }
  .thera-acceso__destacados li:nth-child(3) { animation-delay: 0.8s; }
  body.login #login { animation: thera-tarjeta 1.3s var(--t-salida) 0.25s both; }
  body.login .thera-login-pie { animation: thera-subir 1.1s var(--t-salida) 0.6s both; }
  body.login .button.button-primary::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.4) 50%, transparent 65%);
    transform: translateX(-110%);
  }
  body.login .button.button-primary:hover::after { transform: translateX(110%); transition: transform 0.9s var(--t-salida); }
}
@keyframes thera-trazo { to { stroke-dashoffset: 0; } }
@keyframes thera-subir { from { opacity: 0; transform: translateY(18px); } }
@keyframes thera-tarjeta { from { opacity: 0; transform: translateY(34px) scale(0.98); } }

/* ─────────── Pantallas chicas ─────────── */
@media (max-width: 900px) {
  body.login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .thera-acceso {
    grid-column: 1;
    grid-row: 1;
    margin: 12px 12px 0;
    border-radius: 24px;
    padding: 32px 24px;
    gap: 28px;
  }
  .thera-acceso__destacados { grid-template-columns: 1fr; gap: 8px; }
  body.login #login {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    margin: 20px 12px 0;
    padding: 30px 22px;
    align-self: start;
    justify-self: stretch;
    max-width: none;
  }
  body.login .thera-login-pie { grid-column: 1; grid-row: 3; padding: 20px 24px 36px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ─────────── Thera te ayuda adentro (2026-10-08) ───────────
   Cuarta tarjeta: Thera, chiquita y animada, se asoma por arriba. Los
   cuadros del saludo (activos/thera-saludo/) los mueve activos/login.js.
   Ocupa una fila entera porque con cuatro columnas los textos quedaban
   apretados. Sobre lo oscuro lleva una luz cálida detrás: sin ella, las
   puntas crema del pelo se ven como un borde. Reemplazó a una Thera grande
   al lado del formulario, que a David no le gustó. */
.thera-acceso__destacados li.thera-acceso__thera {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 14px 18px; margin-top: 54px;
}
.thera-acceso__thera canvas {
  flex: none; width: 96px; height: auto; aspect-ratio: 190 / 258; margin: -64px 0 -10px;
  /* El video original corta la punta de la cola: el borde derecho se desvanece. */
  -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 84%, transparent 100%);
}
.thera-acceso__thera::before {
  content: ""; position: absolute; left: -10px; top: -70px; width: 140px; height: 150px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 196, 150, 0.28), transparent);
}
.thera-acceso__thera > div { min-width: 0; }
.thera-acceso__thera .thera-acceso__detalle { margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .thera-acceso__destacados li:nth-child(4) { animation-delay: 0.9s; }
}
