/* MMG Storefront: the footer (docs/superpowers/specs/2026-11-17-footer-revamp.md).
   Built to the approved mock (docs/superpowers/mocks/2026-11-17-footer/, option C): the sand pre-footer with its honey edge, the brown band and the cocoa strip.
   The colours and spacing are custom properties local to this file; --mmg-menu-* is not loaded on every page, so none is used. Every selector starts with
   #brx-footer.mmg-footer or .mmg-footer. Phone layout below 768px, two columns from 768px, the signed desktop from 1024px. The file is enqueued only where the
   footer was built (preview or the flag). No rule here sets padding on the strip itself: the navigation's bar clearance (mmg-nav.css) and the Bricks product
   template's .bottom-footer rule own that, and the strip's own 12px sits on .mmg-footer__strip-in. */

.mmg-footer {
  --mmg-footer-cream-50: #fbf6ec;
  --mmg-footer-cream-100: #f0e9de;
  --mmg-footer-cream-200: #e4ddd2;
  --mmg-footer-ink: #2f2c28;
  --mmg-footer-ink-muted: #55504a;
  --mmg-footer-brown: #68442c;
  --mmg-footer-honey: #e3cb92;
  --mmg-footer-cocoa: #4a2c22;
  --mmg-footer-cocoa-muted: #b8ada3;
  --mmg-footer-hairline-band: rgba(251, 246, 236, 0.32);
  --mmg-footer-wordmark-shift: 1.6px;
  --mmg-footer-margin: 16px;

  --mmg-footer-body: 'Hanken Grotesk', system-ui, sans-serif;
}

/* A theme-level #brx-footer rule cannot add spacing, a background or a display of its own. */
#brx-footer.mmg-footer {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  font: 400 16px/24px var(--mmg-footer-body);
}

.mmg-footer *,
.mmg-footer *::before,
.mmg-footer *::after {
  box-sizing: border-box;
}

/* The three sections and the colours each one sets for its content. */
.mmg-footer__pre {
  --mmg-footer-bg: var(--mmg-footer-cream-100);
  --mmg-footer-fg: var(--mmg-footer-ink);
  --mmg-footer-fg-2: var(--mmg-footer-ink-muted);
  --mmg-footer-link: var(--mmg-footer-brown);
  --mmg-footer-label: var(--mmg-footer-brown);
  --mmg-footer-line: var(--mmg-footer-cream-200);
  --mmg-footer-btn-bg: var(--mmg-footer-brown);
  --mmg-footer-btn-fg: var(--mmg-footer-cream-50);
  --mmg-footer-ring: var(--mmg-footer-brown);

  position: relative;
}

.mmg-footer__band {
  --mmg-footer-bg: var(--mmg-footer-brown);
  --mmg-footer-fg: var(--mmg-footer-cream-50);
  --mmg-footer-fg-2: var(--mmg-footer-cream-200);
  --mmg-footer-link: var(--mmg-footer-cream-50);
  --mmg-footer-label: var(--mmg-footer-cream-200);
  --mmg-footer-line: var(--mmg-footer-hairline-band);
  --mmg-footer-btn-bg: var(--mmg-footer-cream-50);
  --mmg-footer-btn-fg: var(--mmg-footer-brown);
  --mmg-footer-ring: var(--mmg-footer-cream-50);
  --mmg-footer-logo: var(--mmg-footer-cream-50);
}

.mmg-footer__strip {
  --mmg-footer-bg: var(--mmg-footer-cocoa);
  --mmg-footer-fg: var(--mmg-footer-cream-50);
  --mmg-footer-fg-2: var(--mmg-footer-cocoa-muted);
  --mmg-footer-link: var(--mmg-footer-cocoa-muted);
  --mmg-footer-ring: var(--mmg-footer-cream-50);
}

.mmg-footer__pre,
.mmg-footer__band,
.mmg-footer__strip {
  background: var(--mmg-footer-bg);
  color: var(--mmg-footer-fg);
}

/* The honey edge, one empty element drawn by one gradient: five equal bands of 3px, honey, cream-50, honey, cream-50, honey. A different count or band height is a change
   of the two tokens. A mask fades both ends to transparent. */
.mmg-footer__edge {
  --mmg-footer-edge-bands: 5;
  --mmg-footer-edge-band: 3px;

  display: block;
  height: calc(var(--mmg-footer-edge-bands) * var(--mmg-footer-edge-band));
  background: repeating-linear-gradient(
    to bottom,
    var(--mmg-footer-honey) 0,
    var(--mmg-footer-honey) var(--mmg-footer-edge-band),
    var(--mmg-footer-cream-50) var(--mmg-footer-edge-band),
    var(--mmg-footer-cream-50) calc(2 * var(--mmg-footer-edge-band))
  );
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 55%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 55%, transparent 100%);
}

