/* Общая тема сайта продаж: тёплая бумага, тёмный текст, оранжевый акцент
   и лаймовые детали из главной страницы. */
:root {
    --ink: #111417;
    --ink-soft: #293038;
    --muted: #67707a;
    --line: rgba(17, 20, 23, .12);
    --brand: #ff5a36;
    --brand-dark: #e94522;
    --brand-soft: #ffe1d8;
    --accent: #0f766e;
    --lime: #d8f36b;
    --bg: #fbf8f1;
    --paper-deep: #f1ebdf;
    --white: #fffdf8;
    --shadow: 0 22px 60px rgba(17, 20, 23, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand); color: #fff; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--lime);
    outline-offset: 3px;
}

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

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--paper-deep);
    color: var(--ink-soft);
    font-size: .92em;
}

/* Шапка */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 248, .9);
    backdrop-filter: blur(16px);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 74px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.05em;
}
.logo-mark {
    display: block;
    flex: 0 0 auto;
    width: 33px;
    height: 33px;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(17, 20, 23, .14);
}
.logo:hover { text-decoration: none; }

.main-nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease;
}
.main-nav a:hover {
    background: rgba(17, 20, 23, .06);
    color: var(--ink);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Кнопки */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(255, 90, 54, .2);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.button:hover {
    background: var(--brand-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(255, 90, 54, .26);
}
.button-small { min-height: 36px; padding: 8px 14px; font-size: 14px; }
.button-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
    box-shadow: none;
}
.button-ghost:hover { background: rgba(17, 20, 23, .05); color: var(--ink); box-shadow: none; }
.button-dark { background: var(--ink); color: #fff; box-shadow: none; }
.button-dark:hover { background: #2a3038; }
.button-lime { background: var(--lime); color: var(--ink); box-shadow: none; }
.button-lime:hover { background: #c9e957; color: var(--ink); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-weight: 700;
    border-bottom: 1px solid transparent;
}
.text-link:hover { color: var(--brand-dark); border-bottom-color: currentColor; text-decoration: none; }

/* Заголовки и секции */
.section { position: relative; padding: 70px 0; }
.section-alt { background: var(--paper-deep); }

main > .section:first-of-type {
    overflow: hidden;
    padding-top: 76px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 88% -5%, rgba(255, 90, 54, .17), transparent 36%),
        radial-gradient(circle at 2% 105%, rgba(216, 243, 107, .22), transparent 34%),
        linear-gradient(135deg, var(--white) 0%, var(--bg) 54%, #f6e7dc 100%);
}
main > .section:first-of-type::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    background-image:
        linear-gradient(rgba(17, 20, 23, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 20, 23, .045) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 82%);
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
main > .section:first-of-type > .wrap { position: relative; z-index: 1; }

body.is-admin main > .section:first-of-type {
    padding-top: 36px;
    border-bottom: 0;
    background: var(--bg);
}
body.is-admin main > .section:first-of-type::before { display: none; }

.section h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.2vw, 48px);
    line-height: 1.04;
    letter-spacing: -.05em;
    text-wrap: balance;
}
.section-intro {
    max-width: 760px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.72;
    text-wrap: pretty;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}
.section-head .section-intro { max-width: 560px; margin: 0 0 4px; }

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px 11px;
    border: 1px solid rgba(255, 90, 54, .2);
    border-radius: 999px;
    background: rgba(255, 90, 54, .08);
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.page-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 13px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand-dark); }
.page-head { max-width: 900px; margin-bottom: 34px; }

