:root {
  color-scheme: dark;
  --bg: #070a11;
  --panel: #101522;
  --panel-2: #171f31;
  --text: #f6f2dd;
  --muted: #b7c0d5;
  --line: rgba(255, 255, 255, .16);
  --yellow: #ffd35a;
  --green: #58d36b;
  --red: #f4544c;
  --cyan: #70d7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(112, 215, 255, .08), transparent 420px),
    radial-gradient(circle at 70% 10%, rgba(244, 84, 76, .16), transparent 360px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, .25);
  padding: .1rem .35rem;
  color: var(--cyan);
  font-size: .92em;
}

.page-top {
  height: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  background: rgba(7, 10, 17, .74);
  backdrop-filter: blur(14px);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.brand,
.nav,
.header-tools,
.language-switch {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: url("/img/tankblaster-icon.png") center / contain no-repeat;
  image-rendering: pixelated;
  box-shadow: 0 0 0 2px rgba(255, 211, 90, .28), 0 8px 18px rgba(0, 0, 0, .34);
}

.nav {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-tools {
  gap: 12px;
  justify-content: flex-end;
}

.nav a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}

.language-switch {
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  padding: 4px;
}

.language-switch a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border-radius: 999px;
  font-size: 1.05rem;
  text-decoration: none;
}

.language-switch a:hover,
.language-switch a:focus-visible,
.language-switch a.is-active {
  background: rgba(255, 211, 90, .18);
}

.hero,
.download-band,
.install-help-section,
.changelog-section,
.intro-section,
.gallery,
.remake-section,
.credits-section,
.retro-section,
.legal-page,
.site-footer {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: 42px 0 70px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  display: grid;
  gap: .04em;
  max-width: 13ch;
  font-size: clamp(3.1rem, 9vw, 7.4rem);
  text-transform: uppercase;
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(1.95rem, 4.4vw, 3.75rem);
}

h3 {
  color: var(--yellow);
  font-size: 1.22rem;
}

.lede {
  max-width: 58ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

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

.button,
.support-button,
.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 900;
  text-decoration: none;
}

.play-now {
  gap: 8px;
}

.play-count {
  border-radius: 999px;
  background: rgba(23, 18, 6, .14);
  padding: 3px 8px;
  font-size: .78rem;
  line-height: 1.2;
}

.button.primary,
.support-button {
  background: var(--yellow);
  color: #171206;
  box-shadow: 0 14px 34px rgba(255, 211, 90, .22);
}

.button.secondary,
.inline-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .07);
  color: var(--text);
}

.hero-art {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #05070b;
  box-shadow: var(--shadow);
}

.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hero-art figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: min(360px, calc(100% - 24px));
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  background: rgba(7, 10, 17, .76);
  padding: 8px 10px;
  color: var(--muted);
  font-size: .8rem;
}

.download-band,
.install-help-section,
.changelog-section,
.remake-section,
.credits-section,
.retro-section {
  padding: clamp(42px, 7vw, 86px) 0;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

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

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

.download-card {
  display: grid;
  gap: 8px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  padding: 18px;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.download-card:hover,
.download-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 211, 90, .7);
  background: linear-gradient(180deg, rgba(255, 211, 90, .16), rgba(255, 255, 255, .05));
}

.download-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid #05070b;
  border-radius: 8px;
  background: var(--green);
  color: #061009;
  font-size: .82rem;
  font-weight: 1000;
  box-shadow: inset 0 -7px rgba(0, 0, 0, .18);
}

.download-card strong {
  font-size: 1.14rem;
}

.download-card > span:not(.download-icon):not(.download-count):not(.download-version) {
  color: var(--muted);
}

.download-version {
  color: var(--yellow);
  font-size: .9rem;
  font-weight: 900;
}

.download-count {
  align-self: end;
  width: fit-content;
  margin-top: 2px;
  border: 1px solid rgba(112, 215, 255, .34);
  border-radius: 999px;
  background: rgba(112, 215, 255, .1);
  padding: 4px 9px;
  color: var(--cyan);
  font-size: .8rem;
  font-weight: 900;
  line-height: 1.2;
}

.trust-note {
  margin-top: 14px;
  border: 1px solid rgba(112, 215, 255, .26);
  border-radius: 8px;
  background: rgba(112, 215, 255, .07);
  padding: 14px 16px;
}

.trust-note strong {
  display: block;
  color: var(--cyan);
  font-size: .96rem;
}

.trust-note p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.support-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  border: 1px solid rgba(255, 211, 90, .34);
  border-radius: 8px;
  background: rgba(255, 211, 90, .08);
  padding: 16px;
}

.support-actions {
  display: grid;
  gap: 10px;
  min-width: min(100%, 240px);
}

.support-button.paypal {
  background: var(--cyan);
  color: #06131b;
  box-shadow: 0 14px 34px rgba(112, 215, 255, .18);
}

.support-row p {
  margin: 0;
  color: var(--muted);
}

