/* Общий стиль страниц tams-tms.ru: лендинг, истории клиентов, документы, вход, скачивание.
   Своё у страницы — в её <style>. Поведение (шапка, заявка, увеличение скриншотов, финальный блок) — assets/js/site.js. */

:root {
    --ink: #0E2238;
    --ink-2: #3F5268;
    --muted: #6B7C90;
    --blue: #0074D7;
    --blue-d: #005BB0;
    --navy: #00366B;
    --navy-d: #00264D;
    --sky: #75D3F8;
    --paper: #F5F8FB;
    --line: #DCE5EE;
    --green: #12A150;
    --green-d: #0E8541;
    --red: #D93025;
    --r-s: 8px;
    --r-m: 14px;
    --r-l: 22px;
    --shadow-shot: 0 30px 70px -30px rgba(0, 54, 107, 0.45), 0 2px 6px rgba(0, 54, 107, 0.06);
    --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-d); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1 { font-size: 56px; line-height: 1.04; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 38px; line-height: 1.15; font-weight: 700; letter-spacing: -0.018em; }
h3 { font-size: 21px; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; }
.section--paper { background: var(--paper); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 62ch; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head .lede { margin-top: 16px; }

/* Кнопки: действие называет, что произойдёт */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; padding: 0 22px; border-radius: var(--r-s);
    font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-d); color: #fff; }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-d); color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn--ghost-light:hover { border-color: #fff; color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: #E8F4FD; color: var(--navy); }
.btn--s { height: 40px; padding: 0 16px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }

/* Шапка */
.header {
    position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94);
    backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__in { height: 72px; display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.logo:hover { color: var(--navy); }
.logo img { width: auto; height: 26px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header__carrier { font-size: 15px; font-weight: 500; color: var(--green); margin-right: 6px; }
.header__carrier:hover { color: var(--green-d); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: 12px 0 20px; }
.mobile-menu a:not(.btn) { display: block; padding: 10px 0; color: var(--ink); font-weight: 500; }
.mobile-menu .btn { width: 100%; margin-top: 10px; }
.mobile-menu.is-open { display: block; }
/* Короткая шапка страниц для водителей и входа: логотип и пара ссылок, без меню */
.header--slim .header__actions { gap: 22px; }
.header--slim .header__actions a:not(.btn) { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.header--slim .header__actions a:not(.btn):hover { color: var(--blue); }

/* Хлебные крошки и заголовок внутренней страницы */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #A8B6C5; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--blue); }
.page-head { padding-top: 48px; padding-bottom: 64px; }
.page-head h1 { font-size: 50px; max-width: 20ch; }
.page-head .lede { margin-top: 20px; }

/* Скриншот в рамке окна */
.shot {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
    box-shadow: var(--shadow-shot); overflow: hidden;
}
.shot__bar { height: 34px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); background: #FBFCFE; font-size: 13px; color: var(--muted); }
.shot__bar span { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 10px; }
.shot img { width: 100%; height: auto; cursor: zoom-in; }

/* Логотипы клиентов */
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 32px; }
.logos img { display: block; filter: grayscale(1) contrast(1.05); opacity: .6; transition: filter .25s, opacity .25s; }
.logos img:hover, .logos a:hover img { filter: none; opacity: 1; }

/* Списки: отметки и пронумерованные шаги */
.ticks { list-style: none; margin: 24px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin-top: 12px; color: var(--ink); font-size: 16px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--blue); background: #fff; }

.steps { list-style: none; margin: 0; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); counter-reset: s; }
.steps li { position: relative; padding: 0 0 26px 56px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    counter-increment: s; content: counter(s); position: absolute; left: 0; top: -2px;
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--paper); border: 2px solid var(--blue); color: var(--blue); font-weight: 700;
}
.steps li::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps b { display: block; font-weight: 600; }
.steps span { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-2); }

/* Отзывы */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 980px; }
.quote { margin: 0; padding: 28px; border-left: 3px solid var(--blue); background: var(--paper); border-radius: 0 var(--r-m) var(--r-m) 0; display: flex; flex-direction: column; }
.quote blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); }
.quote figcaption { margin-top: auto; padding-top: 20px; font-size: 14px; color: var(--muted); }
.quote figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.quote figcaption a { display: inline-block; margin-top: 8px; font-weight: 600; }
.quotes__more { margin-top: 32px; }

