:root {
  --bg: #05060a;
  --bg-2: #0b0e15;
  --card: #11141d;
  --card-2: #161a26;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f2f4f8;
  --muted: #8b93a7;
  --muted-2: #5d6577;
  --gold: #f7cf5a;
  --gold-2: #e0a92e;
  --gold-glow: rgba(247, 207, 90, 0.4);
  --win-soft: rgba(247, 207, 90, 0.12);
  --nav-h: 54px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(8, 10, 16, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1100px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
}
.nav__brand { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: .2px; display: flex; align-items: center; gap: 7px; }
.nav__brand b { color: var(--gold); font-weight: 700; }
.nav__mark { font-size: 15px; }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 7px 13px; border-radius: 980px; transition: color .25s, background .25s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.active { color: var(--bg); background: var(--gold); }

@media (max-width: 560px) {
  .nav__links a { padding: 6px 9px; font-size: 12px; }
  .nav__brand b, .nav__mark { display: inline; }
}

/* ============ Hero ============ */
section, .hero { scroll-margin-top: var(--nav-h); }

.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--nav-h) 20px 40px; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% 12%, rgba(247, 207, 90, 0.16), transparent 60%),
    radial-gradient(700px 700px at 80% 90%, rgba(60, 90, 200, 0.10), transparent 60%),
    radial-gradient(700px 700px at 12% 80%, rgba(200, 60, 90, 0.08), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(0, -3%, 0) scale(1.05); } }

