/* ==========================================================================
   airat-sharipov.ru — основной стиль
   Дизайн-система: editorial / technology. Светлые и тёмные секции,
   крупная типографика, один бирюзовый акцент.
   ========================================================================== */

:root {
    --ink: #111827;
    --ink-2: #39435a;
    --muted: #616c82;
    --muted-dark: rgba(255, 255, 255, 0.72);
    --line: #dbe2ec;
    --line-dark: rgba(255, 255, 255, 0.18);

    --paper: #ffffff;
    --paper-2: #f4f7fb;
    --paper-3: #edf2f8;
    --paper-warm: #f8f5f0;

    --night: #0e1219;
    --night-2: #161d29;
    --night-3: #1e2734;

    --accent: #00707c;
    --accent-deep: #005a64;
    --accent-light: #35b3c0;
    --accent-wash: #e6f3f4;
    --warn: #b3261e;
    --ok: #1f7a45;

    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 16px 40px rgba(17, 24, 39, 0.10);
    --shadow-sm: 0 4px 14px rgba(17, 24, 39, 0.06);

    --step: clamp(15px, 0.35vw + 14px, 17px);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 88px;
}

body {
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: var(--step);
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.015em; font-weight: 800; }

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

/* --- Клавиатурная навигация ---------------------------------------------- */

:focus-visible {
    outline: 3px solid var(--accent-light);
    outline-offset: 3px;
    border-radius: 4px;
}

.section-dark :focus-visible,
.site-footer :focus-visible { outline-color: #7fd6df; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 100;
    padding: 12px 18px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius);
    transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* --- Раскладка ------------------------------------------------------------ */

.container {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 84px 0; }
.section-tight { padding: 60px 0; }

.section-alt { background: var(--paper-2); }
.section-warm { background: var(--paper-warm); }
.section-dark { background: var(--night); color: #fff; }
.section-dark p { color: var(--muted-dark); }


.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 28px 56px;
    align-items: end;
    margin-bottom: 44px;
}

.kicker {
    display: block;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}
.section-dark .kicker { color: var(--accent-light); }

.section-title { font-size: clamp(27px, 3.1vw, 42px); }
.section-lead { color: var(--muted); font-size: clamp(16px, 1.2vw, 18px); }
.section-dark .section-lead { color: var(--muted-dark); }

/* --- Кнопки --------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }

.btn-outline { border-color: var(--line); background: var(--paper); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { border-color: rgba(255, 255, 255, 0.42); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.10); }

.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

.btn:hover { transform: translateY(-1px); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 2px solid transparent;
}
.link-arrow::after { content: "→"; transition: transform 0.18s ease; }
.link-arrow:hover::after { transform: translateX(4px); }
.section-dark .link-arrow { color: var(--accent-light); }

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-height: 44px; }

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
    flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.brand-name { display: block; font-weight: 800; font-size: 16px; line-height: 1.2; }
.brand-role { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-2);
    border-radius: 6px;
}
.nav a:hover { color: var(--accent); background: var(--accent-wash); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}
.nav-toggle[aria-expanded="true"] span { box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink); }

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

.hero {
    position: relative;
    background: var(--night);
    color: #fff;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 70% at 20% 40%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 20% 40%, #000 30%, transparent 100%);
}

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

.hero-inner {
    max-width: 720px;
    padding: 76px 0 68px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.86);
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--accent-light); }

.hero h1 {
    font-size: clamp(33px, 4.6vw, 60px);
    letter-spacing: -0.025em;
    margin-bottom: 22px;
    text-wrap: balance;
}

.hero-lead {
    max-width: 640px;
    margin-bottom: 30px;
    font-size: clamp(16.5px, 1.35vw, 20px);
    color: rgba(255, 255, 255, 0.86);
}

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

/* Обычный абзац, а не flex: иначе на узких экранах каждое название
   компании становится отдельным flex-элементом и строка расползается */
