/* ==========================================================================
   footer.css - the site footer, one file for every page (2026-11-16). site.css
   pages load it after site.css; the masterclass page (own inline styles) loads
   it on its own, so every variable has a fallback. application.html keeps its
   minimal footer and does not load this.
   ========================================================================== *
 * Quiet (Jonas 2026-11-16): the wordmark, the mark and the group headings in
 * one grey, in the wordmark's font; the links a touch smaller and tight. Phones
 * and tablets: "Links" and "Legal" fold up (a tap on the heading opens one,
 * site.js), YouTube / Contact / the email are plain rows below them. Without
 * JS every list is simply there. */

.site-footer {
  border-top: var(--rule, 1px solid #1E1E21);
  padding-block: clamp(2rem, 4vw, 2.75rem) 1.75rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  --footer-link: #7D7D83; /* 4.8:1 on ink */
}
.footer-grid {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 820px) {
  .footer-grid { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
}

/* the wordmark in the footer (the header's .brand lives in site.css; the masterclass page has no site.css) */
.site-footer .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  white-space: nowrap;
  text-decoration: none;
}
.site-footer .brand .mark {
  height: 1.4rem;
  aspect-ratio: 166 / 120;
  background: url("../img/logo-mark.png?v=5") center / contain no-repeat;
  flex: none;
}
.site-footer .footer-independence { margin: 0; text-transform: none; letter-spacing: normal; font-family: inherit; }
.site-footer .brand { color: var(--footer-link); }
.site-footer .brand:hover { color: var(--paper, #FFFFFF); }
.site-footer .brand .mark { filter: grayscale(1) brightness(1.12); }
.site-footer h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 0.92rem;
  color: var(--footer-link);
  margin-bottom: 0.55rem;
}
.footer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: default;
}
.footer-toggle:focus-visible { outline: 2px solid var(--red, #E0533B); outline-offset: 3px; }
.footer-chev { display: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.site-footer a { color: var(--footer-link); font-size: 0.82rem; }
.site-footer a:hover { color: var(--paper, #FFFFFF); }
.footer-tag { color: var(--footer-link); max-width: 34ch; margin-top: 0.8rem; font-size: 0.82rem; }
.footer-base {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-top: 1.1rem;
  border-top: var(--rule, 1px solid #1E1E21);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #6E6E73;
}
.footer-base a { margin-left: auto; color: inherit; }
.footer-base a:hover { color: var(--paper, #FFFFFF); }
@media (max-width: 819.98px) {
  .footer-brand { margin-bottom: 1.5rem; }
  .footer-grid { border-bottom: var(--rule, 1px solid #1E1E21); }
  .footer-col { border-top: var(--rule, 1px solid #1E1E21); }
  .site-footer .footer-col h4 { margin: 0; }
  .footer-toggle { padding: 0.8rem 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .footer-chev {
    display: block;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px 0;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    rotate: 45deg;
    transition: rotate 0.25s var(--ease, cubic-bezier(0.22, 0.61, 0.36, 1));
  }
  .footer-col.is-open .footer-chev { rotate: -135deg; margin: 4px 4px 0 0; }
  html.footer-js .footer-col:not(.is-open):not(.footer-col--contact) > ul { display: none; }
  .footer-col > ul { padding-bottom: 0.9rem; }
  /* YouTube, Contact and the email: rows of their own after the two groups, in the headings' look, no chevron */
  .footer-col--contact { order: 10; border-top: 0; }
  .footer-col--contact h4 { display: none; }
  .footer-col--contact > ul { display: flex; flex-direction: column; gap: 0; padding: 0; }
  .footer-col--contact li { border-top: var(--rule, 1px solid #1E1E21); }
  .footer-col--contact li a {
    display: block;
    padding: 0.8rem 0;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-size: 0.92rem;
  }
  .footer-col--contact li.fc-youtube { order: 1; }
  .footer-col--contact li.fc-contact { order: 2; }
  .footer-col--contact li.fc-mail { order: 3; }
}
