/* ===========================================================
   Trosits Next — funnel.css (v3)
   Weißer Grund + Cityscape rechts (wie Website), alles zentriert,
   symmetrische Kachelreihen, generierte Icons, Opt-in ohne Martin.
   Erbt Tokens/Fonts aus styles.css.
   =========================================================== */

:root {
  --fn-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --fn-tile-border: rgba(20,41,70,0.12);
}

/* ---------- Seiten-Gerüst ---------- */
.fn-page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  overflow-x: hidden;
}

/* Cityscape rechts, nach links in Weiß ausgeblendet (Stilmittel der Website) */
.fn-city {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 44%, rgba(0,0,0,0.5) 72%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, transparent 44%, rgba(0,0,0,0.5) 72%, #000 100%);
}
.fn-city__img {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center right;
  /* kein CSS-Filter: die Stadtbilder sind bereits Schwarzweiß-Assets */
  opacity: 0.09;
}

.fn-top,
.fn-main,
.fn-progress,
.fn-foot { position: relative; z-index: 1; }

/* ---------- Kopf: Logo mittig ---------- */
.fn-top {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: clamp(22px, 4vw, 32px) 20px 0;
}
.fn-logo {
  display: inline-flex;
  align-items: center;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.fn-logo:hover { color: var(--navy); }
.fn-logo-img {
  height: 54px;
  width: auto;
  display: block;
}

/* ---------- Mitte ---------- */
.fn-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 60px) clamp(16px, 4vw, 24px);
}
.fn-stage {
  width: 100%;
  max-width: 940px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Host: Martin-Avatar + Sprechblase ---------- */
.fn-host {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  margin-bottom: clamp(28px, 4vw, 40px);
}
.fn-host[hidden] { display: none; }
.fn-host__person {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  padding-top: 2px;
}
.fn-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #FFFFFF;
  box-shadow: 0 12px 26px -12px rgba(20,41,70,0.5);
}
.fn-host__name {
  margin: 9px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  line-height: 1.2;
}
.fn-host__role {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--text-quiet);
  text-align: center;
}
.fn-bubble {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  padding: clamp(16px, 2.4vw, 21px) clamp(20px, 3vw, 28px);
  box-shadow: 0 10px 30px -14px rgba(20,41,70,0.22), 0 2px 8px rgba(20,41,70,0.05);
  max-width: 440px;
}
.fn-bubble__tail {
  position: absolute;
  left: -10px;
  top: 22px;
  width: 16px;
  height: 22px;
  color: #FFFFFF;
  filter: drop-shadow(-2px 1px 2px rgba(20,41,70,0.06));
}
.fn-q {
  margin: 0;
  font-family: "Switzer", sans-serif;
  font-size: clamp(18px, 2.4vw, 21px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  color: var(--navy);
}
.fn-q:focus { outline: none; }

/* Opt-in: zentrierte Überschrift statt Martin/Sprechblase */
.fn-contact-title {
  margin: 0 0 clamp(24px, 4vw, 34px);
  text-align: center;
  font-family: "Switzer", sans-serif;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.fn-contact-title:focus { outline: none; }

/* ---------- Form / Flow ---------- */
.fn-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fn-flow {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fn-step { width: 100%; display: flex; flex-direction: column; align-items: center; }
.fn-step[hidden] { display: none; }

/* Hinweis über den Kacheln, wenn Mehrfachauswahl aktiv ist */
.fn-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-deep);
  background: rgba(31,169,185,0.10);
  border: 1px solid rgba(31,169,185,0.22);
}
.fn-hint::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.fn-hint[hidden] { display: none; }

/* ---------- Große Icon-Kacheln (symmetrisch zentriert) ---------- */
.fn-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 880px;
}
.fn-tile {
  position: relative;
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: #FFFFFF;
  border: 2px solid var(--fn-tile-border);
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  transition: border-color .25s var(--fn-ease), box-shadow .35s var(--fn-ease), transform .35s var(--fn-ease);
}
.fn-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 24px 44px -24px rgba(20,41,70,0.42);
  transform: translateY(-3px);
}
.fn-tile:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31,169,185,0.22);
}
.fn-tile.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 20px 40px -24px rgba(31,169,185,0.55);
}
.fn-tile__top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 6px;
}
.fn-tile__icon {
  display: block;
  width: 46px;
  height: 46px;
  color: var(--accent);
  transition: color .25s var(--fn-ease);
}
.fn-tile.is-selected .fn-tile__icon { color: var(--accent-deep); }
.fn-tile__foot {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px 16px;
  margin-top: auto;
}
.fn-tile__radio {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 2px solid rgba(20,41,70,0.22);
  background: #FFFFFF;
  position: relative;
  transition: border-color .2s var(--fn-ease), background .2s var(--fn-ease);
}
.fn-tile__radio::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #FFFFFF;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity .2s var(--fn-ease), transform .2s var(--fn-ease);
}
.fn-tile.is-selected .fn-tile__radio { border-color: var(--accent); background: var(--accent); }
.fn-tile.is-selected .fn-tile__radio::after { opacity: 1; transform: scale(1); }
.fn-tile__label {
  font-family: "Switzer", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.fn-tile__tag {
  display: block;
  margin-top: 2px;
  font-family: "Switzer", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* ---------- Kontaktformular (offen, zentriert) ---------- */
.fn-fields {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.fn-field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.fn-label { font-size: 13px; font-weight: 500; color: var(--text-caption); }
.fn-label__opt { color: var(--text-quiet); font-weight: 400; }
.fn-input,
.fn-textarea {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(20,41,70,0.16);
  background: #FFFFFF;
  color: var(--navy);
  font: 400 15px/1.4 "Switzer", sans-serif;
  transition: border-color .2s var(--fn-ease), box-shadow .2s var(--fn-ease);
}
.fn-textarea { height: auto; min-height: 88px; padding: 13px 16px; resize: vertical; }
.fn-input::placeholder,
.fn-textarea::placeholder { color: #93a0b0; }
.fn-input:focus,
.fn-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31,169,185,0.16); }
.fn-consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  width: 100%;
  max-width: 460px;
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-body);
  text-align: left;
}
.fn-consent input { margin-top: 2px; width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--accent); }
.fn-consent a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.fn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ---------- Aktionen: Weiter / Absenden + Zurück (immer zentriert) ---------- */
.fn-actions {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(28px, 4vw, 38px);
}
.fn-next {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 22px 0 26px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--accent-bright) 0%, var(--accent) 52%, var(--accent-deep) 100%);
  color: #FFFFFF;
  font-family: "Switzer", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 18px 34px -16px rgba(31,169,185,0.65), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform .3s var(--fn-ease), box-shadow .3s var(--fn-ease), opacity .2s var(--fn-ease);
}
.fn-next__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: transform .3s var(--fn-ease);
}
.fn-next__arrow svg { width: 17px; height: 17px; }
.fn-next:hover { transform: translateY(-2px); box-shadow: 0 26px 44px -16px rgba(31,169,185,0.75), inset 0 1px 0 rgba(255,255,255,0.5); }
.fn-next:hover .fn-next__arrow { transform: translateX(3px); }
.fn-next:active { transform: translateY(0) scale(0.99); }
.fn-next[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 0 10px 22px -16px rgba(31,169,185,0.5); }
.fn-next[disabled]:hover .fn-next__arrow { transform: none; }

