
/* Authentication pages use the same grid, indigo glow and code-window language as the landing page. */
.auth-page {
    --auth-radius: 14px;
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    overflow: hidden;
    padding: 24px clamp(22px, 4.5vw, 72px) 18px;
    background: var(--hiper-bg);
    color: var(--hiper-text);
    font-family: "Sora", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.has-environment-ribbon .auth-page {
    min-height: calc(100vh - 2rem);
}

.auth-backdrop-grid {
    position: absolute;
    z-index: -2;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--hiper-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--hiper-border) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.48;
    mask-image: radial-gradient(ellipse 84% 70% at 50% 0%, #000 18%, transparent 88%);
    -webkit-mask-image: radial-gradient(ellipse 84% 70% at 50% 0%, #000 18%, transparent 88%);
}

.auth-backdrop-glow {
    position: absolute;
    z-index: -1;
    width: 40rem;
    height: 32rem;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.auth-backdrop-glow-primary {
    top: -15rem;
    left: -12rem;
    background: var(--hiper-accent);
}

.auth-backdrop-glow-secondary {
    right: -20rem;
    bottom: -17rem;
    background: var(--hiper-accent-secondary);
    opacity: 0.08;
}

.auth-topbar,
.auth-main,
.auth-footer {
    width: min(1112px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--hiper-text);
    text-decoration: none;
}

.auth-brand:hover {
    color: var(--hiper-text);
    text-decoration: none;
}

.auth-brand-mark {
    display: block;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.auth-brand-wordmark {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.auth-brand-wordmark span {
    color: var(--hiper-accent-bright);
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--hiper-muted);
    font-size: 0.83rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 160ms ease;
}

.auth-back-link:hover {
    color: var(--hiper-text);
    text-decoration: none;
}

.auth-back-link .icon {
    width: 1rem;
    height: 1rem;
}

.auth-main {
    display: grid;
    flex: 1 0 auto;
    grid-template-columns: minmax(0, 1.08fr) minmax(370px, 0.82fr);
    align-items: center;
    gap: 32px;
    padding: 0 0 clamp(38px, 6vh, 66px);
}

.auth-story {
    min-width: 0;
    max-width: 630px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.4rem;
    padding: 0.42rem 0.82rem;
    border: 1px solid rgb(66 99 235 / 35%);
    border-radius: 999px;
    background: var(--hiper-accent-soft);
    color: var(--hiper-accent-bright);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.auth-eyebrow-dot {
    width: 0.42rem;
    height: 0.42rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--hiper-accent);
    box-shadow: 0 0 12px rgb(66 99 235 / 70%);
}

.auth-story h1 {
    margin: 0 0 1.2rem;
    color: var(--hiper-text);
    font-size: clamp(2.55rem, 4.2vw, 4.45rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 1.08;
}

.auth-story h1 span {
    background: linear-gradient(120deg, var(--hiper-accent-bright), var(--hiper-accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.auth-story-lead {
    max-width: 570px;
    margin: 0;
    color: var(--hiper-muted);
    font-size: clamp(0.98rem, 1.2vw, 1.12rem);
    line-height: 1.8;
}

.auth-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    margin-top: 1.8rem;
}

.auth-benefit {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    min-width: 0;
}

.auth-benefit-icon {
    display: grid;
    width: 1.4rem;
    height: 1.4rem;
    flex: 0 0 auto;
    place-items: center;
    color: var(--hiper-success);
}

.auth-benefit-icon .icon {
    width: 1.15rem;
    height: 1.15rem;
}

.auth-benefit strong,
.auth-benefit small {
    display: block;
}

.auth-benefit strong {
    color: var(--hiper-text);
    font-size: 0.78rem;
    font-weight: 600;
}

.auth-benefit small {
    margin-top: 0.15rem;
    color: var(--hiper-muted);
    font-size: 0.72rem;
    line-height: 1.5;
}

.auth-form-column {
    width: 100%;
    max-width: 480px;
    min-width: 0;
    justify-self: end;
}

.auth-panel {
    overflow: hidden;
    border: 1px solid var(--hiper-border-strong);
    border-radius: 20px;
    background: linear-gradient(145deg, var(--hiper-card), var(--hiper-bg-soft));
    box-shadow: 0 28px 75px rgb(0 0 0 / 28%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-panel-content {
    padding: clamp(26px, 3.2vw, 38px);
}

.auth-form-heading {
    margin-bottom: 1.8rem;
}

.auth-form-kicker {
    margin-bottom: 0.7rem;
    color: var(--hiper-accent-bright);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.auth-form-title {
    margin: 0 0 0.55rem;
    color: var(--hiper-text);
    font-size: clamp(1.5rem, 2.3vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1.25;
}

.auth-form-description {
    margin: 0;
    color: var(--hiper-muted);
    font-size: 0.82rem;
    line-height: 1.7;
}

.auth-field .form-label {
    margin-bottom: 0.52rem;
    color: var(--hiper-text);
    font-size: 0.77rem;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > .icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 0.95rem;
    width: 1.05rem;
    height: 1.05rem;
    color: var(--hiper-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.auth-control.form-control {
    min-height: 3.05rem;
    padding: 0.72rem 0.9rem 0.72rem 2.75rem;
    border: 1px solid var(--hiper-border-strong);
    border-radius: 10px;
    background: rgb(3 7 22 / 54%);
    color: var(--hiper-text);
    font-family: inherit;
    font-size: 0.8rem;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-control.form-control::placeholder {
    color: rgb(143 157 181 / 72%);
    opacity: 1;
}

.auth-control.form-control:focus {
    border-color: var(--hiper-accent-bright);
    background: rgb(3 7 22 / 74%);
    color: var(--hiper-text);
    box-shadow: 0 0 0 3px var(--hiper-accent-soft);
}

.auth-form-options {
    display: flex;
    justify-content: flex-end;
    font-size: 0.75rem;
}

.auth-form-options a,
.auth-form-footer a,
.auth-help-text a {
    color: var(--hiper-accent-bright);
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}

.auth-form-options a:hover,
.auth-form-footer a:hover,
.auth-help-text a:hover {
    color: var(--hiper-accent-secondary);
    text-decoration: none;
}

.auth-submit.btn {
    display: inline-flex;
    min-height: 3.05rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid var(--hiper-accent);
    border-radius: 10px;
    background: var(--hiper-accent);
    color: #fff;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgb(66 99 235 / 28%);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-submit.btn:hover,
.auth-submit.btn:focus-visible {
    border-color: var(--hiper-accent-bright);
    background: var(--hiper-accent-bright);
    color: #101936;
    box-shadow: 0 12px 28px rgb(66 99 235 / 34%);
    transform: translateY(-1px);
}

.auth-submit .icon {
    width: 1.05rem;
    height: 1.05rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.45rem 0 1.25rem;
    color: var(--hiper-muted);
    font-size: 0.7rem;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: var(--hiper-border);
    content: "";
}

.auth-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--hiper-muted);
    font-size: 0.75rem;
    text-align: center;
}

.auth-form-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.auth-form-footer .icon {
    width: 0.85rem;
    height: 0.85rem;
}

.auth-register-footer {
    margin-top: 1.5rem;
}

.auth-panel-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.25rem;
    border-top: 1px solid var(--hiper-border);
    background: rgb(3 7 22 / 16%);
    color: var(--hiper-muted);
    font-size: 0.65rem;
    text-align: center;
}

.auth-panel-bottom .icon {
    width: 0.95rem;
    height: 0.95rem;
    flex: 0 0 auto;
    color: var(--hiper-success);
}

.auth-help-text {
    margin: 1rem 0 0;
    color: var(--hiper-muted);
    font-size: 0.7rem;
    text-align: center;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hiper-border);
    color: var(--hiper-muted);
    font-size: 0.66rem;
}

.auth-footer-tagline {
    margin-left: auto;
}

.auth-footer nav {
    display: inline-flex;
    gap: 1rem;
}

.auth-footer a {
    color: var(--hiper-muted);
    text-decoration: none;
    transition: color 160ms ease;
}

.auth-footer a:hover {
    color: var(--hiper-text);
    text-decoration: none;
}

.auth-page .app-toast-container {
    z-index: 1100;
}

.auth-page .toast {
    --tblr-toast-bg: var(--hiper-card);
}

@media (max-width: 1050px) {
    .auth-main {
        grid-template-columns: minmax(0, 1fr) minmax(350px, 0.9fr);
        gap: clamp(32px, 4vw, 56px);
    }

    .auth-story h1 {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }
}

@media (max-width: 820px) {
    .auth-page {
        padding: 20px 22px 16px;
    }

    .auth-main {
        width: min(540px, 100%);
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
        padding: 42px 0 32px;
    }

    .auth-story {
        max-width: none;
    }

    .auth-story h1 {
        font-size: clamp(2.25rem, 8vw, 3.25rem);
    }

    .auth-story-lead {
        max-width: 540px;
        font-size: 0.92rem;
    }

    .auth-benefits {
        gap: 0.9rem 1.5rem;
        margin-top: 1.3rem;
    }

    .auth-form-column {
        max-width: none;
        justify-self: stretch;
    }

    .auth-panel-content {
        padding: clamp(24px, 6vw, 34px);
    }

    .auth-footer-tagline {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding-right: 16px;
        padding-left: 16px;
    }

    .auth-topbar {
        gap: 0.75rem;
    }

    .auth-brand-mark {
        width: 2.2rem;
        height: 2.2rem;
    }

    .auth-brand-wordmark {
        font-size: 1rem;
    }

    .auth-back-link {
        font-size: 0.72rem;
    }

    .auth-main {
        padding-top: 34px;
        padding-bottom: 26px;
    }

    .auth-eyebrow {
        margin-bottom: 1rem;
        font-size: 0.59rem;
        letter-spacing: 0.075em;
    }

    .auth-story h1 {
        font-size: clamp(2rem, 10vw, 2.7rem);
    }

    .auth-benefits {
        display: grid;
        gap: 0.8rem;
    }

    .auth-panel {
        border-radius: 16px;
    }

    .auth-panel-content {
        padding: 23px 20px 25px;
    }

    .auth-form-heading {
        margin-bottom: 1.4rem;
    }

    .auth-footer {
        justify-content: center;
        text-align: center;
    }

    .auth-footer-tagline {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-back-link,
    .auth-form-options a,
    .auth-form-footer a,
    .auth-help-text a,
    .auth-submit.btn,
    .auth-footer a {
        transition: none;
        transform: none;
    }
}
