/* THE VIBE IS RIGHT Games – Landingpage (Farben aus ~/thevibeisright/README.md) */

@font-face {
  font-family: 'Press Start 2P';
  src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Tiny5';
  src: url('../fonts/Tiny5-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0b0a1e;
  --bg2: #15143a;
  --rim: #4c4a96;
  --hi: #8a8ad0;
  --lo: #2c2a64;
  --ink: #05040c;
  --text: #d8d8f4;
  --yellow: #ffe14a;
  --orange: #ff8a4a;
  --cyan: #5cd4ff;
  --blue: #3c78dc;
  --lilac: #d6a2ff;
  --green: #5cff7a;
  --pixel: 'Press Start 2P', monospace;
  --body: 'Tiny5', 'Press Start 2P', monospace;
}

/* Nur die gewählte Sprache zeigen */
html[lang='de'] [lang='en'],
html[lang='en'] [lang='de'] { display: none !important; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;   /* Fuß auch auf kurzen Seiten unten */
  background-color: var(--bg);
  /* Schachbrett wie im Abzeichen */
  background-image:
    linear-gradient(45deg, var(--bg2) 25%, transparent 25%, transparent 75%, var(--bg2) 75%),
    linear-gradient(45deg, var(--bg2) 25%, transparent 25%, transparent 75%, var(--bg2) 75%);
  background-size: 48px 48px;
  background-position: 0 0, 24px 24px;
  color: var(--text);
  font: 18px/1.5 var(--body);
  -webkit-font-smoothing: none;
}

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

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

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

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(11, 10, 30, 0.92);
  border-bottom: 4px solid var(--rim);
  backdrop-filter: blur(4px);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--yellow); text-decoration: none;
  font: 14px var(--pixel);
  text-shadow: 2px 2px 0 var(--ink);
}
.top nav { display: flex; align-items: center; gap: 18px; }
.top nav a {
  color: var(--text); text-decoration: none;
  font: 10px var(--pixel);
}
.top nav a:hover { color: var(--yellow); }
.lang {
  font: 10px var(--pixel);
  color: var(--cyan); background: var(--lo);
  border: 2px solid var(--hi);
  padding: 6px 8px; cursor: pointer;
}
.lang:hover { color: var(--yellow); }

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

main { max-width: 1040px; width: 100%; margin: 0 auto; padding: 0 16px; flex: 1; }

section { padding: 56px 0; scroll-margin-top: 40px; }

h2 {
  font: 20px var(--pixel);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--ink);
  text-align: center;
  margin: 0 0 40px;
}

/* ---------- Hero ---------- */

.hero { text-align: center; padding-top: 64px; }
.badge {
  width: 256px; margin: 0 auto 32px;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  animation: bob 2.4s steps(4) infinite alternate;
}
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .badge { animation: none; } }

h1 {
  font: 26px/1.5 var(--pixel);
  color: var(--yellow);
  text-shadow: 3px 3px 0 var(--orange), 6px 6px 0 var(--ink);
  margin: 0 0 20px;
}
h1 small {
  display: block;
  font-size: 18px;
  color: var(--cyan);
  letter-spacing: 0.6em;
  margin-right: -0.6em;   /* letzten Buchstabenabstand ausgleichen */
  text-shadow: 3px 3px 0 var(--ink);
  margin-top: 8px;
}
.tagline { font-size: 18px; color: var(--hi); margin: 0 0 32px; }

/* ---------- Pixel-Welle als Trenner (Welle aus dem Logo) ---------- */

.wave {
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='24' shape-rendering='crispEdges'%3E%3Cg fill='%235cd4ff'%3E%3Crect x='0' y='12' width='12' height='4'/%3E%3Crect x='12' y='8' width='8' height='4'/%3E%3Crect x='20' y='4' width='12' height='4'/%3E%3Crect x='32' y='8' width='8' height='4'/%3E%3C/g%3E%3Cg fill='%233c78dc'%3E%3Crect x='40' y='12' width='8' height='4'/%3E%3Crect x='48' y='16' width='16' height='4'/%3E%3Crect x='64' y='12' width='8' height='4'/%3E%3C/g%3E%3Cg fill='%23d6a2ff'%3E%3Crect x='72' y='8' width='8' height='4'/%3E%3Crect x='80' y='12' width='8' height='4'/%3E%3Crect x='88' y='16' width='8' height='4'/%3E%3C/g%3E%3C/svg%3E") repeat-x center;
  opacity: 0.7;
}

/* ---------- Spielekarten ---------- */

.games { display: grid; gap: 40px; }
.games h2 { margin-bottom: 0; }

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--bg);
  border: 4px solid var(--rim);
  box-shadow: inset 0 0 0 4px var(--lo), 8px 8px 0 var(--ink);
}
.game:nth-of-type(even) .shot { order: 2; }

.shot { display: block; background: var(--ink); border: 4px solid var(--lo); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
a.shot:hover img { filter: brightness(1.12); }

.info { padding: 28px; display: flex; flex-direction: column; }
.info h3 {
  font: 22px var(--pixel);
  color: var(--text);
  text-shadow: 3px 3px 0 var(--ink);
  margin: 16px 0;
}
.info p { margin: 0 0 24px; }
.info .subtitle { margin: -6px 0 16px; color: var(--cyan); }

.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font: 8px/1 var(--pixel);
  padding: 6px 8px;
  border: 2px solid var(--hi);
  color: var(--hi);
}
.tag.ok { color: var(--green); border-color: var(--green); }
.tag.wip { color: var(--yellow); border-color: var(--yellow); }

