/*Footer*/

/*desktop first w/ svg*/
footer {
    position: relative;
    width: 100%;
    background: #ffffff;
    color: var(--rem-teal);
    z-index: 6;
    overflow: visible; /* the wave overlaps outside the footer's box, so nothing should clip it */
}

.footer-wave {
    position: absolute;
    top: 2px;
    left: 0;
    width: 100%;
    height: clamp(70px, 10vw, 520px);
    transform: translateY(calc(-88.7% + 1px));
    /* 88.7% = ground line at y≈244 / viewBox height 275 */
    pointer-events: none;
    z-index: 1;
}

.footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

/*CTA*/
.footer-hero {
    padding: clamp(3rem, 6vw, 5rem) 8% clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px solid rgba(6, 42, 100, 0.1);
}

.footer-tagline {
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--rem-bg);
    max-width: 680px;
    margin: 0;
}

/* Shape and sweep: base.css (pill sweep) */
.footer-cta {
    --sweep: var(--rem-bg);
    --sweep-time: 0.15s;
    gap: 10px;
    padding: 12px 26px;              /* was 14px 28px; minus the 2px border, so the size stays the same */
    border: 2px solid var(--rem-bg);
    background: transparent;
    color: var(--rem-bg);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.15s ease 0.1s;
}

.footer-cta:hover,
.footer-cta:focus-visible {
    color: #ffffff;
}

.footer-cta svg {
    flex: none;
    transition: transform 0.15s ease;
}

.footer-cta:hover svg,
.footer-cta:focus-visible svg {
    transform: translate(2px, -2px);
}

/*links/social row*/
.footer-body {
    padding: clamp(2.5rem, 5vw, 3.5rem) 8% 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-address {
    font-style: normal;
    font-size: 13px;
    line-height: 1.6;
    color: var(--rem-bg);
    opacity: 0.6;
}

.footer-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(6, 42, 100, 0.12);
    min-height: 48px;
}

.footer-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.footer-list li {
    position: relative;
    white-space: nowrap;
}

.footer-list button {
    position: relative;
    padding: 0 0 3px;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--rem-bg);
    font-size: 14px;
}

/*underline hover/focus */
.footer-list button::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.footer-list button:hover::after,
.footer-list button:focus-visible::after {
    transform: scaleX(1);
}

.footer-list button:focus-visible {
    outline: 2px solid var(--rem-bg);
    outline-offset: 4px;
}

/*dots*/
.footer-list li + li::before {
    content: '';
    position: absolute;
    left: -17.5px; /* half of the 30px gap, centred on the dot */
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--rem-bg);
    opacity: 0.5;
}

.footer-link {
    height: 36px;
    width: auto;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--rem-bg);
    background: rgba(6, 42, 100, 0.08);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.footer-social-link:hover {
    background: var(--rem-bg);
    color: #ffffff;
    transform: translateY(-2px);
}

/*copyright*/
.footer-bottom {
    padding: 1.25rem 8% 2rem;
    border-top: 1px solid rgba(6, 42, 100, 0.08);
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: var(--rem-navy);
    opacity: 0.5;
    text-align: center;
}

@media (max-width: 700px) {
    .footer-list {
        justify-content: center;
        gap: 12px 24px;
    }
    .footer-list li + li::before {
        display: none;
    }
}

