/* /srv/tpult/app/landing/static/landing/css/main.css */
/* оформляет главную страницу ТПульт с акцентом на мобильную версию */

:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #171923;
    --muted: #5f6573;
    --accent: #315cff;
    --accent-dark: #2346c7;
    --border: #e1e5ef;
    --shadow: 0 18px 50px rgba(21, 31, 61, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 247, 251, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    display: block;
    height: 46px;
    width: auto;
    max-width: 220px;
}

.header-link {
    text-decoration: none;
    font-weight: 700;
    color: var(--accent);
}

.hero {
    padding: 44px 0 32px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
}

.badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--accent);
    background: #e9eeff;
    font-size: 14px;
    font-weight: 700;
}

h1 {
    max-width: 720px;
    margin: 20px 0 16px;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero-text {
    max-width: 680px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.55;
}

.primary-button,
.secondary-button,
.phone-form button {
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    color: #ffffff;
    background: var(--accent);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(49, 92, 255, 0.25);
}

.primary-button:hover,
.phone-form button:hover {
    background: var(--accent-dark);
}

.secondary-button {
    width: 100%;
    color: #ffffff;
    background: var(--text);
}

.mini-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.mini-points span {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 14px;
}

.login-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.login-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.login-card p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.5;
}

.phone-form {
    display: grid;
    gap: 12px;
}

.phone-form label {
    font-weight: 700;
}

.phone-form input {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    font-size: 18px;
}

.phone-form input:focus {
    outline: 3px solid rgba(49, 92, 255, 0.18);
    border-color: var(--accent);
}

.phone-form input.phone-input-error {
    border-color: #dc2626;
}

.phone-form input.phone-input-error:focus {
    border-color: #dc2626;
    outline: 3px solid rgba(220, 38, 38, 0.14);
}

.phone-error {
    margin: -4px 0 0 !important;
    color: #b91c1c !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4 !important;
}

.phone-error[hidden] {
    display: none;
}

.landing-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
    font-size: 14px;
}

.landing-footer-link:hover {
    color: var(--accent);
    border-color: rgba(49, 92, 255, 0.35);
}

.phone-form button {
    width: 100%;
    color: #ffffff;
    background: var(--accent);
}

.form-note {
    margin-top: 16px !important;
    font-size: 14px;
}

.advantages {
    padding: 34px 0;
}

.advantages h2,
.cta h2 {
    margin: 0 0 20px;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.06em;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.advantage-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
}

.advantage-card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    letter-spacing: -0.03em;
}

.advantage-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.contacts-section {
    padding: 34px 0;
}

.section-lead {
    max-width: 680px;
    margin: -8px 0 22px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.contact-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(21, 31, 61, 0.08);
}

.contact-panel h3 {
    margin: 0 0 18px;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.social-list {
    display: grid;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--text);
    background: #ffffff;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.social-link:hover {
    transform: translateY(-1px);
    border-color: rgba(49, 92, 255, 0.35);
    box-shadow: 0 10px 24px rgba(21, 31, 61, 0.08);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.social-link strong {
    display: block;
    margin-bottom: 3px;
    font-size: 16px;
}

.social-link small {
    display: block;
    color: var(--muted);
    font-size: 14px;
    word-break: break-word;
}

.social-max .social-icon {
    background: #315cff;
}

.social-vk .social-icon {
    background: #0077ff;
}

.social-tg .social-icon {
    background: #229ed9;
}

.social-phone .social-icon {
    background: #16a34a;
}

.social-mail .social-icon {
    background: #171923;
}

.cta {
    padding: 24px 0 56px;
}

.cta-box {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--text);
    color: #ffffff;
    text-align: center;
}

.cta-box p {
    max-width: 680px;
    margin: 0 auto 22px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.5;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 25, 0.62);
}

.modal-window {
    position: absolute;
    left: 50%;
    bottom: 16px;
    width: min(520px, calc(100% - 32px));
    transform: translateX(-50%);
    padding: 26px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f0f2f7;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.modal-window h2 {
    margin: 0 44px 14px 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.modal-window p {
    color: var(--muted);
    line-height: 1.5;
}

.modal-phone {
    color: var(--text) !important;
}

.modal-phone strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.modal-small {
    font-size: 14px;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .contacts-grid {
    grid-template-columns: 1fr;
    }

    .contact-panel {
        padding: 20px;
    }

    .social-link {
        min-height: 64px;
        padding: 11px 12px;
    }

    .social-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }


    .container {
        width: min(100% - 24px, 1120px);
    }

    .logo img {
    height: 38px;
    max-width: 180px;
    }

    .header-inner {
        min-height: 58px;
    }

    .hero {
        padding: 28px 0 20px;
    }

    h1 {
        margin-top: 16px;
        font-size: 42px;
    }

    .hero-text {
        font-size: 17px;
    }

    .primary-button {
        width: 100%;
    }

    .mini-points {
        display: grid;
    }

    .login-card {
        padding: 20px;
        border-radius: 22px;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .advantage-card {
        padding: 20px;
    }

    .cta-box {
        padding: 24px 18px;
    }

    .modal-window {
        bottom: 0;
        width: 100%;
        border-radius: 26px 26px 0 0;
    }
}

/* Footer */

.landing-footer {
    padding: 12px 0 34px;
}

.landing-footer-inner {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.landing-footer button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: transparent;
    font-size: 14px;
}

.landing-footer button:hover {
    color: var(--accent);
    border-color: rgba(49, 92, 255, 0.35);
}


/* Tariffs */

.landing-tariff-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.landing-tariff-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
}

.landing-tariff-card h3 {
    margin: 0 0 12px;
}

.landing-tariff-card p {
    color: var(--muted);
    line-height: 1.5;
}

.landing-tariff-price {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 32px;
    font-weight: 900;
}


/* Documents */

.landing-document-modal p {
    color: var(--muted);
    line-height: 1.55;
}

.landing-document-modal h3 {
    margin: 24px 0 12px;
}

.landing-document-note {
    margin-top: 24px;
    padding: 14px;
    border-radius: 14px;
    background: #f5f7fc;
}

.landing-requisites-list {
    display: grid;
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--border);
}