.hero-trust {
    max-width: 600px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.72);
}
.hero-trust b { color: #fff; font-weight: 700; white-space: nowrap; }

/* Полоса масштаба */

.scale-band { background: var(--night-2); color: #fff; padding: 0 0 34px; }

.scale-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: var(--line-dark);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    overflow: hidden;
}

.scale-item { padding: 20px; background: var(--night-2); }
.scale-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1;
    letter-spacing: -0.02em;
}
.scale-item span { font-size: 14px; color: var(--muted-dark); }

.scale-note {
    margin-top: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* --- Логотипы ------------------------------------------------------------- */

.logo-strip { padding: 40px 0; border-bottom: 1px solid var(--line); }

.logo-strip-label {
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.logo-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: center;
}

.logo-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}
.logo-cell img { max-height: 30px; width: auto; object-fit: contain; }
/* Квадратные знаки при одинаковой высоте выглядят вдвое мельче словесных */
.logo-cell img[data-shape="square"] { max-height: 42px; }
.logo-cell span { font-weight: 800; font-size: 18px; color: var(--ink-2); }

/* --- Симптомы ------------------------------------------------------------- */

/* 6-колоночная сетка: 3 карточки по 2 колонки + 2 карточки по 3 —
   ряды получаются 3 и 2 без одинокой карточки в конце */
.symptom-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}
.symptom-grid > * { grid-column: span 2; }
.symptom-grid > :nth-child(4),
.symptom-grid > :nth-child(5) { grid-column: span 3; }

.symptom {
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.symptom h3 { font-size: 17px; margin-bottom: 8px; }
.symptom p { font-size: 15px; color: var(--muted); }

.bridge {
    margin-top: 32px;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: #fff;
    font-size: clamp(17px, 1.5vw, 21px);
    font-weight: 700;
    line-height: 1.42;
    text-wrap: balance;
}
.bridge span { color: var(--accent-light); }

/* --- Было → Стало --------------------------------------------------------- */

.shift-table {
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.shift-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
    align-items: center;
    border-bottom: 1px solid var(--line-dark);
}
.shift-row:last-child { border-bottom: 0; }

.shift-head {
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.shift-head .shift-cell { color: rgba(255, 255, 255, 0.66); padding-top: 14px; padding-bottom: 14px; }

.shift-cell { padding: 18px 22px; font-size: 16px; }
.shift-from { color: rgba(255, 255, 255, 0.56); }
.shift-to { color: #fff; font-weight: 600; }

.shift-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    color: var(--accent-light);
    background: rgba(255, 255, 255, 0.04);
    font-size: 18px;
}

.shift-caveat {
    margin-top: 22px;
    max-width: 760px;
    font-size: 15px;
    color: var(--muted-dark);
}

/* --- Путь данных ---------------------------------------------------------- */

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

.flow-node {
    position: relative;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}
.flow-node::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 3px;
    background: var(--accent);
    opacity: calc(0.3 + var(--i) * 0.23);
}
.flow-node h3 { font-size: 17px; margin-bottom: 8px; }
.flow-node p { font-size: 14.5px; color: var(--muted); }

.flow-node + .flow-node::after {
    content: "→";
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
}

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

.service-list { display: grid; gap: 18px; }

.service {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
    gap: 24px 40px;
    padding: 32px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.service-index {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 10px;
}
.service h3 { font-size: clamp(20px, 1.8vw, 25px); margin-bottom: 12px; }
.service-when { font-size: 15px; color: var(--muted); }

.service-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
}
.service-cols h4 {
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}
.service-cols li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--ink-2);
}
.service-cols li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--accent);
}
.service-cta { grid-column: 1 / -1; padding-top: 4px; }

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

.case-list { display: grid; gap: 18px; }

.case {
    padding: 32px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    background: var(--night-2);
}

.case-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line-dark);
}

.case-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }

