/* Rudy editorial login design — scoped to auth routes */
.auth-rudy {
  --rudy-background: oklch(0.975 0.012 80);
  --rudy-foreground: oklch(0.22 0.03 255);
  --rudy-card: oklch(0.985 0.008 80);
  --rudy-muted: oklch(0.48 0.03 255);
  --rudy-border: oklch(0.88 0.018 80);
  --rudy-ink: oklch(0.22 0.03 255);
  --rudy-paper: oklch(0.975 0.012 80);
  --rudy-paper-deep: oklch(0.93 0.02 75);
  --rudy-amber: oklch(0.65 0.19 40);
  --rudy-primary: oklch(0.65 0.19 40);
  --rudy-primary-fg: oklch(0.982 0.014 55);

  background-color: var(--rudy-background);
  color: var(--rudy-foreground);
}

.auth-rudy .font-serif {
  font-family: var(--font-instrument-serif), ui-serif, Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.auth-rudy.paper-grain {
  background-image:
    radial-gradient(circle at 20% 30%, oklch(0.65 0.19 40 / 0.05), transparent 50%),
    radial-gradient(circle at 80% 70%, oklch(0.26 0.045 255 / 0.05), transparent 55%);
}

@keyframes auth-scroll-y {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

.auth-rudy .animate-scroll-y {
  animation: auth-scroll-y 80s linear infinite;
}

.auth-rudy .animate-scroll-y-reverse {
  animation: auth-scroll-y 95s linear infinite reverse;
}

@media (prefers-reduced-motion: reduce) {
  .auth-rudy .animate-scroll-y,
  .auth-rudy .animate-scroll-y-reverse {
    animation: none;
  }
}

.auth-rudy .text-rudy-muted {
  color: var(--rudy-muted);
}

.auth-rudy .text-rudy-amber {
  color: var(--rudy-amber);
}

.auth-rudy .text-rudy-ink {
  color: var(--rudy-ink);
}

.auth-rudy .bg-rudy-card {
  background-color: var(--rudy-card);
}

.auth-rudy .bg-rudy-paper-deep {
  background-color: var(--rudy-paper-deep);
}

.auth-rudy .bg-rudy-amber {
  background-color: var(--rudy-amber);
}

.auth-rudy .border-rudy {
  border-color: var(--rudy-border);
}

.auth-rudy .bg-rudy-primary {
  background-color: var(--rudy-primary);
}

.auth-rudy .text-rudy-primary-fg {
  color: var(--rudy-primary-fg);
}

.auth-rudy .oauth-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.375rem;
  border: 1px solid var(--rudy-border);
  background-color: var(--rudy-card);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-rudy .oauth-btn:hover:not(:disabled) {
  border-color: var(--rudy-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-rudy .oauth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-rudy .oauth-btn:disabled.oauth-btn--loading {
  opacity: 1;
  cursor: default;
}

.auth-rudy .oauth-btn__arrow {
  color: var(--rudy-muted);
  transition: transform 0.15s ease;
}

.auth-rudy .oauth-btn:hover:not(:disabled) .oauth-btn__arrow {
  transform: translateX(2px);
}

.auth-rudy .signin-form input:-webkit-autofill,
.auth-rudy .signin-form input:-webkit-autofill:hover,
.auth-rudy .signin-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--rudy-card) inset !important;
  -webkit-text-fill-color: var(--rudy-foreground) !important;
  background-color: var(--rudy-card) !important;
}

/* ─── Sign-in form: override BaInput / BaSwitch brand blues ─── */
.auth-rudy .signin-form .auth-input-field {
  border-color: var(--rudy-border) !important;
  background-color: var(--rudy-card) !important;
  border-radius: 0.5rem;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-rudy .signin-form .auth-input-field:focus-within {
  border-color: var(--rudy-ink) !important;
  box-shadow: 0 0 0 3px oklch(0.65 0.19 40 / 0.14) !important;
}

.auth-rudy .signin-form .auth-input-field input:focus,
.auth-rudy .signin-form .auth-input-field input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.auth-rudy .signin-form .auth-input-field input {
  background-color: transparent !important;
  color: var(--rudy-foreground);
  font-size: 0.875rem;
}

.auth-rudy .signin-form .auth-input-field input::-moz-placeholder {
  color: var(--rudy-muted);
  opacity: 0.75;
}

.auth-rudy .signin-form .auth-input-field input::placeholder {
  color: var(--rudy-muted);
  opacity: 0.75;
}

.auth-rudy .signin-form .auth-input-field svg {
  color: var(--rudy-muted);
}

.auth-rudy .onboarding-input-line {
  position: relative;
  border-color: var(--rudy-border);
  transition: border-color 0.2s ease;
}

.auth-rudy .onboarding-input-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1.5px;
  background-color: var(--rudy-ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease, background-color 0.22s ease;
  pointer-events: none;
}

.auth-rudy .onboarding-input-line:focus-within {
  border-color: var(--rudy-ink);
}

.auth-rudy .onboarding-input-line:focus-within::after {
  transform: scaleX(1);
}

.auth-rudy .onboarding-input-line--error {
  border-color: oklch(0.68 0.2 25);
}

.auth-rudy .onboarding-input-line--error::after {
  transform: scaleX(1);
  background-color: oklch(0.68 0.2 25);
}

.auth-rudy .signin-form .auth-switch[data-state='checked'] {
  background-color: var(--rudy-primary) !important;
}

.auth-rudy .signin-form .auth-switch:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.65 0.19 40 / 0.2);
}

.auth-rudy .signin-form .auth-tab {
  padding-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-rudy .signin-form .auth-tab--active {
  color: var(--rudy-ink);
  border-bottom-color: var(--rudy-amber);
}

.auth-rudy .signin-form .auth-tab--idle {
  color: var(--rudy-muted);
}

.auth-rudy .signin-form .auth-tab--idle:hover {
  color: var(--rudy-ink);
}

.auth-rudy .signin-form .auth-submit {
  width: 100%;
  border-radius: 0.5rem;
  background-color: var(--rudy-primary);
  color: var(--rudy-primary-fg);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.auth-rudy .signin-form .auth-submit:hover:not(:disabled) {
  opacity: 0.92;
}

.auth-rudy .signin-form .auth-submit:active:not(:disabled) {
  transform: scale(0.995);
}

.auth-rudy .signin-form .auth-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.auth-rudy .auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.auth-rudy .auth-divider__line {
  flex: 1;
  height: 1px;
  background-color: var(--rudy-border);
}

.auth-rudy .auth-divider__label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rudy-muted);
  white-space: nowrap;
  text-align: center;
}

.auth-rudy .auth-form-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  text-align: center;
}

