/* ── Footer ────────────────────────────────────────────────────────────────
   Owns the site footer: brand column, four link columns, the Discord pill and
   the bottom bar with the back-to-top link. The link underline sweep is
   motion.css. Desktop first, then max-width:1000px and 600px. */

/* ── Shell ── */
/* The .landing-atmosphere prefix outranks the body-level .footer rules kept by base.css. */
.landing-atmosphere .misa-footer {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 64px 0 0;
  zoom: 1;
  border-top: 1px solid #ffffff12;
  background: radial-gradient(ellipse at 10% 0, #3c071625, transparent 55%), #09090b;
  /* Perf: laid out lazily; the placeholder height keeps the scrollbar stable. */
  content-visibility: auto;
  contain-intrinsic-size: 1px 360px;
}

.misa-footer .container {
  width: calc(100% - 80px);
  max-width: 1400px;
  margin: auto;
}

/* ── Columns ── */
.misa-footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(4, minmax(120px, 1fr));
  gap: clamp(24px, 3vw, 52px);
  align-items: start;
  padding-bottom: 48px;
}

.misa-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
}

/* The dagger glyph itself (colour, glow, transition) is the shared .dag in base.css. */
.misa-footer .brand .dag {
  width: .8em;
  height: 1.34em;
  transform: translateY(-1px);
}

.misa-footer .brand:hover .dag {
  transform: rotate(-14deg) translateY(-2px);
}

.misa-footer-brand p {
  max-width: 330px;
  margin: 18px 0 20px;
  font: 400 14px/1.8 Inter, Arial, sans-serif;
  color: #aaa5aa;
}

.misa-footer .footer-community {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #f43e6b35;
  border-radius: 12px;
  font-size: 13px;
  color: #efc7d3;
  background: #f4285908;
}

.misa-footer h4 {
  margin: 10px 0 16px;
  font: 600 15px/1.4 Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: #f1e9ec;
}

.misa-footer ul {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.misa-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
  line-height: 1.5;
  color: #a7a0a6;
  text-decoration: none;
  transition: color .2s;
}

.misa-footer a:hover {
  color: #ff527e;
}

/* Column links lighten instead of turning pink (the old `.footer li a:hover` outranked the rule above). */
.misa-footer li a:hover {
  color: var(--text);
}

.misa-footer a:focus-visible {
  outline: 2px solid #ff527e;
  outline-offset: 5px;
  border-radius: 4px;
}

/* ── Bottom bar ── */
.misa-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 0;
  border-top: 1px solid #ffffff10;
  font-size: 12px;
  color: #88818a;
}

.misa-footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  color: #b6aeb6;
}

.footer-signoff {
  font-style: italic;
  color: #b1a2ac;
}

/* ── Tablet: the brand column spans the row ── */
@media (max-width: 1000px) {
  .misa-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }

  .misa-footer-brand {
    grid-column: 1 / -1;
  }

  .misa-footer-brand p {
    max-width: 450px;
  }
}

/* ── Phones: two columns, no sign-off line ── */
@media (max-width: 600px) {
  .landing-atmosphere .misa-footer {
    padding-top: 36px;
  }

  .misa-footer .container {
    width: calc(100% - 40px);
  }

  .misa-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
    padding-bottom: 28px;
  }

  .misa-footer h4 {
    margin-top: 0;
    margin-bottom: 8px;
  }

  .misa-footer li a {
    min-height: 44px;
    font-size: 13px;
  }

  .misa-footer-bottom {
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 20px 0;
  }

  .misa-footer-bottom span {
    flex-basis: 100%;
  }

  .footer-signoff {
    display: none;
  }
}
