/* =========================================================================
   E&V Serviceportal — Gestaltung
   Hell, editorial, lebendig. Signatur: der rote Faden — Fortschrittslinie,
   Schrittzähler, Auswahlmarkierung und gezeichneter Abschluss-Haken sprechen
   eine gemeinsame Liniensprache in E&V-Rot.
   Serif-Display (Cormorant Garamond) über Inter. Ecken bewusst scharf (CD).
   ========================================================================= */

:root {
  --papier: #f5f4f1;
  --papier-tief: #ecebe6;
  --tinte: #17181a;
  --tinte-mittel: #3d4045;
  --tinte-weich: #70747b;
  --linie: #d9d7d0;
  --rot: #d01527;
  --rot-dunkel: #a91020;
  --rot-hauch: rgba(208, 21, 39, 0.06);
  --weiss: #ffffff;
  --schatten: 0 1px 2px rgba(23, 24, 26, 0.05), 0 12px 32px -12px rgba(23, 24, 26, 0.18);
  --schatten-hoch: 0 2px 4px rgba(23, 24, 26, 0.06), 0 22px 44px -16px rgba(23, 24, 26, 0.26);
  --kurve: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { height: 100%; }

body {
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--tinte);
  background-color: var(--papier);
  -webkit-font-smoothing: antialiased;
}

/* Hintergrundfoto: sehr zurückgenommen, atmet kaum merklich */
body::before {
  content: "";
  position: fixed;
  inset: -4%;
  z-index: -1;
  background-image: image-set(
    url("bilder/hintergrund-1280.webp") 1x,
    url("bilder/hintergrund-1920.webp") 2x
  );
  background-size: cover;
  background-position: center;
  opacity: 0.11;
  animation: atmen 46s ease-in-out infinite alternate;
}
@media (min-width: 1281px) {
  body::before { background-image: url("bilder/hintergrund-1920.webp"); }
}
@keyframes atmen {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.05) translateY(-1.2%); }
}

/* ---------- Kopf ---------- */
.kopf {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px) 14px;
}
.kopf img { width: clamp(150px, 16vw, 200px); height: auto; display: block; }
.kopf .portal-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tinte-weich);
  transition: color 0.3s ease;
}

/* ---------- Der rote Faden: Fortschritt ---------- */
.fortschritt {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(23, 24, 26, 0.08);
  z-index: 30;
}
#fortschritt-balken {
  position: relative;
  height: 100%;
  width: 0;
  background: var(--rot);
  transition: width 0.6s var(--kurve);
}
#fortschritt-balken::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 42px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55));
  animation: funkeln 2.4s ease-in-out infinite;
}
@keyframes funkeln {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ---------- Bühne ---------- */
#app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
}
.screen {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 104px clamp(20px, 5vw, 56px) 92px;
  transition: transform 0.5s var(--kurve), opacity 0.4s ease;
  opacity: 1;
  transform: translateY(0);
}
.screen.von-rechts { opacity: 0; transform: translateY(30px); }
.screen.von-links  { opacity: 0; transform: translateY(-30px); }
.screen.nach-links  { opacity: 0; transform: translateY(-30px); pointer-events: none; }
.screen.nach-rechts { opacity: 0; transform: translateY(30px); pointer-events: none; }

.screen-innen { width: min(720px, 100%); }

/* Gestaffelter Eintritt der Screen-Elemente */
@keyframes aufstieg {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.steigt > * {
  animation: aufstieg 0.55s var(--kurve) both;
  animation-delay: calc(var(--i, 0) * 75ms + 60ms);
}

/* ---------- Frage ---------- */
.frage-nr {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 16px;
}
.nr-trenner {
  display: inline-block;
  width: 34px;
  height: 1.5px;
  background: var(--rot);
  transform-origin: left;
  animation: faden 0.7s var(--kurve) 0.35s both;
}
@keyframes faden {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
.frage-titel {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(27px, 4.4vw, 40px);
  line-height: 1.16;
  letter-spacing: 0.005em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.pflicht { color: var(--rot); }
.frage-text {
  color: var(--tinte-mittel);
  font-size: 16px;
  max-width: 58ch;
  margin-bottom: 6px;
}
.frage-text a { color: var(--tinte); }

/* ---------- Kacheln (Einstieg) ---------- */
.kacheln {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--weiss);
  border: 1px solid var(--linie);
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
  box-shadow: var(--schatten);
  transition: transform 0.25s var(--kurve), border-color 0.25s ease,
              box-shadow 0.25s ease, opacity 0.3s ease;
  overflow: hidden;
}
.kachel:hover, .kachel:focus-visible {
  transform: translateY(-4px);
  border-color: var(--tinte-mittel);
  box-shadow: var(--schatten-hoch);
}
.kachel-bild { display: block; aspect-ratio: 3 / 1.55; overflow: hidden; }
.kachel-bild img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.7s var(--kurve);
}
.kachel:hover .kachel-bild img, .kachel:focus-visible .kachel-bild img { transform: scale(1.05); }
.kachel-text { display: block; padding: 14px 16px 16px; min-width: 0; }
.kachel-text kbd { float: right; }
.kachel-text strong {
  position: relative;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: 4px;
  padding-bottom: 2px;
}
/* Unterstreichungs-Sweep — Teil des roten Fadens */
.kachel-text strong::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--rot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--kurve);
}
.kachel:hover .kachel-text strong::after,
.kachel:focus-visible .kachel-text strong::after,
.kachel.gewaehlt .kachel-text strong::after { transform: scaleX(1); }
.kachel-text > span { display: block; font-size: 14.5px; color: var(--tinte-mittel); }

