/* ============================================================
   «Бизнес ПК» — ПРАВОВЫЕ СТРАНИЦЫ
   Общий файл для contacts.html (контакты и реквизиты) и
   offer.html (публичная оферта). Подключать ПОСЛЕ site.css.
   Визуальный язык — как у «О нас»/«Оплаты»: белые карточки,
   тонкий border, radius 12–14, синий акцент --hd-blue.
   Переменные — из ui/tokens.css и site.css; хардкод цветов
   допустим только для белого/прозрачного.
   ============================================================ */

/* ---------- ОСНОВНОЙ КОНТЕЙНЕР ---------- */
body.legal .legal-main {
    width: min(100% - 64px, 1080px);
    margin: 0 auto;
    padding: 40px 0 0;
}

body.legal .page-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

body.legal .page-sub {
    margin: 0 0 28px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* ---------- КАРТОЧКИ КОНТАКТОВ ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 48px;
}

.contact-card {
    padding: 24px 26px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.contact-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--hd-blue);
    background: var(--color-surface-soft);
}

.contact-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.contact-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.contact-label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.contact-label + .contact-line {
    margin-top: 0;
}

.contact-line {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
}

.contact-line:last-child {
    margin-bottom: 0;
}

.contact-line a {
    color: var(--hd-blue);
    text-decoration: none;
}

.contact-line a:hover {
    color: var(--hd-blue-dark);
    text-decoration: underline;
}

.contact-hint {
    margin: 10px 0 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--color-text-secondary);
}

/* ---------- РЕКВИЗИТЫ ---------- */
.legal-section {
    margin: 0 0 48px;
}

.legal-section > h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.legal-lead {
    margin: 0 0 18px;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.legal-lead--after {
    margin: 18px 0 0;
}

.legal-lead a {
    color: var(--hd-blue);
    text-decoration: none;
}

.legal-lead a:hover {
    text-decoration: underline;
}

.requisites {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    margin: 0;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}

.requisites dt,
.requisites dd {
    margin: 0;
    padding: 13px 20px;
    font-size: 0.92rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--color-border-faint);
}

.requisites dt {
    color: var(--color-text-secondary);
    background: var(--color-surface-soft);
}

.requisites dd {
    min-width: 0;
    color: var(--color-text);
    overflow-wrap: anywhere;
}

.requisites dt:nth-last-of-type(1),
.requisites dd:nth-last-of-type(1) {
    border-bottom: 0;
}

.requisites .req-num {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* ---------- ТЕКСТ ОФЕРТЫ ---------- */
.offer-body {
    max-width: 860px;
    margin: 0 0 48px;
}

.offer-meta {
    display: inline-block;
    margin: 0 0 26px;
    padding: 8px 14px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-faint);
    border-radius: 999px;
}

.offer-body h2 {
    margin: 34px 0 12px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.offer-body h2:first-of-type {
    margin-top: 0;
}

.offer-body h3 {
    margin: 22px 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.offer-body p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text);
}

.offer-body ul,
.offer-body ol {
    margin: 0 0 12px;
    padding-left: 22px;
}

.offer-body li {
    margin: 0 0 7px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text);
}

.offer-body li:last-child {
    margin-bottom: 0;
}

.offer-body a {
    color: var(--hd-blue);
    text-decoration: none;
}

.offer-body a:hover {
    text-decoration: underline;
}

.offer-note {
    margin: 18px 0;
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border-faint);
    border-left: 3px solid var(--hd-blue);
    border-radius: 10px;
}

.offer-note p:last-child {
    margin-bottom: 0;
}

/* ---------- ФИНАЛЬНЫЙ БЛОК ---------- */
.legal-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 64px;
    padding: 30px 34px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.legal-cta h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.legal-cta p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.legal-cta .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---------- АДАПТИВНОСТЬ ---------- */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .requisites {
        grid-template-columns: minmax(0, 1fr);
    }

    .requisites dt {
        padding-bottom: 4px;
        border-bottom: 0;
    }

    .requisites dd {
        padding-top: 0;
    }
}

@media (max-width: 700px) {
    body.legal .legal-main {
        width: min(100% - 40px, 1080px);
        padding-top: 28px;
    }

    body.legal .page-title {
        font-size: 1.45rem;
    }

    .contact-card {
        padding: 20px 18px;
    }

    .contact-grid,
    .legal-section,
    .offer-body {
        margin-bottom: 36px;
    }

    .requisites dt,
    .requisites dd {
        padding-left: 16px;
        padding-right: 16px;
    }

    .legal-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
        margin-bottom: 48px;
    }
}
