/* =========================================================
   myfyio — matchday marketing site
   Dark stadium / broadcast system, fyio-family aligned
   ========================================================= */

:root {
  /* core palette */
  --ink:      #06140c;
  --ink-2:    #08190f;
  --pitch:    #0a1f12;
  --pitch-2:  #0e2e1a;
  --line:     rgba(127, 168, 146, 0.18);
  --line-2:   rgba(127, 168, 146, 0.30);
  --white:    #f2fff7;
  --muted:    #7fa892;
  --muted-2:  #5c7a68;

  /* brand */
  --green:    #22e584;
  --green-d:  #15b266;
  --gold:     #ffd166;
  --red:      #ff4d5e;
  --blue:     #8ab4ff;

  /* role accents — 4 distinct hues: yellow / teal / green / orange */
  --gk:  #ffd166;
  --df:  oklch(0.82 0.13 200);
  --mf:  #22e584;
  --fw:  #ff7043;

  --maxw: 1180px;
  --r:    14px;

  --font-display: "Archivo", "Archivo Expanded", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: var(--font-display);
  background: var(--ink);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.5;
}

/* subtle film grain / vignette over whole page */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1400px 700px at 50% -8%, rgba(34, 229, 132, 0.07), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(255, 209, 102, 0.05), transparent 60%);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

a { color: inherit; text-decoration: none; }

::selection { background: var(--green); color: var(--ink); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 40px);
  background: rgba(6, 20, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 900; font-size: 19px; letter-spacing: -0.03em;
  font-stretch: 125%; color: var(--white);
}
.brand b { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); margin-left: auto; }
.nav-links a {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.01em; transition: color 0.18s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--green); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink) !important; background: var(--green);
  padding: 9px 16px; border-radius: 10px;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 0 0 rgba(34, 229, 132, 0);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(34, 229, 132, 0.6); }
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 36px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: rgba(242, 255, 247, 0.04); color: var(--white);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--muted); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 16px; height: 2px;
  background: currentColor; border-radius: 1px;
  position: relative; transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav.is-open .nav-toggle-bars { background: transparent; }
.nav.is-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* Explore fyio — native details dropdown (static pages + mobile panel) */
.explore-fyio { position: relative; }
.explore-fyio > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.01em; transition: color 0.18s;
}
.explore-fyio > summary::-webkit-details-marker { display: none; }
.explore-fyio > summary:hover { color: var(--white); }
.explore-fyio > summary::after {
  content: ""; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: 0.7;
  transition: transform 0.18s;
}
.explore-fyio[open] > summary::after { transform: rotate(180deg); }
.explore-fyio-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  width: min(288px, calc(100vw - 36px));
  border: 1px solid var(--line-2); border-radius: 14px;
  background: rgba(6, 20, 12, 0.96); backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}
