/* V3 · форма «Începe-ți proiectul» (templates/v3/blocks/start_form.html). Не зависит от v3_home.css и redesign_v2.css:
   токены — общие (--v3h-*), если страница их задала, иначе свои. Кремовый фон страницы, форма — ровная белая плоскость
   без тени, поля с тонкой рамкой и прямыми углами, кнопка чёрная (CTA сайта). Все классы — .v3st-*. */

.v3st { --st-ink: #111; --st-text: var(--v3h-text, #211915); --st-head: var(--v3h-head, #1d1612); --st-muted: var(--v3h-muted, #6d6058);
    --st-line: var(--v3h-line, rgba(33, 25, 21, .16)); --st-field: rgba(33, 25, 21, .3); --st-wine: var(--v3h-wine, var(--tdm-wine, #6b2232));
    --st-err: #a12222; --st-gut: 16px; --st-sec: var(--v3h-sec, 56px); --st-ease: cubic-bezier(.2, .7, .2, 1);
    display: block; padding: var(--st-sec) 0 0; color: var(--st-text); scroll-margin-top: calc(var(--v3h-hdr, 88px) - 8px);
    font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif; font-size: 15px; font-weight: 400; line-height: 1.5;
    font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
@media (min-width: 768px) { .v3st { --st-gut: 24px; --st-sec: var(--v3h-sec, 76px); } }
@media (min-width: 1024px) { .v3st { --st-gut: 40px; --st-sec: var(--v3h-sec, 112px); } }
.v3st *, .v3st *::before, .v3st *::after { box-sizing: border-box; }
.v3st :where(h2, h3, p, ul, ol, fieldset, legend) { margin: 0; padding: 0; }
.v3st :where(ul, ol) { list-style: none; }
.v3st [hidden] { display: none !important; }
.v3st-wrap { width: min(1360px, 100% - 2 * var(--st-gut)); margin-inline: auto; }
.v3st-grid { display: grid; gap: 28px; }
.v3st-grid > * { min-width: 0; }

/* ── Слева: заголовок, три шага, написать сразу ── */
.v3st .v3st-title { font-size: var(--v3t-h2, 30px); font-weight: 300; line-height: 1.16; letter-spacing: -.005em; color: var(--st-head); text-wrap: balance; }
.v3st .v3st-lead { margin-top: 12px; max-width: 30em; font-size: var(--v3t-body, 15px); line-height: 1.6; color: var(--st-muted); }
.v3st .v3st-steps { margin-top: 22px; border-top: 1px solid var(--st-line); counter-reset: st; }
.v3st-steps li { display: flex; align-items: baseline; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--st-line); font-size: var(--v3t-body, 15px); line-height: 1.4; counter-increment: st; }
.v3st-steps li::before { content: counter(st); flex: none; min-width: 12px; font-size: var(--v3t-lead, 18px); font-weight: 300; line-height: 1; color: var(--st-wine); }
.v3st-quick { margin-top: 22px; }
.v3st-aside { margin-top: 28px; }
.v3st .v3st-quick__t { font-size: var(--v3t-small, 13px); color: var(--st-muted); }
.v3st .v3st-quick ul { display: flex; flex-wrap: wrap; gap: 2px 22px; margin-top: 4px; }
.v3st-quick a { display: inline-block; padding: 8px 0; color: var(--st-text); font-size: var(--v3t-h3, 16px); font-weight: 500; text-decoration: underline;
    text-decoration-color: var(--st-line); text-decoration-thickness: 1px; text-underline-offset: 6px; transition: color .3s, text-decoration-color .3s; }
.v3st-quick a:hover { color: var(--st-wine); text-decoration-color: currentColor; }

/* до 1024 px: заголовок → форма → шаги и мессенджеры (форма сразу, без прокрутки мимо вводной колонки) */
@media (max-width: 1023px) {
    .v3st-grid { gap: 0; }
    .v3st-intro { display: contents; }
    .v3st-panel { order: 1; margin-top: 22px; }
    .v3st .v3st-steps { order: 2; margin-top: 28px; }
    .v3st-quick, .v3st-aside { order: 3; }
}

/* ── Форма ── */
.v3st-panel { display: grid; background: #fff; border-radius: 3px; padding: 6px 16px 22px; }
.v3st-form { display: grid; gap: 18px; min-width: 0; }
.v3st-form > * { min-width: 0; }
.v3st-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* вкладки: тонкая линия, у выбранной — чёрный отрезок */
.v3st-tabs { display: flex; gap: 0 clamp(16px, 5vw, 36px); border-bottom: 1px solid var(--st-line); }
.v3st-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.v3st-tabs label { position: relative; display: flex; align-items: center; min-height: 52px; margin-bottom: -1px; cursor: pointer;
    font-size: var(--v3t-h3, 16px); font-weight: 500; line-height: 1.2; color: var(--st-muted); white-space: nowrap; transition: color .3s; }
.v3st-tabs label::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--st-ink); transform: scaleX(0);
    transform-origin: 0 50%; transition: transform .45s var(--st-ease); }
.v3st-tabs input:not(:checked) + label:hover { color: var(--st-ink); }
.v3st-tabs input:checked + label { color: var(--st-ink); }
.v3st-tabs input:checked + label::after { transform: none; }
.v3st-tabs input:focus-visible + label { outline: 2px solid var(--st-ink); outline-offset: 2px; }
.v3st-short { display: none; }
@media (max-width: 479px) { .v3st-full { display: none; } .v3st-short { display: inline; } .v3st-tabs { justify-content: space-between; gap: 0 10px; } .v3st-tabs label { justify-content: center; } }

/* видна одна группа полей и одна подпись кнопки — по выбранной вкладке (без JS, через :has) */
.v3st-form:not(:has(input[name="client"][value="private"]:checked)) .v3st-only--private,
.v3st-form:not(:has(input[name="client"][value="designer"]:checked)) .v3st-only--designer,
.v3st-form:not(:has(input[name="client"][value="business"]:checked)) .v3st-only--business { display: none; }
@supports not selector(:has(*)) {        /* старый браузер: вкладку в data-tab ведёт start.js */
    .v3st-form:not([data-tab="private"]) .v3st-only--private,
    .v3st-form:not([data-tab="designer"]) .v3st-only--designer,
    .v3st-form:not([data-tab="business"]) .v3st-only--business { display: none; }
}

.v3st .v3st-fs { display: grid; gap: 18px; min-width: 0; padding-top: 6px; border: 0; }
.v3st .v3st-fs__t { float: left; width: 100%; font-size: var(--v3t-lead, 18px); font-weight: 400; line-height: 1.3; color: var(--st-head); text-wrap: balance; }
.v3st .v3st-fs__d { clear: both; margin-top: -10px; font-size: var(--v3t-body, 15px); line-height: 1.55; color: var(--st-muted); text-wrap: pretty; }
.v3st-row { display: grid; gap: 18px; align-items: end; }
/* вкладка «Designer»: Prenume | Nume, Telefon | Email; на остальных — Nume | Telefon, Email на всю ширину */
.v3st-form:has(input[name="client"][value="designer"]:checked) .v3st-not-designer { display: none; }
@supports not selector(:has(*)) { .v3st-form[data-tab="designer"] .v3st-not-designer { display: none; } }
@media (min-width: 560px) {
    .v3st-contact .v3st-field--email { grid-column: 1 / -1; }
    .v3st-form:has(input[name="client"][value="designer"]:checked) .v3st-contact .v3st-field--email { grid-column: auto; }
}
.v3st-field { display: grid; gap: 7px; min-width: 0; }
.v3st-label { font-size: var(--v3t-small, 13px); font-weight: 500; line-height: 1.35; color: var(--st-text); }
.v3st .v3st-input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 52px; margin: 0; padding: 0 16px; border: 1px solid var(--st-field);
    border-radius: 0; background: #fff; color: var(--st-ink); font-family: inherit; font-size: 16px; /* не меньше: iOS приближает страницу */ font-weight: 400; line-height: 1.3; letter-spacing: normal;
    text-transform: none; box-shadow: none; outline: 0; font-variant-numeric: lining-nums; transition: border-color .25s, box-shadow .25s; }
