/* ===========================================================================
   Pixel WG — Bausteine  v2.0
   Setzt pixel-wg-tokens.css voraus. Enthält keine einzige rohe Farbe.
   =========================================================================== */

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-display);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--f-display); font-weight: 700; margin: 0; }
h1 { font-size: var(--t-h1); line-height: var(--lh-head); letter-spacing: -0.02em; }
h2 { font-size: var(--t-h2); line-height: var(--lh-head); letter-spacing: -0.01em; }
h3 { font-size: var(--t-h3); line-height: var(--lh-head); font-family: var(--f-display); }

/* Überschriften-Standard (wie .pwg-section-title der Startseite): Seitentitel und
   Abschnitte in Satoshi Black 900, Großbuchstaben, Akzentwort lila. Kartentitel
   (h3) bleiben 700 in normaler Schreibung. Seiten setzen dafür .pwg-title. */
.pwg-title { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; letter-spacing: .5px; line-height: 1.15; }
.pwg-title :is(.acc, .accent, .pwg-accent, em) { color: var(--brand); font-style: normal; }

p { margin: 0 0 var(--s-4); max-width: var(--w-text); }
a { color: var(--brand); text-underline-offset: 3px; }

/* Sichtbarer Fokusring auf allem, was bedient wird. Nicht entfernen. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-pixel);
}

.pwg-wrap { max-width: var(--w-page); margin-inline: auto; padding-inline: var(--s-4); }

/* --- Etikett ------------------------------------------------------------- */
.pwg-eyebrow {
  font-family: var(--f-label);
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Knöpfe -------------------------------------------------------------- */
.pwg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-5);
  font-family: var(--f-ui); font-size: var(--t-small); font-weight: 700;
  border-radius: var(--r-btn); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--d-fast) var(--e-out),
              border-color var(--d-fast) var(--e-out),
              transform var(--d-fast) var(--e-out);
}
.pwg-btn:active { transform: translateY(1px); }

.pwg-btn-primary { background: var(--brand); color: var(--text-on-accent); }
.pwg-btn-primary:hover { background: var(--brand-ink); }

.pwg-btn-secondary {
  background: transparent; color: var(--text); border-color: var(--border-strong);
}
.pwg-btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

.pwg-btn-ghost { background: transparent; color: var(--text-dim); }
.pwg-btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.pwg-btn[disabled], .pwg-btn[aria-disabled="true"] {
  color: var(--text-muted); background: var(--surface-2);
  border-color: transparent; cursor: not-allowed; transform: none;
}

.pwg-link {
  font-family: var(--f-ui); font-weight: 500; color: var(--brand);
  display: inline-flex; align-items: center; gap: var(--s-1);
}

/* --- Statuszeichen ------------------------------------------------------- */
/* Gefüllt: dunkle Schrift auf der Kategoriefarbe. Jede Kombination hält
   mindestens 5,5:1. */
.pwg-tag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3);
  font-family: var(--f-label); font-size: var(--t-label); font-weight: 700;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-dim);
}
.pwg-tag--live   { background: var(--c-live);   color: var(--text-on-accent); }
.pwg-tag--wg     { background: var(--c-wg);     color: var(--text-on-accent); }
.pwg-tag--news   { background: var(--c-news);   color: var(--text-on-accent); }
.pwg-tag--events { background: var(--c-events); color: var(--text-on-accent); }
.pwg-tag--deals  { background: var(--c-deals);  color: var(--text-on-accent); }
.pwg-tag--brand  { background: var(--brand);    color: var(--text-on-accent); }

/* Live-Punkt. Farbe ist nie das einzige Signal — das Wort LIVE steht daneben. */
.pwg-dot {
  width: 8px; height: 8px; border-radius: var(--r-pill);
  background: currentColor; flex: none;
}
.pwg-tag--live .pwg-dot { animation: pwg-pulse 2s var(--e-out) infinite; }
@keyframes pwg-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .pwg-tag--live .pwg-dot { animation: none; }
}

/* --- Karte --------------------------------------------------------------- */
.pwg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.pwg-card h3 { font-family: var(--f-display); }
.pwg-card p  { color: var(--text-dim); margin: 0; }