.explore-fyio-panel::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 36px; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(6, 20, 12, 0.92));
  border-radius: 0 0 14px 14px;
}
.explore-fyio-menu {
  max-height: min(70vh, 380px); overflow-y: auto; padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--muted-2) transparent;
}
.explore-fyio-menu::-webkit-scrollbar { width: 6px; }
.explore-fyio-menu::-webkit-scrollbar-thumb {
  background: var(--muted-2); border-radius: 999px;
}
.explore-fyio-menu a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--white) !important;
}
.explore-fyio-menu a .name span { color: rgba(242, 255, 247, 0.4); font-weight: 500; }
.explore-fyio-menu a:hover { background: rgba(34, 229, 132, 0.08); }
.explore-fyio-menu a .pos {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--green);
  background: rgba(34, 229, 132, 0.12); padding: 2px 6px; border-radius: 6px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; z-index: 1;
  text-align: center;
  padding: clamp(54px, 10vh, 104px) 20px clamp(34px, 5vh, 52px);
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em;
  color: var(--green);
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 8px 16px 8px 13px;
  background: rgba(34, 229, 132, 0.06);
  margin-bottom: 26px;
  animation: floatY 5s ease-in-out infinite;
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.6);
  animation: blink 1.3s infinite;
}
.hero h1 {
  font-size: clamp(38px, 7.2vw, 86px);
  font-weight: 900; line-height: 1.02; letter-spacing: -0.035em;
  font-stretch: 118%;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal; display: inline-block;
  background: linear-gradient(95deg, var(--green) 0%, var(--gold) 50%, var(--green) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradientShift 6s linear infinite;
}
.hero p {
  color: var(--muted); max-width: 580px;
  margin: 24px auto 14px; font-size: clamp(15px, 1.9vw, 18.5px);
  line-height: 1.62; text-wrap: pretty;
}
.kick-line {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted-2);
  letter-spacing: 0.04em; margin-bottom: 30px;
}
.kick-line b { color: var(--green); font-weight: 700; }
.kick-line .sep { color: var(--line-2); margin: 0 8px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 12px; font-weight: 800;
  font-size: 15px; letter-spacing: 0.01em; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn.primary {
  background: var(--green); color: var(--ink);
  box-shadow: 0 12px 40px -14px rgba(34, 229, 132, 0.7);
  animation: pulseGlow 3.4s ease-in-out infinite;
}
.btn.primary:hover { transform: translateY(-3px) scale(1.02); }
.btn.ghost { border-color: var(--line-2); color: var(--white); background: rgba(242, 255, 247, 0.02); }
.btn.ghost:hover { transform: translateY(-3px); border-color: var(--green); color: var(--green); }
.btn.big { font-size: 17px; padding: 17px 38px; }

/* =========================================================
   STADIUM / MATCH
   ========================================================= */
.stadium {
  position: relative; z-index: 1;
  padding: 8px clamp(14px, 4vw, 40px) clamp(28px, 5vw, 48px);
}
.stadium .wrap { padding: 0; }
.floodlight {
  position: absolute; top: -20px; width: 44%; height: 78%;
  pointer-events: none; opacity: 0.55; filter: blur(10px); z-index: 0;
}
.floodlight.left  { left: 0;  background: conic-gradient(from 118deg at 2% 0%, rgba(242,255,247,0.10), transparent 16%); }
.floodlight.right { right: 0; background: conic-gradient(from 242deg at 98% 0%, rgba(242,255,247,0.10), transparent 16%); }

.scoreboard {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2.4vw, 22px);
  margin: 0 auto 16px; padding: 11px clamp(16px, 2.6vw, 26px);
  width: fit-content; max-width: 100%;
  background: rgba(5, 16, 10, 0.9);
  border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(242, 255, 247, 0.04);
  animation: pulseGlow 4s ease-in-out infinite;
}
.sb-team {
  display: flex; align-items: center; gap: 9px;
  font-weight: 900; letter-spacing: 0.04em; font-stretch: 110%;
  font-size: clamp(12px, 1.9vw, 16px);
}
.sb-team.home { color: var(--green); }
.sb-team.away { color: var(--red); }
.sb-team .crest { width: 10px; height: 10px; border-radius: 3px; }
.sb-team.home .crest { background: var(--green); box-shadow: 0 0 10px rgba(34,229,132,0.7); }
.sb-team.away .crest { background: var(--red); box-shadow: 0 0 10px rgba(255,77,94,0.7); }
.sb-team.away { flex-direction: row-reverse; }
.score {
  font-family: var(--font-mono); font-weight: 800;
  font-size: clamp(20px, 3.4vw, 30px); font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 2px 12px; border-radius: 9px;
  background: rgba(242, 255, 247, 0.04); border: 1px solid var(--line);
}
.score .sep { color: var(--muted-2); margin: 0 6px; }
.clock {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums; font-size: clamp(12px, 1.9vw, 15px);
  padding-left: clamp(4px, 1.6vw, 12px);
  border-left: 1px solid var(--line);
}
.clock .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.3s infinite; }

.pitch-wrap {
  position: relative; z-index: 1;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--pitch);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), inset 0 0 140px rgba(0, 0, 0, 0.5);
}
#pitch { display: block; width: 100%; height: auto; }

