/* Football palette override (unlayered: wins over the layered theme above) */
:root,
:host {
  --color-brand-red: #0b6b34;
  --color-brand-dark: #0c1f14;
  --color-brand-navy: #0f3d24;
  --color-brand-gold: #f7c948;
  --color-brand-gold-dark: #9a7100;
  --color-brand-green: #16a34a;
  --color-brand-teal: #0f8a5f;
  --color-brand-teal-dark: #0a6b49;
  --color-brand-teal-light: #e4f6ea;
}

/* --- Light football motion, CSS only (no JS, no libraries) --- */

/* Scroll progress bar with a rolling ball */
.fx-scroll-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 60;
  pointer-events: none;
  background: color-mix(in oklab, var(--color-brand-dark) 12%, transparent);
}

.fx-scroll-bar > span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--color-brand-green), var(--color-brand-gold));
}

.fx-ball {
  position: fixed;
  bottom: 6px;
  left: 0;
  width: 18px;
  height: 18px;
  z-index: 61;
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  background-image:
    radial-gradient(circle at 50% 50%, var(--color-brand-dark) 0 22%, transparent 23%),
    radial-gradient(circle at 12% 22%, var(--color-brand-dark) 0 12%, transparent 13%),
    radial-gradient(circle at 88% 22%, var(--color-brand-dark) 0 12%, transparent 13%),
    radial-gradient(circle at 12% 80%, var(--color-brand-dark) 0 12%, transparent 13%),
    radial-gradient(circle at 88% 80%, var(--color-brand-dark) 0 12%, transparent 13%);
}

@keyframes fx-progress {
  to {
    transform: scaleX(1);
  }
}

@keyframes fx-roll {
  from {
    transform: translateX(2px) rotate(0deg);
  }
  to {
    transform: translateX(calc(100vw - 24px)) rotate(900deg);
  }
}

@keyframes fx-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: scroll()) {
  .fx-scroll-bar > span {
    animation: fx-progress linear both;
    animation-timeline: scroll(root block);
  }

  .fx-ball {
    opacity: 1;
    animation: fx-roll linear both;
    animation-timeline: scroll(root block);
  }
}

@supports (animation-timeline: view()) {
  .football-fx section > h2,
  .football-fx section > .grid,
  .football-fx section > picture,
  .football-fx section > div > picture {
    animation: fx-rise 0.6s ease-out both;
    animation-timeline: view();
    animation-range: entry 5% cover 22%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-ball,
  .fx-scroll-bar {
    display: none;
  }
  .football-fx section > h2,
  .football-fx section > .grid,
  .football-fx section > picture,
  .football-fx section > div > picture {
    animation: none !important;
  }
}
