/* ZeroSpace public site, own stylesheet, not the in game design system */

@font-face {
  font-family: 'Oxanium';
  src: url('../assets/oxanium.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('../assets/chakrapetch-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('../assets/chakrapetch-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #17161b;
  --panel: #1d1c22;
  --panel-2: #24232a;
  --panel-3: #2c2b34;
  --line: #35333f;
  --line-soft: #2a2932;
  --text: #f2f3f5;
  --muted: #a09eab;
  --dim: #6f6d7a;
  --accent: #a000eb;
  --accent-soft: #c561ff;
  --good: #37d18b;
  --bad: #f0526c;

  --gutter: 24px;
  --page: 1240px;
  --section-y: 104px;
  --radius: 2px;
  --cut: 14px;
}

/* wide desktops and ultrawides, the column grows with the screen instead of stranding it in the middle */
@media (min-width: 1600px) {
  :root { --page: 1440px; --gutter: 32px; --section-y: 116px; }
}
@media (min-width: 2000px) {
  :root { --page: 1720px; --gutter: 40px; --section-y: 128px; }
}
@media (min-width: 2560px) {
  :root { --page: 2040px; --gutter: 48px; --section-y: 144px; }
}
@media (min-width: 3200px) {
  :root { --page: 2360px; --section-y: 160px; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Oxanium', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

/* height auto keeps the html height attribute from fighting a css width */
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .015em;
  text-transform: uppercase;
}
h1 { font-size: clamp(34px, 5vw, 54px); }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.2vw, 25px); }
h4 { font-size: 17px; }
p  { margin: 0; }

.page { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- shared pieces ---------- */

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.lede { color: var(--muted); font-size: 17px; max-width: 62ch; }

.section { padding: var(--section-y) 0; }
.section--tight { padding: 72px 0; }
.section--panel { background: var(--panel); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head { display: grid; gap: 14px; justify-items: center; text-align: center; margin-bottom: 56px; }
.section-head .lede { text-align: center; }

.cut {
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--ink);
  cursor: pointer;
  transition: background .16s linear, color .16s linear, border-color .16s linear;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--text); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--accent); border-color: var(--accent); }
.btn--sm { padding: 10px 20px; font-size: 13px; }

/* ---------- site header ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(23, 22, 27, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 74px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.nav-brand img { width: 40px; height: 40px; }
.nav-brand span { font-weight: 700; letter-spacing: .18em; font-size: 15px; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s linear, border-color .15s linear;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.is-active { color: var(--text); border-bottom-color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); padding: 8px; cursor: pointer; }
.nav-toggle img { width: 18px; height: 18px; }

.viewer { display: flex; align-items: center; gap: 10px; }
.viewer img { width: 32px; height: 32px; object-fit: cover; border: 1px solid var(--line); }
.viewer-name { font-size: 14px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-out { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.viewer-out:hover { color: var(--text); }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,22,27,.55) 0%, rgba(23,22,27,.75) 55%, var(--ink) 100%);
}
.hero-inner {
  position: relative;
  max-width: var(--page);
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
  display: grid;
  justify-items: center;
  gap: 34px;
  text-align: center;
}
.hero-wordmark { width: min(560px, 88%); }
.hero-copy { display: grid; gap: 14px; justify-items: center; max-width: 700px; }
.hero-tag { font-size: 19px; color: var(--muted); }
.hero-video {
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
}
.hero-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.hero-wishlist img { width: 340px; }

/* ---------- mailing list ---------- */

