/* Contact Us: one card with the contact details as a sidebar and the message form.
   Locate Us: full-width map. */

.section.contact-section,
.section.locate-section {
    min-height: 0;
}

/* One card: contact details as a sidebar, message form beside it */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    width: 100%;
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.12);
    border-radius: var(--radius-m);
    background: var(--card);
}

@media (max-width: 56rem) {
    .contact {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- details (sidebar) ---------- */
.contact__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
    min-width: 0;
    padding: var(--space-l);
    border-right: 1px solid hsl(0 0% 100% / 0.1);
    background: hsl(216 55% 12%);
}

@media (max-width: 56rem) {
    .contact__info {
        border-right: 0;
        border-bottom: 1px solid hsl(0 0% 100% / 0.1);
    }
}

.contact__info-head {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.contact__info-head h3 {
    margin: 0;
    color: var(--fg);
    font-size: var(--text-m);
    font-weight: 700;
    line-height: 1.2;
}

.contact__info-head span {
    color: var(--fg-20);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.contact-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-list li + li {
    border-top: 1px solid hsl(0 0% 100% / 0.08);
}

.contact-list__item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 0;
    color: var(--fg);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.contact-list li:first-child .contact-list__item {
    padding-top: 0;
}

.contact-list li:last-child .contact-list__item {
    padding-bottom: 0;
}

/* phones/tablets: details in two columns so the stacked layout stays short */
@media (min-width: 30rem) and (max-width: 56rem) {
    .contact-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem var(--space-m);
    }

    .contact-list li + li {
        border-top: 0;
    }

    .contact-list .contact-list__item {
        padding: 0;
    }
}

.contact-list__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.contact-list__label {
    color: hsl(0 0% 100% / 0.6);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-list__value {
    color: var(--fg);
    font-size: 1rem;
    line-height: 1.35;
}

.contact-list__icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid hsl(0 0% 100% / 0.08);
    border-radius: var(--radius-s);
    background: hsl(217 40% 22% / 0.7);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-list__icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: hsl(358 80% 66%);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

a.contact-list__item:hover .contact-list__icon,
a.contact-list__item:focus-visible .contact-list__icon {
    border-color: hsl(358 80% 66% / 0.6);
    background: hsl(358 73% 46% / 0.14);
}

a.contact-list__item:hover .contact-list__value {
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-color: hsl(0 0% 100% / 0.4);
}

/* ---------- Locate Us ---------- */
.locate {
    width: 100%;
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.12);
    border-radius: var(--radius-m);
    background: var(--card);
}

/* soft placeholder behind the map while Google Maps loads */
.locate__map {
    position: relative;
    background-color: hsl(0 0% 100% / 0.04);
}

.locate__map::before {
    content: 'Loading map…';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.875rem;
    color: hsl(0 0% 100% / 0.45);
}

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

.contact-map {
    position: relative;
    display: block;
    width: 100%;
    height: clamp(18rem, 38vw, 28rem);
    border: 0;
    filter: grayscale(25%);
}

/* Map view in dark mode: Google's embed can't be themed, so invert it and turn the
   hues back (water stays blue, parks green) */
.contact-map--dark {
    filter: invert(90%) hue-rotate(180deg) brightness(0.95) contrast(0.9) grayscale(20%);
}

.contact-map__switch {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    overflow: hidden;
    border: 1px solid hsl(0 0% 100% / 0.15);
    border-radius: var(--radius-s);
    background: var(--card, #161b26);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.4);
}

.contact-map__switch button {
    padding: 0.4rem 0.8rem;
    border: 0;
    background: transparent;
    color: hsl(0 0% 100% / 0.7);
    font: 600 0.8125rem/1.2 Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.contact-map__switch button[aria-pressed="true"] {
    background: hsl(0 0% 100% / 0.16);
    color: #fff;
}

/* small screens: move the switch below Google's place card */
@media (max-width: 40rem) {
    .contact-map__switch {
        top: auto;
        right: auto;
        bottom: 1.6rem;
        left: 0.6rem;
    }
}

/* ---------- form ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
    padding: var(--space-l);
}

.contact-form__head {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.25rem;
}

.contact-form__head h3 {
    margin: 0;
    color: var(--fg);
    font-size: var(--text-m);
    font-weight: 700;
    line-height: 1.2;
}

.contact-form__head span {
    color: var(--fg-20);
    font-size: 0.9375rem;
    line-height: 1.45;
}

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

@media (max-width: 30rem) {
    .contact-form__row {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
}

.contact-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.contact-form__field label {
    color: var(--fg-20);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid hsl(0 0% 100% / 0.2);
    border-radius: var(--radius-s);
    background: var(--bg-40);
    color: var(--fg);
    font: 1rem/1.4 Arial, Helvetica, sans-serif;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form textarea {
    min-height: 8.5rem;
    resize: vertical;
}

.contact-form input:hover,
.contact-form textarea:hover {
    border-color: hsl(0 0% 100% / 0.35);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: hsl(358 80% 66%);
    box-shadow: 0 0 0 3px hsl(358 73% 46% / 0.25);
}

.contact-form [aria-invalid="true"] {
    border-color: hsl(358 80% 66%);
}

.contact-form__count {
    align-self: flex-end;
    margin-top: -0.25rem;
    color: hsl(0 0% 100% / 0.5);
    font: 0.75rem/1 ui-monospace, Menlo, Consolas, monospace;
}

.contact-form__submit {
    min-height: 3rem;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: var(--radius-s);
    background: var(--primary);
    color: var(--fg);
    font: 700 1rem/1.2 Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contact-form__submit:hover {
    background: hsl(358 73% 40%);
}

.contact-form__submit:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 3px;
}

.contact-form__status {
    margin-top: -0.5rem;
    color: hsl(358 80% 72%);
    font-size: 0.875rem;
    text-align: center;
}

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

/* neutral while sending, green once sent, red (default) for errors */
.contact-form__status:not(.is-error) {
    color: var(--fg-20);
}

.contact-form__status.is-sent {
    color: hsl(145 55% 62%);
}

.contact-form__submit:disabled {
    opacity: 0.7;
    cursor: progress;
}

/* spam trap: off-screen, so people never see or tab to it */
.contact-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.contact-form__note {
    margin-top: -0.5rem;
    color: hsl(0 0% 100% / 0.6);
    font-size: 0.8125rem;
    text-align: center;
}

.contact-form__note a {
    color: var(--fg-20);
    text-underline-offset: 0.2em;
}

