/* ===== Базовые стили ===== */
:root {
    --c-dark: #0f172a;
    --c-dark-2: #1e293b;
    --c-text: #334155;
    --c-muted: #64748b;
    --c-accent: #f59e0b;
    --c-accent-dark: #d97706;
    --c-bg-gray: #f1f5f9;
    --c-border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text);
    line-height: 1.6;
    background: #fff;
}

img { max-width: 100%; display: block; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow { max-width: 860px; }

h1, h2, h3 { color: var(--c-dark); line-height: 1.25; }

.section { padding: 72px 0; }
.section--gray { background: var(--c-bg-gray); }
.section--dark { background: var(--c-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #cbd5e1; }

.section__title {
    font-size: 34px;
    text-align: center;
    margin-bottom: 16px;
}
.section__title--left { text-align: left; }
.section__subtitle {
    text-align: center;
    color: var(--c-muted);
    max-width: 640px;
    margin: 0 auto 40px;
}
.section__title + .advantages__grid,
.section__title + .steps,
.section__title + .reviews__grid,
.section__title + .faq { margin-top: 40px; }

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    background: var(--c-accent);
    color: var(--c-dark);
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 10px;
    border: 2px solid var(--c-accent);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--sm { padding: 9px 18px; font-size: 14px; }
.btn--full { width: 100%; }
.btn--ghost {
    background: transparent;
    color: inherit;
    border-color: rgba(148, 163, 184, .6);
}
.btn--ghost:hover { background: rgba(148, 163, 184, .15); border-color: var(--c-accent); }

/* ===== Шапка ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--c-border);
}
.header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--c-dark);
}
.logo__icon { font-size: 30px; }
.logo__text { font-weight: 800; font-size: 19px; line-height: 1.1; }
.logo__text small {
    display: block;
    font-weight: 500;
    font-size: 12px;
    color: var(--c-muted);
}
.nav { display: flex; gap: 20px; margin: 0 auto; }
.nav a {
    color: var(--c-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}
.nav a:hover { color: var(--c-accent-dark); }
.header__contacts {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}
.header__hours { font-size: 13px; color: var(--c-muted); }
.header__phone {
    font-weight: 800;
    color: var(--c-dark);
    text-decoration: none;
    font-size: 17px;
}
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--c-dark);
    margin: 5px 0;
    border-radius: 2px;
}

/* ===== Первый экран ===== */
.hero {
    background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-dark-2) 60%, #33415c 100%);
    color: #e2e8f0;
    padding: 80px 0;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 56px;
    align-items: center;
}
.hero h1 {
    color: #fff;
    font-size: 44px;
    margin-bottom: 18px;
}
.hero__subtitle { font-size: 19px; margin-bottom: 24px; color: #cbd5e1; }
.hero__list { list-style: none; margin-bottom: 32px; }
.hero__list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 10px;
}
.hero__list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--c-accent);
    font-weight: 700;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__form {
    padding: 30px;
    color: var(--c-text);
    scroll-margin-top: 90px;
}
.hero__form h3 { font-size: 22px; margin-bottom: 8px; }
.hero__form > p { font-size: 14px; color: var(--c-muted); margin-bottom: 18px; }

/* ===== Формы ===== */
.lead-form { display: grid; gap: 12px; }
.lead-form input,
.lead-form textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    color: var(--c-dark);
    background: #f8fafc;
}
.lead-form input:focus,
.lead-form textarea:focus {
    outline: 2px solid var(--c-accent);
    outline-offset: 0;
    border-color: var(--c-accent);
    background: #fff;
}
.lead-form small { color: var(--c-muted); font-size: 12px; text-align: center; }
.hp-field { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

.form-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.form-success strong { display: block; }
.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ===== Преимущества ===== */
.advantages__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.advantage {
    padding: 28px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    transition: box-shadow .2s, transform .2s;
}
.advantage:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.advantage__icon { font-size: 34px; margin-bottom: 14px; }
.advantage h3 { font-size: 18px; margin-bottom: 8px; }
.advantage p { font-size: 14.5px; color: var(--c-muted); }

/* ===== Услуги ===== */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.service { overflow: hidden; display: flex; flex-direction: column; }
.service__image { aspect-ratio: 16 / 10; overflow: hidden; }
.service__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.service:hover .service__image img { transform: scale(1.04); }
.service__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.service__body h3 { font-size: 19px; margin-bottom: 8px; }
.service__body p { font-size: 14.5px; color: var(--c-muted); flex: 1; }
.service__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 10px;
}
.service__price { font-weight: 800; color: var(--c-dark); }
.service__link {
    color: var(--c-accent-dark);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

/* ===== Цифры ===== */
.stats { background: var(--c-accent); padding: 44px 0; }
.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}
.stat__value { font-size: 40px; font-weight: 800; color: var(--c-dark); line-height: 1.1; }
.stat__label { color: #78350f; font-weight: 600; }

/* ===== Портфолио ===== */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 40px;
}
.work { overflow: hidden; cursor: pointer; transition: transform .2s; }
.work:hover { transform: translateY(-4px); }
.work__image { aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: var(--c-bg-gray); }
.work__image img { width: 100%; height: 100%; object-fit: cover; }
.work__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
}
.work__body { padding: 18px 22px 22px; }
.work__body h3 { font-size: 17px; margin-bottom: 8px; }
.work__meta { display: flex; gap: 16px; font-size: 13.5px; color: var(--c-muted); flex-wrap: wrap; }

