/**
 × footer_css v2.02 × updated 2026-10-04 ×
 × created 2025-12-03 × raimundo p. solar ×
 × Site footer ×
 **/

/* --------------------------------------------------
   SITE FOOTER
-------------------------------------------------- */

.site-footer {
  --footer-background: var(--color-orange);

  --footer-text: var(--color-black, #141414);

  --footer-credit: var(--color-orange);

  --footer-credit-shadow: rgba(10, 24, 48, 0.5);

  --footer-csg-height: 2.75rem;

  margin-top: calc(var(--breche-l) * 2);

  color: var(--footer-text);

  background: var(--footer-background);
}

.site-footer__inner {
  padding-top: calc(var(--breche-m) * 1.1);

  padding-bottom: calc(var(--breche-m) * 1.1);
}

.site-footer__grid {
  align-items: stretch;
}

/* --------------------------------------------------
   NEWSLETTER
-------------------------------------------------- */

.site-footer__newsletter {
  display: flex;

  flex-direction: column;

  width: 100%;

  min-width: 0;
}

.site-footer__heading {
  margin: 0 0 calc(var(--breche-s) * 0.45);
}

/* --------------------------------------------------
   SUBSCRIBE LINK
   The list (canids-l@maillist.ox.ac.uk) only accepts
   subscriptions by email, so this opens the visitor's
   mail app instead of posting a form.
-------------------------------------------------- */

.site-footer__subscribe {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    1.65rem;

  align-items: center;

  width: 100%;

  min-height: 1.65rem;

  color: var(--footer-text);

  text-decoration: none;

  border-bottom: 1px solid var(--footer-text);

  -webkit-tap-highlight-color: transparent;
}

.site-footer__subscribe:visited {
  color: var(--footer-text);
}

.site-footer__subscribe-arrow {
  display: grid;

  width: 1.65rem;

  height: 1.65rem;

  place-items: center;

  transition:
    color 140ms ease,
    background-color 140ms ease;
}

.site-footer__subscribe-arrow svg {
  display: block;

  width: 0.46rem;

  height: 0.67rem;
}

.site-footer__subscribe:hover .site-footer__subscribe-arrow,
.site-footer__subscribe:focus-visible .site-footer__subscribe-arrow {
  color: var(--footer-background);

  background: var(--footer-text);
}

.site-footer__note {
  margin: calc(var(--breche-s) * 0.45) 0 0;
}

.site-footer__note a,
.site-footer__note a:visited {
  color: inherit;

  text-decoration: underline;

  text-decoration-thickness: 0.075em;

  text-underline-offset: 0.16em;
}

/* --------------------------------------------------
   SOCIAL MEDIA
-------------------------------------------------- */

.site-footer__socials {
  display: flex;

  align-items: center;

  gap: var(--breche-s);

  min-height: 1.35rem;

  margin-top: auto;

  padding-top: calc(var(--breche-s) * 0.75);
}

.site-footer__social-link {
  display: grid;

  width: 1.35rem;

  height: 1.35rem;

  padding: 0;

  place-items: center;

  color: inherit;

  text-decoration: none;

  user-select: none;

  -webkit-user-select: none;

  -webkit-tap-highlight-color: transparent;

  transition: opacity 140ms ease;
}

.site-footer__social-link:hover {
  opacity: 0.45;
}

.site-footer__social-link svg {
  display: block;

  width: 1.05rem;

  height: 1.05rem;

  pointer-events: none;

  user-select: none;

  -webkit-user-select: none;

  -webkit-user-drag: none;
}

/* --------------------------------------------------
   CSG ORGANISATION
-------------------------------------------------- */

.site-footer__organisation {
  display: flex;

  flex-direction: column;

  align-items: flex-end;

  justify-content: flex-end;

  width: 100%;

  min-width: 0;
}

.site-footer__organisation-link {
  display: inline-flex;

  max-width: 100%;

  align-items: center;

  justify-content: flex-end;

  color: inherit;

  text-decoration: none;

  user-select: none;

  -webkit-user-select: none;

  -webkit-tap-highlight-color: transparent;

  transition: opacity 140ms ease;
}

.site-footer__organisation-link:hover {
  opacity: 0.55;
}

.site-footer__organisation-logo {
  display: block;

  width: auto;

  max-width: 100%;

  height: var(--footer-csg-height);

  object-fit: contain;

  object-position: right center;

  pointer-events: none;

  user-select: none;

  -webkit-user-select: none;

  -webkit-user-drag: none;
}

/* --------------------------------------------------
   CREDIT
-------------------------------------------------- */

.site-footer__credit {
  display: flex;

  min-height: 1.35rem;

  margin: calc(var(--breche-s) * 0.75) 0 0;

  padding: 0;

  align-items: center;

  justify-content: flex-end;

  color: var(--footer-credit);

  line-height: 1;

  text-align: right;

  text-shadow: 0.5px -0.5px 0 var(--footer-credit-shadow);
}

/* --------------------------------------------------
   KEYBOARD FOCUS
-------------------------------------------------- */

.site-footer__social-link:focus-visible,
.site-footer__organisation-link:focus-visible {
  outline: 1px solid var(--footer-text);

  outline-offset: 3px;
}

/* --------------------------------------------------
   ACCESSIBILITY
-------------------------------------------------- */

.site-footer__screen-reader-text {
  position: absolute;

  width: 1px;

  height: 1px;

  padding: 0;

  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}

/* --------------------------------------------------
   MOBILE
-------------------------------------------------- */

@media (max-width: 639px) {
  .site-footer {
    --footer-csg-height: 1.9rem;

    margin-top: var(--breche-l);
  }

  .site-footer__inner {
    padding-top: var(--breche-m);

    padding-bottom: var(--breche-m);
  }

  .site-footer__grid {
    row-gap: var(--breche-m);
  }

  .site-footer__newsletter,
  .site-footer__organisation {
    min-height: auto;
  }

  .site-footer__socials {
    margin-top: var(--breche-s);

    padding-top: 0;
  }

  .site-footer__organisation {
    justify-content: flex-start;
  }
}

/* --------------------------------------------------
   SMALL MOBILE
-------------------------------------------------- */

@media (max-width: 420px) {
  .site-footer {
    --footer-csg-height: 1.65rem;
  }

  .site-footer__credit {
    white-space: normal;
  }
}
