/* =============================================================================
   Xaelin — logo.css
   Dependency-free. Pair with the inline SVGs in Web/ (icon.svg, lockup*.svg, glyph-mono.svg).
   <link rel="stylesheet" href="logo.css">, then put classes on the inlined <svg>.

   Classes on the <svg>
     .xl-logo                base
     .xl-logo--icon          tiled icon
     .xl-logo--lockup        horizontal lockup
     .xl-logo--mono          currentColor versions (set `color` on a parent)
     .xl-logo--interactive   opt-in hover lift
     .xl-anim-enter          play the entrance once: tile settles, the six bars rise from the
                             centreline in order, the headband drops onto the cups, the wordmark
                             is revealed left to right (a wipe of the existing outlined path)
     .xl-anim-talk           restrained loop: the four inner bars move like a voice on a call,
                             cups and band stay still (use while a call is live / connecting)
     [data-xl-replay]        hook for a replay button (see demo.html)

   Parts inside the SVGs (same class names in every file)
     .xl-tile  .xl-glyph  .xl-band  .xl-cup  .xl-bar  .xl-b1 … .xl-b6  .xl-wordmark  .xl-letter
     Each bar carries style="--i:n" for the stagger.

   The wordmark is never restyled: no colour shift, no tracking, no per-letter movement.
   Respects prefers-reduced-motion: no animation, the final mark is shown.
   ============================================================================= */

:root {
  --xl-ink: #0B0B0C;
  --xl-white: #FFFFFF;
  --xl-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --xl-lift-shadow: 0 8px 18px rgba(11, 11, 12, 0.22);
}

.xl-logo {
  display: inline-block;
  overflow: visible;
  vertical-align: middle;
  color: currentColor;
}

.xl-logo .xl-tile,
.xl-logo .xl-band,
.xl-logo .xl-cup,
.xl-logo .xl-bar,
.xl-logo .xl-wordmark {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

/* ----- Hover lift ---------------------------------------------------------- */
.xl-logo--interactive {
  transform: translateY(0);
  filter: drop-shadow(0 0 0 rgba(11, 11, 12, 0));
  transition: transform 0.3s var(--xl-ease), filter 0.3s var(--xl-ease);
  cursor: pointer;
}
.xl-logo--interactive:hover,
.xl-logo--interactive:focus-visible {
  transform: translateY(-3px);
  filter: drop-shadow(var(--xl-lift-shadow));
}
.xl-logo--interactive:active { transform: translateY(-1px); }
.xl-on-dark .xl-logo--interactive:hover,
.xl-on-dark .xl-logo--interactive:focus-visible {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

/* ----- Entrance (once) ----------------------------------------------------- */
.xl-anim-enter .xl-tile {
  animation: xl-tile-in 0.5s var(--xl-ease) both;
}
.xl-anim-enter .xl-cup,
.xl-anim-enter .xl-bar {
  animation: xl-bar-in 0.55s var(--xl-ease) both;
  animation-delay: calc(120ms + var(--i, 1) * 55ms);
}
.xl-anim-enter .xl-band {
  animation: xl-band-in 0.5s var(--xl-ease) both;
  animation-delay: 520ms;
}
.xl-anim-enter .xl-wordmark {
  animation: xl-wipe 0.7s var(--xl-ease) both;
  animation-delay: 560ms;
}

@keyframes xl-tile-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes xl-bar-in {
  from { opacity: 0; transform: scaleY(0.12); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: scaleY(1); }
}
@keyframes xl-band-in {
  from { opacity: 0; transform: translateY(-18%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes xl-wipe {
  from { clip-path: inset(-10% 100% -10% 0); }
  to   { clip-path: inset(-10% 0 -10% 0); }
}

/* ----- Talk loop (restrained) ---------------------------------------------- */
.xl-anim-talk .xl-bar {
  animation: xl-talk 1.5s ease-in-out infinite;
  animation-delay: calc(var(--i, 1) * -0.23s);
}
.xl-anim-enter.xl-anim-talk .xl-bar {
  animation: xl-bar-in 0.55s var(--xl-ease) both, xl-talk 1.5s ease-in-out 1.4s infinite;
  animation-delay: calc(120ms + var(--i, 1) * 55ms), calc(1.4s + var(--i, 1) * -0.23s);
}
@keyframes xl-talk {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.62); }
}

/* ----- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .xl-logo, .xl-logo * {
    animation: none !important;
    transition: none !important;
  }
  .xl-logo--interactive:hover,
  .xl-logo--interactive:focus-visible { transform: none; }
}
