/* ===================== Токены ===================== */
:root {
    --ink: #0c1c40;
    --ink-2: #4a5670;
    --ink-3: #6b7487;
    --line: rgba(12, 28, 64, 0.1);
    --bg: #f5f7fa;
    --card: #ffffff;
    --soft: #eceff4;
    --accent: #1459c8;
    --accent-dark: #0f47a8;
    --radius-card: 16px;
    --radius-ctl: 10px;
    --shadow: 0 8px 24px rgba(12, 28, 64, 0.06);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (max-width: 900px) {
    html { scroll-behavior: auto; }
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

img { display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* svg-иконки: размер задаётся тегу svg, иначе браузер рисует 300×150 */
svg { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }

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

section[id], article[id], footer[id] { scroll-margin-top: 80px; }

/* ===================== Шапка ===================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 32px;
    height: 72px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
}

.logo svg { width: 22px; height: 22px; color: var(--accent); }

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

.nav a {
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    color: var(--ink-2);
    transition: color 160ms var(--ease);
}

.nav a:hover { color: var(--ink); }

.btn-call {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--radius-ctl);
    background: var(--ink);
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: background 160ms var(--ease);
}

.btn-call:hover { background: #1a3468; }
.btn-call svg { width: 16px; height: 16px; }

/* Бургер — только мобилка */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-ctl);
    color: var(--ink);
    cursor: pointer;
}

.menu-toggle svg { width: 20px; height: 20px; }

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 49;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.mobile-menu a:last-child { border-bottom: none; }

/* ===================== Hero ===================== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(245, 247, 250, 0) 32%,
        rgba(245, 247, 250, 0.55) 48%,
        rgba(245, 247, 250, 0.88) 62%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-left: auto;
    width: min(56%, 840px);
    padding: 128px 48px 80px 0;
}

.main-title {
    font-size: clamp(40px, 4.2vw, 64px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 19px;
    font-weight: 400;
    color: var(--ink-2);
    line-height: 1.5;
    margin-bottom: 28px;
}

.divider {
    width: 64px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 32px;
}

.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.feature-item {
    text-align: center;
    padding: 0 8px;
    position: relative;
}

.feature-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--line);
}

.feature-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    margin: 0 auto 10px;
}

.feature-text {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ink-2);
}

.cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-ctl);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.btn svg {
    width: 16px;
    height: 16px;
    transition: transform 200ms var(--ease);
}

.btn:hover svg { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1a3468; }

.btn-outline {
    background: rgba(255, 255, 255, 0.7);
    border-color: var(--line);
    color: var(--ink);
}

.btn-outline:hover { background: #fff; border-color: rgba(12, 28, 64, 0.3); }

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

/* ===================== Секции ===================== */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 32px 0;
}

.section-head { margin-bottom: 48px; }

.section-kicker {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.section-sub {
    margin-top: 12px;
    color: var(--ink-2);
    font-size: 15px;
    line-height: 1.6;
    max-width: 560px;
}

/* ===================== Шаги ===================== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.step {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 24px;
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.step-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    display: block;
    margin-bottom: 16px;
}

.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* ===================== Вакансии ===================== */
.vac-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: grid;
    grid-template-columns: 380px 1fr;
    transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}

.vac-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(12, 28, 64, 0.12);
}

.vac-card + .vac-card { margin-top: 32px; }

/* Фото слева, на всю высоту карточки */
.vac-figure { position: relative; min-height: 100%; overflow: hidden; }

.vac-figure img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

/* При наведении на карточку фото плавно приближается */
.vac-card:hover .vac-figure img { transform: scale(1.04); }

/* Кадрирование: лица не обрезаются */
#vac-driver .vac-figure img { object-position: 32% 40%; }
#vac-cheese .vac-figure img { object-position: 45% 35%; }

.vac-content { padding: 32px; }

.vac-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.vac-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

.vac-company {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 14px;
    margin-top: 8px;
}

.vac-company svg { width: 14px; height: 14px; color: var(--ink-3); }

.vac-salary {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vac-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.vac-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 12px;
}

.vac-col ul { list-style: none; }

.vac-col li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-2);
}

.vac-col li + li { margin-top: 8px; }

.vac-col li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.vac-foot {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.vac-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
    font-size: 14px;
}

.vac-meta svg { width: 16px; height: 16px; color: var(--ink-3); }