.kachel.gewaehlt { border-color: var(--rot); box-shadow: var(--schatten-hoch); transform: translateY(-4px); }
.kachel.gewaehlt::after {
  content: "✓";
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--rot);
  color: var(--weiss);
  font-size: 14px;
  font-weight: 600;
  animation: aufstieg 0.25s var(--kurve) both;
}
.hat-wahl .kachel:not(.gewaehlt), .hat-wahl .option:not(.gewaehlt) {
  opacity: 0.35;
  transform: none;
}

/* ---------- Optionen ---------- */
.optionen { display: grid; gap: 10px; margin-top: 26px; max-width: 480px; }
.optionen.kompakt { gap: 8px; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-left: 3px solid transparent;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  color: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(23, 24, 26, 0.04);
  transition: border-color 0.2s ease, transform 0.2s var(--kurve),
              background 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
.option:hover, .option:focus-visible {
  border-color: var(--tinte-mittel);
  border-left-color: var(--rot);
  background: linear-gradient(90deg, var(--rot-hauch), var(--weiss) 45%);
  transform: translateX(4px);
  box-shadow: var(--schatten);
}
.option.gewaehlt {
  border-color: var(--rot);
  border-left-color: var(--rot);
  background: var(--rot-hauch);
  transform: translateX(4px);
}
.option.gewaehlt::after {
  content: "✓";
  margin-left: auto;
  color: var(--rot);
  font-weight: 600;
  animation: aufstieg 0.25s var(--kurve) both;
}

kbd {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--tinte-weich);
  border: 1px solid var(--linie);
  background: var(--papier);
  padding: 2px 7px;
  min-width: 22px;
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.option:hover kbd, .kachel:hover kbd { border-color: var(--rot); color: var(--rot); }
@media (hover: none) { kbd { display: none; } }

/* ---------- Eingaben ---------- */
.eingabe {
  display: block;
  width: 100%;
  max-width: 560px;
  margin-top: 22px;
  padding: 12px 2px;
  font: inherit;
  font-size: clamp(18px, 2.6vw, 24px);
  color: var(--tinte);
  background-image: linear-gradient(var(--rot), var(--rot)), linear-gradient(var(--linie), var(--linie));
  background-repeat: no-repeat;
  background-position: left bottom, left bottom;
  background-size: 0% 2px, 100% 2px;
  border: 0;
  outline: none;
  transition: background-size 0.45s var(--kurve);
}
.eingabe::placeholder { color: #b9b7b0; }
.eingabe:focus { background-size: 100% 2px, 100% 2px; }
.eingabe-lang { resize: vertical; min-height: 90px; line-height: 1.5; }

/* ---------- Upload ---------- */
.upload-zone {
  margin-top: 24px;
  max-width: 560px;
  border: 1.5px dashed var(--linie);
  background: rgba(255, 255, 255, 0.7);
  padding: 28px 22px;
  text-align: center;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--kurve);
}
.upload-zone:hover { border-color: var(--tinte-mittel); transform: translateY(-2px); }
.upload-zone.aktiv { border-color: var(--rot); background: var(--weiss); transform: translateY(-2px); }
.upload-zone label { cursor: pointer; display: block; }
.upload-zone label strong { color: var(--rot); text-decoration: underline; text-underline-offset: 3px; }
.upload-info { font-size: 13px; color: var(--tinte-weich); margin-top: 6px; }
.upload-liste { list-style: none; margin-top: 10px; font-size: 14.5px; text-align: left; }
.upload-liste li { padding: 6px 2px; border-top: 1px solid var(--papier-tief); animation: aufstieg 0.3s var(--kurve) both; }
.upload-liste em { color: var(--tinte-weich); font-style: normal; }

/* ---------- Einwilligung ---------- */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  max-width: 560px;
  font-size: 13.5px;
  color: var(--tinte-mittel);
  cursor: pointer;
}
.consent input { margin-top: 3px; accent-color: var(--rot); width: 16px; height: 16px; flex: none; }
.consent a { color: inherit; }

/* ---------- Knöpfe ---------- */
.ok-zeile { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.knopf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--weiss);
  background: var(--rot);
  border: 0;
  padding: 13px 30px;
  cursor: pointer;
  box-shadow: var(--schatten);
  transition: background 0.2s ease, transform 0.2s var(--kurve), box-shadow 0.2s ease;
}
.knopf:hover, .knopf:focus-visible {
  background: var(--rot-dunkel);
  transform: translateY(-2px);
  box-shadow: var(--schatten-hoch);
}
.knopf-pfeil { display: inline-block; transition: transform 0.25s var(--kurve); }
.knopf:hover .knopf-pfeil, .knopf:focus-visible .knopf-pfeil { transform: translateX(4px); }
.tasten-hinweis { font-size: 12.5px; color: var(--tinte-weich); margin-top: 10px; }
.ok-zeile .tasten-hinweis { margin-top: 0; }

