/* FOOTER: the finale on the deep ground. The thread ends here and closes into the outline logo */
.footer {
  --c-thread: var(--c-accent);
  position: relative;
  background: var(--c-deep);
  color: var(--c-on-deep);
  padding-top: clamp(5rem, 12vh, 9rem);
  overflow: clip;
}

.footer__grid {
  row-gap: 2.5rem;
  align-items: start;
}

.footer__mark {
  grid-column: 1 / span 2;
  position: relative;
  width: clamp(4.5rem, 6vw, 6.5rem);
  aspect-ratio: 1;
}

.footer__logo {
  width: 100%;
  height: 100%;
  color: var(--c-on-deep);
}

.footer__ring {
  position: absolute;
  inset: -0.6rem;
  pointer-events: none;
}

/* area of the circle the thread draws around the logo (scripts/thread.ts) */
.footer__anchor {
  position: absolute;
  left: 50%;
  top: -0.6rem;
  width: 0;
  height: 0;
}

.footer__text {
  grid-column: 4 / span 4;
  max-width: 34ch;
  color: var(--c-on-deep-muted);
}

.footer__nav {
  grid-column: 8 / span 2;
}

.footer__nav ul,
.footer__contacts {
  display: grid;
  gap: 0.35rem;
  font-style: normal;
}

.footer__nav a,
.footer__contacts a {
  display: inline-block;
  padding-block: 0.25rem;
  justify-self: start;
}

.footer__contacts {
  grid-column: 10 / -1;
}

.footer__contacts span {
  color: var(--c-on-deep-muted);
}

.footer__word {
  margin-top: clamp(4rem, 10vh, 8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.8;
  white-space: nowrap;
  color: var(--c-on-deep);
  /* Full page width, edge to edge: close to the final size without JS, then fitted exactly
     to the name and the typeface by js/modules/fit.js */
  font-size: 17.6vw;
}

.footer__word-text {
  display: none;
  opacity: 0;
}

.footer__legal {
  margin-top: clamp(1.5rem, 3vw, 3rem);
  padding-block: 1.5rem;
  border-top: 1px solid rgb(238 241 236 / 0.14);
  font-size: var(--t-xs);
  color: var(--c-on-deep-muted);
  row-gap: 0.75rem;
}

.footer__legal>p {
  grid-column: 1 / span 6;
}

.footer__links {
  grid-column: 7 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.25rem 1.5rem;
}

.footer__links a {
  display: inline-block;
  padding-block: 0.25rem;
  transition: color 0.3s;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (hover: hover) {
  .footer__links a:hover {
    color: var(--c-on-deep);
  }
}

@media (max-width: 767px) {
  .footer__mark {
    grid-column: 1 / span 2;
  }

  .footer__text {
    grid-column: 1 / -1;
  }

  .footer__nav,
  .footer__contacts {
    grid-column: 1 / -1;
  }

  .footer__nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
  }

  .footer__legal>p,
  .footer__links {
    grid-column: 1 / -1;
    justify-content: start;
  }
}
