/*
 * Below-the-fold chrome (footer, newsletter band, "work with me" CTA).
 * Extracted from the render-blocking inline <style> in _Layout and loaded
 * deferred (media=print swap) so it no longer blocks first paint and is
 * cached across navigations instead of re-sent in every HTML response.
 */
/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background-color: var(--brand-dark);
    color: rgba(255,255,255,0.65);
    padding: 4rem 0 1.5rem;
    position: relative;
    margin-top: 0;
}
/* Subtle top accent line in brand interactive blue */
.site-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(48,113,242,0.45) 30%,
        rgba(137,194,217,0.55) 50%,
        rgba(48,113,242,0.45) 70%,
        transparent 100%);
}
.site-footer a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    transition: color .18s ease, transform .18s ease;
}
.site-footer a:hover,
.site-footer a:focus-visible { color: #fff; }
.site-footer a:focus-visible {
    outline: 2px solid var(--brand-hover);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Top grid */
.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr 1.5fr;
    gap: 2.5rem 2.75rem;
    margin-bottom: 3rem;
}
.footer-col-heading {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1.1rem;
}
.footer-brand-logo {
    height: 32px;
    filter: brightness(0) invert(1);
    opacity: .92;
    margin-bottom: 1rem;
}
.footer-tagline {
    font-size: .9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.62);
    max-width: 22rem;
    margin-bottom: 1.5rem;
}
.footer-status {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem .8rem .35rem .65rem;
    background: rgba(202,242,201,0.08);
    border: 1px solid rgba(202,242,201,0.25);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--brand-accent);
}
.footer-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-accent);
    box-shadow: 0 0 0 0 rgba(202,242,201,0.7);
    animation: footer-pulse 2.4s ease-out infinite;
}
@keyframes footer-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(202,242,201,0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(202,242,201,0); }
    100% { box-shadow: 0 0 0 0 rgba(202,242,201,0); }
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.footer-links a {
    font-size: .92rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 24px;
}
.footer-links a::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 1px;
    background: var(--brand-hover);
    transition: width .2s ease;
}
.footer-links a:hover::before,
.footer-links a:focus-visible::before { width: 14px; }

/* Get in touch card */
.footer-cta {
    padding: 1.25rem 1.35rem;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
}
.footer-cta-text {
    font-size: .88rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.7);
    margin: 0 0 1rem;
}
.footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--brand-accent);
    color: var(--brand-dark) !important;
    font-size: .82rem;
    font-weight: 600;
    padding: .55rem .95rem;
    border-radius: 6px;
    min-height: 38px;
    transition: background .18s ease, transform .18s ease;
}
.footer-cta-btn:hover,
.footer-cta-btn:focus-visible {
    background: #b5e8b4;
    color: var(--brand-dark) !important;
    transform: translateX(2px);
}
.footer-cta-btn svg { transition: transform .18s ease; }
.footer-cta-btn:hover svg { transform: translateX(2px); }

/* Divider */
.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 0 0 1.5rem;
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .78rem;
    color: rgba(255,255,255,0.45);
}
.footer-bottom-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem .9rem;
}
.footer-bottom-legal .sep {
    color: rgba(255,255,255,0.2);
}
.footer-bottom a { font-size: .78rem; color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: #fff; }

.footer-social {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.72);
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.footer-social a:hover,
.footer-social a:focus-visible {
    background: rgba(48,113,242,0.18);
    border-color: rgba(65,142,242,0.5);
    color: #fff;
    transform: translateY(-1px);
}
.footer-social svg { width: 16px; height: 16px; }

.footer-stack {
    font-size: .72rem;
    letter-spacing: .04em;
    color: rgba(255,255,255,0.35);
}

/* Tablet */
@media (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.25rem;
    }
    .footer-brand-block,
    .footer-cta-block { grid-column: 1 / -1; }
}
/* Mobile */
@media (max-width: 575.98px) {
    .site-footer { padding: 3rem 0 1.25rem; margin-top: 0; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2.25rem;
    }
    .footer-bottom { justify-content: flex-start; }
    .footer-bottom-legal { order: 3; width: 100%; }
}

