/* ==========================================================================
   Magengrim — footer
   A dark band closing every page: the brand set oversized and barely lifted
   off its own ground, then the brand block and link columns beneath it.
   Scoped under .mg-ft because the theme styles `a`, `h3` and lists globally.
   ========================================================================== */

.mg-ft {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 5vw, 72px) 0 clamp(26px, 3vw, 38px);
  background: #09080f;
  color: #ffffff;
}

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

/* --- Wordmark ----------------------------------------------------------- */

/* Set almost the colour of its own ground, so it reads as a surface the light
   catches rather than as a heading. Wider than the viewport and cropped at
   both edges by the section's overflow. */
.mg-ft .mg-ft__wordmark {
  margin: 0 0 clamp(34px, 4.5vw, 68px);
  font-family: var(--mg-display);
  font-size: 17vw;
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-align: center;
  white-space: nowrap;
  user-select: none;

  /* A soft vertical sheen plus a hairline highlight along the top edge is
     what gives it the moulded look; flat #14121f would just read as muddy. */
  background: linear-gradient(
    176deg,
    #26232e 0%,
    #17151f 42%,
    #100e17 72%,
    #0c0b12 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* --- 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;
  }
}
