/* Homepage sections and the kickoff sequence. Loads after site.css. */

.is-homepage main { font-family: var(--mn-text); color: var(--mn-ink-body); }

/* ── Hero ── */
.mn-hero { padding: calc(72px + clamp(32px, 7vw, 88px)) 0 clamp(48px, 7vw, 96px); }
.mn-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.mn-hero-visual {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 200px);
  column-gap: 28px; align-items: start; justify-content: end;
}
.mn-pitch { grid-column: 1; grid-row: 1; }
.mn-tally { grid-column: 1; grid-row: 2; }
.mn-hero-screen {
  grid-column: 2; grid-row: 1 / span 2; margin-top: 64px;
  width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--mn-line);
  box-shadow: 0 24px 48px -28px rgba(44, 31, 24, 0.45);
}

.mn-pitch {
  position: relative; aspect-ratio: 300 / 440; border-radius: 10px; overflow: hidden;
  background: repeating-linear-gradient(180deg, var(--mn-pitch) 0 44px, var(--mn-pitch-deep) 44px 88px);
  box-shadow: 0 30px 60px -36px rgba(44, 31, 24, 0.6);
}
.mn-pitch-lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  fill: none; stroke: var(--mn-chalk); stroke-width: 2;
}
.mn-pitch-lines .mn-spot { fill: var(--mn-chalk); stroke: none; }

.mn-player {
  position: absolute; left: var(--x); top: var(--y);
  width: 15%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: var(--mn-cream); color: var(--mn-ink);
  font-family: 'Geist', sans-serif; font-weight: 600; font-size: clamp(0.62rem, 1.4vw, 0.78rem); letter-spacing: 0.02em;
  transform: translate(-50%, -50%);
  animation: mn-drop 420ms var(--mn-ease-out) calc(300ms + var(--i, 0) * 60ms) both;
}
.mn-player.is-b { background: var(--mn-ink); color: var(--mn-gold); }
.mn-player.is-open {
  background: transparent; color: var(--mn-chalk); border: 1.5px dashed var(--mn-chalk);
  font-size: 1.1rem; animation: mn-fade-out 240ms var(--mn-ease-out) 1850ms both;
}
/* The tenth player: lands after the other nine (last one settles at 1.2s). */
.mn-player.is-sub {
  background: var(--mn-gold); color: var(--mn-ink);
  animation: mn-run-in 650ms var(--mn-ease-out) 1300ms both;
}
@keyframes mn-run-in {
  from { opacity: 0; transform: translate(calc(-50% + 120px), calc(-50% + 36px)) scale(0.92); }
  30% { opacity: 1; }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes mn-fade-out {
  to { opacity: 0; }
}
@keyframes mn-drop {
  from { opacity: 0; transform: translate(-50%, calc(-50% - 14px)) scale(0.92); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.mn-tally {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--mn-ink); margin-top: 16px;
}
.mn-tally-row { display: flex; flex-direction: column-reverse; padding-top: 6px; }
.mn-tally dt { font-size: 0.8rem; font-weight: 500; color: var(--mn-ink-muted); }
.mn-tally dd {
  font-family: var(--mn-display); font-weight: 700; font-size: 2.6rem; line-height: 0.9; color: var(--mn-ink);
}
.mn-tally-row.is-going dd { color: var(--mn-pitch); }

@media (max-width: 899px) {
  .mn-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .mn-hero-visual { justify-content: start; }
}
@media (max-width: 767px) {
  .mn-hero-visual { grid-template-columns: minmax(0, 280px); }
  .mn-hero-screen { display: none; }
}

/* ── Match week ── */
.mn-days {
  list-style: none; position: relative; padding-top: 24px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px;
}
.mn-days::before {
  content: ""; position: absolute; inset-inline: 0; top: 6px;
  border-top: 1.5px solid var(--mn-line);
}
.mn-day { position: relative; display: flex; flex-direction: column; }
.mn-day::before {
  content: ""; position: absolute; top: -24px; inset-inline-start: 0;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--mn-cream); border: 1.5px solid var(--mn-ink);
}
.mn-day-when {
  font-family: var(--mn-display); font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1;
  color: var(--mn-bronze); overflow-wrap: break-word;
}
.mn-day-title { font-family: var(--mn-text); font-size: 1.05rem; font-weight: 600; color: var(--mn-ink); margin-top: 6px; }
.mn-day-line { font-size: 0.9rem; line-height: 1.5; color: var(--mn-ink-body); margin-top: 6px; min-height: 4.5em; }
.mn-day-screen {
  width: 100%; height: auto; margin-top: 16px; border-radius: 22px;
  border: 1px solid var(--mn-line); box-shadow: 0 18px 36px -24px rgba(44, 31, 24, 0.45);
}
@media (max-width: 899px) {
  .mn-days { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 0; padding-inline-start: 28px; }
  .mn-days::before { inset-inline: auto; inset-inline-start: 5px; top: 8px; bottom: 8px; border-top: 0; border-inline-start: 1.5px solid var(--mn-line); }
  .mn-day { display: grid; grid-template-columns: minmax(0, 1fr) clamp(96px, 34vw, 140px); grid-template-rows: auto auto auto 1fr; column-gap: 18px; align-items: start; }
  .mn-day::before { top: 6px; inset-inline-start: -28px; }
  .mn-day-when, .mn-day-title, .mn-day-line { grid-column: 1; }
  .mn-day-screen { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; border-radius: 16px; }
  .mn-day-line { min-height: 0; }
  .mn-day-when { font-size: clamp(1.25rem, 6.4vw, 1.9rem); }
}

/* ── Scoreboard ── */
.mn-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--mn-ink); }
.mn-side { padding-top: 28px; padding-inline-end: clamp(16px, 4vw, 48px); }
.mn-side.is-wapp {
  padding-inline-start: clamp(16px, 4vw, 48px); padding-inline-end: 0;
  border-inline-start: 1.5px solid var(--mn-line);
}
.mn-big {
  font-family: var(--mn-display); font-weight: 700; font-size: clamp(6rem, 16vw, 11rem);
  line-height: 0.8; color: var(--mn-ink-muted);
}
.mn-side.is-wapp .mn-big { color: var(--mn-pitch); }
.mn-side-line { font-size: 1.05rem; line-height: 1.5; color: var(--mn-ink-body); max-width: 30ch; margin-top: 10px; }

