.contact-hero {
    display: flex;
    height: 100vh;
}

body.admin-bar .contact-hero {
    height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .contact-hero {
        height: calc(100vh - 46px);
    }
}

.contact-hero__left {
    position: relative;
    width: 41.6667%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.contact-hero__media-stack {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.contact-hero__media {
    position: absolute;
    inset: 0;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.contact-hero__media.is-hero-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.contact-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.contact-hero__image--mobile {
    display: none;
}

.contact-hero__gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0%, rgba(0, 0, 0, 0) 43%);
}

.contact-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 1.25vw, 29px);
    padding: clamp(120px, 8.333vw, 180px) var(--edge-inset) 0;
}

.contact-hero__label {
    font-size: var(--text-m);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-vanilla-cream);
}

.contact-hero__heading {
    font-size: var(--text-h1);
    font-weight: 500;
    line-height: 1;
    color: var(--color-vanilla-cream);
}

.contact-hero__subtext {
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-vanilla-cream);
    max-width: 34rem;
}

.contact-hero__info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 0.556vw, 13px);
    background: var(--color-dark-green);
    border-bottom: 2px solid rgba(255, 250, 240, 0.0706);
    padding: clamp(20px, 1.389vw, 32px) clamp(16px, 1.111vw, 26px) clamp(20px, 1.389vw, 32px) clamp(24px, 1.667vw, 39px);
}

.contact-hero__info-icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--color-matcha-green);
}

.contact-hero__info-value {
    font-size: var(--text-body);
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-vanilla-cream);
    text-decoration: none;
}

.contact-hero__right {
    flex: 1;
    height: 100%;
    background: var(--color-dark-vanilla);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(8px + 2 * clamp(16px, 1.111vw, 28px) + clamp(35px, 2.431vw, 52px) + clamp(12px, 2vh, 28px)) var(--edge-inset) clamp(16px, 2.5vh, 32px) clamp(50px, 3.472vw, 80px);
    overflow-y: auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 3vh, 36px);
}

.contact-form__panels {
    display: grid;
}

.contact-form__panel {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(18px, 3vh, 36px);
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.contact-form__panel[hidden] {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.contact-form__tabs {
    background: var(--color-dark-green-10);
    border-radius: clamp(11px, 0.972vw, 23px);
    padding: clamp(3px, 0.278vw, 6px);
}

.contact-form__tabs-track {
    display: flex;
    gap: clamp(3px, 0.278vw, 6px);
}

.contact-form__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: clamp(6px, 0.556vw, 13px);
    padding: clamp(8px, 1.2vh, 16px) 0;
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-dark-green-50);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.contact-form__tab.is-active {
    background: var(--color-vanilla-cream);
    color: var(--color-dark-green);
}

.contact-form__heading-group {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.6vh, 8px);
}

.contact-form__heading-group[hidden] {
    display: none;
}

.contact-form__title {
    font-size: var(--text-h3);
    font-weight: 500;
    line-height: 1;
    color: var(--color-dark-green);
}

.contact-form__subtitle {
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.25;
    color: var(--color-dark-green);
}

.contact-form__form {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4.5vh, 44px);
}

.contact-form__form[hidden] {
    display: none;
}

.contact-form__row {
    display: flex;
    gap: clamp(17px, 1.389vw, 32px);
}

.contact-form__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 0.7vh, 10px);
}

.contact-form__field--tema {
    gap: clamp(6px, 1vh, 14px);
}

.contact-form__label {
    font-size: clamp(12px, 0.833vw, 14px);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-dark-green);
}

.contact-form__input {
    width: 100%;
    height: clamp(44px, 7vh, 64px);
    background: transparent;
    border: 2px solid var(--color-dark-green-20);
    border-radius: clamp(11px, 0.972vw, 23px);
    padding: 0 clamp(11px, 0.972vw, 23px);
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--color-dark-green);
}

.contact-form__input::placeholder {
    color: var(--color-dark-green-50);
    font-weight: 400;
}

.contact-form__input:focus {
    outline: none;
    border-color: var(--color-dark-green);
}

.contact-form__input:-webkit-autofill,
.contact-form__input:-webkit-autofill:hover,
.contact-form__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--color-dark-vanilla) inset;
    -webkit-text-fill-color: var(--color-dark-green);
    caret-color: var(--color-dark-green);
    transition: background-color 5000s ease-in-out 0s;
}

.contact-form__chips {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6px, 0.556vw, 13px);
}

.contact-form__chip-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contact-form__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    border: 1.5px solid var(--color-dark-green);
    padding: clamp(6px, 1vh, 11px) clamp(12px, 1.111vw, 26px);
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: 500;
    line-height: 1.25;
    background: var(--color-dark-vanilla);
    color: var(--color-dark-green);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-form__chip-input:checked + .contact-form__chip {
    background: var(--color-dark-green);
    color: var(--color-matcha-green);
}

