/* RallyX Finals 2026 · Feedback-Journey — Look wie Programmheft-PWA
   Design-Tokens aus Programmheft-Design-Handoff.md */

:root {
  --red: #d61f26;
  --bg: #050302;
  --bg-2: #0a0807;
  --headline: #f6f0e6;
  --body: #ece3d7;
  --muted: #cdbcab;
  --meta: #8c7a6a;
  --badge-text: #120607;
  --pad-x: 22px;
}

@font-face {
  font-family: 'Norwester RX';
  src: url('../assets/fonts/Norwester-RX.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

/* Doppeltipp-Zoom auf Touch-Geraeten unterbinden — schnelles Antippen von
   Antwort + Weiter loest sonst den Browser-Zoom aus. Pinch-Zoom bleibt moeglich. */
button, a, input, textarea, select, label { touch-action: manipulation; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; }

/* hidden gewinnt immer — auch gegen display:flex der Komponenten */
[hidden] { display: none !important; }

/* Sprachumschaltung */
html[lang="de"] [data-lang-en] { display: none !important; }
html[lang="en"] [data-lang-de] { display: none !important; }

/* ---------- Buehne mit Heft-Hintergrund ---------- */
.stage { position: relative; min-height: 100dvh; display: flex; flex-direction: column; }
.section-bg { position: fixed; inset: 0; z-index: 0; }
.section-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 46%;
  filter: contrast(1.06) saturate(.92) brightness(.9);
}
.grade-multiply {
  position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: multiply;
  background: linear-gradient(180deg, #6a5a52 0%, #7a4038 40%, #3a1815 78%, #1a0c09 100%);
}
.grade-red {
  position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: soft-light;
  background: radial-gradient(80% 70% at 50% 30%, rgba(214,31,38,.42) 0%, rgba(214,31,38,0) 62%);
}
.grade-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,5,4,.78) 0%, rgba(9,7,6,.6) 28%, rgba(9,7,6,.58) 55%, rgba(9,7,6,.7) 82%, rgba(6,4,3,.94) 100%);
}
.grade-grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Fortschritt ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 10px var(--pad-x) 8px;
  background: linear-gradient(to bottom, rgba(5,3,2,.92), rgba(5,3,2,.55) 70%, rgba(5,3,2,0));
}
.progress-bar {
  height: 4px; background: rgba(246,240,230,.14);
  transform: skewX(-7deg); overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 0;
  background: var(--red); transition: width .35s ease;
}
.progress-label {
  margin-top: 5px;
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--meta); text-align: right;
}

