/* Contact page: notched hero, image-backed inquiry and office map. */

.contact-page {
    overflow: hidden;
    background: var(--night-950);
}

/* Notched image stage, consistent with the About page's geometry. */
.cr-hero {
    padding: 122px 0 0;
    background: var(--night-950);
}

.cr-hero__shell { position: relative; }
.cr-hero__clip-defs { position: absolute; }

.cr-hero__visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(390px, 37vw, 520px);
    overflow: hidden;
    border-radius: var(--radius-lg);
    clip-path: polygon(7% 0, 100% 0, 100% 70%, 96% 70%, 96% 100%, 19% 100%, 19% 87%, 0 87%, 0 12%, 5% 12%);
    clip-path: url(#contact-hero-clip);
    background: var(--signal-700);
}

.cr-hero__visual > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

.cr-hero__visual::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(5, 7, 11, .24), rgba(5, 7, 11, .08) 55%, rgba(5, 7, 11, .2));
    pointer-events: none;
}

.cr-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--white);
    font-size: clamp(3.5rem, 6.1vw, 6.3rem);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: 1;
    text-align: center;
    text-wrap: balance;
}

.cr-hero__vertical {
    position: absolute;
    z-index: 1;
    right: 7%;
    bottom: 7%;
    color: transparent;
    font-size: clamp(2.5rem, 4.2vw, 4.6rem);
    font-weight: 600;
    letter-spacing: -.06em;
    line-height: 1;
    text-orientation: mixed;
    white-space: nowrap;
    writing-mode: vertical-rl;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .66);
}

.cr-hero__breadcrumb {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    left: var(--margin);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mist-300);
    font-size: 12px;
}

.cr-hero__breadcrumb a { color: var(--white); text-decoration: none; }
.cr-hero__breadcrumb a:hover { color: var(--ice-300); }
.cr-hero__breadcrumb > span:first-of-type { color: var(--ice-300); }

/* The shared inquiry renderer keeps the existing form intact. */
.contact-page .project-inquiry {
    padding: 130px 0 75px;
    background:
        linear-gradient(180deg, rgba(5, 10, 23, .1) 0%, rgba(5, 10, 23, .2) 48%, rgba(5, 10, 23, .72) 100%),
        url("../inquiry-form-background.webp") center center / clamp(980px, 76vw, 1320px) auto no-repeat,
        var(--night-950);
}

.contact-page .project-inquiry-inner {
    grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr);
    gap: clamp(70px, 8vw, 140px);
}

.contact-page .project-inquiry-content {
    position: relative;
    isolation: isolate;
    padding-top: 32px;
}

.cr-story__kicker {
    margin: 0;
    color: var(--ice-300);
    font: 500 11px/1.5 var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.contact-page .project-inquiry-content h2 {
    max-width: 13ch;
    margin: 30px 0 28px;
    color: var(--white);
    font-size: clamp(3.1rem, 4.5vw, 5.3rem);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: 1.06;
    text-wrap: balance;
}

.cr-story__lede {
    max-width: 49ch;
    color: var(--mist-300);
    font-size: var(--text-body-l);
    line-height: 1.65;
}

.cr-story__lede { margin: 0; }

.cr-story__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 28px;
    margin-top: 78px;
    padding: clamp(24px, 2.3vw, 36px);
    border: 1px solid rgba(214, 234, 255, .38);
    border-top-color: rgba(238, 247, 255, .58);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(29, 53, 95, .68), rgba(5, 16, 38, .76));
    box-shadow: 0 24px 70px rgba(0, 7, 24, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    backdrop-filter: blur(22px) saturate(1.2);
}

.cr-story__detail { min-width: 0; }
.cr-story__detail h3 {
    margin: 0 0 17px;
    color: var(--white);
    font-size: 1.12rem;
    font-weight: 500;
}

