/* =============================================
   WORCESTER PARK FC — MATCHDAY UPGRADE

   Latest Results, Next Match / Matchday, the Match Centre dialog and the
   sponsors carousel. Everything here is built from the tokens already defined
   in style.css — the same navy/gold palette, the same Anton/Archivo pairing,
   the same radius, shadow and motion ramps — so these components read as part
   of the existing site rather than a second design language. Kept in its own
   file so the original stylesheet stays untouched.
   ============================================= */

/* ── Crests ─────────────────────────────────
   Official crests arrive as JPEGs on white, so they sit on a white tile. A club
   with no crest available gets a lettered stand-in in the site styling rather
   than an invented badge. */
.crest {
  display: grid; place-items: center; flex-shrink: 0;
  background: #fff; border-radius: var(--r-md);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  overflow: hidden;
}
.crest img { width: 100%; height: 100%; object-fit: contain; display: block; }
.crest--sm { width: 40px; height: 40px; padding: 4px; }
.crest--md { width: 60px; height: 60px; padding: 6px; }
.crest--lg { width: 92px; height: 92px; padding: 9px; border-radius: var(--r-lg); }
.crest--text {
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  color: var(--gold-light);
  font-family: "Anton", sans-serif; letter-spacing: 0.04em;
}
.crest--sm.crest--text { font-size: 0.85rem; }
.crest--md.crest--text { font-size: 1.15rem; }
.crest--lg.crest--text { font-size: 1.7rem; }

/* ── Latest Results ─────────────────────────── */
.results { padding: 6rem 0 5rem; background: var(--navy); position: relative; overflow: hidden; }
.results::before {
  content: ""; position: absolute; top: -20%; left: -8%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--gold-rgb),0.10), transparent 70%);
  pointer-events: none;
}
.results .container { position: relative; z-index: 1; }
.results__grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}
.results__empty { color: rgba(255,255,255,0.6); padding: 1.5rem 0; }
.results__meta { margin-top: 1.6rem; font-size: 0.82rem; color: rgba(255,255,255,0.45); }
.results__meta a { color: var(--gold-light); }

.result-card {
  display: flex; flex-direction: column; gap: 0.9rem;
  width: 100%; text-align: left; cursor: pointer;
  padding: 1.3rem 1.4rem 1.1rem;
  font-family: "Archivo", sans-serif;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base),
              border-color var(--t-base), background var(--t-base);
}
/* Outcome reads as a quiet edge, never a coloured card. */
.result-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: rgba(255,255,255,0.18);
  transition: background var(--t-base);
}
.result-card.is-win::before  { background: var(--gold); }
.result-card.is-loss::before { background: rgba(255,255,255,0.16); }
.result-card.is-draw::before { background: rgba(var(--gold-rgb),0.45); }
.result-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.075);
  border-color: rgba(var(--gold-rgb),0.38);
  box-shadow: var(--sh-dark);
}
.result-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.result-card__top { display: flex; align-items: center; justify-content: space-between; }
.result-card__status {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-light);
}
.result-card__venue-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.16);
  padding: 0.2rem 0.55rem; border-radius: 99px;
}

