/* ==========================================================================
   FIXED COMPACT TOP WORDMARK ("BLUE") — Alpha Tango Header Inspiration
   - Same Archivo Black display voice as Home wordmark, scaled to ~24px height
   - Fixed horizontally centered near the top (top: 40px, z-index: 100)
   - Pure #ffffff + mix-blend-mode: difference directly in root stacking context
     so it inverts automatically over dark, light, and colored project cards
   - Completely hidden in initial Home state (masked below overflow: clip)
   - 1:1 scroll-scrubbed center-outward per-letter reveal (L/U -> B/E) during
     Home-to-Work transition, fully reversible on upward scroll
   - pointer-events: none so it never interferes with card hover interactions
   ========================================================================== */

.brand-mark {
  position: fixed;
  top: clamp(1.5rem, 4.2dvh, 2.5rem);
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  mix-blend-mode: difference;
  pointer-events: none;
  user-select: none;
}

.brand-mark__wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.08em;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.8vw, 1.75rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  overflow: clip;
}

.brand-mark__letter {
  display: inline-block;
  transform: translate3d(0, 125%, 0);
}

/* Native CSS Scroll-Driven Center-Outward Mask Reveal (100% Reversible) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0px 100vh)) {
    .brand-mark__letter {
      will-change: transform;
      animation: brand-mark-rise linear both;
      animation-timeline: scroll(root block);
    }

    .brand-mark__letter--inner {
      animation-range: 12dvh 34dvh;
    }

    .brand-mark__letter--outer {
      animation-range: 22dvh 46dvh;
    }
  }
}

@keyframes brand-mark-rise {
  0% {
    transform: translate3d(0, 125%, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Reduced motion: hidden in Home, statically visible once past Home */
@media (prefers-reduced-motion: reduce) {
  .brand-mark__letter {
    animation: none;
    transform: translate3d(0, 125%, 0);
  }

  .brand-mark.is-visible .brand-mark__letter {
    transform: translate3d(0, 0, 0);
  }
}
