@layer pages {

    /* ─── Contact Hero ─── */
    .hero--contact {
        background-color: var(--uw-fg);
        align-items: center;
        justify-content: center;
    }

    .hero--contact .hero__inner {
        text-align: center;
        align-items: center;
    }

    /* ─── Contact Layout (form + info side by side) ─── */
    .contact__inner {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: var(--uw-space-16);
        align-items: center;
    }

    /* ─── Contact Info — compact block, vertically centered beside the form ─── */
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--uw-space-3);
        text-align: center;
    }

    .contact-info__title {
        font-family: var(--uw-font-heading);
        font-size: var(--uw-text-xl);
        font-weight: 400;
        color: var(--uw-fg);
        margin: 0;
    }

    .contact-info__channels {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--uw-space-3);
        margin: 0;
        font-size: var(--uw-text-base);
        color: var(--uw-fg);
    }

    .contact-info__channels a {
        color: var(--uw-fg);
        text-decoration: none;
        opacity: 0.8;
        transition: opacity var(--uw-transition-fast);
    }

    .contact-info__channels a:hover {
        opacity: 1;
    }

    .contact-info__sep {
        opacity: 0.3;
    }

    /* ─── Contact Form ─── */
    .contact-form {
        /* Offset for the sticky header when linked to via #form */
        scroll-margin-top: calc(var(--uw-header-height) + var(--uw-space-6));
    }

    .contact-form__header {
        margin-block-end: var(--uw-space-8);
    }

    .contact-form__title,
    .contact-form__subtitle {
        font-family: var(--uw-font-heading);
        font-size: var(--uw-text-xl);
        font-weight: 400;
        line-height: 1.3;
        margin: 0;
    }

    .contact-form__subtitle {
        opacity: 0.55;
    }

    /* Serif labels per design */
    .contact-form .form-label {
        font-family: var(--uw-font-heading);
        font-size: var(--uw-text-base);
        font-weight: 400;
        line-height: 1;
    }

    .contact-form .form-input,
    .contact-form .form-textarea,
    .contact-form .form-select {
        border-radius: var(--uw-radius-sm);
    }

    /* Status + submit form a pair at the bottom of the form */
    .contact-form .form-submit {
        margin-block-start: var(--uw-space-4);
    }

    /* Online status line — sits under the submit button */
    .contact-form__status {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: var(--uw-space-3);
        margin-block-start: var(--uw-space-4);
        font-family: var(--uw-font-body);
        font-size: var(--uw-text-sm);
        font-weight: 400;
        color: var(--uw-accent);
    }

    .contact-form__status-dot {
        position: relative;
        width: 8px;
        height: 8px;
        border-radius: var(--uw-radius-pill);
        background-color: var(--uw-primary);
        flex-shrink: 0;
    }

    /* Radar ping that grows out of the dot and fades */
    .contact-form__status-dot::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background-color: inherit;
        animation: contact-status-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
    }

    @keyframes contact-status-ping {
        0% { transform: scale(1); opacity: 0.7; }
        100% { transform: scale(3); opacity: 0; }
    }

    @media (prefers-reduced-motion: reduce) {
        .contact-form__status-dot::before {
            animation: none;
        }
    }

    /* ─── Map ─── */
    .contact-map {
        aspect-ratio: 21 / 6;
        border-radius: var(--uw-radius-lg);
        overflow: hidden;
        margin-block-start: var(--uw-space-16);
        background-color: rgba(14, 20, 24, .06);
    }

    .contact-map iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

    /* ─── Responsive ─── */
    @media (max-width: 900px) {
        .contact__inner {
            grid-template-columns: 1fr;
            gap: var(--uw-space-12);
        }
    }

    @media (max-width: 640px) {
        .contact-map {
            aspect-ratio: 4 / 3;
        }

        /* Full-width gives a better tap target on small screens */
        .contact-form .form-submit .btn {
            width: 100%;
        }

        /* Center under the full-width button on mobile */
        .contact-form__status {
            justify-content: center;
        }
    }

    /* ─── Form notices ─── */
    .form-notice {
        padding: var(--uw-space-3) var(--uw-space-4);
        margin-block-end: var(--uw-space-6);
        border-radius: var(--uw-radius-sm);
        border: 1px solid transparent;
        font-size: var(--uw-text-sm);
    }

    .form-notice--success {
        background-color: rgba(5, 68, 92, 0.08);
        border-color: rgba(5, 68, 92, 0.25);
        color: var(--uw-primary);
    }

    .form-notice--error {
        background-color: rgba(154, 42, 42, 0.08);
        border-color: rgba(154, 42, 42, 0.3);
        color: #9a2a2a;
    }

    /* Honeypot: hidden from people, present for bots */
    .uw-hp {
        position: absolute;
        left: -9999px;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }
}
