/* Цвета из шаблона baibol2022 основного сайта. */
:root {
    --red: #C30000;
    --red-hover: #A90303;
    --text: #050505;
    --muted: #686464;
    --bg-soft: #F2F2F5;
    --white: #FFFFFF;
    --error: #E00909;
    --radius: 12px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Raleway", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg-soft);
}

a { color: var(--red); }

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px max(16px, calc((100% - 1040px) / 2));
    background: var(--white);
}

.top__phone {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.hero {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 72px 16px;
    text-align: center;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(28px, 6vw, 44px);
    line-height: 1.15;
}

.hero__lead {
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.hero__note {
    margin-top: 32px;
    color: var(--muted);
}

.hero__note a { white-space: nowrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 240px;
    min-height: 56px;
    padding: 0 28px;
    border: 2px solid var(--red);
    border-radius: var(--radius);
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}

.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn--secondary { background: var(--white); color: var(--red); }
.btn--secondary:hover { background: var(--red); color: var(--white); }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, input:focus-visible, .modal__close:focus-visible { outline: 3px solid #ffb3b3; outline-offset: 2px; }

.modal {
    width: min(440px, calc(100% - 32px));
    padding: 32px 24px 24px;
    border: 0;
    border-radius: var(--radius);
    color: var(--text);
}

.modal::backdrop { background: rgba(5, 5, 5, .55); }

.modal h2 { margin: 0 0 8px; font-size: 24px; }
.modal p { margin: 0 0 20px; color: var(--muted); line-height: 1.45; }

.modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.modal h2#lead-title { margin-bottom: 20px; font-size: 26px; font-weight: 600; }

#lead-form input {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid #d5d5dc;
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
}

#lead-form input[aria-invalid="true"] { border-color: var(--error); }

/* Текст согласия — как span.agree в форме сайта. */
.modal .agree { margin: 4px 0 12px; font-size: 14px; line-height: 1.3; color: var(--muted); }
.agree a { color: var(--muted); text-decoration: none; border-bottom: 1px solid; }
.agree a:hover { border-bottom: none; }

.form__message { min-height: 1.4em; margin: 0 0 12px !important; color: var(--error) !important; font-size: 14px; }
.modal .form__note { margin: 16px 0 0; font-weight: 600; color: var(--text); }

.success__text { display: flex; gap: 20px; align-items: flex-start; }
.success__text svg { flex: none; }
.success h2 { margin-top: 4px; }
.success__app { display: inline-block; margin-top: 8px; font-weight: 600; }
.success__banner img { display: block; width: 100%; height: auto; margin-top: 20px; border-radius: 8px; }

.footer {
    padding: 20px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    background: var(--white);
}

@media (max-width: 560px) {
    .hero { padding-top: 48px; }
    .btn { width: 100%; }
}
