/*
 * auth.css — visuals for /login.html and /signup.html.
 *
 * Two screens, two layouts:
 *   - login.html  → centered solo card, calm and minimal
 *   - signup.html → split layout, value props on the left, form on the right
 *
 * Both inherit the design tokens from styles.css (--accent, --bg, etc).
 */

/* ── Page shell ─────────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 18% -10%, rgba(79, 138, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(79, 138, 255, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 24px clamp(20px, 4vw, 48px) 32px;
  gap: clamp(24px, 5vh, 56px);
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Top bar ───────────────────────────────────────────────────────────── */

.auth-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-base, 220ms) var(--ease-out, ease-out),
    border-color var(--dur-base, 220ms) var(--ease-out, ease-out),
    box-shadow var(--dur-base, 220ms) var(--ease-out, ease-out);
}

.auth-topbar.is-elevated {
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.55);
}

.auth-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-topbar-actions .back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 160ms ease;
}

.auth-topbar-actions .back-link:hover {
  color: var(--text);
}

/* ── Main layout variants ──────────────────────────────────────────────── */

.auth-main {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.auth-main--centered {
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.auth-main--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

@media (max-width: 880px) {
  .auth-main--split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ── Cards ─────────────────────────────────────────────────────────────── */

.auth-card {
  width: 100%;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}

.auth-card--solo {
  max-width: 420px;
}

.auth-card--form {
  max-width: 480px;
  justify-self: center;
}

.auth-card .eyebrow {
  margin: 0;
}

.auth-card h1 {
  font-family: var(--font-display, var(--font-sans));
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-strong);
}

.auth-card-sub {
  margin: -2px 0 6px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ── Form ──────────────────────────────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

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

.auth-field > span {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  font-weight: 500;
}

.auth-field input {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text-strong);
  border-radius: var(--r-2);
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: var(--font-sans);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.auth-field input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-elev-1);
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
  padding: 13px 20px;
  font-size: 14.5px;
  font-weight: 600;
}

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

.auth-feedback {
  min-height: 1em;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-feedback[data-kind="error"] {
  color: #FCA5A5;
}

.auth-feedback[data-kind="pending"] {
  color: var(--text);
}

/* ── Aside row + switch links ──────────────────────────────────────────── */

.auth-aside-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.ghost-link {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 160ms ease;
}

.ghost-link:hover {
  color: var(--text);
}

.auth-switch {
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

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

.auth-terms {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.auth-terms a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.auth-fineprint {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Value column (signup only) ────────────────────────────────────────── */

.auth-value {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 460px;
}

.auth-value h2 {
  font-family: var(--font-display, var(--font-sans));
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text-strong);
}

.auth-value-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-value-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  counter-reset: avitem;
}

.auth-value-list li {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-areas:
    "num  title"
    ".    desc";
  column-gap: 14px;
  row-gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  counter-increment: avitem;
}

.auth-value-list li:last-child {
  border-bottom: 1px solid var(--border);
}

.auth-value-list li::before {
  content: counter(avitem, decimal-leading-zero);
  grid-area: num;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding-top: 4px;
}

.auth-value-list strong {
  grid-area: title;
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
}

.auth-value-list span {
  grid-area: desc;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ── Access banner inside signup card ──────────────────────────────────── */

.access-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-2);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.access-banner strong {
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 600;
}

.access-banner p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.access-banner[data-mode="whitelist"] {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.30);
}

/* ── Mobile niceties ───────────────────────────────────────────────────── */

@media (max-width: 540px) {
  .auth-shell {
    padding: 18px 16px 24px;
    gap: 28px;
  }
  .auth-topbar-actions .back-link {
    display: none;
  }
  .auth-card {
    padding: 24px;
    border-radius: var(--r-2);
  }
}
