﻿/* ==========================================================================
   League of Market — Landing page
   --------------------------------------------------------------------------
   Loaded on top of style.css by index.php only. Keeps the marketing surface
   separable so a redesign of the landing page never touches the app shell.
   ========================================================================== */

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 6vw, 6.5rem) clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--bg-grad);
  border-bottom: 1px solid var(--border);
}

/* Aurora blobs — pure CSS, no image request, no CDN. */
.aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.aurora span:nth-child(1) {
  width: 46vw; height: 46vw;
  min-width: 320px; min-height: 320px;
  top: -14vw; left: -8vw;
  background: radial-gradient(circle, rgba(46, 230, 168, 0.5), transparent 68%);
  animation: drift-a 22s var(--ease) infinite alternate;
}
.aurora span:nth-child(2) {
  width: 40vw; height: 40vw;
  min-width: 280px; min-height: 280px;
  top: -8vw; right: -10vw;
  background: radial-gradient(circle, rgba(91, 140, 255, 0.45), transparent 68%);
  animation: drift-b 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(3) {
  width: 34vw; height: 34vw;
  min-width: 240px; min-height: 240px;
  bottom: -16vw; left: 32%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.32), transparent 68%);
  animation: drift-c 30s var(--ease) infinite alternate;
}

@keyframes drift-a { to { transform: translate3d(6vw, 5vh, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(-7vw, 7vh, 0) scale(1.08); } }
@keyframes drift-c { to { transform: translate3d(4vw, -6vh, 0) scale(1.15); } }

/* Subtle grid overlay for depth */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.28;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  margin-bottom: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.hero-eyebrow b {
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.3rem, 1.4rem + 3.8vw, 4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero-lede {
  margin-top: 1.25rem;
  max-width: 54ch;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.15rem);
  color: var(--muted);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.35rem;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--faint);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-trust span::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

/* Hero side: live odds preview card */
.hero-panel {
  position: relative;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-lg);
}
.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0.35rem 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}
.hero-panel-head h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Second en-tête du panneau (rebuild par landing.js) : espacement par classe,
   jamais par un attribut style. */
.hero-panel-head.is-spaced { margin-top: 0.85rem; }
.hero-panel-body { display: flex; flex-direction: column; gap: 0.6rem; }

.odds-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.odds-card:hover { transform: translateX(3px); border-color: var(--brand); }
.odds-teams { min-width: 0; }
.odds-teams b {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.odds-teams span { font-size: 0.74rem; color: var(--faint); }
.odds-value {
  flex: none;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
.live-row .lr-teams { flex: 1; min-width: 0; font-size: 0.85rem; font-weight: 600; }
.live-row .lr-odds {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hero-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.5rem 0.35rem 0.1rem;
  font-size: 0.75rem;
  color: var(--faint);
}

/* ---------- Sections ---------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 2.5rem + 5vw, 6rem); }
.section-tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section-head.center { margin-inline: auto; }
.section-tag {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.section-head h2 { margin-bottom: 0.75rem; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------- Stat band --------------------------------------------------- */

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border-block: 1px solid var(--border);
}
.stat {
  padding: 1.5rem 1.25rem;
  background: var(--bg);
  text-align: center;
}
.stat b {
  display: block;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Feature grid ------------------------------------------------ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
}
.feature {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  background-image: var(--grad-surface);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 1rem;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
}
.feature-icon svg { width: 21px; height: 21px; }
.feature:nth-child(2n) .feature-icon { background: var(--blue-soft); color: var(--blue); }
.feature:nth-child(3n) .feature-icon { background: var(--violet-soft); color: var(--violet); }
.feature h3 { margin-bottom: 0.45rem; font-size: 1.05rem; }
.feature p { font-size: 0.9rem; color: var(--muted); }
.feature ul { margin: 0.75rem 0 0; padding-left: 1.1rem; font-size: 0.85rem; color: var(--muted); }
.feature li { margin-bottom: 0.3rem; }
.feature li::marker { color: var(--brand); }

/* ---------- Steps ------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 1rem;
  border-radius: var(--r-md);
  background: var(--grad-brand);
  color: #04121d;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
}
.step h3 { margin-bottom: 0.4rem; font-size: 1rem; }
.step p { font-size: 0.88rem; color: var(--muted); }
/* Connector line between steps on wide screens */
.step::after {
  content: "";
  position: absolute;
  top: 2.45rem;
  right: -0.9rem;
  width: 0.75rem;
  height: 1px;
  background: var(--border-strong);
}
.step:last-child::after { display: none; }
@media (max-width: 720px) { .step::after { display: none; } }

/* ---------- Roles ------------------------------------------------------- */

.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.role {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  background-image: var(--grad-surface);
}
.role-featured { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.role-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.15rem; }
.role-head h3 { font-size: 1.2rem; }
.role-head p { font-size: 0.8rem; color: var(--faint); }
.role-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; }
.role-list li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.89rem;
  color: var(--muted);
}
.role-list li::before {
  content: "";
  flex: none;
  width: 16px; height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent);
  background-image: none;
}
.role-list li { position: relative; }
.role-list li > span { flex: 1; }
.role-foot { margin-top: auto; }