.v3st .v3st-input::placeholder { color: #7d7067; opacity: 1; }
.v3st .v3st-input:hover { border-color: rgba(33, 25, 21, .55); }
.v3st .v3st-input:focus { border-color: var(--st-ink); box-shadow: inset 0 0 0 1px var(--st-ink); }
.v3st .v3st-input.is-error, .v3st .v3st-input.form-input--error { border-color: var(--st-err); box-shadow: inset 0 0 0 1px var(--st-err); }
.v3st-sel { position: relative; display: block; min-width: 0; }
.v3st .v3st-sel .v3st-input { padding-right: 42px; cursor: pointer; text-overflow: ellipsis; }
.v3st select.v3st-input:has(option[value=""]:checked) { color: #7d7067; }      /* не выбрано — как подсказка в поле */
.v3st select.v3st-input option { color: var(--st-ink); }
.v3st-chev { position: absolute; right: 16px; top: 50%; width: 12px; height: 8px; margin-top: -4px; fill: none; stroke: var(--st-ink); stroke-width: 1.3; pointer-events: none; }

.v3st-radios { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.v3st-radios label { position: relative; display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; font-size: var(--v3t-body, 16px); }
.v3st-radios input { position: absolute; opacity: 0; pointer-events: none; }
.v3st-radios span { display: inline-flex; align-items: center; gap: 11px; }
.v3st-radios span::before { content: ""; flex: none; width: 20px; height: 20px; border: 1px solid var(--st-field); border-radius: 50%; background: #fff; transition: border-width .2s, border-color .2s; }
.v3st-radios label:hover span::before { border-color: var(--st-ink); }
.v3st-radios input:checked + span::before { border: 6px solid var(--st-ink); }
.v3st-radios input:focus-visible + span { outline: 2px solid var(--st-ink); outline-offset: 4px; }

.v3st-consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 2px; cursor: pointer; font-size: var(--v3t-small, 13px); line-height: 1.5; color: var(--st-text); }
.v3st-consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--st-ink); cursor: pointer; }
.v3st-consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.v3st-consent.is-error { color: var(--st-err); }
.v3st .v3st-status { font-size: var(--v3t-body, 14px); line-height: 1.45; color: var(--st-err); }
.v3st .v3st-status:empty { position: absolute; }        /* пустая строка не добавляет отступ; role=alert остаётся в дереве */
.v3st-actions { display: grid; gap: 12px; }
.v3st .v3st-btn { -webkit-appearance: none; appearance: none; box-shadow: none; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 12px 20px; border: 1px solid var(--st-ink); border-radius: 0;
    background: var(--st-ink); color: #fff; font-family: inherit; font-size: var(--v3t-caps, 12px); font-weight: 500; letter-spacing: var(--v3t-caps-ls, .2em); line-height: 1.4;
    text-align: center; text-transform: uppercase; cursor: pointer; transition: background-color .3s, border-color .3s; }
.v3st .v3st-btn:hover { background: #333; border-color: #333; }
.v3st .v3st-btn:focus-visible, .v3st a:focus-visible { outline: 2px solid var(--st-ink); outline-offset: 3px; }
.v3st .v3st-btn[disabled] { opacity: .55; cursor: default; }
.v3st .v3st-more { text-align: center; }
.v3st-more a, .v3st-note a { color: var(--st-text); font-size: var(--v3t-body, 14px); text-decoration: underline; text-decoration-color: var(--st-line); text-underline-offset: 5px; }
.v3st-more a { display: inline-block; padding: 6px 0; }
.v3st-more a:hover { color: var(--st-wine); text-decoration-color: currentColor; }
.v3st .v3st-note { max-height: 0; overflow: hidden; opacity: 0; margin-top: -18px; font-size: var(--v3t-body, 14px); color: var(--st-muted); animation: v3st-note 0s 4s forwards; }   /* форму не включил скрипт за 4 с */
@keyframes v3st-note { to { max-height: none; opacity: 1; margin-top: 0; } }
.v3st-ok { align-self: center; padding: 48px 0; text-align: center; }
.v3st-ok:focus { outline: 0; }
.v3st-ok svg { width: 60px; height: 60px; margin: 0 auto 18px; fill: none; stroke: var(--st-ink); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.v3st .v3st-ok h3 { font-size: var(--v3t-h2, 30px); font-weight: 300; line-height: 1.16; color: var(--st-head); }
.v3st .v3st-ok p { margin-top: 10px; color: var(--st-muted); }

@media (min-width: 560px) { .v3st-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; } }
@media (min-width: 768px) {
    .v3st .v3st-lead { margin-top: 16px; }
    .v3st-panel { padding: 14px 36px 36px; }
    .v3st-form, .v3st .v3st-fs { gap: 22px; }
    .v3st .v3st-fs__d { margin-top: -14px; }
    .v3st-tabs label { min-height: 60px; }
}
@media (min-width: 1024px) {
    .v3st-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(44px, 6vw, 104px); align-items: start; }
    .v3st .v3st-steps { margin-top: 36px; }
    .v3st-steps li { padding: 17px 0; gap: 24px; }
    .v3st-steps li::before { min-width: 16px; }
    .v3st-quick { margin-top: 34px; }
    .v3st-aside { margin-top: 44px; }
    .v3st-panel { padding: 18px clamp(36px, 3.6vw, 56px) clamp(36px, 3.4vw, 52px); }
}

/* Появление: скрытое начальное состояние ставит только start.js и только блоку ниже экрана */
.v3st-wait [data-v3st-rev] { opacity: 0; transform: translateY(24px); }
.v3st-in [data-v3st-rev] { opacity: 1; transform: none; transition: opacity .7s var(--st-ease), transform .7s var(--st-ease); }
.v3st-in .v3st-panel[data-v3st-rev] { transition-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
    .v3st *, .v3st *::before, .v3st *::after { transition: none !important; }
}