.goal-overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(ellipse at center, rgba(5, 16, 10, 0.6), transparent 72%);
}
.goal-overlay.show { opacity: 1; }
.goal-overlay span {
  font-size: clamp(34px, 8.5vw, 104px); font-weight: 900; letter-spacing: 0.02em;
  font-stretch: 125%; text-align: center; padding: 0 16px; line-height: 1.05;
  background: linear-gradient(92deg, var(--green), var(--gold), var(--green));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradientShift 1.4s linear infinite, popIn 0.4s ease-out;
  filter: drop-shadow(0 0 50px rgba(34, 229, 132, 0.35));
}

.ticker {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 15px; border-radius: 999px;
  background: rgba(5, 16, 10, 0.88); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 500; color: var(--white);
  max-width: min(74%, 560px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticker::before {
  content: "LIVE"; flex: none;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--ink); background: var(--red); padding: 3px 6px; border-radius: 5px;
}
.controls { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; gap: 8px; }
.controls button {
  min-width: 40px; height: 34px; padding: 0 11px; border-radius: 10px; cursor: pointer;
  background: rgba(5, 16, 10, 0.88); border: 1px solid var(--line); color: var(--white);
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  backdrop-filter: blur(6px);
  transition: transform 0.15s, border-color 0.15s, color 0.15s;
}
.controls button:hover { transform: translateY(-2px); border-color: var(--green); color: var(--green); }

/* ---- live stat ribbon ---- */
.statbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2vw, 20px);
  width: fit-content; max-width: 100%; margin: 0 auto 14px;
  padding: 8px 16px; border-radius: 12px;
  background: rgba(5, 16, 10, 0.7); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
}
.sb-stat { display: flex; align-items: center; gap: 8px; }
.sb-stat .lab { font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted-2); }
.sb-stat .num { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sb-stat.home .num { color: var(--green); }
.sb-stat.away .num { color: var(--red); }
.poss { display: flex; align-items: center; gap: 10px; }
.poss .pct { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; }
.poss .pct.home { color: var(--green); text-align: right; }
.poss .pct.away { color: var(--red); text-align: left; }
.poss-track {
  position: relative; width: clamp(90px, 18vw, 180px); height: 7px; border-radius: 999px;
  background: var(--red); overflow: hidden;
}
.poss-track i {
  position: absolute; inset: 0 auto 0 0; width: 50%; border-radius: 999px;
  background: var(--green);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- broadcast lower-third feed ---- */
.feed {
  position: absolute; left: 12px; top: 12px; z-index: 5;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: min(60%, 360px);
}
.feed-card {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 14px 9px 11px; border-radius: 12px;
  background: rgba(5, 16, 10, 0.92); border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, 0.8);
  transform: translateX(-115%); opacity: 0;
  transition: transform 0.42s cubic-bezier(0.18, 0.9, 0.25, 1.2), opacity 0.42s ease;
}
.feed-card.in { transform: translateX(0); opacity: 1; }
.feed-card.out { transform: translateX(-115%); opacity: 0; }
.feed-card.home { border-left-color: var(--green); }
.feed-card.away { border-left-color: var(--red); }
.feed-card.goal { border-left-color: var(--gold); }
.feed-card.fulltime { border-left-color: var(--white); }
.fc-icon { font-size: 19px; line-height: 1; flex: none; }
.fc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fc-tag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--gold);
}
.feed-card.home .fc-tag { color: var(--green); }
.feed-card.away .fc-tag { color: var(--red); }
.fc-text { font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- replay badge + scanlines ---- */
.replay-badge {
  position: absolute; right: 14px; top: 14px; z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 800; letter-spacing: 0.18em;
  color: var(--white); padding: 7px 13px; border-radius: 8px;
  background: rgba(255, 77, 94, 0.16); border: 1px solid rgba(255, 77, 94, 0.5);
  opacity: 0; transform: scale(0.9); transition: opacity 0.25s, transform 0.25s;
}
.replay-badge.show { opacity: 1; transform: scale(1); }
.replay-badge .rdot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: blink 0.8s infinite; }
.scanlines {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  transition: opacity 0.3s; mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
}
.scanlines.show { opacity: 1; }

