/* Page styles for games.casazium.com (Casazium Tank Command).

   The shell - fonts, color tokens, header, footer - comes from
   shared/styles/shell.css, which casazium.com and docs.casazium.com also
   load; this file only adds what is specific to this page, and it follows
   the redesign's design system (design/casazium-homepage-handoff/
   DESIGN-SYSTEM.md) rather than inventing a second one: the paper ground,
   the 1120px column, hairline rules, alternating paper-2 bands, the
   ink-filled primary button, mono eyebrows and meta lines, and the same
   type scale the homepage's hero uses.

   One accent, --accent (#1f5c3d): the design bundle's own accent mark
   color, which reads as the game's olive-green at 7.3:1 on paper. It marks
   the matched download and the seed value, nothing decorative. The bright
   selection-ring green from the screenshots is deliberately NOT used as
   ink - it is 1.5:1 on paper, unreadable as text. The game supplies its
   color through the screenshots themselves.

   An earlier revision of this page sat on the dark ground; it was switched
   to paper (operator decision, 2026-09-18) because side by side with
   casazium.com it read as a different site. */

:root {
  --accent: #1f5c3d;
  --accent-soft: #eef3ef; /* matched-download card fill, a tint of the above */
}

html {
  background-color: var(--cz-paper);
}

body {
  margin: 0;
  background-color: var(--cz-paper);
  color: var(--cz-ink-2);
  font-family: var(--cz-font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Skip link: off-screen until focused. Same behaviour as the website's
   (website/src/index.css), restated here because this page does not build
   with Tailwind. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--cz-ink);
  color: var(--cz-paper);
  padding: 10px 16px;
  font-weight: 500;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* Body links: ink with an underline, which in a near-monochrome design is
   the only thing distinguishing a link from bold text (design.tsx's
   inlineLink). */
a {
  color: var(--cz-ink);
  text-decoration: underline;
  text-decoration-color: var(--cz-rule-strong);
  text-underline-offset: 4px;
}
a:hover {
  color: var(--cz-ink-3);
}

main a:focus-visible,
main button:focus-visible {
  outline: 2px solid var(--cz-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.column {
  margin: 0 auto;
  max-width: 1120px;
  padding: 0 24px;
}
.column.narrow > * {
  max-width: 68ch;
}

h1,
h2,
h3,
h4 {
  color: var(--cz-ink);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Hero scale from the homepage's own h1 (website/src/pages/Home.tsx). */
h1 {
  font-size: clamp(38px, 6.2vw, 72px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 15ch;
  margin: 28px 0 0;
}

/* Section headings sit on the page's one full-strength rule, exactly as
   SectionHeader does on casazium.com. */
h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.5;
  border-bottom: 1px solid var(--cz-ink);
  padding-bottom: 14px;
  margin-bottom: 36px;
}

h3 {
  font-size: 19px;
  font-weight: 600;
}

h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

p {
  margin: 0 0 18px;
  text-wrap: pretty;
}

code {
  font-family: var(--cz-font-mono);
  font-size: 0.92em;
}

.eyebrow {
  font-family: var(--cz-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cz-muted);
}

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

.hero {
  padding: 72px 0 8px;
}

.lede {
  max-width: 60ch;
  margin-top: 28px;
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.55;
  color: var(--cz-ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

/* Mono meta line under the buttons, the same treatment the homepage gives
   its price line. */
.hero-note {
  margin-top: 22px;
  font-family: var(--cz-font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--cz-ink-3);
  max-width: 78ch;
}

.hero-figure {
  margin: 44px 0 0;
}

figure {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ---- buttons --------------------------------------------------------- */

.button-primary,
.button-secondary {
  display: inline-block;
  white-space: nowrap;
  border-radius: 4px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.button-primary {
  background-color: var(--cz-ink);
  color: var(--cz-on-dark);
  border: 1px solid var(--cz-ink);
}
.button-primary:hover {
  background-color: var(--cz-ink-2);
  border-color: var(--cz-ink-2);
  color: var(--cz-on-dark);
}

.button-secondary {
  border: 1px solid var(--cz-rule-strong);
  color: var(--cz-ink);
}
.button-secondary:hover {
  color: var(--cz-ink-3);
  border-color: var(--cz-rule-strong);
}

/* ---- sections -------------------------------------------------------- */

.band {
  padding: 72px 0 0;
}

.band:last-of-type {
  padding-bottom: 88px;
}

/* Alternating band, as on the homepage's positioning strip. */
.band-alt {
  margin-top: 72px;
  padding: 72px 0;
  border-top: 1px solid var(--cz-rule);
  border-bottom: 1px solid var(--cz-rule);
  background-color: var(--cz-paper-2);
}

.section-note {
  color: var(--cz-ink-3);
  margin-top: -18px;
  margin-bottom: 28px;
}

/* ---- screenshots ----------------------------------------------------- */

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

.shots img {
  border: 1px solid var(--cz-rule);
}

.shots figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cz-ink-3);
}

.shots figcaption code {
  color: var(--accent);
  font-weight: 500;
}

/* ---- how it works ---------------------------------------------------- */

.how {
  margin: 0;
}

.how > div {
  padding: 18px 0;
  border-top: 1px solid var(--cz-rule);
}
.how > div:first-child {
  border-top: 0;
  padding-top: 0;
}

.how dt {
  color: var(--cz-ink);
  font-weight: 600;
  margin-bottom: 6px;
}

.how dd {
  margin: 0;
  color: var(--cz-ink-2);
}

/* ---- controls -------------------------------------------------------- */

.controls {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--cz-font-mono);
  font-size: 14px;
}

.controls th,
.controls td {
  text-align: left;
  padding: 11px 0;
  border-bottom: 1px solid var(--cz-rule);
  vertical-align: top;
}

.controls thead th {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cz-muted);
  font-weight: 500;
  border-bottom-color: var(--cz-rule-strong);
}

.controls tbody th {
  color: var(--cz-ink);
  font-weight: 500;
  white-space: nowrap;
  padding-right: 24px;
  width: 1%;
}

.controls td {
  color: var(--cz-ink-2);
  font-family: var(--cz-font-sans);
}

.controls-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--cz-ink-3);
}

.controls-note strong {
  color: var(--cz-ink);
  font-weight: 500;
}

/* ---- downloads ------------------------------------------------------- */

.downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dl {
  border: 1px solid var(--cz-rule);
  background-color: var(--cz-paper-3);
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* The script marks the visitor's own platform. Everything stays visible and
   fully usable either way - this only adds emphasis, and it is the one
   place the accent color is used as a surface. */
.dl.is-match {
  border-color: var(--accent);
  background-color: var(--accent-soft);
}

.dl-head h3 {
  margin: 0;
}

.dl-meta {
  display: block;
  margin-top: 4px;
  font-family: var(--cz-font-mono);
  font-size: 12px;
  color: var(--cz-muted);
}

.dl-button {
  align-self: flex-start;
}

/* Only the matched card gets the filled button; the others stay outlined,
   so one obvious action reads first without the other two being hidden. */
.dl:not(.is-match) .dl-button {
  background-color: transparent;
  color: var(--cz-ink);
  border-color: var(--cz-rule-strong);
}
.dl:not(.is-match) .dl-button:hover {
  background-color: transparent;
  border-color: var(--cz-ink-3);
  color: var(--cz-ink-3);
}

.dl.is-match .dl-button {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--cz-on-dark);
}
.dl.is-match .dl-button:hover {
  background-color: #17472e;
  border-color: #17472e;
  color: var(--cz-on-dark);
}

.dl-sum {
  margin-top: auto;
}

.dl-sum-label {
  display: block;
  font-family: var(--cz-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cz-muted);
  margin-bottom: 4px;
}

.dl-sum code {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--cz-ink-3);
  word-break: break-all;
}

.checksum-note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--cz-ink-3);
  max-width: 78ch;
}

