/* =========================================================
   MASSIVEFORGE FOOTER — anvil + sparks edition
   ========================================================= */

.mf-footer {
  --mf-ground-0: #07070a;
  --mf-ground-1: #11131a;
  --mf-anvil:    #02030a;        /* near-black silhouette */
  --mf-ember-base: #ff7a18;
  --mf-ember-mid:  #ffb56b;
  --mf-ember-hot:  #fff2cc;
  --mf-meta:       #4d5160;
  --mf-tagline:    #a9a499;

  position: relative;
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(80% 140% at 78% 110%,
        rgba(255, 122, 24, 0.10) 0%,
        rgba(255, 122, 24, 0.03) 30%,
        transparent 60%),
    linear-gradient(180deg, var(--mf-ground-0) 0%, var(--mf-ground-1) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
               "Segoe UI", system-ui, sans-serif;
  contain: layout paint style;
}

/* Faint grain */
.mf-footer::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.7;
  z-index: 1;
}

/* Hairline lid */
.mf-footer::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 122, 24, 0.30) 30%,
      rgba(255, 242, 204, 0.45) 50%,
      rgba(255, 122, 24, 0.30) 70%,
      transparent 100%);
  z-index: 5;
  opacity: 0.55;
}

/* Particle canvas — top layer above wordmark? No: behind wordmark
   so the wordmark reads as the brand, sparks frame and light it. */
.mf-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* Anvil silhouette canvas — sits below sparks but above ground gradient
   so reactive lighting can be drawn directly on it. */
.mf-anvil-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Stack — anchored LEFT; anvil occupies the right third.
   Single rhythm: 12px between every line, no per-element margins. */
.mf-stack {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 0 36% 0 44px;     /* leave the right ~36% for the anvil */
  text-align: left;
}
.mf-stack > * { margin: 0; }

/* === WORDMARK ============================================ */
.mf-wordmark-wrap {
  position: relative;
  display: inline-block;
  /* Strike-flash variable, driven from JS; CSS just consumes it. */
  --mf-strike: 0;             /* 0 = idle, 1 = peak strike */
  --mf-breath: 1;
}
.mf-wordmark {
  font-family: Impact, "Haettenschweiler", "Arial Narrow Bold",
               "Oswald", system-ui, sans-serif;
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.020em;
  text-transform: uppercase;
  background: linear-gradient(180deg,
      #fff2cc 0%,
      #ffb56b 38%,
      #ff7a18 72%,
      #a83d05 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  /* Strike-reactive: scale + tracking + slight skew on impact for a hammered feel. */
  filter:
    drop-shadow(0 0 calc((6px  * var(--mf-breath)) + (14px * var(--mf-strike))) rgba(255, 122, 24, calc(0.55 + 0.40 * var(--mf-strike))))
    drop-shadow(0 0 calc((18px * var(--mf-breath)) + (32px * var(--mf-strike))) rgba(255, 122, 24, calc(0.32 + 0.36 * var(--mf-strike))))
    drop-shadow(0 0 calc((38px * var(--mf-breath)) + (60px * var(--mf-strike))) rgba(255, 181, 107, calc(0.18 + 0.42 * var(--mf-strike))));
  transform:
    scale(calc(1 + 0.018 * var(--mf-strike)));
  transform-origin: left center;
  animation: mf-breathe 6s ease-in-out infinite;
  user-select: none;
  white-space: nowrap;
  will-change: filter, transform;
  transition: transform 80ms cubic-bezier(.2,.7,.2,1);
}

/* Tagline reacts too — a quieter brighten + tiny lift on strike. */
.mf-tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1;
  letter-spacing: calc(0.06em + 0.01em * var(--mf-strike, 0));
  font-weight: 400;
  color: var(--mf-tagline);
  transform: translateY(calc(-1px * var(--mf-strike, 0)));
  transition: transform 120ms cubic-bezier(.2,.7,.2,1);
}

@keyframes mf-breathe {
  0%, 100% { opacity: 0.97; }
  50%      { opacity: 1.00; }
}

