/* ---------- Контакты ---------- */
.yg-contacts {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: 'main request' 'where request';
    gap: var(--yg-space-5) clamp(32px, 5vw, 80px);
    align-items: start;
}

.yg-contacts__main { grid-area: main; }
.yg-contacts__request { grid-area: request; container-type: inline-size; }
.yg-contacts__aside { grid-area: where; }

.yg-contacts__main > h2 {
    margin: 0 0 var(--yg-space-4);
}

.yg-contacts__jump {
    margin: var(--yg-space-3) 0 0;
}

.yg-contacts__request .yg-form {
    margin: 0;
    scroll-margin-top: calc(var(--yg-header-h) + var(--yg-space-4));
    padding: clamp(16px, 3.2vw, 48px);
    border-top: 2px solid #243060;
}

.yg-contacts__request .yg-field,
.yg-contacts__request .yg-fieldset,
.yg-contacts__value,
.yg-where__row a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.yg-contacts__request .yg-fieldset__grid {
    gap: var(--yg-space-3) var(--yg-space-4);
}

.yg-contacts__request .yg-field__control > :is(input, textarea) {
    padding: var(--yg-space-2) var(--yg-space-3);
}

.yg-contacts__request .yg-field__control > input:not([type="file"]) {
    height: 44px;
}

.yg-contacts__request textarea {
    resize: vertical;
}

@media (min-width: 641px) {
    @container (min-width: 451px) {
        .yg-contacts__request .yg-field--half {
            display: grid;
            grid-row: span 2;
            grid-template-rows: subgrid;
            row-gap: var(--yg-space-1);
        }

        .yg-contacts__request .yg-field--half > label {
            margin-bottom: 0;
        }
    }
}

@container (max-width: 450px) {
    .yg-contacts__request .yg-fieldset__grid > .yg-field--half {
        grid-column: 1 / -1;
    }
}

/*
 * Контакты разведены линиями, как таблица характеристик: адрес,
 * кому он принадлежит и для чего — три строки одной записи.
 */
.yg-contacts__list {
    list-style: none;
    margin: 0 0 var(--yg-space-5);
    padding: 0;
    max-width: none;
    border-top: 1px solid var(--yg-line);
}

.yg-contacts__item {
    padding: var(--yg-space-3) 0;
    border-bottom: 1px solid var(--yg-line);
}

.yg-contacts__label {
    display: block;
    font-size: var(--yg-text-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--yg-ink-2);
    margin-bottom: var(--yg-space-2);
}

.yg-contacts__value {
    display: inline-block;
    font-size: var(--yg-text-xl);
    font-weight: 400;
    letter-spacing: -.015em;
    color: var(--yg-ink);
    text-decoration: none;
    border-bottom: 1px solid var(--yg-brand);
    padding-bottom: 2px;
}

.yg-contacts__value:hover {
    color: var(--yg-blue-ink);
    border-bottom-color: var(--yg-blue);
}

.yg-contacts__purpose {
    display: block;
    font-size: var(--yg-text-sm);
    color: var(--yg-ink-2);
    margin-top: var(--yg-space-2);
}

/* ---------- Что приложить к письму ---------- */
.yg-brief {
    background: var(--yg-surface);
    padding: clamp(16px, 2.5vw, 32px);
}

.yg-brief h2 {
    font-size: var(--yg-text-xl);
    margin-top: 0;
}

.yg-brief ul {
    padding-left: 1.3em;
}

.yg-brief li + li {
    margin-top: var(--yg-space-1);
}

.yg-brief__hint {
    margin-bottom: 0;
    padding-top: var(--yg-space-3);
    border-top: 1px solid var(--yg-line);
}

/* ---------- Где мы ---------- */
.yg-where {
    border: 1px solid var(--yg-line);
    padding: var(--yg-space-5);
}

.yg-where__title {
    font-size: var(--yg-text-xs);
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--yg-ink-2);
    margin: 0 0 var(--yg-space-4);
    padding-bottom: var(--yg-space-2);
    border-bottom: 1px solid var(--yg-line);
}

.yg-where__legal {
    font-size: var(--yg-text-lg);
    font-weight: 400;
    margin-bottom: var(--yg-space-4);
}

.yg-where__row {
    margin-bottom: var(--yg-space-4);
    font-size: var(--yg-text-sm);
    line-height: 1.5;
}

.yg-where__row:last-child {
    margin-bottom: 0;
}

.yg-contacts__aside .yg-prose {
    font-size: var(--yg-text-sm);
    margin-top: var(--yg-space-4);
}

@media (max-width: 860px) {
    .yg-contacts {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas: 'main' 'request' 'where';
    }
}

/* ---------- Направления ---------- */
.yg-service__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: var(--yg-space-6);
    align-items: start;
}

.yg-service__aside {
    position: sticky;
    top: calc(var(--yg-header-h) + var(--yg-space-3));
}

.yg-service__aside-title {
    font-size: var(--yg-text-xs);
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--yg-ink-2);
    padding-bottom: var(--yg-space-2);
    border-bottom: 1px solid var(--yg-line);
    margin: 0 0 var(--yg-space-2);
}

.yg-service__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: none;
}

.yg-service__list li {
    border-bottom: 1px solid var(--yg-line);
}

.yg-service__list a {
    display: block;
    padding: var(--yg-space-3) 0;
    color: var(--yg-ink);
    text-decoration: none;
    font-size: var(--yg-text-sm);
}

.yg-service__list a:hover {
    color: var(--yg-blue-ink);
}

/* ---------- Узкие экраны ---------- */
@media (max-width: 900px) {
    .yg-service__grid {
        grid-template-columns: 1fr;
        gap: var(--yg-space-5);
    }

    .yg-service__aside {
        position: static;
    }
}
