.page-contact {
    --contact-charcoal: var(--color-primary-dark);
    --contact-warm: var(--color-warm-light);
    --contact-gold: var(--color-accent-on-light);
    --contact-muted: rgba(244, 240, 227, 0.72);
    --contact-dark-muted: rgba(44, 44, 44, 0.68);
    --contact-line: rgba(44, 44, 44, 0.12);

    scroll-behavior: smooth;
    background: var(--contact-warm);
    color: var(--contact-charcoal);
    --contact-form-surface: #FFFFFF;
}

.contact-main {
    overflow: hidden;
}

.contact-eyebrow {
    margin: 0 0 0.9rem;
    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(189, 173, 123, 0.88);
}

.contact-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(28rem, 56vw, 40rem);
    display: grid;
    align-items: center;
    padding: clamp(4rem, 11vw, 7.5rem) clamp(1.25rem, 5vw, 3rem);
    background: var(--contact-charcoal);
    color: var(--contact-warm);
    /* Desktop: centered cover crop (no offset) */
    --contact-video-focal-x: 0%;
    --contact-video-focal-y: 0%;
    --contact-video-scale: 1;
}

/* Background media — inset wrapper + 16:9 cover (same technique as .hero__video) */
.contact-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    container-type: size;
}

/*
 * Cover-fit 16:9 Vimeo iframe inside the hero padding box.
 * Wrapper keeps 16:9 so the player never letterboxes; overflow clips edges.
 * (object-fit: cover applies to <video>; iframes use this oversize pattern.)
 */
.contact-hero__video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100cqw, calc(100cqh * 16 / 9));
    height: max(100cqh, calc(100cqw * 9 / 16));
    transform:
        translate(-50%, -50%)
        translate(var(--contact-video-focal-x), var(--contact-video-focal-y))
        scale(var(--contact-video-scale));
    transform-origin: center center;
    pointer-events: none;
    overflow: hidden;
}

.contact-hero__video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Fallback when container queries are unavailable */
@supports not (width: 100cqw) {
    .contact-hero__video {
        width: 100vw;
        height: 56.25vw;
        min-height: 100%;
        min-width: calc(100% * 16 / 9);
    }
}

/*
 * Mobile / tablet focal point — reframes the cover crop independently from desktop.
 * Negative X reveals the right-side portraits; positive Y lifts faces above text.
 */
@media (max-width: 767px) {
    .contact-hero {
        --contact-video-focal-x: -7%;
        --contact-video-focal-y: 5%;
        --contact-video-scale: 1.08;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        --contact-video-focal-x: -10%;
        --contact-video-focal-y: 10%;
        --contact-video-scale: 1.16;
    }
}

@media (max-width: 430px) {
    .contact-hero {
        --contact-video-focal-x: -12%;
        --contact-video-focal-y: 12%;
        --contact-video-scale: 1.2;
    }
}

.contact-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(44, 44, 44, 0.58) 0%,
            rgba(44, 44, 44, 0.4) 38%,
            rgba(44, 44, 44, 0.62) 100%
        ),
        radial-gradient(
            ellipse 90% 75% at 50% 42%,
            rgba(44, 44, 44, 0.28),
            rgba(44, 44, 44, 0.72) 100%
        );
}

.contact-hero--reduced-motion {
    background:
        radial-gradient(circle at 82% 24%, rgba(189, 173, 123, 0.16), transparent 22rem),
        linear-gradient(135deg, rgba(44, 44, 44, 0.98) 0%, rgba(44, 44, 44, 0.92) 52%, rgba(32, 32, 32, 0.98) 100%);
}

.contact-hero--reduced-motion .contact-hero__bg {
    display: none;
}

.contact-hero__inner {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    margin-inline: auto;
    text-align: center;
}

