/* Footer — engineering night shelf (Mestro)
   Deep indigo stage, orange hairline, brand logo, clean columns.
   Loads last to override journal/nav-override white-footer rules. */

body.mestro-theme .mestro-footer {
  --ft-ink: color-mix(in oklab, #fff 88%, transparent);
  --ft-mute: color-mix(in oklab, #fff 58%, transparent);
  --ft-line: color-mix(in oklab, #fff 14%, transparent);
  position: relative !important;
  isolation: isolate;
  z-index: 1 !important;
  margin-top: 0 !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-top: 0 !important;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, color-mix(in oklab, var(--mestro-orange) 22%, transparent), transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 100%, color-mix(in oklab, #fff 8%, transparent), transparent 50%),
    linear-gradient(165deg, var(--mestro-indigo) 0%, var(--mestro-indigo-deep) 100%) !important;
  color: var(--ft-mute) !important;
  font-family: var(--mestro-font-body) !important;
}

body.mestro-theme .mestro-footer__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

body.mestro-theme .mestro-footer__accent {
  display: none !important;
}

body.mestro-theme .mestro-footer__inner {
  position: relative;
  z-index: 1;
  padding-top: clamp(3rem, 5.5vw, 4.25rem);
  padding-bottom: clamp(1.35rem, 2.5vw, 1.85rem);
}

body.mestro-theme.page-home .mestro-footer__inner {
  padding-top: clamp(3rem, 5.5vw, 4.25rem);
}

body.mestro-theme .mestro-footer__main {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

@media (min-width: 880px) {
  body.mestro-theme .mestro-footer__main {
    grid-template-columns: minmax(14rem, 1.35fr) minmax(0, 1fr);
    align-items: start;
    gap: 3rem 4rem;
  }
}

body.mestro-theme .mestro-footer__brand {
  max-width: 26rem;
}

body.mestro-theme .mestro-footer__logo {
  display: inline-flex !important;
  align-items: center;
  margin: 0 0 0.85rem !important;
  text-decoration: none !important;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

body.mestro-theme .mestro-footer__logo:hover,
body.mestro-theme .mestro-footer__logo:focus {
  color: #fff !important;
  opacity: 0.92;
}

body.mestro-theme .mestro-footer__logo-img {
  display: block;
  width: auto;
  height: 2.35rem;
  max-width: 11rem;
  object-fit: contain;
  object-position: left center;
}

body.mestro-theme .mestro-footer__kicker {
  display: block !important;
  margin: 0 0 0.65rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--mestro-orange) !important;
}

body.mestro-theme .mestro-footer__blurb {
  margin: 0 0 1.1rem !important;
  max-width: 24rem;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
  color: var(--ft-ink) !important;
}

body.mestro-theme .mestro-footer__chips {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

body.mestro-theme .mestro-footer__chips li {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--ft-line);
  border-radius: 999px;
  background: color-mix(in oklab, #fff 6%, transparent);
  color: var(--ft-ink) !important;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-align: left !important;
}

body.mestro-theme .mestro-footer__nav {
  display: grid;
  gap: 1.75rem 2.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  body.mestro-theme .mestro-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.mestro-theme .mestro-footer__heading {
  margin: 0 0 0.85rem !important;
  font-family: var(--mestro-font-display) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 1) !important;
}

body.mestro-theme .mestro-footer__list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.mestro-theme .mestro-footer__list li {
  text-align: left !important;
}

body.mestro-theme .mestro-footer a {
  color: rgba(255, 255, 255, 1) !important;
  text-shadow: none !important;
}
body.mestro-theme .mestro-footer a:hover,
body.mestro-theme .mestro-footer a:focus {
  text-shadow: none !important;
}

body.mestro-theme .mestro-footer__list a {
  color: rgba(255, 255, 255, 1) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  transition: color 0.2s var(--mestro-ease);
}

body.mestro-theme .mestro-footer__list a:hover,
body.mestro-theme .mestro-footer__list a:focus-visible {
  color: var(--mestro-orange) !important;
}

body.mestro-theme .mestro-footer__address {
  display: block;
  margin: 0 0 0.85rem;
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ft-ink);
}

body.mestro-theme .mestro-footer__mail {
  display: inline-flex !important;
  align-items: center;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  text-decoration: none !important;
  border-bottom: 1px solid color-mix(in oklab, var(--mestro-orange) 70%, transparent);
  padding-bottom: 0.1rem;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}

body.mestro-theme .mestro-footer__mail:hover,
body.mestro-theme .mestro-footer__mail:focus-visible {
  color: var(--mestro-orange) !important;
  border-bottom-color: var(--mestro-orange);
}

body.mestro-theme .mestro-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--ft-line);
  font-size: 0.82rem;
  color: var(--ft-mute) !important;
}

body.mestro-theme .mestro-footer__copy,
body.mestro-theme .mestro-footer__platform {
  margin: 0 !important;
  color: var(--ft-mute) !important;
}

body.mestro-theme .mestro-footer__license {
  color: rgba(255, 255, 255, 1) !important;
  font-weight: 650 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em !important;
}

body.mestro-theme .mestro-footer__license:hover,
body.mestro-theme .mestro-footer__license:focus-visible {
  color: var(--mestro-orange) !important;
}

@media (max-width: 560px) {
  body.mestro-theme .mestro-footer__bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
