﻿/* Site footer — compact layout (no Vite rebuild required) */

.site-footer {
    position: relative;
    margin-top: 3rem;
    /* Keep visible so the upward locale dropdown is not clipped */
    overflow: visible;
    border-top: 1px solid rgba(20, 18, 16, 0.1);
    background: rgba(240, 236, 230, 0.6);
}

/* Only elevate footer while language menu is open — avoid covering maximized tools */
.site-footer:has(.locale-menu.is-open) {
    z-index: 40;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 92, 38, 0.28), transparent);
    pointer-events: none;
}

.site-footer-cta {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(20, 18, 16, 0.08);
    background: linear-gradient(135deg, rgba(196, 92, 38, 0.07) 0%, rgba(255, 252, 248, 0.9) 50%, rgba(240, 236, 230, 0.75) 100%);
}

.site-footer-cta-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0;
}

@media (min-width: 640px) {
    .site-footer-cta-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

.site-footer-cta-title {
    margin: 0;
    font-family: Fraunces, "Noto Serif SC", serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: #141210;
}

.site-footer-cta-lead {
    margin: 0.375rem 0 0;
    max-width: 28rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #6b6560;
}

.site-footer-cta-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.site-footer-grid {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 1.75rem 1.5rem;
    padding: 2rem 0 1.75rem;
}

@media (min-width: 640px) {
    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .site-footer-grid {
        grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
        gap: 2rem;
        padding: 2.25rem 0 2rem;
    }
}

.site-footer-brand {
    min-width: 0;
}

.site-footer-brand-logo {
    display: inline-block;
    text-decoration: none;
}

.site-footer-brand-logo .site-brand-lockup-footer {
    display: block;
    max-width: 9.5rem;
    height: auto;
}

.site-footer-tagline {
    margin: 0.75rem 0 0;
    max-width: 18rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #6b6560;
}

.site-footer-locale {
    margin-top: 1rem;
    position: relative;
    max-width: 16rem;
}

.site-footer-col-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #141210;
}

.site-footer-col-title--sub {
    margin-top: 1rem;
}

.site-footer-links {
    margin: 0.625rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.375rem;
}

@media (min-width: 480px) {
    .site-footer-col:not(.site-footer-brand) .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 0.75rem;
    }

    .site-footer-col:not(.site-footer-brand) .site-footer-col-title--sub + .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .site-footer-col:not(.site-footer-brand) .site-footer-links {
        grid-template-columns: 1fr;
    }
}

.site-footer-links li {
    min-width: 0;
}

.footer-link {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b6560;
    text-decoration: none;
    transition: color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.footer-link:hover {
    color: #c45c26;
}

.footer-link-inline {
    display: inline;
    white-space: normal;
}

.site-footer-bottom {
    border-top: 1px solid rgba(20, 18, 16, 0.1);
}

.site-footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.875rem 0;
    font-size: 0.75rem;
    color: #9c9690;
}

@media (min-width: 768px) {
    .site-footer-bottom-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem 1.25rem;
    }
}

.site-footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.5rem;
}

.site-footer-dot {
    color: #c8c2ba;
}

/* Language menu under brand tagline — scales to 7–8+ locales */
.locale-menu--footer {
    position: relative;
    z-index: 1;
}

.locale-menu--footer.is-open {
    z-index: 60;
}

.site-footer-brand:has(.locale-menu.is-open) {
    position: relative;
    z-index: 60;
}

.locale-menu-label {
    margin: 0 0 0.4rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a847c;
}

.locale-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    max-width: 15rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(28, 24, 20, 0.12);
    border-radius: 0.65rem;
    background: rgba(255, 253, 249, 0.92);
    color: #1c1814;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.locale-menu-trigger:hover,
.locale-menu.is-open .locale-menu-trigger {
    border-color: rgba(196, 92, 38, 0.35);
    box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.08);
}

.locale-menu-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.locale-menu-chevron {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
    opacity: 0.55;
    transition: transform 0.15s;
}

.locale-menu.is-open .locale-menu-chevron {
    transform: rotate(180deg);
}

.locale-menu-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.4rem);
    z-index: 70;
    width: min(100%, 15rem);
    max-height: min(16rem, 50vh);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(28, 24, 20, 0.1);
    border-radius: 0.75rem;
    background: #fffdf9;
    box-shadow: 0 14px 32px rgba(28, 24, 20, 0.18);
}

.locale-menu-panel[hidden] {
    display: none !important;
}

.locale-menu-list {
    margin: 0;
    padding: 0.35rem;
    list-style: none;
}

.locale-menu-form {
    margin: 0;
}

.locale-menu-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    padding: 0.55rem 0.65rem;
    color: #1c1814;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.locale-menu-option:hover {
    background: rgba(196, 92, 38, 0.07);
}

.locale-menu-option.is-active {
    background: rgba(196, 92, 38, 0.1);
    font-weight: 600;
    color: #c45c26;
}

.locale-menu-option-native {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.locale-menu-option-code {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #8a847c;
}

.locale-menu-option.is-active .locale-menu-option-code {
    color: #c45c26;
}

html[lang="en"] .site-footer-tagline {
    max-width: 20rem;
}

html[lang="en"] .footer-link {
    font-size: 0.8125rem;
}

html[lang="zh-CN"] .site-footer-col:not(.site-footer-brand) .site-footer-links {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) and (max-width: 1023px) {
    html[lang="zh-CN"] .site-footer-col:not(.site-footer-brand) .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