.cr-story__detail a,
.cr-story__detail span,
.cr-story__detail small {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 7px;
    color: rgba(238, 244, 255, .9);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.cr-story__detail a:hover,
.cr-story__detail a:focus-visible { color: var(--ice-300); }
.cr-story__detail .cr-story__sub-link { margin-top: 12px; color: var(--ice-300); font-size: 12px; }
.cr-story__office + .cr-story__office { margin-top: 14px; }
.cr-story__office small { color: var(--mist-300); font-size: 12px; }
.cr-story__socials { display: flex; flex-wrap: wrap; gap: 3px 15px; }

.cr-story__hours {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-top: 60px;
    padding-top: 22px;
    border-top: 1px solid var(--rule);
}

.cr-story__hours span {
    flex: 0 0 auto;
    color: var(--ice-300);
    font: 500 11px/1.5 var(--font-mono);
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cr-story__hours p { margin: 0; color: var(--mist-300); font-size: 13px; line-height: 1.5; }

.contact-page .project-inquiry-card {
    --surface: rgba(8, 18, 38, .48);
    --border: rgba(189, 218, 255, .25);
    --border-strong: rgba(189, 218, 255, .34);
    padding: clamp(34px, 4.5vw, 68px);
    border: 1px solid rgba(214, 234, 255, .38);
    border-top-color: rgba(238, 247, 255, .58);
    border-left-color: rgba(226, 241, 255, .46);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(140deg, rgba(200, 229, 255, .18), rgba(42, 86, 150, .11) 34%, rgba(5, 17, 42, .3)),
        rgba(10, 26, 56, .56);
    box-shadow: 0 35px 95px rgba(0, 7, 24, .38), inset 0 1px 0 rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(26px) saturate(1.3);
    backdrop-filter: blur(26px) saturate(1.3);
}

.contact-page .project-inquiry-check-grid label {
    background: rgba(8, 18, 38, .35);
}

.contact-page .project-inquiry-card h3 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: clamp(1.7rem, 2.3vw, 2.3rem);
    font-weight: 500;
    letter-spacing: -.04em;
}

.contact-page .project-inquiry-card-description { color: var(--mist-300); }

/* A real office map occupies the reference's full-width pause. */
.cr-map { padding: 20px 0 60px; background: var(--night-950); }

.cr-map__frame {
    position: relative;
    min-height: 455px;
    overflow: hidden;
    border: 1px solid rgba(169, 199, 255, .18);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 58% 48%, rgba(36, 118, 255, .36), transparent 55%),
        var(--slate-850);
}

.cr-map__frame iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) invert(.88) hue-rotate(180deg) contrast(.92) brightness(.84);
}

.cr-map__frame::after {
    position: absolute;
    inset: 60% 0 0;
    content: "";
    background: linear-gradient(180deg, transparent, rgba(5, 7, 11, .48));
    pointer-events: none;
}

.cr-map__caption {
    position: absolute;
    z-index: 1;
    bottom: 24px;
    left: 24px;
    width: min(calc(100% - 48px), 460px);
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 26px;
    border: 1px solid rgba(169, 199, 255, .24);
    border-radius: var(--radius-md);
    background: rgba(8, 17, 33, .84);
    backdrop-filter: blur(18px);
}

