@import url("/fonts/site.css");

/* Auth pages — same studio tokens as landing */
:root {
    color-scheme: dark;
    --lp-ink: oklch(0.96 0.005 270);
    --lp-mute: oklch(0.65 0.015 270);
    --lp-faint: oklch(0.55 0.012 270);
    --lp-primary: oklch(0.65 0.2 275);
    --lp-primary-fg: oklch(0.99 0 0);
    --lp-success: oklch(0.72 0.17 155);
    --lp-warning: oklch(0.8 0.15 80);
    --lp-deep: oklch(0.145 0.006 270);
    --lp-card: oklch(0.185 0.008 270);
    --lp-line: oklch(1 0 0 / 8%);
    --lp-radius: 0.625rem;
}

* { box-sizing: border-box; }

body.auth {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--lp-ink);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    background: var(--lp-deep);
    overflow-x: hidden;
}

body.auth a { color: inherit; text-decoration: none; }
body.auth button { font: inherit; color: inherit; cursor: pointer; border: 0; }

.lpTop {
    position: fixed; inset: 0 0 auto 0; z-index: 40;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px clamp(18px, 4vw, 40px);
    background: linear-gradient(180deg, oklch(0.145 0.006 270 / .96), oklch(0.145 0.006 270 / .55) 80%, transparent);
    backdrop-filter: blur(12px);
}
.lpMark { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.lpMarkIcon { height: 28px; width: 28px; border-radius: 7px; display: block; flex: none; }
.lpMarkName { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; line-height: 1; }
.lpTopNav { display: flex; align-items: center; gap: 10px; }

.lpGhost {
    height: 38px; padding: 0 14px; border-radius: var(--lp-radius);
    border: 1px solid var(--lp-line); background: oklch(1 0 0 / 3%);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .92rem;
    transition: background .2s ease, border-color .2s ease;
}
.lpGhost:hover { background: oklch(0.65 0.2 275 / .12); border-color: oklch(0.65 0.2 275 / .35); }
.lpSolid {
    height: 38px; padding: 0 18px; border-radius: var(--lp-radius);
    background: var(--lp-primary); color: var(--lp-primary-fg);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .92rem;
    transition: transform .2s ease, filter .2s ease;
}
.lpSolid:hover { filter: brightness(1.08); transform: translateY(-1px); }
.lpSolid.lg, .lpGhost.lg { height: 48px; padding: 0 22px; font-size: 1rem; }
button.lpSolid, button.lpGhost { width: 100%; }
/* .lpSolid sets display, which beats the hidden attribute. */
button[hidden], .lpSolid[hidden], .lpGhost[hidden] { display: none !important; }

.authStage {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: clamp(100px, 12vh, 130px) clamp(18px, 4vw, 40px) clamp(48px, 8vh, 80px);
    isolation: isolate;
}
.authStage::before {
    content: "";
    position: absolute; inset: 0; z-index: -1; overflow: hidden;
    background:
        radial-gradient(ellipse 65% 42% at 75% 6%, oklch(0.65 0.2 275 / .18), transparent 58%),
        radial-gradient(ellipse 40% 35% at 10% 80%, oklch(0.7 0.18 230 / .08), transparent 55%),
        linear-gradient(180deg, oklch(0.16 0.008 270) 0%, var(--lp-deep) 62%, oklch(0.12 0.006 270) 100%);
}
.authStage::after {
    content: "";
    position: absolute; inset: -10%; z-index: -1;
    background: linear-gradient(118deg, transparent 38%, oklch(0.65 0.2 275 / .06) 50%, transparent 62%);
    animation: authDrift 18s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes authDrift {
    from { transform: translate3d(-2%, 0, 0); }
    to { transform: translate3d(2%, 1%, 0); }
}

.authPanel {
    width: 100%;
    max-width: 420px;
    padding: clamp(28px, 4vw, 36px);
    border-radius: calc(var(--lp-radius) + 4px);
    border: 1px solid var(--lp-line);
    background: oklch(0.185 0.008 270 / .72);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px oklch(0 0 0 / .35);
    opacity: 0;
    animation: authRise .7s ease forwards;
}
@keyframes authRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.authEyebrow {
    margin: 0 0 10px;
    font-size: .78rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--lp-primary);
}
.authPanel h1 {
    margin: 0 0 8px;
    font-family: Sora, sans-serif;
    font-size: clamp(1.65rem, 3.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
}
.authLead {
    margin: 0 0 8px;
    color: var(--lp-mute);
    font-size: 1rem;
    line-height: 1.5;
}

.authMsg {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: var(--lp-radius);
    font-size: .92rem;
    line-height: 1.4;
}
.authMsg[hidden] { display: none !important; }
.authMsg.error {
    color: oklch(0.92 0.06 25);
    background: oklch(0.45 0.12 25 / .22);
    border: 1px solid oklch(0.55 0.14 25 / .35);
}
.authMsg.note {
    color: oklch(0.9 0.05 155);
    background: oklch(0.45 0.1 155 / .18);
    border: 1px solid oklch(0.55 0.12 155 / .3);
}

.authPanel form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}
.authPanel form[hidden] { display: none !important; }
.authPanel label {
    display: grid;
    gap: 6px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--lp-mute);
}
.authPanel input:not([type="checkbox"]) {
    height: 48px;
    border-radius: var(--lp-radius);
    border: 1px solid var(--lp-line);
    background: oklch(0.125 0.006 270 / .85);
    padding: 0 14px;
    color: var(--lp-ink);
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.authPanel input:focus {
    border-color: oklch(0.65 0.2 275 / .55);
    box-shadow: 0 0 0 3px oklch(0.65 0.2 275 / .18);
}
.authPanel input::placeholder { color: var(--lp-faint); }
.authCheck {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    color: var(--lp-mute);
}
.authCheck input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--lp-primary); flex: none; }
.authCheck a { color: var(--lp-primary); text-decoration: underline; text-underline-offset: 3px; }

.authRow {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: .9rem;
    font-weight: 500;
    color: var(--lp-mute);
}
.authRow label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.authRow input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--lp-primary);
}
.authRow a,
.authFoot a {
    color: var(--lp-primary);
    font-weight: 600;
}
.authRow a:hover,
.authFoot a:hover { text-decoration: underline; }

.authActions { display: grid; gap: 10px; }

.authFoot {
    margin: 22px 0 0;
    text-align: center;
    font-size: .92rem;
    color: var(--lp-mute);
}

@media (max-width: 520px) {
    .authPanel {
        padding: 24px 18px;
        border-radius: var(--lp-radius);
    }
}
