/* V3 · общие стили новых блоков (30.11.2026). Подключается templates/v3/head.html только на страницах с флагом.
   Здесь: токены, кнопки, бордовый блок / мост (templates/v3/blocks/cta_band.html), окно заявки (templates/v3/lead_modal.html).
   Свои стили трека — в static/v3/<трек>.css (projects.css, pdp.css, home.css), токены — отсюда. */

:root {
    --tdm-wine: #6b2232;          /* бордовый: блоки «Cum ar putea arăta casa ta?» и винная кнопка главной */
    --tdm-wine-hover: #7d2a3c;
    --tdm-ink: #111;              /* CTA сайта — чёрные */
    --tdm-ink-hover: #333;
    --tdm-text: #1a1a1a;
    --tdm-muted: #6f6a64;
    --tdm-line: rgba(26, 26, 26, .14);
    --tdm-paper: #f6f3ef;
    --tdm-brown: #5a3e29;
    --tdm-radius: 12px;
    --tdm-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ── Кнопки ── */
.v3-btn { box-sizing: border-box; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
    padding: 0 28px; border: 1px solid transparent; border-radius: 0; font-family: inherit; font-size: 13px;
    font-weight: 600; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; line-height: 1.2;
    text-align: center; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.v3-btn--black { background: var(--tdm-ink); color: #fff; }
.v3-btn--black:hover { background: var(--tdm-ink-hover); color: #fff; }
.v3-btn--outline_light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.v3-btn--outline_light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); color: #fff; }
.v3-btn--outline { background: transparent; color: var(--tdm-text); border-color: var(--tdm-text); }
.v3-btn--outline:hover { background: var(--tdm-text); color: #fff; }
.v3-btn--wine { background: var(--tdm-wine); color: #fff; border-radius: var(--tdm-radius); }
.v3-btn--wine:hover { background: var(--tdm-wine-hover); }
.v3-btn[disabled] { opacity: .55; cursor: default; }
.v3-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ── Бордовый блок (style: wine) и мост-карточка (style: card) ── */
.v3-cta { box-sizing: border-box; width: 100%; margin: 0; }
.v3-cta__inner { box-sizing: border-box; max-width: 1200px; margin: 0 auto; padding: 56px 24px; }
.v3-cta__eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.v3-cta__title { margin: 0; font-size: clamp(26px, 3.2vw, 40px); font-weight: 300; line-height: 1.15; letter-spacing: .01em; }
.v3-cta__text { margin: 16px 0 0; max-width: 640px; font-size: 16px; line-height: 1.6; }
.v3-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.v3-cta--wine { background: var(--tdm-wine); color: #fff; }
.v3-cta--wine .v3-cta__text { color: rgba(255, 255, 255, .86); }
.v3-cta--card { box-sizing: border-box; padding: 40px 24px; }
.v3-cta--card > .v3-cta__inner { border: 1px solid var(--tdm-line); background: var(--tdm-paper); padding: 40px 32px; }
.v3-cta--card .v3-cta__eyebrow { color: var(--tdm-brown); }
.v3-cta--card .v3-cta__title { color: var(--tdm-text); }
.v3-cta--card .v3-cta__text { color: var(--tdm-muted); }
@media (max-width: 640px) {
    .v3-cta__inner { padding: 44px 16px; }
    .v3-cta__actions { flex-direction: column; }
    .v3-cta__actions .v3-btn { width: 100%; }
    .v3-cta--card { padding: 32px 16px; }
    .v3-cta--card > .v3-cta__inner { padding: 32px 20px; }
}

/* ── Окно заявки ── */
.v3-lead[hidden] { display: none; }
.v3-lead { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box; }
.v3-lead__backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .55); }
.v3-lead__box { position: relative; box-sizing: border-box; width: 100%; max-width: 480px; max-height: calc(100vh - 32px);
    overflow-y: auto; background: #fff; color: var(--tdm-text); padding: 40px 32px 32px; border-radius: 4px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); animation: v3LeadIn .45s var(--tdm-ease); }
@keyframes v3LeadIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.v3-lead__close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: flex; align-items: center;
    justify-content: center; border: 0; background: none; color: var(--tdm-text); cursor: pointer; }
.v3-lead__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.v3-lead__title { margin: 0 32px 10px 0; font-size: 24px; font-weight: 400; line-height: 1.25; }
.v3-lead__lead { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: var(--tdm-muted); }
.v3-lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.v3-lead__scope { margin: 0 0 18px; padding: 0; border: 0; }
.v3-lead__scope[hidden] { display: none; }
.v3-lead__scope legend { margin-bottom: 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.v3-lead__chip { display: inline-flex; margin: 0 6px 8px 0; cursor: pointer; }
.v3-lead__chip input { position: absolute; opacity: 0; pointer-events: none; }
.v3-lead__chip span { display: inline-block; padding: 9px 14px; border: 1px solid var(--tdm-line); font-size: 14px; transition: all .2s; }
.v3-lead__chip input:checked + span { border-color: var(--tdm-ink); background: var(--tdm-ink); color: #fff; }
.v3-lead__chip input:focus-visible + span { outline: 2px solid var(--tdm-ink); outline-offset: 2px; }
.v3-lead__field { display: block; margin-bottom: 14px; }
.v3-lead__field span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tdm-muted); }
.v3-lead__field input { box-sizing: border-box; width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--tdm-line);
    border-radius: 0; font: inherit; font-size: 16px; color: var(--tdm-text); background: #fff; }
.v3-lead__field input:focus { outline: none; border-color: var(--tdm-ink); }
.v3-lead__consent { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 14px; font-size: 13px; line-height: 1.5; color: var(--tdm-muted); }
.v3-lead__consent input { flex: none; margin-top: 3px; width: 16px; height: 16px; }
.v3-lead__consent a { color: inherit; text-decoration: underline; }
.v3-lead__status { min-height: 1em; margin: 0 0 12px; font-size: 14px; color: #a12222; }
.v3-lead__status:empty { margin: 0; }
.v3-lead__submit { width: 100%; }
.v3-lead__ok { text-align: center; padding: 12px 0 4px; }
.v3-lead__ok[hidden] { display: none; }
.v3-lead__ok svg { width: 56px; height: 56px; margin-bottom: 14px; fill: none; stroke: var(--tdm-text); stroke-width: 1.6;
    stroke-linecap: round; stroke-linejoin: round; }
.v3-lead__ok .v3-lead__title { margin-right: 0; }
html.v3-lead-open, html.v3-lead-open body { overflow: hidden; }
@media (max-width: 640px) {
    .v3-lead { align-items: flex-end; padding: 0; }
    .v3-lead__box { max-width: none; max-height: 92vh; border-radius: 12px 12px 0 0; padding: 36px 16px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .v3-lead__box { animation: none; }
    .v3-btn, .v3-lead__chip span { transition: none; }
}
