/**
 * AnimateBox.dev — Luminance Warp
 * https://animatebox.dev
 *
 * Host stage for the WebGL lattice plane + caption stack.
 */

.ab-luminance-warp {
  --ab-lw-font: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --ab-lw-bg: #0b0b0c;
  --ab-lw-fg: #f3f1ec;
  --ab-lw-caption-size: 4.5rem;
  --ab-lw-caption-weight: 700;
  --ab-lw-caption-tracking: -0.02em;

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  overflow: hidden;
  touch-action: manipulation;
  font-family: var(--ab-lw-font);
  background: var(--ab-lw-bg);
  color: var(--ab-lw-fg);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  cursor: pointer;
}

.ab-luminance-warp[data-ab-solo="true"] {
  cursor: default;
}

.ab-luminance-warp:focus-visible {
  outline: 2px solid rgba(243, 241, 236, 0.7);
  outline-offset: 4px;
}

.ab-luminance-warp__canvas-host {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ab-luminance-warp__canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.ab-luminance-warp__fallback {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.ab-luminance-warp__captions {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ab-luminance-warp__caption {
  position: absolute;
  margin: 0;
  text-align: center;
  color: var(--ab-lw-fg);
  font-size: var(--ab-lw-caption-size);
  font-weight: var(--ab-lw-caption-weight);
  letter-spacing: var(--ab-lw-caption-tracking);
  line-height: 1em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ab-luminance-warp__caption.is-active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .ab-luminance-warp {
    --ab-lw-caption-size: 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-luminance-warp__caption {
    transition: none;
  }
}