/* ===== Этапы ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}
.step { text-align: center; padding: 0 6px; }
.step__num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--c-accent);
    color: var(--c-dark);
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; }
.step p { font-size: 13.5px; }

/* ===== Отзывы ===== */
.reviews__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.review { padding: 26px; display: flex; flex-direction: column; }
.review__stars { margin-bottom: 12px; font-size: 17px; letter-spacing: 2px; }
.star--on { color: var(--c-accent); }
.star--off { color: var(--c-border); }
.review__text { font-size: 14.5px; flex: 1; }
.review__name { margin-top: 16px; font-weight: 700; color: var(--c-dark); }

/* ===== О компании ===== */
.about__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: center;
}
.about__text { font-size: 16.5px; }
.about__cta { padding: 30px; text-align: center; border: 1px solid var(--c-border); }
.about__cta h3 { margin-bottom: 10px; }
.about__cta p { font-size: 14.5px; color: var(--c-muted); margin-bottom: 18px; }

/* ===== FAQ ===== */
.faq { display: grid; gap: 14px; }
.faq__item {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    padding: 0 22px;
}
.faq__item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--c-dark);
    padding: 18px 30px 18px 0;
    list-style: none;
    position: relative;
    font-size: 15.5px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--c-accent-dark);
    transition: transform .2s;
}
.faq__item[open] summary::after { content: "–"; }
.faq__answer { padding: 0 0 18px; color: var(--c-muted); font-size: 14.5px; }

/* ===== Контакты ===== */
.contacts__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}
.contacts__list { list-style: none; display: grid; gap: 16px; margin: 24px 0; }
.contacts__list li { font-size: 16px; color: var(--c-dark); }
.contacts__list li span {
    display: block;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-muted);
    margin-bottom: 2px;
}
.contacts__list a { color: var(--c-dark); font-weight: 700; text-decoration: none; }
.contacts__messengers { display: flex; gap: 12px; }
.contacts__form { padding: 30px; }
.contacts__form h3 { margin-bottom: 16px; }

/* ===== Подвал ===== */
.footer { background: var(--c-dark); color: #94a3b8; padding: 40px 0; }
.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.logo--footer { color: #fff; margin-bottom: 12px; }
.logo--footer .logo__text { color: #fff; }
.footer__copy { font-size: 13px; max-width: 480px; }
.footer__contacts { display: grid; gap: 6px; text-align: right; }
.footer__contacts a { color: #e2e8f0; text-decoration: none; }
.footer__phone { font-size: 20px; font-weight: 800; }

/* ===== Модальное окно ===== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .7); }
.modal__dialog {
    position: relative;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
}
.modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: 0;
    font-size: 30px;
    cursor: pointer;
    color: var(--c-muted);
    line-height: 1;
}
.modal__image { width: 100%; border-radius: 10px; margin-bottom: 18px; }
.modal__title { font-size: 21px; margin-bottom: 8px; }
.modal__meta { display: flex; gap: 18px; color: var(--c-muted); font-size: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.modal__text { font-size: 15px; margin-bottom: 20px; }

/* ===== Адаптив ===== */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 36px; }
    .advantages__grid, .services__grid, .portfolio__grid, .reviews__grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(3, 1fr); row-gap: 34px; }
    .nav { display: none; }
    .header__hours { display: none; }
}

@media (max-width: 720px) {
    .section { padding: 52px 0; }
    .section__title { font-size: 27px; }
    .hero { padding: 52px 0; }
    .hero h1 { font-size: 29px; }
    .advantages__grid, .services__grid, .portfolio__grid, .reviews__grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
    .about__inner, .contacts__inner { grid-template-columns: 1fr; }
    .header__contacts .btn { display: none; }
    .burger { display: block; margin-left: auto; }
    .header__inner { gap: 14px; }
    .header__contacts { margin-left: auto; }

    .nav.nav--open {
        display: flex;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 18px 20px;
        border-bottom: 1px solid var(--c-border);
        box-shadow: var(--shadow);
        gap: 14px;
    }
    .footer__inner { flex-direction: column; align-items: flex-start; }
    .footer__contacts { text-align: left; }
}
