/*
 * Nabra auth pages — beta.nabra.ai login look and feel.
 * Groq-inspired flat aesthetic: papery Bone canvas, graphite brand panel,
 * weight-300 display type, mono eyebrow, one orange pill CTA, hairline borders.
 * Scoped under .au-* classes. Fonts load via <link> in the host page.
 */

:root {
  --au-bone: #f3f3ee;
  --au-graphite: #2d2f33;
  --au-parchment: #e8e8de;
  --au-stone: #69695d;
  --au-ash: #9c9c90;
  --au-khaki: #cecebf;
  --au-input: #85857a;
  --au-brand: #d63600;
  --au-brand-hover: #c43200;
  --au-brand-ink: #b32d00;
  --au-eyebrow: #ff7a45;
  --au-destructive: #b42318;
  --au-radius: 10px;
  --au-ease: 150ms ease-out;
}

.au-frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--au-bone);
  color: var(--au-graphite);
  font-family: 'Space Grotesk Variable', 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.57;
  letter-spacing: -0.01em;
}

.au-frame *,
.au-frame *::before,
.au-frame *::after {
  box-sizing: border-box;
}

.au-frame h1,
.au-frame h2,
.au-frame h3 {
  font-weight: 300;
  letter-spacing: -0.02em;
}

/* ── Graphite brand panel ── */
.au-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 24px;
  background: var(--au-graphite);
  color: var(--au-parchment);
}

.au-wordmark {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.025em;
  color: var(--au-parchment);
  text-decoration: none;
}

.au-panel__copy {
  display: none;
  max-width: 28rem;
  margin-top: 32px;
}

.au-eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--au-eyebrow);
}

.au-display {
  margin-top: 12px;
  font-size: 46px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--au-parchment);
  text-wrap: balance;
}

.au-supporting {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.57;
  color: var(--au-ash);
}

.au-legal {
  display: none;
  gap: 16px;
  margin-top: 32px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--au-ash);
}

.au-legal a {
  color: inherit;
  text-decoration: none;
}

.au-legal a:hover {
  text-decoration: underline;
}

/* ── Form side ── */
.au-main {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

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

.au-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--au-graphite);
}

.au-sub {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.43;
  color: var(--au-stone);
}

.au-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.au-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.au-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--au-graphite);
}

.au-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--au-input);
  border-radius: var(--au-radius);
  background: #ffffff;
  color: var(--au-graphite);
  font: inherit;
  font-size: 14px;
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color var(--au-ease), box-shadow var(--au-ease);
}

.au-input::placeholder {
  color: var(--au-ash);
}

.au-input:focus-visible {
  border-color: var(--au-brand-ink);
  box-shadow: 0 0 0 2px rgba(179, 45, 0, 0.4);
}

/* ── Pill CTA (the one orange element) ── */
.au-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 9999px;
  background: var(--au-brand);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--au-ease);
}

.au-btn:hover:not(:disabled) {
  background: var(--au-brand-hover);
}

.au-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.au-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.au-btn--busy svg {
  display: none;
}

.au-btn--ghost {
  background: transparent;
  color: var(--au-graphite);
  border: 1px solid var(--au-khaki);
}

.au-btn--ghost:hover:not(:disabled) {
  background: var(--au-parchment);
}

.au-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.au-actions .au-btn {
  width: auto;
}

.au-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 20px;
  border: 3px solid var(--au-khaki);
  border-top-color: var(--au-brand);
  border-radius: 9999px;
  animation: au-spin 0.8s linear infinite;
}

.au-error-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border: 1px solid var(--au-khaki);
  border-radius: 9999px;
  color: var(--au-brand);
}

.au-error-mark svg {
  width: 18px;
  height: 18px;
}

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

.au-toggle {
  align-self: center;
  padding: 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--au-stone);
  cursor: pointer;
  transition: color var(--au-ease);
}

.au-toggle:hover {
  color: var(--au-graphite);
}

.au-switch {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--au-stone);
}

.au-switch a {
  font-weight: 500;
  color: var(--au-brand-ink);
  text-decoration: none;
}

.au-switch a:hover {
  text-decoration: underline;
}

.au-legal-note {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--au-ash);
}

.au-legal-note a {
  color: inherit;
  text-decoration: underline;
}

.au-error {
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--au-destructive);
}

/* ── Success state ── */
.au-success {
  padding: 32px 0;
  text-align: center;
}

.au-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 9999px;
  background: rgba(214, 54, 0, 0.1);
}

.au-success__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--au-graphite);
}

.au-success__text {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--au-stone);
}

.au-success__text strong {
  font-weight: 500;
  color: var(--au-graphite);
}

.au-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--au-stone);
}

.au-note a {
  font-weight: 500;
  color: var(--au-brand-ink);
  text-decoration: none;
}

.au-note a:hover {
  text-decoration: underline;
}

.au-hidden {
  display: none !important;
}

/* ── Desktop: panel beside the form, headline visible ── */
@media (min-width: 1024px) {
  .au-frame {
    flex-direction: row;
  }

  .au-panel {
    width: 44%;
    padding: 48px;
  }

  .au-panel__copy {
    display: block;
  }

  .au-legal {
    display: flex;
  }

  .au-main {
    padding: 40px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .au-frame *,
  .au-frame *::before,
  .au-frame *::after {
    transition-duration: 0.01ms !important;
  }
}
