/* Footer */
footer {
    text-align: center;
    margin-top: 64px;
    padding: 32px 0;
    color: var(--text-muted);
    border-top: 1px solid rgba(139, 69, 19, 0.2);
}

/* ── Site footer ──────────────────────────────────────────────────────────
   (30 Nov 2026) The footer's one stylesheet. The footer itself is written into every page by
   scripts/site-footer.js; this file is how it looks, and every page with a footer links it. It used to be in
   style.css, with copies in the collection pages and songbook.css, which is how the pages drifted apart.
   Colours come from each page's own tokens (--text-accent, --border-color ...). A page's theme may still recolour
   its footer (the night-sky pages), but the layout lives only here. Dark mode: .dark-theme on the app pages,
   data-theme on the collection pages and the songbook. */
.site-footer {
    /* No fill. Every page's copy of this rule used `var(--surface-secondary)`, which
       is undefined and so resolved to transparent — pointing it at a real
       variable turned the footer into a visible card the site never had. */
    border-top: 1px solid var(--border-color);
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-link {
    color: var(--text-accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-icon {
    vertical-align: -2px;
    margin-right: 6px;
}

.footer-separator {
    color: var(--text-accent);
    margin: 0 12px;
}

.footer-copyright {
    text-wrap: balance;     /* phones: two even lines, not a lone word */
    color: var(--text-green, var(--text-accent));   /* never black text (Adam, 18 Nov 2026); dark below: muted */
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
}

.dark-theme .footer-separator,
.dark-theme .footer-copyright,
:root[data-theme="dark"] .footer-separator,
:root[data-theme="dark"] .footer-copyright {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .site-footer {
        padding: 30px 20px;
        margin-top: 40px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .footer-separator {
        display: none;
    }

    /* the social links stay one row of three on phones (Facebook, Instagram, YouTube), above the stacked legal links */
    .footer-links.footer-social {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px 22px;
    }
    .footer-links.footer-social a {
        margin: 0;
    }
}

/* Two rows (10 Nov 2026): TradChords' own social pages, then the legal links. A link never breaks inside itself */
.footer-links.footer-social {
    margin-bottom: 12px;
}
.footer-links a {
    white-space: nowrap;
}

footer a {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

/* Spacing belongs to the footer link row, not to every anchor in a footer —
   this margin was padding out links written inline in a sentence */
.footer-links a {
    margin: 0 12px;
}

footer a:hover {
    color: var(--text-secondary);
}

/* The tune list links in the footer (28 Nov 2026, SEO: plain links to /reels, /jigs ... on every page), a tighter row */
/* Even lines at every width (review 28 Nov: "• " left at a line's end, "All tunes with chords" alone on the next): the
   links as words in a balanced paragraph, spaced apart instead of dots, which a wrap leaves hanging */
.footer-links.footer-tunes { display: block; text-wrap: balance; line-height: 2; }
.footer-links.footer-tunes a { display: inline-block; margin: 0 9px; font-size: 0.85rem; line-height: 1.5; }
.footer-links.footer-tunes .footer-separator { display: none; }