.case-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 7px;
    border-radius: 8px;
    background: #fff;
    flex-shrink: 0;
}
.case-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.case-logo .case-logo-text { font-size: 15px; font-weight: 800; color: var(--ink); }

.case-role { font-size: 13.5px; color: var(--muted-dark); font-weight: 600; }

.case h3 { font-size: clamp(19px, 1.7vw, 24px); margin-bottom: 20px; }

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

.case-facts dt {
    margin-bottom: 7px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
}
.case-facts dd { font-size: 15px; color: rgba(255, 255, 255, 0.86); }

.case-scale {
    margin-top: 22px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: rgba(53, 179, 192, 0.10);
    border: 1px solid rgba(53, 179, 192, 0.28);
    font-size: 15px;
    color: #fff;
}
.case-scale b { color: var(--accent-light); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
    padding: 5px 11px;
    border: 1px solid var(--line-dark);
    border-radius: 100px;
    font-size: 12.5px;
    color: var(--muted-dark);
}

.case-compact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }

.case-compact {
    padding: 26px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
}
.case-compact h3 { font-size: 18px; margin: 16px 0 10px; }
.case-compact p { font-size: 15px; }

.case-disclaimer {
    margin-top: 26px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.55);
    max-width: 820px;
}

/* --- Почему я ------------------------------------------------------------- */

/* На десктопе портрет скрыт (он уже в первом экране), поэтому вторая
   колонка не нужна — список раскладывается в две колонки сам */
.why-grid { display: grid; gap: 40px; align-items: start; }

.why-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; }
.why-list li:nth-last-child(2) { border-bottom: 0; }

@media (max-width: 900px) {
    .why-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .why-list { grid-template-columns: 1fr; }
    .why-list li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
    .why-grid { grid-template-columns: 1fr; }
}

.why-list li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.why-list li:last-child { border-bottom: 0; }
.why-list h3 { font-size: 17px; margin-bottom: 5px; }
.why-list p { font-size: 15px; color: var(--muted); }

.why-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent-wash);
    color: var(--accent-deep);
}
.why-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Портрет в блоке «Обо мне» показывается только там, где скрыт hero-портрет.
   loading="lazy" + display:none означает, что на десктопе файл не скачивается. */
.portrait-card { display: none; }

@media (max-width: 900px) {
    .portrait-card { display: block; }
}

.portrait-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--paper);
}
.portrait-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; }
.portrait-card figcaption { padding: 18px 22px; font-size: 14.5px; color: var(--muted); }
.portrait-card b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 3px; }

.talks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }

.talk {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--paper);
}
.talk img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.talk-body { padding: 22px 24px 18px; display: flex; flex-direction: column; flex: 1; }
.talk h3 { font-size: 18px; margin-bottom: 8px; }
.talk p { font-size: 15px; color: var(--muted); margin-bottom: auto; padding-bottom: 12px; }

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

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

.step {
    padding: 26px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.03);
}
.step-num {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--accent-light);
}
.step h3 { font-size: 19px; margin-bottom: 10px; }
.step p { font-size: 15px; margin-bottom: 16px; }

.step-out {
    padding-top: 14px;
    border-top: 1px solid var(--line-dark);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.86);
}
.step-out b {
    display: block;
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

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

.faq { max-width: 880px; }

.faq-item {
    border-bottom: 1px solid var(--line);
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    font-size: clamp(17px, 1.4vw, 19px);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-weight: 700;
    color: var(--accent);
}
.faq-item[open] summary::after { content: "−"; background: var(--accent); color: #fff; border-color: var(--accent); }
.faq-item p { padding-bottom: 24px; max-width: 74ch; color: var(--muted); }
.faq-item p + p { margin-top: -12px; padding-bottom: 24px; }

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

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: center;
}

.contact-copy h2 { font-size: clamp(26px, 2.9vw, 40px); margin-bottom: 18px; text-wrap: balance; }
.contact-copy > p { color: var(--muted-dark); font-size: 17px; margin-bottom: 30px; max-width: 56ch; }

/* --- Карточка прямого контакта -------------------------------------------- */

.contact-card {
    display: grid;
    gap: 14px;
    padding: 26px;
    background: var(--night-2);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
}

.contact-primary {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 84px;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    transition: background-color 0.18s ease, transform 0.18s ease;
}
.contact-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }

