/* Alzam Sports Data: live-data motion layer (ticker, stats strip, hero depth, scroll reveals, telemetry scan).
   Everything is visible and static without JavaScript, without scroll-timeline support and with
   prefers-reduced-motion: reduce. Only transform, opacity, clip-path and background-position are animated. */

/* ---------- Live ticker (looks like a live data / odds feed) ---------- */
.ticker-wrap { position: relative; z-index: 3; margin-top: clamp(-34px, -2.4vw, -18px); }
.ticker {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: stretch;
  min-height: 48px; border-radius: 12px;
  background: var(--navy); color: #C9D1D9;
  box-shadow: 0 18px 36px -24px rgba(0, 23, 38, .8), inset 0 0 0 1px rgba(255, 255, 255, .06);
  --focus: var(--white);
}
.ticker::after { /* thin telemetry rule at the bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, var(--pink) 0 18%, var(--green) 18% 60%, var(--cyan) 60%);
  opacity: .9;
}
.ticker__live {
  position: relative; z-index: 2; flex: none;
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 0 16px 0 16px;
  background: var(--pink-strong); color: var(--white);
  font: 700 1rem/1 var(--font-display); letter-spacing: .16em; text-transform: uppercase;
}
.ticker__live::after { /* angled racing edge */
  content: ""; position: absolute; top: 0; bottom: 0; right: -12px; width: 13px;
  background: var(--pink-strong); clip-path: polygon(0 0, 100% 0, 8% 100%, 0 100%);
}
.ticker__dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--white); }
.ticker__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); opacity: 0; }
.ticker__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 2px; }
.ticker__eq i { display: block; width: 3px; height: 12px; border-radius: 1px; background: rgba(255, 255, 255, .85); transform-origin: 50% 100%; transform: scaleY(.55); }
.ticker__eq i:nth-child(2) { transform: scaleY(.9); }
.ticker__eq i:nth-child(3) { transform: scaleY(.4); }
.ticker__eq i:nth-child(4) { transform: scaleY(.75); }

