/* dubd.in login + signup
 *
 * Loads on top of frontpage.css: shell, header and the .ds-* components are
 * shared. Only the auth-specific composition and the form primitives (Input,
 * Checkbox) live here.
 *
 * The header is NOT sticky on these screens — the page does not scroll.
 */

.au-page { display: flex; flex-direction: column; min-height: 100vh; }
.au-header { position: static; }

/* Right side of the header is the cross-link, not Login/Signup buttons. */
.au-crosslink { display: flex; align-items: center; gap: var(--space-3); }
.au-crosslink__label { font-size: var(--text-sm); color: var(--text-tertiary); }

.au-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16) var(--space-6);
}
.au-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-16);
  width: 100%;
  max-width: 940px;
}

/* ── brand panel ───────────────────────────────────────────────────── */
.au-brand {
  flex: 1 1 320px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.au-brand h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-semibold);
}
.au-brand__lead {
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--text-secondary);
  text-wrap: pretty;
  max-width: 38ch;
}
.au-perks { display: flex; flex-direction: column; }
.au-perk {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1.5px solid var(--border-subtle);
}
.au-perk__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--brand);
  padding-top: 3px;
  flex-shrink: 0;
}
.au-perk__text { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-secondary); }
.au-motif { display: flex; flex-direction: column; gap: var(--space-2); opacity: 0.45; padding-top: var(--space-2); }

/* ── card column ───────────────────────────────────────────────────── */
.au-col {
  flex: 0 1 420px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.au-card { display: flex; flex-direction: column; gap: var(--space-6); }
.au-card__head { display: flex; flex-direction: column; gap: var(--space-2); }
.au-card h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  font-weight: var(--weight-semibold);
}
.au-card__sub { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-secondary); text-wrap: pretty; }
.au-actions { display: flex; flex-direction: column; gap: var(--space-4); }
.au-legal { font-size: var(--text-xs); line-height: var(--leading-sm); color: var(--text-tertiary); text-wrap: pretty; }
.au-card__foot {
  border-top: 1.5px solid var(--border-subtle);
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--text-secondary);
}
.au-card__foot a { font-weight: var(--weight-semibold); }
.au-guest {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--text-tertiary);
  text-align: center;
  text-wrap: pretty;
}

/* ── form primitives ───────────────────────────────────────────────── */
.au-fields { display: flex; flex-direction: column; gap: var(--space-4); }
.ds-field { display: flex; flex-direction: column; gap: 6px; }
.ds-label { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.ds-label__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }
.ds-input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-4);
  background: var(--surface-canvas);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}
.ds-input::placeholder { color: var(--text-tertiary); }
.ds-input:focus-visible { border-color: var(--focus-ring); }
.ds-input[aria-invalid="true"] { border-color: var(--danger); }
.ds-helper { font-size: var(--text-xs); color: var(--text-tertiary); }
.ds-error { font-size: var(--text-xs); color: var(--danger); }
.ds-error[hidden] { display: none; }

/* mono show/hide toggle on the password label row */
.au-pwtoggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--brand);
  transition: color var(--duration-fast) var(--ease-out);
}
.au-pwtoggle:hover { color: var(--blue-200); }

/* checkbox */
.ds-check { display: flex; align-items: flex-start; gap: var(--space-2); }
.ds-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex-shrink: 0;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-xs);
  background: var(--surface-canvas);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.ds-check input:checked {
  background: var(--brand-solid);
  border-color: var(--brand-solid);
  /* check mark */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23081019' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}
.ds-check label { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--text-secondary); cursor: pointer; }
.au-terms { display: flex; flex-direction: column; gap: var(--space-2); }
.au-terms .ds-error { padding-left: 26px; }

/* Honeypot — off screen rather than display:none, which bots skip. */
.au-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Server-side flash (bad credentials, duplicate email) */
.au-flash {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-md);
  background: var(--danger-subtle);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* ── confirmation state ────────────────────────────────────────────── */
.au-confirm { display: flex; flex-direction: column; gap: var(--space-6); }
.au-confirm__body { display: flex; flex-direction: column; gap: var(--space-3); }
.au-confirm p { font-size: var(--text-base); line-height: var(--leading-base); color: var(--text-secondary); text-wrap: pretty; }
.au-confirm__addr { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-primary); }
.au-confirm__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  border-top: 1.5px solid var(--border-subtle);
  padding-top: var(--space-5);
}
.au-textbtn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
}
.au-textbtn:hover { color: var(--brand); }

/* ── slim auth footer ──────────────────────────────────────────────── */
.au-footer { border-top: 1.5px solid var(--border-subtle); background: var(--gray-1000); flex-shrink: 0; }
.au-footer__bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
}
.au-footer__bar p, .au-footer__bar a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.au-footer__links { display: flex; gap: var(--space-5); }

/* ── responsive ────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* panel wraps above the card */
  .au-row { gap: var(--space-10); }
  .au-main { padding: var(--space-10) var(--space-5); }
}
@media (max-width: 360px) {
  .au-col { flex-basis: 100%; min-width: 0; }
}
