:root {
    color-scheme: dark;
    --background: #13111a;
    --surface: #1c1825;
    --surface-raised: #242030;
    --border: #383143;
    --text: #f7f3ff;
    --muted: #b7afc4;
    --lavender: #c9bce1;
    --mint: #00d0a2;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

.login-page {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    margin: 0;
    background:
        radial-gradient(ellipse at 20% 46%, #392a48 0, transparent 55%),
        radial-gradient(ellipse at 100% 100%, #152c28 0, transparent 43%),
        var(--background);
    color: var(--text);
}

.login-header,
.login-footer {
    display: flex;
    width: min(1440px, calc(100% - 112px));
    margin-inline: auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-header {
    padding-block: 32px 23px;
    border-bottom: 1px solid #c9bce124;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.065em;
    line-height: 1;
    text-decoration: none;
}

.login-brand img {
    display: block;
    border-radius: 9px;
    box-shadow: 0 0 0 1px #c9bce140;
}

.product-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    border: 1px solid #c9bce137;
    border-radius: 8px;
    background: #191623a8;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.product-link span {
    color: var(--mint);
    font-size: 17px;
    line-height: 1;
}

.product-link:hover {
    border-color: var(--lavender);
    background: var(--surface-raised);
}

.login-layout {
    display: grid;
    width: min(1184px, calc(100% - 112px));
    flex: 1;
    grid-template-columns: minmax(0, 1.28fr) minmax(350px, 1fr);
    align-items: center;
    gap: clamp(38px, 6.4vw, 112px);
    margin-inline: auto;
    padding-block: 55px;
}

.product-intro h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(44px, 5.8vw, 88px);
    font-weight: 740;
    letter-spacing: -.075em;
    line-height: 1;
    word-spacing: .025em;
}

.product-intro h1 span {
    display: block;
    color: var(--lavender);
}

.product-intro__copy {
    max-width: 41ch;
    margin: 22px 0 0;
    color: #ddd3e6;
    font-size: clamp(15px, 1.4vw, 19px);
    line-height: 1.6;
    text-wrap: pretty;
}

.login-card {
    position: relative;
    min-width: 0;
    padding: clamp(26px, 3.4vw, 49px);
    border: 1px solid #c9bce140;
    border-radius: 18px;
    background: linear-gradient(150deg, #241e2d, var(--surface) 52%, #191721);
    box-shadow: 0 28px 70px #0a080db5;
}

.login-card::before {
    position: absolute;
    inset: -1px 20px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d6b6ffa8 44%, #d6b6ff3d 84%, transparent);
    content: "";
}

.login-card h2 {
    margin: 0;
    font-size: clamp(31px, 3vw, 42px);
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: 1.1;
}

.login-card__copy {
    margin: 10px 0 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.login-card form {
    display: grid;
    gap: 20px;
}

.login-error {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #ba6a81;
    border-radius: 8px;
    background: #4a2738;
    color: #ffdeea;
    font-size: 14px;
    line-height: 1.45;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #eee7f7;
    font-size: 14px;
    font-weight: 590;
}

.login-field__control {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
}

.login-field input {
    width: 100%;
    min-height: 52px;
    padding: 11px 13px 11px 43px;
    border: 1px solid #544963;
    border-radius: 8px;
    background: #17141f;
    color: var(--text);
    font: inherit;
}

.login-field input[name="_password"] {
    padding-right: 52px;
}

.login-field input::placeholder {
    color: #a79bb6;
    opacity: 1;
}

.login-field input:hover {
    border-color: #89769d;
}

.login-page :is(a, button, input):focus-visible {
    outline: 2px solid var(--lavender);
    outline-offset: 3px;
}

.field-icon {
    position: absolute;
    left: 16px;
    color: var(--lavender);
    pointer-events: none;
}

.field-icon--email {
    width: 16px;
    height: 12px;
    overflow: hidden;
    border: 1.5px solid currentColor;
    border-radius: 3px;
}

.field-icon--email::after {
    position: absolute;
    top: -5px;
    left: 2px;
    width: 9px;
    height: 9px;
    transform: rotate(45deg);
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    border-radius: 2px;
    content: "";
}

.field-icon--lock {
    left: 17px;
    width: 14px;
    height: 10px;
    transform: translateY(3px);
    border: 1.5px solid currentColor;
    border-radius: 3px;
}

.field-icon--lock::before {
    position: absolute;
    bottom: 100%;
    left: 2px;
    width: 7px;
    height: 7px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    content: "";
}

.password-toggle {
    position: absolute;
    right: 5px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--lavender);
    cursor: pointer;
}

.password-toggle[hidden] {
    display: none;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
    background: #31273f;
    color: var(--text);
}

.password-toggle:focus-visible {
    outline-offset: -2px;
}

.password-toggle__eye {
    display: grid;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    place-items: center;
    border: 1.5px solid currentColor;
    border-radius: 75% 12%;
}

.password-toggle__eye::after {
    width: 5px;
    height: 5px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    content: "";
}

.login-submit {
    display: flex;
    min-height: 53px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
    padding: 10px 16px;
    border: 1px solid #eadbfb;
    border-radius: 8px;
    background: linear-gradient(105deg, #e1cff6, #c9b2ee);
    box-shadow: 0 6px 18px #ac85e036;
    color: #221831;
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
}

.login-submit:hover {
    background: #eedfff;
}

.login-submit span {
    font-size: 23px;
    line-height: 1;
}

.login-access {
    margin: 23px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.login-footer {
    padding-block: 19px 24px;
    border-top: 1px solid #c9bce124;
    color: var(--muted);
    font-size: 12px;
}

.login-footer a {
    color: inherit;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-footer strong {
    color: var(--text);
    font-weight: 650;
}

@media (max-width: 980px) {
    .login-header,
    .login-layout,
    .login-footer {
        width: calc(100% - 64px);
    }
}

@media (max-width: 760px) {
    .login-header,
    .login-layout,
    .login-footer {
        width: min(460px, calc(100% - 36px));
    }

    .login-header {
        padding-block: 20px 17px;
    }

    .login-brand {
        gap: 9px;
        font-size: 24px;
    }

    .login-brand img {
        width: 36px;
        height: 36px;
    }

    .product-link {
        gap: 7px;
        padding-inline: 9px;
        font-size: 12px;
    }

    .login-layout {
        grid-template-columns: minmax(0, 1fr);
        align-content: center;
        gap: 24px;
        padding-block: 32px;
    }

    .product-intro h1 {
        font-size: clamp(37px, 8.6vw, 55px);
    }

    .product-intro__copy {
        margin-top: 12px;
    }

    .login-card__copy {
        margin-bottom: 20px;
    }

    .login-card form {
        gap: 15px;
    }
}

.login-signup-link {
    color: var(--lavender);
    text-underline-offset: .2em;
}