.result-card__teams {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.55rem;
}
.result-card__team { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.result-card__teams > .result-card__team:last-child { flex-direction: row-reverse; text-align: right; }
.result-card__name {
  font-size: 0.92rem; font-weight: 600; color: rgba(255,255,255,0.78);
  line-height: 1.25; overflow-wrap: break-word; hyphens: none;
}
.result-card__team.is-wp .result-card__name { color: var(--white); font-weight: 700; }
.result-card__score {
  display: inline-flex; align-items: baseline; gap: 0.28rem;
  font-family: "Anton", sans-serif; font-size: 1.85rem; color: var(--white);
  letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}
.result-card__score i { font-style: normal; color: rgba(255,255,255,0.35); font-size: 1.2rem; }
.result-card.is-win .result-card__score b { color: var(--gold-bright); }

.result-card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.8rem; flex-wrap: wrap;
  padding-top: 0.85rem; border-top: 1px solid rgba(255,255,255,0.08);
}
.result-card__date { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.72); }
.result-card__comp {
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.result-card__cue {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-light); opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.result-card__cue svg { width: 13px; height: 13px; }
.result-card:hover .result-card__cue,
.result-card:focus-visible .result-card__cue { opacity: 1; transform: none; }
@media (hover: none) { .result-card__cue { opacity: 1; transform: none; } }

/* ── Matchday ───────────────────────────────
   A team colour is applied only when it was measured from that club own
   official crest; without one the side simply keeps the site styling. */
.matchday {
  position: relative; overflow: hidden;
  padding: 5.5rem 0 6rem;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
}
.matchday__bg { position: absolute; inset: 0; pointer-events: none; }
.matchday.has-home-colour .matchday__bg::before,
.matchday.has-away-colour .matchday__bg::after {
  content: ""; position: absolute; top: -30%; width: 60%; height: 160%;
  filter: blur(90px); opacity: 0.42;
}
.matchday.has-home-colour .matchday__bg::before {
  left: -14%; background: radial-gradient(circle, var(--home-colour), transparent 70%);
}
.matchday.has-away-colour .matchday__bg::after {
  right: -14%; background: radial-gradient(circle, var(--away-colour), transparent 70%);
}
.matchday .container { position: relative; z-index: 1; }
.matchday__inner {
  background: rgba(var(--navy-deep-rgb),0.55);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--gold-rgb),0.26);
  border-radius: var(--r-xl);
  padding: 2.6rem 2.4rem 2.4rem;
  box-shadow: var(--sh-dark);
}
.matchday__kicker {
  text-align: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 1.8rem;
}
.matchday__stage {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 1.5rem;
}
/* Sides stretch to equal height and pin their label + colour seam to the
   bottom, so the two teams stay aligned even when one name wraps to two
   lines and the other does not. */
.matchday__side {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 0.85rem; text-align: center;
}
.matchday__ha { margin-top: auto; }
/* The team colour is a thin seam under the crest, not a slab of fill. */
.matchday__side::after {
  content: ""; width: 54px; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.16);
}
.matchday.has-home-colour .matchday__side--home::after { background: var(--home-colour); }
.matchday.has-away-colour .matchday__side--away::after { background: var(--away-colour); }
.matchday__team {
  font-family: "Anton", sans-serif; font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--white); line-height: 1.1;
}
.matchday__ha {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.matchday__center { text-align: center; align-self: center; }
.matchday__vs {
  font-family: "Anton", sans-serif; font-size: clamp(2rem, 5vw, 3.1rem);
  color: var(--gold); letter-spacing: 0.04em; line-height: 1;
}
.matchday__score {
  font-family: "Anton", sans-serif; font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--gold-bright); letter-spacing: 0.03em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.matchday__date { margin-top: 0.7rem; font-weight: 700; color: var(--white); font-size: 0.95rem; }
.matchday__time { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 0.15rem; }

.matchday__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem; margin-top: 2.2rem; padding-top: 1.7rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.matchday__fact { display: flex; flex-direction: column; gap: 0.25rem; }
.matchday__fact-k {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-light);
}
.matchday__fact-v { color: rgba(255,255,255,0.86); font-size: 0.92rem; line-height: 1.45; }