/* Thank-you page honey band (Bricks Code element .mmg-ty-honey on the wffn_ty template); its own CSS is signed in Bricks, so the fade lives here, where the footer sheet loads on that page. */
.mmg-ty-honey {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 55%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 55%, transparent 100%);
}

.mmg-footer__wrap {
  display: grid;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px var(--mmg-footer-margin) 8px;
}

.mmg-footer__wrap > * {
  min-width: 0;
}

.mmg-footer__pre .mmg-footer__wrap {
  padding-top: 40px;
  padding-bottom: 40px;
}

.mmg-footer__band .mmg-footer__wrap {
  padding-top: 32px;
  padding-bottom: 12px;
}

.mmg-footer__pre .mmg-footer__del {
  margin-bottom: -12px;
}

/* Labels, text and links. Pre-footer text links keep a visible underline at rest. */
.mmg-footer__label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin: 0 0 12px;
  color: var(--mmg-footer-label);
  font: 600 12px/16px var(--mmg-footer-body);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.mmg-footer__label--icon svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--mmg-footer-link);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mmg-footer__lead {
  margin: 0 0 6px;
  color: var(--mmg-footer-fg);
  font-weight: 600;
}

.mmg-footer__txt {
  margin: 0 0 8px;
  color: var(--mmg-footer-fg-2);
}

.mmg-footer__txt b {
  color: var(--mmg-footer-fg);
  font-weight: 600;
}

.mmg-footer a {
  color: var(--mmg-footer-link);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.mmg-footer a:hover,
.mmg-footer a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mmg-footer a:focus-visible,
.mmg-footer summary:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--mmg-footer-ring);
  outline-offset: 3px;
}

.mmg-footer__chev::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 2px 1px 7px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
  vertical-align: middle;
}

/* Delivery */
.mmg-footer__win {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 8px;
  padding: 0;
  color: var(--mmg-footer-fg-2);
  list-style: none;
  white-space: nowrap;
}

.mmg-footer__win > li {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--mmg-footer-cream-200);
}

.mmg-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 2px;
}

.mmg-footer__row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
}

/* Pickup */
.mmg-footer__btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mmg-footer .mmg-footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--mmg-footer-link);
  border-radius: 999px;
  font: 600 15px/20px var(--mmg-footer-body);
}

.mmg-footer .mmg-footer__btn:hover,
.mmg-footer .mmg-footer__btn:focus-visible {
  text-decoration: none;
}

.mmg-footer .mmg-footer__pre a:any-link:not(.mmg-footer__btn) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mmg-footer .mmg-footer__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mmg-footer .mmg-footer__btn--primary {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-color: var(--mmg-footer-btn-bg);
  background: var(--mmg-footer-btn-bg);
  color: var(--mmg-footer-btn-fg);
  font-size: 15px;
}

/* Quick answers: native details, no script. */
.mmg-footer details {
  border-top: 1px solid var(--mmg-footer-line);
}

.mmg-footer details:last-of-type {
  border-bottom: 1px solid var(--mmg-footer-line);
}

.mmg-footer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--mmg-footer-fg);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.mmg-footer summary::-webkit-details-marker {
  display: none;
}

.mmg-footer summary::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin: -4px 4px 0 0;
  border: solid var(--mmg-footer-link);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  transition: transform 0.15s, margin 0.15s;
}

.mmg-footer details[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.mmg-footer details p {
  max-width: 60ch;
  margin: 0 0 14px;
  color: var(--mmg-footer-fg-2);
}

/* Band: talk to us, the delivery areas, the logo, the legal links. */
.mmg-footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-top: 2px;
}

.mmg-footer__contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.mmg-footer__mail-l {
  display: none;
}

.mmg-footer__areas {
  margin: 0;
  padding: 0;
  color: var(--mmg-footer-fg-2);
  line-height: 32px;
  list-style: none;
}

.mmg-footer__areas li {
  display: inline-block;
}

/* The zero-width space after the comma gives the line a break opportunity there: without it current Chromium breaks before the comma and leaves it at the start of the next line. */
.mmg-footer__areas li:not(.mmg-footer__all)::after {
  content: ',\200B';
  margin-right: 6px;
}

.mmg-footer__areas a {
  position: relative;
  display: inline-block;
  font-weight: 600;
}