.landing-requisites-list div {
    padding: 12px 14px;
    background: #ffffff;
}

.landing-requisites-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.landing-requisites-list dd {
    margin: 0;
    font-weight: 650;
    overflow-wrap: anywhere;
}


/* Contacts */

.landing-contact-links {
    display: grid;
    gap: 8px;
}

.landing-contact-links a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--accent);
    background: #ffffff;
    text-decoration: none;
    font-weight: 700;
}


/* Mobile */

@media (max-width: 620px) {
    .landing-footer-inner {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .landing-footer-inner > * {
        width: 100%;
    }

    .landing-footer button:last-child {
        grid-column: 1 / -1;
    }

    .landing-tariff-list {
        grid-template-columns: 1fr;
    }

    .landing-tariff-features {
        display: grid;
        gap: 10px;
        margin: 0 0 22px;
        padding: 0;
        list-style: none;
    }

    .landing-tariff-features li {
        position: relative;
        padding-left: 28px;
        color: var(--muted);
        line-height: 1.5;
    }

    .landing-tariff-features li::before {
        content: "✓";

        position: absolute;
        top: 0;
        left: 0;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 20px;
        height: 20px;

        border-radius: 50%;

        color: #ffffff;
        background: var(--accent);

        font-size: 12px;
        font-weight: 900;
    }
}

/* Modal scrolling fix */

.modal-window {
    top: 50%;
    bottom: auto;
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate(-50%, -50%);
    scrollbar-gutter: stable;
}

.landing-document-modal {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.modal-window::-webkit-scrollbar {
    width: 8px;
}

.modal-window::-webkit-scrollbar-track {
    background: transparent;
}

.modal-window::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(100, 107, 121, 0.35);
}

.modal-window::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 107, 121, 0.55);
}


@media (max-width: 620px) {
    .modal-window {
        top: auto;
        bottom: 0;
        width: 100%;
        max-height: 92vh;
        transform: translateX(-50%);
        border-radius: 26px 26px 0 0;
    }

    .landing-document-modal {
        max-height: 92vh;
    }

    .landing-tariff-features li {
        font-size: 15px;
    }
}

/* Anchor scroll offset */

#login {
    scroll-margin-top: 110px;
}


@media (max-width: 620px) {
    #login {
        scroll-margin-top: 86px;
    }
}

/* How it works */

.how-section {
    padding: 54px 0;
    overflow: hidden;
}

.how-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.how-heading h2 {
    margin: 0 0 12px;
}

.how-heading .section-lead {
    margin-bottom: 0;
}

.how-navigation {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.how-navigation button {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--accent);
    background: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.how-navigation button:hover {
    border-color: rgba(49, 92, 255, 0.4);
    background: #f7f9ff;
}

.how-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 18px) / 2);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.how-slider::-webkit-scrollbar {
    display: none;
}

.how-slide {
    min-height: 300px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    scroll-snap-align: start;
    box-shadow: 0 14px 38px rgba(21, 31, 61, 0.07);
}

.how-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 26px;
    border-radius: 16px;
    color: #ffffff;
    background: var(--accent);
    font-size: 21px;
    font-weight: 900;
}

.how-slide h3 {
    margin: 0 0 14px;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.how-slide p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.how-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.how-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cbd2df;
    transition:
        width 0.2s ease,
        background 0.2s ease;
}

.how-dot.is-active {
    width: 28px;
    background: var(--accent);
}


@media (max-width: 620px) {
    .how-section {
        padding: 38px 0;
    }

    .how-heading {
        align-items: flex-start;
    }

    .how-navigation {
        display: none;
    }

    .how-slider {
        grid-auto-columns: 88%;
        gap: 12px;
        margin-right: calc((100vw - 100%) / -2);
        padding-right: 24px;
    }

    .how-slide {
        min-height: 330px;
        padding: 22px;
        border-radius: 22px;
    }

    .how-step-number {
        width: 44px;
        height: 44px;
        margin-bottom: 22px;
    }

    .how-slide h3 {
        font-size: 23px;
    }

    .how-slide p {
        font-size: 16px;
        line-height: 1.55;
    }
}
