/* ==========================================================================
   n3-flame — "Your inventory. / Burning brighter." for the ManaForge section (Nocturne III) · Pilot light.
   Prefix .fl-. Needs nl-site.css (tokens, fonts) and assets/js/n3-flame.js.

   The h2 is real text and always sits on top (z-index 1); the effect is ONE canvas BEHIND it (.fl-fx,
   z-index 0, aria-hidden). The block reserves its own effect room: padding-top above the text and
   padding-bottom for the glow + a 24 px clear zone (--fl-clear) that the effect never enters, so whatever
   follows the block (the buttons) stays untouched. Without JS the headline shows the plain base type.
   ========================================================================== */
.fl {
  --fl-fs1: clamp(40px, 5.4vw, 84px);              /* "Your inventory."  */
  --fl-fs2: clamp(64px, 10vw, 168px);              /* "Burning brighter." */
  --fl-clear: 24px;                                /* effect-free zone at the bottom of the block */
  --fl-pad-t: calc(var(--fl-fs2) * .14);           /* room above the text */
  --fl-pad-b: calc(var(--fl-fs2) * .12 + var(--fl-clear));
  --fl-bleed: 16px;                                /* the canvas reaches this far left/right of the block */
  --fl-em-bg: linear-gradient(90deg, #8FA6FF 0%, #C08BF0 48%, #FF7AD6 96%);
  position: relative;
  isolation: isolate;
  padding: var(--fl-pad-t) 0 var(--fl-pad-b);
}

.fl-title {
  position: relative; z-index: 1;
  margin: 0;
  font-family: var(--f-head, "Albert Sans", "Geist", system-ui, sans-serif);
  font-weight: 600;
  color: #F4F2FC;
}
.fl-l1 { display: block; font-size: var(--fl-fs1); line-height: 1.02; letter-spacing: -.05em; color: #F4F2FC; }
.fl-l2 { display: block; font-size: var(--fl-fs2); line-height: .95; letter-spacing: -.06em; }
.fl-w { color: #F4F2FC; }
.fl-em {
  display: inline-block;                           /* a single word: wraps like inline */
  font-style: normal;
  padding-right: .04em;                            /* keeps the clipped gradient off the full stop's edge */
  background-image: var(--fl-em-bg);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* the effect layer */
.fl-fx {
  position: absolute; z-index: 0;
  top: 0; bottom: 0;
  left: calc(var(--fl-bleed) * -1); right: calc(var(--fl-bleed) * -1);
  pointer-events: none;
}
.fl-fx canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; }

/* the light wave recolours the real letters through custom properties set by n3-flame.js (fallback = base type) */
.fl-js .fl-w {
  background-image: var(--fl-wbg, linear-gradient(#F4F2FC, #F4F2FC));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.fl-js .fl-em { background-image: var(--fl-embg, var(--fl-em-bg)); }
/* the full stop becomes the pilot flame (drawn on the canvas, same size, same baseline) once JS has drawn it */
.fl-on .fl-dot { visibility: hidden; }

/* "Burning brighter." wrapped onto two lines (set by JS from the measured glyphs, so it follows the real wrap) */
.fl-wrapped .fl-l2 { line-height: 1.04; }