.contact-form__chip-input:focus-visible + .contact-form__chip {
    outline: 2px solid var(--color-dark-green);
    outline-offset: 2px;
}

.contact-form__textarea {
    width: 100%;
    min-height: clamp(70px, 10vh, 180px);
    background: var(--color-dark-vanilla);
    border: 2px solid var(--color-dark-green-20);
    border-radius: clamp(6px, 0.556vw, 13px);
    padding: clamp(13px, 1.111vw, 26px);
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--color-dark-green);
    resize: vertical;
}

.contact-form__textarea::placeholder {
    color: var(--color-dark-green-50);
    font-weight: 400;
}

.contact-form__textarea:focus {
    outline: none;
    border-color: var(--color-dark-green);
}

.contact-form__submit {
    width: 100%;
    justify-content: center;
    margin-top: clamp(12px, 2.2vh, 22px);
}

.contact-form__submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.contact-form__error {
    display: flex;
    align-items: center;
    gap: clamp(9px, 0.833vw, 16px);
    background: var(--color-error-bg);
    border: 2px solid var(--color-error-border);
    border-radius: clamp(11px, 0.972vw, 18px);
    padding: clamp(9px, 0.833vw, 16px) clamp(11px, 0.972vw, 18px);
}

.contact-form__error[hidden] {
    display: none;
}

.contact-form__error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-error-border);
    color: var(--color-white);
}

.contact-form__error-text {
    font-size: var(--text-m);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-error-text);
}

.contact-hero__right.is-success-active {
    justify-content: center;
    padding-top: clamp(40px, 6vh, 80px);
    padding-bottom: clamp(40px, 6vh, 80px);
}

.contact-form__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(18px, 1.667vw, 39px);
    min-height: 300px;
}

.contact-form__success[hidden] {
    display: none;
}

.contact-form__success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(72px, 6.667vw, 110px);
    height: clamp(72px, 6.667vw, 110px);
    border-radius: 50%;
    background: var(--color-matcha-green);
    color: var(--color-dark-green);
}

.contact-form__success-icon svg {
    width: 45.8%;
    height: 45.8%;
}

.contact-form__success-heading {
    font-size: var(--text-h3);
    font-weight: 500;
    line-height: 1;
    color: var(--color-dark-green);
}

.contact-form__success-text {
    font-size: var(--text-body);
    font-weight: 500;
    line-height: 1.25;
    color: var(--color-dark-green);
}

.contact-form__success-reset {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 1024px) and (orientation: portrait), (max-height: 500px) and (orientation: landscape) {
    .contact-hero {
        flex-direction: column;
        height: auto;
    }

    .contact-hero__left {
        width: 100%;
        height: auto;
    }

    .contact-hero__media-stack {
        flex: none;
        aspect-ratio: 390 / 526;
        height: auto;
    }

    @media (orientation: landscape) and (max-height: 500px) {
        .contact-hero__media-stack {
            aspect-ratio: auto;
            height: 100vh;
        }
    }

    .contact-hero__image--desktop {
        display: none;
    }

    .contact-hero__image--mobile {
        display: block;
    }

    .contact-hero__gradient {
        background: rgba(0, 0, 0, 0.4);
    }

    .contact-hero__overlay {
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: clamp(18px, 4.615vw, 47px);
        padding: 70px var(--edge-inset) 0;
    }

    .contact-hero__subtext {
        max-width: none;
    }

    .contact-hero__info {
        position: static;
        border-bottom: none;
        padding: clamp(16px, 4.231vw, 43px) 0;
    }

    .contact-hero__right {
        height: auto;
        justify-content: flex-start;
        padding: clamp(60px, 15.385vw, 110px) var(--edge-inset) clamp(40px, 8vw, 60px);
    }

    .contact-form__row {
        flex-direction: column;
    }

    .contact-form__panels {
        display: block;
    }

    .contact-form__panel[hidden] {
        display: none;
    }
}

@media (min-width: 1025px) and (max-height: 820px) {
    .contact-hero__right {
        padding-top: 80px;
        padding-bottom: 12px;
    }

    .contact-form,
    .contact-form__panel {
        gap: 14px;
    }

    .contact-form__form {
        gap: 36px;
    }

    .contact-form__heading-group {
        gap: 6px;
    }

    .contact-form__field,
    .contact-form__field--tema {
        gap: 8px;
    }

    .contact-form__tab {
        padding: 8px 0;
    }

    .contact-form__input {
        height: 44px;
    }

    .contact-form__textarea {
        min-height: 52px;
    }

    .contact-form__submit {
        margin-top: 16px;
    }
}