.contact-primary-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}
.contact-primary-icon svg {
    width: 24px; height: 24px;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}

.contact-primary-title { display: block; font-size: 19px; font-weight: 800; line-height: 1.2; }
.contact-primary-sub { display: block; margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, 0.86); }

.contact-secondary { display: grid; gap: 10px; }

.contact-secondary a {
    display: grid;
    gap: 3px;
    align-content: center;
    min-height: 64px;
    padding: 12px 18px;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.18s ease, background-color 0.18s ease;
}
.contact-secondary a:hover { border-color: var(--accent-light); background: rgba(53, 179, 192, 0.09); }

.contact-formats {
    padding-top: 14px;
    border-top: 1px solid var(--line-dark);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.86);
}
.contact-formats .contact-label { display: block; margin-bottom: 5px; }

.contact-label {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}
.contact-value { font-size: 17px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }

.legal {
    padding-top: 20px;
    border-top: 1px solid var(--line-dark);
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.68);
}
.legal b { color: rgba(255, 255, 255, 0.9); }

/* --- CTA-полоса ----------------------------------------------------------- */

.cta-band { background: var(--accent-deep); color: #fff; padding: 40px 0; }

.cta-band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.cta-band h2 { font-size: clamp(20px, 2vw, 27px); margin-bottom: 6px; }
.cta-band p { color: rgba(255, 255, 255, 0.82); font-size: 16px; max-width: 62ch; }
.cta-band .btn-outline { background: #fff; border-color: #fff; }

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

.site-footer { background: var(--night); color: rgba(255, 255, 255, 0.6); padding: 44px 0; font-size: 14px; }

.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links a:hover { color: #fff; }

/* --- Появление при скролле (только при JS) -------------------------------- */

.js-ready .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 1080px) {
    .section-head { grid-template-columns: 1fr; align-items: start; }
    .service { grid-template-columns: 1fr; }
    .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .flow-node + .flow-node::after { display: none; }
    .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-grid { grid-template-columns: 1fr; }
    .symptom-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .symptom-grid > * { grid-column: span 2; }
    .symptom-grid > :nth-child(5) { grid-column: span 4; }
    .logo-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .nav { display: none; }
    .js-nav .nav-toggle { display: inline-flex; }

    /* Без JS меню остаётся видимым обычной строкой под шапкой.
       Липкость в этом режиме выключаем: высокая шапка иначе перекрывает
       контент при прокрутке и при переходе по якорям. */
    html:not(.js-nav) .site-header { position: static; }
    .header-inner { flex-wrap: wrap; padding-bottom: 8px; }
    .nav {
        display: flex;
        order: 3;
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 2px;
        padding-top: 4px;
        border-top: 1px solid var(--line);
    }
    .js-nav .nav {
        display: none;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0 12px;
    }
    .js-nav .nav.is-open { display: flex; }
    .js-nav .nav a { min-height: 48px; font-size: 16px; padding: 0 10px; }

    .symptom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .symptom-grid > *,
    .symptom-grid > :nth-child(4),
    .symptom-grid > :nth-child(5) { grid-column: span 1; }
    .symptom-grid > :nth-child(5) { grid-column: span 2; }
    .hero::before {
        mask-image: radial-gradient(ellipse 120% 60% at 50% 30%, #000 30%, transparent 100%);
        -webkit-mask-image: radial-gradient(ellipse 120% 60% at 50% 30%, #000 30%, transparent 100%);
    }
    .scale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .talks { grid-template-columns: 1fr; }
    .case-compact-grid { grid-template-columns: 1fr; }
    .case-facts { grid-template-columns: 1fr; gap: 18px; }
}

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

    .section { padding: 56px 0; }
    .section-tight { padding: 40px 0; }
    .section-head { margin-bottom: 30px; }

    /* Шапка обязана оставаться в одну строку: имя + CTA + меню */
    .header-inner { min-height: 62px; gap: 8px; }
    .js-nav .header-inner { flex-wrap: nowrap; padding-bottom: 0; }
    .brand { min-width: 0; gap: 9px; flex-shrink: 1; overflow: hidden; }
    .brand > span:last-child { min-width: 0; overflow: hidden; }
    .brand-mark { width: 34px; height: 34px; }
    .brand-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-role { display: none; }
    .header-actions { gap: 6px; flex-shrink: 0; }
    .header-actions .btn { padding: 0 10px; font-size: 12.5px; min-height: 40px; white-space: nowrap; }
    .nav-toggle { width: 40px; height: 40px; flex-shrink: 0; }
    /* На самых узких экранах имя и кнопка перестают помещаться:
       сокращаем подпись кнопки, но оставляем её понятной */
    /* На узких экранах ужимаем не подпись кнопки, а имя: основной CTA
       должен читаться целиком как «Обсудить задачу» */
    @media (max-width: 420px) {
        .brand-last { display: none; }
    }
    /* Ниже 375 px имя не помещается целиком — оставляем аватар со ссылкой,
       у неё есть aria-label «Айрат Шарипов — на главную» */
    @media (max-width: 374px) {
        .brand-name { display: none; }
    }
    .js-nav .nav { position: absolute; left: 0; right: 0; top: 100%; padding: 6px 18px 14px;
        background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
    .site-header { position: sticky; }
    .header-inner { position: relative; }

    .hero-inner { padding: 40px 0 38px; }
    .hero h1 { font-size: clamp(28px, 7.6vw, 34px); letter-spacing: -0.02em; }
    .hero-lead { font-size: 16px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-trust { align-items: flex-start; font-size: 13.5px; }

    .scale-band { padding-bottom: 26px; }
    .scale-item { padding: 16px; }
    .scale-item span { font-size: 13px; }

    .logo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .logo-cell { min-height: 60px; }
    .logo-cell img { max-height: 24px; }

    .symptom { padding: 20px; }
    .bridge { padding: 22px; }

    .shift-row { grid-template-columns: 1fr; }
    .shift-head { display: none; }
    .shift-cell { padding: 14px 18px; }
    .shift-from { padding-bottom: 4px; font-size: 15px; }
    .shift-from::before {
        content: "Было: ";
        font-weight: 700;
        color: rgba(255, 255, 255, 0.4);
    }
    .shift-to { padding-top: 0; padding-bottom: 16px; }
    .shift-to::before { content: "Стало: "; font-weight: 700; color: var(--accent-light); }
    .shift-arrow { display: none; }

    .flow { grid-template-columns: 1fr; }
    .process { grid-template-columns: 1fr; }

    .service { padding: 24px; }
    .service-cols { grid-template-columns: 1fr; gap: 20px; }
    .service-cta .btn { width: 100%; }

    .case { padding: 24px; }
    .case-compact { padding: 22px; }
    .case-brand { font-size: 17px; }

    .contact-card { padding: 20px; }
    .contact-primary { padding: 16px 18px; gap: 13px; }
    .contact-primary-title { font-size: 17px; }
    .contact-primary-sub { font-size: 13px; }
    .contact-value { font-size: 16px; }

    .cta-band { padding: 32px 0; }
    .cta-band .btn { width: 100%; }

    .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* --- Уважение к настройкам движения --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .js-ready .reveal { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* --- Печать --------------------------------------------------------------- */

@media print {
    .site-header, .nav-toggle, .cta-band { display: none !important; }
    body { color: #000; background: #fff; }
    .section-dark { background: #fff; color: #000; }
}