.hero__inner { position: relative; z-index: 1; }
.hero__kicker {
  letter-spacing: .32em; text-transform: uppercase; font-size: 12px;
  color: var(--gold); margin-bottom: 14px; font-weight: 600;
}
.hero__title {
  font-size: clamp(40px, 8vw, 92px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1; margin-bottom: 34px;
  background: linear-gradient(180deg, #fff 30%, #b9c0d0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__champion {
  display: inline-flex; align-items: center; gap: 26px;
  padding: 24px 46px; border-radius: 26px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(247,207,90,0.10), rgba(247,207,90,0.02));
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06), 0 0 70px var(--gold-glow);
  animation: rise 1s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.hero__champion img {
  width: 112px; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
.hero__champion .name {
  font-size: clamp(38px, 7vw, 64px); font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tbd { font-size: 28px; font-weight: 700; color: var(--muted); }
.hero__sub { color: var(--muted); font-size: 15px; margin-top: 22px; }
.hero__revised { color: var(--muted-2); font-size: 13.5px; margin-top: 10px; }
.hero__revised b { color: var(--gold); font-weight: 600; }
.inline-flag { display: inline; width: 18px; border-radius: 3px; vertical-align: -3px; margin: 0 1px; }
.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2);
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ============ Sections ============ */
.section { max-width: 1100px; margin: 0 auto; padding: 110px 22px; }
.section--full { max-width: none; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section__eyebrow { color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 12px; }
.section__title { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -0.025em; }
.section__lede { color: var(--muted); font-size: 17px; margin-top: 14px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============ Scorecard stats ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px;
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--muted-2); opacity: .8;
}
.stat--gold::before { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.stat--green::before { background: #46c98b; }
.stat--red::before { background: #e26d6d; }
.stat--blue::before { background: #5b8be0; }
.stat__big { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.stat--gold .stat__big { background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { margin-top: 8px; font-size: 14px; font-weight: 600; }
.stat__sub { margin-top: 3px; font-size: 12px; color: var(--muted-2); }
.stat__bar { margin-top: 14px; height: 6px; border-radius: 6px; background: var(--card-2); overflow: hidden; }
.stat__bar span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }

/* ============ View toggle ============ */
.toggle {
  display: inline-flex; gap: 4px; margin: 26px auto 0; padding: 4px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 980px;
}
.toggle__btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: 980px;
  transition: color .25s, background .25s;
}
.toggle__btn:hover { color: var(--text); }
.toggle__btn.is-active { color: var(--bg); background: var(--gold); }

/* ============ Group cards ============ */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.group {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.group:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 50px rgba(0,0,0,0.45); }
.group__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.group__name { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.group__name b { color: var(--gold); }
.group__tag { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .12em; }

.standings { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.standings-head { display: flex; align-items: center; justify-content: space-between; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted-2); padding: 2px 8px 8px; }
.standings-head .part { color: var(--gold-2); text-transform: none; letter-spacing: 0; font-size: 10px; }
.thead, .standing {
  display: grid; grid-template-columns: 16px 26px 1fr repeat(6, 20px);
  align-items: center; gap: 5px; padding: 6px 8px; border-radius: 10px; font-size: 13px;
}
.thead { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.thead span { text-align: center; }
.standing { transition: background .4s var(--ease); }
.standing .pos { color: var(--muted-2); font-size: 12px; text-align: center; }
.standing img { width: 26px; border-radius: 4px; }
.standing .tname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standing .tag { font-style: normal; font-size: 10px; color: var(--gold); margin-left: 6px; }
.standing .st { text-align: center; color: var(--muted); }
.standing .st.pts { color: var(--text); font-weight: 800; }
.standing.q { background: linear-gradient(90deg, rgba(247,207,90,0.12), transparent); }
.standing.q .tname, .standing.q .pos { color: var(--gold); }
.standing.third-q { background: linear-gradient(90deg, rgba(247,207,90,0.05), transparent); }
.standing.third-q .tname { color: #e9d49a; }

.team-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; font-size: 14px; }
.team-row img { width: 26px; border-radius: 4px; }
.team-row .tname { flex: 1; font-weight: 600; }
.team-row .rank { color: var(--muted-2); font-size: 12px; }

.matches { padding: 12px 14px; display: grid; gap: 8px; }
.md-label { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted-2); margin: 8px 2px 2px; }
.match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
}
.match.pending { opacity: .35; }
.match-date { grid-column: 1 / -1; font-size: 10px; color: var(--muted-2); text-align: center; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.match .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.match .side.away { flex-direction: row-reverse; text-align: right; }
.match .side img { width: 24px; border-radius: 4px; }
.match .side .s-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match .side.win .s-name { color: var(--gold); }
.match .side.win img { box-shadow: 0 0 0 2px var(--gold); }
.score { font-weight: 800; font-size: 15px; padding: 3px 11px; background: var(--bg); border-radius: 9px; white-space: nowrap; }
.match .rationale { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 5px; padding-top: 7px; }

/* accuracy accent on the left edge of played matches (real view) */
.match.acc-exact { border-left: 3px solid #46c98b; }
.match.acc-outcome { border-left: 3px solid var(--gold-2); }
.match.acc-miss { border-left: 3px solid #e26d6d; }

.compare {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted-2);
}
.compare .cmp { letter-spacing: .02em; }
.chip {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 980px; color: var(--bg);
}
.chip.exact { background: #46c98b; }
.chip.outcome { background: var(--gold); }
.chip.miss { background: #e26d6d; }
.chip.upcoming { background: var(--card-2); color: var(--muted); border: 1px solid var(--line-2); }

/* ============ Road to Glory (scroll-pinned) ============ */
.road { position: relative; height: 600vh; background: linear-gradient(180deg, var(--bg), #07090f 50%, var(--bg)); }
.road__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.road__bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 700px at 50% 50%, var(--gold-glow), transparent 62%);
  opacity: 0; transition: opacity .2s linear;
}
.road__eyebrow {
  position: absolute; top: calc(var(--nav-h) + 32px); left: 0; right: 0; text-align: center;
  color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
}
.road__reel { position: relative; width: min(680px, 92vw); height: 100%; }
.rstep {
  position: absolute; top: 50%; left: 50%; width: 100%;
  will-change: transform, opacity;
  text-align: center;
}
.rstep-round { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.rstep-match { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 3vw, 26px); }
.rs-team { display: flex; flex-direction: column; align-items: center; gap: 10px; width: clamp(110px, 30vw, 180px); }
.rs-team img { width: clamp(78px, 16vw, 118px); border-radius: 9px; box-shadow: 0 14px 36px rgba(0,0,0,.6); }
.rs-team .code { font-size: clamp(20px, 4vw, 30px); font-weight: 800; letter-spacing: .04em; }
.rs-team.champ .code { color: var(--gold); }
.rs-team.opp { opacity: .82; }
.rs-score { font-size: clamp(40px, 9vw, 76px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.rs-score.l { color: var(--gold); }
.rs-score.r { color: var(--muted); }
.rstep-def { margin-top: 18px; font-size: 14px; color: var(--muted); }
.rstep-def b { color: var(--text); font-weight: 600; }

/* finale */
.rstep.finale .trophy { font-size: clamp(72px, 16vw, 150px); filter: drop-shadow(0 12px 40px var(--gold-glow)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
.rstep.finale .ftext {
  margin-top: 12px; font-size: clamp(30px, 6vw, 60px); font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rstep.finale .fsub { color: var(--gold); font-size: 14px; letter-spacing: .24em; text-transform: uppercase; margin-top: 8px; }

.road__dots { position: absolute; bottom: 40px; left: 0; right: 0; display: flex; gap: 10px; justify-content: center; }
.road__dots .d {
  width: 9px; height: 9px; border-radius: 50%; background: var(--line-2);
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.road__dots .d.on { background: var(--gold); transform: scale(1.25); }

/* ============ Bracket: two-sided, converging on the final ============ */
.bracket { overflow-x: auto; padding: 6px 22px 26px; }
.bracket::-webkit-scrollbar { height: 8px; }
.bracket::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

.bkt {
  position: relative; display: flex; align-items: stretch; justify-content: center;
  gap: 0; min-width: fit-content; margin: 0 auto;
}
.bkt__lines { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: visible; }
.bkt__lines path { fill: none; stroke: rgba(255,255,255,0.22); stroke-width: 2; stroke-linejoin: round; }
.bkt__lines path.champ { stroke: var(--gold); stroke-width: 3; filter: drop-shadow(0 0 5px var(--gold-glow)); }
.bkt__side { display: flex; }
.bkt-legend { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.bkt-legend__line { display: inline-block; width: 28px; height: 3px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }

.bcol { display: flex; flex-direction: column; min-width: 168px; padding: 0 14px; }
.bcol h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-2);
  text-align: center; margin-bottom: 12px; white-space: nowrap;
}
.bcol__ties { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.bcol--center { min-width: 196px; justify-content: center; }
.bcol--center .bcol__ties { justify-content: center; gap: 26px; }

.tie {
  position: relative; z-index: 1;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .4s, box-shadow .4s, transform .4s; cursor: help;
}
.tie:hover { border-color: var(--gold-2); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.tie-date { font-size: 9px; color: var(--muted-2); text-align: center; padding: 5px 6px 0; letter-spacing: .1em; text-transform: uppercase; }
.tie .slot { display: flex; align-items: center; gap: 9px; padding: 8px 11px; font-size: 13px; }
.tie .slot + .slot { border-top: 1px solid var(--line); }
.tie .slot img { width: 24px; border-radius: 4px; transition: box-shadow .3s; }
.tie .slot .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tie .slot.win { background: var(--win-soft); color: var(--gold); font-weight: 700; }
.tie .slot.win img { box-shadow: 0 0 0 2px var(--gold); }
.tie .slot .crown { margin-left: 4px; }
.tie .slot .sc { margin-left: auto; font-weight: 700; }

/* mirror the right side so it reads inward toward the final */
.tie--right .slot { flex-direction: row-reverse; }
.tie--right .slot .sc { margin-left: 0; margin-right: auto; }
.tie--right .slot .crown { margin-left: 0; margin-right: 4px; }

.tie--final { border-color: var(--gold-2); box-shadow: 0 0 30px var(--gold-glow); }
.tie--final .slot { padding: 11px 13px; font-size: 14px; }
.third-wrap { margin-top: 4px; }
.third-label { font-size: 9px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted-2); text-align: center; margin-bottom: 6px; }
.third-wrap .tie { border-style: dashed; opacity: .9; }

.placeholder { color: var(--muted); font-style: italic; padding: 0 22px; }

@media (max-width: 720px) {
  .bcol { min-width: 140px; padding: 0 9px; }
  .bcol--center { min-width: 160px; }
  .tie .slot { font-size: 12px; padding: 7px 9px; }
}
.bracket-note {
  max-width: 900px; margin: 18px auto 0; padding: 12px 18px;
  font-size: 12px; color: var(--muted); line-height: 1.6;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold-2);
  border-radius: 10px;
}

/* ============ Footer ============ */
.foot { text-align: center; color: var(--muted-2); font-size: 12px; padding: 40px 22px 60px; border-top: 1px solid var(--line); }

/* static-capture mode (?cap): flatten viewport-height sections for screenshots */
body.cap .hero { min-height: auto; padding: 90px 20px 50px; }
body.cap .hero__scroll { display: none; }
body.cap .section { padding: 50px 22px; }
body.caponly .hero, body.caponly #scorecard, body.caponly #groups, body.caponly .road, body.caponly .foot { display: none; }
body.caponly #bracket { padding-top: 80px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 540px) {
  .hero__champion { gap: 16px; padding: 18px 24px; }
  .hero__champion img { width: 78px; }
  .groups { grid-template-columns: 1fr; }
  .section { padding: 80px 18px; }
}
