/* ===== Glitch Wrapper ===== */
.hd-glitch-demo.demo-2 {
  --color-text: #aaa;
  --color-bg: transparent;
  --color-link: #1c1cc9;
  --color-link-hover: #aaa;
  --color-info: #1c1cc9;

  --glitch-width: 100%;
  --glitch-height: 100%;
  --gap-horizontal: 10px;
  --gap-vertical: 5px;

  --color-title: #fff;
  --time-anim: 4s;
  --delay-anim: 2s;

  /* === CHROMATIC GLITCH SETTINGS === */
  /* base stays neutral */
  --blend-mode-1: normal;

  /* R / C / G-ish channels for slices */
  --blend-mode-2: screen;
  --blend-mode-3: screen;
  --blend-mode-4: screen;
  --blend-mode-5: screen;

  --blend-color-1: transparent;
  --blend-color-2: rgba(255, 0, 80, 0.55);   /* red / magenta */
  --blend-color-3: rgba(0, 255, 255, 0.55);  /* cyan */
  --blend-color-4: rgba(120, 255, 0, 0.55);  /* green-ish */
  --blend-color-5: rgba(255, 255, 255, 0.35);/* flash white */

  position: relative;
  width: 100%;
  background: var(--color-bg);
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


  /* Outer box with adjustable aspect ratio (16:9 now) */
  .hd-glitch-box {
    position: relative;
    width: 100%;
    padding-top: 25%; /* aspect ratio: 16/9. Change this if needed */
    overflow: hidden;
    background: transparent;
  }

  /* Glitch layer */
  .glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--glitch-width);
    height: var(--glitch-height);
    overflow: hidden;
  }

  .glitch__img {
    position: absolute;
    top: calc(-1 * var(--gap-vertical));
    left: calc(-1 * var(--gap-horizontal));
    width: calc(100% + var(--gap-horizontal) * 2);
    height: calc(100% + var(--gap-vertical) * 2);
    background: url("hard-deck-title.webp")
      no-repeat 50% 50%;
    background-color: transparent; 
    background-size: contain;
    transform: translate3d(0, 0, 0);
    background-blend-mode: var(--blend-mode-1);
  }

  .glitch__img:nth-child(n + 2) {
    opacity: 0;
  }

  .imgloaded .glitch__img:nth-child(n + 2) {
    animation-duration: var(--time-anim);
    animation-delay: var(--delay-anim);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .imgloaded .glitch__img:nth-child(2),
  .imgloaded .glitch__img:nth-child(3),
  .imgloaded .glitch__img:nth-child(4),
  .imgloaded .glitch__img:nth-child(5),
  .imgloaded .glitch__img:nth-child(6),
  .imgloaded .glitch__img:nth-child(7),
  .imgloaded .glitch__img:nth-child(8),
  .imgloaded .glitch__img:nth-child(9) {
    mix-blend-mode: screen;
    opacity: 0.01;
  }

  .imgloaded .glitch__img:nth-child(2) {
    color: rgba(255, 0, 80, 0.55);        /* red/magenta */
    filter: drop-shadow(3px 0 0 currentColor);   /* shift right */
    animation-name: glitch-anim-1;
  }

  .imgloaded .glitch__img:nth-child(3) {
    color: rgba(0, 255, 255, 0.55);       /* cyan */
    filter: drop-shadow(-3px 0 0 currentColor);  /* shift left */
    animation-name: glitch-anim-2;
  }

  .imgloaded .glitch__img:nth-child(4) {
    color: rgba(120, 255, 0, 0.55);       /* green */
    filter: drop-shadow(0 3px 0 currentColor);   /* shift down */
    animation-name: glitch-anim-3;
  }

  .imgloaded .glitch__img:nth-child(5) {
    color: rgba(255, 255, 255, 0.35);     /* flash */
    filter: drop-shadow(3px -3px 0 currentColor);  /* shift up */
    animation-name: glitch-anim-flash;
  }
  
    /* Micro layer A: fast thin horizontal slices */
  .imgloaded .glitch__img:nth-child(6) {
    filter: drop-shadow(3px 4px 0 currentColor); /* tiny sideways chroma */
    color: rgba(255, 255, 255, 0.45);
    animation-name: glitch-anim-micro-1;
    animation-duration: 1.1s;
    animation-delay: 0.17s;            /* off-phase vs main glitch */
    animation-iteration-count: infinite;
    animation-timing-function: steps(1, end);
  }

  /* Micro layer B: even faster, different rhythm */
  .imgloaded .glitch__img:nth-child(7) {
    color: rgba(255, 255, 255, 0.45);
    filter: drop-shadow(0 3px 0 currentColor); /* tiny vertical shift */
    animation-name: glitch-anim-micro-2;
    animation-duration: 1.37s;
    animation-delay: 0.41s;            /* different offset = async */
    animation-iteration-count: infinite;
    animation-timing-function: steps(1, end);
  }
  
  /* Chroma micro A — soft red, very frequent */

.imgloaded .glitch__img:nth-child(8) {
  color: rgba(255, 60, 120, 0.55);             /* soft magenta */
  filter: drop-shadow(1px 0 0 currentColor);   /* tiny horizontal split */
  animation-name: glitch-anim-chroma-1;
  animation-duration: 3.35s;                    /* faster than others */
  animation-delay: 0.09s;                      /* off-phase */
  animation-iteration-count: infinite;
  animation-timing-function: steps(1, end);
}

/* Chroma micro B — soft cyan, different cadence */
.imgloaded .glitch__img:nth-child(9) {
  color: rgba(0, 220, 255, 0.55);              /* soft cyan */
  filter: drop-shadow(-1px 0 0 currentColor);  /* tiny in opposite direction */
  animation-name: glitch-anim-chroma-2;
  animation-duration: 2.68s;
  animation-delay: 0.27s;                      /* also off-phase */
  animation-iteration-count: infinite;
  animation-timing-function: steps(1, end);
}

  /* ===== Center Title (optional) ===== */
  .content__title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    text-align: center;
    font-size: clamp(28px, 7vw, 64px);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-title);
    pointer-events: none;
    animation-name: glitch-anim-text;
    animation-duration: var(--time-anim);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: calc(var(--delay-anim) + var(--time-anim) * 0.2);
  }

  /* ===== Animations (same as your original) ===== */

  @keyframes glitch-anim-1 {
    0% {
      opacity: 1;
      transform: translate3d(var(--gap-horizontal), 0, 0);
      -webkit-clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
      clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    }
    2% {
      -webkit-clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%);
      clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%);
    }
    4% {
      -webkit-clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
      clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
    }
    6% {
      -webkit-clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%);
      clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%);
    }
    8% {
      -webkit-clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%);
      clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%);
    }
    10% {
      -webkit-clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%);
      clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%);
    }
    12% {
      -webkit-clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%);
      clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%);
    }
    14% {
      -webkit-clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%);
      clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%);
    }
    16% {
      -webkit-clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%);
      clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%);
    }
    18% {
      -webkit-clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
      clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
    }
    20% {
      -webkit-clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%);
      clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%);
    }
    21.9% {
      opacity: 1;
      transform: translate3d(var(--gap-horizontal), 0, 0);
    }
    22%,
    100% {
      opacity: 0;
      transform: translate3d(0, 0, 0);
      -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
      clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
  }

  @keyframes glitch-anim-2 {
    0% {
      opacity: 1;
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0);
      -webkit-clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
      clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
    }
    3% {
      -webkit-clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
      clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
    }
    5% {
      -webkit-clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
      clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
    }
    7% {
      -webkit-clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
      clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
    }
    9% {
      -webkit-clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
      clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
    }
    11% {
      -webkit-clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
      clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
    }
    13% {
      -webkit-clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
      clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
    }
    15% {
      -webkit-clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
      clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
    }
    17% {
      -webkit-clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%);
      clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%);
    }
    19% {
      -webkit-clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
      clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
    }
    20% {
      -webkit-clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%);
      clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%);
    }
    21.9% {
      opacity: 1;
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0);
    }
    22%,
    100% {
      opacity: 0;
      transform: translate3d(0, 0, 0);
      -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
      clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
  }

  @keyframes glitch-anim-3 {
    0% {
      opacity: 1;
      transform: translate3d(0, calc(-1 * var(--gap-vertical)), 0) scale3d(-1, -1, 1);
      -webkit-clip-path: polygon(0 1%, 100% 1%, 100% 3%, 0 3%);
      clip-path: polygon(0 1%, 100% 1%, 100% 3%, 0 3%);
    }
    1.5% {
      -webkit-clip-path: polygon(0 10%, 100% 10%, 100% 9%, 0 9%);
      clip-path: polygon(0 10%, 100% 10%, 100% 9%, 0 9%);
    }
    2% {
      -webkit-clip-path: polygon(0 5%, 100% 5%, 100% 6%, 0 6%);
      clip-path: polygon(0 5%, 100% 5%, 100% 6%, 0 6%);
    }
    2.5% {
      -webkit-clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
      clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
    }
    3% {
      -webkit-clip-path: polygon(0 10%, 100% 10%, 100% 10%, 0 10%);
      clip-path: polygon(0 10%, 100% 10%, 100% 10%, 0 10%);
    }
    5% {
      -webkit-clip-path: polygon(0 30%, 100% 30%, 100% 25%, 0 25%);
      clip-path: polygon(0 30%, 100% 30%, 100% 25%, 0 25%);
    }
    5.5% {
      -webkit-clip-path: polygon(0 15%, 100% 15%, 100% 16%, 0 16%);
      clip-path: polygon(0 15%, 100% 15%, 100% 16%, 0 16%);
    }
    7% {
      -webkit-clip-path: polygon(0 40%, 100% 40%, 100% 39%, 0 39%);
      clip-path: polygon(0 40%, 100% 40%, 100% 39%, 0 39%);
    }
    8% {
      -webkit-clip-path: polygon(0 20%, 100% 20%, 100% 21%, 0 21%);
      clip-path: polygon(0 20%, 100% 20%, 100% 21%, 0 21%);
    }
    9% {
      -webkit-clip-path: polygon(0 60%, 100% 60%, 100% 55%, 0 55%);
      clip-path: polygon(0 60%, 100% 60%, 100% 55%, 0 55%);
    }
    10.5% {
      -webkit-clip-path: polygon(0 30%, 100% 30%, 100% 31%, 0 31%);
      clip-path: polygon(0 30%, 100% 30%, 100% 31%, 0 31%);
    }
    11% {
      -webkit-clip-path: polygon(0 70%, 100% 70%, 100% 69%, 0 69%);
      clip-path: polygon(0 70%, 100% 70%, 100% 69%, 0 69%);
    }
    13% {
      -webkit-clip-path: polygon(0 40%, 100% 40%, 100% 41%, 0 41%);
      clip-path: polygon(0 40%, 100% 40%, 100% 41%, 0 41%);
    }
    14% {
      -webkit-clip-path: polygon(0 80%, 100% 80%, 100% 75%, 0 75%);
      clip-path: polygon(0 80%, 100% 80%, 100% 75%, 0 75%);
    }
    14.5% {
      -webkit-clip-path: polygon(0 50%, 100% 50%, 100% 51%, 0 51%);
      clip-path: polygon(0 50%, 100% 50%, 100% 51%, 0 51%);
    }
    15% {
      -webkit-clip-path: polygon(0 90%, 100% 90%, 100% 90%, 0 90%);
      clip-path: polygon(0 90%, 100% 90%, 100% 90%, 0 90%);
    }
    16% {
      -webkit-clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
      clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
    }
    18% {
      -webkit-clip-path: polygon(0 100%, 100% 100%, 100% 99%, 0 99%);
      clip-path: polygon(0 100%, 100% 100%, 100% 99%, 0 99%);
    }
    20% {
      -webkit-clip-path: polygon(0 70%, 100% 70%, 100% 71%, 0 71%);
      clip-path: polygon(0 70%, 100% 70%, 100% 71%, 0 71%);
    }
    21.9% {
      opacity: 1;
      transform: translate3d(0, calc(-1 * var(--gap-vertical)), 0) scale3d(-1, -1, 1);
    }
    22%,
    100% {
      opacity: 0;
      transform: translate3d(0, 0, 0);
      -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
      clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
  }

  @keyframes glitch-anim-text {
    0% {
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0) scale3d(-1, -1, 1);
      -webkit-clip-path: polygon(0 20%, 100% 20%, 100% 21%, 0 21%);
      clip-path: polygon(0 20%, 100% 20%, 100% 21%, 0 21%);
    }
    2% {
      -webkit-clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%);
      clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%);
    }
    4% {
      -webkit-clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%);
      clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%);
    }
    5% {
      -webkit-clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%);
      clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%);
    }
    6% {
      -webkit-clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%);
      clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%);
    }
    7% {
      -webkit-clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%);
      clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%);
    }
    8% {
      -webkit-clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
      clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%);
    }
    9% {
      -webkit-clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%);
      clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%);
    }
    9.9% {
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0) scale3d(-1, -1, 1);
    }
    10%,
    100% {
      transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
      -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
      clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }
  }

  @keyframes glitch-anim-flash {
    0%,
    5% {
      opacity: 0.2;
      transform: translate3d(var(--gap-horizontal), var(--gap-vertical), 0);
    }
    5.5%,
    100% {
      opacity: 0;
      transform: translate3d(0, 0, 0);
    }
  }
  
  @keyframes glitch-anim-micro-1 {
    0% { opacity: 0; clip-path: polygon(0 12%, 100% 12%, 100% 14%, 0 14%); }
    8% { opacity: .45; clip-path: polygon(0 31%, 100% 31%, 100% 33%, 0 33%); }
    15% { opacity: .5; clip-path: polygon(0 7%, 100% 7%, 100% 9%, 0 9%); }
    25% { opacity: .4; clip-path: polygon(0 57%, 100% 57%, 100% 59%, 0 59%); }
    37% { opacity: .45; clip-path: polygon(0 45%, 100% 45%, 100% 47%, 0 47%); }
    48% { opacity: .35; clip-path: polygon(0 72%, 100% 72%, 100% 74%, 0 74%); }
    62% { opacity: .5; clip-path: polygon(0 28%, 100% 28%, 100% 30%, 0 30%); }
    76% { opacity: .35; clip-path: polygon(0 81%, 100% 81%, 100% 83%, 0 83%); }
    88% { opacity: .45; clip-path: polygon(0 52%, 100% 52%, 100% 54%, 0 54%); }
    100% { opacity: 0; clip-path: polygon(0 0,0 0,0 0,0 0); }
  }

  /* Narrow bands, different vertical positions & timing */
  @keyframes glitch-anim-micro-2 {
    0% {
      opacity: 0;
      -webkit-clip-path: polygon(0 12%, 100% 12%, 100% 13%, 0 13%);
              clip-path: polygon(0 12%, 100% 12%, 100% 13%, 0 13%);
    }
    10% {
      opacity: 0.5;
      -webkit-clip-path: polygon(0 51%, 100% 51%, 100% 52%, 0 52%);
              clip-path: polygon(0 51%, 100% 51%, 100% 52%, 0 52%);
    }
    25% {
      opacity: 0.35;
      -webkit-clip-path: polygon(0 34%, 100% 34%, 100% 35%, 0 35%);
              clip-path: polygon(0 34%, 100% 34%, 100% 35%, 0 35%);
    }
    40% {
      opacity: 0.45;
      -webkit-clip-path: polygon(0 69%, 100% 69%, 100% 70%, 0 70%);
              clip-path: polygon(0 69%, 100% 69%, 100% 70%, 0 70%);
    }
    60% {
      opacity: 0.4;
      -webkit-clip-path: polygon(0 23%, 100% 23%, 100% 24%, 0 24%);
              clip-path: polygon(0 23%, 100% 23%, 100% 24%, 0 24%);
    }
    80% {
      opacity: 0.25;
      -webkit-clip-path: polygon(0 83%, 100% 83%, 100% 84%, 0 84%);
              clip-path: polygon(0 83%, 100% 83%, 100% 84%, 0 84%);
    }
    100% {
      opacity: 0;
      -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
              clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
  }

  /* Quick, jittery on/off pulses for red/magenta */
  @keyframes glitch-anim-chroma-1 {
    0% {
      opacity: 0.5;
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0);
      -webkit-clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
      clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
    }
    3% {
      -webkit-clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
      clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
    }
    5% {
      -webkit-clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
      clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
    }
    7% {
      -webkit-clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
      clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
    }
    9% {
      -webkit-clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
      clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
    }
    11% {
      -webkit-clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
      clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
    }
    13% {
      -webkit-clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
      clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
    }
    15% {
      -webkit-clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
      clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
    }
    17% {
      -webkit-clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%);
      clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%);
    }
    19% {
      -webkit-clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
      clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
    }
    20% {
      -webkit-clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%);
      clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%);
    }
    21.9% {
      opacity: 1;
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0);
    }
    22%,
    100% {
      opacity: 0;
      transform: translate3d(0, 0, 0);
      -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
      clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
  }

  /* Different rhythm for cyan so they don't sync */
  @keyframes glitch-anim-chroma-2 {
    0% {
      opacity: 0.5;
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0);
      -webkit-clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
      clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
    }
    3% {
      -webkit-clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
      clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%);
    }
    5% {
      -webkit-clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
      clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%);
    }
    7% {
      -webkit-clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
      clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%);
    }
    9% {
      -webkit-clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
      clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%);
    }
    11% {
      -webkit-clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
      clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%);
    }
    13% {
      -webkit-clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
      clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%);
    }
    15% {
      -webkit-clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
      clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%);
    }
    17% {
      -webkit-clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%);
      clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%);
    }
    19% {
      -webkit-clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
      clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%);
    }
    20% {
      -webkit-clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%);
      clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%);
    }
    21.9% {
      opacity: 1;
      transform: translate3d(calc(-1 * var(--gap-horizontal)), 0, 0);
    }
    22%,
    100% {
      opacity: 0;
      transform: translate3d(0, 0, 0);
      -webkit-clip-path: polygon(0 0, 0 0, 0 0, 0 0);
      clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
  }



.hero h1 {width:min(52vw,730px);margin:10px 0 15px}
.hd-glitch-demo.demo-2{--time-anim:6s;--gap-horizontal:5px;--gap-vertical:2px;isolation:isolate}
.glitch__img{inset:0;width:100%;height:100%}
.hd-glitch-box{display:block}
.hero h1 .hd-glitch-demo{display:block;margin-left:-2%}

@media(prefers-reduced-motion:reduce){.imgloaded .glitch__img:nth-child(n+2){animation:none;opacity:0}}
@media(max-width:650px){.hero h1{width:min(87vw,510px)}}