/* Dolf Agency — FX: giant masked DOLF wordmark closing the footer
   (fx/footer-wordmark.js injects div.fx-footer-mark as the last child of
   .site-footer).

   The mark is a mask: overflow hidden, pulled down over the footer's bottom
   padding so its lower edge is the page's lower edge. The letters sit in it
   with the bottom ~14% of the caps cut off, and rise up through it as the
   page reaches the end. D and L are solid, O and F are hairline outlines
   (same language as .approach-num / .process-num). On a fine pointer a soft
   light follows the cursor and fills the outlined letters where it passes.

   JS sets the exact font-size, height, row offset and edge compensation from
   the face's metrics; the em values below are only the pre-fit fallback. */

.fx-footer-mark {
  position: relative;
  overflow: hidden;
  height: 0.58em;
  margin: clamp(1rem, 3vw, 2rem) 0 -2.75rem; /* -2.75rem = .site-footer bottom padding (JS reads the live value) */
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 100px;
  line-height: 0.78;
  color: var(--fg);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* The fit measures right after changing font-size; the site's reduced-motion
   rule gives every element a 0.01ms transition on "all", which would leave
   the inherited font-size one frame stale and the measurement wrong. */
.fx-footer-mark,
.fx-footer-mark__row,
.fx-footer-mark__ch {
  transition: none !important;
}

/* Cursor light: a faint haze on the black behind the letters */
.fx-footer-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--fx-fm-a, 0);
  background: radial-gradient(
    circle 0.95em at var(--fx-fm-mx, 50%) var(--fx-fm-my, 60%),
    rgba(242, 242, 242, 0.1),
    rgba(242, 242, 242, 0.035) 38%,
    transparent 68%
  );
  /* the mask's top edge would otherwise cut the haze in a hard line */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 42%);
  mask-image: linear-gradient(to bottom, transparent, #000 42%);
}

.fx-footer-mark__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  line-height: 0.78;
  transform: translateY(-0.045em);
}

.fx-footer-mark__ch {
  display: inline-block;
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.78;
  color: var(--fg);
  -webkit-text-stroke: 0;
  will-change: transform;
}

/* Outlined letters (O, F): hairline stroke; the fill is a light that only
   exists around the cursor (background clipped to the glyphs). */
.fx-footer-mark__ch:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  background-image: radial-gradient(
    circle 0.62em at var(--fx-fm-lx, -9999px) var(--fx-fm-ly, -9999px),
    rgba(242, 242, 242, calc(var(--fx-fm-a, 0) * 0.92)),
    rgba(242, 242, 242, calc(var(--fx-fm-a, 0) * 0.34)) 38%,
    rgba(242, 242, 242, 0) 72%
  );
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-reduced-motion: reduce) {
  .fx-footer-mark__ch {
    transform: none !important;
    will-change: auto;
  }
  .fx-footer-mark::before { display: none; }
  .fx-footer-mark__ch:nth-child(even) { background-image: none; }
}

@media (forced-colors: active) {
  .fx-footer-mark__ch:nth-child(even) {
    color: CanvasText;
    -webkit-text-stroke: 0;
    background-image: none;
  }
}

@media print {
  .fx-footer-mark { display: none; }
}
