:root {
  color-scheme: dark;
  --bg: #121512;
  --bg-deep: #080b0a;
  --panel: #1c211d;
  --panel-strong: #263027;
  --line: #4f5d4f;
  --line-bright: #86cfcf;
  --text: #f4f0df;
  --muted: #c6bda3;
  --rust: #b76435;
  --rust-dark: #6f3d24;
  --amber: #f1b35b;
  --cyan: #59d8df;
  --green: #83f28f;
  --danger: #e25f3d;
  --shadow: rgba(0, 0, 0, 0.42);
  --max: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(8, 11, 10, 0.9), rgba(18, 21, 18, 1)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 72px),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 12px 28px;
  background: rgba(8, 11, 10, 0.78);
  border-bottom: 1px solid rgba(134, 207, 207, 0.22);
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.brand-mark span {
  font-size: 1rem;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--text);
  background: rgba(89, 216, 223, 0.12);
  outline: none;
}

.site-nav .nav-cta {
  color: #08120f;
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(131, 242, 143, 0.25), 0 12px 28px rgba(0, 0, 0, 0.25);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  color: #08120f;
  background: #a1ffab;
}

.language-picker {
  position: relative;
  display: inline-block;
}

.language-toggle {
  min-height: 42px;
  min-width: 166px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid rgba(134, 207, 207, 0.35);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(38, 48, 39, 0.96), rgba(18, 21, 18, 0.96));
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: var(--cyan);
  outline: none;
  box-shadow: 0 0 0 3px rgba(89, 216, 223, 0.22);
}

.language-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: none;
  width: max-content;
  min-width: 210px;
  padding: 6px;
  border: 1px solid rgba(134, 207, 207, 0.35);
  border-radius: var(--radius);
  background: rgba(8, 11, 10, 0.98);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.52);
}

.language-picker.is-open .language-menu {
  display: grid;
  gap: 4px;
}

.language-menu button {
  min-height: 38px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.language-menu button:hover,
.language-menu button:focus-visible,
.language-menu button[aria-selected="true"] {
  color: #08120f;
  background: var(--green);
  outline: none;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(134, 207, 207, 0.35);
  border-radius: var(--radius);
  background: rgba(18, 21, 18, 0.82);
  color: var(--text);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  content: "";
}

.menu-toggle-lines::before {
  transform: translateY(-7px);
}

.menu-toggle-lines::after {
  transform: translateY(5px);
}

.hero {
  position: relative;
  min-height: min(780px, 88vh);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 126px 28px 86px;
  background: var(--bg-deep);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 10, 0.94) 0%, rgba(8, 11, 10, 0.62) 43%, rgba(8, 11, 10, 0.22) 100%),
    linear-gradient(180deg, rgba(8, 11, 10, 0) 50%, rgba(18, 21, 18, 0.96) 100%),
    image-set(
      url("assets/steam/library_hero.webp") type("image/webp"),
      url("assets/steam/library_hero.png") type("image/png")
    ) center / cover no-repeat;
}

.hero-content {
  position: relative;
  width: min(100%, var(--max));
  margin: 0 auto;
}

.hero-logo {
  width: min(440px, 78vw);
  height: auto;
  margin: 0 0 18px -18px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.58));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 4.35rem;
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.65rem;
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 690px;
  color: #efe6cc;
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  text-decoration: none;
}

.button-primary {
  color: #08120f;
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(131, 242, 143, 0.35), 0 20px 36px rgba(0, 0, 0, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #a1ffab;
  outline: none;
}

.button-secondary {
  color: var(--text);
  border-color: rgba(134, 207, 207, 0.45);
  background: rgba(18, 21, 18, 0.58);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--cyan);
  background: rgba(89, 216, 223, 0.12);
  outline: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 42px 0 0;
}

.hero-stats div,
.feature-card,
.roster-card,
.access-list div,
.enemy-lineup figure,
.media-grid figure {
  border: 1px solid rgba(134, 207, 207, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(38, 48, 39, 0.94), rgba(28, 33, 29, 0.94)),
    var(--panel);
  box-shadow: 0 18px 34px var(--shadow);
}

.hero-stats div {
  padding: 14px 16px;
}

