/* ---- Pre-login surface: shared primitives ---------------------------------
   Landing, log in, sign up, "check your email" and the reset pages are one
   surface. This file holds what all of them use — band rhythm, the eyebrow
   type treatment, the buttons, the sign-in card and the footer. Landing-only
   sections live in `landing.css`.

   Tokens only: every colour, size and space here resolves through the custom
   properties in `base.css`, so the M2 per-tenant accent keeps working. */

/* ---- Bands: full-bleed grounds, each centring its own `.page-width` ------- */

.band {
  padding-block: var(--space-7);
  border-bottom: 1px solid var(--border);
}
.band--paper { background: var(--paper); }
.band--tight { padding-block: var(--space-6); }
.band--ink {
  background: var(--band);
  color: var(--band-text);
  border-bottom-color: var(--band-line);
}
.band--ink a { color: var(--accent-on-band); }
.band--ink .eyebrow { color: var(--accent-on-band); }
.band--ink .lede,
.band--ink .band-note { color: var(--band-muted); }

/* ---- Type treatments ------------------------------------------------------ */

/* The eyebrow is set in the same face the product uses for requirement IDs,
   CVSS vectors and digests. It is the through-line between the storefront and
   the workspace, so it is never decorative: it always names something real. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}
/* An eyebrow that quotes an identifier keeps the identifier's own casing:
   `prEN` is a draft designation, and `PREN` is not a thing. */
.eyebrow--asis { text-transform: none; letter-spacing: 0.06em; }

.band h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  margin: 0 0 var(--space-3);
  max-width: 22ch;
}
.band h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  margin: 0 0 var(--space-2);
}
.lede {
  font-size: var(--fs-lede);
  line-height: var(--lh-body);
  color: var(--muted);
  max-width: var(--measure);
  margin: 0;
}
.band-note {
  font-size: var(--fs-micro);
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}
.mono { font-family: var(--font-mono); }

/* ---- Buttons -------------------------------------------------------------- */

.btn-lg {
  font-size: var(--fs-body);
  padding: 0.62rem 1.3rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 120ms ease;
}
.btn-lg:hover { background: var(--text); }
.btn-quiet.btn-lg:hover { background: var(--paper); color: var(--accent); }
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* ---- Sign-in, sign-up and reset: one card ---------------------------------
   The card is the workspace's `.detail-panel` turned upright — same hairline,
   same accent rule, so the first screen already looks like the product. */

.auth {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--gutter) var(--space-7);
}
.auth-card {
  width: 100%;
  box-sizing: border-box;
  max-width: 28rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-5) var(--space-4) var(--space-4);
}
.auth-card--wide { max-width: 34rem; }
.auth-card h1 {
  font-size: 1.5rem;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-display);
  margin: 0 0 var(--space-2);
}
.auth-card .eyebrow { margin-bottom: var(--space-2); }
.auth-intro {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  margin: 0 0 var(--space-4);
}
.auth-aside {
  font-size: var(--fs-small);
  color: var(--muted);
  text-align: center;
  max-width: 30rem;
  margin: 0;
  line-height: var(--lh-body);
}
.auth-aside a { white-space: nowrap; }

/* ---- Fields ---------------------------------------------------------------
   The old page styled a list of input *types* and password was not on it, so
   the username box was 640px and the password box 185px (UX-001). Styling the
   control rather than its type is what stops that recurring. */

.auth-form { display: grid; gap: var(--space-3); margin: 0; }
.field { display: grid; gap: 0.3rem; }
.field > label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  transition: border-color 120ms ease;
}
.field input:hover { border-color: var(--muted); }
.field .note {
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: 1.45;
}
.field .field-error { font-size: var(--fs-micro); }
.auth-form .btn { padding: 0.55rem 1rem; margin-top: var(--space-1); }
.auth-form .btn-row { margin-top: var(--space-1); }

.auth-card .error-box {
  margin-bottom: var(--space-4);
  border-left: 3px solid var(--crit);
}

/* ---- Footer --------------------------------------------------------------- */

.public-footer {
  background: var(--band);
  color: var(--band-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  padding-block: var(--space-6) var(--space-5);
}
.public-footer a { color: var(--band-text); }
.public-footer .wordmark { color: var(--band-text); font-size: var(--fs-body); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 1.6fr) repeat(2, minmax(11rem, 1fr));
  gap: var(--space-5) var(--space-4);
  align-items: start;
}
.footer-grid h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent-on-band);
  font-weight: 400;
  margin: 0 0 var(--space-2);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.footer-blurb { margin: var(--space-3) 0 0; max-width: 40ch; }
.footer-base {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--band-line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--band-muted);
}
.footer-base p { margin: 0; }

@media (max-width: 46rem) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .band { padding-block: var(--space-6); }
}
