/* site.css – Website (Issue #65): Pixel-Look wie Spiel, Leitfaden und Roadmap; schnell, ohne Skripte */

@font-face {
  font-family: 'Pixelify Sans';
  src: url('/site/fonts/pixelify-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Pixelify Sans';
  src: url('/site/fonts/pixelify-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('/site/fonts/outfit.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #2b1d14;
  --wood: #5b3a22;
  --wood-dark: #3f2716;
  --parchment: #f4e4c1;
  --parchment-dim: #c9b38a;
  --gold: #f2c14e;
  --grass: #2c4220;
  --pixel: 'Pixelify Sans', ui-monospace, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--grass);
  background-image: linear-gradient(rgb(28 44 20 / 0.78), rgb(28 44 20 / 0.78)), url('/sprites/tiles/grass0.png');
  background-size:
    auto,
    64px 64px;
  color: var(--parchment);
  font:
    17px/1.6 'Outfit',
    system-ui,
    sans-serif;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

a {
  color: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--pixel);
  color: var(--gold);
  line-height: 1.2;
}

h2 {
  margin: 0 0 20px;
  font-size: 1.8rem;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
}

/* ---------- Kopfzeile ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--wood-dark);
  border-bottom: 4px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font: 700 1.3rem var(--pixel);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--pixel);
}

.nav a:not(.btn) {
  color: var(--parchment);
  text-decoration: none;
}

.nav a:not(.btn):hover {
  color: var(--gold);
}

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 3px solid var(--ink);
  background: var(--gold);
  color: var(--ink);
  font: 700 1.1rem var(--pixel);
  text-decoration: none;
  box-shadow: 4px 4px 0 rgb(0 0 0 / 0.4);
}

.btn:hover {
  background: #ffd76a;
}

.btn:active {
  translate: 2px 2px;
  box-shadow: 2px 2px 0 rgb(0 0 0 / 0.4);
}

.btn-ghost {
  background: var(--wood);
  color: var(--parchment);
}

.btn-ghost:hover {
  background: #6d4629;
}

.btn-small {
  padding: 4px 12px;
  font-size: 0.95rem;
}

/* ---------- Abschnitte ---------- */

main > section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 16px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  text-shadow: 4px 4px 0 var(--ink);
}

.tagline {
  margin: 4px 0 16px;
  font: 700 1.35rem var(--pixel);
  color: var(--parchment);
}

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

.fine {
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

.hero-board {
  margin: 0;
  justify-self: center;
}

.hero-board img,
.feature-art,
.shots img {
  display: block;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 rgb(0 0 0 / 0.4);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature {
  padding: 16px;
  background: var(--wood);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 0.35);
}

.feature h3 {
  margin: 14px 0 6px;
  font-size: 1.2rem;
}

.feature p {
  margin: 0;
}

/* Wo spielen (Issue #78): Knopf unten in der Kachel, Kacheln gleich hoch */
.where .feature {
  display: flex;
  flex-direction: column;
}

.where .feature h3 {
  margin-top: 0;
}

.where .where-action {
  margin-top: auto;
  padding-top: 16px;
}

.feature-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Kachel aus Figuren statt Bild (Feldzüge, Profilbilder) */
.sprites {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #3b5a2a url('/sprites/tiles/grass2.png');
  background-size: 64px 64px;
  image-rendering: pixelated;
}

.sprites img {
  width: 25%;
  min-width: 48px;
  filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 0.45));
}

.shot-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 0.85fr) minmax(0, 2fr);
  align-items: center;
  gap: 20px;
}

.shots figure {
  margin: 0;
}

.shots img {
  width: 100%;
  image-rendering: auto;
}

figcaption {
  margin-top: 8px;
  color: var(--parchment-dim);
  font-size: 0.9rem;
  text-align: center;
}

/* Neuigkeiten aus dem Changelog */
.news-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 24px;
  background: var(--wood);
  border: 4px solid var(--gold);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 0.35);
}

.news-card h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.news-card .when {
  margin: 0 0 8px;
  color: var(--parchment-dim);
  font: 0.9rem var(--pixel);
}

.news-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.news-card li {
  margin: 4px 0;
}

.cta {
  text-align: center;
}

