/* Fonts: Barlow and Chakra Petch (SIL Open Font License), latin subset from Google Fonts. */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/chakra-petch-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/chakra-petch-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/chakra-petch-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #050e0f;
  --surface: #0a1a1c;
  --line: #1c4145;
  --line-strong: #2a6a66;
  --text: #d2fff4;
  --muted: #8fb5ae;
  --accent: #3fb499;
  --glacier: #10f0fe;
  --glacier-deep: #020b27;
  --ember: #f6920a;
  --ember-deep: #290b03;

  --font-display: "Chakra Petch", "Segoe UI", sans-serif;
  --font-body: "Barlow", "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}

p {
  margin: 0;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Buttons */

.btn {
  --cut: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--text);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color 0.15s, color 0.15s;
}

.btn:hover,
.btn:focus-visible {
  background: var(--glacier);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--line-strong);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--bg);
  background: var(--ember);
  box-shadow: none;
}

.btn-small {
  --cut: 8px;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.85rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

/* Nav */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(5, 14, 15, 0.92), rgba(5, 14, 15, 0.6));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(28, 65, 69, 0.6);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .nav .btn-small {
    margin-left: auto;
  }
}

/* Hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(5, 14, 15, 0.85) 30%, rgba(5, 14, 15, 0.2) 70%, rgba(5, 14, 15, 0.5) 100%),
    linear-gradient(to right, rgba(5, 14, 15, 0.75) 0%, rgba(5, 14, 15, 0) 60%);
}

.hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) var(--gutter) clamp(48px, 9vh, 112px);
  display: flex;
  align-items: flex-end;
  gap: clamp(24px, 4vw, 56px);
}

.hero-logo {
  width: clamp(140px, 22vw, 260px);
  flex-shrink: 0;
  filter: drop-shadow(0 0 32px rgba(63, 180, 153, 0.35));
}

.hero-copy {
  max-width: 620px;
}

.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text);
  max-width: 56ch;
}

.highlight {
  color: var(--ember);
  font-weight: 600;
}

@media (max-width: 760px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-logo {
    width: 128px;
  }
}

/* Teams */

.teams {
  display: grid;
  grid-template-columns: 1fr minmax(0, 640px) 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.teams-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
}

.teams-side h3 {
  font-size: 1.1rem;
  letter-spacing: 0.25em;
}

.teams-glacier {
  background: radial-gradient(circle at 50% 45%, rgba(16, 240, 254, 0.18), var(--glacier-deep) 70%);
  color: var(--glacier);
}

.teams-ember {
  background: radial-gradient(circle at 50% 45%, rgba(246, 146, 10, 0.2), var(--ember-deep) 70%);
  color: var(--ember);
}

.emblem {
  width: clamp(96px, 12vw, 160px);
  aspect-ratio: 1;
  background: currentColor;
  -webkit-mask: var(--emblem) center / contain no-repeat;
  mask: var(--emblem) center / contain no-repeat;
  filter: drop-shadow(0 0 18px currentColor);
}

.emblem-glacier {
  --emblem: url("img/team-glacier.webp");
}

.emblem-ember {
  --emblem: url("img/team-ember.webp");
}

.teams-body {
  padding: clamp(48px, 8vw, 96px) clamp(24px, 4vw, 56px);
  background: var(--surface);
}

.teams-body h2 {
  margin-bottom: 1.25rem;
}

.teams-body p + p {
  margin-top: 1rem;
}

.teams-body p:not(.eyebrow) {
  color: var(--muted);
}

@media (max-width: 900px) {
  .teams {
    grid-template-columns: 1fr 1fr;
  }

  .teams-body {
    grid-column: 1 / -1;
    order: -1;
  }
}

/* Full-bleed feature shot */

.feature-shot .shot {
  display: block;
}

.feature-shot img {
  width: 100%;
  max-height: 80vh;
  object-fit: cover;
}

/* Sections */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter) 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin-bottom: 1rem;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
}

/* Screenshot tiles */

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.shot:hover img,
.shot:focus-visible img {
  transform: scale(1.03);
}

.shot:focus-visible {
  outline: 2px solid var(--glacier);
  outline-offset: 3px;
}

/* Classes */

.lineup {
  border: 1px solid var(--line);
}

.class-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  --cols: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.class-grid li {
  --cut: 14px;
  flex: 0 0 calc((100% - (var(--cols) - 1) * 12px) / var(--cols));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 8px 16px;
  background: var(--surface);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color 0.15s;
}

.class-grid li:hover {
  background: #0f2729;
}

.class-grid img {
  width: 64px;
  height: 64px;
}

.class-grid li > span:last-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 1000px) {
  .class-grid {
    --cols: 4;
  }
}

@media (max-width: 640px) {
  .class-grid {
    --cols: 3;
  }

  .class-grid img {
    width: 52px;
    height: 52px;
  }
}

/* Cross-platform */

.crossplay {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.crossplay-copy h2 {
  margin-bottom: 1rem;
}

.crossplay-copy p:not(.eyebrow) {
  color: var(--muted);
}

.crossplay-shot {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .crossplay {
    grid-template-columns: 1fr;
  }
}

/* Arenas */

.arena-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(140px, 17vw, 220px);
  gap: 12px;
}

.arena-wide {
  grid-column: span 2;
  grid-row: span 2;
}

.arena-span {
  grid-column: span 2;
}

@media (max-width: 900px) {
  .arena-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: clamp(120px, 28vw, 220px);
  }

  .arena-wide {
    grid-column: 1 / -1;
  }

  .arena-span {
    grid-column: auto;
  }
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.gallery .shot {
  aspect-ratio: 16 / 9;
}

@media (max-width: 520px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* Community */

.community {
  margin-top: clamp(72px, 10vw, 128px);
  padding: clamp(72px, 10vw, 120px) var(--gutter);
  background:
    linear-gradient(rgba(5, 14, 15, 0.82), rgba(5, 14, 15, 0.92)),
    url("img/chillin-1920.webp") center / cover;
  border-top: 1px solid var(--line);
  text-align: center;
}

.community-inner {
  max-width: 960px;
  margin: 0 auto;
}

.community h2 {
  margin-bottom: 1rem;
}

.community p:not(.eyebrow) {
  max-width: 640px;
  margin-inline: auto;
  color: var(--muted);
}

.community .cta-row {
  flex-wrap: nowrap;
  justify-content: center;
}

@media (max-width: 900px) {
  .community .cta-row {
    flex-direction: column;
    max-width: 360px;
    margin-inline: auto;
  }
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

/* Lightbox */

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(2, 6, 7, 0.94);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lightbox img {
  max-width: min(94vw, 1920px);
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-caption {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--muted);
}

.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(10, 26, 28, 0.8);
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  border-color: var(--glacier);
  color: var(--glacier);
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 16px;
  top: 50%;
  translate: 0 -50%;
}

.lightbox-next {
  right: 16px;
  top: 50%;
  translate: 0 -50%;
}

@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 16px;
    translate: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .shot img,
  .btn {
    transition: none;
  }
}