.install-help-section {
  padding-bottom: clamp(22px, 4vw, 48px);
}

.install-help-list {
  display: grid;
  gap: 10px;
}

.install-help-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  overflow: hidden;
}

.install-help-item[open] {
  border-color: rgba(255, 211, 90, .44);
  background:
    linear-gradient(135deg, rgba(255, 211, 90, .09), rgba(112, 215, 255, .06)),
    var(--panel);
}

.install-help-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
  color: var(--text);
  cursor: pointer;
  font-weight: 1000;
  list-style: none;
}

.install-help-item summary::-webkit-details-marker {
  display: none;
}

.install-help-item summary::after {
  content: "+";
  color: var(--cyan);
  font-size: 1.35rem;
  line-height: 1;
}

.install-help-item[open] summary::after {
  content: "-";
}

.install-help-copy {
  border-top: 1px solid var(--line);
  padding: 16px 18px 18px;
}

.install-help-copy p,
.install-help-copy li {
  color: var(--muted);
}

.install-help-copy p {
  margin: 0;
}

.install-help-copy ol {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding-left: 1.25rem;
}

.install-help-copy li::marker {
  color: var(--yellow);
  font-weight: 900;
}

.changelog-section {
  padding-top: clamp(20px, 4vw, 48px);
}

.changelog-section .section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.changelog-section .section-heading p {
  margin: 0;
}

.changelog-section .section-heading a {
  color: var(--cyan);
  font-weight: 800;
}

.changelog-panel {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(112, 215, 255, .3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(112, 215, 255, .1), rgba(255, 211, 90, .06)),
    var(--panel);
  padding: clamp(16px, 3vw, 24px);
  box-shadow: 0 18px 56px rgba(0, 0, 0, .28);
}

.changelog-status {
  margin: 0;
  color: var(--muted);
}

.changelog-release {
  display: grid;
  gap: 18px;
}

.changelog-release h3 {
  color: var(--text);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.changelog-release h4 {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: .95rem;
}

.changelog-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 800;
}

.changelog-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.changelog-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.changelog-group ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.changelog-group li::marker {
  color: var(--cyan);
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(44px, 7vw, 100px) 0;
}

.text-stack p {
  color: var(--muted);
  font-size: 1.06rem;
}

.intro-visual {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.intro-visual figcaption {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  padding: 14px 16px;
  color: var(--muted);
  font-size: .95rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 0 clamp(44px, 7vw, 100px);
}

.gallery figure,
.retro-logo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: .94rem;
}

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

.story-grid article {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.story-grid p {
  color: var(--muted);
}

.inline-link {
  margin-top: 18px;
}

.ai-sign {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 780px;
  margin-top: 18px;
  border: 1px solid rgba(88, 211, 107, .34);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(88, 211, 107, .13), rgba(112, 215, 255, .07)),
    var(--panel);
  padding: 16px;
}

.ai-sign-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid #07100b;
  border-radius: 8px;
  background: var(--green);
  color: #061009;
  font-weight: 1000;
  box-shadow: inset 0 -7px rgba(0, 0, 0, .18);
}

.ai-sign strong {
  display: block;
  color: var(--green);
  font-size: 1rem;
}

.ai-sign p {
  margin: 4px 0 0;
  color: var(--muted);
}

.credits-card {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr);
  gap: clamp(22px, 5vw, 58px);
  border: 1px solid rgba(112, 215, 255, .28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(112, 215, 255, .13), rgba(255, 211, 90, .08)),
    var(--panel);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.credits-card h2 {
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}

.credits-copy {
  display: grid;
  gap: 14px;
}

.credits-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.retro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr);
  gap: clamp(22px, 5vw, 58px);
  align-items: center;
}

.retro-copy p {
  color: var(--muted);
}

.retro-logo {
  padding: 20px;
}

.legal-page {
  padding: clamp(44px, 7vw, 92px) 0;
}

.legal-content {
  max-width: 860px;
}

.legal-content h1 {
  display: block;
  max-width: none;
  margin-bottom: 28px;
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.legal-content h2 {
  margin-top: 34px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content a {
  color: var(--cyan);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 28px 0 38px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--cyan);
}

@media (max-width: 980px) {
  .hero,
  .intro-section,
  .credits-card,
  .retro-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    max-width: 12ch;
  }

  .download-grid,
  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-tools {
    align-items: flex-start;
    flex-direction: column-reverse;
    width: 100%;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav a {
    padding-inline: 8px;
  }

  .hero,
    .download-band,
    .install-help-section,
    .changelog-section,
    .intro-section,
    .gallery,
    .remake-section,
    .credits-section,
    .retro-section,
    .legal-page,
    .site-footer {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.2rem);
  }

  .download-grid,
  .story-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .support-row,
  .ai-sign,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-art figcaption {
    position: static;
    max-width: none;
    border-width: 1px 0 0;
    border-radius: 0;
    background: rgba(255, 255, 255, .05);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
