:root {
  --ink: #0d0e10;
  --paper: #f1f0e8;
  --bone: #d8d4c8;
  --heart: #f15b52;
  --heart-dark: #c13a34;
  --hp-green: #55d6a5;
  --mana-blue: #7ca7ff;
  --loot-gold: #f4c95d;
  --arcane: #9b7ede;
  --stone: #242832;
  --fog: #a7a29a;
  --white: #ffffff;
  --font-pixel: "Press Start 2P", system-ui, sans-serif;
  --font-display: "Pixelify Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Space Mono", monospace;
  --page-pad: 28px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 10;
  transform: translateY(-140%);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 74px;
  padding: 14px var(--page-pad);
  background: rgba(13, 14, 16, 0.92);
  border-bottom: 1px solid rgba(241, 240, 232, 0.12);
  backdrop-filter: blur(12px);
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: center;
  width: 88px;
  min-height: 46px;
  color: var(--paper);
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  text-decoration: none;
}

.brand-heart {
  color: var(--heart);
}

.nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links a,
.header-action,
.button,
.filter-button {
  min-height: 42px;
  border: 2px solid var(--paper);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-links a {
  border-color: transparent;
  color: var(--bone);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: rgba(241, 240, 232, 0.3);
  color: var(--white);
}

.header-action,
.button.primary {
  background: var(--heart);
  border-color: var(--heart);
  color: var(--ink);
}

.header-action:hover,
.header-action:focus-visible,
.button.primary:hover,
.button.primary:focus-visible {
  background: var(--loot-gold);
  border-color: var(--loot-gold);
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 48px var(--page-pad) 58px;
  border-bottom: 6px solid var(--paper);
}

section {
  scroll-margin-top: 92px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 14, 16, 0.96) 0%, rgba(13, 14, 16, 0.82) 42%, rgba(13, 14, 16, 0.28) 100%),
    linear-gradient(180deg, rgba(13, 14, 16, 0.1), rgba(13, 14, 16, 0.62));
  z-index: 1;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  opacity: 0.78;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero-media img:first-child {
  grid-column: 3 / span 2;
  grid-row: 1 / span 2;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.7);
}

.eyebrow,
.tag,
.health-label {
  font-family: var(--font-mono);
  color: var(--heart);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: var(--font-pixel);
  font-size: 3.6rem;
  line-height: 1.18;
  letter-spacing: 0;
  color: var(--paper);
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-line {
  margin-bottom: 18px;
  color: var(--hp-green);
  font-family: var(--font-display);
  font-size: 2.55rem;
  line-height: 1;
}

.hero-summary {
  max-width: 680px;
  color: var(--bone);
  font-size: 1.18rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0;
}

.button.secondary {
  background: rgba(13, 14, 16, 0.52);
  color: var(--paper);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.channel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.channel-stats div {
  min-width: 112px;
  padding: 12px 14px;
  border: 2px solid rgba(241, 240, 232, 0.2);
  border-radius: 6px;
  background: rgba(13, 14, 16, 0.52);
}

.channel-stats dt {
  color: var(--fog);
  font-size: 0.78rem;
}

.channel-stats dd {
  margin: 0;
  color: var(--white);
  font-family: var(--font-mono);
}

.health-panel {
  position: absolute;
  right: var(--page-pad);
  bottom: 28px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(160px, 280px);
  gap: 10px 12px;
  align-items: center;
  color: var(--paper);
}

.heart-row {
  color: var(--heart);
  font-family: var(--font-pixel);
  font-size: 0.9rem;
}

.health-bar {
  height: 24px;
  border: 4px solid var(--paper);
  background: rgba(241, 240, 232, 0.14);
}

.health-bar span {
  display: block;
  width: 32%;
  height: 100%;
  background: var(--heart);
}

.health-label {
  grid-column: 1 / -1;
  color: var(--bone);
  text-align: right;
}

.band {
  padding: 86px var(--page-pad);
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.split-layout,
.join-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  gap: 48px;
  align-items: center;
}

.current-band,
.join-band {
  background: var(--paper);
  color: var(--ink);
}

.campaign-band {
  background: var(--stone);
}

.archive-band {
  background: var(--ink);
}

.section-heading,
.archive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 34px;
}

.feature-episode {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: center;
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
  box-shadow: 10px 10px 0 var(--heart);
}

.feature-episode img,
.episode-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--ink);
}

