/* Login page — editorial, two-column hero with subtle texture
 * Left: brand & invitation. Right: auth methods.
 */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

/* Decorative dots/grain — adds paper texture without external asset */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(196, 118, 59, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(111, 142, 94, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

.login-hero {
  position: relative;
  padding: var(--s-16) var(--s-12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-accent-faint) 100%);
  border-right: 1px solid var(--color-border);
}

.login-hero__brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.login-hero__brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--color-text);
  display: grid;
  place-items: center;
  color: var(--color-bg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
}

.login-hero__brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.login-hero__content {
  max-width: 520px;
  margin-top: auto;
  margin-bottom: auto;
}

.login-hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  margin-bottom: var(--s-5);
}

.login-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: var(--s-6);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

.login-hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.login-hero__lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 460px;
}

.login-hero__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

.login-hero__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9375rem;
  font-variation-settings: "opsz" 14;
}

/* Right column — form */
.login-form-wrap {
  display: grid;
  place-items: center;
  padding: var(--s-12) var(--s-8);
  background: var(--color-bg-elevated);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-card__header {
  margin-bottom: var(--s-8);
}

.login-card__title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-2);
}

.login-card__subtitle {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
  transition: all 0.18s ease;
}

.oauth-btn:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.oauth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.oauth-btn svg, .oauth-btn img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-6) 0;
  color: var(--color-text-subtle);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.email-input {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.email-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-faint);
}

.email-submit {
  width: 100%;
  padding: var(--s-3) var(--s-5);
}

.login-footer-note {
  margin-top: var(--s-8);
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
  text-align: center;
  line-height: 1.6;
}

.flash {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: 0.875rem;
  margin-bottom: var(--s-4);
  display: none;
}
.flash.is-visible {
  display: block;
  animation: flashIn 0.3s ease;
}
.flash.is-success {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}
.flash.is-error {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

@keyframes flashIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 880px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-hero {
    padding: var(--s-8) var(--s-6);
    min-height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  .login-form-wrap {
    padding: var(--s-8) var(--s-5);
  }
}

/* Animation entrance */
.login-hero__content > * {
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.login-hero__content > *:nth-child(1) { animation-delay: 0.1s; }
.login-hero__content > *:nth-child(2) { animation-delay: 0.2s; }
.login-hero__content > *:nth-child(3) { animation-delay: 0.3s; }

.login-card > * {
  opacity: 0;
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.login-card > *:nth-child(1) { animation-delay: 0.2s; }
.login-card > *:nth-child(2) { animation-delay: 0.3s; }
.login-card > *:nth-child(3) { animation-delay: 0.4s; }
.login-card > *:nth-child(4) { animation-delay: 0.5s; }
.login-card > *:nth-child(5) { animation-delay: 0.6s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