.vac-foot .btn { margin-left: auto; }

/* ===================== Подвал ===================== */
.footer {
    margin-top: 96px;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 32px;
}

.footer-inner {
    max-width: 1136px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 224px;
    align-items: start;
    gap: 32px;
}

.footer-brand { display: grid; gap: 12px; }
.footer .logo { color: #fff; width: fit-content; min-height: 24px; }
.footer .logo svg { color: #7aa7e8; }
.footer-copy { max-width: 320px; font-size: 15px; line-height: 24px; }
.footer-office {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    line-height: 24px;
}
.footer-office-title { font-weight: 500; color: #fff; }
.footer-office-note { color: #b6bfce; font-size: 14px; }
.footer-contacts { display: flex; flex-direction: column; gap: 12px; }

.footer-contacts a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--radius-ctl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    font-variant-numeric: tabular-nums;
    transition: background 160ms var(--ease);
}

.footer-contacts a:hover { background: rgba(255, 255, 255, 0.08); }
.footer-contacts svg { width: 16px; height: 16px; }
.footer :focus-visible { outline-color: #fff; }

/* ===================== Модальное окно ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(12, 28, 64, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 200ms var(--ease), visibility 200ms var(--ease);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: translateY(12px);
    transition: transform 200ms var(--ease);
}

.modal-overlay.open .modal { transform: none; }

.modal h3 { font-size: 22px; font-weight: 600; }

.modal-vac {
    color: var(--accent);
    font-weight: 500;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.modal-sub {
    color: var(--ink-2);
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.modal-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

.modal-actions .btn { width: 100%; }

.btn-tg { background: var(--soft); color: var(--ink); }
.btn-tg:hover { background: #dfe5ee; }

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink-3);
}

.modal-close:hover { background: var(--soft); }
.modal-close svg { width: 18px; height: 18px; }

/* ===================== Появление при прокрутке ===================== */
/* Скрываем блоки только после успешного подключения наблюдателя. */
.reveal-pending { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal-pending { opacity: 1; }
}

/* ===================== Страница 404 ===================== */
.not-found {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.not-found .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}

.not-found::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(245, 247, 250, 0) 32%,
        rgba(245, 247, 250, 0.55) 48%,
        rgba(245, 247, 250, 0.88) 62%);
}

.not-found-content {
    position: relative;
    z-index: 1;
    margin-left: auto;
    width: min(56%, 840px);
    padding: 128px 48px 80px 0;
}

.not-found .section-kicker { margin-bottom: 12px; }

/* ===================== Адаптив ===================== */
@media (max-width: 1100px) {
    .hero-content { width: 62%; }
    .vac-card { grid-template-columns: 300px 1fr; }
    .vac-cols { gap: 24px; }
}

@media (max-width: 900px) {
    .header { padding: 0 24px; height: 64px; gap: 16px; background: #fff; backdrop-filter: none; }
    .nav, .header .btn-call { display: none; }
    .menu-toggle { display: flex; width: 44px; height: 44px; }
    .mobile-menu { top: 64px; max-height: calc(100dvh - 64px); overflow-y: auto; }
    .mobile-menu a { min-height: 48px; font-size: 16px; line-height: 24px; }

    /* Фото остаётся фоном; единая тёмная подложка защищает текст. */
    .hero, .not-found {
        display: flex;
        align-items: center;
        min-height: min(100svh, 800px);
        padding-top: 64px;
    }
    .hero-bg, .not-found .hero-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-position: left center;
    }
    .hero::after, .not-found::after {
        background: linear-gradient(180deg, rgba(8, 18, 35, .68), rgba(8, 18, 35, .82));
    }
    .hero-content, .not-found-content {
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
        padding: 40px 24px;
        color: #fff;
    }
    .main-title { font-size: clamp(28px, 7.7vw, 40px); line-height: 1.15; letter-spacing: -.02em; color: #fff; }
    .subtitle { font-size: 17px; line-height: 1.6; margin-bottom: 24px; color: #f0f2f5; }
    .subtitle br { display: none; }
    .divider { width: 40px; height: 2px; margin-bottom: 24px; background: rgba(255, 255, 255, .6); }
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-bottom: 32px; }
    .feature-item { text-align: left; display: flex; align-items: flex-start; gap: 12px; padding: 0; }
    .feature-item::after { display: none; }
    .feature-item svg { width: 18px; height: 18px; margin: 3px 0 0; color: #e3e8ef; }
    .feature-text { font-size: 15px; line-height: 24px; font-weight: 400; color: #fff; }
    .cta-buttons { gap: 12px; }
    .btn { min-height: 52px; padding: 12px 16px; font-size: 16px; line-height: 24px; gap: 8px; }
    .hero-content .btn-primary { background: #fff; border-color: #fff; color: var(--ink); }
    .hero-content .btn-primary:hover { background: #eceff4; border-color: #eceff4; }
    .hero-content .btn-outline { background: rgba(8, 18, 35, .48); border-color: rgba(255, 255, 255, .6); color: #fff; }
    .hero-content .btn-outline:hover { background: rgba(8, 18, 35, .8); }
    .hero-content :focus-visible { outline-color: #fff; }

    .section { padding: 56px 24px 0; }
    .section-head { margin-bottom: 24px; }
    .section-kicker { font-size: 14px; line-height: 20px; margin-bottom: 8px; }
    .section-title { font-size: 28px; line-height: 1.25; }
    .section-sub, .step p { font-size: 16px; line-height: 1.6; }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .step { padding: 20px; }
    .step h3 { font-size: 18px; line-height: 24px; }

    .vac-card { grid-template-columns: minmax(0, 1fr); }
    .vac-figure { min-height: 0; height: 240px; }
    #vac-driver .vac-figure img { object-position: 30% 32%; }
    #vac-cheese .vac-figure img { object-position: 50% 30%; }
    .vac-content { padding: 24px; min-width: 0; }
    .vac-title { font-size: 22px; line-height: 1.3; }
    .vac-company { align-items: flex-start; line-height: 22px; }
    .vac-company svg { margin-top: 4px; }
    .vac-salary { font-size: 24px; line-height: 32px; }
    .vac-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .vac-col h4 { font-size: 16px; line-height: 24px; color: var(--ink); }
    .vac-col li { font-size: 16px; line-height: 26px; padding-left: 16px; }
    .vac-col li::before { width: 4px; height: 4px; left: 0; top: 11px; background: var(--ink-3); }
    .vac-foot { gap: 16px; margin-top: 24px; }
    .vac-meta { font-size: 15px; line-height: 24px; }
    .vac-foot .btn { margin-left: 0; width: 100%; }

    .footer { margin-top: 56px; padding: 32px 24px; }
    .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .footer-contacts { grid-column: 1 / -1; flex-direction: row; }
    .footer-contacts a { flex: 1; }

    .modal-overlay { padding: 16px; }
    .modal { padding: 64px 24px 24px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; text-align: left; }
    .modal-close { width: 44px; height: 44px; top: 8px; right: 8px; }
    .modal h3 { line-height: 1.3; }
    .modal-vac, .modal-sub { font-size: 16px; line-height: 24px; }
    .modal-actions { margin-top: 24px; }

    /* На сенсорных экранах отключаем движения при наведении. */
    .step, .vac-card, .vac-figure img { transition: none; }
    .step:hover, .vac-card:hover, .vac-card:hover .vac-figure img { transform: none; box-shadow: none; }
    .btn:hover svg { transform: none; }
}

@media (max-width: 560px) {
    .header, .mobile-menu { padding-inline: 20px; }
    .hero-content, .not-found-content { padding: 32px 20px; }
    .features { grid-template-columns: 1fr; gap: 12px; }
    .cta-buttons { flex-direction: column; }
    .cta-buttons .btn { width: 100%; justify-content: space-between; }
    .section { padding-inline: 20px; }
    .steps { grid-template-columns: 1fr; gap: 12px; }
    .step { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; }
    .step-num { grid-row: 1 / 3; margin: 0; line-height: 24px; }
    .step p { grid-column: 2; }
    .vac-figure { height: 200px; }
    .vac-content { padding: 20px; }
    .vac-top { flex-direction: column; gap: 16px; }
    .footer { padding-inline: 20px; }
    .footer-inner { grid-template-columns: minmax(0, 1fr); }
    .footer-contacts { flex-direction: column; width: 100%; }
    .footer-contacts a { justify-content: center; }
}

@media (min-width: 901px) {
    .mobile-menu.open { display: none; }
}
