/* ===== SITE FOOTER =====
   Two rows: brand + links, then the fine print. Height comes from the content,
   which is the whole point — the previous three-column grid let a six-item link
   list set the row height for two columns that held one line each. */

footer.site-footer {
    margin-top: var(--space-lg);
    background: #060d06;
    color: var(--dark-text, #f0ede7);
    padding: var(--space-lg) var(--space-lg) var(--space-sm);
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.07));
    /* Reveal on scroll */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

footer.site-footer.footer--visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm) var(--space-lg);
}

/* ── Brand ───────────────────────────────────────────────── */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.footer-brand .brand-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.footer-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--gold, #c4a860);
    white-space: nowrap;
}

/* The tagline rides along on wide screens and steps out on narrow ones, where
   it would push the brand onto a second line for no gain — the landing hero
   already says it. */
.footer-tagline {
    font-size: 0.85rem;
    color: var(--muted-text, rgba(240, 237, 231, 0.55));
    padding-left: 0.6rem;
    border-left: 1px solid var(--border, rgba(255, 255, 255, 0.12));
}

/* ── Links ───────────────────────────────────────────────── */
/* This is a <nav>, and styles.css styles bare `nav` as *the* site navbar:
   background, border, shadow, and `position: sticky; z-index: 100`. Inherited
   here that meant 48 px of stray padding and a sticky footer link row. The
   landmark is worth keeping for screen readers, so the leak gets reset instead
   of the element getting swapped for a <div>. */
.footer-links {
    background: none;
    border-bottom: none;
    box-shadow: none;
    position: static;
    z-index: auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem var(--space-sm);
}

/* The tap target (padding-block) comes from interaction.css, which owns the
   44 px rule globally — setting it here too would just fight it. */
.footer-links a {
    color: var(--light-text, rgba(240, 237, 231, 0.65));
    text-decoration: none;
    font-size: 0.9rem;
    transition-property: color;
    transition-duration: 0.2s;
}

.footer-links a:hover {
    color: var(--gold, #c4a860);
}

/* ── Fine print ──────────────────────────────────────────── */
.footer-bottom {
    max-width: 1200px;
    margin: var(--space-sm) auto 0;
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--muted-text, rgba(240, 237, 231, 0.4));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem var(--space-sm);
}

/* The global `p` rule carries a 24 px bottom margin — on a one-line footer row
   that is more than the text itself. */
.footer-bottom p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-bottom .icon-svg {
    width: 0.85em;
    height: 0.85em;
}

@media (max-width: 768px) {
    footer.site-footer {
        padding: var(--space-md) var(--space-sm) var(--space-sm);
    }

    .footer-tagline {
        display: none;
    }

    .footer-inner,
    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    /* Two columns rather than a wrapping row: at 390 px every German legal
       label ("Datenschutzrichtlinie", "Nutzungsbedingungen") claims a line of
       its own, which turned five links into five rows. */
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, auto);
        justify-content: center;
        column-gap: var(--space-md);
        row-gap: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    footer.site-footer {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Light Mode ──────────────────────────────────────────── */
/* #f0f0ee rather than the Champagne White of the page body: the footer needs to
   read as a separate band, and an identical background makes it float. */
html:not(.dark-mode) footer.site-footer {
    background: #f0f0ee;
    border-top-color: rgba(0, 0, 0, 0.1);
    color: var(--dark-text);
}

html:not(.dark-mode) .footer-bottom {
    border-top-color: rgba(0, 0, 0, 0.08);
}

html:not(.dark-mode) .footer-tagline {
    border-left-color: rgba(0, 0, 0, 0.12);
}

html:not(.dark-mode) .footer-links a {
    color: var(--light-text, rgba(26, 44, 66, 0.65));
}

html:not(.dark-mode) .footer-links a:hover {
    color: var(--gold, #c4a860);
}