.matchday__countdown { margin-top: 1.9rem; text-align: center; }
.cd__title {
  display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 0.7rem;
}
.cd__units { display: inline-flex; gap: 0.6rem; }
.cd__unit {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  min-width: 62px; padding: 0.7rem 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
}
.cd__num {
  font-family: "Anton", sans-serif; font-size: 1.5rem; color: var(--white);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.cd__label {
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.cd__live {
  font-family: "Anton", sans-serif; font-size: 1.5rem; color: var(--gold-bright);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.matchday__source { margin-top: 1.5rem; text-align: center; font-size: 0.78rem; }
.matchday__source a { color: rgba(255,255,255,0.55); }
.matchday__source a:hover { color: var(--gold-light); }

@media (max-width: 720px) {
  .matchday { padding: 4rem 0 4.5rem; }
  .matchday__inner { padding: 1.9rem 1.2rem 1.7rem; }
  .matchday__stage { gap: 0.6rem; }
  .crest--lg { width: 68px; height: 68px; }
  .matchday__facts { grid-template-columns: 1fr; gap: 0.9rem; text-align: center; }
  .matchday__fact { align-items: center; }
  .cd__units { display: flex; width: 100%; }
  .cd__unit { min-width: 0; flex: 1; }
}

/* ── Match Centre dialog ────────────────────── */
body.mc-open { overflow: hidden; }
.mc { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 1.2rem; }
.mc[hidden] { display: none; }
.mc__backdrop { position: absolute; inset: 0; background: rgba(4,8,20,0.78); backdrop-filter: blur(6px); }
.mc__panel {
  position: relative; z-index: 1;
  width: min(660px, 100%); max-height: min(88vh, 900px); overflow-y: auto;
  background: var(--navy-dark);
  border: 1px solid rgba(var(--gold-rgb),0.28);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-dark);
  padding: 2rem 1.9rem 1.8rem;
  animation: mcIn 0.28s var(--ease-out) both;
}
@keyframes mcIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
@media (prefers-reduced-motion: reduce) { .mc__panel { animation: none; } }
.mc__panel:focus { outline: none; }
.mc__close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: rgba(255,255,255,0.07); border: none; border-radius: 50%;
  color: rgba(255,255,255,0.75); cursor: pointer;
  transition: background var(--t-base), color var(--t-base);
}
.mc__close svg { width: 18px; height: 18px; }
.mc__close:hover { background: rgba(255,255,255,0.14); color: var(--white); }

.mc__head { text-align: center; margin-bottom: 1.6rem; }
.mc__status {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 1.1rem;
}
.mc__score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.mc__side { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.mc__team {
  font-family: "Anton", sans-serif; font-size: 1.05rem; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--white); line-height: 1.15;
}
.mc__score {
  display: inline-flex; align-items: baseline; gap: 0.3rem;
  font-family: "Anton", sans-serif; font-size: 2.5rem; color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.mc__score i { font-style: normal; color: rgba(255,255,255,0.3); font-size: 1.5rem; }
.mc__score--vs { color: var(--gold); font-size: 1.9rem; }

.mc__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem 1.4rem; margin: 0 0 1.6rem;
  padding: 1.2rem 0; border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mc__fact dt {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 0.2rem;
}
.mc__fact dd { margin: 0; color: rgba(255,255,255,0.84); font-size: 0.9rem; line-height: 1.45; }
.mc__fact-sub { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: rgba(255,255,255,0.5); }

.mc__block { margin-bottom: 1.6rem; }
.mc__h {
  font-family: "Anton", sans-serif; font-size: 1.05rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--white); margin-bottom: 0.9rem;
}
.mc__events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.mc__event {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-md);
  border-left: 3px solid rgba(255,255,255,0.16);
}
.mc__event--goal { border-left-color: var(--gold); }
.mc__event--yellow { border-left-color: #E8C33B; }
.mc__event--red { border-left-color: #D2453C; }
.mc__event--sub { border-left-color: #4FA96B; }
.mc__event-icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--gold-light); flex-shrink: 0; }
.mc__event-icon svg { width: 20px; height: 20px; }
.mc__card { display: block; width: 13px; height: 17px; border-radius: 2px; }
.mc__card--yellow { background: #E8C33B; }
.mc__card--red { background: #D2453C; }
.mc__event-main { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.mc__event-player { color: var(--white); font-weight: 600; font-size: 0.92rem; }
.mc__event-player b { color: var(--gold-bright); }
.mc__event-team { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.mc__event-time, .mc__event-kind {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); white-space: nowrap;
}

.mc__squads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.mc__squad h4 {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 0.55rem;
}
.mc__squad ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.28rem; }
.mc__squad li { color: rgba(255,255,255,0.78); font-size: 0.88rem; }
.mc__capt {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  border-radius: 3px; background: var(--gold); color: var(--navy-deep);
  font-size: 0.58rem; font-weight: 800;
}
.mc__note, .mc__none {
  font-size: 0.76rem; color: rgba(255,255,255,0.45); line-height: 1.5; margin-top: 0.8rem;
}
.mc__none { text-align: center; padding: 1.4rem 0; }
.mc__source { margin-top: 1.4rem; text-align: center; font-size: 0.8rem; }
.mc__source a { color: var(--gold-light); }

@media (max-width: 560px) {
  .mc { padding: 0; }
  .mc__panel { width: 100%; max-height: 100vh; border-radius: 0; padding: 1.6rem 1.1rem 1.4rem; }
  .mc__score { font-size: 2rem; }
  .mc__facts { grid-template-columns: 1fr; }
}

/* ── Sponsors carousel ──────────────────────
   Same section, same cards, same CTA — only the layout changes from a static
   grid to a looping, pausable strip. */
.sponsors__carousel {
  position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.sponsors__track {
  display: flex; align-items: stretch; gap: 1.2rem;
  width: max-content; will-change: transform;
}
.sponsors__track .sponsor-card {
  width: 260px; flex: 0 0 260px; min-height: 140px;
  /* The carousel owns the reveal here: the scroll-reveal transform would
     otherwise fight the marquee transform running on the track. */
  opacity: 1 !important; transform: none !important;
}
.sponsors__carousel.is-static .sponsors__track {
  width: 100%; flex-wrap: wrap; justify-content: center; transform: none !important;
}
.sponsors__carousel.is-static .sponsors__track .is-clone { display: none; }
@media (max-width: 560px) {
  .sponsors__track .sponsor-card { width: 210px; flex-basis: 210px; min-height: 120px; }
}

/* ── Branded empty states ───────────────────
   An empty section should still look like Worcester Park rather than a blank
   gap, so nothing-to-show states get the club treatment: the kit lightning
   chevrons running at the shirt angle, a crest watermark, and a dashed gold
   edge that reads as "waiting" rather than "broken". Used by Latest Results,
   the Matchday component and the reserves fixtures notice. */
.wp-empty {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--navy-mid) 0%, var(--navy-dark) 100%);
  border: 1px dashed rgba(var(--gold-rgb),0.3);
  padding: 3.1rem 2rem 2.9rem;
  text-align: center;
}
/* Crest watermark, centred behind the copy so it reads as a deliberate mark
   rather than a badge accidentally clipped by the panel edge. */
.wp-empty::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 300px; height: 300px; transform: translate(-50%, -50%);
  background: url("logo.png") center / contain no-repeat;
  opacity: 0.05; pointer-events: none;
}
/* Lift the copy above flash + veil — but not the flash layer itself,
   which must stay absolutely positioned. */
.wp-empty > * { position: relative; z-index: 1; }
.wp-empty__mark {
  display: inline-grid; place-items: center;
  width: 62px; height: 62px; margin-bottom: 1.2rem;
  border-radius: 50%;
  background: rgba(var(--gold-rgb),0.12);
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb),0.35);
  color: var(--gold-light);
}
.wp-empty__mark svg { width: 28px; height: 28px; }
.wp-empty__title {
  font-family: "Anton", sans-serif; font-size: clamp(1.3rem, 3vw, 1.75rem);
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--white); margin-bottom: 0.6rem;
}
.wp-empty__text {
  color: rgba(255,255,255,0.62); font-size: 0.95rem; line-height: 1.65;
  max-width: 46ch; margin: 0 auto;
}
.wp-empty__note {
  display: inline-block; margin-top: 1.4rem;
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-light);
  padding: 0.45rem 1rem; border-radius: 99px;
  background: rgba(var(--gold-rgb),0.1);
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb),0.28);
}
@media (max-width: 560px) {
  .wp-empty { padding: 2.4rem 1.2rem 2.2rem; }
  .wp-empty::after { width: 210px; height: 210px; }
}

