.contacts-section {
    margin-top: 0;
    padding-block: clamp(34px, 5vw, 70px);
}

.page-contacts .page-shell {
    padding-bottom: 0;
}

.contacts-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.84fr) minmax(360px, 1.16fr);
    gap: clamp(22px, 4vw, 42px);
    align-items: start;
    overflow: hidden;
    padding: clamp(26px, 4.5vw, 48px);
    border-radius: 40px 28px 40px 24px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 247, 0.9);
    box-shadow: var(--shadow-card);
}

.contacts-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: rgba(255, 255, 255, 0.62);
}

.contacts-card__lead {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: start;
    gap: 22px;
}

.contacts-card__title {
    max-width: 16ch;
    color: var(--ink);
    font-size: clamp(1.65rem, 2.4vw, 2.3rem);
}

.contacts-card__lead p {
    max-width: 54ch;
    color: var(--ink-muted);
}

.contact-channel__icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.contact-channel__content span {
    display: block;
    margin-bottom: 3px;
    color: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.68;
}

.contact-channel__content strong {
    display: block;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.18;
}

.contact-channel__content strong {
    font-size: clamp(1.02rem, 0.65vw + 0.86rem, 1.22rem);
}

.contacts-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.contact-channel {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 92px;
    overflow: hidden;
    padding: 18px 20px;
    border-radius: 24px 18px 24px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 247, 0.82);
    color: var(--ink);
    box-shadow: 0 16px 34px rgba(32, 23, 16, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.contact-channel::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: rgba(255, 255, 255, 0.62);
}

a.contact-channel:hover {
    color: var(--ink);
    transform: translateY(-4px);
    border-color: rgba(32, 23, 16, 0.16);
    box-shadow: 0 24px 46px rgba(32, 23, 16, 0.13);
}

.contact-channel--muted {
    background: rgba(244, 234, 222, 0.78);
}

.contact-channel__icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--resin-deep);
}

.contact-channel svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 980px) {
    .contacts-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .contacts-card {
        border-radius: 28px 20px 28px 18px;
    }

    .contact-channel {
        min-height: auto;
    }
}

/* Персонаж вместо векторной заглушки в шапке контактов — как в шапке портфолио.
   Картинка почти квадратная, поэтому ширина меньше, чтобы высота
   не выбивалась из персонажей на соседних страницах (~320px / ~280px). */
.page-contacts .page-intro__visual--person {
    width: min(100%, 370px);
    aspect-ratio: 1354 / 1162;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.page-contacts .page-intro__visual--person::after {
    content: none;
}

.page-contacts .page-intro__visual--person img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 26px 38px rgba(0, 0, 0, 0.38));
}

@media (max-width: 820px) {
    .page-contacts .page-intro__visual--person {
        justify-self: center;
        width: min(77%, 324px);
    }
}
