/* ==========================================================================
   VX e-solution — публичная часть. Светлый (белый) дизайн по умолчанию,
   тёмная тема — только по кнопке. Акцентный цвет можно сменить в визуальном редакторе.
   ========================================================================== */

:root {
    --accent: #00c853;
    --accent-hover: color-mix(in srgb, var(--accent) 86%, #000);
    --accent-soft: color-mix(in srgb, var(--accent) 9%, transparent);
    --accent-ink: color-mix(in srgb, var(--accent) 62%, #000);
    --bg: #ffffff;
    --bg-alt: #f7f8f7;
    --surface: #ffffff;
    --text: #0b120e;
    --text-muted: #5f6b65;
    --border: #eaedeb;
    --shadow: 0 1px 2px rgba(11, 18, 14, .04), 0 4px 16px rgba(11, 18, 14, .04);
    --shadow-hover: 0 2px 6px rgba(11, 18, 14, .05), 0 20px 48px rgba(11, 18, 14, .09);
    --radius: 20px;
    --radius-sm: 12px;
    --header-h: 78px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --accent-ink: color-mix(in srgb, var(--accent) 70%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --bg: #0b100d;
    --bg-alt: #111a15;
    --surface: #141c17;
    --text: #e9f0ec;
    --text-muted: #94a39a;
    --border: #222d27;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-hover: 0 20px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    font-family: var(--font-body, 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
    font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading, inherit); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.03em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
p:empty, .lead:empty, h1:empty, h2:empty { display: none; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }
.narrow { max-width: 840px; }
.muted { color: var(--text-muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-muted); max-width: 620px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .9rem 1.6rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .98rem;
    border: 1.5px solid transparent; cursor: pointer; transition: .2s; white-space: nowrap;
}
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: var(--accent); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text); }
.btn-light { background: #fff; color: #0b120e; }
.btn-light:hover { transform: translateY(-2px); }
.btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; }
.logo { display: inline-flex; align-items: center; color: var(--text); flex-shrink: 0; }
.logo-svg { height: 54px; width: auto; display: block; overflow: visible; }
.logo-img { height: 54px; width: auto; }
.site-header .logo-svg, .site-header .logo-img { height: var(--logo-h, 54px); }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
    display: flex; align-items: center; gap: 10px; padding: .55rem 1rem; border-radius: 999px;
    font-weight: 500; font-size: .95rem; color: var(--text-muted); transition: .15s;
}
.main-nav a:hover { color: var(--text); background: var(--bg-alt); }
.main-nav a.active { color: var(--text); background: var(--bg-alt); }
.has-sub { position: relative; }
.has-sub > a::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translateY(-2px); opacity: .5; }
.sub-menu {
    position: absolute; top: calc(100% + 8px); left: -8px; min-width: 270px; padding: 8px; margin: 0; list-style: none;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-hover);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.sub-menu::before { content: ''; position: absolute; inset: -12px 0 auto; height: 12px; }
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { border-radius: 10px; color: var(--text); }
.sub-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); }
.header-actions { --control-h: 42px; display: flex; align-items: center; gap: 10px; }
/* Языки, тема и кнопка «Связаться» — одной высоты */
.header-actions .btn-sm { height: var(--control-h); padding-block: 0; box-sizing: border-box; }
.header-actions .lang-switch { height: var(--control-h); box-sizing: border-box; align-items: stretch; }
.header-actions .lang-switch a { display: flex; align-items: center; justify-content: center; padding-block: 0; }
.social-links { display: flex; align-items: center; gap: 2px; }
.social-links a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--text-muted); transition: .15s; }
.social-links a:hover { color: var(--accent-ink); background: var(--bg-alt); }
.nav-social { display: none; }
.theme-toggle, .nav-toggle {
    display: grid; place-items: center; width: var(--control-h, 42px); height: var(--control-h, 42px); border-radius: 50%; box-sizing: border-box;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: .15s;
}
.theme-toggle:hover { border-color: var(--text); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
.nav-toggle { display: none; gap: 4px; align-content: center; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: .2s; }

/* До 1100px (планшеты, iPad) — меню-«гамбургер»: полное меню с языками и кнопкой там не помещается */
@media (max-width: 1100px) {
    :root { --header-h: 68px; }
    .logo-svg, .logo-img { height: 38px; }
    .site-header .logo-svg, .site-header .logo-img { height: var(--logo-h, 38px); }
    .hide-mobile { display: none; }
    .nav-toggle { display: grid; }
    .main-nav .nav-social { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
    .main-nav .nav-social a { width: 42px; height: 42px; padding: 0; border: 1px solid var(--border); }
    .header-actions { margin-left: auto; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; padding: 16px;
        background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-hover);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s;
    }
    .main-nav.open { transform: none; opacity: 1; visibility: visible; }
    .main-nav > ul { flex-direction: column; }
    .main-nav a { padding: .8rem 1rem; font-size: 1.05rem; border-radius: 12px; }
    .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 8px; background: none; min-width: 0; }
    .has-sub > a::after { display: none; }
    .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

.admin-bar { background: #1d2327; font-size: .85rem; position: relative; z-index: 51; }
.admin-bar .container { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.admin-bar a { color: #c3c4c7; }
.admin-bar a:hover { color: var(--accent); }

/* ---------- Уведомления ---------- */
.notice { margin: 16px 0; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 500; border: 1px solid; }
.notice-success { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.notice-error { background: rgba(229, 57, 53, .07); border-color: #e53935; color: #c62828; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 70% 70% at 75% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 75% 40%, #000 20%, transparent 75%);
}
.hero-slashes {
    position: absolute; right: -6%; top: 50%; width: min(58vw, 720px); transform: translateY(-50%);
    fill: var(--accent); opacity: .07; pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.hero h1 { white-space: pre-line; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 12px 32px; list-style: none; padding: 0; margin: 2.6rem 0 0; color: var(--text-muted); font-size: .92rem; }
.hero-facts strong { color: var(--text); font-weight: 700; margin-right: 4px; }
.hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-tile {
    position: relative; display: flex; flex-direction: column; gap: 18px; padding: 24px; min-height: 168px; justify-content: space-between;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
}
.hero-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.hero-tile:nth-child(even) { margin-top: 32px; margin-bottom: -32px; }
.hero-tile-1 { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 20px 40px color-mix(in srgb, var(--accent) 28%, transparent); }
.hero-tile-1 .icon-badge { background: rgba(255, 255, 255, .2); color: #fff; }
.tile-arrow { position: absolute; top: 22px; right: 22px; opacity: .35; transition: .2s; }
.hero-tile:hover .tile-arrow { opacity: 1; transform: translateX(3px); }
@media (max-width: 480px) { .hero-tile { padding: 18px; min-height: 130px; } .hero-tile strong { font-size: .92rem; } }

.icon-badge {
    display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
    background: var(--accent-soft); color: var(--accent-ink); flex-shrink: 0;
}
.icon-badge-lg { width: 68px; height: 68px; border-radius: 20px; margin: 1rem 0 1.25rem; }

/* ---------- Секции ---------- */
.section { padding: clamp(48px, 6.5vw, 84px) 0; }
.section-tight { padding-top: 32px; }
.section-alt, .section-wrap.is-alt > .section { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { margin: 0; font-size: 1.08rem; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; max-width: none; flex-wrap: wrap; }
.section-head-row > div { max-width: 680px; }

.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
    display: block; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }

.service-card { padding: 30px 28px; display: flex; flex-direction: column; gap: 4px; }
.service-card .icon-badge { margin-bottom: 22px; transition: .25s; }
.service-card:hover .icon-badge { background: var(--accent); color: #fff; }
.service-card p { flex: 1; font-size: .96rem; }
.link-arrow { display: inline-flex; gap: 6px; color: var(--text); font-weight: 600; font-size: .92rem; margin-top: 8px; }
.link-arrow span { color: var(--accent); transition: transform .2s; }
a.card:hover .link-arrow span { transform: translateX(4px); }

.why-item { padding: 28px 0 0; border-top: 2px solid var(--border); position: relative; }
.why-item::before { content: ''; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); }
.why-num { display: block; font-size: .85rem; font-weight: 700; color: var(--accent-ink); margin-bottom: 14px; letter-spacing: .06em; }
.why-item p { font-size: .96rem; }

/* ---------- Работы ---------- */
.work-card { overflow: hidden; display: flex; flex-direction: column; }
.work-thumb { aspect-ratio: 16 / 10; background: var(--bg-alt); overflow: hidden; margin: 8px 8px 0; border-radius: 14px; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.work-card:hover .work-thumb img { transform: scale(1.05); }
.work-thumb-placeholder {
    display: grid; place-items: center; width: 100%; height: 100%; color: var(--accent);
    background: radial-gradient(circle at 70% 30%, var(--accent-soft), transparent 60%), var(--bg-alt);
}
.work-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.work-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.work-body p { margin: 0 0 12px; font-size: .95rem; flex: 1; }
.tag { display: inline-block; padding: .22rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .76rem; font-weight: 600; }
.tag-draft { background: #fff3cd; color: #8a6d00; }
.work-meta span:not(.tag) + .work-year::before { content: "·"; margin-right: 10px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--border); font-size: .9rem; font-weight: 500; color: var(--text-muted); background: var(--surface); transition: .15s; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.empty { padding: 48px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: var(--radius); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 44px; }
.pagination a { display: grid; place-items: center; min-width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); font-weight: 600; }
.pagination a.active, .pagination a:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Отдельные страницы ---------- */
.page-hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 32px; overflow: hidden; }
.page-hero .lead { margin-bottom: 0; }
.page-404 { min-height: 50vh; }
.back-link { display: table; color: var(--text-muted); font-size: .9rem; font-weight: 500; margin-bottom: 1.4rem; }
.back-link:hover { color: var(--text); }
/* Страница услуги: иконка — плитка фирменного цвета слева от заголовка, по его центру */
.service-title { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); margin-bottom: 1.1rem; }
.service-title h1 { margin: 0; }
.service-title-icon { flex: none; width: clamp(56px, 7vw, 84px); height: clamp(56px, 7vw, 84px); border-radius: clamp(16px, 2vw, 24px);
    background: var(--accent); color: #fff; box-shadow: 0 12px 28px -12px var(--accent); }
.service-title-icon svg, .service-title-icon .icon-mask, .service-title-icon img { width: 46%; height: 46%; }
.work-facts { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }
.work-facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.work-facts dd { margin: 2px 0 0; font-weight: 600; }
.work-facts a { color: var(--accent-ink); }
.featured-image { width: 100%; border-radius: var(--radius); margin: 24px 0 8px; }

.content { font-size: 1.06rem; padding: 24px 0 8px; }
.content h2 { font-size: 1.65rem; margin-top: 2.2rem; }
.content h3 { margin-top: 1.6rem; }
.content a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.content ul, .content ol { padding-left: 0; list-style: none; }
.content ul li { position: relative; padding-left: 30px; margin-bottom: .6em; }
.content ul li::before {
    content: ''; position: absolute; left: 2px; top: .5em; width: 13px; height: 7px;
    border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.content ol { counter-reset: ol; }
.content ol li { counter-increment: ol; padding-left: 32px; position: relative; margin-bottom: .6em; }
.content ol li::before { content: counter(ol) '.'; position: absolute; left: 0; color: var(--accent-ink); font-weight: 700; }
.content img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.content blockquote { margin: 1.5rem 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text-muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 24px 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: var(--radius-sm); }

/* ---------- Команда ---------- */
/* Первый ряд — 2 карточки, дальше по 3; неполный ряд выравнивается по центру */
.team-grid { --gap: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); max-width: 1120px; margin: 0 auto; }
.team-grid > * { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); min-width: 0; }
.team-grid > :nth-child(-n+2) { flex-basis: calc((100% - var(--gap)) / 2); max-width: 520px; }
@media (max-width: 1000px) { .team-grid > *, .team-grid > :nth-child(-n+2) { flex-basis: calc((100% - var(--gap)) / 2); max-width: none; } }
@media (max-width: 640px) { .team-grid > *, .team-grid > :nth-child(-n+2) { flex-basis: 100%; } }
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
/* Карточка: фото без фона выступает над карточкой, низ фото — по нижнему краю карточки */
.team-grid { --rise: 56px; --photo-h: 262px; row-gap: calc(var(--gap) + var(--rise)); padding-top: var(--rise); }
.team-card { display: grid; grid-template-columns: 42% 1fr; gap: 0 22px; align-items: end; padding: 0 26px 0 0; overflow: visible;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%); }
.team-photo { align-self: stretch; display: flex; align-items: flex-end; justify-content: center; margin-top: calc(-1 * var(--rise));
    clip-path: inset(-200px 0 0 0 round 0 0 0 var(--radius)); }
/* Все фото одной высоты, какого бы размера ни был загруженный файл; низ — по краю карточки */
.team-photo img { display: block; width: 100%; height: var(--photo-h); object-fit: contain; object-position: center bottom; }
.team-card.has-photo { min-height: calc(var(--photo-h) - var(--rise)); }
@media (max-width: 640px) { .team-grid { --photo-h: 230px; } }
.team-card:not(.has-photo) .team-photo { margin-top: 0; align-items: center; padding: 26px 0 26px 26px; }
.team-info { align-self: center; padding: 26px 0; min-width: 0; }
.team-card h3 { margin: 0; font-size: 1.3rem; line-height: 1.2; }
.team-card p { margin: 8px 0 0; font-size: .93rem; }
.member-contacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.member-contacts a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
    color: var(--text-muted); background: var(--surface); transition: .15s; }
.member-contacts a:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.role { display: inline-block; color: var(--accent-ink); font-weight: 600; font-size: .88rem; }
.avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-initials {
    display: grid; place-items: center; font-weight: 700; font-size: 1.6rem; letter-spacing: -.02em; color: var(--accent-ink);
    background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ---------- EU ---------- */
.info-card {
    display: flex; gap: 36px; align-items: center; flex-wrap: wrap;
    padding: clamp(28px, 4vw, 48px); border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
}
.info-media svg { border-radius: 8px; box-shadow: var(--shadow); }
.info-media.has-image { flex: 0 0 auto; }
.info-media img { display: block; width: auto; height: auto; max-width: 280px; max-height: 140px; object-fit: contain; border-radius: 8px; }
@media (max-width: 480px) { .info-media img { max-width: calc(100vw - 96px); } }
.info-copy { flex: 1; min-width: 240px; }
.info-copy .eyebrow { margin-bottom: .3rem; }
.info-amount { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin: 0 0 .3em; }
.info-copy .info-text { margin: 0; color: var(--text-muted); max-width: 640px; }
.info-blocks { display: grid; gap: 24px; }
.info-media-empty { display: grid; place-items: center; width: 140px; height: 96px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-muted); font-size: .85rem; cursor: pointer; }

/* ---------- Контакты ---------- */
.contact-grid { display: grid; gap: 48px; }
.contact-head { grid-column: 1 / -1; }
.contact-head p { margin-bottom: 0; }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }
.contact-list { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 0; }
.contact-list li { display: grid; gap: 2px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.contact-list span:first-child { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.contact-list a { font-weight: 600; font-size: 1.12rem; }
.contact-list a:hover { color: var(--accent-ink); }
.contact-form { padding: clamp(22px, 3vw, 36px); display: grid; gap: 16px; box-shadow: var(--shadow); }
.contact-form .notice { margin: 0; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: .85rem 1rem; font: inherit; color: var(--text); background: var(--bg-alt);
    border: 1px solid transparent; border-radius: var(--radius-sm); transition: .15s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.contact-form button { justify-self: start; align-self: flex-start; }
.hp { position: absolute; left: -9999px; }

/* ---------- CTA ---------- */
.cta-box {
    position: relative; overflow: hidden; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center;
    padding: clamp(32px, 5vw, 64px); border-radius: var(--radius); background: #0b120e; color: #fff;
}
.cta-box > div { position: relative; }
.cta-slashes { position: absolute; right: -40px; top: -30px; height: 160%; fill: var(--accent); opacity: .9; pointer-events: none; }
.cta-box h2 { margin-bottom: .3em; }
.cta-box p { margin: 0; color: rgba(255, 255, 255, .72); max-width: 520px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 700px) { .cta-slashes { opacity: .18; } }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--accent-ink); }
.footer-brand .logo-svg { height: 64px; }
.footer-brand p { margin-top: 1rem; max-width: 260px; }
.footer-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.footer-badge { display: inline-grid; place-items: center; flex: none; }
.footer-badge img { width: 76px; height: 76px; object-fit: contain; transition: transform .2s; }
a.footer-badge:hover img { transform: scale(1.05); }
span.footer-badge.edit-empty { width: 76px; height: 76px; border: 1px dashed var(--border); border-radius: 50%; font-size: .78rem; color: var(--text-muted); cursor: pointer; }
.footer-bottom {
    display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
    margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .86rem;
}
.footer-bottom a:hover { color: var(--accent-ink); }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Переключатель языка ---------- */
.lang-switch { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch a {
    min-width: 34px; padding: 5px 8px; border-radius: 999px; text-align: center;
    font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--text-muted); transition: .15s;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { background: var(--text); color: var(--bg); }
@media (max-width: 400px) { .lang-switch a { min-width: 28px; padding: 5px 5px; } }

/* Свои иконки (загруженные в админке) */
.icon-mask { display: inline-block; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; flex-shrink: 0; }
.icon-img { display: inline-block; object-fit: contain; flex-shrink: 0; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 32px 56px; }
@media (min-width: 1000px) { .faq-grid { grid-template-columns: 1fr 1.8fr; align-items: start; } .faq-grid .section-head { position: sticky; top: calc(var(--header-h) + 24px); } }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.faq-item summary {
    display: flex; gap: 16px; justify-content: space-between; align-items: center; cursor: pointer; list-style: none;
    padding: 18px 20px; font-weight: 600; font-size: 1.02rem; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent-soft) center / 12px no-repeat;
    background-image: linear-gradient(var(--accent-ink), var(--accent-ink)), linear-gradient(var(--accent-ink), var(--accent-ink));
    background-size: 12px 2px, 2px 12px; transition: transform .25s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent-ink); }
.faq-answer { padding: 0 20px 18px; color: var(--text-muted); }
.faq-answer p { margin: 0; }

/* ---------- Контакты: адреса и карты ---------- */
.locations { display: grid; gap: 16px; }
.location { padding: 20px 22px; }
.location h3 { margin-bottom: 4px; }
.location .contact-list { margin-top: .4rem; }
.location .contact-list li:last-child { border-bottom: 0; }
.map-embed { margin-top: 12px; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-alt); border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
:root[data-theme="dark"] .map-embed iframe { filter: invert(.9) hue-rotate(180deg); }
.map-link { display: inline-block; margin-top: 8px; font-size: .9rem; font-weight: 600; color: var(--accent-ink); }
/* Первый адрес и форма — в одном ряду и одной высоты; остальные адреса ниже */
@media (min-width: 940px) {
    .contact-grid { row-gap: 16px; }
    .contact-grid .locations { display: contents; }
    .contact-head { margin-bottom: 16px; }
    .contact-grid .location:first-child { grid-column: 1; grid-row: 2; }
    .contact-form { grid-column: 2; grid-row: 2; }
    .locations-more, .contact-grid > .vx-repeater-add { grid-column: 1; }
}
.locations-more { display: grid; gap: 16px; }
.contact-form { display: flex; flex-direction: column; }
.contact-form label:has(textarea) { flex: 1; grid-template-rows: auto 1fr; }
.contact-form textarea { min-height: 140px; resize: vertical; }
/* Пустые поля видны только в режиме редактирования (чтобы их можно было заполнить) */
.edit-empty { display: none !important; }
.vx-editing .edit-empty { display: grid !important; }

/* ---------- Цифры компании (полоса под первым экраном) ---------- */
.stats-band { position: relative; z-index: 2; margin-top: clamp(-72px, -6vw, -40px); padding: 0 0 clamp(28px, 4vw, 48px); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.stat-item { display: grid; gap: 4px; padding: clamp(18px, 2.6vw, 30px) clamp(18px, 2.6vw, 32px); border-left: 1px solid var(--border); }
.stat-item:first-child { border-left: 0; }
.stat-value { font-family: var(--font-heading, inherit); font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: .95rem; }
/* Когда плитки услуг стоят под текстом (узкий экран), полоса не наезжает на них */
@media (max-width: 999px) { .stats-band { margin-top: 0; padding-top: 0; } }
@media (max-width: 560px) { .stat-item { border-left: 0; border-top: 1px solid var(--border); } .stat-item:first-child { border-top: 0; } }

/* ---------- Kuidas me töötame ---------- */
.process-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; position: relative; }
.process-step { position: relative; padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .25s, box-shadow .25s, border-color .25s; }
.process-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.process-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 16px; box-shadow: 0 8px 18px -8px var(--accent); }
.process-step h3 { font-size: 1.15rem; margin-bottom: .4em; }
.process-step p { margin: 0; font-size: .95rem; }
/* Линия-стрелка между шагами на широком экране */
@media (min-width: 980px) {
    .process-step:not(:last-child)::after { content: ''; position: absolute; top: 47px; right: -21px; width: 22px; height: 2px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
}
.process-cta { margin: 32px 0 0; }

/* ---------- Тёмный акцентный блок («Почему мы») ---------- */
.section-dark {
    --bg: #0c1410; --bg-alt: #111b16; --surface: #142019; --text: #eef4f0; --text-muted: #9fb0a6; --border: #22332a;
    --accent-ink: color-mix(in srgb, var(--accent) 75%, #fff);
    background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), var(--bg);
    color: var(--text); position: relative; overflow: hidden;
}
.section-dark h2, .section-dark h3 { color: var(--text); }
.section-dark::before { content: ''; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 10%, transparent); filter: blur(60px); pointer-events: none; }
.section-dark .container { position: relative; }
.section-dark .why-item { border-top-color: var(--border); }

/* ---------- Анимации ---------- */
.card, .service-card, .work-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.work-card:hover, .team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.work-card .link-arrow span { display: inline-block; transition: transform .2s; }
.work-card:hover .link-arrow span { transform: translateX(4px); }
.reveal { transition-delay: var(--reveal-delay, 0s); }
@media (prefers-reduced-motion: reduce) { .card, .work-card, .process-step { transition: none; } .work-card:hover, .team-card:hover, .process-step:hover { transform: none; } }

/* ---------- Просмотр фото на весь экран ---------- */
.gallery a, img.featured-image[data-lightbox] { cursor: zoom-in; }
.gallery a img { transition: transform .3s, filter .3s; }
.gallery a:hover img { transform: scale(1.03); filter: brightness(1.05); }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(6, 10, 8, .94); opacity: 0; transition: opacity .2s; }
.lightbox.is-open { opacity: 1; }
/* Закрытый просмотр не должен оставаться прозрачным слоем поверх страницы и ловить клики */
.lightbox[hidden] { display: none; }
.lightbox:not(.is-open) { pointer-events: none; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 86vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); user-select: none; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; cursor: pointer; transition: background .15s; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox .lb-close { top: 18px; right: 18px; font-size: 22px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: .9rem; }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 14px; transform: none; } .lightbox img { max-height: 76vh; } }