/* Финальный призыв */
.cta { background: var(--navy); color: #fff; padding: 96px 0; position: relative; overflow: hidden; }
.cta h2 { color: #fff; max-width: 18ch; }
.cta .lede { color: #C9DDF2; margin-top: 16px; max-width: 40ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta .wrap { position: relative; z-index: 1; }
/* Фон финального блока — карта: сеть улиц и один маршрут (склад → 3 остановки → точка).
   Маршрут прорисовывается один раз, когда блок появляется на экране; к тексту слева сеть растворяется.
   Разметку карты вставляет site.js в элемент с data-net; классы net-armed / net-on ставит он же. */
.cta__net { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: min(64%, 920px); height: auto;
    aspect-ratio: 760 / 360; pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 64% 74% at 54% 50%, #000 55%, transparent 100%);
            mask-image: radial-gradient(ellipse 64% 74% at 54% 50%, #000 55%, transparent 100%); }
.cta__net .water { fill: none; stroke: #0B467F; stroke-width: 24; stroke-linecap: round; }
.cta__net .r1 { stroke: #2C62A0; stroke-width: 8; }
.cta__net .r2 { stroke: #20558F; stroke-width: 4; }
.cta__net .r3 { stroke: #1A4B83; stroke-width: 2.2; }
.cta__line, .cta__glow { fill: none; stroke: var(--sky); stroke-linecap: round; stroke-linejoin: round; }
.cta__line { stroke-width: 4; }
.cta__glow { stroke-width: 13; opacity: .22; }
.cta__stop g, .cta__pin g { transform-box: fill-box; transform-origin: center; }
.cta__stop circle { fill: var(--navy); stroke: var(--sky); stroke-width: 3; }
.cta__stop text { fill: var(--sky); font: 700 12px 'Onest', system-ui, sans-serif; text-anchor: middle; }
.cta__pin path { fill: var(--sky); }
.cta__pin circle { fill: var(--navy); }
.cta__pin g { transform-origin: 50% 100%; }
.net-armed .cta__line, .net-armed .cta__glow { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.net-armed .cta__stop g, .net-armed .cta__pin g { opacity: 0; }
.net-on .cta__line, .net-on .cta__glow { animation: cta-draw 2.4s cubic-bezier(.65,.05,.35,1) .2s forwards; }
.net-on .cta__stop g { animation: cta-pop .42s cubic-bezier(.34,1.56,.64,1) forwards; }
.net-on .cta__stop.s1 g { animation-delay: 1.15s; }
.net-on .cta__stop.s2 g { animation-delay: 1.4s; }
.net-on .cta__stop.s3 g { animation-delay: 1.6s; }
.net-on .cta__pin g { animation: pin-drop .6s cubic-bezier(.34,1.56,.64,1) 2.55s forwards; }
@keyframes cta-draw { to { stroke-dashoffset: 0; } }
@keyframes cta-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
@keyframes pin-drop { 0% { opacity: 0; transform: translateY(-26px) scale(.6); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }

/* Подвал */
.footer { background: var(--navy-d); color: #A9BFD6; padding: 64px 0 32px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer__logo img { height: 32px; width: auto; }
.footer__about { margin-top: 14px; max-width: 32ch; }
.footer h4 { margin: 0 0 14px; color: #fff; font-size: 15px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-top: 8px; }
.footer a { color: #A9BFD6; }
.footer a:hover { color: #fff; }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__company { display: flex; flex-direction: column; gap: 4px; }
.footer__company span + span { font-size: 13px; opacity: .85; }
/* Короткий подвал страниц для водителей и входа */
.footer--slim { padding: 28px 0; }
.footer--slim .footer__bottom { margin-top: 0; padding-top: 0; border-top: 0; align-items: center; }
.footer--slim .footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Заявка (разметку окна вставляет site.js) */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(14, 34, 56, .55); }
.modal.is-open { display: flex; }
.modal__box { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: var(--r-l); padding: 32px; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink-2); cursor: pointer; font-size: 20px; line-height: 1; }
.modal h3 { font-size: 24px; padding-right: 36px; }
.modal__sub { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.modal .btn { width: 100%; margin-top: 20px; }
.modal__legal { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.modal__done { display: none; text-align: center; padding: 12px 0 4px; }
.modal__done.is-shown { display: block; }
.modal__done p { margin-top: 10px; color: var(--ink-2); }

/* Поля форм */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 11px 14px;
    border: 1px solid var(--line); border-radius: var(--r-s); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(117, 211, 248, .45); }
.field input.is-invalid { border-color: var(--red); }
.field__error { display: none; margin-top: 6px; font-size: 14px; color: var(--red); }
.field__error.is-shown { display: block; }

.lightbox { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 20, 40, .88); cursor: zoom-out; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r-s); }

/* Уведомления страниц входа */
.toasts { position: fixed; top: 16px; right: 16px; left: 16px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast { max-width: 380px; padding: 12px 18px; border-radius: var(--r-s); background: var(--navy); color: #fff; font-size: 15px; line-height: 1.45;
    box-shadow: 0 12px 30px -12px rgba(0, 38, 77, .5); pointer-events: auto; overflow-wrap: anywhere;
    opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.toast.is-shown { opacity: 1; transform: none; }
.toast--error { background: var(--red); }
.toast--success { background: var(--green); }

/* Документ: политика, инструкции. Узкая колонка текста, оглавление сбоку */
.doc { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 64px; align-items: start; padding-bottom: 104px; }
.doc__toc { position: sticky; top: 96px; font-size: 14px; }
.doc__toc b { display: block; margin-bottom: 10px; font-size: 14px; color: var(--ink); }
.doc__toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.doc__toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.4; }
.doc__toc a:hover { color: var(--blue); }
.doc__toc a.is-current { color: var(--blue); border-left-color: var(--blue); }
.doc__body h2 { font-size: 24px; line-height: 1.3; letter-spacing: -0.01em; margin: 48px 0 14px; scroll-margin-top: 96px; }
.doc__body h2:first-child { margin-top: 0; }
.doc__body p { margin: 0 0 14px; color: var(--ink-2); }
.doc__body ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-2); }
.doc__body li { margin: 6px 0; }
.doc__body li::marker { color: var(--blue); }
.doc__body strong { color: var(--ink); font-weight: 600; }
.doc__body ol { margin: 0 0 14px; padding-left: 22px; color: var(--ink-2); }
.doc__body ol li::marker { color: var(--blue); font-weight: 600; }
.doc__body h3 { font-size: 18px; line-height: 1.35; margin: 28px 0 10px; color: var(--ink); }
.doc__meta { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

/* Вход: форма слева, справа — карта с маршрутом (та же, что в финальном блоке лендинга) */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth__main { display: flex; flex-direction: column; padding: 28px 48px; }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth__back { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.auth__back:hover { color: var(--blue); }
.auth__back svg { width: 18px; height: 18px; }
.auth__box { width: 100%; max-width: 400px; margin: auto; padding: 48px 0; }
.auth__box h1 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; }
.auth__sub { margin-top: 10px; color: var(--ink-2); }
.auth__form { margin-top: 28px; }
.auth__form > .field:first-child { margin-top: 0; }
.auth__submit { width: 100%; margin-top: 24px; }
.auth__row { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 15px; }
.auth__help { margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth__more { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.auth__more p { font-size: 15px; color: var(--ink-2); }
.auth__links { display: grid; gap: 10px; margin-top: 12px; }
.auth__links .btn { width: 100%; justify-content: flex-start; }
.auth__links .btn svg { width: 20px; height: 20px; flex: none; }
.btn--carrier { background: #fff; color: var(--green-d); border-color: #BFE3CE; }
.btn--carrier:hover { border-color: var(--green); color: var(--green-d); }
.auth__side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
    padding: 48px; background: var(--navy); color: #fff; }
.auth__side .cta__net { width: 125%; right: -7%; top: 40%; }
.auth__side > p { position: relative; z-index: 1; max-width: 26ch; font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.auth__side > small { position: relative; z-index: 1; display: block; margin-top: 14px; max-width: 40ch; font-size: 16px; color: #C9DDF2; }

@media (max-width: 1080px) {
    .nav { display: none; }
    .header__carrier { display: none; }
    .doc { grid-template-columns: 1fr; gap: 0; }
    .doc__toc { display: none; }
}
@media (max-width: 900px) {
    body { font-size: 16px; }
    h1 { font-size: 38px; }
    h2 { font-size: 28px; }
    .section { padding: 72px 0; }
    .lede { font-size: 17px; }
    .header__actions .btn--outline, .header__actions .btn--primary { display: none; }
    .header--slim .header__actions .btn--outline, .header--slim .header__actions .btn--primary { display: inline-flex; }
    .menu-btn { display: inline-flex; }
    .page-head { padding-top: 32px; padding-bottom: 48px; }
    .page-head h1 { font-size: 38px; }
    .logos { justify-content: flex-start; gap: 18px 28px; }
    .quotes { grid-template-columns: 1fr; }
    .cta { padding: 72px 0; }
    .cta__net { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
    .doc { padding-bottom: 72px; }
    .auth { grid-template-columns: 1fr; }
    .auth__side { display: none; }
    .auth__main { padding: 20px 24px; }
}
@media (max-width: 520px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    h1, .page-head h1 { font-size: 34px; }
    .cta__actions .btn { width: 100%; }
    .modal__box { padding: 24px 20px; }
    .auth__main { padding: 16px; }
    .auth__box { padding: 32px 0; }
    .auth__box h1 { font-size: 30px; }
    .header--slim .header__actions { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .toast { transition: none; }
}