.fn-back {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-quiet);
  cursor: pointer;
  transition: color .2s var(--fn-ease);
}
.fn-back svg { width: 15px; height: 15px; }
.fn-back:hover { color: var(--navy); }
.fn-back[hidden] { display: none; }

.fn-status {
  width: 100%;
  max-width: 460px;
  margin: 14px auto 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-body);
  text-align: center;
  min-height: 1.2em;
}
.fn-status.is-error { color: #C0392B; }
.fn-status.is-success { color: var(--accent-deep); font-weight: 600; }

/* ---------- Trust-Bullets ---------- */
.fn-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: clamp(24px, 3vw, 32px) auto 0;
  padding: 0;
  list-style: none;
}
.fn-trust li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-caption);
}
.fn-trust__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--accent);
}
.fn-trust__ic svg { width: 16px; height: 16px; }

/* ---------- Lade-Overlay während des Versands ---------- */
.fn-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: clamp(18px, 4vw, 30px) 0;
  text-align: center;
}
.fn-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid rgba(31,169,185,0.18);
  border-top-color: var(--accent);
  animation: fn-spin 0.8s linear infinite;
  will-change: transform;
}
.fn-loading__text {
  font-family: "Switzer", sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-caption);
  letter-spacing: -0.005em;
}
@keyframes fn-spin { to { transform: rotate(360deg); } }

