/* ==========================================================================
   Смета24 — лендинг. Дизайн-система в CSS-переменных, светлая и тёмная темы.
   ========================================================================== */

:root {
    --bg: #f6f8fc;
    --bg-tint: #edf2fa;
    --surface: #ffffff;
    --surface-2: #f9fbfe;
    --text: #0f172a;
    --muted: #5b6577;
    --border: #dfe5ee;
    --primary: #0b5fff;
    --primary-strong: #0047d6;
    --primary-soft: rgba(11, 95, 255, 0.08);
    --accent: #f59e0b;
    --success: #0f9d58;
    --danger: #d92d20;
    --shadow: 0 22px 55px rgba(15, 23, 42, 0.10);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.07);
    --radius: 18px;
    --radius-sm: 12px;
    --container: 1180px;
    --header-h: 72px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
    --bg: #0b1120;
    --bg-tint: #0e1729;
    --surface: #111a2e;
    --surface-2: #0f172a;
    --text: #e8eefc;
    --muted: #9aa7bd;
    --border: #22304a;
    --primary: #4d8bff;
    --primary-strong: #6aa0ff;
    --primary-soft: rgba(77, 139, 255, 0.14);
    --accent: #fbbf24;
    --success: #34d399;
    --danger: #f87171;
    --shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h, 72px) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1em;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

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

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- Кнопки, бейджи, типографика ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(11, 95, 255, 0.28);
}

.btn--primary:hover {
    background: var(--primary-strong);
    transform: translateY(-1px);
}

.btn--ghost {
    border-color: var(--border);
    background: var(--surface);
}

.btn--ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn--sm {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 14px;
}

