:root {
  --black: #07090a;
  --panel: #0b0e10;
  --white: #f1f2f0;
  --muted: #9a9d9d;
  --gold: #f6c928;
  --gold-bright: #ffe875;
  --gold-deep: #a96700;
  --line: rgba(255, 255, 255, 0.12);
  --display: "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --body: Inter, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  opacity: 0;
  transition: opacity 500ms ease;
}

body.ready { opacity: 1; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }

.header {
  height: 78px;
  padding: 0 clamp(24px, 4vw, 72px);
  background: var(--black);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 20;
}

.brand {
  justify-self: start;
  width: clamp(170px, 14vw, 225px);
  height: 68px;
  display: grid;
  align-items: center;
}

.brand img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 12px rgba(246, 201, 40, 0.12)); }

.menu-toggle {
  justify-self: end;
  width: 68px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 5px;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--white);
  transform-origin: center;
  transition: transform 200ms ease, opacity 150ms ease, width 200ms ease, background-color 160ms ease;
}
.menu-toggle span:nth-child(2) { width: 21px; }
.menu-toggle span:nth-child(3) { width: 14px; }
.menu-toggle b {
  position: absolute;
  right: 39px;
  top: 50%;
  transform: translateY(-50%);
  color: #8d9090;
  font-size: 7px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.menu-toggle:hover span { width: 28px; background: var(--gold); }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); background: var(--gold); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { width: 28px; transform: translateY(-7px) rotate(-45deg); background: var(--gold); }

