/* ------------------------------------------------------------------
   Aqlama · Recording — auth pages (login / signup)
   Layered ON TOP of /style.css. Reuses its palette + fonts + classes
   (.site-header, .brand-mark, .wordmark, .room-id, button.action).
   All auth-specific styling lives here; style.css is untouched.
------------------------------------------------------------------ */

/* Vertically settle the card in the viewport without fighting the
   shared <main> rules. A narrow editorial column, centered. */
.auth-body {
  min-height: 100vh;
}

.auth-main {
  max-width: 420px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* The header keeps its shared look but we let the card breathe below it. */
.auth-main .site-header {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------
   Card
------------------------------------------------------------------ */

.auth-card {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 30px 30px 26px;
  margin: auto 0;            /* center within the flex column */
  box-shadow:
    0 1px 2px rgba(26, 24, 21, 0.04),
    0 14px 40px -18px rgba(22, 38, 64, 0.28);
  position: relative;
  overflow: hidden;
}

/* A whisper-thin cobalt rule across the top edge — brand accent,
   not a loud banner. */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-deep) 100%);
  opacity: 0.9;
}

.auth-eyebrow {
  margin: 4px 0 10px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.auth-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 60;
}

.auth-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--warm-1);
}

/* ------------------------------------------------------------------
   Form
------------------------------------------------------------------ */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-2);
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: 7px;
  padding: 12px 13px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input::placeholder {
  color: var(--warm-2);
  opacity: 0.8;
}

.auth-field input:hover:not(:focus) {
  border-color: var(--hair-strong);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Only flag fields the user actually touched + left wrong. */
.auth-field input:user-invalid {
  border-color: var(--danger);
}
.auth-field input:user-invalid:focus {
  box-shadow: 0 0 0 3px var(--danger-soft);
}

/* ------------------------------------------------------------------
   Error area
------------------------------------------------------------------ */

.auth-error {
  background: var(--danger-soft);
  border: 1px solid rgba(169, 50, 38, 0.3);
  border-left: 3px solid var(--danger);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--danger);
  font-weight: 500;
}

/* ------------------------------------------------------------------
   Submit button — reuses button.action from style.css; we just nudge
   the rhythm so it doesn't carry the shared bottom margin into the
   switch line.
------------------------------------------------------------------ */

.auth-form button.action {
  margin-top: 4px;
  margin-bottom: 0;
  padding: 13px 18px;
}

/* Subtle "working" affordance while the request is in flight. */
.auth-form button.action[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* ------------------------------------------------------------------
   Switch link
------------------------------------------------------------------ */

.auth-switch {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  text-align: center;
  font-size: 13px;
  color: var(--warm-1);
}
.auth-switch a {
  color: var(--brand);
  font-weight: 600;
}
.auth-switch a:hover { color: var(--brand-deep); }

/* ------------------------------------------------------------------
   Footer (mirrors .site-footer tone, scoped to auth)
------------------------------------------------------------------ */

.auth-footer {
  margin-top: 22px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-2);
  text-align: center;
  font-weight: 500;
}
.auth-footer .dot { margin: 0 6px; color: var(--hair-strong); }
.auth-footer .ink {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.005em;
  font-size: 11px;
  color: var(--warm-1);
}

/* ------------------------------------------------------------------
   Mobile
------------------------------------------------------------------ */

@media (max-width: 480px) {
  .auth-main { padding: 18px 16px 32px; }
  .auth-card {
    padding: 24px 20px 22px;
    border-radius: 10px;
  }
  .auth-title { font-size: 26px; }
}

/* ------------------------------------------------------------------
   Motion preferences
------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .auth-field input { transition: none; }
}
