/**
 * AnimateBox.dev — Mesh Text Hover
 * https://animatebox.dev
 *
 * WebGL mesh text. Theme via --ab-mth-* variables.
 * Default visual system: DM Sans, near-black / white, solid backgrounds.
 */

.ab-mesh-text-hover {
  --ab-mth-bg: #0b0b0c;
  --ab-mth-color: #f3f1ec;
  --ab-mth-font: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --ab-mth-size: 160px;
  --ab-mth-weight: 700;
  --ab-mth-style: normal;

  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 240px;
  margin: 0;
  padding: 0;
  background: var(--ab-mth-bg);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.ab-mesh-text-hover__canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
  background: transparent;
}

.ab-mesh-text-hover__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  color: var(--ab-mth-color);
  font-family: var(--ab-mth-font);
  font-size: clamp(2.5rem, 12vw, var(--ab-mth-size));
  font-weight: var(--ab-mth-weight);
  font-style: var(--ab-mth-style);
  letter-spacing: -0.04em;
  line-height: 1em;
  text-align: center;
  pointer-events: none;
}

.ab-mesh-text-hover[data-reduced="false"] .ab-mesh-text-hover__fallback,
.ab-mesh-text-hover[data-webgl="true"] .ab-mesh-text-hover__fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ab-mesh-text-hover[data-reduced="true"] .ab-mesh-text-hover__canvas,
.ab-mesh-text-hover[data-webgl="false"] .ab-mesh-text-hover__canvas {
  display: none;
}

.ab-mesh-text-hover--tall {
  min-height: min(100vh, 720px);
}
