/* Fragebogen IPEK Gebäudetechnik. Schriften und Radius aus ipek5, Navy, Orange und Petrol aus dem Kundenlogo. */
@font-face { font-family: "Funnel Display"; src: url("schriften/funneldisplay.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("schriften/hankengrotesk.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Funnel Ersatz"; src: local("Arial"), local("Liberation Sans"); size-adjust: 105.5%; ascent-override: 94.8%; descent-override: 23.7%; line-gap-override: 0%; }
@font-face { font-family: "Hanken Ersatz"; src: local("Arial"), local("Liberation Sans"); size-adjust: 100.4%; ascent-override: 99.6%; descent-override: 29.9%; line-gap-override: 0%; }

:root {
  --blau: #2a7480;
  --nacht: #043055;
  --nacht-tief: #022340;
  --orange: #F07225;
  --grund: #f4f6fa;
  --weiss: #fff;
  --tinte: #043055;
  --leise: #41556e;
  --linie: #d2dbe8;
  --feldrand: #8696ad;
  --fehler: #a1261b;
  --r: 3px;
  --spalte: 640px;
  --rand: 16px;
  --kopf: 68px;
  --aktionen: 84px;
  --k-aus: cubic-bezier(.19, 1, .22, 1);
  --titel: "Funnel Display", "Funnel Ersatz", Arial, sans-serif;
  --text: "Hanken Grotesk", "Hanken Ersatz", Arial, sans-serif;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --rand: 32px; --kopf: 84px; --aktionen: 96px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--weiss); color: var(--tinte);
  font: 400 1.0625rem/1.5 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { background: var(--grund); } }
button, input, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg.sym { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }

.sprung { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 12px 16px; background: var(--nacht); color: #fff; border-radius: var(--r); text-decoration: none; }
.sprung:focus { top: 12px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 10; background: var(--weiss); }
.kopf-innen { max-width: calc(var(--spalte) + 2 * var(--rand)); margin: 0 auto; padding: 0 var(--rand); height: var(--kopf); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.marke { font: 700 1.125rem/1 var(--titel); letter-spacing: -.01em; color: var(--nacht); white-space: nowrap; }
.marke span { font-weight: 400; color: var(--leise); }
.stand { font-size: .9375rem; color: var(--leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.leiste { height: 2px; background: var(--linie); }
.leiste span { display: block; height: 100%; width: 0; background: var(--orange); transition: width 320ms var(--k-aus); }
@media (min-width: 720px) {
  .kopf { background: var(--grund); }
  .leiste { max-width: var(--spalte); margin: 0 auto; }
}

/* Bühne */
.buehne { flex: 1; width: 100%; max-width: calc(var(--spalte) + 2 * var(--rand)); margin: 0 auto; padding: 32px var(--rand) 40px; outline: none; }
@media (min-width: 720px) {
  .buehne { padding-top: 48px; }
  .karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r); padding: 48px 56px 56px; margin: 0 -56px; }
}
@media (min-width: 720px) and (max-width: 780px) { .karte { margin: 0 -24px; padding: 40px 24px 48px; } }

.schritt { display: grid; gap: 40px; }
.schritt.rein { animation: rein 300ms var(--k-aus) both; }
.schritt.rein.rueck { animation-name: rein-rueck; }
@keyframes rein { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes rein-rueck { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

.titelblock { display: grid; gap: 10px; }
.thema { margin: 0; font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blau); }
h1 { margin: 0; font: 600 clamp(1.875rem, 1.3rem + 2.4vw, 2.625rem)/1.08 var(--titel); letter-spacing: -.02em; color: var(--nacht); outline: none; text-wrap: balance; }
.unter { margin: 0; color: var(--leise); font-size: 1.0625rem; }

.frage { display: grid; gap: 14px; border: 0; margin: 0; padding: 0; min-width: 0; }
.frage-titel { padding: 0; margin: 0; font: 600 1.125rem/1.35 var(--text); color: var(--nacht); }
.frage-titel .frei { font-weight: 400; color: var(--leise); }
.frage-zusatz { margin: -6px 0 0; font-size: .9375rem; color: var(--leise); }

/* Auswahl: Kacheln und Chips teilen sich Rahmen und Haken */
.wahl { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; background: var(--weiss); border: 1px solid var(--feldrand); border-radius: var(--r); text-align: left; cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease; }
.wahl:hover { border-color: var(--nacht); }
.wahl:active { transform: scale(.98); }
.wahl[aria-pressed="true"] { border-color: var(--nacht); box-shadow: inset 0 0 0 1px var(--nacht); }
.wahl[aria-disabled="true"] { color: var(--leise); border-style: dashed; cursor: default; }
.wahl[aria-disabled="true"]:hover { border-color: var(--feldrand); }
.haken { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--feldrand); border-radius: var(--r); color: #fff; transition: background-color 160ms ease, border-color 160ms ease; }
.haken svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity 160ms ease, transform 200ms var(--k-aus); }
.wahl[aria-pressed="true"] .haken { background: var(--nacht); border-color: var(--nacht); }
.wahl[aria-pressed="true"] .haken svg { opacity: 1; transform: none; }
.wahl-text { min-width: 0; font-weight: 500; line-height: 1.3; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips .wahl { padding-right: 18px; }
.chips.spalten { display: grid; grid-template-columns: 1fr 1fr; }
.chips.spalten .wahl { min-width: 0; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .kacheln { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.kachel { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px; min-height: 108px; padding: 16px; }
.kachel .sym { color: var(--blau); width: 28px; height: 28px; stroke-width: 1.5; }
.kachel .haken { position: absolute; top: 14px; right: 14px; }
.kachel .wahl-text { font-size: 1.0625rem; font-weight: 600; color: var(--nacht); }
.kachel .wahl-klein { display: block; margin-top: 2px; font-size: .875rem; font-weight: 400; color: var(--leise); }

.zaehler { font-size: .9375rem; color: var(--leise); font-variant-numeric: tabular-nums; }
.textknopf { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; background: none; border: 0; color: var(--blau); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; }
.textknopf:hover { text-decoration-thickness: 2px; }

/* Felder */
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.feld { display: grid; gap: 6px; grid-column: span 2; min-width: 0; }
.feld.halb { grid-column: span 1; }
@media (max-width: 420px) { .feld.halb.umbruch { grid-column: span 2; } }
.feld label { font-size: .9375rem; font-weight: 600; color: var(--nacht); }
.feld label .frei { font-weight: 400; color: var(--leise); }
.eingabe { width: 100%; min-height: 52px; padding: 12px 14px; background: var(--weiss); border: 1px solid var(--feldrand); border-radius: var(--r); font-size: 1.0625rem; line-height: 1.4; color: var(--tinte); transition: border-color 160ms ease, box-shadow 160ms ease; -webkit-appearance: none; appearance: none; }
.eingabe::placeholder { color: #6b7a90; }
.eingabe:hover { border-color: var(--nacht); }
.eingabe:focus { outline: none; border-color: var(--blau); box-shadow: inset 0 0 0 1px var(--blau); }
textarea.eingabe { min-height: 104px; resize: vertical; }
.feld.fehlt .eingabe { border-color: var(--fehler); box-shadow: inset 0 0 0 1px var(--fehler); }
.meldung { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--fehler); }
.pflicht-hinweis { margin: -4px 0 0; font-size: .9375rem; color: var(--leise); }
.aufklapp { display: grid; gap: 14px; animation: aufklapp 260ms var(--k-aus) both; }
@keyframes aufklapp { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Hochladen */
.ablage { position: relative; display: grid; justify-items: center; gap: 8px; padding: 28px 16px; text-align: center; border: 1px dashed var(--feldrand); border-radius: var(--r); background: var(--weiss); cursor: pointer; transition: border-color 160ms ease; }
.ablage:hover, .ablage.ueber { border-color: var(--nacht); border-style: solid; }
.ablage:focus-within { outline: 2px solid var(--blau); outline-offset: 2px; }
.ablage .sym { color: var(--blau); width: 28px; height: 28px; }
.ablage strong { font-weight: 600; color: var(--nacht); }
.ablage span { font-size: .9375rem; color: var(--leise); }
.ablage input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.vorschau { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .vorschau { grid-template-columns: repeat(4, 1fr); } }
.vorschau li { position: relative; aspect-ratio: 1; border: 1px solid var(--linie); border-radius: var(--r); overflow: hidden; background: var(--grund); animation: aufklapp 240ms var(--k-aus) both; }
.vorschau img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vorschau .pdf { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 8px; text-align: center; color: var(--leise); font-size: .8125rem; }
.vorschau .pdf .sym { color: var(--blau); }
.vorschau .pdf span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weg { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.weg span { width: 28px; height: 28px; display: grid; place-items: center; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--r); color: var(--nacht); }
.weg svg { width: 16px; height: 16px; stroke-width: 2.25; }
.whatsapp { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--linie); color: var(--leise); font-size: .9375rem; }
.whatsapp .sym { width: 20px; height: 20px; color: var(--blau); margin-top: 1px; }
.platzhalter { display: inline-block; padding: 0 6px; background: #fff1b8; border: 1px dashed #8a6d00; border-radius: var(--r); color: #4a3a00; font-weight: 700; }

/* Start */
.start { display: grid; gap: 28px; padding-top: 4vh; }
.start .naht { width: 40px; height: 4px; background: var(--orange); border-radius: 1px; }
.start h1 { font-size: clamp(2.5rem, 1.6rem + 4.4vw, 3.75rem); }
.start .unter { font-size: 1.1875rem; max-width: 30ch; }
.fakten { display: grid; margin: 4px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--linie); }
.fakten li { display: flex; align-items: center; gap: 14px; min-height: 56px; border-bottom: 1px solid var(--linie); font-weight: 500; }
.fakten .sym { color: var(--blau); width: 22px; height: 22px; }
.fakten-titel { margin: 0 0 -16px; font-size: .9375rem; color: var(--leise); }
.start-aktion { display: grid; gap: 14px; justify-items: start; }
.leise-zeile { margin: 0; font-size: .9375rem; color: var(--leise); }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: var(--r); font: 600 1.0625rem/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 120ms ease, box-shadow 160ms ease; }
.knopf:active { transform: scale(.97); }
.knopf .sym { width: 20px; height: 20px; stroke-width: 2; transition: transform 240ms var(--k-aus); }
.knopf-haupt { background: var(--nacht); color: #fff; }
.knopf-haupt:hover .sym:last-child { transform: translateX(3px); }
.knopf-haupt[aria-busy="true"] { cursor: progress; }
.knopf-zweit { background: var(--weiss); color: var(--nacht); box-shadow: inset 0 0 0 1px var(--feldrand); }
.knopf-zweit:hover { box-shadow: inset 0 0 0 1px var(--nacht); }
.knopf-zurueck { width: 52px; padding: 0; background: var(--weiss); color: var(--nacht); box-shadow: inset 0 0 0 1px var(--feldrand); flex: none; }
.knopf-zurueck:hover { box-shadow: inset 0 0 0 1px var(--nacht); }
.knopf-zurueck:hover .sym { transform: translateX(-3px); }

.aktionen { position: sticky; bottom: 0; z-index: 10; background: var(--weiss); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); }
.aktionen-innen { max-width: calc(var(--spalte) + 2 * var(--rand)); margin: 0 auto; padding: 16px var(--rand); display: flex; gap: 10px; }
.aktionen .knopf-haupt { flex: 1; }
@media (min-width: 720px) {
  .aktionen { position: static; background: none; border: 0; }
  .aktionen-innen { padding-top: 0; justify-content: space-between; }
  .aktionen .knopf-haupt { flex: 0 1 auto; min-width: 220px; }
}

/* Zusammenfassung */
.uebersicht { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--linie); }
.ue-abschnitt { padding: 22px 0; border-bottom: 1px solid var(--linie); display: grid; gap: 12px; }
.ue-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ue-kopf h2 { margin: 0; font: 600 1.1875rem/1.2 var(--titel); color: var(--nacht); }
.ue-kopf .textknopf { gap: 6px; }
.ue-kopf .textknopf .sym { width: 16px; height: 16px; }
.ue-zeilen { display: grid; gap: 10px; margin: 0; }
.ue-zeile { display: grid; gap: 2px; }
.ue-zeile dt { font-size: .875rem; color: var(--leise); }
.ue-zeile dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.ue-zeile dd.offen { font-weight: 400; color: var(--leise); }
@media (min-width: 720px) { .ue-zeile { grid-template-columns: 220px 1fr; gap: 16px; } }
.ue-bilder { display: flex; flex-wrap: wrap; gap: 8px; }
.ue-bilder img, .ue-bilder .ue-pdf { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--linie); border-radius: var(--r); }
.ue-bilder .ue-pdf { display: grid; place-items: center; color: var(--blau); background: var(--grund); }
.senden-fehler { margin: 0; padding: 14px 16px; border: 1px solid var(--fehler); border-radius: var(--r); color: var(--fehler); font-weight: 600; }

/* Dank */
.dank { display: grid; gap: 24px; padding-top: 6vh; }
.dank .marke-haken { width: 64px; height: 64px; display: grid; place-items: center; border: 2px solid var(--nacht); border-radius: var(--r); color: var(--nacht); }
.dank .marke-haken svg { width: 32px; height: 32px; stroke-width: 2.25; }
.dank .marke-haken path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: zeichnen 520ms 160ms var(--k-aus) forwards; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
.dank .naht { width: 40px; height: 4px; background: var(--orange); border-radius: 1px; }

/* Fuß und Hinweis */
.fuss { max-width: calc(var(--spalte) + 2 * var(--rand)); width: 100%; margin: 0 auto; padding: 8px var(--rand) 24px; font-size: .875rem; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; color: var(--leise); text-underline-offset: 3px; }
.hinweis { position: fixed; left: 50%; bottom: calc(var(--aktionen) + 16px + env(safe-area-inset-bottom)); z-index: 20; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 18px; background: var(--nacht); color: #fff; border-radius: var(--r); font-size: .9375rem; width: max-content; text-align: center; animation: aufklapp 240ms var(--k-aus) both; }
.ohne-js { padding: 24px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .dank .marke-haken path { stroke-dashoffset: 0; }
}

.sr, .falle { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.falle { left: -9999px; }
.schritt > .frage.feld { grid-column: auto; }
legend.frage-titel { margin-bottom: 14px; }
legend.frage-titel + .frage-zusatz { margin-top: -10px; }

/* Logo im Kopf, Seitenverhältnis bleibt */
.logo { display: block; height: 52px; width: auto; }
@media (min-width: 720px) { .logo { height: 64px; } }

/* Flyer-Angaben zum Bestätigen */
.flyer { display: grid; gap: 20px; }
.fl-liste, .fl-bereiche { margin: 0; display: grid; border-top: 1px solid var(--linie); }
.fl-zeile, .fl-bereich { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.fl-zeile dt, .fl-bereich dt { font-size: .875rem; color: var(--leise); }
.fl-zeile dd, .fl-bereich dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }
.fl-bereich dt { font-weight: 600; color: var(--nacht); font-size: 1rem; }
.fl-bereich dd { font-weight: 400; color: var(--leise); }
@media (min-width: 720px) { .fl-zeile, .fl-bereich { grid-template-columns: 170px 1fr; gap: 16px; } }
@media (min-width: 720px) { .fl-bereiche { grid-template-columns: 1fr 1fr; column-gap: 24px; } .fl-bereich { grid-template-columns: 1fr; } }
.ue-zeile dd .ue-bilder { margin-top: 8px; }
