.footer {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 1rem;
  align-items: end;
  margin-top: auto;
  padding: 32rem 1rem 1rem;
  font-size: 1.4rem;
  line-height: 1.3;
  background: white;
}

.footer a {
  text-decoration: none;
  color: black;
}

.footer a:not(.footer__pomodoro),
.footer__cookies {
  position: relative;
  display: inline-block;
  clip-path: inset(0);
  isolation: isolate;
}

.footer a:not(.footer__pomodoro)::before,
.footer__cookies::before {
  content: '';
  position: absolute;
  inset: 0;
  background: black;
  transform: translateX(-101%);
  z-index: -1;
}

.footer a:not(.footer__pomodoro):hover,
.footer__cookies:hover {
  color: white;
}

.footer a:not(.footer__pomodoro):hover::before,
.footer__cookies:hover::before {
  transform: translateX(0);
}

/* Pomodoro link: simple bg-color hover (icon overflows above the box,
   clip-path/overflow would crop it) */
.footer__pomodoro:hover {
  background: black;
  color: white;
}

.footer__copy {
  grid-column: 1;
}

.footer__cookies {
  grid-column: 2;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: black;
  cursor: pointer;
  text-align: left;
  justify-self: start;
}

.footer__contact {
  grid-column: 3 / 5;
  display: flex;
  flex-direction: column;
}

.footer__instagram {
  grid-column: 5;
}

.footer__credit {
  grid-column: 6;
  justify-self: end;
}

.footer__pomodoro {
  position: relative;
}

.footer__pomodoro-icon {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 0;
  height: 2.4rem;
  width: auto;
  pointer-events: none;
  transition: transform 1000ms cubic-bezier(0.34, 1.4, 0.64, 1);
}

.footer__pomodoro:hover .footer__pomodoro-icon {
  transform: rotate(360deg);
}

@media (max-width: 640px) {
  .footer {
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    row-gap: 0;
    padding: 34rem 1rem 1rem;
    font-size: 1.6rem;
  }

  .footer__contact {
    grid-column: 1;
    grid-row: 1;
  }

  .footer__instagram {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .footer__copy {
    grid-column: 1;
    grid-row: 2;
    margin-top: 6rem;
  }

  .footer__cookies {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0.5rem;
  }

  .footer__credit {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
  }
}
