/* ==========================================================================
   phpFarm — Landingpage
   Farbwerte und Schriftstapel stammen aus dem Spiel. Keine externen Dateien.
   ========================================================================== */

/* --- Tokens: helle Flaeche (Standard) ----------------------------------- */
:root {
  --bg:          rgb(250, 253, 249);
  --surface:     rgba(255, 255, 255, 0.94);
  --surface-alt: rgb(240, 246, 239);
  --edge:        rgba(23, 66, 51, 0.16);
  --text:        rgb(23, 66, 51);
  --text-muted:  rgb(74, 104, 91);
  --accent:      rgb(70, 154, 78);
  --accent-dark: rgb(52, 124, 58);
  --php:         rgb(124, 109, 199);
  --discord:     rgb(88, 101, 242);
  --radius:      14px;

  /* Der Code-Block bleibt dunkel, auch auf heller Seite. */
  --code-bg:   rgb(15, 18, 24);
  --code-text: rgb(214, 222, 235);
  --keyword:  #c792ea;
  --variable: #82aaff;
  --string:   #c3e88d;
  --number:   #f78c6c;
  --comment:  #5c6773;
  --call:     #ffcb6b;
  --operator: #89ddff;
  --punct:    #a3b1bf;
  --opentag:  #6b7a8a;

  /* abgeleitet */
  --link:        var(--accent-dark);
  --btn-fg:      #ffffff;
  --shadow:      0 1px 2px rgba(23, 66, 51, 0.06), 0 8px 24px rgba(23, 66, 51, 0.07);
  --maxw:        1120px;
  --gutter:      16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          rgb(15, 18, 24);
    --surface:     rgba(23, 28, 38, 0.94);
    --surface-alt: rgb(23, 28, 38);
    --edge:        rgb(44, 53, 69);
    --text:        rgb(214, 222, 235);
    --text-muted:  rgb(129, 141, 160);
    --accent:      rgb(92, 201, 92);
    --accent-dark: rgb(70, 154, 78);
    --link:        rgb(92, 201, 92);
    --btn-fg:      rgb(10, 14, 12);
    --shadow:      0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* --- Grundlagen ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

a { color: var(--link); }
a:hover { color: var(--text); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }

code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-ligatures: none;
}

:where(p, li, figcaption) code {
  background: var(--surface-alt);
  border: 1px solid var(--edge);
  border-radius: 5px;
  padding: 0.08em 0.34em;
  font-size: 0.88em;
}

:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
  :focus-visible { outline-color: var(--accent); }
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  z-index: 50;
}
.skip:focus { left: var(--gutter); top: 8px; }

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--edge); }

.lead { color: var(--text-muted); max-width: 60ch; }

/* --- Kopf ---------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--edge);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.brand {
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand .php { color: var(--php); }

/* --- Sprachumschalter (Klappmenue) --------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.lang { position: relative; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 5px 9px;
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--text-muted); }

.flag {
  display: block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--edge) inset;
}

.caret {
  width: 0;
  height: 0;
  margin-left: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  transition: transform 0.15s ease;
}
.lang-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.lang-menu[hidden] { display: none; }
.lang[data-drop="up"] .lang-menu { top: auto; bottom: calc(100% + 6px); }

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.lang-menu button:hover { background: var(--surface-alt); }
.lang-menu button[aria-current="true"] { color: var(--accent-dark); }
@media (prefers-color-scheme: dark) {
  .lang-menu button[aria-current="true"] { color: var(--accent); }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  padding: 56px 0 64px;
  background:
    radial-gradient(60% 80% at 15% 0%, rgba(70, 154, 78, 0.10), transparent 70%),
    radial-gradient(50% 70% at 95% 10%, rgba(124, 109, 199, 0.08), transparent 70%);
}
.hero .wrap {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
}
.hero h1 { margin-bottom: 0.2em; }
.tagline {
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.5em;
}
@media (prefers-color-scheme: dark) { .tagline { color: var(--accent); } }
.subline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 46ch;
}

/* --- Knoepfe ------------------------------------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn-note {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.btn-steam { background: var(--accent-dark); color: var(--btn-fg); }
.btn-discord { background: var(--discord); color: #ffffff; }

.btn[href]:hover { transform: translateY(-1px); filter: brightness(1.06); }

/* Zustand: Adresse steht noch nicht fest. Kein href, kein Klickziel. */
.btn[aria-disabled="true"] {
  cursor: default;
  background: var(--surface-alt);
  color: var(--text-muted);
  border-color: var(--edge);
  box-shadow: none;
}
.btn[aria-disabled="true"]:hover { transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .btn[href]:hover { transform: none; }
}