/* ── Newsletter band (sits above the footer) ── */
.newsletter-band {
    background:
        radial-gradient(circle at 18% 0%, rgba(48,113,242,0.10) 0%, transparent 55%),
        radial-gradient(circle at 82% 100%, rgba(137,194,217,0.18) 0%, transparent 60%),
        #f8fbff;
    border-top: 1px solid #e5edf7;
    padding: 4rem 0 4.5rem;
    margin-top: 5rem;
}
.newsletter-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}
.newsletter-eyebrow {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand-primary);
    background: rgba(48,113,242,0.08);
    padding: .35rem .85rem;
    border-radius: 100px;
    margin-bottom: 1.1rem;
}
.newsletter-title {
    font-size: clamp(1.6rem, 3.2vw, 2.15rem);
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -.025em;
    line-height: 1.18;
    margin: 0 0 .85rem;
}
.newsletter-sub {
    font-size: 1rem;
    color: #5d728b;
    line-height: 1.65;
    margin: 0 0 1.75rem;
}
.newsletter-form {
    display: flex;
    gap: .55rem;
    max-width: 460px;
    margin: 0 auto 1rem;
}
.newsletter-input {
    flex: 1;
    background: #fff;
    border: 1px solid #d8e2f0;
    border-radius: 10px;
    padding: .8rem 1.1rem;
    font-size: .95rem;
    color: var(--brand-dark);
    min-height: 48px;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.newsletter-input::placeholder { color: #a3b1c3; }
.newsletter-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(48,113,242,0.15);
}
.newsletter-button {
    background: #CAF2C9;
    color: #143259;
    border: 1px solid #CAF2C9;
    border-radius: 10px;
    padding: 0 1.6rem;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.newsletter-button:hover { background: #b5e8b4; border-color: #b5e8b4; }
.newsletter-button:active { transform: scale(.97); }
.newsletter-privacy {
    font-size: .76rem;
    color: #8a9bb0;
    margin: 0;
}
.newsletter-thanks {
    display: none;
    background: rgba(202,242,201,0.22);
    border: 1px solid rgba(67,160,71,0.3);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}
.newsletter-thanks-title {
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 .25rem;
}
.newsletter-thanks-sub {
    font-size: .85rem;
    color: #5d728b;
    margin: 0;
}
.newsletter-form.is-submitted,
.newsletter-form.is-submitted ~ .newsletter-privacy { display: none; }
.newsletter-form.is-submitted ~ .newsletter-thanks { display: block; }
@media (max-width: 575.98px) {
    .newsletter-band { padding: 2.75rem 0 3rem; margin-top: 3rem; }
    .newsletter-form { flex-direction: column; }
    .newsletter-button { padding: .85rem 1.4rem; }
}

/* ── Newsletter dark mode ── */
.dark-mode .newsletter-band {
    background:
        radial-gradient(circle at 18% 0%, rgba(48,113,242,.13) 0%, transparent 55%),
        radial-gradient(circle at 82% 100%, rgba(48,113,242,.07) 0%, transparent 60%),
        #0d1e36;
    border-top-color: rgba(255,255,255,.07);
}
.dark-mode .newsletter-eyebrow {
    background: rgba(48,113,242,.18);
    color: #89C2D9;
}
.dark-mode .newsletter-title { color: #fff; }
.dark-mode .newsletter-sub { color: rgba(255,255,255,.62); }
.dark-mode .newsletter-input {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.12);
    color: #fff;
}
.dark-mode .newsletter-input::placeholder { color: rgba(255,255,255,.32); }
.dark-mode .newsletter-input:focus {
    border-color: var(--brand-hover);
    box-shadow: 0 0 0 4px rgba(65,142,242,.2);
}
.dark-mode .newsletter-button {
    background: #CAF2C9;
    border-color: #CAF2C9;
    color: #143259;
}
.dark-mode .newsletter-button:hover {
    background: #b5e8b4;
    border-color: #b5e8b4;
}
.dark-mode .newsletter-privacy { color: rgba(255,255,255,.38); }
.dark-mode .newsletter-thanks {
    background: rgba(202,242,201,.08);
    border-color: rgba(67,160,71,.25);
}
.dark-mode .newsletter-thanks-title { color: #CAF2C9; }
.dark-mode .newsletter-thanks-sub { color: rgba(255,255,255,.58); }

/* ── Work With Me CTA box (refined) ── */
.footer-cta {
    padding: 1.4rem 1.4rem 1.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
}
.footer-cta-text {
    font-size: .9rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.72);
    margin: 0 0 1.1rem;
}
.footer-services-link {
    display: inline-block;
    margin-top: .85rem;
    font-size: .78rem;
    color: rgba(255,255,255,0.55) !important;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255,255,255,0.25);
    padding-bottom: 1px;
}
.footer-services-link:hover,
.footer-services-link:focus-visible {
    color: #fff !important;
    border-bottom-color: rgba(255,255,255,0.55);
}
