/* =========================================================
   Muster Recruiting Funnel — Malermeister (m/w/d)
   Custom CSS, mobile-first, zero dependencies.
   ========================================================= */

@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand — NEUTRAL (Muster-Funnel). Eine Variable tauschen = komplettes Rebranding. */
  --c-primary: #4f46e5;        /* Indigo — neutral, modern, leicht austauschbar */
  --c-primary-hover: #4338ca;
  --c-primary-soft: #eef2ff;
  --c-accent: #f59e0b;         /* Warmer Akzent für Highlights */
  --c-ink: #18181b;
  --c-ink-soft: #3f3f46;
  --c-muted: #71717a;
  --c-line: #e4e4e7;
  --c-bg: #ffffff;
  --c-bg-alt: #f4f4f5;
  --c-success: #25d366;
  --c-success-hover: #1ebe5b;
  --c-error: #dc2626;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.16);

  /* Typo */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max-w: 480px;
  --header-h: 60px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg-alt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- App-Shell ---------- */
.app {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--s-4);
}

.header__inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}

.logo:hover { text-decoration: none; }

.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--c-primary);
  color: #fff;
  font-size: 15px;
}

.logo img,
.logo svg {
  height: 30px;
  width: auto;
  display: block;
}

.header__call {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid color-mix(in oklab, var(--c-primary) 20%, transparent);
}

.header__call:hover { text-decoration: none; }

/* ---------- Progress ---------- */
.progress {
  height: 4px;
  background: var(--c-line);
  position: relative;
  overflow: hidden;
}
.progress__bar {
  position: absolute;
  inset: 0;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--c-primary), #818cf8);
  border-radius: 0 4px 4px 0;
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Stage ---------- */
.stage {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: var(--s-5) var(--s-4) var(--s-7);
}

.stage__inner {
  width: 100%;
  max-width: var(--max-w);
}

.step {
  display: none;
  animation: fadeUp 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.step[data-active="true"] {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-primary);
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}

.step__title {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  margin-bottom: var(--s-3);
}

.step__sub {
  font-size: 16px;
  color: var(--c-ink-soft);
  margin-bottom: var(--s-5);
}

/* ---------- Hero (Step 0) ---------- */
.hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(24, 24, 27, 0.15) 0%, rgba(24, 24, 27, 0.55) 45%, rgba(17, 17, 20, 0.92) 100%),
    url("/img/hero-maler.jpg") center 22% / cover no-repeat,
    #1e1b4b;
  color: #fff;
  padding: var(--s-7) var(--s-5);
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: var(--s-5);
}

.hero__badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}

.hero__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--c-success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.25);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.25); }
  50%      { box-shadow: 0 0 0 8px rgba(37, 211, 102, 0.05); }
}

.hero__title {
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: var(--s-3);
}

.hero__sub {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--s-5);
  max-width: 36ch;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.trust-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.92);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
  color: var(--c-ink-soft);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.secondary-link:hover { color: var(--c-ink); text-decoration: none; }

/* ---------- Options (Single & Multi Choice) ---------- */
.options {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.option {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 18px 18px;
  min-height: 64px;
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg);
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-ink);
  transition: border-color 160ms, background 160ms, transform 120ms;
  width: 100%;
  position: relative;
}

.option:hover,
.option:focus-visible {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  outline: none;
}

.option:active { transform: scale(0.985); }

.option[data-selected="true"] {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
}

.option__mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--c-line);
  border-radius: var(--r-full);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms, background 160ms;
}

.option[data-multi="true"] .option__mark { border-radius: 6px; }

.option[data-selected="true"] .option__mark {
  border-color: var(--c-primary);
  background: var(--c-primary);
}

.option[data-selected="true"] .option__mark::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.option__text { flex: 1; }

.options__hint {
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: var(--s-3);
}

/* ---------- Benefit-Cards (Step 5) ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.benefit {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  text-align: left;
}

.benefit__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--c-primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  margin-bottom: var(--s-2);
}

.benefit__icon svg { width: 20px; height: 20px; }

.benefit__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.benefit__desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.45;
}

.note {
  font-size: 14px;
  color: var(--c-ink-soft);
  background: var(--c-bg);
  border-left: 3px solid var(--c-primary);
  padding: var(--s-3) var(--s-4);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: var(--s-5);
}

/* ---------- Persönliche Video-Botschaft ---------- */
.video-msg {
  margin-bottom: var(--s-5);
}

.video-msg__label {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: var(--s-3);
}

.video-msg__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
}

.video-msg__frame {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-md);
}

.video-msg__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Inputs ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--s-4);
}

.field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
}

.field__label .req { color: var(--c-primary); }

.field__hint { font-size: 12px; color: var(--c-muted); }

.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg);
  transition: border-color 160ms, box-shadow 160ms;
  min-height: 52px;
}

.input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px var(--c-primary-soft);
}

