/* CODEBREAKERS site styles. Black header with the red 3D logo, black brand pages below. */

:root {
  --league-accent: #d3163a;
  --rising-accent: #8d8960;
  --creators-accent: #008ea3;
  --button-text: #fff;
  --button-hover: #fff;
  --button-hover-text: #000;
  --button-ghost: #000;
  --band: rgb(0 0 0 / .75);
  --subtext-box: #000;
  --base-size: 1.0625rem;
  --logo-size: clamp(220px, calc(42vw - 280px), 460px);
  --logo-size-mobile: clamp(150px, 40vw, 320px);
  --logo-size-wide: max(220px, 17.969vw);
  --footer-logo-size: 118px;
  --title-pad: clamp(10px, 1.2vw, 18px);
  --title-size: clamp(2rem, 4vw, 3.75rem);
  --title-line-width: 2px;
  --title-line-color: rgb(255 255 255 / .22);
  --strip-line-width: 2px;
  --strip-line-color: rgb(255 255 255 / .22);
  --strip-fade: 14%;
  --strip-fade-narrow: 4%;
  --card-size: clamp(220px, 23vw, 340px);
  --card-gap: clamp(12px, 1.4vw, 20px);
  --fixed-card-size: clamp(150px, 19vw, 280px);
  --team-card-size: clamp(140px, 13vw, 200px);
  --team-card-gap: clamp(10px, 1vw, 16px);
  --team-fit-gap: 16px;
  --scroll-speed: 35;

  color-scheme: dark;

  --bg: #050507;
  --panel: #0d0d11;
  --line: #26262e;
  --text: #f4f4f6;
  --muted: #a8a8b3;

  --purple: #7a12c4;      /* Watch Live, from the reference */
  --ink: #f4f4f6;         /* header text on black */
  --purple-text: #b27cf0; /* purple that reads on the black header */

  --league: #ff3b5f;
  --esports: #b27cf0;
  --rising: #d6d1a6;
  --creators: #00e1ff;

  --accent: var(--purple);
  --accent-text: var(--esports);

  --header-h: 92px;
  --gutter: clamp(16px, 4vw, 56px);
  --wrap: 1320px;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
/* Site background: the brand's purple texture, held still behind the page (a fixed layer, so it also works on phones) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--bg) url(background.jpg) center / cover no-repeat;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--base-size)/1.65 var(--sans);
  overflow-x: clip;
  isolation: isolate;
  /* Footer always sits at the bottom of the window, even on short pages (no floating footer) */
  display: flex; flex-direction: column; min-height: 100svh;
}
body > main { flex: 1 0 auto; display: flex; flex-direction: column; }
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-inline: clamp(16px, 2.2vw, 44px);
  background: #000;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(.875rem, .55rem + .42vw, 1rem);
}
.logo { display: block; justify-self: center; }
.logo img { width: var(--logo-size); height: auto; }