/* Kategorie-Kante statt großflächiger Farbe: die Farbe markiert, sie schreit nicht. */
.pwg-card--live   { border-top: 3px solid var(--c-live); }
.pwg-card--wg     { border-top: 3px solid var(--c-wg); }
.pwg-card--news   { border-top: 3px solid var(--c-news); }
.pwg-card--events { border-top: 3px solid var(--c-events); }
.pwg-card--deals  { border-top: 3px solid var(--c-deals); }

a.pwg-card { text-decoration: none; color: inherit;
  transition: border-color var(--d-base) var(--e-out), transform var(--d-base) var(--e-out); }
a.pwg-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { a.pwg-card:hover { transform: none; } }

/* --- Zahlen -------------------------------------------------------------- */
.pwg-stat { display: flex; align-items: center; gap: var(--s-3); }
.pwg-stat__num {
  font-family: var(--f-label); font-weight: 700; font-size: 1.75rem;
  font-variant-numeric: tabular-nums;  /* Zahlen springen beim Zählen nicht */
  line-height: 1;
}
.pwg-stat__label {
  font-family: var(--f-label); font-size: var(--t-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-dim);
}

/* --- Kopfzeile ----------------------------------------------------------- */
.pwg-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.pwg-header__inner {
  max-width: var(--w-page); margin-inline: auto;
  min-height: var(--h-header); padding-inline: var(--s-4);
  display: flex; align-items: center; gap: var(--s-5);
}
.pwg-logo { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--text); }
.pwg-logo img { display: block; }
.pwg-logo__word {
  font-family: var(--f-display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.pwg-logo__word em { font-style: normal; color: var(--brand); }

.pwg-nav { display: flex; gap: var(--s-1); margin-inline-start: auto; }
.pwg-nav a {
  font-family: var(--f-ui); font-size: var(--t-small); font-weight: 500;
  color: var(--text-dim); text-decoration: none;
  min-height: var(--tap); padding-inline: var(--s-3);
  display: inline-flex; align-items: center; border-radius: var(--r-btn);
  transition: color var(--d-fast) var(--e-out), background var(--d-fast) var(--e-out);
}
.pwg-nav a:hover { color: var(--text); background: var(--surface-2); }
.pwg-nav a[aria-current="page"] { color: var(--text); }
/* Aktuelle Seite ist nicht nur farblich markiert */
.pwg-nav a[aria-current="page"]::after {
  content: ""; position: absolute; margin-top: 2.1em;
  width: 18px; height: 2px; background: var(--brand); border-radius: var(--r-pill);
}
.pwg-nav a { position: relative; }

@media (max-width: 860px) { .pwg-nav { display: none; } }

/* --- Eingabefeld --------------------------------------------------------- */
.pwg-field { display: flex; flex-direction: column; gap: var(--s-2); }
.pwg-field label {
  font-family: var(--f-ui); font-size: var(--t-small); font-weight: 500; color: var(--text);
}
.pwg-field input, .pwg-field textarea, .pwg-field select {
  min-height: var(--tap); padding: var(--s-2) var(--s-3);
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-btn);
  font-family: var(--f-ui); font-size: var(--t-body);
}
.pwg-field__hint  { font-size: var(--t-small); color: var(--text-dim); }
.pwg-field__error { font-size: var(--t-small); color: var(--c-live); font-weight: 500; }
.pwg-field:has(.pwg-field__error) input { border-color: var(--c-live); }

/* --- Bilder -------------------------------------------------------------- */
/* Immer Platz reservieren, sonst springt das Layout beim Laden. */
.pwg-media { display: block; width: 100%; height: auto; border-radius: var(--r-card); }
.pwg-media[width][height] { aspect-ratio: attr(width) / attr(height); }

/* Kein Text in Bildern. Wenn Schrift über einem Foto liegt, kommt eine
   abdunkelnde Fläche darunter — sonst hält der Kontrast nicht. */
.pwg-overlay { position: relative; isolation: isolate; }
.pwg-overlay::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1;
  background: linear-gradient(to top, rgb(19 18 26 / 0.88) 0%, rgb(19 18 26 / 0.25) 60%, transparent 100%);
}
.pwg-overlay > * { position: relative; z-index: 2; }