/* the published site runs its own art behind this block, darkened so the copy stays readable */
.section--art {
  position: relative;
  background-image: linear-gradient(rgba(23, 22, 27, .82), rgba(23, 22, 27, .92)), url('../assets/section-bg.jpg');
  background-position: 50% 30%;
  background-size: cover;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.pitch { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: start; }
.pitch-copy { display: grid; gap: 20px; }
.signup {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 28px;
  display: grid;
  gap: 14px;
}
.signup h3 { font-size: 19px; }
.signup p { color: var(--muted); font-size: 15px; }

/* ---------- gameplay cards ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.card-shot { aspect-ratio: 16 / 10; overflow: hidden; background: var(--panel-3); }
.card-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-shot img { transform: scale(1.04); }
.card-body { display: grid; align-content: start; gap: 12px; padding: 26px 24px 30px; }
.card-body h3 { font-size: 20px; }
.card-body p { color: var(--muted); font-size: 15px; }
.card::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 46px;
  background: var(--accent);
}

/* ---------- feature tabs ---------- */

.features { display: grid; grid-template-columns: 400px 1fr; gap: 40px; align-items: start; }
.feature-list { display: grid; gap: 10px; align-content: start; }
.feature-tab {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 20px 22px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background .16s linear, border-color .16s linear;
}
.feature-tab:hover { background: var(--panel-3); }
.feature-tab.is-active { background: var(--panel-3); border-left-color: var(--accent); }
.feature-tab h3 { font-size: 16px; letter-spacing: .1em; }
.feature-tab p { color: var(--muted); font-size: 14px; line-height: 1.55; display: none; }
.feature-tab.is-active p { display: block; }
.feature-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: hidden;
}
.feature-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s ease;
}
.feature-stage img.is-active { opacity: 1; }

/* ---------- community ---------- */

.community { display: grid; justify-items: center; gap: 28px; text-align: center; }
.community-btn img { width: min(520px, 100%); }

/* ---------- footer ---------- */

.footer { background: var(--panel); border-top: 1px solid var(--line-soft); padding: 64px 0 40px; }
.footer-logos { display: grid; justify-items: center; margin-bottom: 48px; }
.footer-logos img { width: min(720px, 100%); opacity: .85; }
.footer-grid { display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: center; }
.footer-esrb img { width: 88px; }
.footer-note { color: var(--dim); font-size: 13px; }
.footer-socials { display: flex; gap: 16px; align-items: center; }
.footer-socials img { width: 22px; height: 22px; opacity: .7; transition: opacity .15s linear; }
.footer-socials a:hover img { opacity: 1; }
.footer-bar {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- rankings ---------- */

.board-head {
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink) 100%);
  padding: 52px 0 40px;
}
.board-head-inner { display: grid; gap: 12px; }

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.filter { display: grid; gap: 8px; }
/* the display grid above beats the browser default for hidden so a war board picker needs this to go away */
.filter[hidden] { display: none; }
.filter label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.filter select {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.filter select:focus { outline: none; border-color: var(--accent); }

.board-note { margin-top: 18px; color: var(--dim); font-size: 13px; min-height: 20px; }

/* desktop keeps no scroll box here, one would pin the sticky header over the first rows */

.board {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  font-family: 'Chakra Petch', 'Oxanium', sans-serif;
}
.board thead th {
  position: sticky;
  top: 74px;
  z-index: 5;
  background: var(--panel);
  text-align: left;
  padding: 14px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.board tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  font-size: 15px;
}
.board tbody tr:hover td { background: var(--panel-2); }
.board tbody tr.is-viewer td { background: rgba(160, 0, 235, .14); }
.board tbody tr.is-viewer td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.col-pos { width: 72px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.col-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-mmr { font-weight: 600; font-size: 17px; }

.pos-medal { color: var(--accent-soft); font-weight: 600; }

.who { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.who-face { position: relative; width: 42px; height: 42px; flex: 0 0 auto; }
.who-face img.face { width: 100%; height: 100%; object-fit: cover; background: var(--panel-3); border: 1px solid var(--line); }
.who-face img.frame { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); object-fit: contain; pointer-events: none; }
.who-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

.league { display: flex; align-items: center; gap: 10px; min-width: 128px; }
.league img { width: 30px; height: 30px; object-fit: contain; }
.league span { font-size: 14px; color: var(--muted); white-space: nowrap; }

.wr { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.wr-bar { width: 56px; height: 5px; background: var(--panel-3); overflow: hidden; }
/* block or the percent width and full height are thrown away on an inline span */
.wr-fill { display: block; height: 100%; background: var(--good); }
.wr-num { font-variant-numeric: tabular-nums; width: 44px; text-align: right; }

/* one capped column per faction so numbers line up and stay tight on a wide screen */
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 82px)); gap: 4px; min-width: 342px; }
.chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  padding: 3px 7px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  color: var(--dim);
  white-space: nowrap;
}
.chip b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.is-top { border-color: var(--accent); color: var(--text); }
.chip.is-top b { color: var(--text); }

