/* ==============================================================================
   SITE FOOTER (templates/partials/footer.html)
   ============================================================================== */

/* The studio's card at the foot of every page: name, address and how to
   reach it in three columns, then a thin base with the legal links and
   the year. Same column as the header and the page, so the three edges
   line up. */
.site-footer {
  margin-top: var(--spacing-xl);
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* Width set on the box itself rather than through padding, so the
   base's top rule spans exactly the text column and not the gutters. */
.site-footer__grid,
.site-footer__base {
  width: min(100% - 2 * var(--spacing-lg), var(--content-max-width));
  margin-inline: auto;
}

/* auto-fit with a 14rem floor: three columns on a desktop, two on a
   tablet, one on a phone, without a breakpoint of its own. */
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--spacing-lg);
  padding-block: var(--spacing-xl);
}

.site-footer__name {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-title);
  font-size: var(--font-size-xl);
  font-weight: 700;
  line-height: 1.1;
}

.site-footer__address {
  font-style: normal;
  line-height: 1.6;
}

.site-footer__contact,
.site-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__contact {
  display: grid;
  gap: var(--spacing-xs);
  justify-items: start;
}

/* Links in the footer are underlined at rest: there is no other cue that
   a telephone number or an address can be clicked. */
.site-footer a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-color);
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  text-decoration-color: var(--accent-blue);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--spacing-sm) var(--spacing-lg);
  padding-block: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs) var(--spacing-lg);
}

.site-footer__rights {
  margin: 0;
}

@media (max-width: 48em) {
  .site-footer__grid,
  .site-footer__base {
    width: calc(100% - 2 * var(--spacing-md));
  }
}
