/* ==========================================================================
   Ultron Landing & Auth Pages — v2 Styling
   Phase R5 | Uses --u-* tokens from ultron-design.css
   ========================================================================== */

/* ── Base ────────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--u-bg-deep);
  color: var(--u-text);
  font-family: var(--u-font-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Subtle grid background */
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.auth-page > * {
  position: relative;
  z-index: 1;
}

/* ── Landing Hero ────────────────────────────────────────────────────────── */
.landing-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--u-space-8);
  animation: u-fadeIn 0.6s var(--u-ease-out) both;
}

.landing-logo {
  width: 72px;
  height: 72px;
  color: var(--u-primary);
  margin-bottom: var(--u-space-6);
  opacity: 0.7;
  animation: u-fadeIn 0.8s var(--u-ease-out) both;
}

.landing-wordmark {
  font-family: var(--u-font-display);
  font-weight: 800;
  font-size: 48px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--u-text);
  margin: 0 0 var(--u-space-3);
  animation: u-slideUp 0.6s var(--u-ease-out) 0.1s both;
}

.landing-tagline {
  font-family: var(--u-font-body);
  font-size: 16px;
  color: var(--u-text-secondary);
  margin: 0 0 var(--u-space-4);
  animation: u-slideUp 0.6s var(--u-ease-out) 0.2s both;
}

.landing-sub {
  font-size: 14px;
  color: var(--u-text-muted);
  margin: 0 0 var(--u-space-8);
  max-width: 400px;
  line-height: 1.6;
  animation: u-slideUp 0.6s var(--u-ease-out) 0.3s both;
}

.landing-cta {
  animation: u-slideUp 0.6s var(--u-ease-out) 0.4s both;
}

.landing-footer {
  position: fixed;
  bottom: var(--u-space-5);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--u-text-muted);
  opacity: 0.4;
}

/* ── Auth Card ───────────────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--u-bg-surface);
  border: 1px solid var(--u-border);
  border-radius: var(--u-radius-xl);
  padding: var(--u-space-8);
  box-shadow: var(--u-shadow-lg);
}

.auth-card__header {
  display: flex;
  align-items: center;
  gap: var(--u-space-3);
  margin-bottom: var(--u-space-6);
}

.auth-card__logo {
  width: 24px;
  height: 24px;
  color: var(--u-primary);
  opacity: 0.8;
}

.auth-card__title {
  font-family: var(--u-font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--u-text);
}

.auth-card__close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--u-radius-sm);
  background: transparent;
  color: var(--u-text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--u-dur-fast);
}

.auth-card__close:hover {
  background: var(--u-bg-surface-2);
  color: var(--u-text);
}

/* ── Auth Form ───────────────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--u-space-4);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--u-space-2);
}

.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--u-text-secondary);
}

.auth-field input {
  height: 42px;
  padding: 0 var(--u-space-4);
  background: var(--u-bg-surface-2);
  border: 1px solid var(--u-border);
  border-radius: var(--u-radius-md);
  font-family: var(--u-font-body);
  font-size: 14px;
  color: var(--u-text);
  outline: none;
  transition: border-color var(--u-dur-fast), box-shadow var(--u-dur-fast);
}

.auth-field input::placeholder {
  color: var(--u-text-muted);
}

.auth-field input:focus {
  border-color: var(--u-primary);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.auth-submit {
  height: 44px;
  background: var(--u-primary);
  color: #fff;
  border: none;
  border-radius: var(--u-radius-md);
  font-family: var(--u-font-body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--u-dur-fast);
  margin-top: var(--u-space-2);
}

.auth-submit:hover {
  background: var(--u-violet-600);
  box-shadow: var(--u-glow-primary);
}

.auth-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--u-space-4);
  color: var(--u-text-muted);
  font-size: 12px;
}

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

/* ── Google OAuth ────────────────────────────────────────────────────────── */
.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--u-space-3);
  height: 42px;
  background: transparent;
  border: 1px solid var(--u-border);
  border-radius: var(--u-radius-md);
  color: var(--u-text-secondary);
  font-family: var(--u-font-body);
  font-size: 14px;
  text-decoration: none;
  transition: all var(--u-dur-fast);
}

.auth-google:hover {
  background: var(--u-bg-surface-2);
  border-color: var(--u-border-strong);
  color: var(--u-text);
}

/* ── Error / Success Alerts ──────────────────────────────────────────────── */
.auth-error {
  padding: var(--u-space-3) var(--u-space-4);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--u-radius-md);
  color: #fca5a5;
  font-size: 13px;
}

.auth-success {
  padding: var(--u-space-4);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--u-radius-md);
  color: var(--u-success);
  font-size: 14px;
  text-align: center;
}

.auth-success strong {
  display: block;
  font-size: 16px;
  margin-bottom: var(--u-space-2);
}

/* ── Links ───────────────────────────────────────────────────────────────── */
.auth-link {
  font-size: 13px;
  color: var(--u-text-muted);
  text-align: center;
  margin-top: var(--u-space-4);
}

.auth-link a {
  color: var(--u-primary);
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* ── Login Modal Overlay ─────────────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--u-ease-out);
}

.login-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.login-overlay .auth-card {
  animation: u-scaleIn 0.3s var(--u-ease-spring) both;
}

/* ── 2FA Specific ────────────────────────────────────────────────────────── */
.auth-2fa-input {
  text-align: center;
  font-family: var(--u-font-mono);
  font-size: 28px;
  letter-spacing: 0.3em;
  height: 56px;
}

.auth-2fa-toggle {
  background: transparent;
  border: none;
  color: var(--u-primary);
  font-family: var(--u-font-body);
  font-size: 13px;
  cursor: pointer;
  padding: var(--u-space-2);
}

.auth-2fa-toggle:hover {
  text-decoration: underline;
}

/* ── Error Pages ─────────────────────────────────────────────────────────── */
.error-page__code {
  font-family: var(--u-font-display);
  font-weight: 800;
  font-size: 96px;
  color: var(--u-primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--u-space-4);
}

.error-page__title {
  font-family: var(--u-font-display);
  font-weight: 500;
  font-size: 24px;
  color: var(--u-text);
  margin-bottom: var(--u-space-3);
}

.error-page__msg {
  font-size: 14px;
  color: var(--u-text-secondary);
  margin-bottom: var(--u-space-8);
  max-width: 400px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .landing-wordmark { font-size: 32px; }
  .auth-card { margin: var(--u-space-4); padding: var(--u-space-6); }
}
