/* ═══════════════════════════════════════════════════
   pages.css — общие стили публичных страниц
   (shop.html, offer.html, contacts.html)
   Наследует токены из style.css (frosted glass cathedral at midnight)
   ═══════════════════════════════════════════════════ */

:root {
    --surface-midnight: #05060f;
    --surface-deep-glass: rgba(5, 6, 15, 0.97);
    --text-headline: #d8ecf8;
    --text-body: #d1e4fa;
    --text-muted: #c7d3ea;
    --text-helper: #9da7ba;
    --text-white: #ffffff;
    --accent: #663af3;
    --accent-hover: #7b5cf7;
    --hairline: rgba(186, 215, 247, 0.12);
    --frost-wash: rgba(186, 214, 247, 0.06);
    --frost-wash-hover: rgba(186, 214, 247, 0.12);
    --radius-card: 16px;
    --radius-pill: 999px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --shadow-modal: inset 0 1px 1px rgba(216, 236, 248, 0.2),
                    inset 0 24px 48px rgba(168, 216, 245, 0.06),
                    0 16px 32px rgba(0, 0, 0, 0.3);
}

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

html, body {
    min-height: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-body);
    background: var(--surface-midnight);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Фоновый atmosphere — blueprint-сетка + spotlight (как на главной) */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(186, 215, 247, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(186, 215, 247, 0.06) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 70%);
}

body::after {
    content: '';
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 800px; height: 600px; z-index: 0; pointer-events: none;
    background: conic-gradient(
        at 50% -5%,
        transparent 40%,
        rgba(124, 145, 182, 0.15) 48%,
        rgba(124, 145, 182, 0.3) 50%,
        rgba(124, 145, 182, 0.15) 52%,
        transparent 60%
    );
    opacity: 0.6;
}

.page-wrap {
    position: relative; z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

/* ── Карточка-документ ── */
.doc-card {
    background: var(--surface-deep-glass);
    border-radius: var(--radius-card);
    padding: 36px 32px;
    box-shadow: var(--shadow-modal);
    position: relative;
    color: var(--text-body);
    line-height: 1.7;
}

.doc-card::before {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius-card);
    box-shadow: inset 0 1px 0 rgba(216, 236, 248, 0.15);
    pointer-events: none;
}

.doc-card h1 {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    background: linear-gradient(0deg, #d8ecf8 0%, #98c0ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.doc-card h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-headline);
    margin: 28px 0 12px;
}

.doc-card p { margin: 10px 0; color: var(--text-muted); }

.doc-card ul, .doc-card ol {
    margin: 10px 0 10px 22px;
    color: var(--text-muted);
}

.doc-card li { margin: 6px 0; }

.doc-card a {
    color: #b6d9fc;
    text-decoration: none;
    border-bottom: 1px solid rgba(182, 217, 252, 0.3);
}
.doc-card a:hover { border-bottom-color: #b6d9fc; }

/* ── Шапка страницы (навигация назад) ── */
.page-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--frost-wash);
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--hairline);
    transition: background 0.15s;
}
.back-link:hover { background: var(--frost-wash-hover); }

/* ── Тарифные карточки (shop.html) ── */
.tariff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.tariff-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--frost-wash);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    box-shadow: inset 0 0 0 1px var(--hairline);
    transition: background 0.15s, box-shadow 0.15s;
}

.tariff-card:hover { background: var(--frost-wash-hover); }

.tariff-card.popular {
    box-shadow: inset 0 0 0 1px rgba(102, 58, 243, 0.6),
                0 8px 24px rgba(102, 58, 243, 0.25);
}

.tariff-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(102, 58, 243, 0.18);
    color: #b6d9fc;
}

.tariff-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-headline);
}

.tariff-credits {
    font-size: 13px;
    color: var(--text-helper);
}

.tariff-price {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-white);
    font-family: var(--font-display);
}

.tariff-price .rub { font-size: 15px; color: var(--text-helper); font-weight: 400; }

.tariff-desc {
    font-size: 13px;
    color: var(--text-helper);
    line-height: 1.5;
}

/* ── Реквизиты (contacts.html) ── */
.req-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.req-row {
    display: flex;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}

.req-label {
    flex: 0 0 150px;
    color: var(--text-helper);
    font-size: 14px;
}

.req-value {
    color: var(--text-body);
    font-size: 15px;
    font-weight: 500;
}

/* ── Курс (shop.html) ── */
.rate-banner {
    background: rgba(102, 58, 243, 0.1);
    border-radius: var(--radius-card);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 0 1px rgba(102, 58, 243, 0.3);
}

.rate-banner .rate-title {
    font-size: 14px;
    color: var(--text-headline);
    font-weight: 500;
}

.rate-banner .rate-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
    font-family: var(--font-display);
    margin-top: 4px;
}

.rate-banner .rate-note {
    font-size: 12px;
    color: var(--text-helper);
    margin-top: 4px;
}

/* ── Адаптивность ── */
@media (max-width: 560px) {
    .doc-card { padding: 24px 18px; }
    .doc-card h1 { font-size: 24px; }
    .tariff-grid { grid-template-columns: 1fr; }
    .req-row { flex-direction: column; gap: 4px; }
    .req-label { flex: none; }
}