.mn-chat, .mn-game { margin-top: 28px; max-width: 380px; border-radius: 18px; }
.mn-chat { background: var(--mn-surface); border: 1px solid var(--mn-line); padding: 16px; display: grid; gap: 8px; }
.mn-chat-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.8rem; font-weight: 600; color: var(--mn-ink-muted); margin-bottom: 4px; }
.mn-chat-badge { color: #B04A3A; }
.mn-bubble {
  background: var(--mn-cream); border-radius: 14px; padding: 9px 12px;
  font-size: 0.875rem; color: var(--mn-ink-body); width: fit-content; max-width: 85%;
}
.mn-bubble.is-alt { margin-inline-start: auto; }

.mn-game { background: var(--mn-ink); color: #fff; padding: 20px; }
.mn-game-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mn-game-title { font-weight: 600; font-size: 1.05rem; }
.mn-game-status { font-family: var(--mn-display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--mn-gold); }
.mn-game-meta { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin-top: 4px; }
.mn-game-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); margin: 16px 0; }
.mn-game-bar span { display: block; width: 90%; height: 100%; border-radius: inherit; background: var(--mn-gold); }
.mn-game-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); }
.mn-game-btn { background: var(--mn-gold); color: var(--mn-ink); font-weight: 600; border-radius: 999px; padding: 7px 14px; white-space: nowrap; }
.mn-score-cta { margin-top: 36px; }

@media (max-width: 767px) {
  .mn-board { grid-template-columns: minmax(0, 1fr); }
  .mn-side { padding-inline-end: 0; }
  .mn-side.is-wapp { padding-inline-start: 0; border-inline-start: 0; border-top: 1.5px solid var(--mn-line); margin-top: 32px; }
}

