/* Phase 5G footer composition fix.
   Goal: footer content stays compact on the lower-right while Blob3 is scaled up and pushed down behind it. */

:root {
  --myteria-footer-panel: rgba(10, 8, 28, .70);
  --myteria-footer-panel-2: rgba(23, 14, 52, .54);
  --myteria-footer-stroke: rgba(211, 156, 255, .28);
}

/* Keep the old background copy hidden. The footer owns Blob3 explicitly. */
.bg.-desktop .blobs > .blob-3 {
  display: none !important;
}

.main-footer,
.main-footer.legal-footer {
  position: relative !important;
  isolation: isolate !important;
  overflow: visible !important;
  z-index: 20 !important;
  width: min(610px, calc(100vw - 56px)) !important;
  max-width: 610px !important;
  min-height: 230px !important;
  margin: clamp(118px, 13vw, 220px) clamp(26px, 5.5vw, 92px) 18px auto !important;
  padding: 34px 38px 42px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "space title"
    "links links"
    "copy copy" !important;
  align-items: center !important;
  justify-items: end !important;
  row-gap: 14px !important;
  column-gap: 18px !important;
  text-align: right !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #FCFBFD !important;
  content-visibility: visible !important;
  contain: none !important;
  contain-intrinsic-size: auto !important;
}

/* The dark footer plate is deliberately smaller than the composition box.
   It reads as attached to Blob3 instead of a random floating card. */
.main-footer::before,
.main-footer.legal-footer::before {
  content: '' !important;
  position: absolute !important;
  right: 0 !important;
  top: 16px !important;
  width: min(560px, 100%) !important;
  height: 154px !important;
  z-index: -1 !important;
  border: 1px solid var(--myteria-footer-stroke) !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 88% 16%, rgba(204, 145, 255, .16), transparent 34%),
    linear-gradient(180deg, var(--myteria-footer-panel), var(--myteria-footer-panel-2)) !important;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, .34),
    0 0 52px rgba(165, 82, 255, .16),
    inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  backdrop-filter: blur(16px) saturate(1.16) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.16) !important;
  pointer-events: none !important;
}

.main-footer::after,
.main-footer.legal-footer::after {
  content: '' !important;
  position: absolute !important;
  right: -76px !important;
  bottom: -52px !important;
  width: 520px !important;
  height: 180px !important;
  z-index: -2 !important;
  border-radius: 999px !important;
  background: radial-gradient(ellipse at center, rgba(217, 93, 255, .22), transparent 68%) !important;
  filter: blur(18px) !important;
  pointer-events: none !important;
}

.footer-blob3 {
  display: block !important;
  position: absolute !important;
  right: clamp(-440px, -20vw, -260px) !important;
  bottom: clamp(-735px, -35vw, -560px) !important;
  z-index: -3 !important;
  width: clamp(1080px, 84vw, 1640px) !important;
  max-width: none !important;
  height: auto !important;
  opacity: .88 !important;
  transform: rotate(-1deg) !important;
  pointer-events: none !important;
  user-select: none !important;
}

.main-footer .footer-title,
.main-footer.legal-footer .footer-title,
.footer-title {
  grid-area: title !important;
  justify-self: end !important;
  align-self: end !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  font-family: var(--font-heading, 'Montserrat', 'Inter', sans-serif) !important;
  font-size: clamp(21px, 1.7vw, 28px) !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  text-shadow: 0 0 24px rgba(216, 151, 255, .36) !important;
}

.main-footer .footer-nav,
.main-footer.legal-footer .footer-nav,
.footer-nav {
  grid-area: links !important;
  justify-self: end !important;
  width: auto !important;
  max-width: min(520px, 100%) !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
}

.main-footer .footer-nav-item,
.main-footer.legal-footer .footer-nav-item,
.footer-nav-item {
  min-height: 36px !important;
  padding: 9px 14px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(209, 154, 255, .42) !important;
  background: rgba(93, 45, 183, .48) !important;
  color: #fff !important;
  font-family: var(--font-heading, 'Montserrat', 'Inter', sans-serif) !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .035em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .10) !important;
}

.main-footer .footer-nav-item:hover,
.main-footer .footer-nav-item:focus-visible,
.main-footer.legal-footer .footer-nav-item:hover,
.main-footer.legal-footer .footer-nav-item:focus-visible,
.footer-nav-item:hover,
.footer-nav-item:focus-visible {
  transform: translateY(-2px) !important;
  background: rgba(155, 78, 255, .58) !important;
  border-color: rgba(234, 205, 255, .72) !important;
  color: #fff !important;
  outline: none !important;
}

.main-footer .footer-copy,
.main-footer.legal-footer .footer-copy,
.footer-copy {
  grid-area: copy !important;
  justify-self: end !important;
  margin: 0 !important;
  max-width: 520px !important;
  color: rgba(252, 251, 253, .78) !important;
  font-family: var(--font-body, 'Inter', sans-serif) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .28) !important;
}

.page.-cart .main-footer,
body:has(.cart-layout) .main-footer {
  margin-top: clamp(104px, 12vw, 190px) !important;
}

@media screen and (max-width: 900px) {
  .main-footer,
  .main-footer.legal-footer {
    width: min(560px, calc(100vw - 32px)) !important;
    min-height: 250px !important;
    margin: 86px auto 18px !important;
    padding: 30px 22px 42px !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "title"
      "links"
      "copy" !important;
    justify-items: center !important;
    text-align: center !important;
  }

  .main-footer::before,
  .main-footer.legal-footer::before {
    right: 50% !important;
    top: 14px !important;
    width: min(500px, calc(100vw - 32px)) !important;
    height: 170px !important;
    transform: translateX(50%) !important;
  }

  .footer-blob3 {
    right: 50% !important;
    bottom: -600px !important;
    width: clamp(880px, 205vw, 1160px) !important;
    transform: translateX(60%) rotate(-1deg) !important;
    opacity: .78 !important;
  }

  .main-footer .footer-title,
  .footer-title,
  .main-footer .footer-nav,
  .footer-nav,
  .main-footer .footer-copy,
  .footer-copy {
    justify-self: center !important;
  }

  .main-footer .footer-nav,
  .footer-nav {
    justify-content: center !important;
  }
}

@media screen and (max-width: 440px) {
  .main-footer,
  .main-footer.legal-footer {
    width: calc(100vw - 22px) !important;
    min-height: 288px !important;
    margin-bottom: 10px !important;
    padding: 26px 14px 48px !important;
  }

  .main-footer::before,
  .main-footer.legal-footer::before {
    height: 238px !important;
    border-radius: 28px !important;
  }

  .main-footer .footer-nav,
  .footer-nav {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .main-footer .footer-nav-item,
  .footer-nav-item {
    width: 100% !important;
    min-height: 38px !important;
  }

  .footer-blob3 {
    bottom: -610px !important;
    width: 980px !important;
    transform: translateX(61%) rotate(-1deg) !important;
  }
}