.btn--lg {
    min-height: 54px;
    padding: 15px 28px;
    font-size: 16px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge--muted {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
}

/* ---------- Шапка ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo__mark {
    flex: 0 0 auto;
    color: var(--primary);
}

.logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo__text strong {
    font-size: 19px;
    letter-spacing: -0.02em;
}

.logo__text span {
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: 0.01em;
}

.nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav a {
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 500;
}

.nav a:hover {
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.header__phone {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
    font-weight: 600;
    font-size: 14.5px;
    white-space: nowrap;
}

.header__phone:hover {
    color: var(--primary);
    text-decoration: none;
}

.header__phone svg {
    color: var(--primary);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 84px;
    background:
        radial-gradient(900px 480px at 8% -10%, var(--primary-soft), transparent 65%),
        radial-gradient(700px 420px at 100% 10%, rgba(245, 158, 11, 0.10), transparent 60%),
        var(--bg);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 56px;
}

.hero h1 {
    max-width: 19ch;
    margin-bottom: 20px;
    font-size: clamp(30px, 4.1vw, 52px);
    letter-spacing: -0.03em;
}

.hero__lead {
    max-width: 56ch;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: clamp(16px, 1.4vw, 18.5px);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 38px;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

.hero__stats dt {
    margin-bottom: 2px;
    color: var(--text);
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.hero__stats dd {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
}

.hero__visual {
    position: relative;
}

.doc-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.doc-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.doc-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
}

.doc-card__badge {
    font-weight: 700;
    font-size: 15px;
}

.doc-card__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--success);
    font-size: 12.5px;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent);
}

.doc-card__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 22px;
}

.doc-group h2 {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doc-group li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 9px;
    font-size: 13.5px;
    line-height: 1.45;
}

.doc-group li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
    font-weight: 700;
}

.doc-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12.5px;
}

.doc-card__foot svg {
    color: var(--success);
}

/* ---------- Секции ---------- */

.section {
    padding: 84px 0;
}

.section--tinted {
    background: var(--bg-tint);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section__head {
    max-width: 720px;
    margin-bottom: 42px;
}

.section__head h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.section__lead {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

/* ---------- Услуги ---------- */

.services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* Карточки не должны раздувать грид своим min-content. */
.services > *,
.features > *,
.cases > *,
.reviews > *,
.process > * {
    min-width: 0;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.service-card--featured {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background:
        linear-gradient(180deg, var(--primary-soft), transparent 38%),
        var(--surface);
}

.service-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
}

.service-card > p {
    color: var(--muted);
    font-size: 14.5px;
}

.check-list {
    margin: 4px 0 24px;
}

.check-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.45;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: 700;
}

.service-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.price {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

/* ---------- Процесс ---------- */

.process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: step;
}

.process__step {
    position: relative;
    padding: 24px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.process__num {
    display: block;
    margin-bottom: 14px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.process__step h3 {
    font-size: 18px;
}

.process__step p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- Преимущества ---------- */

.features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.feature {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
}

.feature h3 {
    font-size: 17px;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- Кейсы ---------- */

.cases {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.case-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.case-card__tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.case-card h3 {
    font-size: 19px;
}

.case-card > p {
    color: var(--muted);
    font-size: 14px;
}

.case-card__result {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.case-card__result li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 7px;
    font-size: 13.5px;
}

.case-card__result li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--primary);
    font-weight: 700;
}

/* ---------- Отзывы ---------- */

.reviews {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.review {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.review p {
    font-size: 15px;
    line-height: 1.6;
}

.review footer {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- FAQ ---------- */

.faq {
    display: grid;
    gap: 12px;
}

.faq__item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.faq__item summary {
    position: relative;
    padding: 18px 52px 18px 22px;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

.faq__item summary::-webkit-details-marker {
    display: none;
}

.faq__item summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

.faq__item[open] summary::after {
    content: "−";
}

.faq__item p {
    margin: 0;
    padding: 0 22px 20px;
    color: var(--muted);
    font-size: 14.5px;
}

/* ---------- Контакты и форма ---------- */

.contact {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
    align-items: start;
}

.contact__info h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.contact-list {
    display: grid;
    gap: 18px;
    margin: 28px 0;
}

.contact-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.contact-list__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
}

.contact-list__label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.contact-list a,
.contact-list span {
    display: block;
    color: var(--text);
    font-size: 15.5px;
    font-weight: 550;
}

.contact-list a:hover {
    color: var(--primary);
}

.requisites {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.form {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.form__title {
    margin-bottom: 6px;
    font-size: 22px;
}

.form__hint {
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13.5px;
}

.form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 650;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
    resize: vertical;
    min-height: 104px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.field--full {
    grid-column: 1 / -1;
}

.field__hint {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12.5px;
}

input[type="file"] {
    padding: 10px;
    background: var(--surface-2);
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.file-list {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
}

.file-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}

.form__row {
    margin-top: 16px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 13.5px;
    cursor: pointer;
}

.checkbox input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.checkbox a {
    text-decoration: underline;
}

.form__submit {
    width: 100%;
    margin-top: 22px;
}

.btn__loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.form.is-loading .btn__text {
    opacity: 0.7;
}

.form.is-loading .btn__loader {
    display: inline-block;
}

.form.is-loading .form__submit {
    pointer-events: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form__status {
    min-height: 22px;
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 600;
}

.form__status.is-success {
    color: var(--success);
}

.form__status.is-error {
    color: var(--danger);
}

.form__success {
    padding: 22px;
    border: 1px solid color-mix(in srgb, var(--success) 40%, var(--border));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.form__success h3 {
    margin-bottom: 8px;
    color: var(--success);
    font-size: 19px;
}

.form__success p {
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Футер ---------- */

.footer {
    padding: 56px 0 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 36px;
}

.footer__brand strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.footer__brand p {
    max-width: 38ch;
    color: var(--muted);
    font-size: 14px;
}

.footer__legal {
    font-size: 12.5px !important;
}

.footer__col h2 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer__col a {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 14px;
}

.footer__col a:hover {
    color: var(--primary);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.footer__bottom--page {
    margin-top: 0;
    border-top: 0;
}

.footer__bottom a {
    color: var(--muted);
}

/* ---------- Страницы (privacy, 404) ---------- */

.page {
    padding: 56px 0 80px;
}

.page h1 {
    font-size: clamp(28px, 3.4vw, 40px);
}

.page h2 {
    margin-top: 34px;
    font-size: 21px;
}

.page p,
.page li {
    color: var(--muted);
    font-size: 15px;
}

.page ul {
    margin: 0 0 1em;
    padding-left: 22px;
    list-style: disc;
}

.page__back {
    display: inline-flex;
    margin-top: 28px;
    font-weight: 600;
}

.not-found {
    display: grid;
    place-items: center;
    min-height: 60vh;
    text-align: center;
}

.not-found__code {
    color: var(--primary);
    font-size: clamp(64px, 12vw, 120px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
    .services,
    .features,
    .cases,
    .reviews {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .nav a {
        padding: 8px 8px;
        font-size: 14px;
    }

    .header__phone span {
        display: none;
    }
}

@media (max-width: 920px) {
    .hero__inner,
    .contact {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 52px;
    }

    .hero__visual {
        max-width: 560px;
    }

    .nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 2px;
        padding: 14px 24px 20px;
        border-bottom: 1px solid var(--border);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }

    .nav.is-open {
        display: flex;
    }

    .nav a {
        padding: 12px;
        font-size: 16px;
    }

    .burger {
        display: flex;
    }

    .header__cta {
        display: none;
    }

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

    .footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 18px;
    }

    .section {
        padding: 62px 0;
    }

    .hero {
        padding: 40px 0 62px;
    }

    .hero__stats {
        gap: 12px;
    }

    .services,
    .features,
    .cases,
    .reviews,
    .process {
        grid-template-columns: 1fr;
    }

    .badge {
        white-space: normal;
    }

    .service-card__top {
        align-items: flex-start;
    }

    .doc-card__body {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .form {
        padding: 20px;
    }

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

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .footer__bottom {
        flex-direction: column;
    }

    .header__actions {
        gap: 8px;
    }

    .header__inner {
        gap: 12px;
    }

    .logo__text span {
        display: none;
    }

    .theme-toggle,
    .burger {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Появление секций при скролле (класс ставит main.js) */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}
