/* Pixel Garage — Web.
   Die Farben sind aus den App-Screenshots abgelesen, nicht danebengeraten:
   die warme Showroom-Wand, der dunkle Boden, das Podest in Creme, der Lack des
   Beispielautos. Dieselbe Welt, nicht eine ähnliche. */

/* Die Pixelschrift der App. Liegt lokal — die Seite spricht keine fremden Server an,
   und genau das steht auch in der Datenschutzerklärung. */
@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --wand:       #ded9cf;
  --wand-hell:  #e9e5dc;
  --papier:     #f3efe6;
  --raum:       #3d4350;
  --raum-tief:  #333845;
  --raum-kante: #575e6c;
  --himmel:     #c4d7de;
  --himmel-tief:#aec3c9;
  --sonne:      #e8c05c;
  --lack:       #d4372d;
  --lack-tief:  #a32a22;
  --tinte:      #1f232b;
  --tinte-leise:#5f6673;
  --hell:       #f3efe6;
  --hell-leise: #b3b8c2;

  --pixel: "Silkscreen", ui-monospace, monospace;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--wand);
  color: var(--tinte);
  font-family: var(--text);
  line-height: 1.65;
  /* Die Wand der App ist nicht glatt: Über ihr liegen verstreute Pixelquadrate in
     Wandtönen. Ein gekacheltes SVG bildet das nach — unregelmäßig genug, dass es als
     Textur liest und nicht als Raster. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='230'%3E%3Crect x='18' y='41' width='6' height='6' fill='%23e9e5dc'/%3E%3Crect x='143' y='17' width='6' height='6' fill='%23e9e5dc'/%3E%3Crect x='207' y='103' width='6' height='6' fill='%23e9e5dc'/%3E%3Crect x='76' y='158' width='6' height='6' fill='%23e9e5dc'/%3E%3Crect x='172' y='199' width='6' height='6' fill='%23e9e5dc'/%3E%3Crect x='39' y='221' width='6' height='6' fill='%23d3cdc2'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='157' height='157'%3E%3Crect x='63' y='9' width='5' height='5' fill='%23d3cdc2'/%3E%3Crect x='11' y='88' width='5' height='5' fill='%23e9e5dc'/%3E%3Crect x='129' y='134' width='5' height='5' fill='%23e9e5dc'/%3E%3C/svg%3E");
}

/* height:auto ist hier nicht kosmetisch: Ohne das behalten die Bilder ihr
   height-Attribut, während max-width die Breite zusammenzieht — die Screenshots und
   das Auto im Hero standen dadurch gestaucht auf der Seite. */
img { max-width: 100%; height: auto; display: block; }
.pixel { image-rendering: pixelated; }

/* --- Raster ----------------------------------------------------------------- */

.bahn { max-width: 1000px; margin-inline: auto; padding-inline: 20px; }
.eng  { max-width: 720px; }

section { padding-block: 64px; }
@media (max-width: 640px) { section { padding-block: 44px; } }

/* Der dunkle Raum der App — Boden, Werkstatt, Nachtszene. Wird als ganzer
   Abschnitt eingesetzt, damit die Seite denselben Zweiklang hat wie die App:
   helle Wand oben, dunkler Raum unten. */
.dunkel {
  background: var(--raum);
  color: var(--hell);
  border-top: 5px solid var(--raum-kante);
  border-bottom: 5px solid var(--raum-kante);
}
.dunkel .leise { color: var(--hell-leise); }
.dunkel .kicker { color: var(--sonne); }

/* --- Typografie -------------------------------------------------------------- */

.kicker {
  font-family: var(--pixel);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lack);
}

h1, h2, h3 { text-wrap: balance; }

.schlagzeile {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

h1.schlagzeile { font-size: clamp(2.2rem, 9vw, 4rem); }
h2.schlagzeile { font-size: clamp(1.7rem, 5.5vw, 2.5rem); margin-top: 10px; }

p { color: var(--tinte); }
.leise { color: var(--tinte-leise); }
.gross { font-size: 1.12rem; line-height: 1.6; }

a { color: var(--lack-tief); }
.dunkel a { color: var(--sonne); }

/* --- Bausteine --------------------------------------------------------------- */

/* Der Knopf der App: volle Pille, harte Standkante darunter, sinkt beim Drücken ein. */
.pille {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 15px 30px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pille-voll { background: var(--lack); color: var(--papier); box-shadow: 0 6px 0 var(--lack-tief); }
.pille-leer { background: var(--papier); color: var(--tinte); box-shadow: 0 6px 0 rgba(31,35,43,.3); }
.pille:hover { transform: translateY(2px); }
.pille-voll:hover { box-shadow: 0 4px 0 var(--lack-tief); }
.pille-leer:hover { box-shadow: 0 4px 0 rgba(31,35,43,.3); }
.pille:active { transform: translateY(6px); box-shadow: 0 0 0 var(--lack-tief); }

/* Das Polaroid aus der Verwandlung: Cremepapier, harter Schatten, Klebestreifen,
   minimal schief an der Wand. Unten bleibt der breite Rand für die Beschriftung. */
.polaroid {
  position: relative;
  background: var(--papier);
  padding: 13px 13px 46px;
  box-shadow: 7px 9px 0 rgba(31, 35, 43, 0.17);
  rotate: -1.1deg;
}
.polaroid:nth-of-type(even) { rotate: 1.3deg; }
.polaroid::before {
  content: "";
  position: absolute;
  top: -11px; left: 50%;
  translate: -50% 0;
  width: 86px; height: 22px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 0 rgba(31, 35, 43, 0.12);
  rotate: -2deg;
}
.polaroid .bild {
  aspect-ratio: 3 / 2;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--wand-hell);
}
.polaroid .bild-frei { object-fit: contain; padding: 12px; }

.polaroid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 13px;
  text-align: center;
  font-family: var(--pixel);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tinte-leise);
}

