/* ============================================================
   KITforge Labs - LED ticker (Tools + Games)
   Rendered by template-parts/kit-ticker.php. Font: Doto ExtraBold, a dot-matrix face (SIL OFL, assets/fonts).
   Lit colour = --kf-brand-accent-2 (brand.css); change --kit-led to recolour.
   Click anywhere on the panel to pause / continue (the invisible button covers it).
   ============================================================ */
@font-face {
  font-family: "Doto";
  src: url("../fonts/Doto-ExtraBold-latin.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 800;
}

.kit-ticker {
  --kit-led: var(--kf-brand-accent-2, #8add7f);
  --kit-led-mark: var(--kf-brand-primary, #fd6077);
  --kit-led-bg: #020a26;
  --kit-led-pitch: 5px;
  background: var(--kit-led-bg);
  border: 1px solid var(--kf-brand-line, rgba(240, 231, 213, 0.18));
  border-radius: 0;
  box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.7);
  margin: 0 0 0.4rem;
  overflow: hidden;
  position: relative;
}

.kit-ticker__window {
  align-items: center;
  display: flex;
  height: 2.48rem;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 2rem, #000 calc(100% - 2rem), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 2rem, #000 calc(100% - 2rem), transparent 100%);
}

.kit-ticker__track {
  animation: kit-ticker-scroll var(--kit-ticker-secs, 40s) linear infinite;
  display: flex;
  flex: none;
  width: max-content;
  will-change: transform;
}

.kit-ticker__run { align-items: center; display: flex; flex: none; }

.kit-ticker__seg {
  color: var(--kit-led);
  font-family: "Doto", "Courier New", ui-monospace, monospace;
  font-size: 2.7rem; /* capitals are ~0.68em: 29.4px in the 39.7px window = ~5px above and below */
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 0.25rem rgba(138, 221, 127, 0.5);
  text-transform: uppercase;
  white-space: nowrap;
}

.kit-ticker__sep {
  background: var(--kit-led-mark);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  flex: none;
  height: 1rem;
  margin: 0 1.6rem;
  width: 1rem;
}

@keyframes kit-ticker-scroll { to { transform: translateX(-50%); } }

.kit-ticker.is-paused .kit-ticker__track { animation-play-state: paused; }

/* the whole panel is the pause / continue control */
.kit-ticker__toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  inset: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  width: 100%;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.kit-ticker__toggle:focus-visible {
  outline: 0.2rem solid var(--kf-brand-accent, #feff00);
  outline-offset: -0.35rem;
}

/* Reduced motion: no scrolling board, the message is shown as plain wrapped text */
@media (prefers-reduced-motion: reduce) {
  .kit-ticker__window,
  .kit-ticker__toggle { display: none; }
  body.kit-custom-template .kit-ticker > .screen-reader-text {
    clip: auto;
    clip-path: none;
    color: var(--kit-led);
    font: 800 1.1rem/1.5 "Doto", "Courier New", ui-monospace, monospace;
    height: auto;
    margin: 0;
    overflow: visible;
    padding: 0.8rem 1rem;
    position: static;
    text-transform: uppercase;
    width: auto;
  }
}
