/* Shared footer layout. All five content groups stay in normal grid flow. */
body footer.site-footer {
  position:relative; inset:auto; display:grid; width:100%; max-width:none; height:auto; min-height:0;
  grid-template-columns:160px minmax(0,1fr) 160px;
  grid-template-areas:"brand socials ." "brand legal ." "languages copyright .";
  grid-template-rows:auto auto auto; align-items:center; align-content:center; justify-items:center;
  gap:6px 24px; margin:0; padding:24px max(28px,calc((100% - 1180px)/2)) 28px;
  border-top:1px solid #ff00904d; background:#030303; text-align:center; box-sizing:border-box;
}
body footer.site-footer > :is(.footer-brand,.socials,.legal,.languages,p) { position:static; inset:auto; transform:none; min-width:0; max-width:100%; margin:0; align-self:center; justify-self:center; }
body footer.site-footer > .footer-brand { grid-area:brand; width:140px; }
body footer.site-footer .footer-brand img { display:block; width:100%; max-width:140px; height:auto; }
body footer.site-footer .footer-brand span { display:block; width:100%; margin:7px 0 0; font:400 12px/1.2 var(--display); letter-spacing:.16em; color:var(--pink); }
body footer.site-footer > .socials { grid-area:socials; display:flex; flex-wrap:nowrap; align-items:center; justify-content:center; gap:6px; width:auto; margin:0; }
body footer.site-footer .socials a { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; border-radius:50%; border:1px solid #3c3038; background:linear-gradient(#151115,#050405); }
body footer.site-footer .socials svg { width:25px; height:25px; }
body footer.site-footer > .legal { grid-area:legal; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:0 16px; }
body footer.site-footer .legal a,body footer.site-footer .legal button { display:inline-flex; align-items:center; justify-content:center; min-height:36px; margin:0; padding:0; border:0; font:400 17px/1.2 var(--display); letter-spacing:.035em; white-space:nowrap; }
body footer.site-footer > p { grid-area:copyright; margin:0; font:400 12px/1.5 var(--body); letter-spacing:0; color:#a99fa5; white-space:normal; text-wrap:balance; }
body footer.site-footer > .languages { grid-area:languages; display:flex; gap:6px; align-items:center; justify-content:center; padding:5px 8px; width:auto; margin:0!important; border-radius:10px; }
body footer.site-footer .languages button { display:grid; place-items:center; width:46px; min-width:46px; height:38px; min-height:38px; padding:0; }
body footer.site-footer .languages button + button { margin:0; padding-left:6px; }
body footer.site-footer :is(a,button):focus-visible { outline:2px solid #fff; outline-offset:3px; }
@media (min-width:1200px) {
  #contact .contact__inner { min-height:0; height:calc(100dvh - 182px)!important; }
  #contact footer.site-footer { height:180px; padding-top:14px; padding-bottom:14px; }
}
@media (max-width:1199px), (any-pointer:coarse) and (max-width:1366px) {
  body footer.site-footer { grid-template-columns:128px minmax(0,1fr) 128px; gap:6px 14px; padding-inline:32px; }
  body footer.site-footer > .footer-brand { width:120px; }
  body footer.site-footer .socials a { flex-basis:40px; width:40px; height:40px; }
  body footer.site-footer .socials { gap:4px; }
  body footer.site-footer .socials svg { width:24px; height:24px; }
  body footer.site-footer .legal a,body footer.site-footer .legal button { font-size:16px; }
  #contact footer.site-footer { height:auto; padding-bottom:90px; }
}
@media (max-width:1099px) {
  body footer.site-footer.site-footer--route { padding-bottom:164px; }
  #contact footer.site-footer { padding-bottom:228px; }
}
@media (max-width:739px) {
  body footer.site-footer { grid-template-columns:minmax(0,1fr); grid-template-rows:auto; grid-template-areas:"brand" "socials" "legal" "languages" "copyright"; gap:12px; padding:26px 20px 164px; }
  body footer.site-footer > .footer-brand { width:120px; }
  body footer.site-footer > .socials { gap:2px; }
  body footer.site-footer .socials a { flex-basis:44px; width:44px; height:44px; }
  body footer.site-footer > .legal { gap:0 18px; }
  body footer.site-footer .legal a,body footer.site-footer .legal button { min-height:44px; font-size:17px; }
  body footer.site-footer .languages button { height:44px; min-height:44px; }
  body footer.site-footer > p { max-width:32ch; font-size:12px; }
}
@media (max-width:360px) {
  body footer.site-footer { padding-inline:16px; }
  body footer.site-footer .socials a { flex-basis:38px; width:38px; height:40px; }
  body footer.site-footer .socials svg { width:23px; height:23px; }
  body footer.site-footer > .legal { gap:0 12px; }
  body footer.site-footer .legal a,body footer.site-footer .legal button { font-size:16px; }
}
@media (min-width:601px) and (max-width:1000px) and (max-height:500px) {
  #contact footer.site-footer { padding-bottom:164px; }
}

/* Short desktop windows retain a complete form above the footer. */
@media (min-width:1200px) and (max-height:760px) and (pointer:fine) {
  #contact .contact__inner { height:calc(100dvh - 154px)!important; padding-top:18px; }
  #contact .contact-cards { margin-top:12px; margin-bottom:12px; }
  #contact footer.site-footer { height:152px; gap:4px 24px; padding-top:10px; padding-bottom:10px; }
  #contact footer.site-footer > .footer-brand { width:120px; }
  #contact footer.site-footer .socials a { flex-basis:40px; width:40px; height:40px; }
  #contact footer.site-footer .legal a,#contact footer.site-footer .legal button { min-height:32px; }
}

/* The collection's legacy logo width must follow the shared footer column. */
body #downloads footer.site-footer .footer-brand :is(img,span) { width:100%; max-width:100%; }

/* At small landscape-tablet widths the player has its own right-hand space. */
@media (min-width:1024px) and (max-width:1099px) {
  #contact footer.site-footer { padding-bottom:90px; }
  #contact footer.site-footer > p { max-width:32ch; }
}

@media (min-width:740px) and (max-width:1023px) and (min-height:501px) {
  #contact footer.site-footer { padding-bottom:204px; }
}

/* No bottom navigation: only reserve room for the compact audio player. */
@media (max-width:1199px), (any-pointer:coarse) and (max-width:1366px) {
  #contact footer.site-footer { padding-bottom:28px; }
}
@media (max-width:1023px) {
  #contact footer.site-footer { padding-bottom:164px; }
}

/* Return within the full biography; never switches to the Home chapter. */
#about-full footer.site-footer .bio-back-top {
  grid-column:1/-1; grid-row:4; justify-self:center; display:grid; place-items:center;
  width:52px; height:52px; min-width:52px; padding:12px; margin:6px 0 0;
  border:1px solid var(--pink); border-radius:50%; color:#fff;
  background:linear-gradient(145deg,#ff009024,#090409); box-shadow:inset 0 1px 1px #ffffff80,0 0 15px #ff009030;
  cursor:pointer; transition:background .2s,box-shadow .2s;
}
#about-full footer.site-footer .bio-back-top svg { display:block; width:26px; height:26px; transition:transform .2s; }
#about-full footer.site-footer .bio-back-top:hover { background:#ff009050; box-shadow:0 0 22px #ff009060; }
#about-full footer.site-footer .bio-back-top:hover svg { transform:translateY(-3px); }
#about-full footer.site-footer .bio-back-top:focus-visible { outline:2px solid #fff; outline-offset:4px; }
@media(max-width:739px) { #about-full footer.site-footer .bio-back-top { grid-row:6; } }
@media(prefers-reduced-motion:reduce) {
  #about-full footer.site-footer .bio-back-top,#about-full footer.site-footer .bio-back-top svg { transition:none; }
  #about-full footer.site-footer .bio-back-top:hover svg { transform:none; }
}

/* Contact footer has a dedicated mobile order, independent of legacy page-grid rules. */
@media (max-width:600px) {
  #contact footer.site-footer {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"brand" "languages" "socials" "legal" "copyright"!important;
    grid-template-rows:auto!important;
    align-items:center;
    justify-items:center;
    gap:9px!important;
    min-height:0;
    padding:20px 16px calc(94px + env(safe-area-inset-bottom))!important;
  }
  #contact footer.site-footer > .footer-brand { grid-area:brand!important; width:132px!important; justify-self:center!important; }
  #contact footer.site-footer .footer-brand img { width:132px!important; max-width:132px!important; }
  #contact footer.site-footer .footer-brand span { margin-top:5px; font-size:11px; letter-spacing:.13em; }
  #contact footer.site-footer > .languages {
    position:static!important;
    grid-area:languages!important;
    justify-self:center!important;
    display:flex!important;
    width:auto!important;
    margin:0!important;
    padding:4px 7px;
  }
  #contact footer.site-footer .languages button { width:40px; min-width:40px; height:36px; min-height:36px; }
  #contact footer.site-footer > .socials { grid-area:socials!important; display:flex!important; width:100%; gap:4px; flex-wrap:nowrap; justify-content:center; }
  #contact footer.site-footer .socials a { flex:0 0 38px; width:38px; height:38px; }
  #contact footer.site-footer > .legal { grid-area:legal!important; gap:0 12px; justify-self:center!important; }
  #contact footer.site-footer .legal a,#contact footer.site-footer .legal button { min-height:30px; font-size:15px; }
  #contact footer.site-footer > p { grid-area:copyright!important; max-width:34ch; font-size:11px; }
}
