/* Login — Concept B: Living Data Field */

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
  overflow: hidden;
}

.login-field-content {
  position: relative;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  animation: login-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-field-headline {
  text-align: center;
  margin: 0;
}

.login-field-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(120deg, #ffffff 0%, #ffd0b0 38%, var(--accent-light) 72%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-field-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 26rem;
}

.login-about-link-wrap {
  margin: 0.9rem 0 0;
}

.login-about-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255, 119, 51, 0.35);
  padding-bottom: 0.1rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.login-about-link:hover {
  color: #ffd0b0;
  border-bottom-color: rgba(255, 208, 176, 0.55);
}

.login-about-inline {
  display: block;
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.login-about-inline:hover {
  color: var(--accent-light);
}

.login-card {
  position: relative;
  width: 100%;
  padding: 2rem 1.75rem;
  border-radius: calc(var(--radius) + 6px);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 85, 0, 0.45) 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 85, 0, 0.15) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.85;
  pointer-events: none;
}

.login-card.is-error {
  animation: login-shake 0.45s ease-in-out;
}

@keyframes login-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.login-brand {
  text-align: center;
  margin-bottom: 1.65rem;
}

.login-brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.9rem;
  display: block;
  border-radius: 14px;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.login-brand h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.login-brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.login-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.login-pill {
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 85, 0, 0.08);
  border: 1px solid rgba(255, 85, 0, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 85, 0, 0.1);
}

.login-pill--highlight {
  color: var(--accent-light);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  line-height: 0;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--text);
}

.password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.login-page .btn-primary {
  position: relative;
  overflow: hidden;
}

.login-page .btn-primary.is-loading {
  pointer-events: none;
  opacity: 0.85;
}

.login-page .btn-primary.is-loading::after {
  content: '';
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-public-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.75rem;
  text-decoration: none;
}

.login-public-link svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .login-page {
    place-items: start center;
    padding: 1.75rem 1rem 3rem;
    min-height: 100dvh;
  }

  .login-field-content {
    gap: 1.35rem;
    margin-top: 0.25rem;
    animation: login-rise-mobile 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .login-card {
    padding: 1.65rem 1.25rem;
  }
}

@keyframes login-rise-mobile {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-field-content {
    animation: none;
  }
}