.contact-hero {
    background-color: var(--navy);
    color: #ffffff;

    h1 {
        font-weight: 800;
        font-size: 52px;
        line-height: 1.04;
        letter-spacing: -0.02em;
        text-wrap: balance;
    }

    address {
        margin-top: 16px;
        font-size: 24px;
        line-height: 1.35;
    }
}

.contact-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 56px 32px 72px;
}

.contact-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-weight: 500;
    font-size: 17px;
    color: var(--navy-text);

    &::before {
        content: "";
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    &.is-open::before {
        background: #7dff9b;
        box-shadow: 0 0 0 4px rgba(125, 255, 155, 0.25);
    }

    &.is-closed::before {
        background: var(--navy-text);
    }
}

.contact-directions {
    min-height: 60px;
    padding: 0 32px;
    font-size: 19px;
}

/* Overlaps the bottom of the hero */
.contact-methods:has(+ .site-footer) {
    margin-bottom: 72px;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: var(--page-width);
    margin: -36px auto 0;
    padding: 0 32px;
    list-style: none;
    line-height: 1.5;

    a {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 16px;
        padding: 22px 24px;
        border-radius: var(--radius);
        background: #ffffff;
        box-shadow: var(--shadow-card);
        transition: transform 200ms var(--ease-out), box-shadow 200ms ease-out;

        &:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-card-hover);
        }
    }

    .icon {
        grid-row: span 2;
        width: 28px;
        height: 28px;
        color: var(--red);
    }

    span {
        font-size: 14px;
        color: var(--ink-soft);
    }

    b {
        font-family: var(--font-display);
        font-size: 20px;
        color: var(--navy);
        overflow-wrap: anywhere;
    }
}

.contact-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    align-items: start;
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 28px 32px 80px;
    line-height: 1.5;

    h2 {
        font-weight: 800;
        font-size: 24px;
        color: var(--navy);
    }
}

.contact-form {
    display: grid;
    gap: 18px;
    padding: 32px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-card-hover);
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.contact-field {
    display: grid;
    gap: 6px;

    label {
        font-weight: 700;
        font-size: 15px;
        color: var(--navy);

        span {
            font-weight: 400;
            color: var(--ink-soft);
        }
    }

    input,
    textarea {
        width: 100%;
        min-height: 50px;
        padding: 12px 14px;
        border: 1.5px solid #c8cfd9;
        border-radius: 8px;
        background: #ffffff;
        color: var(--ink);
        font: inherit;
        font-size: 17px;
        resize: vertical;
        transition: border-color 160ms ease-out;

        &:hover {
            border-color: #8f99aa;
        }

        &:focus-visible {
            border-color: var(--navy);
            outline-offset: 1px;
        }
    }
}

.contact-alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;

    &.is-success {
        background: #e3f4e8;
        color: #1d6b36;
    }

    &.is-error {
        background: #fbe7ea;
        color: var(--red);
    }
}

.contact-send {
    justify-self: start;
}

.contact-hours {
    padding: 32px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-card);

    table {
        width: 100%;
        margin-top: 10px;
        border-collapse: collapse;
        font-size: 16px;
    }

    th,
    td {
        padding: 8px 0;
        border-bottom: 1px solid var(--rule);
    }

    th {
        font-weight: 500;
        color: var(--ink-soft);
    }

    td {
        text-align: right;
        font-weight: 700;
    }
}

@media (width < 900px) {
    .contact-hero h1 {
        font-size: 38px;
    }

    .contact-hero address {
        font-size: 20px;
    }

    .contact-hero-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 32px 16px 56px;
    }

    .contact-methods {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 16px;
    }

    .contact-body {
        grid-template-columns: 1fr;
        padding: 24px 16px 48px;
    }

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

    .contact-form,
    .contact-hours {
        padding: 22px;
    }

    .contact-send {
        justify-self: stretch;
    }
}