/* Browsers without var-driven filter: a milder static drop-shadow stack */
@supports not (filter: drop-shadow(0 0 calc(1px * var(--mf-breath)) red)) {
  .mf-wordmark {
    filter:
      drop-shadow(0 0 6px  rgba(255,122,24,0.55))
      drop-shadow(0 0 18px rgba(255,122,24,0.32))
      drop-shadow(0 0 38px rgba(255,181,107,0.18));
  }
}

/* Strike sheen on the wordmark — same as before */
.mf-wordmark-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(255,255,255,0.22) 0%,
      rgba(255,255,255,0.04) 18%,
      transparent 32%);
  -webkit-mask-image:
    radial-gradient(70% 90% at 50% 30%, #000 50%, transparent 100%);
          mask-image:
    radial-gradient(70% 90% at 50% 30%, #000 50%, transparent 100%);
  mix-blend-mode: overlay;
  opacity: calc(0.5 + 0.25 * var(--mf-strike));
}

/* === TAGLINE removed (now declared above with reactivity) === */

.mf-tagline em {
  font-style: normal;
  color: #e8e1d0;
}

/* === CTA — low-profile button with depth ============== */
.mf-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  /* Right padding compensates for the trailing letter-spacing optical gap. */
  padding: 9px 16px 9px 18px;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.18em;
  /* Drop the trailing letter-space so the label sits centered in the box. */
  text-indent: 0.18em;
  text-transform: uppercase;
  color: #d8d2c4;
  text-decoration: none;
  background:
    linear-gradient(180deg,
      rgba(255, 170, 90, 0.06) 0%,
      rgba(20, 12, 8, 0.55) 100%);
  border: 1px solid rgba(255, 150, 70, calc(0.22 + 0.50 * var(--mf-strike, 0)));
  border-radius: 8px;
  /* Depth: subtle inner top highlight, inner bottom shadow, outer drop, reactive halo */
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 calc(0px + 16px * var(--mf-strike, 0)) rgba(255, 122, 24, calc(0.0 + 0.40 * var(--mf-strike, 0)));
  transition:
    color 240ms cubic-bezier(.2,.7,.2,1),
    border-color 240ms cubic-bezier(.2,.7,.2,1),
    background 240ms cubic-bezier(.2,.7,.2,1),
    box-shadow 240ms cubic-bezier(.2,.7,.2,1),
    transform 200ms cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
}
.mf-cta:hover,
.mf-cta:focus-visible {
  color: #fff5e2;
  background:
    linear-gradient(180deg,
      rgba(255, 170, 90, 0.14) 0%,
      rgba(40, 18, 10, 0.55) 100%);
  border-color: rgba(255, 181, 107, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(255, 122, 24, 0.45);
  transform: translateY(-1px);
}
.mf-cta:active {
  transform: translateY(0);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 220, 170, 0.06),
    0 0 14px rgba(255, 122, 24, 0.35);
}
.mf-cta:focus-visible { outline: none; }
.mf-cta::after { content: none; }

/* === META =============================================== */
.mf-meta {
  position: absolute;
  left: 44px;
  bottom: 14px;
  z-index: 4;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--mf-meta);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* === RESPONSIVE ========================================= */
@media (max-width: 640px) {
  .mf-footer { height: 140px; }
  .mf-stack { padding: 0 30% 0 18px; gap: 4px; }
  .mf-wordmark { font-size: 30px; letter-spacing: -0.022em; }
  .mf-tagline { font-size: 11.5px; }
  .mf-cta { font-size: 10.5px; }
  .mf-meta { left: 18px; bottom: 10px; font-size: 9.5px; }
}

/* On really narrow screens, anvil moves under the wordmark visually
   (the JS puts it at left 18% of W which still works). */

/* === REDUCED MOTION ===================================== */
@media (prefers-reduced-motion: reduce) {
  .mf-wordmark {
    animation: none;
    filter:
      drop-shadow(0 0 7px  rgba(255,122,24,0.55))
      drop-shadow(0 0 22px rgba(255,122,24,0.32));
  }
  .mf-canvas { display: none; }
  /* Anvil canvas still drawn once, statically lit by ambient glow. */
  .mf-cta__arrow,
  .mf-cta::after { transition: none; }
}