.mmg-footer__areas a::before {
  content: '';
  position: absolute;
  inset: 0 -4px;
}

.mmg-footer__areas .mmg-footer__all {
  white-space: nowrap;
}

.mmg-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mmg-footer__logo {
  display: block;
  flex: none;
  width: 124px;
  min-width: 124px;
  height: auto;
}

.mmg-footer__logo .cls-1 {
  fill: none;
}

.mmg-footer__logo .cls-2,
.mmg-footer__logo .cls-3 {
  fill: var(--mmg-footer-logo);
}

.mmg-footer__legal {
  position: relative;
  margin: 0;
  color: var(--mmg-footer-fg-2);
  font-size: 14px;
  line-height: 20px;
}

.mmg-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  margin-top: -12px;
}

.mmg-footer__grp {
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}

.mmg-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
}

/* Strip: the bakeries we like, in muted text. Its own 12px sits on the inner wrapper. */
.mmg-footer__strip-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px var(--mmg-footer-margin);
}

.mmg-footer__friends {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
}

.mmg-footer__lead-in {
  padding: 4px 0 0;
  color: var(--mmg-footer-fg-2);
  font-weight: 400;
  white-space: nowrap;
}

.mmg-footer__friends a {
  padding: 4px 0;
  color: var(--mmg-footer-fg-2);
  font-weight: 500;
  text-wrap: balance;
  white-space: normal;
}

.mmg-footer__friends a:hover,
.mmg-footer__friends a:focus-visible {
  color: var(--mmg-footer-cream-50);
}

@media (max-width: 359px) {
  .mmg-footer__win {
    column-gap: 4px;
  }
}

@media (min-width: 768px) {
  .mmg-footer {
    --mmg-footer-margin: 40px;
  }

  .mmg-footer__wrap {
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
    padding-top: 48px;
  }

  .mmg-footer__pre .mmg-footer__wrap {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .mmg-footer__band .mmg-footer__wrap {
    row-gap: 32px;
    padding-top: 48px;
  }

  .mmg-footer__pre .mmg-footer__qa {
    grid-column: 1 / 3;
  }

  .mmg-footer .mmg-footer__btn--primary {
    width: auto;
  }

  .mmg-footer__mail-s {
    display: none;
  }

  .mmg-footer__mail-l {
    display: inline;
  }

  .mmg-footer__contact a:first-child {
    flex: 0 0 100%;
    justify-content: flex-start;
  }

  .mmg-footer__band .mmg-footer__area {
    grid-column: 1;
    grid-row: 1;
  }

  .mmg-footer__band .mmg-footer__talk {
    grid-column: 2;
    grid-row: 1;
  }

  .mmg-footer__brand,
  .mmg-footer__nav {
    grid-column: 1 / 3;
  }

  .mmg-footer__brand {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .mmg-footer__band .mmg-footer__nav {
    margin-top: -8px;
  }

  .mmg-footer__legal {
    top: var(--mmg-footer-wordmark-shift);
    white-space: nowrap;
  }

  .mmg-footer__friends {
    flex-direction: row;
    align-items: baseline;
    gap: 0 28px;
  }

  .mmg-footer__lead-in {
    padding: 0;
  }

  /* The navigation's 136px clearance is phone-only, so where it built the product page's bar the Bricks bar that stays on desktop (72px) is cleared here: 72px plus the strip's own 12px. */
  .mmg-footer__strip--bar .mmg-footer__strip-in {
    padding-bottom: 84px;
  }
}

@media (min-width: 1024px) {
  .mmg-footer__wrap {
    grid-template-columns: 5fr 3fr 4fr;
    gap: 32px 40px;
  }

  .mmg-footer__pre .mmg-footer__qa {
    grid-column: 3;
  }

  .mmg-footer__band .mmg-footer__area {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .mmg-footer__band .mmg-footer__talk {
    grid-column: 3;
    grid-row: 1;
  }

  .mmg-footer__band .mmg-footer__brand {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .mmg-footer__band .mmg-footer__nav {
    grid-column: 2 / 4;
    grid-row: 2;
    flex-wrap: nowrap;
    align-self: center;
    justify-self: end;
    margin-top: 0;
  }

  .mmg-footer__band .mmg-footer__nav .mmg-footer__grp {
    flex-wrap: nowrap;
  }

  .mmg-footer__nav a {
    position: relative;
    top: var(--mmg-footer-wordmark-shift);
  }
}

@media (min-width: 1280px) {
  .mmg-footer__contact a:first-child {
    flex: 0 1 auto;
    justify-content: center;
  }
}