/* ── Team sheet ── */
.mn-sheet-list { list-style: none; border-top: 2px solid var(--mn-ink); }
.mn-sheet-row {
  display: grid; grid-template-columns: 64px minmax(0, 200px) minmax(0, 1fr) auto;
  gap: 8px 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--mn-line);
}
.mn-shirt { position: relative; width: 58px; height: 58px; display: grid; place-items: center; }
.mn-shirt svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--mn-ink); }
.mn-shirt b {
  position: relative; padding-top: 10px;
  font-family: var(--mn-display); font-weight: 700; font-size: 1.75rem; line-height: 1; color: var(--mn-gold);
}
.mn-sheet-role { font-family: var(--mn-display); font-weight: 700; font-size: 2.3rem; line-height: 0.9; color: var(--mn-ink); }
.mn-sheet-line { line-height: 1.5; color: var(--mn-ink-body); max-width: 52ch; }
.mn-sheet-row .mn-link { white-space: nowrap; justify-self: start; }
.mn-sheet-club { margin-top: 28px; color: var(--mn-ink-body); }

@media (max-width: 767px) {
  .mn-sheet-row { grid-template-columns: 58px minmax(0, 1fr); column-gap: 18px; align-items: start; }
  .mn-shirt { grid-row: 1 / span 3; }
  .mn-sheet-role, .mn-sheet-line, .mn-sheet-row .mn-link { grid-column: 2; }
}

/* ── FAQ ── */
.mn-faq .faq-list { max-width: 860px; margin: 0; display: block; border-top: 2px solid var(--mn-ink); }
/* overflow: visible so the keyboard focus ring is not clipped by the item. */
.mn-faq .faq-item { background: none; border-radius: 0; border-bottom: 1px solid var(--mn-line); overflow: visible; }
.mn-faq .faq-question { padding: 20px 0; font-family: inherit; font-size: 1.05rem; }
.mn-faq .faq-answer { padding: 0 0 22px; max-width: 64ch; color: var(--mn-ink-body); }
.mn-faq .faq-chevron,
.mn-faq .faq-item[open] .faq-chevron { background: none; }
.mn-faq .faq-item[open] .faq-chevron svg { stroke: var(--mn-ink); }

/* ── Final call to action ── */
.mn-final { position: relative; overflow: hidden; padding-block: clamp(80px, 12vw, 160px); }
.mn-final-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 2; }
.mn-final-inner { position: relative; }
.mn-final-title { color: #fff; }
.mn-final-sub { color: rgba(255, 255, 255, 0.72); font-size: 1.1rem; line-height: 1.5; margin: 18px 0 30px; max-width: 34ch; }
.mn-final .store-badge-primary { background: var(--mn-gold); color: var(--mn-ink); box-shadow: none; }

/* ── Kickoff sequence ──
   Match week: scrolling is the clock. A darker line fills the timeline from
   Sunday to Wednesday and each day's dot fills as the line reaches it. CSS
   scroll-driven animation, off the main thread; elsewhere the static
   timeline stays. --f is how far along the line each day sits. */
.mn-day:nth-child(2) { --f: 0.2; }
.mn-day:nth-child(3) { --f: 0.4; }
.mn-day:nth-child(4) { --f: 0.6; }
.mn-day:nth-child(5) { --f: 0.8; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .mn-days { view-timeline: --week block; }
    .mn-days::after {
      content: ""; position: absolute; inset-inline: 0; top: 5.5px;
      border-top: 2px solid var(--mn-ink); transform-origin: left center;
      animation: mn-fill-x linear both;
      animation-timeline: --week;
      animation-range: cover 25% cover 55%;
    }
    html[dir="rtl"] .mn-days::after { transform-origin: right center; }
    .mn-day::before {
      animation: mn-dot linear both;
      animation-timeline: --week;
      animation-range: cover calc(25% + 30% * var(--f, 0)) cover calc(26% + 30% * var(--f, 0));
    }
    @media (max-width: 899px) {
      /* Listed with the RTL selector so the desktop right-to-left origin doesn't win here. */
      .mn-days::after,
      html[dir="rtl"] .mn-days::after {
        inset-inline: auto; inset-inline-start: 4.5px; top: 8px; bottom: 8px;
        border-top: 0; border-inline-start: 2px solid var(--mn-ink); transform-origin: center top;
        animation-name: mn-fill-y; animation-range: cover 15% cover 78%;
      }
      .mn-day::before { animation-range: cover calc(15% + 63% * var(--f, 0)) cover calc(16% + 63% * var(--f, 0)); }
    }
  }
}
@keyframes mn-fill-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mn-fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.mn-day { --mn-dot-from: var(--mn-cream); --mn-dot-to: var(--mn-ink); }
.mn-night .mn-day { --mn-dot-from: var(--mn-night); --mn-dot-to: var(--mn-gold); }
@keyframes mn-dot { from { background-color: var(--mn-dot-from); } to { background-color: var(--mn-dot-to); } }

