/* =========================================================================
   Page — sign in ({en,de}/login.html)
   ========================================================================= */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
}

/* Darkening, not mint — the one rule L-FE-17 makes binding. No text is painted
   on this bloom today (the card sits above it), so nothing measured as a
   failure here; it is changed anyway, because a codified rule with a live
   counter-example in the tree is a rule people learn to ignore. */
.auth-wrap::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  top: -200px;
  right: -160px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at 30% 30%,
    color-mix(in srgb, var(--nav-bg) 42%, transparent),
    transparent 70%
  );
}

/* NO SHADOW, and it is the older of DESIGN_TOKENS.md §9.1's two open items.
   A shadow is reserved for something that floats above the document and
   OCCLUDES it — a dropdown, a drawer, a dialog, the skip link. This card rests;
   it is the page. Its depth comes from the three grounds, and it has the
   largest step the system offers: `--doc-panel` on the hero gradient.
 *
   §9.2 is the second reason and it is the sharper one — *one hairline, never
   two.* A border AND a shadow on the same edge reads as a seam rather than as a
   frame, so the shadow was not merely unearned, it was working against the
   border beside it. Kept as a pair with `.signin-card` (components/signin.css):
   the two are one look, and closing one would have made them disagree. */
.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 30px 28px 26px;
  background: var(--doc-panel);
  color: var(--doc-ink);
  border: 1px solid var(--doc-line);
  border-radius: var(--radius-lg);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-logo img {
  height: 44px;
  width: auto;
}

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--doc-ink-soft);
}


/* The card's content is rendered by pages/login.js — the form deliberately
   does not exist in the markup (L-FE-08) — so the sizing lives here. */
.auth-card > h1 {
  margin: 0 0 4px;
  font-size: 21px;
  text-align: center;
}

.auth-foot p {
  margin: 8px 0 0;
}

/* ---- The split surface: sign-in and registration (U-2284) ----------------- *
 * The redesign's auth face (R8h): no site header and no footer, the form panel
 * on the page ground and, from 1024 px, a dark brand panel LEFT of it with the
 * lattice and the molecule. Below 1024 px there is no brand panel at all — the
 * redesign session's binding value — so a phone shows the form panel alone.
 *
 * Scoped to `.auth-split`, which only `login.html` and `register.html` carry:
 * verify, forgot-password, reset-password and accept-invitation keep the card
 * on the brand gradient above until they are redesigned themselves.
 *
 * The panel is dark in both themes, so it reads the theme-invariant inks of
 * DESIGN_TOKENS.md §8.2, the hero band's: white and `--hero-ink-lead` on
 * `--hero-ground`, 13.63:1 and 9.10:1 at the glow's centre (marketing.css). The
 * molecule and the lattice are the dark motif files, background images and
 * so decorative by construction; their addresses stand in the rule, never in
 * a custom property (components/motif.css says why). The panel's glow is the
 * hero band's `--hero-glow` (16 %): the canvas painted 22 %, which no token
 * carries. */
.auth-split {
  min-height: 100vh;
}

.auth-brand {
  display: none;
}

/* The form panel stands on the page ground, not on the gradient. */
.auth-split > .auth-wrap {
  background: none;
}

.auth-split > .auth-wrap::before {
  display: none;
}

/* The card is a SIDES panel here (radius 6, ADR-0167) with the canvas's 32 px
   inside, and its heading the marketing display size, set left. Still no
   shadow, for the reason `.auth-card` gives above. */
.auth-split .auth-card {
  padding: 32px;
  border-radius: var(--radius);
}

.auth-split .auth-card > h1 {
  margin: 0 0 var(--space-sm);
  font: var(--font-display-md);
  text-align: left;
}

.auth-split .auth-sub,
.auth-split .auth-foot {
  text-align: left;
}

.auth-split .auth-sub {
  font-size: var(--text-body);
  line-height: var(--text-body-lh);
}

@media (min-width: 1024px) {
  .auth-split {
    display: grid;
    grid-template-columns: clamp(400px, 40vw, 560px) minmax(0, 1fr);
  }

  /* The form comes first in the document and stands in the right column. */
  .auth-split > .auth-wrap {
    grid-column: 2;
    grid-row: 1;
    padding: 48px;
  }

  /* Sticky and one viewport tall, so the molecule stays in view beside the
     long registration form instead of scrolling away with the top of it. */
  .auth-brand {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: 48px;
    overflow: hidden;
    color: var(--brand-on-dark);
    background:
      url("../../img/motif/molecule-band.svg") right -120px bottom -120px / 620px 620px no-repeat,
      url("../../img/motif/mol-tile-dark.svg") left top / 48.5px 84px repeat,
      radial-gradient(520px 420px at 100% 100%, var(--hero-glow), transparent 70%),
      var(--hero-ground);
  }

  /* The brand panel carries the mark; the card's own wordmark would be a second. */
  .auth-split .auth-logo {
    display: none;
  }
}

.auth-brand-logo {
  align-self: flex-start;
  width: auto;
  height: 36px;
}

.auth-brand-title {
  margin: 64px 0 0;
  max-width: 440px;
  font: var(--font-display-md);
  color: var(--brand-on-dark);
}

.auth-brand-lead {
  margin: 0;
  max-width: 440px;
  font: var(--font-lead);
  color: var(--hero-ink-lead);
}

/* Paper carries the form alone. */
@media print {
  .auth-split {
    display: block;
  }

  .auth-brand {
    display: none;
  }
}