.fehler {
  margin-top: 16px;
  font-size: 14px;
  color: var(--rot-dunkel);
  background: rgba(208, 21, 39, 0.07);
  border-left: 3px solid var(--rot);
  padding: 9px 12px;
  max-width: 560px;
}
.fehler.schuettel { animation: schuetteln 0.4s ease; }
@keyframes schuetteln {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

/* ---------- Zurück ---------- */
.zurueck {
  position: fixed;
  left: clamp(20px, 4vw, 48px);
  bottom: 22px;
  z-index: 20;
  font: inherit;
  font-size: 13.5px;
  color: var(--tinte-mittel);
  background: var(--weiss);
  border: 1px solid var(--linie);
  padding: 9px 16px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(23, 24, 26, 0.05);
  transition: border-color 0.2s ease, transform 0.2s var(--kurve);
  animation: aufstieg 0.4s var(--kurve) both;
}
.zurueck:hover { border-color: var(--tinte-mittel); transform: translateY(-2px); }

/* ---------- Fuß ---------- */
.fuss {
  position: fixed;
  right: clamp(20px, 4vw, 48px);
  bottom: 22px;
  z-index: 20;
  font-size: 12px;
  color: var(--tinte-weich);
}
.fuss a { color: inherit; text-decoration: none; margin-left: 14px; }
.fuss a:hover { text-decoration: underline; }

/* ---------- Abschluss / Danke ---------- */
.check-halter { color: var(--rot); margin-bottom: 18px; }
.check-kreis {
  stroke-dasharray: 189;
  stroke-dashoffset: 189;
  animation: zeichnen 0.9s var(--kurve) 0.25s forwards;
}
.check-haken {
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  animation: zeichnen 0.5s var(--kurve) 0.95s forwards;
}
@keyframes zeichnen { to { stroke-dashoffset: 0; } }

.lade-linie {
  width: min(280px, 60%);
  height: 2px;
  background: rgba(23, 24, 26, 0.1);
  margin: 18px 0 14px;
  position: relative;
  overflow: hidden;
}
.lade-linie::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rot);
  transform-origin: left;
  animation: laden 3s linear forwards;
}
@keyframes laden {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.shop-karte {
  margin-top: 18px;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--rot);
  box-shadow: var(--schatten);
  padding: 18px 22px;
  max-width: 620px;
}
.shop-karte p { margin: 3px 0; font-size: 15px; }
.shop-karte a { color: var(--tinte); text-decoration: none; border-bottom: 1px solid var(--linie); transition: border-color 0.2s ease; }
.shop-karte a:hover { border-color: var(--rot); }
.shop-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 4px !important;
}
.shop-name-klein { display: inline-block; min-width: 200px; font-weight: 600; font-size: 13.5px; }
.abschluss-gruss {
  margin-top: 22px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  color: var(--tinte-mittel);
}

/* ---------- Offene Punkte (nur während der Abstimmung sichtbar) ---------- */
.todo {
  margin-top: 28px;
  max-width: 620px;
  font-size: 13px;
  background: #fff8e6;
  border: 1px dashed #d9a900;
  padding: 12px 14px;
  color: #6b5500;
}
.todo pre {
  margin-top: 8px;
  max-height: 260px;
  overflow: auto;
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px;
}

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */
.unterseite {
  max-width: 760px;
  margin: 0 auto;
  padding: 130px clamp(20px, 5vw, 56px) 80px;
}
.unterseite h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 42px);
  margin-bottom: 24px;
}
.unterseite h2 { font-size: 17px; margin: 28px 0 8px; }
.unterseite p, .unterseite li { color: var(--tinte-mittel); margin-bottom: 10px; }
.unterseite a { color: var(--tinte); }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .kopf { padding-top: 14px; }
  .kopf .portal-label { display: none; }
  .screen { padding: 84px 20px 88px; align-items: flex-start; }
  .screen-innen { padding-top: 4vh; }
  .kacheln { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .kachel { flex-direction: row; align-items: stretch; }
  .kachel:hover { transform: none; }
  .kachel-bild { flex: 0 0 96px; aspect-ratio: auto; }
  .kachel-text { padding: 12px 14px; }
  .kachel-text > span { font-size: 13.5px; }
  .option:hover { transform: none; }
  .zurueck { bottom: 16px; }
  .fuss { display: none; }
}

/* ---------- Ruhe für alle, die es wünschen ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .steigt > * { animation: none !important; opacity: 1; transform: none; }
  .check-kreis, .check-haken { stroke-dashoffset: 0; }
  .nr-trenner { transform: scaleX(1); }
  .lade-linie::after { transform: scaleX(1); }
}