.pitch-legend {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em;
}
.pitch-legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pitch-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 0; margin-top: clamp(30px, 6vw, 56px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 0; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0 28px;
  font-weight: 900; font-stretch: 110%; font-size: clamp(15px, 2vw, 20px);
  letter-spacing: -0.01em; white-space: nowrap;
}
.mq-item .you { color: var(--white); }
.mq-item .vs {
  font-family: var(--font-mono); font-size: 0.6em; font-weight: 700;
  color: var(--ink); background: var(--green); padding: 3px 6px; border-radius: 5px;
  letter-spacing: 0.05em; transform: translateY(-2px);
}
.mq-item .rival { color: var(--muted); }
.mq-item .ball { color: var(--gold); font-size: 0.7em; }

/* =========================================================
   SQUAD
   ========================================================= */
.squad { position: relative; z-index: 1; padding: clamp(48px, 8vw, 90px) 0 clamp(40px, 7vw, 72px); }
.section-head { text-align: center; margin-bottom: clamp(34px, 5vw, 56px); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--green); text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(30px, 5.2vw, 56px); font-weight: 900; line-height: 1.04;
  letter-spacing: -0.03em; font-stretch: 116%; margin: 14px 0 12px; text-wrap: balance;
}
.section-head p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: clamp(14px, 1.7vw, 17px); }

.cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  --accent: var(--green);
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 46, 26, 0.55), rgba(8, 25, 15, 0.7));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
  will-change: transform;
}
.card[data-role="GK"] { --accent: var(--gk); }
.card[data-role="DF"] { --accent: var(--df); }
.card[data-role="MF"] { --accent: var(--mf); }
.card[data-role="FW"] { --accent: var(--fw); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 200px at var(--mx, 80%) -10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { border-color: color-mix(in oklab, var(--accent) 55%, var(--line)); box-shadow: 0 26px 60px -28px color-mix(in oklab, var(--accent) 60%, transparent); }
.card:hover::before { opacity: 1; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.card-num {
  font-family: var(--font-mono); font-size: 40px; font-weight: 800; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.4px color-mix(in oklab, var(--accent) 60%, var(--line-2));
  letter-spacing: -0.02em;
}
.role-badge {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink); background: var(--accent); white-space: nowrap;
  padding: 4px 9px; border-radius: 7px;
  box-shadow: 0 0 18px -4px color-mix(in oklab, var(--accent) 80%, transparent);
}
.card-name {
  font-size: 25px; font-weight: 900; letter-spacing: -0.02em; font-stretch: 112%;
  color: var(--white); margin-bottom: 10px;
}
.card-name span { color: var(--accent); }
.vs-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: rgba(255, 77, 94, 0.07); border: 1px solid rgba(255, 77, 94, 0.22);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.vs-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.vs-badge b { color: var(--white); font-weight: 700; }
.card-pitch { color: var(--muted); font-size: 14px; line-height: 1.55; text-wrap: pretty; }
.card-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2);
}
.card-foot .pos { color: var(--accent); font-weight: 700; }
.card-foot a { color: var(--muted); transition: color 0.18s; }
.card-foot a:hover { color: var(--accent); }

/* ---- captain (nfyio) ---- */
.badge-stack { display: flex; align-items: center; gap: 8px; }
.cap-c {
  display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 6px;
  background: var(--gold); color: var(--ink); font-family: var(--font-mono); font-weight: 800; font-size: 12px;
  box-shadow: 0 0 14px -3px var(--gold);
}
.card.captain { border-color: color-mix(in oklab, var(--gold) 42%, var(--line)); }
.card.captain .card-top { padding-right: 46px; }
.cap-ribbon {
  position: absolute; top: 17px; right: -36px; z-index: 2; transform: rotate(45deg);
  background: var(--gold); color: var(--ink);
  font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: 0.14em;
  padding: 4px 38px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
}

