/* ==========================================================================
 * Moodlogue — the site footer (index.html and product.html): a contact
 * heading with email and Instagram icons, a black strip of five links, the
 * wordmark large on white, and the black legal strip. Loaded after styles.css
 * (and after home.css on the homepage, which adds only the rules that make the
 * footer the last full-screen panel of its sequence).
 * ========================================================================== */

.site-footer {
  padding: clamp(48px, 6vw, 80px) var(--margin) 0;
  border-top: 0;
  background: #ffffff;
  color: #111111;
  font-family: var(--home-font, "Inter", system-ui, sans-serif);
}

.site-footer a {
  color: #3f3f3f;
  font-size: 15px;
  line-height: 1.5;
}

.site-footer a:hover {
  color: #000000;
}

/* The footer reads in four layers: the contact heading and icons near the
 * top, a black strip of links, the wordmark large on white, and the fine
 * print in black at the bottom. The space between them grows with the
 * screen's height; any left over goes around the wordmark. */

/* Still confused? Reach out to us. Light and editorial like the founder
 * quote: one line, each sentence on its own line on phones. */
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(40px, calc(var(--home-panel-h, 100svh) * 0.06), 80px);
  text-align: center;
}

.site-footer .footer-contact h2 {
  margin: 0 0 clamp(32px, 3vw, 48px);
  font-family: var(--home-font, "Inter", system-ui, sans-serif);
  font-size: clamp(34px, 2.6vw + 18px, 60px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: none;
  white-space: nowrap;
}

.footer-contact-links {
  gap: clamp(16px, 1.6vw, 24px);
  margin-top: 0;
}

.footer-contact-links a {
  width: clamp(66px, 2.8vw + 48px, 88px);
  height: clamp(66px, 2.8vw + 48px, 88px);
  border-color: rgb(0 0 0 / 28%);
  color: #111111;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.footer-contact-links a:hover {
  border-color: #111111;
  background: #111111;
  color: #ffffff;
  transform: none;
}

/* The two glyphs are drawn at different scales (the Instagram square is
 * 14 of its 24 units): sized so both look about the same within the circle. */
.footer-contact-links .material-symbols-outlined {
  font-size: clamp(32px, 1.3vw + 23px, 42px);
}

.footer-contact-links svg {
  width: clamp(40px, 1.7vw + 28px, 54px);
  height: clamp(40px, 1.7vw + 28px, 54px);
  stroke-width: 1.2;
}

/* The links: a slim matte black strip across the full width of the screen
 * (out past the footer's side padding), five spaced capitals spread evenly
 * along it and lined up with the content width. */
.site-footer .footer-strip {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-inline: calc(-1 * var(--margin));
  padding: 0 calc(var(--margin) + max(0px, (100% - var(--container)) / 2));
  background: #111111;
}

/* Each link as tall as the strip, its capitals centred in it. */
.site-footer .footer-strip a {
  display: inline-flex;
  align-items: center;
  min-height: clamp(44px, 3.4vw, 56px);
  padding-block: 0;
  color: #ffffff;
  font-size: clamp(12px, 0.35vw + 9px, 16px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 200ms ease;
}

.site-footer .footer-strip a:hover {
  color: rgb(255 255 255 / 62%);
}

.site-footer .footer-strip a:focus-visible {
  outline-color: #ffffff;
  outline-offset: 4px;
}

/* The wordmark: the logo itself, black on white, oversized across the whole
 * width of the screen. White on all four sides (the M and E stop short of
 * the screen's edges) so it reads cleanly between the two strips. */
.footer-wordmark {
  --home-wordmark-bleed: 0%;
  --footer-wordmark-space: clamp(10px, 1.4vw, 24px);
  margin-inline: calc(-1 * var(--margin));
  padding-block: var(--footer-wordmark-space);
  padding-inline: var(--footer-wordmark-space);
  overflow: hidden;
}

.footer-wordmark picture {
  display: block;
  width: calc(100% + 2 * var(--home-wordmark-bleed));
  margin-inline: calc(-1 * var(--home-wordmark-bleed));
}

.footer-wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

/* The fine print: a solid black strip across the full width of the screen
 * (out past the footer's side padding), its contents lined up with the
 * content width. */
.footer-bottom {
  width: auto;
  margin-inline: calc(-1 * var(--margin));
  padding: 14px calc(var(--margin) + max(0px, (100% - var(--container)) / 2));
  border-top: 0;
  background: #000000;
  color: rgb(255 255 255 / 62%);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

/* Privacy Policy / Terms & Conditions / Cookie Settings, on the right of the
 * copyright. */
.site-footer .footer-legal {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0;
  color: rgb(255 255 255 / 34%);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
}

.site-footer .footer-legal a {
  min-height: 0;
  margin-top: 0;
  padding-block: 4px;
  color: rgb(255 255 255 / 74%);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}

.site-footer .footer-legal a:hover {
  color: #ffffff;
}

.footer-legal [aria-hidden="true"] {
  padding-inline: 0.9em;
  font-size: 11px;
}

/* Phones and small tablets: the links in two rows, three across then two,
 * Our Story under Track Order and the long FAQ link in the wider cell; each
 * cell a comfortable tap target. */
@media (max-width: 767px) {
  .site-footer .footer-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding: 4px 0;
  }

  .site-footer .footer-strip a {
    grid-column: span 2;
    justify-content: center;
    min-height: 44px;
    padding: 4px 6px;
    font-size: 12px;
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-align: center;
    white-space: normal;
  }

  .site-footer .footer-strip a:last-child {
    grid-column: span 4;
  }

  .site-footer .footer-strip a:focus-visible {
    outline-offset: -4px;
  }

  .footer-wordmark {
    --footer-wordmark-space: 8px;
  }
}

/* Phones: the contact heading's sentences on separate lines; the bottom line
 * stacked and centred. The spacing tightens on short phones so the footer
 * still fits one screen. */
@media (max-width: 680px) {
  .footer-contact {
    margin-bottom: clamp(32px, calc(var(--home-panel-h, 100svh) * 0.05), 56px);
  }

  .site-footer .footer-contact h2 {
    font-size: clamp(36px, 11vw, 46px);
  }

  .footer-contact h2 span {
    display: block;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    padding-block: 16px;
    text-align: center;
  }

  /* Tighter so the legal links stay on one line down to 360px wide. */
  .site-footer .footer-legal {
    justify-content: center;
    letter-spacing: 0;
  }

  .footer-legal [aria-hidden="true"] {
    padding-inline: 0.6em;
  }
}

/* Narrower still the legal links take two lines, without the slashes (one
 * would be left hanging at a line end). */
@media (max-width: 359px) {
  .site-footer .footer-legal {
    gap: 0 16px;
  }

  /* The strip's links a touch smaller and tighter so each stays on one line. */
  .site-footer .footer-strip a {
    padding-inline: 2px;
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .footer-legal [aria-hidden="true"] {
    display: none;
  }
}