/* ---------- Schritte ---------- */
.steps { position: relative; z-index: 4; flex: 1; display: flex; flex-direction: column; }
.step {
  display: none;
  flex: 1;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 64px var(--pad-x) 96px;
  text-align: center;
  max-width: 560px; margin: 0 auto; width: 100%;
}
.step.active { display: flex; animation: stepIn .4s ease both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.step h2 {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-weight: normal;
  font-size: clamp(26px, 7.4vw, 38px);
  color: var(--headline); text-transform: uppercase;
  line-height: 1.08;
  margin-bottom: 10px;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.step h2 .red, .red { color: var(--red); }

.q-label {
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px; line-height: 1.8;
}
.sub-q {
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--headline); margin: 20px 0 10px;
}
.sub-q:first-of-type { margin-top: 6px; }
.multi-hint { font-weight: 700; font-style: normal; color: var(--meta); letter-spacing: .1em; }

/* ---------- Sprach-Gate ---------- */
.fb-logo { width: 62%; max-width: 260px; height: auto; filter: drop-shadow(0 6px 20px rgba(0,0,0,.7)); margin-bottom: 8px; }
.fb-logo-estering { max-width: 230px; }
.fb-sub {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 17px; color: var(--headline); text-transform: uppercase;
  margin: 8px 0 26px; text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.gate-label {
  font-family: 'Archivo', sans-serif; font-weight: 900;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px; line-height: 1.9;
}
.gate-flag {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  width: 250px; margin: 0 auto 16px;
  transform: skewX(-7deg);
  background: rgba(10,8,7,.75);
  border: 1px solid rgba(214,31,38,.55);
  padding: 14px 20px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.flag-box { width: 58px; height: 30px; flex: none; overflow: hidden; }
.flag-box svg { width: 100%; height: 100%; display: block; }
.flag-de { background: linear-gradient(180deg, #161616 0 33.33%, #d61f26 33.33% 66.66%, #ffce00 66.66% 100%); }
.gate-flag-text {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 24px; color: var(--headline); text-transform: uppercase;
}
.fb-hint {
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--meta); margin-top: 18px;
}

/* ---------- X-Bewertung (1-5) ---------- */
.xrate { display: flex; gap: 10px; justify-content: center; margin: 18px 0 8px; }
.xrate-btn {
  width: 52px; height: 52px; padding: 6px;
  background: rgba(10,8,7,.6); border: 1px solid rgba(214,31,38,.3);
  transform: skewX(-7deg); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.xrate-btn img { width: 100%; height: 100%; object-fit: contain; opacity: .22; filter: grayscale(1); transition: opacity .2s, filter .2s; }
.xrate-btn.on { border-color: var(--red); background: rgba(214,31,38,.14); }
.xrate-btn.on img { opacity: 1; filter: none; }
.xrate-caption {
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 19px; color: var(--red); text-transform: uppercase;
  min-height: 26px; margin-top: 6px;
}

/* ---------- Kategorie-Zeilen ---------- */
.cat-list { width: 100%; }
.cat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; margin-bottom: 7px;
  background: rgba(10,8,7,.6); border: 1px solid rgba(214,31,38,.22);
  transform: skewX(-7deg);
}
.cat-name { font-size: 13.5px; font-weight: 400; color: var(--body); text-align: left; transform: skewX(7deg); }
.mini-rate { display: flex; gap: 5px; transform: skewX(7deg); }
.mini-rate button {
  width: 30px; height: 30px;
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 12px;
  background: rgba(246,240,230,.08); border: 1px solid rgba(246,240,230,.18);
  color: var(--muted); cursor: pointer;
}
.mini-rate button.on { background: var(--red); border-color: var(--red); color: var(--badge-text); }
/* X-Sterne-Variante (Kauf-Bewertungen): rote X statt Zahlen, auffuellend wie Sterne */
.mini-rate.xstars button {
  background: none; border: none; padding: 2px;
  width: 30px; height: 30px;
}
.mini-rate.xstars img { width: 100%; height: 100%; object-fit: contain; opacity: .22; filter: grayscale(1); transition: opacity .15s, filter .15s; }
.mini-rate.xstars button.on { background: none; border: none; }
.mini-rate.xstars button.on img { opacity: 1; filter: none; }

/* ---------- Options-Buttons ---------- */
.opt-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.opt-list.compact { gap: 7px; }
.opt-list.row5 { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 7px; }
.opt {
  display: block; width: 100%;
  transform: skewX(-7deg);
  background: rgba(10,8,7,.75);
  border: 1px solid rgba(214,31,38,.4);
  padding: 13px 18px; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 400;
  font-size: 15px; color: var(--headline);
  transition: background .18s, border-color .18s, color .18s;
}
.opt.small { font-size: 13.5px; padding: 10px 14px; }
.opt-list.row5 .opt { width: auto; flex: 0 1 auto; min-width: 64px; }
.opt.on {
  background: var(--red); border-color: var(--red);
  color: var(--badge-text); font-weight: 500;
}

/* ---------- A/B-Paare ---------- */
.ab-pair { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.ab {
  display: block; width: 100%;
  transform: skewX(-7deg);
  background: rgba(10,8,7,.75);
  border: 1px solid rgba(214,31,38,.4);
  padding: 12px 16px; cursor: pointer;
  font-family: 'Oswald', sans-serif; font-weight: 300;
  font-size: 13.5px; line-height: 1.45; color: var(--body);
  text-align: left;
  transition: background .18s, border-color .18s, color .18s;
}
.ab.on { background: var(--red); border-color: var(--red); color: var(--badge-text); font-weight: 400; }
.ab-skip {
  align-self: center;
  background: none; border: none; cursor: pointer;
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--meta); padding: 4px 8px;
}
.ab-skip.on { color: var(--headline); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- NPS 0-10 ---------- */
.nps { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; width: 100%; }
.nps button {
  width: 40px; height: 40px;
  font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 14px;
  background: rgba(10,8,7,.75); border: 1px solid rgba(214,31,38,.35);
  color: var(--muted); cursor: pointer; transform: skewX(-7deg);
}
.nps button.on { background: var(--red); border-color: var(--red); color: var(--badge-text); }

/* ---------- Texteingaben ---------- */
.fb-textlabel {
  display: block; width: 100%; text-align: left;
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 14px 0 6px;
}
.fb-text, .fb-input {
  width: 100%;
  background: rgba(10,8,7,.75);
  border: 1px solid rgba(214,31,38,.35);
  color: var(--body);
  font-family: 'Oswald', sans-serif; font-weight: 300; font-size: 15px;
  padding: 10px 12px;
  resize: vertical;
}
.fb-text:focus, .fb-input:focus { outline: none; border-color: var(--red); }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px var(--pad-x) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(5,3,2,.95), rgba(5,3,2,.7) 70%, rgba(5,3,2,0));
}
.nav-back, .nav-next {
  transform: skewX(-7deg); cursor: pointer;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 17px; text-transform: uppercase;
  padding: 11px 22px;
}
.nav-back {
  background: rgba(10,8,7,.75); border: 1px solid rgba(214,31,38,.45);
  color: var(--muted);
}
.nav-next {
  background: var(--red); border: none; color: var(--badge-text);
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.nav-next:disabled { opacity: .35; cursor: default; }
.nav-back[hidden] { display: none; }

/* ---------- Absenden / Danke ---------- */
.gate-choice {
  display: block; width: 250px; margin: 22px auto 0;
  transform: skewX(-7deg);
  background: var(--red); border: none; cursor: pointer;
  padding: 16px 20px;
  font-family: 'Norwester RX', 'Anton', sans-serif;
  font-size: 22px; color: var(--badge-text); text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.gate-choice:disabled { opacity: .5; cursor: default; }
.thanks-text { max-width: 420px; margin: 8px 0 20px; color: var(--body); }
.fb-estering { width: 210px; height: auto; margin-top: 20px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }

/* ---------- Kuenstliche Umlaut-Punkte — Norwester RX hat keine Umlaute ---------- */
.uml-word { white-space: nowrap; }
.uml { position: relative; display: inline-block; }
.uml::after {
  content: ''; position: absolute; left: 50%; top: -.08em;
  width: .13em; height: .13em; border-radius: 50%;
  background: currentColor;
  box-shadow: .24em 0 0 currentColor;
  transform: translateX(-.185em);
}

/* ---------- VIP-Screen ---------- */
.vip-text {
  max-width: 460px; margin: 0 0 18px;
  font-size: 14.5px; line-height: 1.55; color: var(--body);
}

/* ---------- Bedingte Bloecke ---------- */
.cond { width: 100%; margin-top: 8px; }
.cond[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .step.active { animation: none; }
}
