/* =====================================================================
   «Свободный график» — фирменный стиль
   Цвета приходят из /config через CSS-переменные в <head> (--accent и т.д.),
   здесь — вся типографика, компоненты и адаптив.
   ===================================================================== */

/* ---- Шрифты ---------------------------------------------------------- */
:root {
    --f-display: 'Unbounded', system-ui, sans-serif;
    --f-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --maxw: 1160px;
    --pad: 24px;
    --radius: 16px;
    --radius-pill: 999px;

    --line: #e4e4de;
    --shadow: 0 10px 40px rgba(14, 14, 14, .06);
}

/* ---- Сброс ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -.01em; }

/* ---- Раскладка ------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }

/* ---- Типографика ----------------------------------------------------- */
.h1 { font-size: clamp(2.1rem, 5.4vw, 3.7rem); }
.h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); text-transform: uppercase; }
.eyebrow { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #3a3a35; max-width: 46ch; }
.muted { color: var(--muted); }

/* Подпись-маркер (хайлайтер) — фирменный приём */
.mark {
    background: var(--accent);
    padding: 0 .16em;
    border-radius: 3px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* ---- Кнопки ---------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font-family: var(--f-display); font-weight: 700; font-size: 1rem;
    padding: 16px 30px; border-radius: var(--radius-pill); border: 2px solid transparent;
    cursor: pointer; transition: transform .12s ease, background .18s ease, color .18s ease;
    text-align: center;
}
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--block { width: 100%; }

/* Чёрный бейдж-пилюля («АРЕНДА ЗА 0 ₽») */
.badge {
    display: inline-flex; align-items: center; gap: .4em;
    background: var(--ink); color: #fff; font-family: var(--f-display); font-weight: 700;
    text-transform: uppercase; font-size: .82rem; letter-spacing: .01em;
    padding: 8px 16px; border-radius: var(--radius-pill);
}
.badge--lime { background: var(--accent); color: var(--ink); }

/* ---- Шапка ----------------------------------------------------------- */
.hdr {
    position: sticky; top: 0; z-index: 50;
    background: var(--ink); color: #fff;
}
.hdr__in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: 1.05rem; color: #fff; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #d9d9d3; font-weight: 500; font-size: .98rem; transition: color .15s; }
.nav a:hover { color: #fff; }
.nav .btn { padding: 10px 20px; font-size: .92rem; }
.nav .btn--primary, .nav .btn--primary:hover { color: var(--ink); }

/* ---- Герой ----------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 64px; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 30px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__note { font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: var(--ink); }

/* ---- Панель дохода в герое ------------------------------------------ */
.income {
    background: var(--ink); color: #fff; border-radius: var(--radius);
    padding: 30px 32px; box-shadow: var(--shadow);
}
.income__label { font-size: .9rem; color: #b9b9b1; text-transform: uppercase; letter-spacing: .05em; }
.income__value { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--accent); line-height: 1.1; margin: 6px 0 2px; }
.income__sub { font-size: .95rem; color: #d9d9d3; }

/* ---- Доход по типам курьера ------------------------------------------ */
.salary-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.salary-card {
    background: var(--ink); color: #fff; border-radius: var(--radius);
    padding: 24px 16px; text-align: center;
}
.salary-card__type { font-family: var(--f-display); font-weight: 600; font-size: .95rem; color: #b9b9b1; text-transform: uppercase; letter-spacing: .04em; }
.salary-card__value {
    font-family: var(--f-display); font-weight: 800; font-size: clamp(1.05rem, 2.3vw, 1.7rem);
    color: var(--accent); margin: 10px 0 2px; white-space: nowrap;
}
.salary-card__sub { font-size: .85rem; color: #d9d9d3; }
@media (max-width: 780px) {
    .salary-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Полоса цифр ----------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat__value { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.stat__label { font-family: var(--f-display); color: var(--ink); font-size: 1.05rem; margin-top: 4px; }

/* ---- Типы курьеров --------------------------------------------------- */
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.type {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 22px; transition: transform .15s ease, box-shadow .15s ease;
}
.type:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.type__icon { width: 46px; height: 46px; color: var(--ink); margin-bottom: 14px; object-fit: contain; }
.type h3 { font-size: 1.2rem; margin-bottom: 12px; }
.type ul { margin: 0; padding: 0; list-style: none; }
.type li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: .96rem; color: #45453f; }
.type li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--accent); border-radius: 3px; }

/* ---- Преимущества ---------------------------------------------------- */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.benefit { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.benefit h3 { font-size: 1.15rem; margin-bottom: 8px; }
.benefit p { margin: 0; color: #45453f; font-size: .98rem; }

/* ---- Форма ----------------------------------------------------------- */
.form-band { background: var(--ink); color: #fff; }
.form-band .h2 { color: #fff; }
.form-card {
    background: var(--surface); color: var(--ink); border-radius: var(--radius);
    padding: 34px; max-width: 620px; box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field input, .field select {
    width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
    font: inherit; font-size: 1rem; background: #fff; color: var(--ink); transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); }
.field-error { display: none; color: #c0392b; font-size: .82rem; margin-top: 6px; }
.field.has-error input { border-color: #c0392b; }
.field.has-error .field-error { display: block; }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
    border: 1.5px solid var(--line); border-radius: var(--radius-pill); cursor: pointer; font-size: .96rem;
}
.choice input {
    width: auto; flex-shrink: 0; padding: 0; border: 0; border-radius: 0; background: none;
    accent-color: var(--ink);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 12px; font-size: .96rem; min-height: 1.2em; }
.form-status.ok { color: #1c7a1c; }
.form-status.err { color: #c0392b; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 12px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--muted); line-height: 1.45; cursor: pointer; }
.consent input {
    width: auto; flex-shrink: 0; padding: 0; border: 0; border-radius: 0; background: none;
    margin-top: 3px; accent-color: var(--ink);
}
.consent a { text-decoration: underline; color: var(--ink); }

/* ---- FAQ ------------------------------------------------------------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary {
    list-style: none; cursor: pointer; padding: 18px 44px 18px 0; position: relative;
    font-family: var(--f-display); font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: #45453f; }

/* ---- Ссылки на другие города ------------------------------------------ */
.city-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    max-width: 900px; margin: 0 auto;
}
.city-links a {
    display: inline-flex; align-items: center;
    padding: 10px 20px; border-radius: var(--radius-pill);
    border: 1.5px solid var(--line); color: var(--ink);
    font-family: var(--f-display); font-weight: 600; font-size: .92rem;
    transition: background .15s ease, border-color .15s ease;
}
.city-links a:hover { background: var(--accent); border-color: var(--accent); }

/* ---- Хлебные крошки -------------------------------------------------- */
.crumbs { font-size: .9rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a:hover { color: var(--ink); }

/* ---- Подвал ---------------------------------------------------------- */
.ftr { background: var(--ink); color: #cfcfc9; padding: 48px 0 40px; margin-top: 40px; }
.ftr__grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.ftr a:hover { color: #fff; }
.ftr__legal { font-size: .86rem; color: #8e8e88; margin-top: 20px; max-width: 62ch; }

/* ---- Разделы: заголовок --------------------------------------------- */
.head { margin-bottom: 34px; }
.head .h2 { margin-top: 8px; }

/* ---- Адаптив --------------------------------------------------------- */
@media (max-width: 960px) {
    .hero__grid { grid-template-columns: 1fr; }
    .income { max-width: 440px; }
    .types { grid-template-columns: repeat(2, 1fr); }
    .benefits { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .section { padding: 52px 0; }
    .types { grid-template-columns: 1fr; }
    .salary-grid { grid-template-columns: 1fr; }
    .benefits { grid-template-columns: 1fr; }
    .form-card { padding: 24px; }
    .ftr__grid { flex-direction: column; }
}

/* ---- Доступность ----------------------------------------------------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Доработки: бегущая строка, фото в герое, мобильное меню
   ===================================================================== */

/* ---- Фото / иллюстрация курьера в первом экране --------------------- */
.hero__media { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero__slides {
    position: relative; width: 100%; aspect-ratio: 520 / 420;
    border-radius: var(--radius); overflow: hidden; background: var(--surface);
    border: 2mm solid var(--accent);
}
.hero__slide {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: translateX(28px);
    transition: opacity .6s ease, transform .6s ease;
}
.hero__slide.is-active { opacity: 1; transform: translateX(0); z-index: 1; }
.income--badge {
    padding: 16px 20px; box-shadow: var(--shadow);
}
.income--badge .income__value { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 2px 0; }
.income--badge .income__label,
.income--badge .income__sub { font-size: .82rem; }

/* ---- Бегущая строка ------------------------------------------------- */
.marquee { background: var(--accent); color: var(--ink); overflow: hidden; padding: 14px 0; white-space: nowrap; }
.marquee__track { display: inline-block; white-space: nowrap; will-change: transform; animation: marquee 34s linear infinite; }
.marquee__item { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; letter-spacing: .01em; }
.marquee__item::after { content: "•"; margin: 0 26px; opacity: .55; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Бургер-меню (мобильный) --------------------------------------- */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; padding: 9px; }
.nav-toggle span { display: block; height: 2.5px; background: #fff; border-radius: 2px; margin: 4px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute; top: 68px; left: 0; right: 0;
        background: var(--ink); flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 16px 20px; display: none; border-top: 1px solid #2a2a24;
    }
    .nav.is-open { display: flex; }
    .nav a { padding: 14px 6px; border-bottom: 1px solid #23231d; font-size: 1.05rem; }
    .nav a:last-child { border-bottom: 0; }
    .nav .btn { margin: 10px 0 6px; padding: 14px; }
}

/* ---- Юридические страницы (политика, согласие) ----------------------- */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal .h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: 28px; }
.legal h2 { font-size: 1.2rem; margin: 34px 0 12px; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .back { display: inline-block; margin-top: 40px; }

/* ---- Всплывающий виджет мессенджеров --------------------------------- */
.msg-widget {
    position: fixed; inset: 0; z-index: 200; padding: 20px;
    background: rgba(14, 14, 14, .55);
    display: none; align-items: center; justify-content: center;
}
.msg-widget.is-open { display: flex; }
.msg-widget__card {
    position: relative; width: 100%; max-width: 620px;
    display: grid; grid-template-columns: 1.3fr 1fr;
    background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    animation: msgWidgetIn .25s ease;
}
@keyframes msgWidgetIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.msg-widget__close {
    position: absolute; top: 12px; right: 14px; z-index: 1;
    width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(14,14,14,.08);
    color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer;
}
.msg-widget__close:hover { background: rgba(14,14,14,.16); }
.msg-widget__left { padding: 36px 30px; }
.msg-widget__title {
    font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; line-height: 1.25;
    margin: 0 0 22px; text-wrap: balance;
}
.msg-widget__buttons { display: flex; flex-direction: column; gap: 12px; }
.msg-widget__btn {
    display: flex; align-items: center; gap: 10px; padding: 13px 20px;
    border-radius: var(--radius-pill); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: .98rem;
}
.msg-widget__btn--wa { background: #25D366; }
.msg-widget__btn--tg { background: #229ED9; }
.msg-widget__btn--max { background: #7C3AED; }
.msg-widget__right {
    background: var(--ink); color: #fff; padding: 32px 22px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.msg-widget__bonus-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: #b9b9b1; }
.msg-widget__bonus-amount { font-family: var(--f-display); font-weight: 800; font-size: 2rem; color: var(--accent); margin: 8px 0; line-height: 1.1; }
.msg-widget__bonus-note { font-size: .84rem; text-transform: uppercase; letter-spacing: .03em; color: #d9d9d3; }

@media (max-width: 640px) {
    .msg-widget__card { grid-template-columns: 1fr; }
    .msg-widget__right { padding: 26px 22px; }
}