.menu-backdrop {
  position: fixed;
  inset: 78px 0 0;
  background: rgba(0, 0, 0, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  z-index: 16;
}

.menu-panel {
  width: min(430px, 100%);
  height: calc(100dvh - 78px);
  padding: clamp(34px, 5vh, 60px) clamp(28px, 3.2vw, 48px) 30px;
  position: fixed;
  top: 78px;
  right: 0;
  background: #090c0e;
  border-left: 1px solid rgba(246, 201, 40, 0.34);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 260ms ease, opacity 220ms ease;
  z-index: 18;
}

body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open .menu-panel { opacity: 1; pointer-events: auto; transform: translateX(0); }
.menu-label { padding-bottom: 18px; border-bottom: 1px solid var(--line); color: #6f7272; font: 7px monospace; letter-spacing: 0.15em; text-transform: uppercase; }
.menu-nav { display: flex; flex-direction: column; }
.menu-nav a {
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 22px;
  color: #d2d3d1;
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: color 160ms ease, padding-left 160ms ease;
}
.menu-nav a span { color: #555958; font: 8px monospace; letter-spacing: 0.08em; }
.menu-nav a:hover,
.menu-nav a.active { color: var(--gold); padding-left: 8px; }
.menu-nav a.active span { color: var(--gold); }
.menu-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.menu-footer img { width: 38px; height: 38px; object-fit: contain; }
.menu-footer span { color: #686c6b; font-size: 7px; font-weight: 800; line-height: 1.6; letter-spacing: 0.12em; text-transform: uppercase; }

.hero {
  height: calc(100dvh - 78px);
  min-height: 460px;
  margin: 0 clamp(12px, 1.9vw, 34px) clamp(12px, 1.9vw, 34px);
  background: #080b0d;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  width: 106%;
  height: 106%;
  position: absolute;
  left: -3%;
  top: -3%;
  object-fit: cover;
  object-position: center;
  filter: hue-rotate(46deg) saturate(0.82) contrast(1.08) brightness(0.78);
  transform: translate3d(var(--art-x, 0), var(--art-y, 0), 0) scale(1.02);
  transition: transform 220ms ease-out;
  z-index: -3;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: -2;
}

.hero-shade::before {
  content: "";
  width: 39%;
  height: 100%;
  position: absolute;
  left: 30.5%;
  top: 0;
  background: rgba(5, 7, 8, 0.22);
}

.frame {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(246, 201, 40, 0.24);
  pointer-events: none;
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 15%;
  height: 1px;
  background: var(--gold);
}
.frame::before { left: 4%; }
.frame::after { right: 4%; }

.corner { position: absolute; width: 20px; height: 20px; border-color: rgba(255,255,255,0.5); }
.corner-tl { left: -1px; top: -1px; border-top: 1px solid; border-left: 1px solid; }
.corner-tr { right: -1px; top: -1px; border-top: 1px solid; border-right: 1px solid; }
.corner-bl { left: -1px; bottom: -1px; border-bottom: 1px solid; border-left: 1px solid; }
.corner-br { right: -1px; bottom: -1px; border-bottom: 1px solid; border-right: 1px solid; }

.frame-code {
  position: absolute;
  bottom: 12px;
  color: rgba(255,255,255,0.38);
  font: 7px monospace;
  letter-spacing: 0.15em;
}
.code-left { left: 16px; }
.code-right { right: 16px; }

.hero-content {
  width: min(680px, 48vw);
  position: absolute;
  left: 50%;
  top: 49%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 5;
}

.hero-seal {
  width: clamp(46px, 4.2vw, 70px);
  height: clamp(46px, 4.2vw, 70px);
  margin-bottom: 8px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(246, 201, 40, 0.28));
}

.eyebrow {
  margin: 0 0 clamp(18px, 3vh, 30px);
  color: #c8caca;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.eyebrow span { display: inline-block; width: 17px; height: 1px; margin: 0 11px 3px 0; background: var(--gold); }

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(54px, 6.1vw, 106px);
  font-weight: 900;
  line-height: 0.77;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 5px 34px rgba(0,0,0,0.72);
}
h1 em { color: var(--gold); font-style: normal; text-shadow: 0 0 24px rgba(246, 201, 40, 0.16), 0 5px 34px rgba(0,0,0,0.72); }

.intro {
  max-width: 470px;
  margin: clamp(21px, 3.5vh, 34px) 0 0;
  color: #b4b6b6;
  font-size: clamp(11px, 0.9vw, 14px);
  line-height: 1.65;
  text-shadow: 0 2px 12px black;
}

.actions { margin-top: clamp(22px, 3.5vh, 36px); display: flex; justify-content: center; gap: 12px; }
.button {
  min-width: 150px;
  height: 45px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--gold); color: var(--black); }
.button-primary:hover { background: var(--gold-bright); }
.button-secondary { background: rgba(5,7,8,0.66); border-color: rgba(255,255,255,0.48); }
.button-secondary:hover { background: var(--white); color: var(--black); }
.button-secondary span { font-size: 8px; }

.trailer-note {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 12px 12px 12px 17px;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  z-index: 8;
}
.trailer-note[hidden] { display: none; }
.trailer-note button { width: 24px; height: 24px; padding: 0; border: 0; background: var(--gold); color: var(--black); cursor: pointer; }

@media (max-width: 900px) {
  .header { height: 66px; padding: 0 22px; grid-template-columns: 1fr auto; }
  .menu-panel { top: 66px; height: calc(100dvh - 66px); }
  .menu-backdrop { inset: 66px 0 0; }
  .hero { height: calc(100dvh - 66px); margin: 0 8px 8px; }
  .hero-content { width: min(82vw, 560px); top: 47%; }
  .hero-art { width: 148%; left: -24%; opacity: 0.78; }
  .frame { inset: 10px; }
  .frame-code { display: none; }
}

@media (max-width: 560px) {
  .brand { width: 145px; height: 58px; }
  .menu-toggle { width: 58px; }
  .menu-toggle b { display: none; }
  .hero-content { width: 88vw; top: 45%; }
  .eyebrow { margin-bottom: 19px; font-size: 6px; letter-spacing: 0.2em; }
  .hero-seal { width: 43px; height: 43px; margin-bottom: 4px; }
  h1 { font-size: clamp(51px, 16vw, 76px); }
  .intro { max-width: 330px; font-size: 10px; line-height: 1.55; }
  .actions { width: 100%; max-width: 330px; }
  .button { min-width: 0; flex: 1; height: 42px; padding: 0 10px; font-size: 7px; }
  .hero-art { width: 190%; left: -45%; opacity: 0.58; }
}

@media (max-height: 650px) {
  .eyebrow { margin-bottom: 14px; }
  .intro { margin-top: 16px; line-height: 1.45; }
  .actions { margin-top: 18px; }
  .button { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Tournament groups */
.tournament-page {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #080a0c;
}

.tournament-page::before {
  content: "";
  position: fixed;
  inset: 78px 0 auto;
  height: 1px;
  background: rgba(246, 201, 40, 0.22);
  z-index: 4;
}

.groups-page {
  width: min(1440px, calc(100% - 64px));
  min-height: calc(100dvh - 78px);
  margin: 0 auto;
  padding: clamp(34px, 5vh, 62px) 0 48px;
  position: relative;
}

.groups-page::before {
  content: "RC";
  position: fixed;
  right: -0.05em;
  bottom: -0.16em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(246, 201, 40, 0.055);
  font-family: var(--display);
  font-size: min(34vw, 520px);
  font-weight: 900;
  line-height: 0.75;
  pointer-events: none;
  z-index: -1;
}

.groups-heading {
  margin-bottom: clamp(26px, 4vh, 42px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.groups-kicker {
  margin: 0 0 11px;
  color: #777b7a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.groups-kicker span { margin-right: 13px; color: var(--gold); }
.groups-heading h1 { font-size: clamp(48px, 5.2vw, 82px); line-height: 0.82; }
.groups-heading h1 em { color: var(--gold); }
.groups-intro { max-width: 430px; margin: 0; color: #959998; font-size: 12px; line-height: 1.7; }

.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.group-card {
  background: rgba(13, 17, 19, 0.94);
  border: 1px solid rgba(255,255,255,0.1);
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
  transition: border-color 180ms ease, transform 180ms ease;
}
.group-card:hover { border-color: rgba(246, 201, 40, 0.55); transform: translateY(-3px); }
.group-card > header {
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.group-card > header span,
.group-card > header small { color: #727675; font-size: 7px; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }
.group-card > header strong { color: var(--gold); font-family: var(--display); font-size: 31px; line-height: 1; }
.table-head,
.team-list li {
  display: grid;
  grid-template-columns: 20px 32px minmax(92px, 1fr) 25px 25px 25px 42px;
  align-items: center;
  gap: 7px;
}
.table-head {
  min-height: 25px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #555a59;
  font: 6px monospace;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.table-head span:nth-child(3) { text-align: left; }
.team-list { margin: 0; padding: 5px 14px 9px; list-style: none; }
.team-list li {
  min-height: 42px;
  padding: 4px 3px;
  border-bottom: 1px solid rgba(255,255,255,0.065);
  position: relative;
}
.team-list li:last-child { border-bottom: 0; }
.team-list li.qualifies::before { content: ""; position: absolute; width: 2px; height: 20px; left: -14px; top: 11px; background: var(--gold); }
.team-list b { color: #555a59; font: 7px monospace; }
.team-list img { width: 30px; height: 30px; object-fit: contain; }
.team-list strong { min-width: 0; overflow: hidden; color: #d9dad8; font-size: 8px; font-weight: 850; letter-spacing: 0.025em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.team-list .stat { color: #8a8e8d; font: 8px monospace; text-align: center; }
.team-list .rate { color: var(--gold); font: 7px monospace; text-align: right; }

@media (max-width: 1000px) {
  .groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .tournament-page::before { top: 66px; }
  .groups-page { width: calc(100% - 32px); min-height: calc(100dvh - 66px); padding-top: 34px; }
  .groups-heading { align-items: start; flex-direction: column; gap: 16px; }
  .groups-intro { max-width: 100%; }
  .groups-grid { grid-template-columns: 1fr; }
}