/* Scoreboard: the chat piles up, then one bar fills. Plays once (.is-playing). */
.mn-bubble { transition: opacity 220ms var(--mn-ease-out), transform 220ms var(--mn-ease-out); }
.mn-bubble:nth-child(3) { transition-delay: 80ms; }
.mn-bubble:nth-child(4) { transition-delay: 160ms; }
.mn-motion .mn-board:not(.is-playing) .mn-bubble { opacity: 0; transform: translateY(10px); }
.mn-game-bar span { transform-origin: left center; transition: transform 600ms var(--mn-ease-out) 320ms; }
html[dir="rtl"] .mn-game-bar span { transform-origin: right center; }
.mn-motion .mn-board:not(.is-playing) .mn-game-bar span { transform: scaleX(0); }

/* Final: the floodlights come on at 20:00. Four corner pools with a lamp bank
   each, flickering on one after another like stadium lights warming up. */
.mn-motion .mn-final:not(.is-lit) .mn-light { opacity: 0; }
.mn-motion .mn-final.is-lit .mn-light { animation: mn-flicker 900ms linear calc(var(--n) * 120ms) both; }
.mn-final-lines { transition: opacity 700ms var(--mn-ease-out) 450ms; }
.mn-motion .mn-final:not(.is-lit) .mn-final-lines { opacity: 0.4; }
@keyframes mn-flicker {
  0% { opacity: 0; }
  9% { opacity: 0.85; }
  15% { opacity: 0.1; }
  24% { opacity: 0.95; }
  31% { opacity: 0.3; }
  45% { opacity: 1; }
  100% { opacity: 1; }
}

/* FAQ: an opened answer settles in instead of appearing at once. */
.mn-faq .faq-answer:not([hidden]) { transition: opacity 220ms var(--mn-ease-out), transform 220ms var(--mn-ease-out); }
@starting-style {
  .mn-faq .faq-answer:not([hidden]) { opacity: 0; transform: translateY(-6px); }
}