/* Der Zettel: harte Kante, harter Schatten — die App kennt keinen weichen. */
.zettel {
  background: var(--papier);
  border: 3px solid var(--tinte);
  box-shadow: 7px 7px 0 rgba(31, 35, 43, 0.16);
  padding: 24px 26px;
}
.dunkel .zettel {
  background: var(--raum-tief);
  border-color: var(--raum-kante);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.22);
}

/* --- Die Bühne: der Showroom, in dem das Auto wirklich fährt ------------------ */

.buehne {
  position: relative;
  overflow: hidden;
  background: var(--raum);
  border: 4px solid var(--raum-kante);
  aspect-ratio: 16 / 9;
  max-height: 380px;
  width: 100%;
}
/* Oben die Fensterfront: Himmel, Wasserlinie, Sonne, vier Scheiben mit Sprossen. */
.fenster {
  position: absolute;
  inset: 0 0 42% 0;
  background:
    repeating-linear-gradient(to right,
      transparent 0 calc(25% - 5px),
      var(--raum-kante) calc(25% - 5px) 25%),
    linear-gradient(to bottom,
      var(--himmel) 0 62%,
      var(--himmel-tief) 62% 100%);
  border-bottom: 5px solid var(--raum-kante);
}
.sonne {
  position: absolute;
  top: 16%; left: 33%;
  width: 46px; height: 46px;
}
/* Der Boden, auf dem gefahren wird. */
.strasse {
  position: absolute;
  inset: 58% 0 0 0;
  background: var(--raum-tief);
  border-top: 4px solid var(--raum-kante);
}
.strasse::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 46%;
  height: 4px;
  background: repeating-linear-gradient(to right,
    rgba(243,239,230,.22) 0 38px, transparent 38px 76px);
}
/* Das Auto: fährt durch, wippt dabei in Stufen — kein weiches Federn, so wippt es
   auch im Widget. Beim Wenden wird gespiegelt statt rückwärts gefahren. */
.fahrzeug {
  position: absolute;
  bottom: 9%;
  width: 172px;
  left: 0;
  animation: fahren 14s linear infinite;
}
.fahrzeug img { animation: wippen 0.5s steps(2) infinite; }
@keyframes fahren {
  0%   { left: -180px; transform: scaleX(1); }
  47%  { left: 100%;   transform: scaleX(1); }
  48%  { left: 100%;   transform: scaleX(-1); }
  97%  { left: -180px; transform: scaleX(-1); }
  100% { left: -180px; transform: scaleX(1); }
}
@keyframes wippen { 0% { translate: 0 0; } 100% { translate: 0 -3px; } }

@media (max-width: 640px) {
  .buehne { aspect-ratio: 4 / 3; }
  .fahrzeug { width: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fahrzeug, .fahrzeug img { animation: none; }
  .fahrzeug { left: 12%; }
  .pille { transition: none; }
}

/* --- Kopf und Fuß ------------------------------------------------------------ */

.kopf {
  display: flex;
  gap: 18px;
  align-items: baseline;
  flex-wrap: wrap;
  padding-block: 24px 6px;
}
.logo {
  font-family: var(--pixel);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--lack);
  text-decoration: none;
}
.kopf nav { display: flex; gap: 15px; flex-wrap: wrap; }
.kopf nav a { color: var(--tinte-leise); text-decoration: none; font-size: 14px; }
.kopf nav a:hover { color: var(--tinte); }
.sprache { margin-left: auto; }

.fuss {
  border-top: 3px solid rgba(31, 35, 43, 0.14);
  padding-block: 22px 40px;
  color: var(--tinte-leise);
  font-size: 13px;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.fuss nav { display: flex; gap: 15px; flex-wrap: wrap; }
.fuss a { color: var(--tinte-leise); }

:focus-visible { outline: 3px solid var(--lack-tief); outline-offset: 3px; }
.dunkel :focus-visible { outline-color: var(--sonne); }

/* --- Rechtstexte -------------------------------------------------------------- */

.rechtstext { padding-block: 30px 60px; }
.rechtstext h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.rechtstext h2 { font-size: 1.05rem; margin: 30px 0 8px; color: var(--lack-tief); font-weight: 700; }
.rechtstext p { margin: 0 0 12px; white-space: pre-line; }
.rechtstext .stand { color: var(--tinte-leise); font-size: 14px; margin-bottom: 24px; }
.rechtstext .karte { background: var(--papier); padding: 22px 24px; margin: 22px 0; }

/* Schrittnummern: Pixelziffer im roten Quadrat, wie die Reiter in der App. */
.ziffer {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  background: var(--lack);
  color: var(--papier);
  font-family: var(--pixel);
  font-size: 15px;
  display: grid;
  place-items: center;
}