.feature-episode a,
.episode-card a {
  font-family: var(--font-mono);
  color: var(--heart-dark);
  text-transform: uppercase;
  text-decoration-thickness: 2px;
}

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

.campaign-card,
.episode-card,
.join-actions a {
  border: 2px solid rgba(241, 240, 232, 0.24);
  border-radius: 8px;
  background: rgba(241, 240, 232, 0.06);
}

.campaign-card {
  min-height: 270px;
  padding: 26px;
  display: grid;
  align-content: space-between;
}

.campaign-card:nth-child(1) {
  border-color: var(--mana-blue);
}

.campaign-card:nth-child(2) {
  border-color: var(--loot-gold);
}

.campaign-card:nth-child(3) {
  border-color: var(--arcane);
}

.campaign-index {
  color: var(--heart);
  font-family: var(--font-pixel);
  font-size: 0.72rem;
}

.archive-toolbar {
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-button {
  cursor: pointer;
  background: transparent;
  color: var(--paper);
}

.filter-button.active,
.filter-button:hover,
.filter-button:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

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

.episode-card {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.episode-card h3 {
  min-height: 58px;
  font-size: 1.45rem;
}

.episode-meta {
  color: var(--fog);
  font-size: 0.9rem;
}

.episode-labels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.episode-labels span {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(241, 240, 232, 0.12);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.join-layout p {
  font-size: 1.1rem;
}

.join-actions {
  display: grid;
  gap: 14px;
}

.join-actions a {
  min-height: 96px;
  padding: 22px;
  color: var(--paper);
  text-decoration: none;
  background: var(--stone);
}

.join-actions a:hover,
.join-actions a:focus-visible {
  border-color: var(--heart);
}

.join-actions span {
  display: block;
  color: var(--heart);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.join-actions strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px var(--page-pad);
  color: var(--fog);
  border-top: 1px solid rgba(241, 240, 232, 0.12);
}

.pixel-word {
  color: var(--paper);
  font-family: var(--font-pixel);
  font-size: 0.78rem;
}

.pixel-word span {
  color: var(--heart);
}

.site-footer p {
  margin: 0;
  text-align: right;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: start;
    order: 3;
  }

  .hero {
    min-height: 650px;
  }

  h1 {
    font-size: 2.7rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .hero-line {
    font-size: 2.35rem;
  }

  .hero-media {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-media img:first-child {
    grid-column: 1 / span 2;
    grid-row: 1;
  }

  .health-panel {
    left: var(--page-pad);
    right: var(--page-pad);
  }

  .health-label {
    text-align: left;
  }

  .split-layout,
  .join-layout,
  .campaign-grid,
  .episode-grid {
    grid-template-columns: 1fr;
  }

  .feature-episode {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .archive-toolbar,
  .site-footer {
    display: grid;
  }

  .filter-group {
    justify-content: start;
  }

  .site-footer p {
    text-align: left;
  }
}

@media (max-width: 620px) {
  :root {
    --page-pad: 18px;
  }

  .header-action {
    display: none;
  }

  .nav-links a {
    padding: 0 10px;
  }

  .hero {
    min-height: 660px;
    padding-top: 62px;
  }

  h1 {
    font-size: 1.45rem;
    line-height: 1.35;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-line {
    font-size: 1.65rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .hero-copy {
    width: calc(100vw - 36px);
    max-width: 100%;
  }

  .hero-copy,
  .hero-summary,
  .hero-copy h1,
  .hero-line,
  .health-panel {
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  .hero-actions {
    gap: 10px;
  }

  .button {
    padding: 0 12px;
    font-size: 0.7rem;
  }

  .health-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .health-bar {
    min-width: 0;
    width: 100%;
  }

  .channel-stats div {
    min-width: 96px;
  }

  .band {
    padding-block: 64px;
  }

  .join-actions strong {
    font-size: 1.5rem;
  }
}
