:root {
  --bg:      #060706;
  --surface: #0e120d;
  --edge:    #1d241b;
  --text:    #edede7;  /* 16.2:1 on --bg */
  --text-2:  #96a096;  /*  7.3:1 on --bg */
  --text-3:  #7e887e;  /*  5.4:1 on --bg */
  --accent:  #6fd43a;  /* 10.5:1 on --bg */
  --glitch:  #ff3d9a;  /* glitch channel only, never load-bearing */

  --display: 'Oxanium', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --wide: 78rem;
  --measure: 58ch;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: ''; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50;
  background: var(--accent); color: #0a1206;
  padding: .6rem 1rem; font-weight: 600; text-decoration: none;
  border-radius: 6px;
  transition: top .15s ease;
}
.skip:focus { top: .75rem; color: var(--bg); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}
.topbar__brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 800; font-size: 1rem;
  color: var(--text); text-decoration: none;
}
.topbar__nav { display: flex; align-items: center; gap: clamp(.9rem, 2.4vw, 1.9rem); }
.topbar__nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .88rem; color: var(--text-2); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.topbar__nav a:hover, .topbar__nav a:focus-visible { color: var(--text); border-bottom-color: var(--accent); }
.topbar__nav a.topbar__out { color: var(--accent); }
.topbar__nav a.topbar__out:hover { color: var(--text); }

/* ---------- hero: the mark runs off the left edge ---------- */

.hero {
  position: relative;
  max-width: var(--wide); margin-inline: auto;
  min-height: clamp(20rem, 46vh, 30rem);
  display: flex; align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(2rem, 5vw, 3.5rem);
}

.hero__mark {
  position: absolute;
  left: calc(50% - 50vw + var(--gutter));
  top: 50%; translate: -6% -50%;
  width: clamp(16rem, 28vw, 26rem); height: auto;
  animation: spin 64s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

.hero__text {
  position: relative; z-index: 1;
  margin-left: clamp(15rem, 29vw, 26rem);
}

.hero__sub {
  margin: 1.4rem 0 0;
  max-width: 34ch;
  font-size: 1.02rem; line-height: 1.75;
  color: var(--text-2);
}

.wordmark {
  position: relative; margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: .86; letter-spacing: -.035em;
  color: var(--text);
  width: max-content; max-width: 100%;
}
.wordmark__live { position: relative; z-index: 2; }
.wordmark::before, .wordmark::after {
  content: attr(data-text);
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
}
.wordmark::before { color: var(--accent); animation: glitch-a 4.2s steps(1) infinite; }
.wordmark::after  { color: var(--glitch); animation: glitch-b 5.1s steps(1) infinite; }

@keyframes glitch-a {
  0%, 86%, 100% { clip-path: inset(100% 0 0 0); translate: 0; }
  87% { clip-path: inset(18% 0 62% 0); translate: -.055em -.012em; }
  89% { clip-path: inset(66% 0 18% 0); translate: .04em .012em; }
  91% { clip-path: inset(38% 0 44% 0); translate: -.03em 0; }
  93% { clip-path: inset(100% 0 0 0); }
}
@keyframes glitch-b {
  0%, 78%, 100% { clip-path: inset(100% 0 0 0); translate: 0; }
  79% { clip-path: inset(52% 0 30% 0); translate: .05em .01em; }
  81% { clip-path: inset(10% 0 74% 0); translate: -.042em -.01em; }
  84% { clip-path: inset(100% 0 0 0); }
}
.wordmark.is-booting::before, .wordmark.is-booting::after {
  animation: none; clip-path: inset(100% 0 0 0);
}

/* ---------- the standing ---------- */

.standing {
  max-width: var(--wide); margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
}

.standing__line {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.7;
  color: var(--text-2);
  text-wrap: pretty;
}

.standing__row { display: block; }

.standing__line a {
  color: var(--text);
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.standing__line a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.standing__line strong.standing__num {
  font-family: var(--display); font-weight: 800;
  font-size: 1.9em; line-height: .7;
  color: var(--accent);
  letter-spacing: -.03em;
  padding: 0 .03em;
  vertical-align: -.08em;
}

/* ---------- bands ---------- */

.band {
  max-width: var(--wide); margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter);
}
.band h2 {
  margin: 0 0 1rem;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -.015em;
}
.lede { margin: 0 0 1.8rem; max-width: var(--measure); color: var(--text-2); font-size: .95rem; }
.band strong { color: var(--text); font-weight: 600; }

/* ---------- crew ---------- */

.crew {
  margin: 0;
  max-width: 30ch;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.6rem, 5.5vw, 3.4rem);
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--text);
  text-wrap: balance;
}
.crew__name { white-space: nowrap; }
.crew__name--ro {
  color: var(--accent);
  box-shadow: inset 0 -.09em 0 color-mix(in srgb, var(--accent) 55%, transparent);
}
.crew__note {
  margin: 1.8rem 0 0;
  max-width: 44ch;
  font-size: .9rem; color: var(--text-2);
}

/* ---------- roster control ---------- */

.controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 2.2rem;
}
.seg {
  display: inline-flex;
  padding: 3px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), inset 0 -1px rgba(0, 0, 0, .1);
}
.seg button {
  min-height: 42px;
  padding: 0 1.05rem;
  font: 600 .82rem/1 var(--mono);
  color: var(--text-2);
  background: transparent; border: 0; border-radius: 6px;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.seg button[aria-pressed='true'] {
  background: var(--accent); color: #0a1206; font-weight: 600;
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), inset 0 -1px rgba(0, 0, 0, .18);
}
.seg button[aria-pressed='true']:hover { background: color-mix(in srgb, var(--accent) 82%, #ffffff); }
.seg__count { margin: 0; font-size: .85rem; color: var(--text-3); }

.note {
  max-width: 34rem;
  margin: 0 0 2.6rem;
  padding: 1.1rem 1.3rem;
  border-left: 2px solid var(--accent);
  background: var(--surface);
  rotate: -.35deg;
}
.note p { margin: 0; font-size: .88rem; line-height: 1.7; color: var(--text-2); }

/* ---------- seasons ---------- */

.season + .season { margin-top: 3.2rem; }

.season__head {
  display: flex; align-items: baseline; gap: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--text-3);
}
.season__year {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -.02em;
  line-height: 1;
}
.season__meta { margin: 0; font-size: .82rem; color: var(--text-3); }

.season__list { list-style: none; margin: 0; padding: 0; }

.ev {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 8.5rem 10rem;
  align-items: baseline;
  gap: .4rem 1.25rem;
  padding: 1.05rem .25rem;
  border-bottom: 1px solid var(--edge);
}

.ev__place {
  font-family: var(--display); font-weight: 800;
  font-size: 1.35rem; line-height: 1;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.ev__place sup { font-size: .55em; font-weight: 600; margin-left: .08em; }
.ev--top .ev__place { color: var(--text); }
.ev--podium .ev__place { color: var(--accent); }

.ev__name { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--edge); }
.ev__name:hover { color: var(--accent); border-bottom-color: var(--accent); }

.ev__roster { display: block; margin-top: .2rem; font-size: .74rem; letter-spacing: .06em; color: var(--text-3); }

.ev__ctf {
  font-size: .85rem; color: var(--text-2); text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ev__rating { display: flex; align-items: center; gap: .7rem; }
.ev__pts {
  min-width: 3.7rem; text-align: right;
  font-size: .85rem; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ev__bar { flex: 1; height: 3px; background: var(--edge); }
.ev__bar i { display: block; height: 100%; background: var(--accent); }
.ev--podium .ev__pts { color: var(--text); }

.seasons__empty { padding: 2rem .25rem; color: var(--text-2); }

/* ---------- about ---------- */

.band--about { border-top: 1px solid var(--edge); padding-bottom: clamp(4rem, 9vw, 7rem); }
.about { columns: 2; column-gap: 3rem; max-width: 62rem; }
.about p { margin: 0 0 1rem; color: var(--text-2); break-inside: avoid; }
.about__links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .75rem;
  min-height: 48px;
  padding: .875rem 1.5rem;
  font: 600 .82rem/1 var(--mono);
  letter-spacing: .01em;
  color: var(--text-2);
  text-decoration: none;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), inset 0 -1px rgba(0, 0, 0, .1);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 100%, transparent);
  border-color: rgba(255, 255, 255, .15);
  transform: translateY(-2px);
}
.btn:active { transform: translateY(0); }

.btn--primary {
  color: #0a1206;
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #ffffff);
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), inset 0 -1px rgba(0, 0, 0, .18);
}
.btn--primary:hover {
  color: #0a1206;
  background: color-mix(in srgb, var(--accent) 82%, #ffffff);
  border-color: color-mix(in srgb, var(--accent) 50%, #ffffff);
}

/* ---------- narrow ---------- */

@media (max-width: 900px) {
  .ev {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: .3rem 1rem;
  }
  .ev__ctf { grid-column: 2; text-align: left; }
  .ev__rating { grid-column: 2; }
  .ev__pts { min-width: 0; text-align: left; }
  .about { columns: 1; }
}

@media (max-width: 760px) {
  .hero {
    display: block;
    min-height: 0;
    padding-top: clamp(2rem, 7vw, 3rem);
  }
  .hero__mark {
    position: static; translate: none;
    display: block; margin: 0 auto 1.6rem;
    width: min(54%, 13rem);
  }
  .hero__text { margin-left: 0; }
  .wordmark { font-size: clamp(2.7rem, 16vw, 4.5rem); }
  .standing { align-items: flex-start; }
  .standing__digits { font-size: clamp(5rem, 30vw, 9rem); }
  .controls { flex-direction: column; align-items: flex-start; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 0 .5rem; }
}

@media (max-width: 560px) {
  .topbar__nav { gap: 1.1rem; }
  .topbar__nav a { font-size: .85rem; white-space: nowrap; }
  /* CTFtime stays reachable from the About section */
  .topbar__nav a.topbar__out { display: none; }
}

/* ---------- system settings ---------- */

@media (prefers-reduced-transparency: reduce) {
  .topbar { backdrop-filter: none; background: var(--bg); }
}

@media (prefers-contrast: more) {
  body::after { display: none; }
  :root {
    --text-2: #d4dad4;  /* 13.9:1 on --bg */
    --text-3: #b9c2b9;  /* 10.8:1 on --bg */
    --edge:   #4a5747;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__mark { animation: none; }
  .btn:hover, .btn:active { transform: none; }
  .wordmark::before, .wordmark::after { animation: none; clip-path: inset(100% 0 0 0); }
  * { transition-duration: .01ms !important; }
}
