/* =========================
   CONTACT
========================= */

.contact {
    min-height: 100svh;
}

.contact__inner {
    min-height: 100svh;

    position: relative;

    display: flex;
    flex-direction: column;

    padding:
        var(--space-72)
        var(--gutter-stage)
        56px;
}


/* =========================
   TITLE
========================= */

.contact__title {
    margin: 0;

    font-family: var(--font-display);
    font-size: min(var(--font-display-desktop), 10.94svh);
    font-weight: var(--weight-bold);
    line-height: 0.85;
    letter-spacing: 0;

    color: var(--color-text);
}


/* =========================
   MAIN CONTENT
========================= */

.contact__content {
    flex: 1;

    display: grid;
    grid-template-columns: 1fr auto;
}


/* =========================
   CTA
========================= */

.contact__cta {
    align-self: center;

    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.contact__copy {
    display: flex;
    flex-direction: column;
    gap: var(--text-pair-gap);
}

.contact__availability,
.contact__description {
    margin: 0;

    font-family: var(--font-mono);
    color: var(--color-text);
}

.contact__availability {
    font-size: min(var(--font-subtitle-desktop), 2.34svh);
    font-weight: var(--weight-bold);
    line-height: 1.2;
}

.contact__description {
    font-size: min(var(--font-body-desktop), 1.95svh);
    font-weight: var(--weight-regular);
    line-height: 1.3;
}


/* =========================
   ACTIONS
========================= */

.contact__actions {
    display: flex;
    gap: var(--space-8);
}

.contact__button {
    height: min(48px, 4.69svh);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: min(12px, 1.17svh);

    padding-inline: min(24px, 2.34svh);

    border-radius: min(8px, 0.78svh);

    font-family: var(--font-mono);
    font-size: min(18px, 1.76svh);
    font-weight: var(--weight-bold);
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 200ms ease,
        color 200ms ease,
        border-color 200ms ease;
}



/* Primary */

.contact__button--primary {
    border: 1px solid var(--color-text);

    background: var(--color-text);
    color: var(--color-background);
}

.contact__button--primary:hover {
    background: transparent;
    color: var(--color-text);
}


/* Secondary */

.contact__button--secondary {
    border: 1px solid var(--color-text);

    background: transparent;
    color: var(--color-text);
}

.contact__button--secondary:hover {
    background: var(--color-text);
    color: var(--color-background);
}

.contact__copy-icon {
    width: min(20px, 1.95svh);
    height: min(20px, 1.95svh);

    display: block;
    flex-shrink: 0;
}


/* =========================
   SOCIALS
========================= */

.contact__socials {
    align-self: start;

    margin-top: calc(min(81.9px, 8svh) * -1);

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 56px;
}

.contact__socials-title {
    margin: 0;

    font-family: var(--font-mono);
    font-size: min(var(--font-body-desktop), 1.95svh);
    font-weight: var(--weight-bold);
    line-height: 1;

    color: rgba(33, 33, 33, 0.65);
}

.contact__socials-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 28px;
}

.contact__social-link {
    font-family: var(--font-mono);
    font-size: min(var(--font-body-desktop), 1.95svh);
    font-weight: var(--weight-regular);
    line-height: 1;

    color: var(--color-text);
    text-decoration: none;

    transition: opacity 180ms ease;
}

.contact__social-link:hover {
    opacity: 0.45;
}


/* =========================
   FOOTER
========================= */

.contact__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    width: 100%;
}

.contact__footer p {
    margin: 0;

    font-family: var(--font-mono);
    font-size: min(13px, 1.27svh);
    font-weight: var(--weight-regular);
    line-height: 1;

    color: var(--color-text);
}

/* =========================
   CONTACT — BUTTON INTERACTIONS
========================= */

.contact__button {
    transition:
        opacity 250ms ease,
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}


/* =========================
   PRIMARY BUTTON
========================= */

.contact__button--primary:hover {
    opacity: 0.8;

    background-color: var(--color-text);
    color: var(--color-background);
    border-color: var(--color-text);
}

.contact__button--primary:active {
    opacity: 1;

    background-color: #000000;
    color: var(--color-background);
    border-color: #000000;
}


/* =========================
   SECONDARY BUTTON
========================= */

.contact__button--secondary:hover {
    opacity: 0.6;

    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-text);
}

.contact__button--secondary:active {
    opacity: 1;

    background-color: transparent;
    color: #000000;
    border-color: #000000;
}

/* =========================
   CONTACT — LARGE TABLET (PORTRAIT)
========================= */

@media (min-width: 1025px) and (max-width: 1199px) and (orientation: portrait) {

    /*
     * In a tall portrait screen the Desktop grid
     * splits Contact into four islands: the title, the
     * social links on the right, the CTA halfway down
     * and the footer. Here the title, the CTA and the
     * social links form one composition on the Desktop
     * 7.5vw line, centered in the space above the
     * footer, which keeps its Desktop row at the
     * bottom. The spacing between the three groups is
     * the Tablet rhythm (96px and 150px) scaled up for
     * the taller canvas.
     */

    .contact__title {
        margin-top: auto;
    }

    .contact__content {
        flex: 0 0 auto;

        display: flex;
        flex-direction: column;

        margin-bottom: auto;
    }

    .contact__cta {
        align-self: flex-start;

        margin-top: 144px;
    }

    /*
     * The social links stay a vertical list, as on
     * every other breakpoint (Desktop spacing between
     * links), with a little more room under "Find me".
     */

    .contact__socials {
        align-self: flex-start;

        margin-top: 224px;

        align-items: flex-start;
        gap: var(--space-40);
    }

    .contact__socials-list {
        align-items: flex-start;
    }
}

