#footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px) minmax(0, 1fr);
  align-items: center;
  column-gap: 24px;
  row-gap: 20px;
}

#footer .copy {
  justify-self: start;
  margin: 0;
}

#footer .footer-signup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  justify-self: center;
}

#footer .footer-signup label {
  color: var(--text-light);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

#footer .footer-signup-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--border);
  background-color: var(--bg);
}

#footer .footer-signup input[type="email"] {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
}

#footer .footer-signup input[type="email"]::placeholder {
  color: var(--text-light);
}

#footer .footer-signup input[type="email"]:focus {
  outline: 0;
}

#footer .footer-signup-row:focus-within {
  border-color: var(--green);
}

#footer .footer-signup button {
  border: 0;
  border-left: 1px solid var(--border);
  background-color: var(--green);
  color: var(--bg);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0 18px;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

#footer .footer-signup button:hover,
#footer .footer-signup button:focus-visible {
  background-color: transparent;
  color: var(--green);
}

#footer .footer-signup-honeypot {
  position: absolute;
  left: -5000px;
}

@media (max-width: 980px) {
  #footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  #footer .copy,
  #footer .footer-signup,
  #footer .links {
    justify-self: start;
  }

  #footer .footer-signup {
    max-width: 440px;
  }
}

@media (min-width: 981px) {
  #footer .links {
    justify-self: end;
  }
}

@media (max-width: 760px) {
  #footer .links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  #footer .footer-signup-row {
    flex-direction: column;
  }

  #footer .footer-signup button {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding: 12px 18px;
  }
}
