/* 
 ---------------------------------
 |   LAST UPDATED: 2026-04-13    |
 ---------------------------------
 */

/* VIEWPORT HEADNOTE: Standard boundaries 1024, 768–1023, ≤767. min-width 1439px is a desktop tier, not a standard boundary. max-width 479px is not tied to our device viewport sizes; used for small-mobile refinement only. */

/* ========================================================================
   VIEWPORT-AGNOSTIC (base styles)
   ======================================================================== */

/* Footer wallpaper: tiled SVG mask tiles (see custom-elements.js + data-tile-mask-url on .footer-rosart-wallpaper) */
custom-footer {
    position: relative;
    display: block;
    isolation: isolate;
}

.footer-rosart-wallpaper {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    user-select: none;
    background-color: color-mix(in srgb, var(--port) 42%, transparent);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 294 294'%3E%3Cpath fill='currentColor' d='M147 293c10-96 50-136 146-146-96-10-136-51-146-147-10 96-51 137-147 147 96 10 137 50 147 146z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 294 294'%3E%3Cpath fill='currentColor' d='M147 293c10-96 50-136 146-146-96-10-136-51-146-147-10 96-51 137-147 147 96 10 137 50 147 146z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    -webkit-mask-position: left top;
    mask-position: left top;
    -webkit-mask-size: 2rem 2rem;
    mask-size: 2rem 2rem;
}

custom-footer > *:not(.footer-rosart-wallpaper) {
    position: relative;
    z-index: 1;
}

.footer-links-label,
.footer-nav-link,
.footer-secondary-links li a {
    display: inline-block;
    background-color: var(--background-color);
    padding: 0.12em 0.22em;
}

/* Primary footer nav: tag-grid-adjacent chip (page fill + border); gap ~ tags-grid */
.footer-bottom-bar .nav li a {
    display: inline-block;
    padding: 0.4em 0.75em;
    background-color: var(--background-color);
    border: none;
    line-height: 1.2;
    box-sizing: border-box;
}

.footer-navigation {
    display: flex;
    flex-wrap: wrap;
}

.footer-navigation > ul {
    padding: calc(5vw * var(--scale)) calc(2.5vw * var(--scale)) calc(5vw * var(--scale)) calc(2.5vw * var(--scale));
    list-style: none;
    width: 50%;
}

.footer-navigation > ul:nth-child(2n) {
    border-left: none;
  }

.footer-navigation > ul:last-child:nth-child(odd) {
    width: 100%;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    column-gap: calc(5vw * var(--scale));
    row-gap: calc(3vw * var(--scale)); 
}

.footer-nav-link {
    color: var(--text-color);
    font-size: calc(3vw * var(--scale));
    line-height: 110%;
    text-decoration: none;
    font-family: var(--font1);
}

.footer-nav-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.footer-links-label {
    font-size: calc(2.8vw * var(--scale));
    line-height: 110%;
    margin-bottom: calc(3vw * var(--scale));
}

.footer-secondary-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    display: flex;
    column-gap: calc(3.3vw * var(--scale));
    row-gap: calc(1.8vw * var(--scale));
    padding-left: 0;
}

.footer-secondary-links li a {
    font-family: var(--font3);
    line-height: 100%;
    font-size: 20px;
    text-decoration-thickness: initial !important;
}

.footer-links-group > li {
    display: flex;
    flex-direction: column;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: calc(6.5vw * var(--scale)) calc(2.5vw * var(--scale)) calc(7vw * var(--scale)) calc(2.5vw * var(--scale));
}

.footer-socials-inner {
    display: flex;
    column-gap: calc(2.2vw * var(--scale));
    row-gap: calc(2.2vw * var(--scale));
    margin-top: 0;
    flex-wrap: wrap;
}

.social {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: calc(4.5vw * var(--scale));
    width: calc(4.5vw * var(--scale));
    height: calc(4.5vw * var(--scale));
    max-width: 60px;
    max-height: 60px;
    border: none;
    transition: all var(--ease-transition);
    cursor: pointer;
}

.social:hover path{
    fill: var(--background-color);
}

.social:hover {
    background-color: var(--text-color);
}

.social-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: calc(2.5vw * var(--scale));
    height: calc(2.5vw * var(--scale));
    max-width: 32px;
    max-height: 32px;
}

/* Cap social icons at 32px x 32px */
.social {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
}

.footer-bottom-bar {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: calc(1vw * var(--scale));
    padding: calc(1.8vw * var(--scale)) calc(2.5vw * var(--scale)) 100px calc(2.5vw * var(--scale));
}