.contact-hero__title {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(3rem, 8vw, 6.2rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.contact-hero__text {
    max-width: 42rem;
    margin: clamp(1.25rem, 3vw, 1.8rem) auto 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    line-height: 1.75;
    color: var(--contact-muted);
}

.contact-compose {
    padding: clamp(2.15rem, 5vw, 3.35rem) clamp(1.25rem, 5vw, 3rem) 0;
    background: var(--contact-warm);
}

.contact-compose__inner {
    width: min(1120px, 100%);
    margin-inline: auto;
}

.contact-compose__intro {
    max-width: 40.5rem;
    margin: 0 0 clamp(1.65rem, 3.6vw, 2.35rem);
}

.contact-compose__intro p {
    margin: 0;
    font-size: clamp(1.02rem, 1.7vw, 1.12rem);
    font-weight: 300;
    line-height: 1.72;
    color: var(--contact-dark-muted);
}

.contact-compose__intro p + p {
    margin-top: 0.9rem;
}

.contact-compose__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(21rem, 1.12fr);
    gap: clamp(2rem, 5vw, 4.25rem);
    align-items: start;
    padding-bottom: clamp(2.35rem, 5.5vw, 3.75rem);
}

.contact-compose__copy {
    padding-top: 0.35rem;
}

.contact-compose__copy .contact-eyebrow {
    color: var(--color-accent-on-light);
    margin-bottom: 0.7rem;
}

.contact-compose__title {
    margin: 0;
    max-width: 13ch;
    font-family: var(--font-body);
    font-size: clamp(2rem, 4.4vw, 3.15rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--contact-charcoal);
    text-wrap: balance;
}

.contact-compose__text {
    margin: clamp(1rem, 2.4vw, 1.35rem) 0 0;
    max-width: 28rem;
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--contact-dark-muted);
}

.contact-note {
    max-width: 26rem;
    margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
    padding-top: 1.05rem;
    border-top: 1px solid rgba(189, 173, 123, 0.55);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.65;
    color: var(--contact-dark-muted);
}

.contact-form {
    position: relative;
    display: grid;
    gap: 1.05rem;
    padding: clamp(1.35rem, 3.2vw, 2rem) clamp(1.25rem, 3vw, 1.85rem);
    background: var(--contact-form-surface);
    border: 0;
    border-top: 2px solid rgba(189, 173, 123, 0.62);
    border-radius: 0;
    box-shadow: none;
}

#contact-form {
    scroll-margin-top: calc(var(--header-height) + 0.85rem);
}

.contact-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-field {
    display: grid;
    gap: 0.45rem;
}

.contact-field > label {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--contact-charcoal);
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    border: 1px solid rgba(44, 44, 44, 0.18);
    border-radius: 0.2rem;
    background: #fff;
    color: var(--contact-charcoal);
    font: inherit;
    font-weight: 300;
    transition:
        border-color 180ms var(--ease),
        box-shadow 180ms var(--ease),
        background-color 180ms var(--ease);
}

.contact-field input {
    min-height: 3rem;
    height: 3rem;
    padding: 0 0.9rem;
}

.contact-field textarea {
    min-height: 9.25rem;
    max-height: 16rem;
    height: auto;
    resize: vertical;
    padding: 0.85rem 0.9rem;
    line-height: 1.65;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: var(--color-text-muted-on-light);
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: rgba(189, 173, 123, 0.72);
    background: var(--color-warm-light);
    box-shadow: 0 0 0 3px rgba(189, 173, 123, 0.28);
}

.contact-field input[aria-invalid="true"],
.contact-field textarea[aria-invalid="true"] {
    border-color: #6b2d2d;
}

.contact-field input[aria-invalid="true"]:focus,
.contact-field textarea[aria-invalid="true"]:focus {
    border-color: #6b2d2d;
    box-shadow: 0 0 0 3px rgba(107, 45, 45, 0.22);
}

.contact-field__error {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.45;
    color: #6b2d2d;
}

.contact-field__error:empty {
    display: none;
}

.contact-form__submit {
    justify-self: start;
    margin-top: 0.35rem;
}