.checksum-note code {
  color: var(--cz-ink-2);
  word-break: break-all;
}

/* ---- unsigned-build help --------------------------------------------- */

.unsigned {
  margin-top: 34px;
  border: 1px solid var(--cz-rule-strong);
  border-radius: 8px;
  padding: 26px;
  background-color: var(--cz-paper-3);
}

.unsigned h3 {
  margin-bottom: 10px;
}

.unsigned p {
  max-width: 78ch;
}

.unsigned-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.unsigned-grid p {
  font-size: 15px;
  margin-bottom: 10px;
}

/* Terminal lines use the same ink panel the homepage's code column does,
   rather than a grey box. */
.unsigned pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: 6px;
  background-color: var(--cz-ink);
  overflow-x: auto;
}

.unsigned pre code {
  color: var(--cz-on-dark-2);
  font-size: 13px;
}

/* ---- known limits ---------------------------------------------------- */

.limits {
  margin: 0 0 22px;
  padding-left: 20px;
}

.limits li {
  margin-bottom: 8px;
}

.limits li::marker {
  color: var(--cz-muted);
}

.closing {
  color: var(--cz-ink-3);
}

/* ---- narrow screens -------------------------------------------------- */

@media (max-width: 860px) {
  .shots,
  .downloads,
  .unsigned-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 48px;
  }
  .band {
    padding-top: 56px;
  }
  .band-alt {
    margin-top: 56px;
    padding: 56px 0;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .button-primary,
  .button-secondary {
    white-space: normal;
  }
}