.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }

/* ---------- Bildergalerie (Cover, dann je zwei Hochformat-Screenshots) ---------- */

.carousel { position: relative; min-width: 0; overflow: hidden; }
.carousel::before { content: ''; display: block; padding-top: 80%; }   /* mindestens 5:4, wächst mit dem Text der Karte */
.carousel .track {
  position: absolute; inset: 0;
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .track:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
.carousel .slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.carousel a.slide:hover img { filter: brightness(1.12); }
.carousel .pair { display: flex; justify-content: center; gap: 12px; padding: 12px 12px 34px; }
.carousel .pair img {
  flex: 0 1 auto;
  width: auto; height: 100%; min-width: 0;
  max-width: calc(50% - 6px);
  object-fit: contain;
  image-rendering: auto;   /* verkleinerte Screenshots, „pixelated“ würde Pixel auslassen */
}

.carousel .single { display: flex; justify-content: center; padding: 12px 12px 34px; }   /* ein Screenshot im Querformat */
.carousel .single img {
  width: auto; height: 100%; max-width: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.carousel .nav, .carousel .dots { display: none; }
.carousel.ready .nav {
  display: block;
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 44px; padding: 0;
  font: 10px/1 var(--pixel);
  color: var(--cyan); background: var(--lo);
  border: 3px solid var(--ink);
  cursor: pointer;
}
.carousel.ready .nav:hover { color: var(--yellow); }
.carousel .prev { left: 6px; }
.carousel .next { right: 6px; }
.carousel.ready .dots {
  display: flex; gap: 8px;
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  padding: 5px 8px;
  background: rgba(5, 4, 12, 0.8);
}
.carousel .dots button {
  width: 10px; height: 10px; padding: 0;
  background: transparent;
  border: 2px solid var(--hi);
  cursor: pointer;
}
.carousel .dots button[aria-current='true'] { background: var(--yellow); border-color: var(--yellow); }

/* ---------- Weitere Fassungen eines Spiels (unter dessen Karte) ---------- */

.ports {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin: -16px 0 0 24px;
  padding: 0 0 0 24px;
  border-left: 4px dashed var(--rim);
}
.ports h4 {
  grid-column: 1 / -1;
  margin: 0;
  font: 10px var(--pixel);
  color: var(--hi);
}
.port {
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 4px solid var(--rim);
  box-shadow: inset 0 0 0 4px var(--lo), 6px 6px 0 var(--ink);
}
.port .shot { aspect-ratio: 960 / 544; }
.port .info { padding: 20px; flex: 1; }
.port .info h3 { font-size: 15px; margin: 12px 0; }
.port .info p { font-size: 16px; margin-bottom: 20px; }

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

.btn {
  display: inline-block;
  font: 10px/1 var(--pixel);
  padding: 12px 14px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  box-shadow: inset -3px -3px 0 var(--orange), 4px 4px 0 var(--ink);
  text-decoration: none;
  transition: transform 0.05s steps(1);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: inset -3px -3px 0 var(--orange), 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: inset -3px -3px 0 var(--orange), 2px 2px 0 var(--ink); }
.btn.alt { color: var(--cyan); background: var(--lo); box-shadow: inset -3px -3px 0 var(--ink), 4px 4px 0 var(--ink); }
.btn.alt:hover { color: var(--yellow); box-shadow: inset -3px -3px 0 var(--ink), 6px 6px 0 var(--ink); }
.btn.off { color: var(--hi); background: transparent; border-color: var(--rim); box-shadow: none; transform: none; cursor: default; }

/* ---------- Studio ---------- */

.about { text-align: center; max-width: 720px; margin: 0 auto; }
.about p { margin: 0 0 20px; }
.about .btn { margin-top: 12px; }

/* ---------- Rechtliches (Impressum, Datenschutz) ---------- */

.legal { max-width: 720px; margin: 0 auto; }
.legal h3 {
  font: 12px/1.6 var(--pixel);
  color: var(--cyan);
  margin: 32px 0 12px;
}
.legal address { font-style: normal; }
.legal p { margin: 0 0 12px; }
.legal .back { margin-top: 40px; }

/* ---------- Fuß ---------- */

footer {
  text-align: center;
  padding: 32px 16px 40px;
  border-top: 4px solid var(--rim);
  background: var(--bg);
  font: 10px/2 var(--pixel);
  color: var(--hi);
}
footer p { margin: 0; }
footer .small a { color: var(--hi); }
footer .small a:hover { color: var(--yellow); }

/* ---------- Handy ---------- */

@media (max-width: 760px) {
  .game { grid-template-columns: 1fr; }
  .game:nth-of-type(even) .shot { order: 0; }
  .info { padding: 20px; }
  .ports { grid-template-columns: 1fr; margin-left: 8px; padding-left: 16px; }
  h1 { font-size: 18px; }
  h1 small { font-size: 14px; }
  .tagline { font-size: 15px; }
  .badge { width: 192px; }
  body { font-size: 17px; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
  h1 { font-size: 15px; }
}