/* Threshold chips pulled from EligibilityService */
.thresholds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
}
.thresholds b {
  width: 100%;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Pricing ----------------------------------------------------- */

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  background-image: var(--grad-surface);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.plan-featured {
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent), var(--shadow-md);
}
.plan-flag {
  align-self: flex-start;
  margin-bottom: 0.85rem;
}
.plan h3 { font-size: 1.1rem; }
.plan-price { display: flex; align-items: baseline; gap: 0.35rem; margin: 0.85rem 0 0.25rem; }
.plan-price b { font-size: 2.35rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan-price span { color: var(--faint); font-size: 0.85rem; }
.plan-gas {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 1.15rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plan li { display: flex; gap: 0.55rem; font-size: 0.87rem; color: var(--muted); }
.plan li::before { content: "✅"; color: var(--brand); font-weight: 800; flex: none; }
.plan .btn { margin-top: auto; }

/* ---------- Security ---------------------------------------------------- */

.security {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}
.security-list { display: flex; flex-direction: column; gap: 0.75rem; }
.security-item {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.security-item:hover { border-color: var(--border-strong); transform: translateX(3px); }
.security-item .feature-icon { width: 34px; height: 34px; margin: 0; flex: none; border-radius: var(--r-sm); }
.security-item .feature-icon svg { width: 17px; height: 17px; }
.security-item b { display: block; font-size: 0.92rem; margin-bottom: 0.15rem; }
.security-item p { font-size: 0.83rem; color: var(--muted); }

/* Panneau "ce qui reste dans son périmètre".
   Remplace l'ancien extrait de code : une page publique n'affiche ni SQL ni
   noms de tables. Le panneau communique la confiance par le résultat annoncé,
   pas par le détail technique. */
.security-visual {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface-solid);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.security-visual::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--brand-soft), transparent);
  pointer-events: none;
}
.shield-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  margin-bottom: 1.15rem;
  border-radius: var(--r-lg);
  background: var(--brand-soft);
  color: var(--brand);
}
.security-visual h3 {
  position: relative;
  margin-bottom: 1.1rem;
  font-size: 1.1rem;
}
.shield-list {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.shield-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.89rem;
  color: var(--muted);
}
.shield-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.65rem;
  font-weight: 800;
}
.shield-note {
  position: relative;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--faint);
  font-style: italic;
}

/* ---------- FAQ --------------------------------------------------------- */

.faq { display: flex; flex-direction: column; gap: 0.7rem; max-width: 820px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t) var(--ease);
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  transition: background var(--t) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface-2); }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details > p {
  padding: 0 1.2rem 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- CTA --------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-grad);
  text-align: center;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: auto 0 -60% 0;
  height: 80%;
  background: radial-gradient(closest-side, var(--brand-soft), transparent);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 0.85rem; }