/* Сетки и карточки */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 18px 46px rgba(17, 20, 23, .045);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -.03em;
}
.card p { color: var(--muted); margin: 0 0 13px; }
.card ul, .card ol { margin: 0 0 14px; padding-left: 21px; color: var(--ink-soft); }
.card li { margin-bottom: 7px; }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, .1);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.tag-request { background: rgba(255, 90, 54, .12); color: var(--brand-dark); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Тарифы и калькулятор */
.plan-grid { align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 0; }
.plan h3 { margin: 12px 0 8px; font-size: 30px; }
.plan-featured {
    border-color: rgba(255, 90, 54, .34);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 90, 54, .13), transparent 34%),
        var(--white);
    box-shadow: 0 26px 64px rgba(255, 90, 54, .13);
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-mark {
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.plan-price {
    margin: 8px 0 18px;
    color: var(--ink);
    font-size: clamp(36px, 4vw, 48px);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1;
}
.plan-price small {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}
.feature-list { margin: 0 0 20px; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 9px; }
.feature-list li > span {
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(216, 243, 107, .5);
    color: #4b5b16;
    font-size: 11px;
    font-weight: 800;
}
.plan-limits { margin: auto 0 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-limits p { margin-bottom: 8px; }
.plan-limits dl { display: grid; gap: 6px; margin: 0; }
.plan-limits dl > div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.plan-limits dt { color: var(--muted); }
.plan-limits dd { margin: 0; font-weight: 700; text-align: right; }
.plan > .button { margin-top: auto; }

.calculator-layout { align-items: start; }
.calculator-card { padding: 26px; }
.calc-group { margin: 0; padding: 0; border: 0; }
.calc-group legend {
    margin-bottom: 12px;
    padding: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
}
.calc-option {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 9px;
    padding: 14px 15px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.calc-option:hover { border-color: rgba(255, 90, 54, .35); }
.calc-option input { flex: 0 0 auto; margin-top: 4px; accent-color: var(--brand); }
.calc-option > span { display: flex; flex-direction: column; gap: 2px; }
.calc-option:has(input:checked) {
    border-color: var(--brand);
    background: rgba(255, 90, 54, .055);
    box-shadow: inset 0 0 0 1px rgba(255, 90, 54, .14);
}
.calc-hint { margin: 15px 0 0; color: var(--muted); font-size: 13px; }

.quote-card {
    position: sticky;
    top: 96px;
    border-color: transparent;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 90, 54, .28), transparent 38%),
        var(--ink);
    color: #fff;
    box-shadow: 0 26px 64px rgba(17, 20, 23, .22);
}
.quote-card h3 { color: #fff; }
.quote-card .summary { border-color: rgba(255, 255, 255, .16); }
.quote-card .summary-row {
    border-bottom-color: rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .84);
}
.quote-card .summary-total { color: #fff; }
.quote-card .summary-total [data-quote-total] { color: var(--lime); }
.quote-card .small,
.quote-card p { color: rgba(255, 255, 255, .6); }
.quote-card .button { width: 100%; margin-top: 18px; background: var(--lime); color: var(--ink); box-shadow: none; }
.quote-card .button:hover { background: #c9e957; color: var(--ink); }

.request-services { align-items: stretch; }
.request-service-card { display: flex; flex-direction: column; align-items: flex-start; }
.request-service-card h3 { margin-top: 14px; }
.request-service-card .button { margin-top: auto; }
.request-layout { align-items: start; }
.request-aside { display: grid; gap: 20px; }
.steps-list { display: grid; gap: 18px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps-list li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; }
.steps-list li > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--lime);
    font-size: 11px;
    font-weight: 800;
}
.steps-list strong { display: block; margin-bottom: 2px; }
.steps-list p { margin: 0; }

/* Контакты */
.contacts-layout { align-items: start; }
.contact-stack { display: grid; gap: 20px; }
.contact-card h3 { margin-top: 14px; }
.contact-list, .requisites { display: grid; gap: 0; margin: 14px 0 0; }
.contact-list > div, .requisites > div {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}
.contact-list > div:last-child, .requisites > div:last-child { border-bottom: 0; }
.contact-list dt, .requisites dt { color: var(--muted); font-size: 13px; }
.contact-list dd, .requisites dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.contact-form { align-self: start; }

/* Формы, таблицы и служебные блоки */
form .field { margin-bottom: 17px; }
form label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
form input[type="text"], form input[type="email"], form input[type="tel"],
form input[type="password"], form input[type="number"], form textarea, form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(17, 20, 23, .18);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}
form input:focus, form textarea:focus, form select:focus {
    border-color: var(--brand);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 90, 54, .12);
}
form textarea { min-height: 120px; resize: vertical; }
form .checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
form .checkbox input { flex: 0 0 auto; margin-top: 4px; accent-color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { margin-top: 5px; color: var(--muted); font-size: 13px; }

.table { width: 100%; border-collapse: collapse; background: transparent; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }

.summary { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 17px;
    border-bottom: 1px solid var(--line);
}
.summary-row:last-child { border-bottom: 0; }
.summary-total { font-size: 18px; font-weight: 800; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pending { background: #fff1e6; color: #c2410c; }
.badge-paid { background: #e9f8ef; color: #047857; }
.badge-cancelled { background: #f0eee9; color: #4b5563; }

.notice { margin: 18px 0; padding: 15px 18px; border-radius: 15px; }
.notice-ok { border: 1px solid #b9e6c9; background: #edf9f1; color: #14532d; }
.notice-error { border: 1px solid #f3c0bb; background: #fff2f0; color: #7f1d1d; }
.notice ul { margin: 7px 0 0; padding-left: 20px; }

/* Документы */
.legal-document { padding: clamp(24px, 4vw, 46px); }
.legal-document h3 {
    margin: 34px 0 12px;
    font-size: clamp(19px, 2.2vw, 23px);
    line-height: 1.25;
}
.legal-document h3:first-child { margin-top: 0; }
.legal-document p { max-width: 82ch; margin: 0 0 14px; color: var(--ink-soft); line-height: 1.78; }
.legal-document ul, .legal-document ol { max-width: 82ch; margin: 0 0 16px; padding-left: 22px; color: var(--ink-soft); }
.legal-document li { margin-bottom: 8px; }
.legal-document a { text-decoration: underline; text-underline-offset: 3px; }
.legal-document code { white-space: nowrap; }

/* Подвал */
.site-footer {
    padding: 54px 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 90, 54, .18), transparent 32%),
        var(--ink);
    color: rgba(255, 255, 255, .62);
    font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.footer-grid strong { display: block; margin-bottom: 8px; color: #fff; font-size: 15px; }
.footer-grid p { margin: 0; line-height: 1.75; }
.footer-grid a { color: rgba(255, 255, 255, .72); }
.footer-grid a:hover { color: var(--lime); text-decoration: none; }

/* Cookies */
.cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    padding: 16px 0;
    border-top: 3px solid var(--brand);
    background: var(--white);
    box-shadow: 0 -12px 36px rgba(17, 20, 23, .13);
}
.cookie-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.cookie-copy { max-width: 680px; }
.cookie-copy p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.cookie-form { display: flex; flex-direction: column; gap: 8px; min-width: 300px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .button { min-height: 38px; padding: 9px 14px; font-size: 14px; }
.cookie-settings summary { padding: 4px 0; color: var(--brand-dark); font-size: 14px; font-weight: 700; cursor: pointer; }
.cookie-categories { display: grid; gap: 10px; padding: 8px 0 12px; }
.cookie-category { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400; }
.cookie-category input { flex: 0 0 auto; margin-top: 4px; accent-color: var(--brand); }
.cookie-category > span { display: flex; flex-direction: column; gap: 2px; }
.cookie-category > span > span { color: var(--muted); font-size: 13px; }
.cookie-feedback { margin: 4px 0 0; color: #047857; font-size: 13px; font-weight: 700; }
body.has-cookie-banner { padding-bottom: 150px; }

/* Админка и кабинет: без декоративных наворотов */
body.is-admin .card { padding: 20px; border-radius: 16px; box-shadow: none; }
body.is-admin .section { padding: 36px 0; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 4px 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; }
.admin-nav a:hover, .admin-nav a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); text-decoration: none; }

@media (max-width: 980px) {
    .quote-card { position: static; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .wrap { width: min(1120px, calc(100% - 28px)); }
    .header-inner { gap: 12px; padding: 10px 0; }
    .nav-toggle { display: block; }
    .header-demo { display: none; }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        z-index: 10;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 8px 16px 14px;
        border: 1px solid var(--line);
        border-radius: 0 0 18px 18px;
        background: var(--white);
        box-shadow: 0 18px 32px rgba(17, 20, 23, .14);
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; }
    .main-nav a:last-child { border-bottom: 0; }

    .section { padding: 52px 0; }
    main > .section:first-of-type { padding-top: 54px; }
    .section-head { display: block; }
    .section-head .section-intro { margin-top: 12px; }
    .page-head { margin-bottom: 26px; }

    .grid { gap: 16px; }
    .card { padding: 22px; border-radius: 20px; }
    .plan h3 { font-size: 26px; }
    .field-row { grid-template-columns: 1fr; }
    .contact-list > div, .requisites > div { grid-template-columns: 1fr; gap: 4px; }
    .contacts-layout { grid-template-columns: 1fr; }
    .contact-form { order: -1; }

    .cookie-inner { flex-direction: column; gap: 14px; }
    .cookie-form { width: 100%; min-width: 0; }
    body.has-cookie-banner { padding-bottom: 280px; }

    .site-footer { padding: 40px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 520px) {
    .section h2 { font-size: 32px; }
    .button { width: 100%; }
    .hero-actions .button { width: auto; }
    .plan-head { align-items: flex-start; flex-direction: column; }
    .legal-document { border-radius: 16px; padding: 20px; }
    .quote-card .button { width: 100%; }
}
