/* ==========================================
   ENGRAVED FOOTER
   ========================================== */
.site-footer {
    --engrave: #6eb3ff;
    --land: clamp(320px, 38vw, 540px);
    position: relative;
    margin-top: 32px;
    padding-bottom: var(--land);
    border-top: 1px solid var(--border);
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.4s;
}

[data-theme="light"] .site-footer {
    --engrave: #8c4a26;
}

.footer-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.footer-inner,
.footer-base {
    position: relative;
    z-index: 1;
}

/* Paper grain over the whole footer, echoing printed engravings */
.site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 72px 40px 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 40px;
}

.footer-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-mark .logo-t {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.footer-mark .t-horizontal { top: 3px; left: 1px; width: 24px; }
.footer-mark .t-vertical { top: 3px; height: 20px; }

.footer-name {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.footer-col h3 {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-subtle);
    margin-bottom: 22px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 22px;
    height: 1px;
    background: var(--accent);
}

.footer-col ul {
    list-style: none;
}

.footer-col li,
.footer-col p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-col a,
.footer-mail {
    color: var(--text-muted);
}

.footer-col a:hover,
.footer-mail:hover {
    color: var(--accent);
}

/* The global link rule always shows an underline; the footer reveals it on hover instead */
.site-footer a::after {
    background: var(--accent) !important;
    transform: scaleX(0) !important;
    transform-origin: left !important;
}

.site-footer a:hover::after {
    transform: scaleX(1) !important;
}

.footer-coords {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.footer-base {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 40px 28px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;
    font-size: 0.78rem;
    color: var(--text-subtle);
}

.footer-route [data-city] {
    cursor: default;
    outline: none;
    transition: color var(--transition);
}

.footer-route [data-city]:hover,
.footer-route [data-city]:focus-visible,
.footer-route [data-city].is-active {
    color: var(--accent);
}

.site-footer.is-exploring {
    touch-action: none;
    user-select: none;
}

@media (max-width: 800px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        padding: 56px 24px 32px;
        gap: 36px 24px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-base {
        flex-direction: column;
        padding: 0 24px 24px;
        gap: 8px;
    }
}