.cta-band p { max-width: 52ch; margin: 0 auto 1.75rem; color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ---------- Répartition 70 / 30 ---------------------------------------- */

.split { max-width: 880px; margin-inline: auto; }

.split-bar {
  display: flex;
  height: 74px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.split-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  color: #04121d;
  font-weight: 750;
  position: relative;
  overflow: hidden;
}
.split-seg span { font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.1; }
.split-seg em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}
.split-pro { flex: 0 0 70%; background: var(--grad-brand); }
/* La part plateforme reste neutre : elle ne doit jamais ressembler à un payout. */
.split-admin {
  flex: 0 0 30%;
  background: var(--surface-2);
  color: var(--muted);
  border-left: 1px solid var(--border);
}

/* Sens des fonds — dépôts d'un côté, retraits de l'autre.
   Rend la règle lisible sans texte : Abonnés -> Plateforme -> Pro. */
.fund-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0.6rem;
  margin-top: 1.75rem;
}
.flow-node {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: center;
}
.flow-role { font-size: 0.92rem; font-weight: 700; }
.flow-action { font-size: 0.76rem; color: var(--muted); }
.flow-action b { color: var(--text); font-weight: 700; }
.flow-in  { border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.flow-in .flow-role { color: var(--blue); }
.flow-hub { background: var(--surface-2); }
.flow-hub .flow-role { color: var(--muted); }
.flow-out { border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.flow-out .flow-role { color: var(--brand); }

.flow-arrow {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 1.1rem;
}

@media (max-width: 720px) {
  .fund-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
}

.split-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.split-item {
  display: flex;
  gap: 0.85rem;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.split-item h3 { margin-bottom: 0.4rem; font-size: 1rem; }
.split-item p { font-size: 0.88rem; color: var(--muted); }
.split-dot {
  flex: none;
  width: 12px; height: 12px;
  margin-top: 6px;
  border-radius: 4px;
}
.split-dot-pro { background: var(--brand); }
.split-dot-admin { background: var(--border-strong); }

@media (max-width: 560px) {
  .split-bar { height: auto; flex-direction: column; }
  .split-pro, .split-admin { flex: 0 0 auto; padding: 1rem; }
  .split-admin { border-left: none; border-top: 1px solid var(--border); }
}

/* ---------- Footer: moved to style.css ------------------------------
   View::footer() is part of the shared shell and is rendered on the
   dashboards and auth pages too, so its styles must live in the design
   system rather than in this landing-only stylesheet. ----------------- */


/* ---------- Animated scenes: sports + winnings -------------------------
   Inline SVG rather than <img> or a video: the CSP is
   `img-src 'self' data;` and the app ships no raster or GIF assets, so
   anything animated has to be vector markup the stylesheet can drive.

   Two rules govern everything below:

   1. The static state of every element is its FINISHED state. Keyframes only
      supply the `from` frame, so `prefers-reduced-motion` leaves the artwork
      fully drawn rather than collapsed at scale 0.
   2. The loops do not run until site.js adds `.is-live`, when the card scrolls
      into view. An animation burning CPU for a section nobody has scrolled to
      is wasted work on a page that already polls an API every 30s. --------- */

.scenes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.scene {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.4rem;
  background: var(--surface);
  background-image: var(--grad-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

.scene-art {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border-radius: var(--r-lg);
  background: var(--bg);
}

.scene h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.scene p { color: var(--muted); font-size: 0.9rem; }

/* Everything inside a scene is parked until the card is in view. Opacity, not
   display:none — the artwork must still occupy its box for layout.

   Scoped to `.js` on purpose: site.js adds that class only when scripting
   actually runs, so with JS disabled the artwork stays visible and static
   rather than permanently blank. Same reasoning as the `.reveal` rules. */
.js .scene-art .scene-motion { opacity: 0; }
.js .scene.is-live .scene-motion { opacity: 1; }

/* ---- Shared palette for the artwork ----------------------------------
   The two backdrop washes are painted by <linearGradient>/<radialGradient>
   referenced from a fill="url(#id)" ATTRIBUTE. A `fill` declared here would
   win over that attribute and flatten the gradient back to a flat colour, so
   those two elements carry opacity only, and the gradient stops are coloured
   from this file instead. */

.scene-art #sc-sky stop   { stop-color: var(--brand); }
.scene-art #sc-flood-a stop { stop-color: var(--brand); }
.sc-flood { opacity: 0.14; }

.sc-stand { fill: var(--border); opacity: 0.35; }
.sc-crowd-dot { fill: var(--faint); }

.sc-pitch { fill: var(--brand); opacity: 0.07; }
.sc-line  { fill: none; stroke: var(--faint); stroke-width: 1.4; opacity: 0.55; }

.sc-goal  { fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.sc-net   { stroke: var(--faint); stroke-width: 1; opacity: 0.5; }

.sc-shadow { fill: #000; opacity: 0.30; }

.sc-ball-body {
  fill: var(--text);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.sc-ball-pan { fill: var(--bg); }
.sc-ball-seam {
  fill: none;
  stroke: var(--bg);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-trail {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 6 12;
  opacity: 0.7;
}

.sc-grid   { stroke: var(--border); stroke-width: 1; }
.sc-base   { stroke: var(--border-strong); stroke-width: 1.5; }
.sc-spark  { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sc-area   { fill: var(--brand); opacity: 0.16; }
.sc-node   { fill: var(--brand); }

.sc-bar    { fill: var(--border-strong); }
.sc-bar.is-last { fill: var(--brand); }

.sc-coin-body { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.6; }
.sc-coin-glyph {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Sports: the ball hops, spins, and drags a shrinking shadow --------
   No `animation` is declared here at all: every rule that starts one is scoped
   to `.scene.is-live`, which site.js adds on scroll-in. Off-screen, the card
   costs nothing; the static state below is the finished artwork. */

.scene-ball,
.sc-shadow,
.sc-trail,
.scene-shadow-move {
  transform-box: fill-box;
  transform-origin: center;
}

.scene.is-live .scene-ball         { animation: sc-bounce 3s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.scene.is-live .scene-shadow-move  { animation: sc-travel 3s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.scene.is-live .sc-shadow          { animation: sc-shadow 3s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.scene.is-live .sc-trail           { animation: sc-dash 1.1s linear infinite; }
.scene.is-live .sc-goal            { animation: sc-glow 3s ease-in-out infinite; }
.scene.is-live .sc-crowd           { animation: sc-crowd 2.4s ease-in-out infinite; }

@keyframes sc-bounce {
  0%   { transform: translate(0, 0) rotate(0deg); }
  16%  { transform: translate(28px, -30px) rotate(120deg); }
  33%  { transform: translate(56px, 0) rotate(240deg); }
  50%  { transform: translate(84px, -30px) rotate(360deg); }
  66%  { transform: translate(112px, 0) rotate(480deg); }
  83%  { transform: translate(140px, -30px) rotate(600deg); }
  100% { transform: translate(168px, 0) rotate(720deg); }
}

/* The shadow travels with the ball but never spins, so it is split across two
   elements: a <g> that copies the horizontal travel (sc-travel) and an ellipse
   that only shrinks (sc-shadow). Same duration and easing as sc-bounce, or the
   ball and its shadow visibly drift apart at the apex. */
@keyframes sc-travel {
  0%   { transform: translate(0, 0); }
  16%  { transform: translate(28px, 0); }
  33%  { transform: translate(56px, 0); }
  50%  { transform: translate(84px, 0); }
  66%  { transform: translate(112px, 0); }
  83%  { transform: translate(140px, 0); }
  100% { transform: translate(168px, 0); }
}

/* The shadow is what sells the hop: it shrinks and fades exactly as the ball
   reaches the top of its arc, so the eye reads height instead of a sliding
   sprite. */
@keyframes sc-shadow {
  0%, 33%, 66%, 100% { transform: scale(1, 1); opacity: 0.30; }
  16%, 50%, 83%       { transform: scale(0.42, 0.42); opacity: 0.10; }
}

@keyframes sc-dash { to { stroke-dashoffset: -36; } }
@keyframes sc-glow {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes sc-crowd {
  0%, 100% { opacity: 0.18; }
  50%      { opacity: 0.42; }
}

/* ---- Winnings: bars grow, the curve draws, coins float up -------------- */

.sc-bar,
.sc-spark,
.sc-area,
.scene-coin {
  transform-box: fill-box;
  transform-origin: bottom;
}

.scene.is-live .sc-bar     { animation: sc-grow 2.8s ease-in-out infinite; }
.scene.is-live .sc-spark   { animation: sc-draw 2.8s ease-in-out infinite; }
.scene.is-live .sc-area    { animation: sc-fade 2.8s ease-in-out infinite; }
.scene.is-live .sc-node    { animation: sc-node 2.8s ease-in-out infinite; }
.scene.is-live .scene-coin { animation: sc-float 2.8s ease-in-out infinite; }

.scene.is-live .sc-bar:nth-of-type(2) { animation-delay: 0.16s; }
.scene.is-live .sc-bar:nth-of-type(3) { animation-delay: 0.32s; }
.scene.is-live .sc-bar:nth-of-type(4) { animation-delay: 0.48s; }

.scene.is-live .scene-coins .scene-coin:nth-of-type(1) { animation-delay: 0s; }
.scene.is-live .scene-coins .scene-coin:nth-of-type(2) { animation-delay: 0.9s; }
.scene.is-live .scene-coins .scene-coin:nth-of-type(3) { animation-delay: 1.7s; }

@keyframes sc-grow {
  0%   { transform: scaleY(0.05); }
  50%  { transform: scaleY(1); }
  100% { transform: scaleY(0.05); }
}
@keyframes sc-draw {
  0%        { stroke-dashoffset: 100; }
  55%, 100% { stroke-dashoffset: 0; }
}
@keyframes sc-fade {
  0%        { opacity: 0; }
  55%, 100% { opacity: 0.16; }
}
/* The dot rides the curve's last point, so it reads as "the value arriving". */
@keyframes sc-node {
  0%        { opacity: 0; transform: scale(0.4); }
  55%       { opacity: 1; transform: scale(1); }
  80%       { opacity: 1; transform: scale(1); }
  100%      { opacity: 0; transform: scale(0.4); }
}
@keyframes sc-float {
  0%        { opacity: 0; transform: translateY(18px) scale(0.7); }
  20%       { opacity: 1; }
  75%       { opacity: 1; }
  100%      { opacity: 0; transform: translateY(-46px) scale(1.05); }
}

.sc-spark { stroke-dasharray: 100; }
.sc-node  { transform-box: fill-box; transform-origin: center; }

/* ---- Reduced motion ---------------------------------------------------
   site.js never adds `.is-live` when this media query matches, so the rules
   above never start in the first place. These are the belt to that pair of
   braces: if a user flips the OS setting after load, or a future edit wires
   the class up unconditionally, the artwork still lands fully drawn.

   The global block in style.css is not enough on its own — it only shrinks the
   duration to 0.01ms for a single iteration, which would freeze every loop on
   its FIRST frame (collapsed bars, ball parked at x=0). Specificity here is
   0,1,0 against that block's 0,0,0 `*` selector, so this wins. */
@media (prefers-reduced-motion: reduce) {
  .js .scene-art .scene-motion,
  .scene .scene-motion { opacity: 1 !important; }
  .scene.is-live .scene-motion { animation: none !important; }
  .sc-spark { stroke-dashoffset: 0; }
  .sc-area  { opacity: 0.16; }
  .sc-node  { opacity: 1; transform: none; }
  .scene-coin { opacity: 0; }
}

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { order: 2; }
  .security { grid-template-columns: 1fr; }
  .security-visual { order: -1; }
}

@media (max-width: 640px) {
  .hero-cta .btn, .cta-actions .btn { flex: 1 1 100%; }
  .stat { padding: 1.25rem 0.75rem; }
}