.ticker__viewport {
  position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden;
  display: flex; align-items: center; padding-left: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 36px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 36px), transparent);
}
.ticker__track { display: flex; width: max-content; }
.ticker__list { display: flex; flex: none; align-items: center; }
.ticker__list li {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px 12px 0; white-space: nowrap;
  font: 600 1rem/1.2 var(--font-display); letter-spacing: .1em; text-transform: uppercase; color: #E2E8EE;
}
.ticker__list b { font-weight: 700; color: var(--green); letter-spacing: .12em; }
.ticker__sep { width: 18px; height: 12px; flex: none; fill: none; stroke: var(--pink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ticker__flag { width: 16px; height: 12px; flex: none; border-radius: 1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }

.ticker__toggle {
  position: relative; z-index: 2; flex: none; display: none; place-items: center;
  width: 48px; min-height: 48px; padding: 0; border: 0; border-left: 1px solid rgba(255, 255, 255, .1);
  background: transparent; color: var(--white); cursor: pointer;
}
.ticker__toggle .icon { width: 18px; height: 18px; }
.ticker__toggle .ticker__play { display: none; }
.ticker__toggle[aria-pressed="true"] .ticker__pause { display: none; }
.ticker__toggle[aria-pressed="true"] .ticker__play { display: block; }
.ticker__toggle:hover { background: rgba(255, 255, 255, .08); }
.ticker__toggle:focus-visible { outline-offset: -4px; }

/* Static, wrapping list: no JS, reduced motion, or no-preference not matched */
.ticker__list[aria-hidden="true"] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .js .ticker__toggle { display: grid; }
  .ticker__list[aria-hidden="true"] { display: flex; }
  .ticker__list { padding-right: 0; }
  .ticker__track { animation: ticker 46s linear infinite; }
  .ticker:hover .ticker__track,
  .ticker:focus-within .ticker__track,
  .ticker.is-paused .ticker__track,
  .ticker.is-off .ticker__track { animation-play-state: paused; }
  .ticker__dot::after { animation: live-ping 1.6s cubic-bezier(.2, .6, .3, 1) infinite; }
  .ticker__eq i { animation: eq 1.1s ease-in-out infinite alternate; }
  .ticker__eq i:nth-child(2) { animation-duration: .8s; animation-delay: -.3s; }
  .ticker__eq i:nth-child(3) { animation-duration: 1.3s; animation-delay: -.6s; }
  .ticker__eq i:nth-child(4) { animation-duration: .95s; animation-delay: -.2s; }
  .ticker.is-paused .ticker__dot::after, .ticker.is-paused .ticker__eq i,
  .ticker.is-off .ticker__dot::after, .ticker.is-off .ticker__eq i { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__viewport { display: block; -webkit-mask-image: none; mask-image: none; padding: 4px 8px 6px 20px; }
  .ticker__track { display: block; width: auto; }
  .ticker__list { flex-wrap: wrap; row-gap: 0; }
  .ticker__list li { padding-block: 6px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 599px) {
  .ticker { flex-direction: column; }
  .ticker__live { align-self: flex-start; min-height: 36px; border-bottom-right-radius: 10px; }
  .ticker__live::after { display: none; }
  .ticker__viewport { padding: 6px 12px 8px; }
}
@keyframes ticker { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes live-ping { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

@media (max-width: 599px) {
  .ticker { min-height: 44px; border-radius: 10px; }
  .ticker__live { padding: 0 12px; gap: 7px; font-size: .9375rem; }
  .ticker__eq { display: none; }
  .ticker__list li { font-size: .9375rem; padding-right: 18px; }
  .ticker__toggle { width: 44px; min-height: 44px; }
}

/* ---------- Stats strip (count-up numbers) ---------- */
.stats {
  display: grid; gap: 1px; margin-top: clamp(40px, 6vw, 72px);
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--grey-2); border: 1px solid var(--grey-2);
}
.stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.stat { position: relative; padding: clamp(20px, 3vw, 32px) clamp(18px, 3vw, 32px); background: var(--white); }
.stat::before { content: ""; position: absolute; left: clamp(18px, 3vw, 32px); top: 0; width: 40px; height: 3px; border-radius: 0 0 2px 2px; background: linear-gradient(90deg, var(--pink), var(--cyan)); }
.stat__fig { margin: 0 0 4px; font: 700 clamp(2.5rem, 1.6rem + 3vw, 3.75rem)/1 var(--font-display); letter-spacing: -.01em; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat__unit { color: var(--pink-text); margin-left: 2px; }
.stat__label { margin: 0; font-weight: 500; color: var(--text); }
@media (max-width: 899px) { .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .stats--2 { grid-template-columns: 1fr; } }

/* ---------- Hero depth: pointer tilt (JS sets the variables), gentle float, drifting wave, light streak ---------- */
@property --float { syntax: "<length>"; inherits: false; initial-value: 0px; }
.hero__media {
  --rx: 0deg; --ry: 0deg; --px: 0px; --py: 0px;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(var(--px), calc(var(--py) + var(--float)), 0);
  transform-style: preserve-3d;
}
.hero::after { /* occasional motion-blur light streak; very subtle */
  content: ""; position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .0) 44%, rgba(255, 255, 255, .13) 47.5%, rgba(255, 255, 255, .05) 49%, transparent 52%) no-repeat;
  background-size: 260% 100%; background-position: 120% 0;
}
.hero__wave path { transform-box: view-box; transform-origin: 50% 100%; }

@media (prefers-reduced-motion: no-preference) {
  .hero__media { animation: rise 1s .15s cubic-bezier(.2, .7, .2, 1) both, hero-float 7s 1.2s ease-in-out infinite alternate; }
  .hero::after { animation: streak 11s 2s cubic-bezier(.45, 0, .2, 1) infinite; }
  .hero__wave path:nth-child(1) { animation: wave-a 18s ease-in-out infinite alternate; }
  .hero__wave path:nth-child(2) { animation: wave-b 23s ease-in-out infinite alternate; }
  .hero.is-off::after, .hero.is-off .hero__media, .hero.is-off .hero__wave path { animation-play-state: paused; }
}
@keyframes hero-float { from { --float: 0px; } to { --float: -10px; } }
@keyframes streak {
  0% { opacity: 0; background-position: 120% 0; }
  4% { opacity: 1; }
  22% { opacity: 1; }
  26%, 100% { opacity: 0; background-position: -20% 0; }
}
@keyframes wave-a { from { transform: translateX(-28px) scaleX(1.05); } to { transform: translateX(28px) scaleX(1.05); } }
@keyframes wave-b { from { transform: translateX(22px) scaleX(1.04); } to { transform: translateX(-22px) scaleX(1.04); } }

/* ---------- Telemetry scan on the data-feed graphics ---------- */
.feed__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    linear-gradient(90deg, transparent 0, rgba(0, 255, 153, 0) 40%, rgba(0, 255, 153, .28) 49%, rgba(0, 204, 255, .75) 50%, rgba(0, 204, 255, 0) 51%, transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 4px);
  background-size: 100% 100%, 100% 100%;
  transform: translateX(-100%); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .feed:hover .feed__media::after, .feed:focus-within .feed__media::after { animation: scan 1.5s cubic-bezier(.4, 0, .2, 1) 1 both; }
  .feed.is-scanned .feed__media::after { animation: scan 1.6s .2s cubic-bezier(.4, 0, .2, 1) 1 both; }
  .feed:hover.is-scanned .feed__media::after, .feed:focus-within.is-scanned .feed__media::after { animation: scan2 1.5s cubic-bezier(.4, 0, .2, 1) 1 both; }
}
@keyframes scan { 0% { transform: translateX(-100%); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
@keyframes scan2 { 0% { transform: translateX(-100%); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }

/* "Request access": the hover layer becomes a moving deep-pink gradient (white text stays >= 4.5:1). */
.feed .btn::before, .offer .btn::before {
  background: linear-gradient(110deg, #E0124F 0%, #B30C3F 35%, #E0124F 55%, #B30C3F 80%, #E0124F 100%);
  background-size: 220% 100%; background-position: 0 0;
}
@media (prefers-reduced-motion: no-preference) {
  .feed .btn:hover::before, .feed .btn:focus-visible::before,
  .offer .btn:hover::before, .offer .btn:focus-visible::before { animation: grad-shift 2.4s linear infinite; }
  .feed .btn, .offer .btn { background-size: 200% 100%; background-image: linear-gradient(110deg, var(--green) 0%, var(--cyan) 50%, var(--green) 100%); transition: color .25s ease, transform .25s ease, box-shadow .25s ease, background-position .6s ease; }
  .feed:hover .btn, .offer:hover .btn { background-position: 100% 0; }
}
@keyframes grad-shift { from { background-position: 0 0; } to { background-position: -220% 0; } }

/* ---------- Scroll-driven reveals (native view timelines only) ---------- */
main { overflow-x: clip; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section .h2, .cta h2 {
      animation: overlay-in linear both; animation-timeline: view(); animation-range: entry 5% entry 70%;
    }
    .section .eyebrow { animation: fade-slide linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }

    .cards > li, .feeds > li, .feature-list > li, .about-point, .stat, .teaser {
      animation: rise-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
    .cards > li:nth-child(2), .feeds > li:nth-child(2), .feature-list > li:nth-child(2), .about-point:nth-child(2), .stat:nth-child(2), .teaser:nth-child(2) { animation-range: entry 8% entry 63%; }
    .cards > li:nth-child(3), .feeds > li:nth-child(3), .feature-list > li:nth-child(3), .about-point:nth-child(3), .stat:nth-child(3) { animation-range: entry 16% entry 71%; }
    .stat:nth-child(4) { animation-range: entry 24% entry 79%; }

    .row__media { animation: drift-left linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .row:nth-child(even) .row__media { animation-name: drift-right; }
    .row__text { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 5% entry 65%; }
    .split .media-frame { animation: fade-scale linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  }
}
@keyframes overlay-in {
  from { opacity: 0; transform: translateX(-28px) skewX(-10deg); clip-path: inset(-20% 100% -20% 0); }
  to { opacity: 1; transform: none; clip-path: inset(-20% -6% -20% 0); }
}
@keyframes fade-slide { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes drift-left { from { opacity: 0; transform: translateX(-56px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
@keyframes drift-right { from { opacity: 0; transform: translateX(56px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
@keyframes fade-scale { from { opacity: 0; transform: scale(.94) translateY(20px); } to { opacity: 1; transform: none; } }
@media (max-width: 799px) {
  @keyframes drift-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
  @keyframes drift-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media { transform: none; }
  .hero::after, .feed__media::after { display: none; }
}