/* ── Night: the top of the page is the hour before kickoff, under floodlights ── */
.mn-night .mn-day-title { color: #fff; }
.mn-night .mn-day-line { color: var(--mn-on-night-muted); }
.mn-night .mn-tally { border-top-color: rgba(255, 255, 255, 0.7); }
.mn-night .mn-tally dt { color: var(--mn-on-night-muted); }
.mn-night .mn-tally dd { color: #fff; }
.mn-night .mn-tally-row.is-going dd { color: var(--mn-gold); }
.mn-night .mn-days::before { border-top-color: var(--mn-night-line); }
.mn-night .mn-day::before { background: var(--mn-night); border-color: rgba(255, 255, 255, 0.7); }
.mn-night .mn-day-when { color: var(--mn-gold); }
.mn-night .mn-days::after { border-color: var(--mn-gold); }
.mn-week.mn-night { padding-top: clamp(40px, 6vw, 72px); }
.mn-hero.mn-night + .mn-week.mn-night { background: linear-gradient(var(--mn-night), var(--mn-night-deep)); }
@media (max-width: 899px) {
  .mn-night .mn-days::before { border-inline-start-color: var(--mn-night-line); }
}

/* The clock */
.mn-clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 22px; color: var(--mn-on-night-muted); font-size: 0.9rem; }
.mn-clock-time {
  font-family: var(--mn-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--mn-gold);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em; direction: ltr; unicode-bidi: isolate;
}
.mn-clock-when { flex-basis: 100%; font-size: 0.82rem; }

/* Name chips: who's in, popping beside the pitch as the players land */
.mn-hero-visual { grid-template-columns: minmax(0, 300px) minmax(0, 160px); }
.mn-chips { grid-column: 2; grid-row: 1 / span 2; list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mn-chip {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 7px 12px 7px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 0.85rem; font-weight: 600;
  animation: mn-pop 300ms var(--mn-ease-out) calc(450ms + var(--i, 0) * 200ms) both;
}
.mn-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mn-gold); }
.mn-chip.is-sub { animation-delay: 1850ms; background: rgba(201, 168, 118, 0.18); border-color: rgba(201, 168, 118, 0.5); }
.mn-hero .mn-light { opacity: 1; }
.mn-hero .mn-light:nth-child(1) { background: radial-gradient(70% 90% at 0% 0%, rgba(255, 241, 210, 0.42), rgba(255, 241, 210, 0) 72%); }
.mn-hero .mn-light:nth-child(2) { background: radial-gradient(70% 90% at 100% 0%, rgba(255, 241, 210, 0.42), rgba(255, 241, 210, 0) 72%); }
@media (max-width: 767px) {
  .mn-hero-visual { grid-template-columns: minmax(0, 280px); }
  .mn-chips { grid-column: 1; grid-row: 3; flex-direction: row; flex-wrap: wrap; }
}

/* Screens sit in a glass tray */
.mn-morning .mn-frame { background: rgba(44, 31, 24, 0.05); border-color: rgba(44, 31, 24, 0.1); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6); margin-top: 0; }
@media (max-width: 899px) {
  .mn-day .mn-frame { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; padding: 4px; border-radius: 20px; }
  .mn-day .mn-frame img { border-radius: 16px; }
}

/* The whistle: 20:00 stamps in over the lit pitch */
.mn-final { padding-block: clamp(96px, 14vw, 200px); }
.mn-stamp {
  font-family: var(--mn-display); font-weight: 700; color: var(--mn-gold);
  font-size: clamp(6rem, 22vw, 17rem); line-height: 0.8; letter-spacing: -0.01em; margin-bottom: 8px;
  font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; width: fit-content;
}
.mn-final-title { font-size: clamp(2.75rem, 8vw, 5.5rem); }
.mn-motion .mn-final:not(.is-lit) .mn-stamp { opacity: 0; }
.mn-motion .mn-final.is-lit .mn-stamp { animation: mn-stamp 380ms var(--mn-ease-out) 220ms both; }
@keyframes mn-stamp {
  from { opacity: 0; transform: scale(1.18); }
  60% { opacity: 1; }
  to { opacity: 1; transform: scale(1); }
}

/* The morning after */
.mn-morning-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 40px; align-items: center; }
.mn-morning .mn-h2 { margin-bottom: 16px; }
@media (max-width: 767px) { .mn-morning-grid { grid-template-columns: minmax(0, 1fr); } .mn-morning-screen { max-width: 260px; } }

/* Bottom strip */
.mn-bottom { padding-block: clamp(48px, 7vw, 80px); }
.mn-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.mn-bottom .mn-clock { margin-bottom: 8px; }
.mn-bottom-title { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .mn-player, .mn-player.is-open, .mn-player.is-sub, .mn-chip { animation: none; }
  .mn-motion .mn-final.is-lit .mn-stamp { animation: none; }
  .mn-player.is-open { opacity: 0; }
  .mn-bubble, .mn-game-bar span, .mn-final-lines, .mn-faq .faq-answer:not([hidden]) { transition: none; }
}