.nav-main { display: flex; align-items: center; gap: clamp(12px, calc(2.6vw - 20px), 26px); }
.nav-main a, .nav-main button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 0;
  background: none; border: 0;
  border-bottom: 2px solid transparent;
  color: inherit; font: inherit; white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.nav-main > a:hover, .nav-main button:hover { border-bottom-color: #5a5a66; }
.nav-main .is-active { border-bottom-color: var(--ink); }
.caret { width: 9px; height: 9px; transition: transform .15s; }

.nav-drop { position: relative; }
.nav-drop__menu {
  position: absolute; top: 100%; left: -16px;
  display: none; min-width: 210px;
  padding: 8px;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgb(0 0 0 / .5);
}
.nav-drop__menu a { display: block; padding: 9px 10px; border: 0; }
.nav-drop__menu a:hover, .nav-drop__menu a.is-current { background: #1a1a20; }
.nav-drop.is-open .nav-drop__menu { display: block; }
.nav-drop.is-open .caret { transform: rotate(180deg); }
@media (hover: hover) {
  .nav-drop:hover .nav-drop__menu { display: block; }
}

.header-right { display: flex; align-items: stretch; justify-content: flex-end; gap: clamp(12px, 1.6vw, 28px); height: 100%; }
.header-login {
  align-self: center;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: inherit; white-space: nowrap; text-decoration: none;
}
.header-login:hover { border-bottom-color: #5a5a66; }
.header-login.is-active { border-bottom-color: var(--ink); }
.socials { display: flex; align-items: center; gap: 4px; }
.socials a {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  color: inherit;
  transition: color .15s, transform .15s;
}
.socials a:hover { color: var(--purple-text); transform: translateY(-1px); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.socials svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; }

.watch-live {
  display: flex; align-items: center; justify-content: center;
  align-self: center;
  height: calc(var(--header-h) - 30px);
  padding-inline: clamp(18px, 2.6vw, 44px);
  border-bottom: 3px solid var(--purple);
  color: var(--purple-text);
  font-weight: 700; white-space: nowrap; text-decoration: none;
  transition: background .15s, color .15s;
}
.watch-live:hover { background: var(--purple); color: #fff; }

.menu-toggle { display: none; }

/* Below this width the nav folds into a menu; the logo stays centred. */
@media (max-width: 1279px) {
  :root { --header-h: 72px; }
  .site-header { gap: 12px; font-size: 1rem; }
  .header-login { display: none; }
  .menu-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-left: -8px;
    background: none; border: 0; color: inherit; cursor: pointer;
    justify-self: start;
  }
  .menu-toggle svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
  .logo img { width: var(--logo-size-mobile); }
  .header-right .socials { display: none; }
  .watch-live { height: 44px; padding-inline: 10px; }

  .nav-main {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
    background: #000;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgb(0 0 0 / .5);
    font-size: 1.125rem;
  }
  .nav-main.is-open { display: flex; }
  .nav-main > a, .nav-drop > button { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-main .is-active { border-bottom-color: var(--line); color: var(--purple-text); font-weight: 600; }
  .nav-drop__menu { position: static; min-width: 0; padding: 4px 0 8px 14px; box-shadow: none; }
  .nav-drop:hover .nav-drop__menu { display: none; }
  .nav-drop.is-open .nav-drop__menu { display: block; }
  .nav-main .socials { display: flex; flex-wrap: wrap; padding-top: 14px; }
}
@media (min-width: 1280px) {
  .nav-main .nav-login, .nav-main .socials { display: none; }
  .header-right .socials { display: flex; }
}
/* Desktop top bar scales with screen width. Reference = his 1440p screen (2560 px wide, 1vw = 25.6px):
   there every value is the px size he approved; narrower screens get the same layout scaled down
   (1080p = 75%), wider ones scaled up. The first number in each max() is a floor so text and icons
   stay readable near 1280 px; the vw number takes over once the screen is wide enough. */
@media (min-width: 1280px) {
  :root { --header-h: max(64px, 3.594vw); }
  .site-header { padding-inline: max(16px, 1.7188vw); gap: max(10px, .625vw); font-size: max(13px, .625vw); }
  .site-header .logo img { width: var(--logo-size-wide); }
  .site-header .nav-main { gap: max(12px, 1.0156vw); }
  .site-header .caret { width: max(7px, .3516vw); height: max(7px, .3516vw); }
  .site-header .nav-drop__menu { min-width: max(170px, 8.2031vw); padding: max(6px, .3125vw); }
  .site-header .header-right { gap: max(10px, 1.0938vw); }
  .site-header .socials { gap: max(2px, .1563vw); }
  .site-header .socials a { width: max(28px, 1.3281vw); height: max(28px, 1.3281vw); }
  .site-header .socials svg { width: max(15px, .7031vw); height: max(15px, .7031vw); }
  .site-header .watch-live { height: calc(var(--header-h) - max(20px, 1.1719vw)); padding-inline: max(16px, 1.7188vw); }
}

/* ---------- Hero ---------- */

/* Home page top: the newest Twitch VOD in a window, not full width */
.vod { padding-block: clamp(32px, 5vw, 64px); }
.vod__inner { width: min(100% - 2 * var(--gutter), 960px); margin-inline: auto; }
.vod .sec-head { margin-bottom: 14px; }
.vod__meta { margin: 10px 0 0; }
.vod__meta:empty { display: none; }

/* ---------- Layout ---------- */

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
/* One spacing system for every page (his call 11-22: About + Esports match the home page) */
:root { --section-pad: clamp(56px, 8vw, 112px); --inner-gap: clamp(24px, 3.4vw, 44px); }
.section { position: relative; padding-block: var(--section-pad); }
/* Break sections (the ones that had the shard texture) are a 75% black band (25% transparent)
   over the purple background; no texture, no divider lines (his call 11-22). */
.section--shards { background: var(--band); }
/* Text on these bands is readable already, so it has no black box */
.section--shards :is(.lede, .person__role, .vod__meta) { padding: 0; }
.section--shards .box-line { padding: 0; background: none; }
.theme-league   { --accent: var(--league-accent); --accent-text: var(--league); }
.theme-esports  { --accent: var(--purple); --accent-text: var(--esports); }
.theme-rising   { --accent: var(--rising-accent); --accent-text: var(--rising); }
.theme-creators { --accent: var(--creators-accent); --accent-text: var(--creators); }

.display {
  font-family: var(--display);
  font-style: italic; font-weight: 800;
  line-height: .95; letter-spacing: -.005em;
  text-transform: uppercase;
}
.display--xl { font-size: clamp(3rem, 8vw, 6.75rem); }
/* Big red "SOON" with a small TM at its top right (Tournaments page) */
.soon { font-size: clamp(4.5rem, 13vw, 11rem); line-height: .9; }
.soon .tm { font-size: .28em; vertical-align: top; position: relative; top: .1em; margin-left: .06em; }
.display--lg { font-size: clamp(2.5rem, 5.5vw, 4.75rem); }
.display--md { font-size: clamp(1.75rem, 3vw, 2.5rem); }

.lede { max-width: 62ch; color: #d9d9e0; }
.lede + .lede { margin-top: 1em; }
.meta { font: 500 .8125rem/1.5 var(--mono); color: var(--muted); }
/* Subtle line under a title that has subtext right below it (his call 11-22) */
:is(h1, h2, h3):has(+ :is(.lede, .person__role)),
.sec-head > :is(h1, h2),
h2.display:has(+ p.display) { padding-bottom: .3em; border-bottom: var(--title-line-width) solid var(--title-line-color); }
/* .title-block wraps a heading and its intro paragraph: the block is as wide as the title, and the
   paragraph (contain: inline-size, so it adds no width of its own) wraps to that width. */
.title-block { width: fit-content; max-width: 100%; }
.title-block > * + * { margin-top: 1.25rem; }
.title-block > .lede { contain: inline-size; max-width: none; }
.title-block .wordmark { width: var(--w, 720px); max-width: 100%; }
/* Subtext under titles sits in a black box so it reads over the purple background
   (11-22: a text outline was tried and reverted to the box, his call). The box is drawn per LINE:
   site.js wraps the text in .box-line, and each wrapped line gets its own box hugging that line's text,
   so a short last line has a short box (his call 11-22). */
.lede, .person__role, .vod__meta { padding-block: .3em; }
.box-line {
  background: var(--subtext-box); padding: .4em .75em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.accent { color: var(--accent-text); }

/* Heading row: title on the left, button on the right with its bottom edge on the title's line.
   A title-block's subtext drops to a second row under the title, so it never pushes the button down. */
.sec-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end;
  column-gap: 32px;
  margin-bottom: var(--inner-gap);
}
.sec-head > .title-block { display: contents; }
.sec-head > :is(h1, h2), .sec-head > .title-block > :is(h1, h2) { grid-column: 1; grid-row: 1; }
.sec-head > .title-block > .lede { grid-column: 1; grid-row: 2; }
.sec-head > :not(h1, h2, .title-block) { grid-column: 3; grid-row: 1; justify-self: end; }
@media (max-width: 640px) {
  .sec-head { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .sec-head > :not(h1, h2, .title-block) { grid-column: 1; grid-row: auto; justify-self: start; }
}
.wordmark { width: min(100%, var(--w, 720px)); }

.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.split > * { min-width: 0; }
.stack > * + * { margin-top: 1.25rem; }
.split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 860px) { .split, .split--flip { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: .55em 1.5em;
  background: var(--accent); color: var(--button-text);
  border: 2px solid var(--accent);
  font: italic 800 1.3125rem/1.1 var(--display);
  letter-spacing: .01em; text-transform: uppercase; text-decoration: none;
  transform: skewX(-10deg);
  transition: background .15s, border-color .15s, color .15s;
}
.btn > span { display: block; transform: skewX(10deg); }
.btn:hover { background: var(--button-hover); border-color: var(--button-hover); color: var(--button-hover-text); }
.btn--ghost { background: var(--button-ghost); border-color: var(--button-ghost); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 14px; }

/* Small link buttons: section links, social links, announcement links. Fill with the section colour on hover. */
.text-link, .person__links a, .status a {
  display: inline-flex; align-items: center;
  padding: .5em .95em;
  background: var(--button-ghost); border: 1px solid var(--button-ghost); /* no grey outline, his call 11-22 */
  color: var(--button-text); font: 500 .8125rem/1.2 var(--mono);
  text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
/* Content creators' own social links (Creators page) are brand blue; every other link button is white */
[data-page="creators"] .person .person__links a { color: var(--creators); }
.text-link:hover, .person__links a:hover, .text-link:focus-visible, .person__links a:focus-visible,
[data-page="creators"] .person .person__links a:hover { background: var(--accent); border-color: var(--accent); color: var(--button-text); }

/* ---------- Status band ---------- */

.status { background: var(--league-accent); color: var(--button-text); }
.status__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 32px; padding-block: 18px;
}
.status p { font: italic 700 clamp(1.1875rem, 2vw, 1.625rem)/1.15 var(--display); text-transform: uppercase; }
.status a { flex: none; background: var(--button-ghost); border-color: var(--button-ghost); }
.status a:hover, .status a:focus-visible { background: var(--button-hover); border-color: var(--button-hover); color: var(--league-accent); }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats > div { padding: clamp(20px, 3vw, 36px) var(--gutter); }
.stats > div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font: italic 800 clamp(2.25rem, 5vw, 4rem)/1 var(--display); }
.stats span { display: block; margin-top: 8px; font: 500 .8125rem/1.4 var(--mono); color: var(--muted); }
@media (max-width: 640px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- League cards ---------- */

.leagues { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 720px) { .leagues { grid-template-columns: minmax(0, 1fr); } }
.league-card { display: block; background: var(--panel); color: inherit; text-decoration: none; }
.league-card img.banner { width: 100%; aspect-ratio: 25 / 8; object-fit: cover; }
.league-card__body { padding: 18px 20px 22px; }
.league-card .wordmark { --w: 320px; }
a.league-card:hover .banner { filter: brightness(1.2); }

/* ---------- Results ---------- */

.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.results--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1040px) { .results--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .results, .results--four { grid-template-columns: minmax(0, 1fr); } }
.result { background: var(--panel); min-width: 0; }
.result img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #111; }
.result__body { padding: 12px 16px 16px; }
.result__body h3 { font: italic 800 1.625rem/1.1 var(--display); text-transform: uppercase; }
.result__body .code { color: var(--accent-text); font: 600 .8125rem/1.4 var(--mono); }
.result--wide {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 40px;
  padding: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 40px);
  background: #000;
}
.result--wide .result__body { padding: 0; }

.results--three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .results--three { grid-template-columns: minmax(0, 1fr); max-width: 640px; } }
.placing { margin-top: 12px; }
.placing img { aspect-ratio: 1920 / 531; margin-top: 4px; }

/* ---------- Video links ---------- */

.video-link { position: relative; display: block; background: #000; color: #fff; text-decoration: none; }
.video-link img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .82; transition: opacity .15s; }
.video-link:hover img { opacity: 1; }
.video-link::before {
  content: ""; position: absolute; z-index: 1; left: 50%; top: 50%;
  width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border-radius: 50%;
  background: rgb(0 0 0 / .68);
  transition: background .15s;
}
.video-link:hover::before { background: var(--accent); }
.video-link::after {
  content: ""; position: absolute; z-index: 2; left: 50%; top: 50%;
  width: 24px; height: 26px; margin: -13px 0 0 -9px;
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.video-label { margin-bottom: 8px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .video-grid { grid-template-columns: minmax(0, 1fr); } }
.video-grid--single { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.video-caption { margin-top: 8px; }

/* ---------- Embeds ---------- */

.embed { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed__fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; }
.bracket-frame { width: 100%; height: calc(100svh - var(--header-h) - 88px); min-height: 620px; border: 1px solid var(--line); background: #08090c; }

/* ---------- Rosters ---------- */

.roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); }
.roster--three { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 75%); margin-inline: auto; }
@media (max-width: 860px) {
  .roster, .roster--three { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}
.roster img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #111; transition: transform .2s; }
.roster figure:hover img { transform: translateY(-4px); }
.team-banner { width: min(100%, 780px); margin-bottom: clamp(20px, 3vw, 36px); }

/* ---------- Scrolling strips (home creators, About staff) ---------- */
/* site.js moves the row (slow auto-scroll, pause on hover, click-and-drag) and caps the strip's width.
   touch-action: pan-y keeps vertical page scrolling on phones while a sideways swipe drags the strip. */
.marquee {
  margin: clamp(24px, 3vw, 40px) auto 0;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--strip-fade), #000 calc(100% - var(--strip-fade)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--strip-fade), #000 calc(100% - var(--strip-fade)), transparent);
}
.marquee.is-dragging { cursor: grabbing; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__item { flex: none; width: var(--card-size); margin-right: var(--card-gap); }
.marquee__item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #111; transition: transform .2s; -webkit-user-drag: none; pointer-events: none; }
.marquee__item:hover img, .marquee__item:focus-visible img { transform: translateY(-4px); }
.marquee.is-dragging .marquee__item img { transform: none; }
/* Scrolls in every browser, also with "reduce motion" on (his call 11-22: Opera showed a scroll bar instead) */

/* ---------- People rows (creators and staff) ---------- */

.person {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(20px, 4vw, 56px); align-items: start;
}
.person + .person { margin-top: clamp(64px, 9vw, 120px); }
.person__card { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #111; }
.person__role { margin-top: 6px; color: var(--accent-text); font: 500 .875rem/1.5 var(--mono); }
.person__links { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px 20px; }
.person__links .sep { display: none; }
@media (max-width: 720px) {
  .person { grid-template-columns: minmax(0, 1fr); }
  .person__card { max-width: 420px; }
}

.staff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px) clamp(14px, 2vw, 24px); }
@media (max-width: 1100px) { .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .staff-grid { grid-template-columns: minmax(0, 1fr); } }
.staff-card img.card { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #111; }
.staff-card h3 { margin-top: 14px; }
.staff-card .person__links { margin-block: 10px 14px; }

/* ---------- Page heads and CTA ---------- */

/* Page banners (About, Staff): title text + chrome CB logo on the 75% black band (.section--shards),
   replacing the old textured banner images (his call 11-22: no texture, much shorter). */
/* Title bands are thin breaks (his call 11-22: 3-4x thinner than a full section): small padding, smaller title */
.page-banner { padding-block: var(--title-pad); }
.page-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-banner__title { font-size: var(--title-size); }
.page-banner__inner img { width: clamp(110px, 15vw, 230px); height: auto; }
/* About and Esports pages are centred: band titles and the intro paragraphs (each line's black box centres with it) */
:is([data-page="about"], [data-page="esports"]) .page-banner__inner { justify-content: center; text-align: center; }
:is([data-page="about"], [data-page="esports"]) main .stack { text-align: center; }
:is([data-page="about"], [data-page="esports"]) main .stack .lede { margin-inline: auto; }
/* Esports: the team announcement art sits centred under the intro */
.esports-art { max-width: 960px; }
.page-head { padding-block: clamp(44px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.section--fill { display: grid; align-content: center; min-height: calc(100svh - var(--header-h) - 190px); }

.cta { text-align: center; }
.cta .btn-row { justify-content: center; margin-top: 24px; }

.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 18px;
  background: var(--panel); border: 1px solid var(--line);
  font: italic 800 1.375rem/1 var(--display); text-transform: uppercase; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.contact-list a:hover { border-color: var(--accent-text); color: var(--accent-text); }
.contact-list svg { flex: none; width: 22px; height: 22px; fill: currentColor; }
.contact-list svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: #000; }
.site-footer__inner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px 48px; align-items: center;
  padding-block: 36px;
}
.site-footer img { width: var(--footer-logo-size); margin: -12px 0 -12px -10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .9375rem; }
.site-footer nav a { text-decoration: none; color: #d9d9e0; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .socials a:hover { color: var(--esports); }
.site-footer__line {
  grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line);
  font: 500 .75rem/1.5 var(--mono); color: var(--muted);
  text-transform: uppercase;
}
@media (max-width: 820px) {
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .site-footer .socials { flex-wrap: wrap; margin-left: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
/* Strips straight under a title band (About staff, Esports teams) */
/* strip sections use the normal section padding */
:is(.staff-strip, .strip-section) .marquee {
  margin-top: 0;
  /* all 4 cards visible at once, so only a thin fade at the very edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--strip-fade-narrow), #000 calc(100% - var(--strip-fade-narrow)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--strip-fade-narrow), #000 calc(100% - var(--strip-fade-narrow)), transparent);
}
/* White line under a scrolling strip (About lead staff), same style as the title lines; width synced to the strip by site.js */
.marquee-rule { border: 0; border-top: var(--strip-line-width) solid var(--strip-line-color); margin: var(--inner-gap) auto 0; }
/* About: remaining staff as fixed cards under the line, centred, a little smaller than the lead strip */
.staff-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--card-gap); margin-top: var(--inner-gap); }
.staff-cards img { width: var(--fixed-card-size); aspect-ratio: 4 / 5; object-fit: cover; background: #111; }
/* Esports: both teams side by side, each a title with the white line across its column and its strip under it */
.team-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--inner-gap) clamp(32px, 4vw, 64px); }
@media (max-width: 860px) { .team-cols { grid-template-columns: minmax(0, 1fr); } }
.team-col__title { padding-bottom: .3em; border-bottom: var(--title-line-width) solid var(--title-line-color); margin-bottom: var(--inner-gap); }
.team-col .marquee {
  margin-top: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--strip-fade-narrow), #000 calc(100% - var(--strip-fade-narrow)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--strip-fade-narrow), #000 calc(100% - var(--strip-fade-narrow)), transparent);
}
/* smaller cards so a whole team of 3 fits its half of the page */
.team-col .marquee__item { width: var(--team-card-size); margin-right: var(--team-card-gap); }
/* Esports teams fill the rest of the window (footer never floats) and get a wider area than the normal
   1320px column; each card is a third of its column so all 3 players stay visible and as big as possible */
.team-section { flex: 1 0 auto; display: grid; align-content: center; }
.team-cols { width: min(100% - 2 * var(--gutter), 1700px); }
.team-col { container-type: inline-size; }
.team-col .marquee__item { width: calc((100cqi - 2 * var(--team-fit-gap)) / 3); margin-right: var(--team-fit-gap); }
/* Esports welcome banner sits straight above the teams: no double gap between them */
.esports-art-section { padding-bottom: 0; }

/* Fixed presentation of an editable strip. */
.cb-fixed { overflow: visible; cursor: auto; mask-image: none; -webkit-mask-image: none; }
.cb-fixed .marquee__track { width: auto; flex-wrap: wrap; justify-content: center; gap: var(--card-gap); transform: none; }
.cb-fixed .marquee__item { margin-right: 0; }
:is(.team-col, .staff-strip, .strip-section) .cb-fixed { mask-image: none; -webkit-mask-image: none; }
main .cb-align-left :is(.page-banner__inner, .stack, .title-block) { text-align: left; }
main .cb-align-center :is(.page-banner__inner, .stack, .title-block) { text-align: center; }
main .cb-align-left :is(.page-banner__inner, .btn-row) { justify-content: flex-start; }
main .cb-align-center :is(.page-banner__inner, .btn-row) { justify-content: center; }
main .cb-align-left .stack .lede { margin-inline: 0; }
main .cb-align-center .stack .lede { margin-inline: auto; }
main .cb-align-center .title-block { margin-inline: auto; }

.cb-caption { font-family: var(--sans); font-size: .875em; color: var(--muted); margin: .5rem 0 0; }
