.contact-section {
    min-height: 75vh;
    padding: 110px 0 120px;
}

.contact-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(520px, 1.15fr);
    align-items: start;
    gap: 80px;
}

.contact-intro {
    position: sticky;
    top: 125px;
}

.contact-intro h1 {
    margin: 18px 0 28px;
    font-size: clamp(48px, 6vw, 78px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -3px;
}

.contact-description {
    max-width: 620px;
    margin: 0;
    color: var(--muted-color);
    font-size: 18px;
}

.contact-card {
    padding: 36px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow:
        0 22px 60px
        rgb(23 32 28 / 8%);
}

.contact-form-heading {
    margin-bottom: 10px;
}

.contact-form-heading h2,
.contact-success h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.15;
}

.contact-form-heading p,
.contact-success p {
    margin: 10px 0 0;
    color: var(--muted-color);
}

.contact-form {
    display: grid;
    gap: 22px;
}

.contact-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.contact-field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.contact-field label {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 700;
}

.contact-field label span {
    color: var(--accent-color);
}

.contact-field .iti {
    width: 100%;
    direction: ltr;
}

.contact-field .iti__country-selector {
    color: var(--text-color);
    direction: ltr;
}

.contact-field .iti__country-list {
    background: #ffffff;
    border-color: var(--border-color);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgb(23 32 28 / 16%);
}

.contact-field-hint {
    margin: 0;
    color: var(--muted-color);
    font-size: 12px;
}

.contact-field input:not(
    [type="checkbox"]
),
.contact-field select,
.contact-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    background: var(--page-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    font: inherit;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.contact-field textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-field input:hover,
.contact-field select:hover,
.contact-field textarea:hover {
    border-color:
        rgb(155 117 72 / 55%);
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    background: #ffffff;
    border-color: var(--accent-color);
    box-shadow:
        0 0 0 4px
        rgb(155 117 72 / 13%);
}

/* Wrapper carrying the id that aria-describedby points at. The
   parent .contact-field is a grid, so it reproduces the 8px gap the
   individual messages had as direct grid items. */
.contact-field-errors {
    display: grid;
    gap: 8px;
}

.contact-field-error {
    margin: 0;
    color: #a53f34;
    font-size: 13px;
    font-weight: 700;
}

.contact-form-errors {
    padding: 14px 16px;
    background: #fff1ef;
    color: #8b3028;
    border: 1px solid #efc4bf;
    border-radius: 12px;
}

.contact-form-errors ul {
    margin: 0;
    padding-inline-start: 20px;
}

.contact-consent {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 11px;
}

.contact-consent input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--text-color);
}

.contact-consent label {
    color: var(--muted-color);
    font-size: 13px;
}

.contact-consent a {
    color: var(--accent-color);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-submit {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--text-color);
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 180ms ease,
        transform 180ms ease;
}

.contact-submit:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.contact-submit:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.contact-honeypot {
    position: absolute;
    inset-inline-start: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-success {
    min-height: 470px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.contact-success > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 28px;
    background: var(--text-color);
    color: #ffffff;
    border-radius: 50%;
    font-size: 25px;
}

.contact-success a {
    margin-top: 28px;
    color: var(--accent-color);
    font-weight: 700;
}

.contact-success a:hover {
    text-decoration: underline;
}

[dir="rtl"] .contact-intro h1 {
    line-height: 1.25;
    letter-spacing: 0;
}

[dir="rtl"] .contact-form-heading h2,
[dir="rtl"] .contact-success h2 {
    line-height: 1.35;
}

@media (max-width: 1000px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .contact-intro {
        position: static;
    }
}

@media (max-width: 720px) {
    .contact-section {
        padding: 72px 0 85px;
    }

    .contact-intro h1 {
        font-size:
            clamp(46px, 14vw, 66px);
        letter-spacing: -2px;
    }

    .contact-description {
        font-size: 17px;
    }

    .contact-card {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .contact-fields-row {
        grid-template-columns: 1fr;
    }

    .contact-form-heading h2,
    .contact-success h2 {
        font-size: 28px;
    }

    .contact-success {
        min-height: 360px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-field input,
    .contact-field select,
    .contact-field textarea,
    .contact-submit {
        transition: none;
    }
}
