.project-brief-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(24, 17, 48, .38);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

.project-brief [hidden],
.project-brief__progress[hidden],
.project-brief__footer[hidden] { display: none !important; }

.project-brief-backdrop.is-open { opacity: 1; visibility: visible; }

.project-brief {
    --brief-accent: #6708C7;
    position: fixed;
    top: var(--bitrix-panel-height, 0px);
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    width: min(760px, 48vw);
    min-width: 610px;
    color: #201C38;
    background: #FCFBFF;
    box-shadow: -30px 0 80px rgba(32, 28, 56, .18);
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), visibility .45s;
}

.project-brief.is-open { transform: translateX(0); visibility: visible; }

body > .content,
body > .main-footer { transition: transform .45s cubic-bezier(.22, 1, .36, 1), filter .45s ease; }

body.project-brief-open { overflow: hidden; }
body.project-brief-open > .content,
body.project-brief-open > .main-footer { transform: translateX(-3vw); filter: saturate(.8); }

.project-brief__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    padding: 23px 34px 18px;
    border-bottom: 1px solid #EBE7F1;
}

.project-brief__brand { font-size: 20px; font-weight: 800; letter-spacing: -.04em; }
.project-brief__brand span { color: #A12999; }

.project-brief__close {
    position: relative;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #E4DFEC;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease, border-color .2s ease;
}
.project-brief__close:hover { transform: rotate(6deg); border-color: #B8ADC8; }
.project-brief__close:before,
.project-brief__close:after { content: ''; position: absolute; top: 20px; left: 12px; width: 17px; height: 1px; background: #201C38; }
.project-brief__close:before { transform: rotate(45deg); }
.project-brief__close:after { transform: rotate(-45deg); }

.project-brief__progress {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: center;
    flex: 0 0 auto;
    gap: 12px;
    padding: 18px 34px;
    border-bottom: 1px solid #F0ECF4;
    color: #9690A5;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.project-brief__progress-item { white-space: nowrap; transition: color .25s ease; }
.project-brief__progress-item span { margin-right: 5px; font-variant-numeric: tabular-nums; }
.project-brief__progress-item.is-active,
.project-brief__progress-item.is-done { color: #6708C7; }
.project-brief__progress-line { height: 1px; background: #DED8E7; }

.project-brief__form { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.project-brief__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 38px 44px 28px; scrollbar-width: thin; scrollbar-color: #C9BDD8 transparent; }
.project-brief__step { animation: briefStepIn .35s ease both; }
@keyframes briefStepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.project-brief__eyebrow { margin-bottom: 9px; color: #8D2BA4; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.project-brief h2 { max-width: 560px; margin: 0; color: #201C38; font: 700 34px/1.12 'Manrope', sans-serif; letter-spacing: -.035em; }
.project-brief__lead { max-width: 590px; margin: 14px 0 28px; color: #6C6A86; font-size: 15px; line-height: 1.65; }

.project-brief__services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.project-brief__service {
    display: flex;
    align-items: center;
    min-height: 76px;
    gap: 13px;
    padding: 14px 16px;
    color: #302A45;
    text-align: left;
    font: 650 14px/1.35 'Manrope', sans-serif;
    border: 1px solid #E6E1ED;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(32, 28, 56, .035);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.project-brief__service:hover { transform: translateY(-2px); border-color: #BBA5D0; box-shadow: 0 12px 30px rgba(72, 36, 112, .09); }
.project-brief__service.is-selected { border-color: #8E3DC0; background: linear-gradient(135deg, rgba(103,8,199,.07), rgba(216,66,101,.06)); box-shadow: 0 0 0 2px rgba(103,8,199,.08); }
.project-brief__service-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; color: #7B27B1; font-size: 14px; font-weight: 800; border-radius: 13px; background: linear-gradient(135deg, rgba(103,8,199,.11), rgba(216,66,101,.09)); }
.project-brief__service-icon img { width: 20px; height: 20px; filter: invert(21%) sepia(73%) saturate(3438%) hue-rotate(266deg) brightness(82%) contrast(91%); }

.project-brief__helper { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 16px 0 22px; padding: 10px 13px; color: #625C76; font-size: 13px; line-height: 1.45; border-radius: 12px; background: #F2EFF8; }
.project-brief__helper-mark { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; color: #fff; font-size: 12px; font-weight: 800; border-radius: 50%; background: linear-gradient(135deg, #6708C7, #D84265); }
.project-brief__helper-mark img { width: 13px; height: 13px; filter: brightness(0) invert(1); }

.project-brief__field { display: block; margin-top: 22px; color: #342E48; font-size: 13px; font-weight: 700; }
.project-brief__field > span { display: block; margin-bottom: 9px; }
.project-brief__field small { color: #8C8799; font-size: 11px; font-weight: 500; }
.project-brief__field > small { display: block; margin-top: 7px; }
.project-brief__field input,
.project-brief__field textarea {
    display: block;
    width: 100%;
    padding: 14px 16px;
    color: #201C38;
    font: 500 14px/1.55 'Manrope', sans-serif;
    outline: none;
    border: 1px solid #DED8E7;
    border-radius: 14px;
    background: #fff;
    resize: vertical;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.project-brief__field textarea { min-height: 126px; }
.project-brief__field input:focus,
.project-brief__field textarea:focus { border-color: #8736BA; box-shadow: 0 0 0 3px rgba(103, 8, 199, .08); }
.project-brief__field.is-invalid input,
.project-brief__consent.is-invalid { border-color: #D84265; }

.project-brief__fieldset { min-width: 0; margin: 25px 0 0; padding: 0; border: 0; }
.project-brief__fieldset legend { width: auto; margin: 0 0 11px; color: #342E48; font-size: 13px; font-weight: 750; }
.project-brief__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.project-brief__options label { position: relative; margin: 0; cursor: pointer; }
.project-brief__options input { position: absolute; opacity: 0; pointer-events: none; }
.project-brief__options span { display: flex; align-items: center; min-height: 48px; padding: 11px 14px; color: #5E5871; font-size: 13px; line-height: 1.35; border: 1px solid #E4DFEB; border-radius: 13px; background: #fff; transition: all .2s ease; }
.project-brief__options span:before { content: ''; flex: 0 0 15px; width: 15px; height: 15px; margin-right: 9px; border: 1px solid #C9C1D3; border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; background: #fff; }
.project-brief__options input:checked + span { color: #542075; border-color: #9D65C5; background: #F8F2FC; }
.project-brief__options input:checked + span:before { border-color: #7C28B2; background: #7C28B2; }
.project-brief__options--contact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-brief__options--contact span { justify-content: center; padding: 10px 8px; }
.project-brief__options--contact span:before { display: none; }

.project-brief__consent { display: flex; gap: 10px; margin-top: 24px; padding: 12px; color: #777184; font-size: 11px; line-height: 1.5; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.project-brief__consent input { flex: 0 0 auto; margin-top: 2px; accent-color: #7921B8; }
.project-brief__honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.project-brief__footer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; flex: 0 0 auto; gap: 14px; padding: 20px 34px 22px; border-top: 1px solid #EAE5EF; background: rgba(255,255,255,.92); }
.project-brief__back,
.project-brief__new { color: #655F74; font: 650 13px 'Manrope', sans-serif; border: 0; background: none; }
.project-brief__back { display: inline-flex; align-items: center; gap: 7px; }
.project-brief__back img { width: 15px; height: 15px; opacity: .65; }
.project-brief__skip { display: inline-flex; align-items: center; justify-content: center; justify-self: center; min-height: 42px; gap: 8px; padding: 9px 13px; color: #655F74; font-size: 11px; line-height: 1.3; text-decoration: none; border: 1px solid #E0D9E9; border-radius: 11px; background: #F5F2F8; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.project-brief__skip:hover { color: #542075; border-color: #CBBBDD; background: #F0EAF6; }
.project-brief__skip img { flex: 0 0 16px; width: 16px; height: 16px; opacity: .7; }
.project-brief__next,
.project-brief__submit {
    min-height: 48px;
    padding: 12px 22px;
    color: #fff;
    font: 700 13px 'Manrope', sans-serif;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #6708C7, #D84265);
    box-shadow: 0 10px 26px rgba(103, 8, 199, .24);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.project-brief__next:hover,
.project-brief__submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(103, 8, 199, .32); }
.project-brief__submit:disabled { opacity: .65; cursor: wait; transform: none; }
.project-brief__next,
.project-brief__submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.project-brief__next img,
.project-brief__submit img { width: 15px; height: 15px; filter: brightness(0) invert(1); }
.project-brief__privacy { grid-column: 1 / -1; margin-top: -4px; color: #918B9D; font-size: 10px; line-height: 1.45; text-align: right; }
.project-brief__error { margin-top: 18px; padding: 12px 14px; color: #A22A4B; font-size: 12px; line-height: 1.5; border: 1px solid rgba(216,66,101,.22); border-radius: 11px; background: rgba(216,66,101,.07); }

.project-brief__success { padding-top: 45px; text-align: center; animation: briefStepIn .4s ease both; }
.project-brief__success .project-brief__lead { margin-right: auto; margin-left: auto; }
.project-brief__success-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto 20px; color: #fff; font-size: 30px; border-radius: 24px; background: linear-gradient(135deg, #6708C7, #D84265); box-shadow: 0 14px 34px rgba(103,8,199,.24); }
.project-brief__success-icon img { width: 31px; height: 31px; filter: brightness(0) invert(1); }
.project-brief__cases { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin-top: 28px; text-align: left; }
.project-brief__case { display: block; min-height: 112px; padding: 18px; color: #302A45; text-decoration: none; border: 1px solid #E4DFEB; border-radius: 17px; background: linear-gradient(145deg, #fff, #F6F1FA); transition: transform .2s ease, border-color .2s ease; }
.project-brief__case:hover { color: #302A45; transform: translateY(-2px); border-color: #AF8BC9; }
.project-brief__case small { display: block; margin-bottom: 8px; color: #8E879C; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.project-brief__case b { display: block; font-size: 14px; line-height: 1.4; }
.project-brief__case span { display: block; margin-top: 11px; color: #7B28B2; font-size: 12px; }
.project-brief__new { margin-top: 25px; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1199px) {
    .project-brief { width: 58vw; min-width: 560px; }
}

@media (max-width: 767px) {
    body.project-brief-open > .content,
    body.project-brief-open > .main-footer { transform: none; }
    .project-brief {
        top: auto;
        width: 100%;
        min-width: 0;
        height: min(94vh, 900px);
        border-radius: 22px 22px 0 0;
        transform: translateY(104%);
    }
    .project-brief.is-open { transform: translateY(0); }
    .project-brief__head { padding: 15px 18px 12px; }
    .project-brief__close { width: 38px; height: 38px; }
    .project-brief__close:before,
    .project-brief__close:after { top: 18px; left: 10px; }
    .project-brief__progress { gap: 7px; padding: 12px 18px; font-size: 10px; }
    .project-brief__progress-item { font-size: 0; }
    .project-brief__progress-item span { font-size: 11px; }
    .project-brief__scroll { padding: 25px 18px 20px; }
    .project-brief h2 { font-size: 28px; }
    .project-brief__lead { margin: 11px 0 22px; font-size: 14px; }
    .project-brief__services { gap: 8px; }
    .project-brief__service { min-height: 66px; padding: 10px; font-size: 12px; border-radius: 14px; }
    .project-brief__service-icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
    .project-brief__options { grid-template-columns: 1fr; }
    .project-brief__options--contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-brief__footer { grid-template-columns: 1fr auto; gap: 10px; padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
    .project-brief__skip { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
    .project-brief__next,
    .project-brief__submit { justify-self: end; }
    .project-brief__privacy { text-align: center; }
}

@media (max-width: 420px) {
    .project-brief__services { grid-template-columns: 1fr; }
    .project-brief__service { min-height: 58px; }
    .project-brief__helper { margin-bottom: 16px; }
    .project-brief__cases { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .project-brief,
    .project-brief-backdrop,
    body > .content,
    body > .main-footer,
    .project-brief__step { transition: none; animation: none; }
}
