/* Depends on: base.css. The footer sits inside #track (see viewport.css /
   js/state.js) so it scrolls along with the last section. */

/* ============================================================
   FOOTER
   ============================================================ */
/* Grid rather than flex + space-between, because of the logo in the
   middle: with space-between the centre item only lands in the true
   centre when the two columns happen to be the same width, and here
   they are not (a single button on the left, four social rows on the
   right). `auto 1fr auto` gives the logo the whole middle track to
   centre itself in, independent of what the columns weigh. */
footer.site-footer{
  background:var(--ink); color:var(--paper);
  padding:6vh clamp(20px,5vw,60px) 4vh;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:4vh clamp(20px,4vw,60px);
}
.footer-left{ display:flex; flex-direction:column; gap:1.6em; justify-self:start; }
.top-btn{
  display:inline-flex; align-items:center; gap:.6em;
  background:none; border:1px solid var(--paper); color:var(--paper);
  padding:.8em 1.6em; border-radius:999px; width:max-content;
  font-family:var(--body); font-weight:600; font-size:.85rem;
}

/* The brand lockup between the columns. Stencilled the same way as
   every other appearance of this file (see .s1-tagline-logo and
   .s2-back-logo): flat #0bbbef art masked over a paper fill, so it
   reads on the ink background. aspect-ratio comes from the SVG's own
   viewBox — a mask carries no intrinsic size to give the empty span a
   height of its own. */
.footer-logo{
  justify-self:center;
  display:block;
  width:min(300px,28vw);
  aspect-ratio:775.2 / 238.42;
  background-color:var(--paper);
  -webkit-mask-image:url("../assets/images/logo/brand_logo-logotype.svg");
  mask-image:url("../assets/images/logo/brand_logo-logotype.svg");
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain;
}

.footer-right{ display:flex; flex-direction:column; gap:.9em; align-items:flex-start; justify-self:end; }
.social-row{ display:flex; align-items:center; gap:.7em; font-size:.92rem; }
.social-row svg{ width:20px; height:20px; }
.credit{ margin-top:.6em; font-size:.78rem; opacity:.6; }
/* The studio name in that line is a link now. base.css's global
   `a { color: inherit; text-decoration: none }` would leave it
   indistinguishable from the words around it, so the underline is put
   back by hand. Hover recolours rather than brightening: the whole
   <p> is already at opacity .6, and a child cannot paint through more
   opacity than its parent has. */
.credit a{ text-decoration:underline; text-underline-offset:2px; transition:color .2s ease; }
.credit a:hover{ color:var(--gold-light); }

@media (max-width:760px){
  /* Stacked: one column, and the logo goes back to the same left edge
     as everything else rather than floating centred over a narrow
     column on its own. */
  footer.site-footer{ grid-template-columns:1fr; }
  .footer-left,
  .footer-logo,
  .footer-right{ justify-self:start; }
  .footer-logo{ width:min(300px,60vw); }
}
