/* ==========================================================================
   Magengrim — footer
   A dark band closing every page: the brand block and link columns over the
   same render the "future of finance" band carries.
   Scoped under .mg-ft because the theme styles `a`, `h3` and lists globally.
   ========================================================================== */

.mg-ft {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 6vw, 84px) 0 clamp(26px, 3vw, 38px);
  background: #09080f;
  color: #ffffff;
}

/* --- Video ground ------------------------------------------------------- */

/* The same loop as the "future of finance" band, held further back: the
   footer is a place to read links, so the render is pulled down under a
   heavier scrim than the band carries and framed from its calmer lower half. */
.mg-ft .mg-ft__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  pointer-events: none;
}

.mg-ft::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(9, 8, 15, 0.7) 0%, rgba(9, 8, 15, 0.42) 40%, rgba(9, 8, 15, 0.72) 100%),
    radial-gradient(80% 70% at 50% 40%, rgba(9, 8, 15, 0) 0%, rgba(9, 8, 15, 0.5) 100%);
  pointer-events: none;
}

.mg-ft::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../images/hero-noise.png?v=2") repeat center top / 154px auto;
  pointer-events: none;
}

.mg-ft .mg-ft__inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Grid --------------------------------------------------------------- */

.mg-ft .mg-ft__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 4vw, 56px);
  align-items: start;
  padding-bottom: clamp(34px, 4vw, 56px);
}

/* --- Brand block -------------------------------------------------------- */

.mg-ft .mg-ft__line {
  margin: 0 0 18px;
  font-family: var(--mg-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: #ffffff;
}

.mg-ft .mg-ft__mail {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: color 240ms var(--mg-ease);
}

.mg-ft .mg-ft__mail:hover,
.mg-ft .mg-ft__mail:focus-visible {
  color: #ffffff;
}

.mg-ft .mg-ft__socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mg-ft .mg-ft__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition:
    background-color 240ms var(--mg-ease),
    color 240ms var(--mg-ease);
}

.mg-ft .mg-ft__social:hover,
.mg-ft .mg-ft__social:focus-visible {
  background: var(--mg-purple);
  color: #ffffff;
}

/* --- Link columns ------------------------------------------------------- */

.mg-ft .mg-ft__coltitle {
  margin: 0 0 18px;
  font-family: var(--mg-body);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: #ffffff;
}

.mg-ft .mg-ft__links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-ft .mg-ft__links a {
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 240ms var(--mg-ease);
}

.mg-ft .mg-ft__links a:hover,
.mg-ft .mg-ft__links a:focus-visible {
  color: #ffffff;
}

/* --- Bottom bar --------------------------------------------------------- */

.mg-ft .mg-ft__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-top: clamp(20px, 2.4vw, 30px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mg-ft .mg-ft__copy {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.38);
}

.mg-ft .mg-ft__barlinks {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mg-ft .mg-ft__barlinks a {
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  transition: color 240ms var(--mg-ease);
}

.mg-ft .mg-ft__barlinks a:hover,
.mg-ft .mg-ft__barlinks a:focus-visible {
  color: #ffffff;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  .mg-ft .mg-ft__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
  }

  .mg-ft .mg-ft__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .mg-ft .mg-ft__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mg-ft .mg-ft__bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mg-ft .mg-ft__mail,
  .mg-ft .mg-ft__social,
  .mg-ft .mg-ft__links a,
  .mg-ft .mg-ft__barlinks a {
    transition: none;
  }
}