@media (min-width: 1024px) {
  .auth-rudy .auth-form-links {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
  }

  .auth-rudy .auth-form-links--otp-only {
    justify-content: center;
    text-align: center;
  }
}

.auth-rudy .auth-brand-mark__logo {
  /* Boomerang arc sits above the B — anchor letter baseline to wordmark */
  margin-bottom: 0.125rem;
}

.auth-rudy .auth-brand-mark__wordmark {
  padding-bottom: 0.125rem;
}

.auth-rudy .auth-brand-mark + .auth-brand-badge {
  margin-bottom: 0.375rem;
}

.auth-rudy .auth-secondary-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--rudy-border);
  background-color: var(--rudy-card);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--rudy-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-rudy .auth-secondary-btn:hover:not(:disabled) {
  border-color: var(--rudy-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.auth-rudy .auth-link-btn {
  font-size: 0.875rem;
  color: var(--rudy-muted);
  transition: color 0.15s ease;
}

.auth-rudy .auth-link-btn:hover {
  color: var(--rudy-ink);
}

.auth-rudy .auth-status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  text-align: center;
}

.auth-rudy .auth-status-panel__copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
}

.auth-rudy .auth-status-panel__title {
  font-family: var(--font-instrument-serif), ui-serif, Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--rudy-ink);
}

.auth-rudy .auth-status-panel__description {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--rudy-muted);
}

.auth-rudy .auth-status-panel__body {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-rudy .auth-status-callout {
  border: 1px solid var(--rudy-border);
  border-radius: 0.75rem;
  background-color: var(--rudy-card);
  padding: 1rem 1.125rem;
  text-align: left;
}

.auth-rudy .auth-status-callout__lead {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--rudy-ink);
}

.auth-rudy .auth-status-callout__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-rudy .auth-status-callout__list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--rudy-muted);
}

.auth-rudy .auth-status-callout__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--rudy-amber);
}

.auth-rudy .auth-status-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 24rem;
}

.auth-rudy .auth-status-notice {
  border-radius: 0.625rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: left;
}

.auth-rudy .auth-status-notice--success {
  border: 1px solid oklch(0.88 0.06 145);
  background-color: oklch(0.97 0.03 145);
  color: oklch(0.42 0.12 145);
}

.auth-rudy .auth-status-notice--error {
  border: 1px solid oklch(0.88 0.08 25);
  background-color: oklch(0.97 0.03 25);
  color: oklch(0.48 0.16 25);
}

.auth-rudy .auth-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--rudy-muted);
}

.auth-rudy .auth-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.auth-rudy .auth-footer__copy {
  white-space: nowrap;
}

.auth-rudy .auth-footer__links {
  display: flex;
  gap: 1rem;
}

.auth-rudy .auth-trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem 2rem;
  width: 100%;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
  border-bottom: 1px solid oklch(0.88 0.018 80 / 0.3);
  color: var(--rudy-muted);
  transition: color 0.15s ease;
}

.auth-rudy .auth-trust-badges:hover {
  color: var(--rudy-ink);
}

.auth-rudy .auth-trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 4.5rem;
  text-align: center;
}

.auth-rudy .auth-trust-badge__icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  opacity: 0.78;
  filter: brightness(0);
}

.auth-rudy .auth-trust-badge__label {
  font-size: 0.525rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 5.5rem;
}

.auth-rudy .auth-more-options {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--rudy-muted);
  transition: color 0.15s ease;
}

.auth-rudy .auth-more-options:hover {
  color: var(--rudy-ink);
}

.auth-rudy .auth-more-options__chevron {
  font-size: 0.75rem;
  line-height: 1;
}

