
/*==========================================================
    Backgrounds
==========================================================*/

#site-footer{
    background-image: repeating-linear-gradient(45deg, 
            oklch(from var(--colour-brand) 0.35 c var(--footer-col-h) / 0.2), 
            oklch(from var(--colour-brand) 0.35 c var(--footer-col-h) / 0.2) 44px, 
            oklch(from var(--colour-brand) 0.1 c var(--footer-col-h) / 0.15) 44px, 
            oklch(from var(--colour-brand) 0.1 c var(--footer-col-h) / 0.15) 56px);
    border-top: 1pt solid oklch(from var(--colour-brand) l c var(--footer-col-h) / 0.4);
    box-shadow:0 0 18px 10px oklch(from var(--primary-col) 0.35 c var(--footer-col-h) / 0.62),
                inset 0 0 18px 10px oklch(from var(--primary-col) 0.35 c var(--footer-col-h) / 0.62);
    animation-name: footer-glow;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 20% entry 100%;
    margin-top: var(--space-lg);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    position: relative;
    z-index: 1;
    & a{
        cursor: pointer !important;
    }
    &::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(
            to bottom,
            oklch(from var(--bg-000) l c h / 0) 0%,
            oklch(from var(--bg-000) l c h / 1) 18%,
            oklch(from var(--bg-000) l c h / 0.75) 35%,
            oklch(from var(--bg-000) l c h / 0.35) 70%,
            oklch(from var(--bg-000) l c h / 0) 100%
        );
        pointer-events: none;
    }
    
}

#site-footer{
    --footer-col-h: 137;
}
#site-footer.footer--hot{
    --footer-col-h: 12;
    --temperature-col-h: 12;
}
#site-footer.footer--warm{
    --footer-col-h: 80;
    --temperature-col-h: 80;
}
#site-footer.footer--cold{
    --footer-col-h: 230;
    --temperature-col-h: 230;
}

@keyframes footer-glow{
    0% {
        border-top-width: 1pt;
        border-top-color: oklch(from var(--colour-brand) l c var(--footer-col-h) / 0.4);
        box-shadow:0 -4px 12px 2px oklch(from var(--colour-brand) 0.35 c var(--footer-col-h) / 0.36),
                inset 0 4px 12px 2px oklch(from var(--colour-brand) 0.35 c var(--footer-col-h) / 0.36);
    }
    70%, 100% {
        border-top-width: 3pt;
        border-top-color: oklch(from var(--colour-brand) l c var(--footer-col-h) / 1);
        box-shadow:0 -8px 12px 4px oklch(from var(--primary-col) 0.55 c var(--footer-col-h) / 0.36),
                inset 0 8px 12px 4px oklch(from var(--primary-col) 0.55 c var(--footer-col-h) / 0.36);
    }
}


/*==========================================================
    Layout
==========================================================*/

#site-footer{
    padding-block: var(--space-xl);
}


/* NEW FILE: footer.css */

.sg-footer {
    background: var(--colour-background);
    color: var(--colour-text-muted);
    border-top: 1px solid var(--colour-border);
}

.sg-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 96px 32px 48px;
}

.sg-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 64px;
    row-gap: 48px;
}

.sg-footer__col {
    display: flex;
    flex-direction: column;
}

/* Brand column */

.sg-footer__logo {
    margin: 0 0 20px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: transparent !important;
    background-image: url("/images/_header/smartguard logo dark.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left center;
}

p.sg-footer__tagline {
    margin: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: oklch(from var(--colour-text) l c h / 0.8);
    max-width: 26ch;
}

a.sg-footer__social {
    align-self: flex-start;
    font-size: 1.1rem;
    color: oklch(from var(--colour-text) 1 c h / 0.8) !important;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

a.sg-footer__social:hover {
    color: oklch(from var(--colour-text) 1 c h / 1) !important;
    border-color: var(--colour-border);
}

.sg-footer__social:focus-visible {
    outline: 2px solid var(--colour-brand);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Headings */

.sg-footer__heading {
    margin: 0 0 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: oklch(from var(--colour-text) l c h / 1);
}

/* Link lists */

.sg-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sg-footer__links a {
    font-size: 0.95rem;
    color: oklch(from var(--colour-text) l c h / 0.8);
    text-decoration: none;
    transition: color 0.15s ease;
}

.sg-footer__links a:hover {
    color: var(--colour-text);
}

.sg-footer__links a:focus-visible {
    outline: 2px solid oklch(from var(--colour-text) l c h / 1);
    outline-offset: 3px;
    border-radius: 4px;
}

/* CTA links */


.sg-footer__links--cta {
    gap: 16px;
    & .cta {
        width: 10rem;
        margin-top: 1rem !important;
    }
}

.sg-footer__cta {
    color: var(--colour-brand) !important;
    font-weight: 600;
    position: relative;

}

.sg-footer__cta::after {
    content: "\2192";
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.15s ease;
}

.sg-footer__cta:hover::after {
    transform: translateX(3px);
}

/* Legal note */

p.sg-footer__note {
    margin: 20px 0 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: oklch(from var(--colour-text) l c h / 0.5);
    max-width: 30ch;
}

/* Divider */

.sg-footer__divider {
    width: 100%;
    height: 1px;
    background: var(--colour-border);
    margin: 64px 0 32px;
}

/* Bottom bar */

.sg-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

p.sg-footer__copyright,
p.sg-footer__made {
    margin: 0;
    font-size: 0.85rem;
    color: oklch(from var(--colour-text) l c h / 0.5);
}

/* Tablet */

@media (max-width: 850px) {
    .sg-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 56px;
    }
}

/* Mobile */

@media (max-width: 560px) {
    .sg-footer__inner {
        padding: 64px 20px 32px 48px;
    }

    .sg-footer__grid {
        grid-template-columns: 1fr;
        row-gap: 48px;
    }

    .sg-footer__divider {
        margin: 48px 0 24px;
    }

    .sg-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}