/* Landing page (pre-login) — split layout: hero (left) + signup card (right).
 * Layout only; every visual primitive is in components.css. */

/* Fixed top-of-viewport toast (email verified, etc.) */
.toast-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #dcfce7;
    color: #166534;
    padding: 12px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.4s ease;
}
.toast-banner--fading {
    opacity: 0;
}

.landing {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.landing__hero {
    background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
    color: var(--hero-ink);
    padding: var(--s-10) var(--s-9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--s-5);
}

.landing__brand {
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--hero-brand);
    text-transform: uppercase;
}

.landing__headline {
    font-size: var(--text-5xl);
    line-height: 1.1;
    font-weight: 700;
    max-width: 12ch;
}

.landing__lede {
    font-size: var(--text-lg);
    color: #cbd5e1;
    max-width: 50ch;
}

.landing__features {
    list-style: none;
    padding: 0;
    margin: var(--s-3) 0 0;
    display: grid;
    gap: var(--s-3);
    max-width: 50ch;
}

.landing__features li {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: var(--s-3);
    align-items: start;
    color: #e2e8f0;
    font-size: var(--text-sm);
}

.landing__features li::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: var(--r-pill);
    background: var(--hero-dot);
}

.landing__form-pane {
    background: var(--surface);
    padding: var(--s-10) var(--s-9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.auth-card__tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin: 0;
}

.auth-card__tab {
    flex: 1;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--ink-muted);
    font-size: var(--text-base);
    font-weight: 500;
    padding: var(--s-3) var(--s-2);
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 120ms ease, border-color 120ms ease;
    font-family: inherit;
}

.auth-card__tab:hover:not(.is-active) {
    color: var(--ink);
}

.auth-card__tab.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-card__tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

.auth-card__lede {
    color: var(--ink-muted);
    font-size: var(--text-sm);
    margin: 0;
}

/* Mode-driven show/hide: anything tagged `data-only="signin"` hides
 * when the card is in signup mode, and vice versa. Cheap toggling
 * without form re-instantiation. */
.auth-card[data-mode="signin"] [data-only="signup"],
.auth-card[data-mode="signup"] [data-only="signin"] {
    display: none !important;
}

/* Policy list visibility is keyed off a separate ``is-validating``
 * class that the JS sets when the user is mid-validation in signup
 * mode (typed something but not all rules met yet). Empty signup
 * form and "all 5 rules met" both leave is-validating off, so the
 * list stays hidden and the card height matches the signin form in
 * both bookend states. Each rule greens via the ``--met`` rule
 * defined in components.css. */
.policy-list {
    display: none;
}
.auth-card[data-mode="signup"].is-validating .policy-list {
    display: grid;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.auth-form__submit {
    margin-top: var(--s-2);
}

.auth-card__switch {
    text-align: center;
    color: var(--ink-muted);
    font-size: var(--text-sm);
    margin: 0;
}

.auth-card__switch-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-card__switch-link:hover {
    /* A CTA-style link ("Create one →" / "Sign in →") — the hover
       underline read as a glitch. Deepen the colour instead. */
    color: var(--primary-h);
    text-decoration: none;
}

@media (max-width: 900px) {
    .landing {
        grid-template-columns: 1fr;
    }
    .landing__hero,
    .landing__form-pane {
        padding: var(--s-7) var(--s-5);
    }
    .landing__headline {
        font-size: var(--text-3xl);
    }
}
