footer {
  display: flex;
  flex-direction: column;
  padding: 4.125rem 0;
  gap: 3.375rem;
  border-top: 0.0625rem solid var(--background-color-tertiary);

  h3 {
    color: var(--color-display);
    font-size: var(--font-size-body);
  }

  hr {
    max-width: var(--page-max-width);
  }

  .newsletter {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: var(--page-max-width);
    padding: 0 var(--page-padding-horizontal);
    color: var(--color-caption);
    line-height: 1.8;

    & > div {
      &:first-child {
        flex-grow: 1;
        flex-shrink: 0;
        flex-basis: 0;

        div {
          width: fit-content;
        }
      }

      &:last-child {
        width: min-content;
      }
    }

    h3 {
      margin-bottom: 1rem;
    }

    .form {
      display: flex;
      margin-bottom: 0.75rem;
      gap: 0.75rem;

      input[type="email"] {
        position: relative;
        width: auto;
        min-width: 16rem;
        height: 2.625rem;
        padding: 0.75rem;
        border: none;
        border-radius: 0.375rem;
        outline-color: transparent;
        outline-style: solid;
        outline-width: 0;
        background-color: var(--background-color-secondary);
        transition:
          outline-color 240ms var(--ease-fluid),
          outline-width 180ms var(--ease-fluid),
          color 240ms var(--ease-fluid),
          background-color 240ms var(--ease-fluid);

        &::placeholder {
          color: var(--color-body);
        }

        &:focus-visible,
        &:hover {
          outline-color: var(--background-color-tertiary);
          outline-width: 0.125rem;
        }
      }

      .action {
        height: 2.5rem;
        border-radius: 0.5rem;
      }
    }

    span {
      display: inline-flex;
      padding: 0 0.25rem;
      font-size: var(--font-size-caption);
    }
  }

  .container {
    display: flex;
    padding: 2em var(--page-padding-horizontal) 0;
    gap: 2rem;

    & > div {
      width: fit-content;
      min-width: 14%;

      &:first-child {
        display: flex;
        flex-direction: column;
        margin-right: auto;
        gap: 1em;
        line-height: 1.8;

        a {
          color: var(--color-heading);
          font-weight: 600;
          transition: color 240ms var(--ease-fluid);

          &:focus,
          &:hover {
            color: var(--color-display);
          }
        }
      }

      &:last-child {
        margin-right: 1.5rem;
      }

      &:not(:first-child) {
        padding-left: 1.5rem;
      }

      .logo {
        color: var(--color-display);
        font-weight: 600;
        font-size: 0.875rem;
      }

      h3 {
        margin-bottom: 1.5rem;
      }

      ul {
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0;
        gap: 0.1875rem;
        list-style: none;

        li {
          a {
            display: block;
            min-height: 1.875rem;
            color: var(--color-caption);
            transition: color 240ms var(--ease-fluid);

            &:focus,
            &:hover {
              color: var(--color-display);
            }
          }
        }
      }
    }
  }

  @media (max-width: 60rem) {
    padding: 3.375rem 0;
    gap: 1.875rem;

    .newsletter {
      flex-direction: column;
      gap: 1.125rem;

      & > div {
        &:first-child,
        &:last-child {
          flex: none;
          width: 100%;

          div {
            width: 100%;
          }
        }
      }

      .form {
        flex-direction: column;
        width: 100%;

        .action {
          width: 100%;
        }
      }
    }

    .container {
      flex-direction: column;
      padding: var(--page-padding-vertical) var(--page-padding-horizontal);

      & > div {
        width: 100%;
        min-width: 100%;

        &:not(:first-child) {
          padding-left: 0;
        }
      }
    }
  }
}
