:root {
    color-scheme: dark;
    font-family: Inter, Manrope, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: #0c1737;
}

.welcome-page {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    color: #fff;
    background-color: #0c1737;
    background-image: url("./back/welcome.webp");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.welcome-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 12, 34, 0.62) 0%, rgba(5, 12, 34, 0.22) 49%, rgba(5, 12, 34, 0.48) 100%),
        linear-gradient(180deg, rgba(7, 14, 36, 0.12) 0%, rgba(6, 12, 31, 0.12) 55%, rgba(5, 10, 27, 0.64) 100%);
}

.welcome-page::after {
    content: "";
    position: fixed;
    top: -24vw;
    right: -20vw;
    z-index: 0;
    width: 62vw;
    height: 62vw;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(91, 159, 255, 0.18);
    filter: blur(90px);
    animation: welcome-ambient 12s ease-in-out infinite alternate;
}

.welcome-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    gap: clamp(48px, 7vw, 112px);
    align-items: center;
    width: min(1480px, 100%);
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 76px);
}

.welcome-story {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.welcome-story__content {
    width: min(760px, 100%);
    margin: auto 0;
    padding: 0 0 38px;
    animation: welcome-rise 720ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(1, 5, 20, 0.45);
}

.welcome-eyebrow span {
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: #ff8ea2;
    box-shadow: 0 0 16px rgba(255, 142, 162, 0.75);
}

.welcome-story h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(48px, 5.8vw, 86px);
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 0.98;
    text-wrap: balance;
    text-shadow: 0 5px 28px rgba(1, 5, 20, 0.46);
}

.welcome-story h1 em {
    color: #ff9aac;
    font-style: normal;
    font-weight: inherit;
}

.welcome-lead {
    max-width: 650px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.6;
    text-shadow: 0 3px 18px rgba(1, 5, 20, 0.52);
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 740px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.welcome-features li {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 25px rgba(2, 7, 22, 0.1);
    contain: paint;
}

.welcome-feature__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 11px;
    color: #ffd3db;
    background: rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.welcome-features li > span:last-child {
    min-width: 0;
}

.welcome-features strong,
.welcome-features small {
    display: block;
}

.welcome-features strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.welcome-features small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.61);
    font-size: 10px;
    line-height: 1.25;
}

.welcome-footnote {
    margin: 0;
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    letter-spacing: 0.035em;
}

.welcome-auth {
    position: relative;
    width: 100%;
    padding: clamp(30px, 3.2vw, 42px);
    overflow: hidden;
    color: var(--user-ink);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 34px;
    box-shadow: 0 34px 90px rgba(2, 7, 24, 0.42), 0 10px 28px rgba(2, 7, 24, 0.2), inset 0 1px 0 #fff;
    -webkit-backdrop-filter: blur(32px) saturate(155%);
    backdrop-filter: blur(32px) saturate(155%);
    animation: welcome-card-in 780ms 100ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.welcome-auth::before {
    content: "";
    position: absolute;
    top: 0;
    left: 13%;
    width: 74%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
}

.welcome-auth__glow {
    position: absolute;
    top: -120px;
    right: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(148, 190, 255, 0.25);
    filter: blur(42px);
}

.welcome-auth .auth-view {
    position: relative;
    z-index: 1;
}

.welcome-auth h3 {
    margin: 0 0 10px;
    color: #151b2d;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.welcome-auth .auth-kicker {
    margin-right: 0;
    color: #a41f42;
}

.welcome-auth .auth-copy {
    margin-bottom: 25px;
    color: #5a6274;
    font-size: 14px;
}

.welcome-auth .field {
    margin-bottom: 15px;
}

.welcome-auth .field input {
    min-height: 51px;
    border-color: rgba(20, 30, 54, 0.12);
    background: rgba(255, 255, 255, 0.52);
}

.welcome-auth .field input::placeholder {
    color: #9298a6;
}

.welcome-auth .form .bottom {
    gap: 10px;
}

.welcome-auth .form .bottom button {
    flex-basis: 100%;
}

.welcome-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 7px;
    height: 48px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.welcome-footer span:first-child {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

@keyframes welcome-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes welcome-card-in {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.98);
    }
}

@keyframes welcome-ambient {
    to {
        transform: translate3d(-4vw, 4vw, 0) scale(1.08);
    }
}

@media (max-width: 1080px) {
    .welcome-shell {
        grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
        gap: 38px;
        padding: 34px;
    }

    .welcome-story h1 {
        font-size: clamp(44px, 6.5vw, 68px);
    }

    .welcome-features {
        grid-template-columns: 1fr;
        width: min(330px, 100%);
    }

    .welcome-features li {
        padding: 9px 11px;
    }
}

@media (max-width: 780px) {
    .welcome-page {
        background-position: 42% center;
    }

    .welcome-page::before {
        background: linear-gradient(180deg, rgba(5, 12, 34, 0.28) 0%, rgba(5, 12, 34, 0.58) 46%, rgba(5, 10, 27, 0.84) 100%);
    }

    .welcome-shell {
        grid-template-columns: 1fr;
        gap: 26px;
        min-height: auto;
        padding: 22px clamp(16px, 5vw, 32px) 36px;
    }

    .welcome-story__content {
        padding: 38px 0 10px;
    }

    .welcome-story h1 {
        max-width: 650px;
        font-size: clamp(42px, 11vw, 70px);
    }

    .welcome-lead {
        max-width: 600px;
    }

    .welcome-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: 680px;
    }

    .welcome-feature__icon {
        display: none;
    }

    .welcome-footnote {
        display: none;
    }

    .welcome-auth {
        width: min(500px, 100%);
        margin: 0 auto;
    }

    .welcome-footer {
        height: 38px;
    }
}

@media (max-width: 520px) {
    .welcome-story__content {
        padding-top: 30px;
    }

    .welcome-eyebrow {
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .welcome-story h1 {
        font-size: clamp(38px, 12.5vw, 56px);
        line-height: 1.01;
    }

    .welcome-lead {
        margin-top: 18px;
        font-size: 15px;
        line-height: 1.55;
    }

    .welcome-features {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-top: 23px;
    }

    .welcome-features li {
        padding: 9px 12px;
    }

    .welcome-features small {
        display: none;
    }

    .welcome-auth {
        padding: 26px 21px 22px;
        border-radius: 28px;
    }

    .welcome-auth h3 {
        font-size: 29px;
    }

    .welcome-auth .auth-copy {
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-page::after,
    .welcome-story__content,
    .welcome-auth {
        animation: none;
    }
}