/* --- Code-Block ---------------------------------------------------------- */
.code {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid rgb(44, 53, 69);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.65;
  box-shadow: var(--shadow);
  -webkit-text-size-adjust: 100%;
}
.code code { font-variant-ligatures: none; white-space: pre; }
.code .kw { color: var(--keyword); }
.code .var { color: var(--variable); }
.code .str { color: var(--string); }
.code .num { color: var(--number); }
.code .cm { color: var(--comment); }
.code .fn { color: var(--call); }
.code .op { color: var(--operator); }
.code .pn { color: var(--punct); }
.code .tag { color: var(--opentag); }

.code-figure { margin: 0; }
.code-figure figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Zwei Spalten: Text + Bild ------------------------------------------- */
.split {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 44px; }
}
.split p { font-size: 1.05rem; }

/* --- Karten -------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.45em; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.96rem; }

/* --- Bilder -------------------------------------------------------------- */
.gallery {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.shot {
  margin: 0;
  container-type: inline-size;
}
.shot-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--edge);
  background: var(--surface-alt);
  box-shadow: var(--shadow);
}
.shot-link img { width: 100%; height: auto; }
.shot figcaption {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Platzhalter, solange die Bilddateien fehlen. Kein Screenshot, sondern
   eine gebrandete Kachel: Wortmarke auf dem Raster des Feldes. */
.ph {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(70, 154, 78, 0.08) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(70, 154, 78, 0.08) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(155deg, var(--surface-alt), var(--bg) 70%);
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) {
  .ph {
    background:
      linear-gradient(rgba(92, 201, 92, 0.10) 1px, transparent 1px) 0 0 / 44px 44px,
      linear-gradient(90deg, rgba(92, 201, 92, 0.10) 1px, transparent 1px) 0 0 / 44px 44px,
      linear-gradient(155deg, var(--surface-alt), var(--bg) 70%);
  }
}

.ph-mark {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}
.ph-mark .php { color: var(--php); }

@container (min-width: 380px) {
  .ph-mark { font-size: 2.1rem; }
}

.ph-note {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 5px 14px;
}
@media (prefers-color-scheme: dark) {
  .ph-note { color: var(--accent); }
}

/* --- Roadmap ------------------------------------------------------------- */
.roadmap-note {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.roadmap {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 720px;
}
.stage {
  position: relative;
  padding: 0 0 30px 28px;
  border-left: 2px solid var(--edge);
}
.stage:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.stage::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--edge);
}
.stage-num {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stage h3 { margin-bottom: 0.35em; }
.stage p { color: var(--text-muted); font-size: 0.96rem; margin: 0; }

.stage.current { border-left-color: var(--accent); }
.stage.current::before { background: var(--accent); border-color: var(--accent); }
.stage.current .stage-num { color: var(--accent-dark); }
@media (prefers-color-scheme: dark) {
  .stage.current .stage-num { color: var(--accent); }
}

.roadmap-more {
  max-width: 720px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--edge);
  font-size: 0.96rem;
  color: var(--text-muted);
}

/* --- Lightbox ------------------------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 18, 24, 0.9);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: rgb(214, 222, 235);
  background: rgba(23, 28, 38, 0.9);
  border: 1px solid rgb(44, 53, 69);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}

/* --- Fuss ---------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--edge);
  background: var(--surface-alt);
  padding: 34px 0 44px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: flex-start;
  justify-content: space-between;
}
.foot-note { max-width: 42ch; margin: 0; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.site-foot .lang { margin-top: 2px; }

/* --- Rechtstexte (impressum.html / datenschutz.html) --------------------- */
.legal { padding: 48px 0 64px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 0.6em; }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.02rem; margin-top: 1.4em; }
.legal p, .legal li { color: var(--text-muted); }
.legal address { font-style: normal; color: var(--text); }
.legal .upper { text-transform: none; }
.legal .back { display: inline-block; margin-bottom: 24px; font-size: 0.9rem; }