.contact-form__submit:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.form-status {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.55;
    max-width: 40rem;
}

.form-status:empty {
    display: none;
}

.form-status.is-success,
.form-status.is-error {
    padding: 0.7rem 0.85rem;
    border-radius: 0;
    background: var(--color-warm-light);
}

.form-status.is-success {
    color: var(--contact-charcoal);
    border-left: 3px solid var(--contact-gold);
}

.form-status.is-error {
    color: #5c1f1f;
    border-left: 3px solid #6b2d2d;
}

.contact-paths {
    position: relative;
    padding: clamp(2.85rem, 6.5vw, 4.35rem) clamp(1.25rem, 5vw, 3rem);
    color: var(--contact-warm);
    background:
        linear-gradient(180deg, rgba(244, 240, 227, 0.16) 0%, rgba(244, 240, 227, 0) 4.75rem),
        linear-gradient(180deg, #32302c 0%, var(--contact-charcoal) 22%, var(--contact-charcoal) 100%);
    border-top: 1px solid rgba(189, 173, 123, 0.34);
}

.contact-paths__inner {
    width: min(1120px, 100%);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.contact-path {
    display: grid;
    align-content: start;
    gap: 0.7rem;
    padding: 0.15rem clamp(1.35rem, 2.8vw, 2.15rem);
}

.contact-path:first-child {
    padding-left: 0;
}

.contact-path:last-child {
    padding-right: 0;
}

.contact-path + .contact-path {
    border-left: 1px solid rgba(189, 173, 123, 0.28);
}

.contact-path__title {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--contact-warm);
}

.contact-path__text {
    margin: 0;
    max-width: 22rem;
    font-size: 0.98rem;
    font-weight: 300;
    line-height: 1.62;
    color: rgba(244, 240, 227, 0.72);
}

.contact-path__link {
    justify-self: start;
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(189, 173, 123, 0.42);
    padding-bottom: 0.08rem;
}

.contact-path__link:hover,
.contact-path__link:focus-visible {
    color: var(--color-illuminate-on-dark);
    border-bottom-color: var(--color-illuminate-on-dark);
    outline: none;
}

.contact-path__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .contact-compose__layout {
        grid-template-columns: 1fr;
        gap: 1.65rem;
    }

    .contact-compose__title,
    .contact-compose__text,
    .contact-note {
        max-width: none;
    }

    .contact-paths__inner {
        grid-template-columns: 1fr;
    }

    .contact-path,
    .contact-path:first-child,
    .contact-path:last-child {
        padding: 1.35rem 0;
    }

    .contact-path + .contact-path {
        border-left: 0;
        border-top: 1px solid rgba(189, 173, 123, 0.28);
    }

    .contact-hero__scrim {
        background:
            linear-gradient(
                180deg,
                rgba(44, 44, 44, 0.64) 0%,
                rgba(44, 44, 44, 0.48) 42%,
                rgba(44, 44, 44, 0.68) 100%
            ),
            radial-gradient(
                ellipse 100% 80% at 50% 44%,
                rgba(44, 44, 44, 0.34),
                rgba(44, 44, 44, 0.78) 100%
            );
    }
}

@media (max-width: 620px) {
    .contact-hero {
        min-height: clamp(25rem, 82vh, 34rem);
        padding-block: clamp(3.75rem, 14vw, 5.5rem);
    }

    .contact-hero__scrim {
        background:
            linear-gradient(
                180deg,
                rgba(44, 44, 44, 0.7) 0%,
                rgba(44, 44, 44, 0.56) 40%,
                rgba(44, 44, 44, 0.74) 100%
            ),
            radial-gradient(
                ellipse 95% 72% at 50% 46%,
                rgba(44, 44, 44, 0.42),
                rgba(44, 44, 44, 0.84) 100%
            );
    }

    .contact-form__grid {
        grid-template-columns: 1fr;
    }

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