*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--c-bg, #ffffff);
    color: var(--c-text, #111111);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 48px 24px;
    position: relative;
    isolation: isolate;
}

body.mio-landing .container {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-left: -50px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0s both;
}

.logo {
    width: 150px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

h1 {
    font-size: 42px;
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #111111;
}

/* Text */
.subtitle {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    color: #888888;
    margin-bottom: 32px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.divider {
    width: 32px;
    height: 1px;
    background: #e5e5e5;
    margin-bottom: 28px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.description {
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    color: #555555;
    line-height: 1.75;
    margin-bottom: 40px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Buttons */
.buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 200px;
    max-width: 100%;
    height: 44px;
    padding: 0 28px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: #111111;
    color: #ffffff;
    border: 1.5px solid #111111;
}

.btn-primary:hover {
    background: #333333;
    border-color: #333333;
}

.btn-secondary {
    background: transparent;
    color: #111111;
    border: 1.5px solid #e0e0e0;
}

.btn-secondary:hover {
    border-color: #999999;
    color: #444444;
}

.btn-ghost {
    background: transparent;
    color: #999999;
    border: 1.5px solid transparent;
}

.btn-ghost:hover {
    color: #444444;
}

/* Footer */
.footer-note {
    width: 100%;
    margin-top: 48px;
    font-size: 11px;
    font-weight: 400;
    color: #cccccc;
    letter-spacing: 0.03em;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.legal-links {
    width: 100%;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.legal-links a {
    font-size: 11px;
    font-weight: 400;
    color: #cccccc;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: #888888;
}

.legal-links .legal-sep {
    font-size: 11px;
    color: #999999;
    font-weight: 400;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form .btn {
    width: 100%;
    min-width: 0;
}

/* Длинные формы входа/регистрации — прокрутка, без обрезки сверху */
@media (max-width: 768px) {
    html,
    body.mio-landing {
        height: auto;
        min-height: 100dvh;
    }
    body.mio-landing.auth-page {
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: max(20px, env(safe-area-inset-top, 20px));
        padding-bottom: max(28px, env(safe-area-inset-bottom, 28px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    body.mio-landing.auth-page .container {
        margin: 0 auto;
    }
    body.mio-landing.auth-page .hero {
        margin-left: 0;
        gap: 8px;
    }
    body.mio-landing.auth-page .logo {
        width: 72px;
    }
    body.mio-landing.auth-page h1 {
        font-size: 26px;
    }
    body.mio-landing.auth-page .subtitle {
        margin-bottom: 18px;
        font-size: 13px;
        line-height: 1.45;
    }
    body.mio-landing.auth-page .divider {
        margin-bottom: 18px;
    }
}

/* ===== Mobile adaptive ===== */
@media (max-width: 600px) {
    body {
        padding: 28px 18px;
    }
    .buttons .btn {
        width: 100%;
        min-width: 0;
    }
    .hero {
        margin-left: 0;
        gap: 8px;
    }
    .logo {
        width: 88px;
    }
    h1 {
        font-size: 32px;
    }
    .description {
        font-size: 13px;
        line-height: 1.7;
    }
    .description br { display: none; }
    .footer-note {
        margin-top: 32px;
    }
}

@media (max-width: 380px) {
    .logo { width: 72px; }
    h1 { font-size: 28px; }
}