/* =========================================================
   CLOSING + FOOTER
   ========================================================= */
.closing {
  position: relative; z-index: 1; text-align: center;
  padding: clamp(72px, 11vw, 120px) 20px clamp(80px, 12vw, 128px);
  background: radial-gradient(720px 320px at 50% 100%, rgba(34, 229, 132, 0.09), transparent 70%);
  border-top: 1px solid var(--line);
}
.closing .ball-float { font-size: 44px; margin-bottom: 18px; animation: floatY 3.2s ease-in-out infinite; }
.closing h2 {
  font-size: clamp(30px, 5.5vw, 58px); font-weight: 900; letter-spacing: -0.03em;
  font-stretch: 118%; margin-bottom: 14px; text-wrap: balance;
}
.closing h2 em {
  font-style: normal;
  background: linear-gradient(95deg, var(--green), var(--gold), var(--green));
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradientShift 6s linear infinite;
}
.closing p { color: var(--muted); margin: 0 auto 30px; font-size: clamp(15px, 1.9vw, 18px); max-width: 520px; }

footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding: 26px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px;
}
.foot-tag { font-family: var(--font-mono); font-size: 12.5px; }
.foot-tag b { color: var(--green); }
.foot-brand { font-size: 18px; font-weight: 900; color: var(--white); letter-spacing: -0.03em; font-stretch: 120%; }
.foot-brand b { color: var(--green); }

/* =========================================================
   HERO ATMOSPHERE (pitch grid + stadium rings)
   ========================================================= */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
/* two staggered pulsing rings – like crowd tiers expanding outward */
.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(34, 229, 132, 0.14);
  animation: heroRingPulse 5.5s ease-out infinite;
}
.hero-bg::before {
  width: 60vw; height: 60vw;
  transform: translate(-50%, -50%) scale(0.3);
}
.hero-bg::after {
  width: 90vw; height: 90vw;
  transform: translate(-50%, -50%) scale(0.3);
  animation-delay: 2.75s;
  border-color: rgba(34, 229, 132, 0.08);
}
@keyframes heroRingPulse {
  0%   { transform: translate(-50%, -50%) scale(0.25); opacity: 0; }
  18%  { opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1);    opacity: 0; }
}
/* faint pitch-marking grid */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(34, 229, 132, 0.028) 0 1px, transparent 1px 100px),
    repeating-linear-gradient(0deg,  rgba(34, 229, 132, 0.028) 0 1px, transparent 1px 70px);
  mask-image: radial-gradient(ellipse 80% 65% at 50% 50%, rgba(0,0,0,0.7), transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 50%, rgba(0,0,0,0.7), transparent);
}
/* keep text layers above both bg layers */
.hero > *:not(.hero-bg):not(.hero-grid) { position: relative; z-index: 1; }

/* =========================================================
   MATCH CONTEXT BADGE (broadcast competition pill)
   ========================================================= */
.match-context {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-2);
}
.ctx-competition { color: var(--green); }
.ctx-dot { font-size: 5px; opacity: 0.5; }

/* =========================================================
   FLOODLIGHT ANIMATED PULSE (animation idea #1)
   Floodlights gently intensify and breathe — stadium lights
   warming up before kick-off. Staggered so left ≠ right.
   ========================================================= */
@keyframes floodBreathL {
  0%, 100% { opacity: 0.42; transform: scaleX(1) scaleY(1); }
  50%       { opacity: 0.68; transform: scaleX(1.1) scaleY(1.05); }
}
@keyframes floodBreathR {
  0%, 100% { opacity: 0.38; transform: scaleX(1) scaleY(1); }
  50%       { opacity: 0.62; transform: scaleX(1.1) scaleY(1.05); }
}
.floodlight.left  {
  animation: floodBreathL 8s ease-in-out infinite;
  transform-origin: left top;
}
.floodlight.right {
  animation: floodBreathR 8s ease-in-out infinite 4s;
  transform-origin: right top;
}