.footer-bottom-bar .nav {
    min-height: 0;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    row-gap: calc(1vw * var(--scale));
    column-gap: calc(2.5vw * var(--scale));
    list-style: none;
}

.footer-bottom-bar .nav li a {
    font-family: var(--font1);
    font-weight: 300;
    letter-spacing: -0.03em;
    font-size: calc(32px * var(--scale));
    color: var(--text-color);
    text-decoration: none;
    word-break: normal;
}

.footer-bottom-bar .nav li a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

custom-footer ul li {
    line-height: 130%;
    margin-bottom: 0;
}





/* ========================================================================
   1. DESKTOP (1024px+; 1439px tier)
   ======================================================================== */
@media (min-width: 1439px) {
    .footer-nav-link:hover {
        text-decoration-thickness: calc(0.14vw * var(--scale));
    }

    .footer-secondary-links li a {
        font-size: calc(1.38vw * var(--scale));
    }  
    
}





/* ========================================================================
   2c. MOBILE (≤767px)
   ======================================================================== */
@media (max-width: 767px) {
    /* Wallpaper grid: extra nudge on small viewports so Rosart tiles do not seam into chrome above */
    .footer-rosart-wallpaper {
        top: 0.55rem;
    }

    .footer-nav-link:hover {
        text-decoration: none;
    }

    .footer-links-label {
        font-size: 36px;
        margin-bottom: 32px;
    }

    .footer-nav-link {
        font-size: 36px;
    }

    custom-footer {
        text-align: center;
    }

    .footer-navigation > ul {
        padding: 68px 30px 80px 30px;
        width: 100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-left: none !important;
    }

    .footer-navigation > ul li {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .footer-secondary-links {
        align-items: center;
        justify-content: center;
        column-gap: 46px;
        row-gap: 18px;
    }

    .footer-secondary-links li a {
        font-size: 18px;
    }

    .footer-nav {
        column-gap: 36px;
        row-gap: 36px;
    }

    .footer-socials {
        padding: 68px 30px 80px 30px;
    }
    
    .footer-socials-inner {
        column-gap: 26px;
        row-gap: 26px;
        margin-top: 0;
    }
    
    .social {
        min-width: 32px !important;
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
    
    .social-inner {
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }

    .footer-bottom-bar .nav {
        padding: 0;
        row-gap: 12px;
        column-gap: 20px;
    }

    .footer-bottom-bar {
        padding: 24px 30px 100px 30px;
        justify-content: center;
    }

    .footer-bottom-bar .nav li a {
        font-size: calc(30px * var(--scale));
    }
}





/* ========================================================================
   2c. MOBILE (≤479px)
   ======================================================================== */
@media (max-width: 479px) {
    .footer-links-label {
        font-size: 28px;
        margin-bottom: 28px;
    }

    .footer-navigation > ul {
        padding: 48px 18px 60px 18px;
        width: 100%;
    }

    .footer-secondary-links {
        flex-direction: column;
        column-gap: 40px;
    }

    .footer-secondary-links li a {
        font-size: 16px;
    }

    .footer-nav-link {
        font-size: 28px;
    }

    .footer-nav {
        column-gap: 28px;
        row-gap: 28px;
    }

    .footer-socials {
        padding: 48px 18px 60px 18px;
    }
    
    .footer-socials-inner {
        column-gap: 22px;
        row-gap: 22px;
        margin-top: 0;
    }
    
    .social {
        min-width: 32px !important;
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
    
    .social-inner {
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }

    .footer-bottom-bar .nav {
        padding: 0;
        row-gap: 10px;
        column-gap: 14px;
    }

    .footer-bottom-bar {
        padding: 18px 18px 100px 18px;
    }

    .footer-bottom-bar .nav li a {
        font-size: calc(24px * var(--scale));
        padding: 0.35em 0.55em;
    }
}

/* Homepage immersive: footer always visible; pad scroll area so content clears it */
body.homepage-immersive .viewport {
    padding-bottom: var(--homepage-immersive-footer-pad, 14rem);
    box-sizing: border-box;
}

body.homepage-immersive custom-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 40;
    box-sizing: border-box;
    background-color: var(--background-color);
    box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.08);
}

@media (prefers-reduced-motion: reduce) {
    body.homepage-immersive .viewport {
        padding-bottom: 0;
    }

    body.homepage-immersive custom-footer {
        position: relative;
        box-shadow: none;
    }
}