.cr-map__eyebrow { margin: 0 0 6px; color: var(--ice-300); font: 500 10px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.cr-map__caption h2 { margin: 0; color: var(--white); font-size: clamp(1.45rem, 2.1vw, 2rem); font-weight: 500; letter-spacing: -.03em; }
.cr-map__caption a { flex: 0 0 auto; color: var(--white); font-size: 14px; font-weight: 500; text-decoration: none; }
.cr-map__caption a:hover { color: var(--ice-300); }

@media (max-width: 1100px) {
    .contact-page .project-inquiry-inner { gap: 60px; }
    .cr-story__details { gap: 36px 20px; }
}

@media (max-width: 900px) {
    .contact-page .project-inquiry-inner { grid-template-columns: minmax(0, 1fr); gap: 60px; }
    .contact-page .project-inquiry-content { padding-top: 0; }
    .contact-page .project-inquiry-card { max-width: 760px; }
    .contact-page .project-inquiry {
        background-position: center center, 42% top;
        background-size: auto, 860px auto, auto;
    }
}

@media (max-width: 767px) {
    .cr-hero { padding-top: 112px; }
    .cr-hero [class*="cr-hero__"] { padding-top: 0; padding-bottom: 0; }
    .cr-hero__visual { min-height: 330px; clip-path: polygon(9% 0, 100% 0, 100% 78%, 96% 78%, 96% 100%, 23% 100%, 23% 88%, 0 88%, 0 11%, 7% 11%); clip-path: url(#contact-hero-clip-mobile); }
    .cr-hero h1 { font-size: clamp(2.7rem, 9vw, 4.5rem); }
    .cr-hero__vertical { right: 6%; font-size: 2rem; }
    .cr-hero__breadcrumb { bottom: 5px; font-size: 10px; }
    .contact-page .project-inquiry { padding: 95px 0 55px; }
    .contact-page .project-inquiry-content h2 { font-size: clamp(3rem, 8vw, 4.5rem); }
    .cr-story__details { margin-top: 58px; }
    .cr-map { padding: 10px 0 45px; }
    .cr-map__frame { min-height: 365px; }
}

@media (max-width: 520px) {
    .contact-page .project-inquiry { background-size: auto, 720px auto, auto; }
    .cr-hero__visual { min-height: 280px; border-radius: 18px; }
    .cr-hero h1 { font-size: clamp(2.4rem, 9vw, 3.3rem); }
    .cr-hero__vertical { font-size: 1.5rem; }
    .cr-story__details { grid-template-columns: minmax(0, 1fr); gap: 30px; border-radius: 22px; }
    .cr-story__hours { display: block; margin-top: 42px; }
    .cr-story__hours p { margin-top: 9px; }
    .contact-page .project-inquiry-card { padding: 28px; }
    .cr-map__frame { min-height: 340px; }
    .cr-map__caption { bottom: 14px; left: 14px; width: calc(100% - 28px); align-items: flex-start; flex-direction: column; gap: 12px; padding: 17px 18px; }
}

/* Reference-inspired motion and slow visual depth. */
.cr-hero__visual > img {
    transform: translate3d(0, var(--cr-hero-shift, 0), 0) scale(1.055);
    transform-origin: center;
    will-change: transform;
}

.contact-page .project-inquiry {
    background-position:
        center center,
        center calc(50% + var(--cr-inquiry-shift, 0px));
}

.cr-map__frame iframe {
    transform: translate3d(0, var(--cr-map-shift, 0), 0) scale(1.035);
    transform-origin: center;
    will-change: transform;
}

.cr-motion-word {
    display: inline-block;
    white-space: nowrap;
}

.cr-motion-character {
    display: inline-block;
}

.contact-page.cr-motion-ready .cr-motion-title .cr-motion-character {
    opacity: 0;
    translate: 20px 0;
    transition:
        opacity 1s cubic-bezier(.22, 1, .36, 1),
        translate 1s cubic-bezier(.22, 1, .36, 1);
    transition-delay: calc(100ms + (var(--cr-character-index, 0) * 30ms));
}

.contact-page.cr-motion-ready .cr-motion-title.is-motion-visible .cr-motion-character {
    opacity: 1;
    translate: 0 0;
}

.contact-page.cr-motion-ready .cr-motion-kicker {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transition:
        opacity .2s ease,
        clip-path 1.2s cubic-bezier(.22, 1, .36, 1);
}

.contact-page.cr-motion-ready .cr-motion-kicker.is-motion-visible {
    opacity: 1;
    clip-path: inset(0 0 0 0);
}

.contact-page.cr-motion-ready .cr-motion-item {
    opacity: 0;
    translate: 0 30px;
    scale: .985;
    filter: blur(4px);
    transition:
        opacity .76s cubic-bezier(.2, .72, .2, 1),
        translate .9s cubic-bezier(.2, .72, .2, 1),
        scale .9s cubic-bezier(.2, .72, .2, 1),
        filter .72s cubic-bezier(.2, .72, .2, 1);
    transition-delay: var(--cr-delay, 0ms);
}

.contact-page.cr-motion-ready .cr-motion-item.is-motion-visible,
.contact-page.cr-motion-ready .cr-motion-group.is-motion-visible > .cr-motion-item {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    filter: blur(0);
}

.contact-page.cr-motion-ready .project-inquiry-card.cr-motion-item {
    translate: 34px 0;
}

.contact-page.cr-motion-ready .project-inquiry-card.cr-motion-item.is-motion-visible {
    translate: 0 0;
}

.contact-page.cr-motion-ready .cr-hero__vertical.cr-motion-item {
    translate: 18px 0;
}

.contact-page.cr-motion-ready .cr-hero__vertical.cr-motion-item.is-motion-visible {
    translate: 0 0;
}

.contact-page.cr-motion-ready .cr-map__frame.cr-motion-item {
    translate: 0 24px;
    scale: .975;
}

.contact-page.cr-motion-ready .cr-map__frame.cr-motion-item.is-motion-visible {
    translate: 0 0;
    scale: 1;
}

.cr-story__details,
.contact-page .project-inquiry-card,
.cr-map__caption {
    transition:
        border-color .35s var(--ease),
        box-shadow .35s var(--ease),
        background-color .35s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
    .cr-story__details:hover,
    .contact-page .project-inquiry-card:hover {
        border-color: rgba(214, 234, 255, .56);
        box-shadow: 0 34px 90px rgba(0, 12, 42, .42), inset 0 1px 0 rgba(255, 255, 255, .17);
    }

    .cr-map__caption:hover {
        border-color: rgba(140, 215, 255, .42);
        background-color: rgba(8, 17, 33, .92);
    }
}

@media (max-width: 900px) {
    .contact-page .project-inquiry {
        background-position:
            center center,
            42% calc(0% + var(--cr-inquiry-shift, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cr-story__details,
    .contact-page .project-inquiry-card,
    .cr-map__caption,
    .cr-motion-character,
    .cr-motion-kicker,
    .cr-motion-item { transition: none !important; }

    .cr-hero__visual > img,
    .cr-map__frame iframe { transform: none !important; }

    .contact-page .project-inquiry {
        background-position: center center, center center !important;
    }

    .contact-page .cr-motion-character,
    .contact-page .cr-motion-kicker,
    .contact-page .cr-motion-item {
        opacity: 1 !important;
        translate: 0 0 !important;
        scale: 1 !important;
        filter: none !important;
        clip-path: none !important;
    }
}

@media print {
    .cr-map__frame iframe { display: none; }
    .cr-map__frame { min-height: 130px; }

    .contact-page .cr-motion-character,
    .contact-page .cr-motion-kicker,
    .contact-page .cr-motion-item {
        opacity: 1 !important;
        translate: 0 0 !important;
        scale: 1 !important;
        filter: none !important;
        clip-path: none !important;
    }
}
