/*!
 * София Берс — основной стиль сайта
 * Собран из инлайновых стилей index.html: дубли удалены, каскад сохранён.
 */

/* ========== ШРИФТ (вариативный Vela Sans, 200–800, латиница+кириллица) ========== */
@font-face {
    font-family: 'VelaSans';
    src: url('../fonts/vela-sans.woff2?v=2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* ========== БАЗА ========== */
:root {
    --purple: #6C63FF;
    --accent: #6f5ae6;
    --light: #f7f7f7;
    --muted: #7F7F80;
    --bg: #F6F6FA;
    --error: #d93636;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    font-family: 'VelaSans', Arial, sans-serif;
    color: #111;
    background: var(--bg);
}

img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

[x-cloak] { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 2000;
    background: #fff; color: #111; padding: 10px 16px; border-radius: 6px;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hero :focus-visible, .cta-inner :focus-visible, .consult-card :focus-visible { outline-color: #fff; }

/* ========== КОНТЕЙНЕР ========== */
.container {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ========== HERO ========== */
.hero {
    background: #0a0a0a;
    color: #fff;
    padding: 40px 0;
    min-height: 780px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* положение и сила подсветки курсора — задаются из app.js, значения по умолчанию для случая без JS */
    --hx: 50%;
    --hy: 18%;
    --hg: .4;
}

/* ===== Фон hero: лёгкая интерактивная подсветка + едва заметное дыхание фона =====
   Всё в чёрно-белых тонах, без картинок и сторонних библиотек — только градиенты и CSS-анимации. */
.hero-fx {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-fx-blob {
    position: absolute;
    width: 46vw;
    height: 46vw;
    max-width: 620px;
    max-height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .09), transparent 70%);
    filter: blur(6px);
    will-change: transform;
}
.hero-fx-blob--a { top: -14%; left: -8%; animation: heroDriftA 24s ease-in-out infinite; }
.hero-fx-blob--b {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, rgba(255, 255, 255, .06), transparent 70%);
    animation: heroDriftB 28s ease-in-out infinite;
}

.hero-fx-grid {
    position: absolute;
    inset: -40px;
    background-image: radial-gradient(rgba(255, 255, 255, .6) 1px, transparent 1.5px);
    background-size: 28px 28px;
    opacity: .05;
    -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 25%, #000 35%, transparent 85%);
    mask-image: radial-gradient(ellipse 85% 65% at 50% 25%, #000 35%, transparent 85%);
}

/* медленный «плывущий» градиент — живёт сам по себе, даже если никто не двигает мышью.
   Двигаем только transform (не background-position), чтобы браузер считал это дёшево:
   работа уходит на видеокарту, макет и перерисовку страницы это не трогает. */
.hero-fx-sheen {
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: linear-gradient(115deg,
        transparent 28%,
        rgba(255, 255, 255, .06) 47%,
        rgba(255, 255, 255, .1) 52%,
        transparent 72%);
    transform: translate3d(-20%, -8%, 0) rotate(0deg);
    animation: heroSheen 17s ease-in-out infinite;
    will-change: transform;
}

/* пятно света, которое ходит за курсором (см. app.js) — на чёрном фоне читается как мягкий блик */
.hero-fx-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(440px circle at var(--hx) var(--hy), rgba(255, 255, 255, .16), transparent 60%);
    opacity: var(--hg);
    transition: opacity .4s ease;
    mix-blend-mode: screen;
}

.hero > .container { position: relative; z-index: 1; }

@keyframes heroDriftA {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(6%, 8%) scale(1.08); }
}
@keyframes heroDriftB {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-7%, -6%) scale(1.05); }
}
@keyframes heroSheen {
    0%, 100% { transform: translate3d(-20%, -8%, 0) rotate(0deg); }
    50%      { transform: translate3d(18%, 10%, 0) rotate(4deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-fx-blob, .hero-fx-sheen { animation: none; }
    .hero-fx-glow { transition: none; }
}

@media (max-width: 768px) {
    .hero-fx-blob { width: 70vw; height: 70vw; }
}

.logo { height: 41px; width: auto; display: block; }

.nav { display: flex; justify-content: space-between; align-items: center; }

.nav-links { display: flex; gap: 40px; font-size: 20px; list-style: none; }
.nav-links a { text-decoration: none; color: #fff; }
.nav-links a:hover { opacity: .75; }

/* H1 = имя + подзаголовок (единый заголовок для поисковиков, внешне как раньше) */
.hero-h1 {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    font-size: inherit;
    font-weight: inherit;
}

.hero-title {
    display: block;
    width: 100%;
    font-size: 190px;
    font-weight: 800;
    letter-spacing: -5px;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-sub {
    display: flex;
    justify-content: space-between;
    font-size: 40px;
    font-weight: 600;
}
.hero-sub .sub1 { display: block; width: 50%; line-height: 34px; }
.hero-sub .sub2 { display: block; color: #F6F6FA; opacity: .5; line-height: 30px; }

.hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: auto;
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-block;
    width: 100%;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5a47cc; }
.btn-white { background: #fff; color: var(--accent); }
.btn-white:hover { background: #eaeaea; }

.hero-actions .btn { text-align: center; font-size: 20px; font-weight: 500; }

/* ========== СЕКЦИИ ========== */
.section { padding: 80px 0; }

.section-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

.section-title {
    color: var(--accent);
    font-size: 40px;
    font-weight: 600;
    overflow-wrap: break-word;
}
.page-title { overflow-wrap: break-word; }

.about-text {
    font-size: 20px;
    font-weight: 700;
    color: #070707;
    line-height: 17px;
}
.muted { color: var(--muted); }

/* ПОДХОД */
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.card {
    background: #fff;
    padding: 20px;
    min-height: 160px;
    border-radius: 10px;
}
.card .desc {
    margin-top: 50px;
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
    min-width: 300px;
    line-height: 17px;
    margin-bottom: 0;
}

/* утилиты */
.flex { margin-top: 50px; align-items: center; display: flex; }
.w-50 { width: 50%; }
.justify-center { display: flex; justify-content: end; }
.mt-0 { margin-top: 0 !important; }
.w-100 { width: 100% !important; }

/* УСЛУГИ */
.services-list { display: grid; grid-template-columns: 1fr; gap: 24px; }

.service-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    position: relative;
}
.service-card.small { display: inline-block; }
.service-pair { margin-top: 0 !important; padding: 0 !important; }

.service-card .desc {
    margin-top: 50px;
    font-size: 20px;
    font-weight: 700;
    color: var(--muted);
    min-width: 300px;
    line-height: 17px;
    margin-bottom: 0;
    width: 50%;
}
.small .desc { margin-bottom: 39px; }

.service-card .btn {
    font-size: 20px;
    font-weight: 500;
    height: 35px;
    width: auto;
    padding: 5px 43px;
    line-height: 1;
}

/* колонка с описанием + кнопкой «подробнее» — чтобы пилюля не сжималась
   в паре с блоком кнопки «заказать проект» на той же строке */
.desc-col { width: 50%; }
.desc-col .desc { width: 100%; margin-bottom: 0; }
.consult-card .desc-col { width: 52%; }
.consult-card .desc-col .desc { width: 100%; }

.service-head,
.consult-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.service-head h3 { font-size: 20px; margin: 0; }
.consult-head h3 { font-size: 16px; margin: 0; }

.dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.dot.white { background: #fff; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 60%;
    margin-bottom: 10px;
    list-style: none;
}
.tags li {
    font-size: 13px;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 10px;
    white-space: nowrap;
}

.term { font-size: 15px; margin-bottom: 12px; }

.desc {
    font-size: 15px;
    line-height: 1.4;
    color: #777;
    margin-bottom: 20px;
}

/* КОНСУЛЬТАЦИЯ */
.consult-card {
    background: var(--accent);
    border-radius: 10px;
    padding: 24px;
    color: #fff;
}
.consult-card .tags li { border-color: rgba(255, 255, 255, .6); color: #fff; }
.consult-card .desc {
    margin-top: 30px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    min-width: 300px;
    line-height: 17px;
    margin-bottom: 0;
    width: 52%;
}
.consult-bottom { display: flex; align-items: flex-end; justify-content: space-between; }

/* ПОРТФОЛИО */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 56px 40px;
    list-style: none;
}
.port-item { display: flex; flex-direction: column; gap: 12px; }
.portfolio-grid .port-item:nth-child(even) { margin-top: 60px; }

.thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    background: #eee;
    border-radius: 8px;
}
.meta { display: flex; flex-direction: column; gap: 8px; }
.meta .title { font-size: 16px; font-weight: 600; color: #111; }

/* ВОПРОСЫ И ОТВЕТЫ */
.faq-list { display: grid; gap: 16px; }
.faq-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
}
.faq-item summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    margin-left: auto;
    color: var(--accent);
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item h3 { font-size: inherit; font-weight: inherit; }
.faq-item p {
    margin-top: 16px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--muted);
    max-width: 760px;
}

/* CTA */
.cta { padding: 60px 0; }
.cta-inner {
    background: var(--accent);
    border-radius: 10px;
    min-height: 220px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cta-top { display: flex; align-items: center; gap: 24px; }
.cta-dot {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}
.cta-nav { display: flex; gap: 32px; }
.cta-nav a { color: #fff; text-decoration: none; font-size: 16px; opacity: .9; }
.cta-nav a:hover { opacity: 1; }

.cta-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.cta-text {
    color: #fff;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 500;
    text-align: left;
}
.cta-btn {
    background: #fff;
    color: var(--accent);
    text-decoration: none;
    padding: 5px 70px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 500;
    height: 35px;
    width: auto;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }

/* ФУТЕР */
.site-footer { padding: 30px 0; font-size: 14px; color: var(--muted); }
.site-footer .container { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--accent); }

/* ========== ФОРМА ЗАЯВКИ (popup) ========== */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    padding: 16px 0;
}
.popup-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    text-align: center;
}
.popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: .5;
    transition: opacity .2s ease, background-color .2s ease;
}
.popup-close:hover { opacity: 1; background: #f1f1f4; }
.popup-close svg { width: 16px; height: 16px; }

.popup-title { margin-bottom: 10px; font-size: 28px; }
.popup-lead { color: var(--muted); margin-bottom: 25px; }
.popup-service { color: var(--accent); font-weight: 600; margin: -15px 0 20px; font-size: 14px; }

.lead-form { display: flex; flex-direction: column; gap: 15px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input,
.field textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    transition: border-color .2s ease;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus,
.field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(111, 90, 230, .15); }
.field.has-error input,
.field.has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 13px; line-height: 1.3; }
.counter { font-size: 12px; color: #aaa; text-align: right; }

/* honeypot — поле-ловушка для ботов, человек его не видит */
.hp-field { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

.agree { display: flex; align-items: flex-start; gap: 10px; margin-top: 5px; }
.agree input { margin-top: 4px; cursor: pointer; accent-color: var(--purple); flex-shrink: 0; }
.agree label { font-size: 12px; color: var(--muted); line-height: 1.4; cursor: pointer; }
.agree a { color: inherit; }
.agree.has-error label { color: var(--error); }

.popup-submit {
    border: none;
    margin-top: 10px;
    height: 55px;
    border-radius: 10px;
    text-align: center;
}
.popup-submit[disabled] { opacity: .6; cursor: wait; }

.form-error {
    color: var(--error);
    font-size: 14px;
    text-align: center;
    line-height: 1.35;
}

.success { padding: 20px 0; }
.success-icon { font-size: 60px; margin-bottom: 20px; }
.success h2 { font-size: 24px; margin-bottom: 10px; }
.success p { color: var(--muted); }

html.is-locked, html.is-locked body { overflow: hidden; }

/* ========== ВНУТРЕННИЕ СТРАНИЦЫ (услуги, портфолио) ========== */
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.breadcrumb-bar { padding-top: 24px; }.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 6px; opacity: .6; }
.breadcrumbs [aria-current] { color: #111; }

/* Заголовок страницы услуги/кейса: во всю ширину, а не в узкой колонке section-grid,
   чтобы длинное название не переносилось в три строки и не наезжало на текст рядом. */
.page-hero { padding-top: 8px; padding-bottom: 32px; }
.page-title {
    color: var(--accent);
    font-size: 44px;
    font-weight: 600;
    line-height: 1.1;
    max-width: 760px;
    margin-bottom: 18px;
}
.page-lede {
    font-size: 20px;
    font-weight: 700;
    color: #070707;
    line-height: 1.4;
    max-width: 640px;
    margin-bottom: 10px;
}
.page-lede + .term { margin-bottom: 28px; }

.section-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.section-title--sm { font-size: 28px; }

.details-link {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 9px 20px;
    border-radius: 8px;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
}
.details-link .arrow { display: inline-block; transition: transform .2s ease; }
.details-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(111, 90, 230, .22);
}
.details-link:hover .arrow { transform: translateX(3px); }
.details-link:active { transform: translateY(0); box-shadow: none; }

/* компактная версия — для чипа рядом с заголовком раздела и для ссылок «назад» */
.details-link--sm { padding: 6px 15px; font-size: 13px; border-radius: 7px; margin-top: 0; }

/* «назад» — тише по весу, чем прямое действие вперёд */
.details-link--ghost { border-color: #ddd; color: var(--muted); }
.details-link--ghost:hover { background: transparent; border-color: var(--accent); color: var(--accent); box-shadow: none; transform: none; }
.details-link--ghost:hover .arrow { transform: translateX(-3px); }

/* на цветном (фиолетовом) фоне — белый контур вместо фиолетового, иначе кнопку не видно */
.details-link--on-accent { border-color: rgba(255, 255, 255, .7); color: #fff; }
.details-link--on-accent:hover { background: #fff; color: var(--accent); box-shadow: none; }

/* Крупная самостоятельная кнопка вне сетки карточек — тот же почерк, что у кнопок
   в карточках услуг на главной (btn-primary), но не растянута на 100% ширины. */
.btn-lg {
    display: inline-block;
    width: auto;
    font-size: 20px;
    font-weight: 500;
    padding: 14px 43px;
    line-height: 1;
}

.lede { font-size: 22px; font-weight: 600; color: #070707; line-height: 1.4; margin-bottom: 8px; }

.who-grid, .steps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 8px 0 28px; }
.step-card { background: #fff; border-radius: 10px; padding: 20px; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
    margin-bottom: 12px;
}
.step-card h3 { font-size: 17px; margin-bottom: 6px; }
.step-card p { font-size: 15px; color: var(--muted); line-height: 1.45; margin: 0; }

.case-meta {
    display: flex; flex-wrap: wrap; gap: 10px 28px;
    margin: 8px 0 28px; padding: 18px 20px;
    background: #fff; border-radius: 10px;
    font-size: 14px; color: var(--muted);
}
.case-meta div strong { display: block; color: #111; font-size: 15px; font-weight: 700; margin-bottom: 2px; }

.case-hero-img {
    width: 100%; height: auto; border-radius: 10px; margin-bottom: 8px;
    display: block; background: #eee; object-fit: cover; aspect-ratio: 16/9;
}
.case-caption { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.case-tags { margin-bottom: 32px; }
.case-body { max-width: 760px; }
.case-body h2 { font-size: 22px; margin: 32px 0 12px; }
.case-body p, .case-body li { font-size: 17px; line-height: 1.55; color: #333; margin-bottom: 12px; }
.case-body ul { padding-left: 22px; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.related-grid a {
    display: block;
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: #111;
    font-weight: 600;
    font-size: 15px;
    transition: box-shadow .2s ease, transform .15s ease;
}
.related-grid a:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.related-grid span { display: block; margin-top: 4px; font-weight: 400; font-size: 13px; color: var(--muted); }

.index-list { display: grid; gap: 14px; }
.index-list a {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    background: #fff; border-radius: 10px; padding: 18px 22px;
    text-decoration: none; color: #111;
}
.index-list a:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.index-list .name { font-weight: 700; font-size: 17px; }
.index-list .hint { font-size: 14px; color: var(--muted); font-weight: 400; }
.index-list .arrow { color: var(--accent); font-size: 20px; flex-shrink: 0; }

.page-cta { padding-top: 8px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-28 { margin-bottom: 28px; }
.plain-link { color: inherit; text-decoration: none; }

@media (max-width: 768px) {
    .who-grid, .steps-grid { grid-template-columns: 1fr; }
    .case-meta { gap: 8px 20px; }
    .index-list a { flex-direction: column; align-items: flex-start; gap: 4px; }
    .page-title { font-size: 34px; }
    .page-lede { font-size: 18px; }
}

/* ========== ТЕКСТОВЫЕ СТРАНИЦЫ (политика, 404) ========== */
.page-header { background: #0a0a0a; color: #fff; padding: 28px 0; }
.page-header .container { flex-direction: row; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.page-header a { color: #fff; text-decoration: none; }
.page-header .logo-link { display: flex; align-items: center; }
.page-header nav { display: flex; align-items: center; gap: 28px; font-size: 17px; flex-wrap: wrap; }
.page-header nav a:hover { opacity: .75; }
.page-header nav .btn { font-size: 15px; padding: 8px 20px; width: auto; }
.prose { padding: 60px 0 40px; }
.prose .container { max-width: 820px; gap: 0; }
.prose h1 { font-size: 40px; font-weight: 700; color: var(--accent); margin-bottom: 24px; line-height: 1.1; overflow-wrap: break-word; }
.prose h2 { font-size: 22px; margin: 32px 0 12px; }
.prose p, .prose li { font-size: 17px; line-height: 1.55; color: #333; margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.prose a { color: var(--accent); }
.error-page { min-height: 70vh; display: flex; align-items: center; padding: 60px 0; }
.error-page .code { font-size: clamp(96px, 20vw, 190px); font-weight: 800; letter-spacing: -5px; line-height: 1; color: var(--accent); }
.error-page p { font-size: 20px; font-weight: 600; margin: 16px 0 32px; }
.error-page .btn { width: auto; font-size: 20px; padding: 14px 40px; }

/* ========== АДАПТИВ ========== */
@media (max-width: 1250px) {
    .container { width: 92%; }
    .hero-title { font-size: 14.8vw; }
}

@media (max-width: 1024px) {
    .section-grid,
    .cards-grid,
    .portfolio-grid { grid-template-columns: 1fr; }

    .cta-inner { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 768px) {
    .portfolio-grid .port-item:nth-child(even) { margin-top: 0; }

    .cta-bottom,
    .consult-bottom { flex-direction: column; align-items: flex-start; gap: 20px; }

    .cta-text { font-size: 20px; }

    /* min-width: 0 — убирает горизонтальный скролл на экранах 320–360px */
    .card .desc {
        font-weight: 600;
        line-height: 20px;
        min-width: 0;
    }
    .service-card .desc,
    .consult-card .desc { min-width: 0; }

    .hero-sub .sub1 { width: 100%; line-height: 30px; font-size: 30px; }
    .hero-sub .sub2 { width: 100%; line-height: 30px; font-size: 30px; margin-top: 26px; text-align: end; }

    .hero-title {
        font-size: 25.8vw;
        line-height: .9;
        white-space: normal;
    }

    .container { gap: 40px; }
    .hero-h1 { gap: 40px; }

    .hero-actions { gap: 10px; }

    .about-text { line-height: 20px; }

    .section-title { font-size: 44px; }

    .service-card { flex-direction: column; }
    .service-card .flex {
        flex-direction: column;
        text-align: left;
        justify-content: space-between;
        align-items: start;
    }
    .service-card .desc { margin-top: 30px; width: 100%; line-height: 20px; }
    .desc-col { width: 100%; }
    .small .desc { margin-bottom: 20px; }
    .term { margin-bottom: 0; }
    .flex { margin-top: 20px; }

    .service-card .btn { font-weight: 400; width: 100%; }

    .w-50 { width: 100%; }

    .tags { width: 100%; margin-bottom: 0; }

    .consult-card .desc { width: 100%; }
    .consult-card .desc-col { width: 100%; }

    .cta-btn {
        width: 100%;
        text-align: center;
        font-weight: 400;
        padding: 5px 43px;
    }

    .faq-item summary { font-size: 18px; }
    .faq-item p { font-size: 16px; }
}

@media (max-width: 400px) {
    /* очень узкие экраны (320px): длинные теги и кнопки переносятся, а не распирают страницу */
    .section-grid > *, .services-list > *, .cards-grid > * { min-width: 0; }
    .tags li { white-space: normal; }
    .service-card .btn, .cta-btn { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 640px) {
    .btn { width: 100%; text-align: center; font-weight: 600; font-size: 16px; }
    .hero-sub { flex-direction: column; gap: 10px; }
    .popup-content { padding: 32px 20px 24px; width: calc(100% - 24px); }
    .popup-title { font-size: 24px; padding: 0 30px; }
}
