/* Site footer, after the Prime design artifact (without its contact band,
   PM 19 Nov): logo with description and round social buttons next to
   address and navigation columns, a legal row, and the P mark large and
   faint in the bottom right corner. */

@layer components {
  .site-footer {
    --theme-footer-title-gap: 20px;

    position: relative;
    overflow: hidden;
    background: var(--theme-color-inverse-soft);
    color: var(--theme-color-inverse-text);
  }

  .site-footer__mark {
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 720px;
    max-width: none;
    opacity: 0.06;
    filter: brightness(0) invert(1);
    pointer-events: none;
  }

  .site-footer__inner {
    position: relative;
    width: min(100% - 2 * var(--theme-gutter), var(--theme-container));
    margin-inline: auto;
  }

  .site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-block: 72px 80px;
  }

  @media (width >= 37.5rem) {
    .site-footer__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (width >= 68.75rem) {
    .site-footer__grid {
      grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
    }

    /* The navigation has no visible title (PM, 17 Nov): its links line up
       with the address below the "Bezoekadres" title (the title's margins
       plus its 0.75rem text at line height 1.2). */
    .site-footer__nav {
      padding-top: calc(6px + var(--theme-footer-title-gap) + 0.9rem);
    }
  }

  .site-footer__logo img {
    width: auto;
    height: 36px;
  }

  .site-footer__about {
    max-width: 330px;
    margin-top: 22px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgb(255 255 255 / 80%);
  }

  .site-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    list-style: none;
  }

  .site-footer__social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1.5px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    color: var(--theme-color-inverse-text);
    transition:
      background-color 0.3s,
      color 0.3s,
      border-color 0.3s;
  }

  .site-footer__social a:hover {
    border-color: var(--theme-color-contrast);
    background: var(--theme-color-contrast);
    color: var(--theme-color-primary);
  }

  .site-footer__social svg {
    width: 18px;
    height: 18px;
  }

  .site-footer__title {
    margin: 6px 0 var(--theme-footer-title-gap);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 66%);
  }

  .site-footer__address {
    font-size: 0.9375rem;
    font-style: normal;
    line-height: 1.8;
  }

  .site-footer__menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
  }

  .site-footer__address a,
  .site-footer__menu a {
    color: var(--theme-color-inverse-text);
    font-size: 0.9375rem;
    text-decoration: none;
  }

  .site-footer__address a:hover,
  .site-footer__menu a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding-block: 26px 30px;
    border-top: 1px solid rgb(255 255 255 / 14%);
    font-size: 0.8125rem;
    color: rgb(255 255 255 / 72%);
  }

  .site-footer__bottom a {
    color: rgb(255 255 255 / 88%);
    text-decoration: none;
  }

  .site-footer__bottom a:hover {
    text-decoration: underline;
  }

  /* Lower screens (laptops): tighter spacing so the footer still fits the
     viewport and keeps the reveal effect below. */
  @media (height <= 53rem) {
    .site-footer__grid {
      padding-block: 44px 48px;
    }

    .site-footer {
      --theme-footer-title-gap: 14px;
    }

    .site-footer__menu {
      gap: 8px;
    }
  }

  /* Footer reveal: the footer is pinned underneath and the page slides
     away from it. Only when site.js sets data-footer-reveal (footer fits
     in the viewport); otherwise the footer is a normal block. */
  html[data-footer-reveal] .site-main {
    position: relative;
    z-index: 1;
    margin-bottom: var(--theme-footer-height);
    background: var(--theme-color-background);
  }

  html[data-footer-reveal] .site-footer {
    position: fixed;
    inset: auto 0 0;
    z-index: 0;
  }
}
