/* Gemeinsame Grundlage der Vereins-Apps von Artist Factory e.V.
   Unabhängig von site.css, damit die Apps eigenständig laufen.
   Regeln aus DESIGN.md: Bühnenschwarz, Gantari, Haarlinien statt Kästen,
   Markenverlauf nur auf dem Hauptknopf, Magenta als Fokusfarbe. */

@font-face {
  font-family: "Gantari";
  src: url("../assets/fonts/gantari-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #08080a;
  --ground-2: #0e0d14;
  --ground-3: #16141f;
  --ink: #f5f5f5;
  --ink-soft: #b9b7c2;
  --ink-mute: #8a8794;
  --white: #ffffff;
  --line: rgba(245, 245, 245, 0.14);
  --line-strong: rgba(245, 245, 245, 0.28);
  --magenta: #d142fe;
  --brand-gradient: linear-gradient(90deg, #5b2cf7 0%, #a032e2 55%, #ef3aa6 100%);
  --error-text: #ff9bb8;
  --error-line: #ff6f98;
  --font: "Gantari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --radius-pill: 999px;
  --radius-field: 14px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font: 400 clamp(1.05rem, 1.15vw, 1.2rem)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(209, 66, 254, 0.45); color: #fff; }

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 4px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: #fff; color: #000; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Kopf ---------- */
.app-bar {
  height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.app-bar__logo { display: inline-flex; align-items: center; }
.app-bar__logo img { width: 150px; height: auto; }
.app-bar__back {
  font: 600 1rem/1.2 var(--font);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 44px;
  background-image: linear-gradient(var(--magenta), var(--magenta));
  background-size: 0 2px; background-repeat: no-repeat; background-position: 0 85%;
  transition: background-size 0.3s var(--ease);
}
.app-bar__back:hover { background-size: 100% 2px; }

/* ---------- Inhalt ---------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.app-head { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.app-head h1 {
  margin: 0;
  font: 700 clamp(2.4rem, 5.6vw, 5rem)/0.98 var(--font);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.app-head p {
  margin: 0.8em 0 0;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.5;
}

h2 {
  margin: 0;
  font: 700 clamp(1.4rem, 2vw, 1.9rem)/1.1 var(--font);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border: 0; border-radius: var(--radius-pill);
  font: 700 1rem/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  min-height: 48px; padding: 0 1.3em;
  cursor: pointer;
  color: #fff; background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.95);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, color 0.2s;
  touch-action: manipulation;
}
.btn:hover { background: #fff; color: var(--ground); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; color: #fff; }

.btn--primary {
  background: var(--brand-gradient);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.6);
  min-height: 52px; padding: 0 1.6em; font-size: 1.05rem;
}
.btn--primary:hover {
  background: var(--brand-gradient); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.7);
  filter: brightness(1.08);
}

.btn--quiet {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}

/* Auswahl-Chips: gewählt = Reinweiß mit schwarzer Schrift */
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; padding: 0 1.05em;
  border: 0; border-radius: var(--radius-pill);
  font: 600 0.98rem/1 var(--font);
  color: var(--ink); background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
}
.chip:hover { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.9); }
.chip[aria-pressed="true"], .chip[aria-checked="true"], .chip.is-on {
  background: #fff; color: var(--ground);
  box-shadow: inset 0 0 0 1.5px #fff;
}

/* ---------- Felder ---------- */
.field, textarea.field, select.field {
  width: 100%;
  background: var(--ground-2);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-field);
  padding: 14px 16px;
  font: 400 1.05rem/1.5 var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus, textarea.field:focus, select.field:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(209, 66, 254, 0.25);
}
label { font-weight: 600; }

input[type="range"] { accent-color: var(--magenta); width: 100%; min-height: 32px; }

/* ---------- Fuß ---------- */
.app-foot {
  margin-top: clamp(64px, 8vw, 120px);
  border-top: 1px solid var(--line);
  padding: 32px var(--gutter) 48px;
  color: var(--ink-mute);
  font-size: 0.95rem;
}
.app-foot p { margin: 0 0 0.4em; max-width: 70ch; }
.app-foot a { color: var(--ink-soft); }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 560px) {
  .app-bar { height: 64px; }
  .app-bar__logo img { width: 118px; }
}