/* =========================
   CONTACT — TABLET
========================= */

@media (min-width: 768px) and (max-width: 1024.98px) {

    .contact__inner {
        min-height: 100svh;

        padding:
            var(--space-72)
            var(--gutter-stage)
            var(--space-48);
    }


    /* =========================
       TITLE
    ========================= */

    .contact__title {
        font-size: var(--font-display-tablet);
        line-height: 0.85;
    }


    /* =========================
       CONTENT
    ========================= */

    .contact__content {
        flex: 1;

        display: flex;
        flex-direction: column;

        padding-bottom: var(--space-48);
    }


    /* =========================
       CTA
    ========================= */

    .contact__cta {
        align-self: flex-start;

        margin-top: 96px;

        gap: var(--space-12);
    }

    .contact__availability {
        font-size: var(--font-subtitle-tablet);
    }

    .contact__description {
        max-width: 360px;

        font-size: var(--font-body-tablet);
        line-height: 1.3;
    }


    /* =========================
       BUTTONS
    ========================= */

    .contact__actions {
        gap: var(--space-8);
    }

    .contact__button {
        height: 44px;

        padding-inline: 22px;

        border-radius: 8px;

        gap: 10px;

        font-size: 16px;
    }

    .contact__copy-icon {
        width: 18px;
        height: 18px;
    }


    /* =========================
       SOCIALS
    ========================= */

    .contact__socials {
        align-self: flex-start;

        margin-top: 150px;

        align-items: flex-start;
        gap: var(--space-40);
    }

    .contact__socials-title {
        font-size: 18px;
    }

    .contact__socials-list {
        align-items: flex-start;

        gap: var(--space-24);
    }

    .contact__social-link {
        font-size: 18px;
    }


    /* =========================
       FOOTER
    ========================= */

    .contact__footer {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;

        gap: var(--space-8);
    }

    .contact__footer p {
        font-size: 12px;
        line-height: 1.2;
    }
}

/* =========================
   CONTACT — MOBILE
========================= */

@media (max-width: 767.98px) {

    /*
     * Contact has no mobile layout yet, and its
     * social column runs past the right edge of the
     * screen.
     *
     * Any horizontal overflow makes the mobile
     * browser lay the page out against a box wider
     * and taller than the screen (444 x 963 on a
     * 393 x 852 phone). Sticky panels are placed in
     * that box while the screen slides inside it, so
     * the Works Intro composition, and every other
     * sticky panel, showed up to 111px higher than
     * laid out while scrolling down.
     *
     * clip keeps the page exactly one screen wide
     * until Contact gets its mobile layout. It does
     * not create a scroll container.
     */

    .contact {
        overflow-x: clip;
    }
}

/* =========================
   CONTACT — MOBILE
========================= */

@media (max-width: 767.98px) {

    .contact {
        min-height: 100svh;
        overflow-x: clip;
    }

    /*
     * Under about 750px of visible height the gaps
     * above the buttons and "Find me", and the space
     * under the links, give back up to 96px so the
     * section fits one screen: at the bottom of the
     * page "Let's talk." then rests below the logo,
     * even when the nav slides back in.
     */

    .contact__inner {
        min-height: 100svh;

        padding:
            var(--space-72)
            var(--gutter-stage)
            28px;

        display: flex;
        flex-direction: column;
    }


    /* =========================
       TITLE
    ========================= */

    .contact__title {
        font-size: clamp(38px, 10.13vw, 42px);
        line-height: 0.9;
    }


    /* =========================
       CONTENT
    ========================= */

    .contact__content {
        flex: 1;

        display: flex;
        flex-direction: column;

        padding-bottom: clamp(32px, calc(48px - (750px - 100svh) / 6), 48px);
    }


    /* =========================
       CTA
    ========================= */

    .contact__cta {
        align-self: stretch;

        margin-top: clamp(44px, calc(76px - (750px - 100svh) / 3), 76px);

        gap: var(--space-12);
    }

    .contact__copy {
        gap: var(--text-pair-gap);
    }

    .contact__availability {
        font-size: 16px;
        line-height: 1.2;
    }

    .contact__description {
        max-width: 340px;

        font-size: 15px;
        line-height: 1.5;
    }


    /* =========================
       BUTTONS
    ========================= */

    .contact__actions {
        width: 100%;

        display: flex;
        gap: var(--space-8);
    }

    .contact__button {
        flex: 1;

        height: 44px;

        padding-inline: 12px;

        border-radius: 8px;

        gap: 8px;

        font-size: 14px;
    }

    .contact__copy-icon {
        width: 17px;
        height: 17px;
    }


    /* =========================
       SOCIALS
    ========================= */

    .contact__socials {
        align-self: flex-start;

        margin-top: clamp(56px, calc(104px - (750px - 100svh) / 2), 104px);

        align-items: flex-start;

        gap: var(--space-40);
    }

    .contact__socials-title {
        font-size: 14px;
        line-height: 1;

        text-align: left;
    }

    .contact__socials-list {
        align-items: flex-start;

        gap: 28px;
    }

    .contact__social-link {
        font-size: 15px;
        line-height: 1;
    }


    /* =========================
       FOOTER
    ========================= */

    .contact__footer {
        width: 100%;

        margin-top: auto;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;

        gap: var(--space-8);
    }

    .contact__footer p {
        font-size: 12px;
        line-height: 1.2;
    }
}