.hero-stats dt {
  color: var(--amber);
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

.hero-stats dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-strip {
  border-block: 1px solid rgba(134, 207, 207, 0.2);
  background:
    linear-gradient(90deg, rgba(111, 61, 36, 0.5), rgba(89, 216, 223, 0.15), rgba(38, 48, 39, 0.8)),
    #202118;
}

.summary-inner {
  width: min(100%, var(--max));
  min-height: 58px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto;
  padding: 10px 28px;
}

.summary-inner span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(241, 179, 91, 0.3);
  border-radius: var(--radius);
  color: #f7e7c9;
  background: rgba(8, 11, 10, 0.34);
  font-size: 0.9rem;
  font-weight: 800;
}

.section {
  padding: 92px 28px;
}

.section-alt {
  background:
    linear-gradient(180deg, rgba(111, 61, 36, 0.18), rgba(8, 11, 10, 0)),
    rgba(8, 11, 10, 0.2);
}

.section-heading,
.section > .gameplay-grid,
.battlefield-showcase,
.roster-grid,
.enemy-lineup,
.early-access-layout,
.media-grid,
.final-cta {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.section-heading {
  max-width: 770px;
  margin-bottom: 36px;
  text-align: center;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section-heading.compact {
  max-width: 720px;
}

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

.feature-card {
  padding: 24px;
}

.feature-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-card p,
.roster-card p,
.battlefield-copy p,
.early-access-layout p,
.access-list span {
  color: var(--muted);
}

.battlefield-showcase {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: center;
  margin-top: 54px;
}

.battlefield-copy {
  max-width: 480px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: #f2e5c9;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.08em;
  color: var(--green);
  font-weight: 900;
  content: "+";
}

.battlefield-panel {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(134, 207, 207, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(18, 21, 18, 0.1), rgba(8, 11, 10, 0.45)),
    #242117;
  box-shadow: inset 0 0 0 2px rgba(8, 11, 10, 0.6), 0 24px 50px rgba(0, 0, 0, 0.35);
}

.tile-field {
  position: absolute;
  inset: 0;
  background-image:
    url("assets/tiles/props/scrap_pile_01.png"),
    url("assets/tiles/props/power_conduit_01.png"),
    url("assets/tiles/terrain/terrain_tile_09.png"),
    url("assets/tiles/terrain/terrain_tile_01.png");
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-position: 9% 76%, 84% 25%, 0 0, 52px 52px;
  background-size: 92px 92px, 88px 88px, 86px 86px, 86px 86px;
  opacity: 0.72;
  image-rendering: pixelated;
}

.battle-sprite {
  position: absolute;
  z-index: 4;
  width: 86px;
  height: 86px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.48));
}

.battle-sprite.core {
  left: 50%;
  top: 46%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
}

.tower-a {
  left: 28%;
  top: 26%;
}

.tower-b {
  left: 42%;
  top: 21%;
}

.tower-c {
  left: 36%;
  top: 60%;
}

.tower-d {
  left: 61%;
  top: 61%;
}

.enemy-a {
  left: 79%;
  top: 54%;
}

.enemy-b {
  left: 74%;
  top: 31%;
}

.enemy-c {
  left: 15%;
  top: 54%;
}

.power-link,
.conduit {
  position: absolute;
  z-index: 3;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(89, 216, 223, 0.85), 0 0 3px #fff;
  transform-origin: left center;
}

.link-a {
  left: 38%;
  top: 39%;
  width: 150px;
  transform: rotate(10deg);
}

.link-b {
  left: 43%;
  top: 63%;
  width: 156px;
  transform: rotate(-24deg);
}

.link-c {
  left: 52%;
  top: 57%;
  width: 138px;
  transform: rotate(29deg);
}

.conduit {
  z-index: 2;
  height: 12px;
  background: rgba(241, 179, 91, 0.45);
  box-shadow: inset 0 0 0 2px rgba(8, 11, 10, 0.48);
}

.conduit-a {
  left: 5%;
  top: 66%;
  width: 310px;
  transform: rotate(-8deg);
}

.conduit-b {
  left: 58%;
  top: 34%;
  width: 250px;
  transform: rotate(12deg);
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.roster-card {
  min-height: 295px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px 20px;
  text-align: center;
}

.roster-card img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  margin-bottom: 16px;
  image-rendering: pixelated;
}

