.contacts-page {
    --contacts-border: rgba(16, 35, 29, 0.13);
    --contacts-border-strong: rgba(16, 35, 29, 0.2);
    --contacts-card: rgba(255, 253, 248, 0.58);
    --contacts-surface: rgba(255, 255, 255, 0.58);
    --contacts-surface-focus: #fffdf8;
    --contacts-error: #a4472f;
    --contacts-success: #1f5a32;

    color: var(--charcoal, #202322);
}

.contacts-page svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contacts-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 26px clamp(22px, 4vw, 56px) 0;
    color: var(--muted-text, #71736d);
    font-size: 12px;
    font-weight: 600;
}

.contacts-breadcrumbs a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contacts-breadcrumbs a:hover {
    color: var(--road-clay, #b66a3c);
}

.contacts-breadcrumbs [aria-current="page"] {
    color: var(--road-clay, #b66a3c);
}

.contacts-kicker {
    margin: 0 0 14px;
    color: var(--road-clay, #b66a3c);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.contacts-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(500px, 1.2fr);
    gap: clamp(32px, 5vw, 76px);
    align-items: center;
    padding: 28px clamp(22px, 4vw, 56px) 30px;
}

.contacts-hero__content {
    min-width: 0;
    padding-bottom: 8px;
}

.contacts-hero h1 {
    margin: 0;
    color: var(--raw-forest, #10231d);
    font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
    font-size: clamp(54px, 5vw, 76px);
    line-height: 0.92;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.contacts-hero__lead {
    max-width: 570px;
    margin: 27px 0 0;
    color: var(--soft-charcoal, #3b403e);
    font-size: 17px;
    line-height: 1.62;
}

.contacts-hero__note {
    max-width: 570px;
    margin: 16px 0 0;
    color: var(--muted-text, #71736d);
    font-size: 14px;
    line-height: 1.55;
}

.contacts-hero__media {
    min-width: 0;
    margin: 0;
}

.contacts-hero__media img {
    width: 100%;
    height: auto !important;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.contacts-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.43fr) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    padding: 0 clamp(22px, 4vw, 56px) 34px;
}

.contacts-info,
.contacts-form-card {
    border: 1px solid var(--contacts-border);
    border-radius: 14px;
    background:
        radial-gradient(circle at 10% 0%, rgba(168, 138, 93, 0.05), transparent 28%),
        var(--contacts-card);
    box-shadow: 0 16px 42px rgba(16, 35, 29, 0.04);
}

.contacts-info {
    display: flex;
    flex-direction: column;
    padding: 28px 27px 26px;
}

.contacts-info h2,
.contacts-form-card > h2 {
    margin: 0;
    color: var(--raw-forest, #10231d);
    font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.contacts-info h2 {
    font-size: clamp(34px, 3vw, 45px);
    line-height: 1;
}

.contacts-info__intro,
.contacts-info__text,
.contacts-info__footer {
    margin: 0;
    color: var(--soft-charcoal, #3b403e);
    font-size: 14px;
    line-height: 1.58;
}

.contacts-info__intro {
    margin-top: 16px;
}

.contacts-info__divider {
    height: 1px;
    margin: 25px 0 23px;
    background: var(--contacts-border);
}

.contacts-info h3 {
    margin: 0 0 13px;
    color: var(--road-clay, #b66a3c);
    font-size: 11px;
    line-height: 1.3;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.contacts-info__list {
    display: grid;
    gap: 18px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.contacts-info__list li {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
}

.contacts-info__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 11px;
    border: 1px solid rgba(182, 106, 60, 0.24);
    border-radius: 50%;
    background: rgba(255, 253, 248, 0.55);
    color: var(--road-clay, #b66a3c);
}

.contacts-info__list small,
.contacts-info__list a {
    display: block;
}

.contacts-info__list small {
    margin-bottom: 2px;
    color: var(--muted-text, #71736d);
    font-size: 12px;
    line-height: 1.3;
}

.contacts-info__list a {
    width: fit-content;
    color: var(--road-clay, #b66a3c);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 750;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contacts-info__list a:hover {
    color: #8e4f2f;
}

.contacts-info__footer {
    margin-top: auto;
    padding-top: 30px;
    color: var(--muted-text, #71736d);
    font-size: 12px;
    line-height: 1.5;
}

.contacts-form-card {
    padding: 28px 30px 30px;
}

.contacts-form-card > h2 {
    margin-bottom: 19px;
    font-size: clamp(32px, 2.7vw, 42px);
    line-height: 1;
}

.contacts-form {
    --contacts-control-border: rgba(16, 35, 29, 0.16);
    --contacts-control-border-focus: rgba(16, 35, 29, 0.58);
}

.contacts-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.contacts-form__field {
    display: block;
    min-width: 0;
}

.contacts-form__field--wide + .contacts-form__field--wide,
.contacts-form__grid + .contacts-form__field--wide {
    margin-top: 15px;
}

.contacts-form__label {
    display: block;
    margin-bottom: 7px;
    color: var(--soft-charcoal, #3b403e);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 650;
}

.contacts-form__label small {
    color: var(--muted-text, #71736d);
    font-weight: 500;
}

.contacts-form__control {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid var(--contacts-control-border);
    border-radius: 8px;
    background: var(--contacts-surface);
    color: var(--charcoal, #202322);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.contacts-form__control::placeholder {
    color: rgba(59, 64, 62, 0.46);
}

.contacts-form__control:focus {
    border-color: var(--contacts-control-border-focus);
    background: var(--contacts-surface-focus);
    box-shadow: 0 0 0 3px rgba(16, 35, 29, 0.08);
}

.contacts-form__control.is-error,
.contacts-form__control[aria-invalid="true"] {
    border-color: var(--contacts-error);
    box-shadow: 0 0 0 3px rgba(164, 71, 47, 0.09);
}

.contacts-form__select {
    appearance: none;
    padding-right: 46px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--road-clay, #b66a3c) 50%),
        linear-gradient(135deg, var(--road-clay, #b66a3c) 50%, transparent 50%);
    background-position:
        calc(100% - 21px) calc(50% - 2px),
        calc(100% - 16px) calc(50% - 2px);
    background-repeat: no-repeat;
    background-size: 5px 5px;
}

.contacts-form__textarea {
    min-height: 118px;
    padding: 12px 14px;
    line-height: 1.55;
    resize: vertical;
}

.contacts-upload {
    position: relative;
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 64px;
    padding: 13px 16px;
    border: 1px dashed rgba(16, 35, 29, 0.22);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.36);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.contacts-upload:hover {
    border-color: rgba(182, 106, 60, 0.48);
    background: rgba(255, 253, 248, 0.7);
}

.contacts-upload:focus-within {
    border-color: rgba(16, 35, 29, 0.58);
    box-shadow: 0 0 0 3px rgba(16, 35, 29, 0.08);
}

.contacts-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.contacts-upload__icon {
    width: 31px;
    height: 31px;
    color: #7c725f;
}

.contacts-upload__content strong,
.contacts-upload__content small {
    display: block;
}

.contacts-upload__content strong {
    color: var(--soft-charcoal, #3b403e);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.contacts-upload__content small {
    margin-top: 4px;
    color: var(--muted-text, #71736d);
    font-size: 11px;
    line-height: 1.4;
}

.contacts-form__agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    color: var(--soft-charcoal, #3b403e);
    font-size: 13px;
    line-height: 1.5;
}

.contacts-form__agree input {
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    flex: 0 0 auto;
    accent-color: var(--raw-forest, #10231d);
}

.contacts-form__agree a {
    color: var(--road-clay, #b66a3c);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.contacts-form__agree a:hover {
    color: #8e4f2f;
}

.contacts-form__footer {
    display: grid;
    grid-template-columns: minmax(300px, auto) minmax(210px, 260px);
    gap: 22px;
    align-items: end;
    margin-top: 18px;
}

.contacts-form__captcha {
    min-width: 0;
    min-height: 100px;
}

.contacts-form__captcha-placeholder {
    position: relative;
    width: 300px;
    max-width: 100%;
    height: 76px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: 12px;
    align-items: center;
    padding: 12px 74px 9px 12px;
    border: 1px solid rgba(16, 35, 29, 0.14);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.66);
    color: var(--charcoal, #202322);
}

.contacts-form__captcha-placeholder::after {
    content: "SC";
    position: absolute;
    top: 13px;
    right: 18px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(111, 133, 136, 0.16);
    color: var(--fog-blue, #6f8588);
    font-size: 11px;
    font-weight: 800;
}

.contacts-form__captcha-placeholder > span {
    grid-row: 1 / 3;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(16, 35, 29, 0.28);
    background: #fff;
}

.contacts-form__captcha-placeholder strong {
    align-self: end;
    font-size: 13px;
    line-height: 1.2;
}

.contacts-form__captcha-placeholder small {
    align-self: start;
    color: var(--muted-text, #71736d);
    font-size: 9px;
    line-height: 1.2;
}

.contacts-form__submit {
    width: 100%;
    min-height: 48px;
    border-radius: 8px;
}

.contacts-form__message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.contacts-form__message[hidden] {
    display: none !important;
}

.contacts-form__message.is-success {
    border: 1px solid rgba(31, 90, 50, 0.2);
    background: rgba(31, 90, 50, 0.07);
    color: var(--contacts-success);
}

.contacts-form__message.is-error {
    border: 1px solid rgba(164, 71, 47, 0.2);
    background: rgba(164, 71, 47, 0.07);
    color: var(--contacts-error);
}

@media (max-width: 1180px) {
    .contacts-hero {
        grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
        gap: 34px;
    }

    .contacts-layout {
        grid-template-columns: minmax(300px, 0.4fr) minmax(0, 1fr);
    }

    .contacts-form-card {
        padding-inline: 25px;
    }
}

@media (max-width: 920px) {
    .contacts-breadcrumbs {
        padding: 18px 18px 0;
        font-size: 11px;
    }

    .contacts-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 24px 18px 25px;
    }

    .contacts-hero h1 {
        font-size: clamp(48px, 10vw, 64px);
    }

    .contacts-hero__lead {
        max-width: 720px;
        margin-top: 20px;
        font-size: 15px;
    }

    .contacts-hero__note {
        max-width: 720px;
        font-size: 13px;
    }

    .contacts-hero__media {
        max-width: 760px;
    }

    .contacts-layout {
        grid-template-columns: 1fr;
        padding: 0 18px 28px;
    }

    .contacts-info,
    .contacts-form-card {
        padding: 24px;
    }

    .contacts-info__footer {
        margin-top: 24px;
    }
}

@media (max-width: 720px) {
    .contacts-kicker {
        margin-bottom: 10px;
        font-size: 11px;
    }

    .contacts-hero h1 {
        font-size: 48px;
    }

    .contacts-info h2,
    .contacts-form-card > h2 {
        font-size: 34px;
    }

    .contacts-form__grid,
    .contacts-form__footer {
        grid-template-columns: 1fr;
    }

    .contacts-form__footer {
        gap: 14px;
    }

    .contacts-form__captcha {
        overflow: hidden;
    }

    .contacts-form__submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .contacts-hero {
        padding-bottom: 20px;
    }

    .contacts-hero h1 {
        font-size: 42px;
    }

    .contacts-hero__lead {
        font-size: 14px;
        line-height: 1.58;
    }

    .contacts-hero__note {
        font-size: 12px;
    }

    .contacts-layout {
        gap: 12px;
    }

    .contacts-info,
    .contacts-form-card {
        padding: 20px 17px;
        border-radius: 12px;
    }

    .contacts-info h2,
    .contacts-form-card > h2 {
        font-size: 31px;
    }

    .contacts-info__list li {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .contacts-info__icon {
        width: 40px;
        height: 40px;
        padding: 10px;
    }

    .contacts-form__control {
        font-size: 13px;
    }

    .contacts-upload {
        grid-template-columns: 29px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .contacts-upload__icon {
        width: 27px;
        height: 27px;
    }

    .contacts-form__captcha-placeholder {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contacts-page *,
    .contacts-page *::before,
    .contacts-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


.contacts-form__honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.contacts-upload.is-error {
    border-color: var(--contacts-error, #a4472f);
    box-shadow: 0 0 0 3px rgba(164, 71, 47, 0.09);
}

.contacts-form__submit.is-loading,
.contacts-form__submit:disabled {
    opacity: 0.68;
    cursor: wait;
    transform: none;
}


/* Состояния загрузки файла на странице контактов */
.contacts-upload.is-dragover {
    border-color: var(--road-clay, #b66a3c);
    background: rgba(182, 106, 60, 0.08);
    box-shadow: 0 0 0 4px rgba(182, 106, 60, 0.10);
}

.contacts-upload.has-file {
    border-style: solid;
    border-color: rgba(31, 90, 50, 0.32);
    background: rgba(31, 90, 50, 0.055);
}

.contacts-upload.has-file .contacts-upload__icon {
    color: var(--contacts-success, #1f5a32);
}

.contacts-upload__remove {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--road-clay, #b66a3c);
    font: inherit;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 750;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.contacts-upload__remove:hover {
    color: #8e4f2f;
}

.contacts-upload__remove[hidden] {
    display: none !important;
}


/* Прогресс отправки вложения */
.contacts-form__progress {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 13px 15px;
    border: 1px solid rgba(58, 31, 24, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.48);
}

.contacts-form__progress[hidden] {
    display: none !important;
}

.contacts-form__progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--raw-forest, #10231d);
    font-size: 13px;
    line-height: 1.4;
}

.contacts-form__progress-head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contacts-form__progress-head strong {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.contacts-form__progress-track {
    position: relative;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(16, 35, 29, 0.12);
}

.contacts-form__progress-track span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: var(--road-clay, #b66a3c);
    transition: width 0.16s linear;
}


/* Серверная обработка после завершения передачи файла */
.contacts-form__progress.is-processing .contacts-form__progress-track {
    overflow: hidden;
}

.contacts-form__progress.is-processing .contacts-form__progress-track span {
    width: 38%;
    animation: contacts-progress-processing 1.1s ease-in-out infinite;
}

@keyframes contacts-progress-processing {
    0% {
        left: -38%;
    }

    55% {
        left: 46%;
    }

    100% {
        left: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contacts-form__progress.is-processing .contacts-form__progress-track span {
        width: 100%;
        animation: none;
        opacity: 0.55;
    }
}


/*
 * После передачи файла процент больше не вычисляется:
 * xhr.upload отслеживает только браузер -> сервер.
 * На серверной стадии показываем статический статус без псевдопрогресса.
 */
.contacts-form__progress.is-processing {
    padding-block: 15px;
}

.contacts-form__progress.is-processing .contacts-form__progress-head {
    justify-content: flex-start;
}

.contacts-form__progress.is-processing .contacts-form__progress-track {
    display: none !important;
}

.contacts-form__progress.is-processing .contacts-form__progress-track span {
    animation: none !important;
}
