/* auth.css — sign-in / create-account page (HTML/login.html).
 *
 * Pairs with CSS/landing.css, not the app's stylesheets. This page sits on the
 * public side of the site: someone using it hasn't entered a ladder yet, so it
 * carries the marketing palette and none of the ladder chrome or per-player
 * themes. Everything here is scoped under .auth-page. */

.auth-page .auth-main {
    padding: 56px 24px 88px;
}

/* Form on the left, "what happens next" on the right. The aside is the whole
   reason this page is wide rather than a centred card — creating an account
   here means creating a *ladder*, and that should be visible before signing
   up, not discovered afterwards. */
.auth-shell {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: 48px;
    align-items: start;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.auth-card {
    background: var(--ls-card);
    border: 1px solid var(--ls-border);
    border-radius: 16px;
    padding: 36px 32px;
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 1.6rem;
    line-height: 1.25;
}

.auth-sub {
    margin: 0 0 26px;
    color: var(--ls-text-dim);
    font-size: 0.92rem;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
.auth-field {
    display: block;
    margin-bottom: 16px;
}

.auth-field span {
    display: block;
    font-size: 0.8rem;
    color: var(--ls-text-dim);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 9px;
    border: 1px solid var(--ls-border);
    background: rgba(0, 0, 0, 0.28);
    color: var(--ls-text);
    font-family: inherit;
    font-size: 0.98rem;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--ls-accent);
    box-shadow: 0 0 0 3px rgba(224, 80, 208, 0.15);
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 20px;
    color: var(--ls-text-dim);
    font-size: 0.86rem;
    line-height: 1.45;
    cursor: pointer;
}

.auth-check input {
    margin-top: 3px;
    accent-color: var(--ls-accent);
    flex-shrink: 0;
}

.auth-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 13px 22px;
}

.auth-error {
    display: none;          /* login.js flips this to block on failure */
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ff8b7d;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.45;
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--ls-text-dim);
    font-size: 0.88rem;
    text-align: center;
}

/* ── "What happens next" ────────────────────────────────────────────────── */
.auth-aside {
    padding-top: 12px;
}

.auth-aside h2 {
    margin: 0 0 20px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ls-text-dim);
}

.auth-steps {
    list-style: none;
    counter-reset: auth-step;
    margin: 0;
    padding: 0;
}

.auth-steps li {
    counter-increment: auth-step;
    position: relative;
    padding: 0 0 22px 44px;
}

.auth-steps li::before {
    content: counter(auth-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--ls-accent);
    color: var(--ls-accent);
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Connecting line between step markers. */
.auth-steps li::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 32px;
    bottom: 6px;
    width: 1px;
    background: var(--ls-border);
}

.auth-steps li:last-child { padding-bottom: 6px; }
.auth-steps li:last-child::after { display: none; }

.auth-steps strong {
    display: block;
    font-size: 0.94rem;
    margin-bottom: 3px;
}

.auth-steps span {
    color: var(--ls-text-dim);
    font-size: 0.86rem;
    line-height: 1.5;
}

.auth-aside-note {
    margin: 4px 0 0;
    color: var(--ls-text-dim);
    font-size: 0.82rem;
    font-style: italic;
}

/* ── Narrow ─────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 36px;
        max-width: 460px;
    }
    /* Form first on a phone — the explainer is context, not a blocker. */
    .auth-aside { order: 2; padding-top: 0; }
    .auth-page .auth-main { padding: 32px 20px 64px; }
}

@media (max-width: 480px) {
    .auth-card { padding: 26px 20px; }
    .auth-card h1 { font-size: 1.35rem; }
}
