/* Stand-in for the EzChat.gg promo video. It uses EzChat.gg's own colors, not suffix.gg's. */

.promo {
  --ez-teal: #2fbdc0;
  --ez-gold: #f1b330;
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: var(--sfx-space-6);
  background:
    linear-gradient(transparent 31px, rgb(47 189 192 / 0.05) 32px) 0 0 / 100% 32px,
    #0c1516;
  overflow: hidden;
}

.promo__chat {
  display: grid;
  gap: var(--sfx-space-2);
  max-width: 340px;
  padding: var(--sfx-space-3) var(--sfx-space-4);
  background: rgb(10 10 11 / 0.72);
  border-left: 3px solid var(--ez-teal);
  font: 500 var(--sfx-text-sm) / 1.4 var(--sfx-font-body);
}

.promo__who { color: var(--ez-gold); margin-right: 6px; }
.promo__tr {
  display: block;
  color: var(--ez-teal);
  font-size: var(--sfx-text-xs);
}
.promo__tr em {
  font-style: normal;
  color: var(--sfx-grey-400);
  margin-left: 6px;
}

.promo__tag,
.promo__play {
  position: absolute;
  top: var(--sfx-space-4);
  font: 500 var(--sfx-text-xs) / 1 var(--sfx-font-mono);
  color: var(--sfx-grey-400);
}
.promo__tag { left: var(--sfx-space-4); }
.promo__play { right: var(--sfx-space-4); transition: opacity var(--sfx-base) var(--sfx-ease); }

/* Still frame: only the first message shows. */
.promo__line:not(:first-child) { opacity: 0; }

.promo.is-playing .promo__play { opacity: 0; }
.promo.is-playing .promo__line { animation: promo-line 6s var(--sfx-ease) infinite; }
.promo.is-playing .promo__line .promo__tr { animation: promo-tr 6s var(--sfx-ease) infinite; }
.promo.is-playing .promo__line:nth-child(2),
.promo.is-playing .promo__line:nth-child(2) .promo__tr { animation-delay: 1.1s; }
.promo.is-playing .promo__line:nth-child(3),
.promo.is-playing .promo__line:nth-child(3) .promo__tr { animation-delay: 2.2s; }

@keyframes promo-line {
  0% { opacity: 0; transform: translateY(8px); }
  6%, 80% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: none; }
}

@keyframes promo-tr {
  0%, 12% { opacity: 0; }
  18%, 80% { opacity: 1; }
  92%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .promo.is-playing .promo__line,
  .promo.is-playing .promo__line .promo__tr { animation: none; opacity: 1; }
}