.board-empty { padding: 60px 0; text-align: center; color: var(--dim); }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 32px 0 8px; }
.pager span { color: var(--dim); font-size: 14px; }

.mine {
  margin-bottom: 26px;
  border: 1px solid var(--accent);
  background: rgba(160, 0, 235, .1);
}
.mine-label {
  padding: 8px 16px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.mine .board tbody tr.is-viewer td { background: transparent; }
.mine .board tbody tr.is-viewer td:first-child { box-shadow: none; }
.mine .board tbody td { border-bottom: 0; }

.signin-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.signin-copy { display: grid; gap: 4px; }
.signin-copy p:last-child { color: var(--muted); font-size: 15px; }

.board-unranked {
  margin-bottom: 26px;
  padding: 16px 24px;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 15px;
}

.is-loading { opacity: .45; transition: opacity .12s linear; }

/* ---------- wide screens ---------- */

/* the column above grows with the screen, these keep type and reading width sane while it does */
@media (min-width: 2000px) {
  body { font-size: 18px; }
  .lede { font-size: 19px; max-width: 68ch; }
  .hero-wordmark { width: min(680px, 88%); }
  .hero-video { max-width: 1100px; }
  .hero-tag { font-size: 21px; }
  .card-body { padding: 30px 28px 34px; }
  .card-body p { font-size: 16px; }
  .pitch, .features { max-width: 1720px; margin: 0 auto; }
  .board tbody td { font-size: 16px; padding: 14px; }
  .col-mmr { font-size: 19px; }
  .who-face { width: 48px; height: 48px; }
}

@media (min-width: 2560px) {
  body { font-size: 19px; }
  .hero-wordmark { width: min(820px, 88%); }
  .hero-video { max-width: 1320px; }
  .hero-wishlist img { width: 400px; }
  .pitch, .features { max-width: 1860px; }
  .features { grid-template-columns: 500px 1fr; }
  .footer-logos img { width: min(900px, 100%); }
}

/* wide but short monitor gets a tighter hero, keeps the trailer above the fold */
@media (min-width: 1600px) and (max-height: 1600px) {
  .hero-inner { padding: 40px var(--gutter) 56px; gap: 26px; }
  .hero-wordmark { width: min(520px, 84%); }
  .hero-video { max-width: 800px; }
  .hero-wishlist img { width: 320px; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .pitch { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* narrow screens scroll the table sideways, so the header drops sticky and stays with its rows */
@media (max-width: 1180px) {
  .board-wrap { overflow-x: auto; }
  .board thead th { position: static; }
}

/* the full link row plus both buttons stop fitting well before the tablet layout does */
@media (max-width: 1180px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px var(--gutter); width: 100%; border-bottom: 0; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-actions { margin-left: 0; }
}

@media (max-width: 860px) {
  :root { --section-y: 68px; }
  .cards { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; justify-items: start; }
}

@media (max-width: 680px) {
  .nav-store { display: none; }
  .nav-brand span { display: none; }
}

@media (max-width: 560px) {
  .filters { grid-template-columns: 1fr; }
  .hero-wishlist img { width: 260px; }
  .footer-bar { flex-direction: column; align-items: flex-start; }
  .viewer-name { max-width: 92px; }
}
