/* Flashcard Factory — the signed-out pages (sign in, sign up, password reset).
   Loaded after landing.css by accounts/_auth_page.html, inside `.lp`, so the
   palette, type, pills and index cards are the landing page's own. Everything
   here is scoped under `.au`. */

.au {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    min-height: 100dvh;
}

/* ── The form column: squared paper, as under the landing hero ─────────── */
.au-main {
    position: relative;
    display: flex; flex-direction: column;
    padding-inline: var(--lp-gutter);
    background-image:
        linear-gradient(var(--lp-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--lp-line) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: -1px -1px;
}
.au-main::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 50% 45%, rgba(244, 246, 251, 0.2), var(--lp-paper) 78%);
}
.au-main > * { position: relative; z-index: 1; }

.au-head { display: flex; align-items: center; gap: 16px; padding-block: 20px; }
.au-head-end { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--lp-ink-dim); }

.au-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: clamp(24px, 5vw, 40px);
    background: var(--lp-surface);
    border: 1px solid var(--lp-line);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(22, 26, 44, 0.05), 0 30px 60px -30px rgba(22, 26, 44, 0.3);
}
@media (prefers-reduced-motion: no-preference) {
    .au-card { animation: lp-land 520ms cubic-bezier(.2, .8, .25, 1) backwards; }
}

.au-eyebrow {
    margin-bottom: 10px;
    font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--lp-pen);
}
.lp .au-card h1 {
    font-size: clamp(1.875rem, 4vw, 2.375rem);
    font-weight: 700;
    font-stretch: 84%;
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: none;
}
.au-intro { margin-top: 10px; color: var(--lp-ink-muted); }
.au-intro + .au-intro { margin-top: 8px; }

/* ── Fields ────────────────────────────────────────────────────────────── */
/* _form_fields.html is shared with the account page, so it keeps the app's
   class names and this restyles them here only. */
.au-card .space-y-4 > * + * { margin-top: 18px; }
.au .label {
    margin-bottom: 6px;
    font-size: 0.875rem; font-weight: 600; color: var(--lp-ink);
}
.au .help { margin-top: 6px; font-size: 0.8125rem; line-height: 1.45; color: var(--lp-ink-dim); }
.au .field-error { margin-top: 6px; font-size: 0.8125rem; font-weight: 500; color: #b42318; }

/* Beats app.css's `body input[type=…]` on weight, so no !important. */
.au-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    min-height: 48px;
    padding: 11px 14px;
    font: 400 1rem/1.4 var(--lp-sans);
    color: var(--lp-ink);
    background: var(--lp-surface);
    border: 1.5px solid var(--lp-line-strong);
    border-radius: 12px;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}
.au-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover { border-color: #a5aec2; }
.au-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus {
    outline: none;
    border-color: var(--lp-pen);
    box-shadow: 0 0 0 4px rgba(51, 70, 211, 0.14);
}
.au-card input[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]) { border-color: #d92d20; }
.au-card input[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]):focus { box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.14); }

.au .form-alert {
    margin-top: 20px;
    padding: 12px 14px;
    font-size: 0.9375rem; line-height: 1.45;
    color: #912018;
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 12px;
}

/* ── Actions and links ─────────────────────────────────────────────────── */
.au-submit { width: 100%; height: 50px; margin-top: 28px; font-size: 1rem; }
.au-forgot { margin-top: 12px; text-align: right; font-size: 0.875rem; }
.au-card a:not(.lp-btn), .au-head-end a:not(.lp-btn) {
    color: var(--lp-pen); font-weight: 500;
    text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
    transition: text-decoration-color 140ms ease;
}
.au-card a:not(.lp-btn):hover, .au-head-end a:not(.lp-btn):hover { text-decoration-color: currentColor; }

/* "or", ruled either side: the second way in, below the first. */
.au-or {
    display: flex; align-items: center; gap: 12px;
    margin-top: 24px;
    font-size: 0.8125rem; color: var(--lp-ink-dim);
}
.au-or::before, .au-or::after { content: ""; flex: 1; border-top: 1px solid var(--lp-line); }
.au-alt { width: 100%; margin-top: 16px; }
.au-note { margin-top: 20px; text-align: center; font-size: 0.875rem; color: var(--lp-ink-muted); }

.au-foot {
    display: flex; justify-content: center; gap: 20px;
    padding-block: 24px;
    font-size: 0.8125rem;
}
.au-foot a { color: var(--lp-ink-dim); text-decoration: none; }
.au-foot a:hover { color: var(--lp-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── The night panel: the landing page's closing band, with cards dealt ── */
.au-side {
    position: relative;
    display: flex; align-items: center;
    padding: 64px clamp(40px, 5vw, 80px);
    background-color: var(--lp-night);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    color: #c9cff0;
    overflow: hidden;
}
/* A pool of pen-blue light behind the cards, so the panel is not flat. */
.au-side::before {
    content: ""; position: absolute; pointer-events: none;
    width: 640px; height: 640px; right: -180px; bottom: -220px;
    background: radial-gradient(circle, rgba(51, 70, 211, 0.55), transparent 65%);
}
.au-side-inner { position: relative; width: 100%; max-width: 480px; }
.au-side-kicker {
    font: 700 clamp(2.25rem, 3.6vw, 3.25rem)/1.02 var(--lp-display);
    font-stretch: 82%;
    letter-spacing: -0.025em;
    color: #fff;
    text-wrap: balance;
}
.au-side-lead { margin-top: 20px; font-size: 1.0625rem; line-height: 1.55; max-width: 28em; }
.au-side-lead strong { color: #fff; font-weight: 600; }

.au-deal { position: relative; height: 300px; margin-top: 48px; }
.au-deal .lp-ix {
    --ix-head: 34px;
    --ix-line: 24px;
    position: absolute;
    width: min(330px, 78%);
    aspect-ratio: 5 / 3;
    padding-inline: 18px;
    overflow: hidden;
    transform: rotate(var(--turn));
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 30px 50px -20px rgba(0, 0, 0, 0.55);
}
.au-deal .lp-ix-text { font-size: 0.9375rem; }
.au-ix-1 { --turn: -5deg; left: 0; top: 0; }
.au-ix-2 { --turn: 4deg; right: 0; top: 110px; }
@media (prefers-reduced-motion: no-preference) {
    .au-deal .lp-ix { animation: lp-deal 640ms cubic-bezier(.2, .9, .3, 1.12) backwards; }
    .au-ix-1 { animation-delay: 260ms; }
    .au-ix-2 { animation-delay: 380ms; }
}

/* ── Narrow ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .au { grid-template-columns: minmax(0, 1fr); }
    .au-side { display: none; }
}
@media (max-width: 480px) {
    .au-card { border-radius: 16px; }
    /* The card carries the same link, and a phone has no room for both. */
    .au-head-end { display: none; }
}
