@font-face {
    font-family: "Titration";
    src: url("/assets/font.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #171717;
    --muted: #5f6170;
    --blue: #d7efff;
    --blue-strong: #9fd6ff;
    --pink: #ffe1ec;
    --pink-strong: #ffadc9;
    --white: #fffafc;
    --line: rgba(23, 23, 23, 0.12);
    --shadow: 0 18px 50px rgba(47, 64, 86, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Titration", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(112deg, var(--blue) 0 48%, #f5e9f4 48% 54%, var(--pink) 54% 100%);
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-stage {
    position: relative;
    min-height: calc(100vh - 76px);
    display: grid;
    place-items: center;
    padding: 78px 24px 54px;
    isolation: isolate;
}

.background-blocks {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.background-block {
    position: absolute;
    border-radius: 8px;
}

.background-block--blue {
    inset: 0 auto 0 0;
    width: 58vw;
    background: #d7efff;
}

.background-block--pink {
    inset: 0 0 0 auto;
    width: 52vw;
    background: #ffe1ec;
}

.background-block--blend {
    top: 0;
    bottom: 0;
    left: 42vw;
    width: 24vw;
    min-width: 260px;
    background: linear-gradient(90deg, rgba(215, 239, 255, 0), rgba(255, 225, 236, 0.76));
}

.hero {
    width: min(100%, 620px);
    display: grid;
    justify-items: center;
    gap: 22px;
    text-align: center;
}

.logo {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.logo__mark {
    width: 112px;
    height: 112px;
    display: block;
}

.logo__text {
    color: var(--ink);
    font-size: 34px;
    font-weight: 760;
    line-height: 1;
    letter-spacing: 0;
}

.logo--splash-light .logo__text,
.logo--splash-light .logo__heart,
.logo--splash-light .logo__measure {
    color: #ffffff;
}

.logo--splash-light .logo__text {
    color: #ffffff;
}

.logo--splash-light .logo__heart {
    fill: #ffffff;
}

.logo--splash-light .logo__measure {
    stroke: #ffffff;
}

.logo--splash-light .logo__ring {
    opacity: 0.72;
}

.hero__summary {
    max-width: 520px;
    margin: 0;
    color: #353742;
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.75;
    letter-spacing: 0;
}

.start-button {
    min-height: 48px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #050505;
    font-size: 15px;
    font-weight: 680;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.start-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.start-button:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.site-footer {
    position: relative;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 32px;
    color: rgba(23, 23, 23, 0.72);
    font-size: 13px;
}

.site-footer p {
    margin: 0;
}

.site-footer nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-footer a {
    color: rgba(23, 23, 23, 0.72);
}

.site-footer a:hover {
    color: var(--ink);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(12, 12, 16, 0.38);
    backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
    display: none;
}

.login-dialog {
    position: relative;
    width: min(100%, 390px);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    background: rgba(255, 250, 252, 0.95);
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: #ffffff;
    font-size: 19px;
    line-height: 1;
}

.login-step[hidden] {
    display: none;
}

.login-dialog__title {
    margin: 0 34px 10px 0;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: 0;
}

.login-dialog__copy,
.login-dialog__hint,
.login-message {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.login-dialog__hint {
    margin-top: 2px;
    color: #eb6f98;
}

.field {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.field__label {
    color: #3c3f4a;
    font-size: 12px;
    font-weight: 680;
}

.field__input {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(23, 23, 23, 0.14);
    border-radius: 6px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field__input:focus {
    border-color: #8ecfff;
    box-shadow: 0 0 0 3px rgba(159, 214, 255, 0.34);
}

.login-button {
    width: 100%;
    height: 44px;
    margin-top: 16px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #050505;
    font-size: 14px;
    font-weight: 720;
}

.login-button:disabled {
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(5, 5, 5, 0.38);
}

.agreement {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: start;
    margin-top: 14px;
    color: #4d505c;
    font-size: 12px;
    line-height: 1.55;
}

.agreement input {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: #111111;
}

.agreement a {
    color: #245a88;
}

.login-message {
    min-height: 20px;
    margin-top: 14px;
}

.login-message[data-tone="error"] {
    color: #c63d5f;
}

.login-message[data-tone="success"] {
    color: #2b7d5d;
}

.splash-stage {
    position: fixed;
    inset: 0;
    z-index: 30;
}

.splash-stage[hidden],
.splash-screen[hidden] {
    display: none;
}

.splash-screen {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.splash-screen--black {
    background: #000000;
}

.splash-screen--blue {
    background: #4f609e;
}

.splash-logo {
    transform: translateY(-2vh);
}

.splash-logo--breathing {
    animation: breatheOpacity 1.6s ease-in-out infinite alternate;
}

@keyframes breatheOpacity {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 720px) {
    .home-stage {
        min-height: calc(100vh - 112px);
        padding: 58px 18px 40px;
    }

    .background-block--blue {
        width: 100vw;
        height: 58vh;
        inset: 0 0 auto;
    }

    .background-block--pink {
        width: 100vw;
        height: 56vh;
        inset: auto 0 0;
    }

    .background-block--blend {
        top: 42vh;
        left: 0;
        width: 100vw;
        min-width: 0;
        height: 20vh;
        background: linear-gradient(180deg, rgba(215, 239, 255, 0), rgba(255, 225, 236, 0.84));
    }

    .logo__mark {
        width: 96px;
        height: 96px;
    }

    .logo__text {
        font-size: 30px;
    }

    .site-footer {
        min-height: 112px;
        flex-direction: column;
        justify-content: center;
        padding: 18px;
        text-align: center;
    }

    .site-footer nav {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .login-dialog {
        padding: 24px;
    }
}