/* ---------- Тёмная тема: доводка ---------- */
/* Тёмный акцентный блок отличается от тёмной страницы: зеленее и с границами */
:root[data-theme="dark"] .section-dark { --bg: #0e1d15; border-block: 1px solid #1f3328; }
/* Логотипы с тёмным текстом (ЕС, фонды) — на светлой подложке, иначе подписи не читаются */
:root[data-theme="dark"] .info-media img { background: #fff; padding: 10px 12px; border-radius: 10px; }
/* Полоса цифр и шаги — чуть светлее фона */
:root[data-theme="dark"] .stats-grid, :root[data-theme="dark"] .process-step { background: #131c17; }
.vx-editing ul.hero-facts.editor-only { display: flex; }

/* Пункты меню не переносятся на две строки */
.main-nav a { white-space: nowrap; }

/* Список работ в две колонки: если работ нечётное число, последняя — во всю ширину (без пустого места) */
@media (min-width: 640px) and (max-width: 1039px) {
    .grid-3 > .work-card:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
    .grid-3 > .work-card:last-child:nth-child(odd) .work-thumb { flex: 0 0 50%; aspect-ratio: auto; min-height: 240px; margin: 8px 0 8px 8px; }
    .grid-3 > .work-card:last-child:nth-child(odd) .work-body { align-self: center; }
}

/* Фото команды: одинаковая высота на любой ширине — высота зависит от ширины карточки, а не от пропорций файла */
.team-card { container-type: inline-size; }
.team-photo img { height: min(var(--photo-h), 50cqi); }

