/* [2026-11-18] Страницы /pricing и /terms. Отдельный файл, чтобы не трогать общие стили;
   подключается через секцию Head в _Layout. Цвета — переменные темы earth. */

.pricing-page h1, .legal-page h1 { margin: 6px 0 12px; font: 600 clamp(34px, 5vw, 54px)/1.08 var(--serif); color: var(--ink); }

.pricing-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }

/* [2026-11-18] Founding — четвёртая яркая карточка: терракота, белый текст, скидочные цены по планам. */
.pricing-card.is-founding { position: relative; border: 0; background: linear-gradient(150deg, #c9714b 0%, #b5552f 100%); color: #fff; box-shadow: 0 18px 40px rgba(181, 85, 47, .28); }
.pricing-card.is-founding h2, .pricing-card.is-founding .pricing-price strong { color: #fff; }
.pricing-card.is-founding .pricing-note { color: #ffe6d6; }
.pricing-card.is-founding .pricing-price span, .pricing-card.is-founding .pricing-equivalent { color: #fbe2d4; }
.pricing-card.is-founding .pricing-equivalent { margin-bottom: 4px; }
.pricing-card.is-founding .pricing-founding-prices { gap: 6px; margin: 0 0 6px; }
.pricing-card.is-founding .pricing-founding-prices div { padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .16); font-size: 13px; }
.pricing-card.is-founding .pricing-founding-prices dt, .pricing-card.is-founding .pricing-founding-prices dd { color: #fff; }
.pricing-card.is-founding .pricing-founding-prices s { color: #f6c9b3; }
.pricing-founding-terms { margin: 0 0 12px; color: #fbe2d4; font-size: 12px; line-height: 1.45; }
/* [2026-11-25] Цены по заявке: «On request» вместо суммы — чуть мельче, чтобы влезало в 4 колонки. */
.pricing-card .pricing-price strong { font-size: clamp(26px, 2.4vw, 34px); }
/* [2026-11-25] Блок интереса к MCP/API. */
.pricing-mcp-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.pricing-mcp-card > div { flex: 1 1 420px; }
.pricing-mcp-card h2 { margin: 6px 0 8px; font: 600 clamp(22px, 2.6vw, 30px)/1.2 var(--serif); color: var(--ink); }
.pricing-mcp-card p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 15px; }
.pricing-mcp { padding-top: 0 !important; }
/* [2026-11-26] Подробные условия founding в форме подписки, под галочкой. */
.pricing-founding-details { margin: -4px 0 4px; padding: 12px 14px; border-radius: 12px; background: #fbf1ea; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.pricing-founding-details table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.pricing-founding-details th, .pricing-founding-details td { padding: 4px 6px; text-align: left; white-space: nowrap; }
.pricing-founding-details thead th { color: #9c4524; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.pricing-founding-details tbody th { color: var(--ink); font-weight: 650; }
.pricing-founding-details p { margin: 0; }
p.pricing-founding-details { margin: -4px 0 4px; }
.pricing-founding-details td small { color: var(--muted); font-size: 11px; }
/* [2026-11-26] Условия видны только при отмеченной галочке founding. Без JS: CSS :has(). */
.contact-form:has(#Subscribe_Founding:not(:checked)) .pricing-founding-details { display: none; }
/* Тёмный блок формы задаёт абзацам светлый цвет и крупный шрифт — внутри карточки возвращаем тёмный. */
html.theme-earth .contact-section .pricing-founding-details p,
html.theme-earth .contact-section p.pricing-founding-details { max-width: none; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
@media (max-width: 520px) { .pricing-founding-details { overflow-x: auto; } }
/* [2026-11-25] Ссылка на условия founding на яркой карточке — белая, подчёркнутая. */
.pricing-founding-terms a { color: #fff; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.button-founding { background: #fff; border: 1px solid #fff; color: #9c4524; }
.button-founding:hover { background: #fff3ec; color: #7d3519; }
.pricing-card { display: flex; flex-direction: column; gap: 8px; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.pricing-card.is-featured { border: 2px solid var(--teal); box-shadow: 0 18px 40px rgba(47, 74, 58, .14); }
.pricing-card h2 { margin: 0; font: 600 24px/1.2 var(--serif); color: var(--ink); }
.pricing-note { margin: 0; color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pricing-price { margin: 6px 0 0; }
.pricing-price strong { font: 600 38px/1 var(--serif); color: var(--ink); }
.pricing-price span { margin-left: 6px; color: var(--muted); font-size: 15px; }
.pricing-equivalent { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.pricing-card .button { margin-top: auto; }
.button-outline { border: 1px solid var(--teal); background: transparent; color: var(--teal); }
.button-outline:hover { background: var(--teal); color: #fff; }
.pricing-small { margin-top: 18px; color: var(--muted); font-size: 13px; }

.pricing-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 40px 0 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--line); }
.pricing-features li { padding: 22px 24px; background: #fff; color: var(--muted); font-size: 14px; line-height: 1.55; }
.pricing-features strong { display: block; margin-bottom: 6px; color: var(--teal); font: 600 18px/1.25 var(--serif); }

.pricing-founding-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(24px, 4vw, 44px); border-radius: 18px; background: var(--sand, #efe6d4); }
.pricing-founding-card h2 { margin: 6px 0 12px; font: 600 clamp(26px, 3.4vw, 36px)/1.15 var(--serif); color: var(--ink); }
.pricing-founding-card p:not(.eyebrow) { margin: 0 0 22px; color: var(--ink-soft); font-size: 16px; }
.pricing-founding-prices { display: grid; gap: 10px; margin: 0; }
.pricing-founding-prices div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #fff; }
.pricing-founding-prices dt { font-weight: 650; color: var(--ink); }
.pricing-founding-prices dd { margin: 0; color: var(--ink); text-align: right; }
.pricing-founding-prices s { margin-right: 6px; color: var(--muted); }

.pricing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: step; }
.pricing-steps li { position: relative; padding: 24px 24px 24px 70px; border-radius: 18px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.55; counter-increment: step; }
.pricing-steps li::before { content: counter(step); position: absolute; left: 22px; top: 22px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; }
.pricing-steps strong { display: block; margin-bottom: 6px; color: var(--ink); font: 600 18px/1.25 var(--serif); }

.pricing-plan-choice { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; padding: 0; border: 0; }
.pricing-plan-choice legend { margin-bottom: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.pricing-plan-choice label, .contact-form .pricing-check { display: flex !important; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 500; }
.pricing-plan-choice input, .contact-form .pricing-check input { width: auto !important; margin: 0; }
.pricing-plan-choice small { color: var(--muted); }

.legal-page { max-width: 820px; margin: 0 auto; padding: 72px clamp(16px, 5vw, 24px) 96px; color: var(--ink-soft); }
.legal-page section { margin-top: 34px; }
.legal-page h2 { margin: 0 0 10px; font: 600 22px/1.25 var(--serif); color: var(--ink); }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.65; }
.legal-page section p { margin: 0 0 10px; }

/* Под колонкой текста цвет приглушён, к краям экрана — ярче: полупрозрачная бумажная
   подложка, растворяющаяся в стороны. z-index: 0 — свой слой поверх фоновых пятен. */
html.theme-earth .legal-page { position: relative; z-index: 0; }
html.theme-earth .legal-page::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -140px; right: -140px; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(247, 245, 239, 0) 0%, rgba(247, 245, 239, .72) 22%, rgba(247, 245, 239, .72) 78%, rgba(247, 245, 239, 0) 100%);
}

/* Фон темы (.marketing::before) покрывает только первый экран. Длинной странице условий —
   продолжение: те же пастельные пятна повторяются вниз и гаснут только у самого конца. */
html.theme-earth .legal-backdrop::after {
    content: ""; position: absolute; top: 70vh; bottom: 0; left: -5%; right: -5%; z-index: -1; pointer-events: none;
    background:
        radial-gradient(42% 340px at 80% 260px, rgba(176, 210, 152, .9), transparent 72%),
        radial-gradient(36% 320px at 8% 560px, rgba(214, 190, 214, .75), transparent 72%),
        radial-gradient(40% 320px at 92% 860px, rgba(238, 170, 136, .85), transparent 72%),
        radial-gradient(42% 340px at 28% 1140px, rgba(240, 212, 140, .85), transparent 72%),
        radial-gradient(38% 320px at 74% 1420px, rgba(168, 206, 220, .85), transparent 72%);
    background-size: 100% 1600px;
    background-repeat: repeat-y;
    filter: blur(48px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 360px, #000 calc(100% - 420px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 360px, #000 calc(100% - 420px), transparent 100%);
}
.legal-page ul { margin: 0 0 12px; padding-left: 22px; }

@media (max-width: 1180px) { .pricing-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 860px) {
    .pricing-cards, .pricing-features, .pricing-steps, .pricing-founding-card { grid-template-columns: 1fr; }
}
