/* TESORIN — shared editorial footer */

.footer {
  --footer-green: var(--ink, #0B0B0B);
  --footer-orange: var(--accent-terracotta, #BD6038);
  position: relative;
  border-top: 0;
  padding-top: clamp(72px, 8vw, 112px);
  background: #fff;
  color: var(--footer-green);
}

.footer-inner.footer-inner--minimal {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: stretch;
  column-gap: clamp(46px, 6vw, 94px);
  row-gap: 18px;
  background: #fff;
}

.footer-brand-col,
.footer-utility {
  display: contents;
}

.footer-editorial-lockup {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(270px, 420px) clamp(96px, 8vw, 124px);
  align-items: center;
  column-gap: clamp(12px, 1.5vw, 20px);
  width: min(100%, 620px);
  color: var(--footer-green);
  text-decoration: none;
}

.footer-brand-stack {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.footer-wordmark {
  display: block;
  font-family: var(--font-brand, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(32px, 3.25vw, 50px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: .20em;
  white-space: nowrap;
  color: var(--footer-green);
}

.footer-editorial-slogan {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 12px;
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--footer-green);
  white-space: nowrap;
}

.footer-editorial-slogan em {
  margin-right: .20em;
  /* The shared terracotta is 4.29:1 on the footer's white, just short of AA
     at the slogan's size; the About page's deeper tone of it clears it (5.33:1). */
  color: #A8532F;
  font-family: inherit;
  font-style: normal;
  font-weight: 400;
}

.footer-editorial-art {
  position: absolute;
  right: calc(100% - clamp(2px, .5vw, 8px));
  top: 50%;
  transform: translateY(-65%);
  display: block;
  width: clamp(96px, 8vw, 124px);
  max-width: 124px;
  align-self: center;
  justify-self: center;
  pointer-events: none;
}

.footer-editorial-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.footer-legal-links {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  align-self: stretch;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
}

.footer-legal-links a {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--footer-green);
  text-decoration: none;
  opacity: .72;
  transition: opacity 160ms ease;
}

.footer-legal-links a:hover {
  opacity: 1;
}

.footer-store-row {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: static;
  top: auto;
  right: auto;
  width: auto;
  max-width: 100%;
  margin: 5px 0 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
}

.footer-store-badges {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  width: max-content;
  max-width: 100%;
}

.footer-store-badge-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.footer-store-badge-rating {
  display: block;
  color: var(--footer-green);
  font-size: 15px;
  line-height: 1;
  letter-spacing: .10em;
  white-space: nowrap;
}

.footer-store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 40px;
  line-height: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.footer-store-badge:hover {
  opacity: .76;
  transform: translateY(-1px);
}

.footer-store-badge img {
  display: block;
  width: auto;
  height: 40px;
  max-width: none;
  object-fit: contain;
  transform: none;
}

.footer .footer-store-badge--apple img,
.footer .footer-store-badge--google img {
  width: auto;
  height: 40px;
  margin: 0;
}

.footer-social-list {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 20px;
  list-style: none;
  width: max-content;
}

.footer-social-list li {
  order: initial;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.footer-social-list li:first-child .footer-social-icon svg {
  display: block;
}

.footer-social-list li:first-child .footer-social-icon::before {
  content: none;
  display: none;
}

.footer-social-link {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  color: var(--footer-green);
  background: transparent;
  border: 0;
  border-radius: 0;
  line-height: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.footer-social-link:hover {
  opacity: .62;
  transform: translateY(-1px);
}

.footer-social-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 0;
  color: inherit;
}

.footer-social-icon svg {
  display: block;
  background: transparent;
  border-radius: 0;
  color: inherit;
}

.footer-social-icon--email svg { width: 23px; height: 23px; }
.footer-social-icon--facebook svg { width: 19px; height: 19px; }
.footer-social-icon--youtube svg { width: 24px; height: 24px; }
.footer-social-icon--reddit svg { width: 25px; height: 25px; }
.footer-social-icon--instagram svg { width: 22px; height: 22px; }
.footer-social-icon--x svg { width: 21px; height: 21px; }

.footer-social-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-meta {
  width: 100%;
  max-width: var(--max);
  margin: clamp(58px, 7vw, 92px) auto 0;
  padding: 23px var(--gutter) 42px;
  border-top: 1px solid rgba(11,11,11,.13);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  font-size: 12.5px;
  color: rgba(11,11,11,.62);
  background: #fff;
}

.footer-disclaimer {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 760px;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(11,11,11,.62);
  text-align: left;
}

.footer-meta a {
  color: var(--footer-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-copyright {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: nowrap;
  text-align: right;
  color: rgba(11,11,11,.62);
}

@media (max-width: 980px) {
  .footer-inner.footer-inner--minimal {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 42px;
  }

  .footer-brand-col,
  .footer-utility {
    display: grid;
  }

  .footer-brand-col { gap: 22px; }

  .footer-utility {
    justify-items: start;
    min-width: 0;
    width: 100%;
    gap: 24px;
  }

  .footer-editorial-lockup,
  .footer-legal-links,
  .footer-store-row,
  .footer-social-list {
    grid-column: auto;
    grid-row: auto;
  }

  .footer-editorial-lockup {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    width: 100%;
  }

  .footer-editorial-art {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    grid-column: 1;
    grid-row: 1;
    width: 104px;
    max-width: 104px;
  }

  .footer-brand-stack {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-store-row {
    justify-content: flex-start;
    margin-top: 0;
  }

  .footer-store-badges {
    justify-content: flex-start;
    gap: 12px;
  }

  .footer-social-list {
    justify-content: flex-start;
    gap: 18px;
    max-width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .footer { padding-top: 64px; }

  .footer-editorial-lockup {
    grid-template-columns: 78px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
  }

  .footer-editorial-art {
    width: 78px;
    max-width: 78px;
    margin-top: 1px;
  }

  .footer-wordmark {
    font-size: clamp(30px, 9vw, 40px);
    letter-spacing: .15em;
  }

  .footer-editorial-slogan {
    margin-top: 8px;
    font-size: clamp(15px, 4.5vw, 18px);
    white-space: normal;
  }

  .footer-meta {
    margin-top: 54px;
    padding-top: 20px;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
    display: grid;
    gap: 13px;
  }

  .footer-copyright {
    margin-left: 0;
    text-align: left;
  }
}

@media (max-width: 390px) {
  .footer-store-badges {
    gap: 10px;
  }

  .footer-store-badge,
  .footer-store-badge img {
    height: 40px;
  }

  .footer .footer-store-badge--apple img,
  .footer .footer-store-badge--google img {
    width: auto;
    height: 40px;
    margin: 0;
  }

  .footer-store-badge-rating {
    font-size: 14px;
  }

  .footer-social-list { gap: 16px; }

  .footer-editorial-lockup {
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 12px;
  }

  .footer-editorial-art {
    width: 68px;
    max-width: 68px;
  }
}

/* Apricity's pages: the books from its app icon, without the tile, to the
   left of its wordmark, and no store badges. apricity.css colours the
   books, as it does the hero's. */
.footer--apricity .footer-editorial-lockup {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(14px, 1.4vw, 20px);
  width: max-content;
  max-width: 100%;
}

.footer-app-glyph {
  display: block;
  width: clamp(76px, 6.6vw, 96px);
  height: auto;
  overflow: visible;
}