/* ---------- Erfolgs-Screen ---------- */
.fn-done {
  width: 100%;
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fn-done__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: rgba(31,169,185,0.14);
  color: var(--accent-deep);
  animation: fn-pop 0.5s var(--fn-ease) both;
}
.fn-done__icon svg { width: 32px; height: 32px; }
.fn-done__check {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: fn-draw 0.5s var(--fn-ease) 0.18s forwards;
}
@keyframes fn-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fn-draw { to { stroke-dashoffset: 0; } }
.fn-done h2 {
  margin: 0 0 8px;
  font-family: "Switzer", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.fn-done h2:focus { outline: none; }
.fn-done p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-body); }

/* ---------- Homepage-Button im Erfolgs-Screen ---------- */
.fn-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(22px, 4vw, 30px);
  height: 52px;
  padding: 0 26px 0 20px;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--accent-bright) 0%, var(--accent) 52%, var(--accent-deep) 100%);
  color: #FFFFFF;
  font-family: "Switzer", sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 18px 34px -16px rgba(31,169,185,0.65), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform .3s var(--fn-ease), box-shadow .3s var(--fn-ease);
}
.fn-home__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: transform .3s var(--fn-ease);
}
.fn-home__arrow svg { width: 17px; height: 17px; }
.fn-home:hover { transform: translateY(-2px); box-shadow: 0 26px 44px -16px rgba(31,169,185,0.75), inset 0 1px 0 rgba(255,255,255,0.5); }
.fn-home:hover .fn-home__arrow { transform: translateX(-3px); }
.fn-home:active { transform: translateY(0) scale(0.99); }
.fn-home:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(31,169,185,0.3), 0 18px 34px -16px rgba(31,169,185,0.65); }

/* ---------- Fortschritt unten ---------- */
.fn-progress {
  flex: 0 0 auto;
  padding: 8px clamp(20px, 5vw, 40px) clamp(22px, 4vw, 32px);
}
.fn-progress__inner { max-width: 760px; margin: 0 auto; }
.fn-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(20,41,70,0.09);
  overflow: hidden;
}
.fn-bar__fill {
  display: block;
  height: 100%;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent) 55%, var(--accent-bright));
  box-shadow: 0 0 14px rgba(31,169,185,0.45);
  transition: width .65s var(--fn-ease);
}
/* ---------- Minimaler Footer ---------- */
.fn-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  padding: 0 20px clamp(18px, 3vw, 26px);
  font-size: 12.5px;
  color: var(--text-quiet);
}
.fn-foot a { color: var(--text-body); transition: color .2s var(--fn-ease); }
.fn-foot a:hover { color: var(--accent-deep); }
.fn-foot__sep { color: rgba(20,41,70,0.2); }

/* ---------- FOUC-Schutz für GSAP-Reveals ---------- */
.fn-anim .fn-reveal { visibility: hidden; }

/* ---------- Tablet ---------- */
@media (max-width: 880px) {
  .fn-tiles { max-width: 440px; }
  .fn-tile { flex: 1 1 calc(50% - 8px); max-width: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .fn-host { gap: 12px; }
  .fn-avatar { width: 52px; height: 52px; }
  .fn-host__name, .fn-host__role { display: none; }
  .fn-bubble__tail { top: 18px; }

  .fn-tiles { flex-direction: column; flex-wrap: nowrap; gap: 11px; max-width: 460px; }
  .fn-tile { flex: 1 1 auto; width: 100%; flex-direction: row; align-items: center; }
  .fn-tile__top { padding: 12px 6px 12px 14px; }
  .fn-tile__icon { width: 38px; height: 38px; }
  .fn-tile__foot { padding: 14px 16px 14px 4px; margin-top: 0; flex: 1 1 auto; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fn-anim .fn-reveal { visibility: visible; }
  .fn-bar__fill, .fn-seg::after, .fn-tile, .fn-next, .fn-next__arrow, .fn-back { transition: none; }
  /* Spinner bleibt als einzige laufende Bewegung erhalten (dezent, ruhig). */
  .fn-spinner { animation-duration: 1.2s; }
  .fn-done__icon { animation: none; }
  .fn-done__check { stroke-dashoffset: 0; animation: none; }
}