.input[aria-invalid="true"] {
  border-color: var(--c-error);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.field__error {
  font-size: 13px;
  color: var(--c-error);
  display: none;
}

.field[data-error="true"] .field__error { display: block; }

/* Honeypot (visually hidden, accessible to no one) */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Chip Group */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.chip {
  padding: 10px 16px;
  min-height: 44px;
  border: 2px solid var(--c-line);
  border-radius: var(--r-full);
  background: var(--c-bg);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 160ms, background 160ms;
}

.chip[data-selected="true"] {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  color: var(--c-primary);
}

/* Checkbox */
.checkbox {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-3) 0;
  font-size: 14px;
  color: var(--c-ink-soft);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox input { position: absolute; opacity: 0; pointer-events: none; }

.checkbox__mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: border-color 160ms, background 160ms;
}

.checkbox input:checked + .checkbox__mark {
  border-color: var(--c-primary);
  background: var(--c-primary);
}

.checkbox input:checked + .checkbox__mark::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox a { font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 16px 24px;
  min-height: 56px;
  border-radius: var(--r-full);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 160ms, transform 120ms, box-shadow 160ms;
  width: 100%;
  text-decoration: none;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}
.btn--primary:hover { background: var(--c-primary-hover); }

.btn--ghost {
  background: transparent;
  color: var(--c-ink-soft);
  border: 2px solid var(--c-line);
}
.btn--ghost:hover { border-color: var(--c-ink-soft); color: var(--c-ink); }

.btn--whatsapp {
  background: var(--c-success);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
}
.btn--whatsapp:hover { background: var(--c-success-hover); }

.btn--dark {
  background: var(--c-ink);
  color: #fff;
}
.btn--dark:hover { background: #0f172a; }

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
  box-shadow: none;
}

.btn__arrow { transition: transform 200ms; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Footer-Bar (Sticky Nav) ---------- */
.nav {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--c-bg-alt) 30%);
  padding: var(--s-4) var(--s-4) var(--s-5);
  display: flex;
  justify-content: center;
  z-index: 10;
}

.nav__inner {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.nav__back {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink-soft);
  transition: background 160ms, color 160ms;
}

.nav__back:hover { background: var(--c-bg-alt); color: var(--c-ink); }
.nav__back[hidden] { display: none; }

.nav__primary { flex: 1; }

/* ---------- Success / Outro ---------- */
.success {
  text-align: center;
  padding: var(--s-6) 0;
}

.success__icon {
  width: 96px;
  height: 96px;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  background: var(--c-success);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: popIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.success__icon::after {
  content: "";
  width: 36px;
  height: 18px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  border-radius: 2px;
  transform: rotate(-45deg) translate(2px, -4px);
  animation: checkDraw 400ms 220ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.success__icon::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: var(--c-success);
  opacity: 0.18;
  animation: ripple 1.6s 600ms ease-out infinite;
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes checkDraw {
  from { width: 0; height: 0; opacity: 0; }
}
@keyframes ripple {
  0%   { transform: scale(1);   opacity: 0.18; }
  100% { transform: scale(1.6); opacity: 0; }
}

.success__title {
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}

.success__sub {
  font-size: 16px;
  color: var(--c-ink-soft);
  margin-bottom: var(--s-6);
  max-width: 36ch;
  margin-inline: auto;
}

.success__actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}

.success__hint {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: var(--s-4);
}

/* ---------- Cookie Consent ---------- */
.consent {
  position: fixed;
  inset: auto var(--s-4) var(--s-4) var(--s-4);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-width: 460px;
  margin-inline: auto;
  transform: translateY(150%);
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.consent[data-show="true"] { transform: translateY(0); }

.consent__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--s-2);
}

.consent__text {
  font-size: 13px;
  color: var(--c-ink-soft);
  margin-bottom: var(--s-4);
  line-height: 1.5;
}

.consent__actions {
  display: flex;
  gap: var(--s-2);
}

.consent__actions .btn {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--s-5) var(--s-4) var(--s-6);
  text-align: center;
  font-size: 12px;
  color: var(--c-muted);
}

.footer a {
  color: var(--c-muted);
  margin: 0 var(--s-2);
}

/* ---------- Legal Pages ---------- */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-7) var(--s-4);
  font-size: 15px;
  color: var(--c-ink);
  line-height: 1.65;
}

.legal h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-5);
}

.legal h2 {
  font-size: 19px;
  font-weight: 700;
  margin-top: var(--s-6);
  margin-bottom: var(--s-3);
}

.legal p { margin-bottom: var(--s-3); }
.legal ul { padding-left: 20px; margin-bottom: var(--s-4); }
.legal li { margin-bottom: 4px; }

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Tablet/Desktop ---------- */
@media (min-width: 768px) {
  .stage { padding: var(--s-7) var(--s-5); }
  .hero { padding: var(--s-8) var(--s-7); min-height: 50dvh; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- View Transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