.cta p {
  margin: 8px 0 16px;
}

/* Unterstützen (Issue #85): Knopf in den Farben von Buy me a coffee, aber im Stil der Seite */
.support {
  text-align: center;
}

.support p {
  margin: 8px auto 16px;
  max-width: 60ch;
}

.btn-coffee {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffdd00;
  color: var(--ink);
}

.btn-coffee:hover {
  background: #ffe84d;
}

.coffee-icon {
  width: 20px;
  height: 20px;
}

.bottom {
  padding: 16px;
  text-align: center;
  color: var(--parchment-dim);
  font-size: 0.85rem;
  background: var(--wood-dark);
  border-top: 4px solid var(--ink);
}

.bottom a {
  color: var(--parchment-dim);
}

/* ---------- Handy ---------- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    text-align: center;
  }

  .actions {
    justify-content: center;
  }

  .shot-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot-row .phone {
    max-width: 260px;
    justify-self: center;
  }

  main > section {
    padding: 32px 16px;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.1rem;
  }

  .brand img {
    width: 24px;
    height: 24px;
  }

  .nav {
    gap: 10px;
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.45rem;
  }
}

/* ---------- Sprachwahl (wie im Spiel: Weltkugel, Holz, Pixel-Schrift) ---------- */

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-icon {
  position: absolute;
  left: 9px;
  width: 15px;
  height: 15px;
  color: var(--parchment);
  pointer-events: none;
}

.lang-switch select {
  appearance: none;
  padding: 4px 26px 4px 30px;
  border: 3px solid var(--ink);
  background-color: var(--wood);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23f4e4c1' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  color: var(--parchment);
  font: 700 0.9rem var(--pixel);
  cursor: pointer;
}

.lang-switch select:hover {
  background-color: #6d4629;
}

.lang-switch select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Pressemappe ---------- */

.press-head {
  text-align: center;
}

.press-head h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 6vw, 3rem);
  text-shadow: 4px 4px 0 var(--ink);
}

.press-block {
  max-width: 900px !important;
}

.press-block h2 {
  text-align: left;
}

.press-block h3 {
  margin: 20px 0 4px;
  color: var(--parchment-dim);
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 20px;
  margin: 0;
  padding: 16px 20px;
  background: var(--wood);
  border: 4px solid var(--ink);
}

.facts dt {
  font: 700 0.95rem var(--pixel);
  color: var(--gold);
}

.facts dd {
  margin: 0;
}

.media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: start;
  gap: 20px;
}

.media figure {
  margin: 0;
}

.media .wide {
  grid-column: 1 / -1;
  max-width: 720px;
  justify-self: center;
}

.media img {
  display: block;
  width: 100%;
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 0.35);
  image-rendering: auto;
}

.media .phone img {
  max-width: 180px;
  margin: 0 auto;
}

.media .icon-art {
  max-width: 160px;
  margin: 0 auto;
  image-rendering: pixelated;
}

@media (max-width: 600px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .facts dd {
    margin-bottom: 8px;
  }

  .nav-wide {
    display: none;
  }
}

/* ---------- Impressum und Datenschutz (scripts/build-legal.mjs) ---------- */

.legal-text {
  max-width: 760px;
  margin: 32px auto;
  padding: 8px clamp(16px, 4vw, 32px) 24px;
  background: var(--wood);
  border: 4px solid var(--ink);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 0.35);
}

/* Lange deutsche Wörter („Datenschutzerklärung“) passen in der Pixelschrift nicht auf schmale Handys */
.legal-text h1 {
  margin: 16px 0 4px;
  font-size: clamp(1.4rem, 6vw, 2rem);
  hyphens: auto;
  overflow-wrap: break-word;
}

.legal-text h2 {
  margin: 28px 0 4px;
  font-size: 1.2rem;
  text-align: left;
  text-shadow: none;
  hyphens: auto;
  overflow-wrap: break-word;
}

.legal-text dl {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 6px 18px;
}

.legal-text dt {
  color: var(--parchment-dim);
}

.legal-text dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.legal-text .updated {
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

.legal-text code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .legal-text {
    margin: 16px 8px;
  }

  .legal-text dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .legal-text dd {
    margin-bottom: 10px;
  }
}