.roster-card h3 {
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roster-card p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.enemies-section {
  padding-top: 78px;
}

.enemy-lineup {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.enemy-lineup figure {
  margin: 0;
  padding: 16px 10px 14px;
  text-align: center;
}

.enemy-lineup img {
  width: 94px;
  height: 94px;
  object-fit: contain;
  margin: 0 auto 8px;
  image-rendering: pixelated;
}

.enemy-lineup figcaption {
  color: #f6e7c7;
  font-size: 0.86rem;
  font-weight: 900;
}

.early-access-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
}

.early-access-layout > div:first-child {
  max-width: 530px;
}

.access-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.access-list div {
  min-height: 142px;
  padding: 20px;
}

.access-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 1.15rem;
}

.access-list span {
  display: block;
}

.media-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.72fr;
  gap: 16px;
  align-items: stretch;
}

.media-grid figure {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  overflow: hidden;
}

.media-grid picture {
  display: block;
  width: 100%;
  height: 100%;
}

.media-grid img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.media-grid figcaption {
  padding: 12px 14px;
  color: var(--muted);
  border-top: 1px solid rgba(134, 207, 207, 0.22);
  font-size: 0.88rem;
  font-weight: 800;
}

.media-feature {
  grid-row: span 2;
}

.final-cta {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 74px 28px;
}

.final-cta h2 {
  max-width: 720px;
  margin: 0;
}

.site-footer {
  min-height: 72px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  color: var(--muted);
  border-top: 1px solid rgba(134, 207, 207, 0.2);
  background: var(--bg-deep);
}

.site-footer span {
  margin-right: auto;
}

.site-footer a {
  color: var(--cyan);
  font-weight: 900;
  text-decoration: none;
}

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

@media (max-width: 1060px) {
  h1 {
    font-size: 3.45rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .gameplay-grid,
  .battlefield-showcase,
  .early-access-layout {
    grid-template-columns: 1fr;
  }

  .battlefield-copy,
  .early-access-layout > div:first-child {
    max-width: 720px;
  }

  .roster-grid,
  .enemy-lineup {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .media-grid {
    grid-template-columns: 1fr 1fr;
  }

  .media-feature {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  .site-header {
    padding-inline: 16px;
  }

  .header-actions {
    gap: 8px;
  }

  .language-toggle {
    width: 118px;
    min-width: 118px;
    min-height: 46px;
    padding-inline: 10px;
    font-size: 0.82rem;
  }

  .language-toggle span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .language-menu {
    min-width: 190px;
  }

  .brand-mark span {
    font-size: 0.92rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid rgba(134, 207, 207, 0.25);
    border-radius: var(--radius);
    background: rgba(8, 11, 10, 0.96);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.45);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: 84vh;
    padding-inline: 20px;
    padding-bottom: 64px;
  }

  .hero-backdrop {
    background:
      linear-gradient(180deg, rgba(8, 11, 10, 0.88), rgba(8, 11, 10, 0.55) 48%, rgba(18, 21, 18, 0.98) 100%),
      image-set(
        url("assets/steam/library_hero.webp") type("image/webp"),
        url("assets/steam/library_hero.png") type("image/png")
      ) center / cover no-repeat;
  }

  .hero-logo {
    width: min(330px, 88vw);
    margin-left: -12px;
  }

  h1 {
    font-size: 2.62rem;
  }

  h2 {
    font-size: 1.92rem;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .hero-stats,
  .access-list,
  .media-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 70px 20px;
  }

  .summary-inner {
    padding-inline: 20px;
  }

  .battlefield-panel {
    min-height: 360px;
  }

  .battle-sprite {
    width: 72px;
    height: 72px;
  }

  .battle-sprite.core {
    width: 98px;
    height: 98px;
  }

  .roster-grid,
  .enemy-lineup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .media-feature {
    grid-column: auto;
  }

  .final-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 58px 20px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-inline: 20px;
  }
}

@media (max-width: 520px) {
  .brand-mark img {
    width: 40px;
    height: 40px;
  }

  .brand-mark span {
    max-width: 180px;
    white-space: normal;
    line-height: 1.1;
  }

  h1 {
    font-size: 2.25rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-stats,
  .access-list,
  .media-grid,
  .roster-grid,
  .enemy-lineup {
    grid-template-columns: 1fr;
  }

  .roster-card {
    min-height: 250px;
  }

  .battlefield-panel {
    min-height: 310px;
  }

  .battle-sprite {
    width: 60px;
    height: 60px;
  }

  .battle-sprite.core {
    width: 82px;
    height: 82px;
  }

  .enemy-a,
  .enemy-b {
    left: 72%;
  }
}