/* In the Matchday component the empty state IS the panel, so the card drops
   its own chrome and does not draw a second border around it. */
.matchday__inner.is-empty {
  background: none; border: none; box-shadow: none;
  backdrop-filter: none; padding: 0;
}

/* The results grid drops to a single full-width cell when it is empty. */
.results__grid.is-empty { grid-template-columns: 1fr; }


/* ── FA links in the league table ───────────
   Each club name links to its official FA Full-Time page. Styled as the row
   text it replaces, with a small external-link mark that only asserts itself
   on hover so the table stays a table. */
.league-table__link {
  color: inherit; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.league-table__link svg {
  width: 12px; height: 12px; flex-shrink: 0;
  opacity: 0; transform: translate(-2px, 2px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.league-table__link:hover { color: var(--gold-bright); border-bottom-color: rgba(var(--gold-rgb),0.55); }
.league-table__link:hover svg { opacity: 0.9; transform: none; }
.league-table__link:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 2px; }
/* Touch has no hover, so the external-link mark stays quietly visible there. */
@media (hover: none) { .league-table__link svg { opacity: 0.45; transform: none; } }
/* On the reserves' light table the hover uses the dark ink instead. */
[data-team="reserves"] .league-table__link:hover { color: var(--navy-deep); border-bottom-color: rgba(29,25,4,0.5); }

/* ── Motion layer ───────────────────────────
   A shared entrance for data-driven cards plus a handful of idle accents.
   Everything here is opacity/transform only, and the global reduced-motion
   rule in style.css already flattens all of it. */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
}
.card-in { animation: riseIn 0.55s var(--ease-out) both; }

/* League table rows cascade in when the table reveals. */
.league-table.reveal.is-visible .league-table__row {
  animation: riseIn 0.4s var(--ease-out) both;
}
.league-table.reveal.is-visible .league-table__row:nth-child(1)  { animation-delay: 0.03s; }
.league-table.reveal.is-visible .league-table__row:nth-child(2)  { animation-delay: 0.06s; }
.league-table.reveal.is-visible .league-table__row:nth-child(3)  { animation-delay: 0.09s; }
.league-table.reveal.is-visible .league-table__row:nth-child(4)  { animation-delay: 0.12s; }
.league-table.reveal.is-visible .league-table__row:nth-child(5)  { animation-delay: 0.15s; }
.league-table.reveal.is-visible .league-table__row:nth-child(6)  { animation-delay: 0.18s; }
.league-table.reveal.is-visible .league-table__row:nth-child(7)  { animation-delay: 0.21s; }
.league-table.reveal.is-visible .league-table__row:nth-child(8)  { animation-delay: 0.24s; }
.league-table.reveal.is-visible .league-table__row:nth-child(9)  { animation-delay: 0.27s; }
.league-table.reveal.is-visible .league-table__row:nth-child(10) { animation-delay: 0.30s; }
.league-table.reveal.is-visible .league-table__row:nth-child(11) { animation-delay: 0.33s; }
.league-table.reveal.is-visible .league-table__row:nth-child(12) { animation-delay: 0.36s; }
.league-table.reveal.is-visible .league-table__row:nth-child(13) { animation-delay: 0.39s; }
.league-table.reveal.is-visible .league-table__row:nth-child(14) { animation-delay: 0.42s; }
.league-table.reveal.is-visible .league-table__row:nth-child(15) { animation-delay: 0.45s; }
.league-table.reveal.is-visible .league-table__row:nth-child(16) { animation-delay: 0.48s; }

/* The section-label rule draws itself in as each section reveals. */
.section-label::before { transform-origin: left center; }
.section-label.reveal::before { transform: scaleX(0); }
.section-label.reveal.is-visible::before {
  transform: scaleX(1);
  transition: transform 0.55s var(--ease-out) 0.15s;
}

/* Result-card crests give a little nod on hover. */
.result-card .crest { transition: transform var(--t-base); }
.result-card:hover .result-card__team:first-child .crest { transform: rotate(-5deg) scale(1.08); }
.result-card:hover .result-card__team:last-child .crest { transform: rotate(5deg) scale(1.08); }

/* Matchday: the VS breathes and the crests settle in from either side. */
@keyframes vsBreathe {
  0%, 100% { text-shadow: 0 0 0 rgba(var(--gold-rgb), 0); }
  50% { text-shadow: 0 0 26px rgba(var(--gold-rgb), 0.55); }
}
.matchday__vs { animation: vsBreathe 3.2s ease-in-out infinite; }
@keyframes sideInLeft  { from { opacity: 0; transform: translateX(-26px); } }
@keyframes sideInRight { from { opacity: 0; transform: translateX(26px); } }
.matchday__side--home { animation: sideInLeft 0.6s var(--ease-out) both; }
.matchday__side--away { animation: sideInRight 0.6s var(--ease-out) both; }
.matchday__center { animation: riseIn 0.6s var(--ease-out) 0.15s both; }

/* Countdown: the seconds cell is rebuilt every tick, so this creation-time
   pulse fires once per second. */
@keyframes secTick {
  from { transform: translateY(-3px); opacity: 0.35; }
}
.cd__unit--sec .cd__num { animation: secTick 0.3s ease-out; }

/* Match Centre events walk in when the dialog opens (its body is rebuilt on
   every open, so these replay each time). */
.mc__event { animation: riseIn 0.4s var(--ease-out) both; }
.mc__event:nth-child(1) { animation-delay: 0.05s; }
.mc__event:nth-child(2) { animation-delay: 0.11s; }
.mc__event:nth-child(3) { animation-delay: 0.17s; }
.mc__event:nth-child(4) { animation-delay: 0.23s; }
.mc__event:nth-child(5) { animation-delay: 0.29s; }
.mc__event:nth-child(6) { animation-delay: 0.35s; }
.mc__event:nth-child(7) { animation-delay: 0.41s; }
.mc__event:nth-child(8) { animation-delay: 0.47s; }

/* Squad groups: cards rise as the dropdown opens (replays on each open). */
details[open] .squad__grid .player-card,
details[open] .staff-grid .staff-card {
  animation: riseIn 0.4s var(--ease-out) both;
}
details[open] .squad__grid .player-card:nth-child(2)  { animation-delay: 0.03s; }
details[open] .squad__grid .player-card:nth-child(3)  { animation-delay: 0.06s; }
details[open] .squad__grid .player-card:nth-child(4)  { animation-delay: 0.09s; }
details[open] .squad__grid .player-card:nth-child(5)  { animation-delay: 0.12s; }
details[open] .squad__grid .player-card:nth-child(6)  { animation-delay: 0.15s; }
details[open] .squad__grid .player-card:nth-child(7)  { animation-delay: 0.18s; }
details[open] .squad__grid .player-card:nth-child(8)  { animation-delay: 0.21s; }
details[open] .squad__grid .player-card:nth-child(9)  { animation-delay: 0.24s; }
details[open] .squad__grid .player-card:nth-child(10) { animation-delay: 0.27s; }
details[open] .squad__grid .player-card:nth-child(11) { animation-delay: 0.30s; }
details[open] .squad__grid .player-card:nth-child(12) { animation-delay: 0.33s; }
details[open] .staff-grid .staff-card:nth-child(2) { animation-delay: 0.06s; }
details[open] .staff-grid .staff-card:nth-child(3) { animation-delay: 0.12s; }
details[open] .staff-grid .staff-card:nth-child(4) { animation-delay: 0.18s; }
details[open] .staff-grid .staff-card:nth-child(5) { animation-delay: 0.24s; }
details[open] .staff-grid .staff-card:nth-child(6) { animation-delay: 0.30s; }
details[open] .staff-grid .staff-card:nth-child(7) { animation-delay: 0.36s; }
details[open] .staff-grid .staff-card:nth-child(8) { animation-delay: 0.42s; }