/* =========================================================
   MARQUEE ROLE BADGE
   ========================================================= */
.mq-role {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; padding: 2px 6px; border-radius: 5px;
  color: var(--ink); flex: none; font-stretch: normal;
}
.mq-role[data-role="GK"] { background: var(--gk); }
.mq-role[data-role="DF"] { background: var(--df); }
.mq-role[data-role="MF"] { background: var(--mf); }
.mq-role[data-role="FW"] { background: var(--fw); }

/* =========================================================
   PLAYER CARD — OVR MINI + ATTRIBUTE BARS
   ========================================================= */
/* OVR readout sits below the shirt number */
.num-block { display: flex; flex-direction: column; }
.card-ovr-mini {
  font-family: var(--font-mono); font-size: 13px; font-weight: 800;
  letter-spacing: -0.01em; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1.1;
  margin-top: -2px;
}
.card-ovr-mini span {
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--muted-2); vertical-align: middle; margin-left: 1px;
}

/* attribute bars — hidden until hover */
.card-attrs {
  display: flex; flex-direction: column; gap: 5px;
  overflow: hidden; max-height: 0;
  transition: max-height 0.38s cubic-bezier(0.2, 0.7, 0.2, 1),
              margin-top   0.38s cubic-bezier(0.2, 0.7, 0.2, 1);
  margin-top: 0;
}
.card:hover .card-attrs { max-height: 120px; margin-top: 12px; }

.attr-row { display: flex; align-items: center; gap: 8px; }
.attr-name {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-2); min-width: 72px;
}
.attr-track {
  flex: 1; height: 3px; border-radius: 999px;
  background: rgba(127, 168, 146, 0.18); overflow: hidden;
}
.attr-track i {
  display: block; height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 72%, white 28%));
  box-shadow: 0 0 7px color-mix(in oklab, var(--accent) 55%, transparent);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* staggered bar reveals */
.attr-row:nth-child(1) .attr-track i { transition-delay: 0ms; }
.attr-row:nth-child(2) .attr-track i { transition-delay: 65ms; }
.attr-row:nth-child(3) .attr-track i { transition-delay: 130ms; }
.attr-row:nth-child(4) .attr-track i { transition-delay: 195ms; }
.card:hover .attr-track i { width: var(--val); }

.attr-val {
  font-family: var(--font-mono); font-size: 10px; font-weight: 800;
  color: var(--white); min-width: 22px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* card scanner sweep — diagonal highlight glides on hover (animation idea #2) */
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit; z-index: 2;
  background: linear-gradient(
    112deg,
    transparent 0%, transparent 38%,
    rgba(255, 255, 255, 0.045) 50%,
    transparent 62%, transparent 100%
  );
  background-size: 250% 100%;
  background-position: 200% center;
  opacity: 0;
  transition: background-position 0.75s ease, opacity 0.18s;
}
.card:hover::after {
  background-position: -60% center;
  opacity: 1;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes gradientShift { to { background-position: 220% center; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 12px 40px -14px rgba(34, 229, 132, 0.55); }
  50%      { box-shadow: 0 12px 54px -10px rgba(34, 229, 132, 0.85); }
}
@keyframes popIn { 0% { transform: scale(0.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 0 6px;
    border-top: 1px solid var(--line);
    margin-top: 10px;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links > a,
  .nav-links .explore-fyio > summary {
    padding: 12px 4px;
    font-size: 15px;
  }
  .nav-links .explore-fyio,
  .nav-links .nav-switcher-slot,
  .nav-links .fyio-switcher { width: 100%; }
  .nav-links .explore-fyio-panel {
    position: static; width: 100%; margin-top: 4px; top: auto; right: auto;
    box-shadow: none;
  }
  .nav-links .fyio-switcher > summary { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .scoreboard { gap: 10px; padding: 10px 14px; }
  .clock { padding-left: 8px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; transform: none; }
}
