/* ==========================================================================
   КурьерPRO — лендинг подбора работы курьером
   Стили: mobile-first, CSS-переменные, без внешних зависимостей
   ========================================================================== */

:root {
    --brand: #ffd93e;          /* фирменный жёлтый */
    --brand-dark: #f2c800;
    --accent: #27ae60;         /* CTA-зелёный */
    --accent-dark: #219653;
    --text: #1c1c1c;
    --text-muted: #555555;
    --bg: #f4f7f6;
    --surface: #ffffff;
    --border: #e6ebe9;
    --radius: 15px;
    --radius-sm: 10px;
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    --shadow-cta: 0 4px 15px rgba(39, 174, 96, 0.30);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / базовое ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: #1b6fb5; }

:focus-visible {
    outline: 3px solid #1b6fb5;
    outline-offset: 2px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Шапка ---------- */
.site-header {
    background: linear-gradient(135deg, #ffec8a 0%, var(--brand) 42%, #ffc93c 100%);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 14px 0 26px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* Декоративное свечение в углу шапки */
.site-header::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.site-header .container { position: relative; z-index: 1; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.15rem;
    color: #000;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo__mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #1c1c1c;
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.lang-nav { display: flex; gap: 8px; }

.lang-btn {
    background: #fff;
    border: 2px solid transparent;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    color: #222;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.lang-btn.active,
.lang-btn:hover { border-color: #1c1c1c; background: #fffde7; }

.hero { text-align: center; }

h1 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 2.2vw + 1rem, 2.1rem);
    line-height: 1.25;
    color: #000;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: clamp(1rem, 0.5vw + 0.9rem, 1.15rem);
    color: #222;
    margin: 0 auto;
    max-width: 44ch;
}

/* ---------- Бейджи доверия под заголовком ---------- */
.trust {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.trust li {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1c1c1c;
    white-space: nowrap;
}

/* ---------- Иллюстрация в шапке ---------- */
.hero-art {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 20px auto 0;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

/* ---------- Карточки и секции ---------- */
main > .container > section,
.card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(1.2rem, 1vw + 0.95rem, 1.45rem);
    margin: 0 0 16px;
    color: #1c1c1c;
    letter-spacing: -0.01em;
}

h3 { font-size: 1.05rem; margin: 0 0 6px; }

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.lead { color: var(--text-muted); }

/* ---------- Списки преимуществ ---------- */
.features { list-style: none; padding: 0; margin: 0; }

.features li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 800;
}

.features li:last-child { margin-bottom: 0; }

.features strong { color: #111; }

/* ---------- CTA ---------- */
.cta-btn {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 26px auto;
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: var(--shadow-cta);
    transition: background 0.3s, transform 0.3s;
}

.cta-btn:hover { background: var(--accent-dark); transform: translateY(-2px); }

.cta-btn--inline { margin: 18px 0 0; }

.cta-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: -12px 0 24px;
}

/* ---------- Липкая кнопка (только мобильные) ---------- */
.sticky-cta {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

.sticky-cta .cta-btn {
    margin: 0 auto;
    max-width: 440px;
    padding: 14px 20px;
    font-size: 1.05rem;
}

@media (max-width: 639px) {
    .sticky-cta { display: block; }
    body { padding-bottom: 84px; }
}

/* ---------- Шаги "как это работает" ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }

.steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 16px 46px;
    border-left: 2px dashed var(--border);
    margin-left: 15px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: -16px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand);
    color: #000;
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
}

.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }

/* ---------- Таблица партнёров ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 520px;
}

caption {
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 10px;
}

th, td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

thead th { background: #fffdf3; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }

tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    background: #eafaf1;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ---------- Stat-плитки (заработок) ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.stats li {
    background: #f9fbfa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.stats strong { display: block; font-size: 1.3rem; color: #000; }

/* ---------- FAQ ---------- */
.faq details {
    border-bottom: 1px solid var(--border);
    padding: 4px 0;
}

.faq details:last-child { border-bottom: none; }

.faq summary {
    font-weight: 700;
    cursor: pointer;
    color: #1b6fb5;
    padding: 10px 26px 10px 0;
    list-style: none;
    position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 8px;
    font-weight: 800;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.faq details[open] summary::after { content: "–"; }

.faq details p {
    margin: 0 0 12px;
    color: var(--text-muted);
}

/* ---------- Футер ---------- */
.site-footer {
    padding: 24px 0 40px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
}

/* ---------- Служебное ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Планшет / десктоп ---------- */
@media (min-width: 640px) {
    .container { padding: 0 24px; }
    main > .container > section, .card { padding: 28px; }
}

/* ---------- Тёмная тема ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #e9edeb;
        --text-muted: #a9b3ae;
        --bg: #14181a;
        --surface: #1c2224;
        --border: #2b3438;
        --shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    }
    h1, h2, h3, .stats strong { color: #fff; }
    .logo { color: #000; }
    thead th { background: #242c2f; }
    .stats li { background: #202729; }
    .badge { background: #14301f; }
    .lang-btn { color: #111; }
    .sticky-cta { background: rgba(28, 34, 36, 0.94); }
}

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.breadcrumbs {
    font-size: 0.82rem;
    margin-bottom: 14px;
    margin-top: 4px;
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    color: rgba(0, 0, 0, 0.65);
}

.breadcrumbs li + li::before {
    content: "›";
    margin-right: 6px;
    opacity: 0.6;
}

.breadcrumbs a { color: rgba(0, 0, 0, 0.75); }

/* ==========================================================================
   Калькулятор дохода
   ========================================================================== */
.calc-form {
    display: grid;
    gap: 16px;
    margin: 0 0 20px;
}

.calc-field { display: block; }

.calc-field > label,
.calc-field legend {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 6px;
    padding: 0;
}

.calc-field legend { margin-bottom: 8px; }

.calc-field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #888 50%),
                      linear-gradient(135deg, #888 50%, transparent 50%);
    background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.calc-field select:focus { border-color: var(--accent); }

.calc-field fieldset,
fieldset.calc-field {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 22px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 600;
    background: var(--surface);
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.radio:hover { border-color: #c9d3cf; }

.radio:has(input:checked) {
    border-color: var(--accent);
    background: #eafaf1;
}

.radio input {
    accent-color: var(--accent);
    margin: 0;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    height: 28px;
}

.calc-result {
    background: linear-gradient(160deg, #f0faf4 0%, #ffffff 70%);
    border: 2px solid #d8f0e2;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.calc-result__label {
    margin: 0 0 4px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.calc-result__value {
    margin: 0 0 4px;
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 800;
    color: #12813f;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.calc-result__rate {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.calc-bar {
    height: 8px;
    border-radius: 6px;
    background: #e2eae6;
    overflow: hidden;
    margin-bottom: 18px;
}

.calc-bar span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--accent), #6ed49a);
    transition: width 0.35s ease;
}

.calc-result .cta-btn { margin: 0 auto; }

.calc-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 12px 0 0;
}

/* ==========================================================================
   Карточки городов (хаб /goroda/)
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.city-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.city-card:hover {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.city-card h3 { margin: 0; color: #1c1c1c; }

.city-card__money {
    margin: 0;
    font-weight: 800;
    color: #12813f;
    font-size: 1.05rem;
}

.city-card__meta {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.city-card .badge { align-self: flex-start; margin-top: auto; }

/* ==========================================================================
   Карточки статей (хаб /blog/)
   ========================================================================== */
.post-grid {
    display: grid;
    gap: 12px;
}

.post-card {
    display: block;
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    transition: border-color 0.18s, transform 0.18s;
}

.post-card:hover { border-color: var(--brand); transform: translateX(3px); }

.post-card h3 { margin: 0 0 6px; color: #1c1c1c; }

.post-card p { margin: 0 0 8px; color: var(--text-muted); font-size: 0.92rem; }

.post-card__meta {
    font-size: 0.78rem !important;
    font-weight: 700;
    color: var(--accent-dark) !important;
    margin: 0 !important;
}

/* ==========================================================================
   Статья
   ========================================================================== */
.article h2 {
    margin-top: 28px;
    padding-top: 4px;
}

.article h2:first-child { margin-top: 0; }

.article h3 { margin-top: 18px; }

.article p, .article li { color: #333; }

.article strong { color: #111; }

.link-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
}

.link-list li {
    padding-left: 20px;
    position: relative;
}

.link-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
}

@media (min-width: 640px) {
    .post-grid { grid-template-columns: 1fr 1fr; }
}

/* Тёмная тема для новых блоков */
@media (prefers-color-scheme: dark) {
    .breadcrumbs ol, .breadcrumbs a { color: rgba(255, 255, 255, 0.7); }
    .city-card h3, .post-card h3 { color: #fff; }
    .calc-result {
        background: linear-gradient(160deg, #16301f 0%, #1c2224 70%);
        border-color: #26543a;
    }
    .calc-result__value { color: #6ed49a; }
    .calc-bar { background: #2b3438; }
    .radio:has(input:checked) { background: #16301f; }
    .article p, .article li { color: #d5dcd9; }
    .article strong { color: #fff; }
}
