/* Simplified login — art does the selling, text gets out of the way */

/* ── Staggered entrance keyframes ────────────────────────── */

@keyframes login-content-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes login-privacy-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 0.78; transform: translateY(0); }
}

@keyframes login-hero-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes login-logo-in {
  0%   { opacity: 0; transform: scale(0.8) translateY(12px); }
  70%  { opacity: 1; transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes login-cta-glow {
  0%   { box-shadow: 0 0 0 0 rgba(167, 242, 120, 0); }
  50%  { box-shadow: 0 0 18px 4px rgba(167, 242, 120, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(167, 242, 120, 0); }
}

:root {
  --provider-twitch: #9d61ff;
  --provider-twitch-dark: #7236d8;
  --provider-kick: #a7f278;
  --provider-kick-dark: #6bd53a;
}

.login-mode {
  display: grid;
  align-items: center;
  min-height: 100dvh;
}

.login-screen {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 30px 24px 52px;
}

.login-shell-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(168, 139, 89, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 228, 0.08),
    0 26px 56px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  background:
    radial-gradient(circle at top left, rgba(242, 216, 161, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(60, 50, 35, 0.96), rgba(39, 34, 24, 0.96));
}

.login-shell-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 246, 225, 0.08), transparent 24%);
}

.login-hero-strip {
  position: relative;
  min-height: clamp(200px, 30vw, 340px);
  background:
    linear-gradient(180deg, rgba(31, 24, 16, 0.08), rgba(31, 24, 16, 0.28)),
    url("/assets/cozy/companion/banners/login-hearth.webp") center top / cover no-repeat;
  opacity: 0;
  animation: login-hero-in 0.6s ease-out both;
  animation-delay: 0ms;
}

.login-hero-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  pointer-events: none;
  background: linear-gradient(to bottom,
    transparent,
    rgba(39, 34, 24, 0.6) 50%,
    rgba(39, 34, 24, 0.96));
}

/* Single centered column — replaces the old 2-column split */
.login-center {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 32px 34px;
  display: grid;
  justify-items: center;
  gap: 4px;
}

.login-card-head {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 8px;
}

.login-logo {
  margin-bottom: 12px;
  opacity: 0;
  animation: login-logo-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 200ms;
}

@keyframes login-mote-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04) translateY(-2px); }
}

.login-logo svg {
  filter: drop-shadow(0 0 16px rgba(231, 192, 111, 0.36));
  animation: login-mote-breathe 3.5s ease-in-out infinite;
}

.login-hero-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: #f4ead0;
  opacity: 0;
  animation: login-content-in 0.4s ease-out both;
  animation-delay: 350ms;
}

.login-subtitle {
  margin: 14px 0 0;
  max-width: 32rem;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  opacity: 0;
  animation: login-content-in 0.4s ease-out both;
  animation-delay: 450ms;
}

.auth-error {
  color: var(--danger);
  background: rgba(220, 127, 92, 0.12);
  border: 1px solid rgba(220, 127, 92, 0.36);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 16px 0 0;
  font-size: 13px;
  animation: auth-error-in 0.4s ease;
}

@keyframes auth-error-in {
  0% { opacity: 0; transform: translateY(-6px); }
  30% { transform: translateX(-3px); }
  60% { transform: translateX(3px); }
  100% { opacity: 1; transform: translate(0); }
}

.login-buttons {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  width: min(320px, 100%);
  opacity: 0;
  animation: login-content-in 0.4s ease-out both;
  animation-delay: 550ms;
}

.login-buttons .login-btn {
  animation: login-cta-glow 0.8s ease-out 0.95s both;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}

.login-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.login-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.login-btn:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition-duration: var(--dur-instant, 0.08s);
}

.login-icon {
  font-weight: 800;
  font-size: 13px;
}

.login-twitch {
  background: linear-gradient(180deg, var(--provider-twitch), var(--provider-twitch-dark));
  color: #fff;
}

.login-kick {
  background: linear-gradient(180deg, var(--provider-kick), var(--provider-kick-dark));
  color: #16210f;
}

.login-privacy {
  color: var(--muted);
  font-size: 11px;
  margin: 14px 0 0;
  line-height: 1.5;
  opacity: 0;
  animation: login-privacy-in 0.4s ease-out both;
  animation-delay: 650ms;
}

.login-stats {
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: login-content-in 0.4s ease-out both;
  animation-delay: 700ms;
}

.login-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(248, 240, 219, 0.08);
  border: 1px solid rgba(248, 240, 219, 0.1);
}

/* ── Accessibility: disable entrance animations ──────────── */

@media (prefers-reduced-motion: reduce) {
  .login-hero-strip,
  .login-logo,
  .login-hero-title,
  .login-subtitle,
  .login-buttons,
  .login-stats,
  .auth-error {
    opacity: 1;
    animation: none;
  }

  .login-privacy {
    opacity: 0.78;
    animation: none;
  }

  .login-buttons .login-btn {
    animation: none;
  }

  .login-logo svg {
    animation: none;
  }
}

@media (max-width: 700px) {
  .login-screen {
    padding: 12px 14px 24px;
  }

  .login-center {
    padding: 20px 16px 24px;
  }

  .login-hero-strip {
    min-height: 150px;
  }
}
