/* ─────────────────────────────────────────────────────────────
   SONARIS — footer
   A CAD sheet footer: a striped rail, four ruled technical
   fields, a build bar, and a cellular ASCII fire rising in
   the full-width stage.
   Loaded after tokens / base / ascii / motion.
   ───────────────────────────────────────────────────────────── */

.ftr {
  position: relative;
  z-index: 1;
  margin-top: 72px;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  overflow-x: clip;
  /* The rules run edge to edge; the text keeps the page's own
     column, so the footer lines up with everything above it. */
  --ftr-pad: max(var(--gutter), calc((100% - var(--w-page)) / 2 + var(--gutter)));
}

/* Full-bleed shell. */
.ftr__in {
  width: 100%;
}

.ftr__band {
  border-top: 1px solid var(--hair);
}

.ftr__band--stage {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ── striped rail ────────────────────────────────────────── */
.ftr__rail {
  height: 32px;
  background-image: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--ink) 7%, transparent) 0 1px,
    transparent 1px 10px
  );
}

/* ── four technical fields ───────────────────────────────── */
.ftr__grid {
  display: grid;
  /* as many columns as there are fields, each one equal — no empty
     fourth column when a page only has three groups */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.ftr__field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px var(--ftr-pad) 18px;
  border-right: 1px solid var(--hair-2);
}

.ftr__field:last-child {
  border-right: 0;
}

.ftr__label {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-3);
}

.ftr__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.ftr__list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.ftr__list a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.ftr__ico {
  width: 12px;
  height: 12px;
  flex: none;
  color: var(--ink-4);
  transition: color 0.18s;
}

.ftr__list a:hover .ftr__ico {
  color: var(--ink);
}

.ftr__ext {
  font-size: 9px;
  color: var(--ink-4);
}

.ftr__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ftr__meta dt {
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-3);
}

.ftr__meta dd {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ── fire stage ──────────────────────────────────────────── */
.ftr__stage {
  position: relative;
  height: 256px;
  overflow: hidden;
}

.ftr__reg {
  position: absolute;
  top: 8px;
  z-index: 3;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  pointer-events: none;
}

.ftr__reg--a {
  left: var(--ftr-pad);
}

.ftr__reg--b {
  right: var(--ftr-pad);
}

.ftr__fire {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.ftr__fire canvas {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--ink);
}

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ftr__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ftr__field:nth-child(2n) {
    border-right: 0;
  }
  .ftr__field:nth-child(-n + 2) {
    border-bottom: 1px solid var(--hair-2);
  }
  .ftr__stage {
    height: 224px;
  }
}

@media (max-width: 720px) {
  .ftr {
    margin-top: 56px;
  }
  .ftr__stage {
    height: 192px;
  }
  .ftr__reg {
    font-size: 9px;
    letter-spacing: 0.14em;
  }
}