/*mobile tablet*/
@media (max-width: 1050px) {

    body footer {
        --f-deep:   #073a46;
        --f-ink:    rgba(255, 255, 255, 0.92);
        --f-muted:  rgba(255, 255, 255, 0.55);
        --f-line:   rgba(255, 255, 255, 0.14);
        --f-pad:    1.75rem;   /* side padding; full-width rows bleed out by exactly this */

        position: relative;
        isolation: isolate;
        overflow: hidden;
        margin: 0;
        padding: 0;
        border-radius: 0;
        background:
                radial-gradient(120% 60% at 100% 0%, rgba(110, 200, 210, 0.55), transparent 65%),
                linear-gradient(180deg, var(--rem-bg) 0%, var(--f-deep) 100%);
        color: var(--f-ink);
        box-shadow: none;
    }

    body footer .footer-wave { display: none; }

    body footer .footer-inner {
        display: flex;
        flex-direction: column;
        gap: 3rem;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 3.5rem var(--f-pad) calc(2rem + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        border: 0;
    }

    body footer .footer-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        margin: 0;
        padding: 0;
        border: 0;
    }

    body footer .footer-hero::before {
        content: "";
        display: block;
        align-self: center;
        width: 40px;
        height: 4px;
        background: var(--rem-mint);
    }

    body footer .footer-tagline {
        margin: 0 0 0.5rem;
        font-family: var(--mono);
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.06em;
        line-height: 1.6;
        text-align: center;
        color: var(--f-muted);
    }


    body footer .footer-cta {
        position: relative;
        z-index: 0;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 60px;
        margin: 0;
        padding: 0 7px 0 22px;
        box-sizing: border-box;
        border: 0;
        border-radius: 999px;
        background: var(--rem-mint);
        color: var(--rem-bg);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.25s var(--ease-out);
    }

    /* white fill slides in on hover/tap */
    body footer .footer-cta::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: #ffffff;
        transform: translateX(-101%);
        transition: transform 0.45s var(--ease-out);
    }

    body footer .footer-cta-text {
        font-family: var(--mono);
        font-size: 17px;
        font-weight: 600;
        background: none;
        color: inherit;
        -webkit-text-fill-color: currentColor;
    }

    body footer .footer-cta svg {
        flex: none;
        width: 46px;
        height: 46px;
        padding: 15px;
        box-sizing: border-box;
        border-radius: 50%;
        background: var(--rem-bg);
        color: var(--rem-mint);
        transition: transform 0.45s var(--ease-out), background-color 0.3s ease;
    }

    body footer .footer-cta:hover::before,
    body footer .footer-cta:focus-visible::before,
    body footer .footer-cta:active::before { transform: translateX(0); }

    body footer .footer-cta:hover svg,
    body footer .footer-cta:focus-visible svg,
    body footer .footer-cta:active svg {
        transform: rotate(45deg);
        background: var(--rem-teal-mid);
        color: #ffffff;
    }

    body footer .footer-cta:active { transform: scale(0.98); }

    /* keep the text teal on the white fill (the desktop hover rule would turn it white) */
    body footer .footer-cta:is(:hover, :focus-visible, :active) { color: var(--rem-bg); }

    body footer .footer-cta:focus-visible {
        outline: 2px solid var(--rem-mint);
        outline-offset: 4px;
    }

    body footer .footer-body {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        column-gap: 2rem;
        row-gap: 0;
        margin: 0;
        padding: 0;
        border: 0;
        text-align: center;
    }

    body footer .footer-divider { display: none; }

    body footer .footer-brand {
        flex: 0 0 100%;
        margin: 0 0 2.5rem;
        padding: 0;
        text-align: center;
    }

    body footer .footer-address {
        margin: 0;
        font-family: var(--mono);
        font-size: 15px;
        font-style: normal;
        line-height: 1.65;
        text-align: center;
        color: var(--f-muted);
    }

    /*links */
    body footer .footer-list {
        flex: 0 0 calc(100% + var(--f-pad) * 2);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: auto;
        max-width: none;
        margin: 0 calc(var(--f-pad) * -1);
        padding: 0;
        list-style: none;
        border-bottom: 1px solid var(--f-line);
    }

    body footer .footer-list li {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        border: 0;
        border-top: 1px solid var(--f-line);
    }

    body footer .footer-list li::before,
    body footer .footer-list li::after,
    body footer .footer-list button::before,
    body footer .footer-list button::after {
        content: none !important;
        display: none !important;
    }

    body footer .footer-list button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: none;
        min-height: 58px;
        margin: 0;
        padding: 0 var(--f-pad);
        border: 0 !important;
        box-shadow: none;
        border-radius: 0;
        background: none;
        color: var(--f-ink);
        font-family: var(--mono);
        font-size: 16px;
        text-align: center;
        white-space: normal;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

    body footer .footer-list button:hover,
    body footer .footer-list button:focus-visible,
    body footer .footer-list button:active {
        color: var(--rem-mint);
        background-color: rgba(255, 255, 255, 0.04);
    }

    body footer .footer-list button:focus-visible {
        outline: none;
        text-decoration: underline;
        text-decoration-color: var(--rem-mint);
        text-underline-offset: 6px;
    }

    body footer .footer-social-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        margin: 1.75rem 0 0;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    body footer .footer-social-link svg {
        width: 20px;
        height: 20px;
    }

    body footer .footer-social-link:hover,
    body footer .footer-social-link:focus-visible,
    body footer .footer-social-link:active {
        background: var(--rem-mint);
        color: var(--rem-bg);
    }

    body footer .footer-body > img.footer-link {
        height: 42px;
        width: auto;
        margin: 1.75rem 0 0;
        padding: 0;
        border-radius: 0;
        background: none;
    }


    body footer .footer-bottom {
        margin: 0 calc(var(--f-pad) * -1);
        padding: 1.5rem var(--f-pad) 0;
        border-top: 1px solid var(--f-line);
        text-align: center;
    }

    body footer .footer-bottom p {
        max-width: 32ch;
        margin: 0 auto;
        font-family: var(--mono);
        font-size: 11px;
        line-height: 1.7;
        letter-spacing: 0.02em;
        color: var(--f-muted);
        text-align: center;
    }
}

@media (max-width: 1050px) and (prefers-reduced-motion: reduce) {
    body footer .footer-cta,
    body footer .footer-cta::before,
    body footer .footer-cta svg,
    body footer .footer-list button { transition: none; }
}


/*tablet*/
@media (min-width: 768px) and (max-width: 1050px) {
    body footer .footer-inner {
        max-width: 640px;
        margin: 0 auto;
        padding-top: 4.5rem;
    }
}

/*Desktop*/
@media (min-width: 1051px) {
    body footer .footer-body {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }

    body footer .footer-brand,
    body footer .footer-divider,
    body footer .footer-social-link,
    body footer .footer-body > img.footer-link {
        flex: none;
    }

    body footer .footer-list {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.5rem;
    }
}
