/* Demo-Funnel – Gestaltung: Sehtest. Überschrift als Sehtafel, Rot-Grün-Abgleich als einziger Akzent.
   Marke über --marke (aus config['branding'], im <head> gesetzt). Keine externen Schriften. */
:root {
  --papier: #f6f8fa;
  --flaeche: #ffffff;
  --tinte: #17202e;
  --leise: #4f5b6b;
  --linie: #d6dce5;
  --rot: #b3261e;
  --gruen: #1e6b45;
  --bernstein: #a15c00;
  --bernstein-hell: #fff6e8;
  --fehler: #b3261e;
  --marke: #1f4e5f;
  --marke-tief: #163a47;
  --marke-hell: #eef4f6;
  --tafel: "Rockwell", "Roboto Slab", "Charter", "Bitstream Charter", "Sitka Text", Georgia, serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schritt-1: 0.5rem;
  --schritt-2: 1rem;
  --schritt-3: 1.5rem;
  --schritt-4: 2.5rem;
  --schritt-5: clamp(3rem, 2rem + 4vw, 6rem);
  --radius-feld: 6px;
  --radius-karte: 14px;
  --dauer: 220ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 400 1.0625rem/1.6 var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: var(--schritt-4) 1rem var(--schritt-5); }
a { color: var(--marke); text-underline-offset: 0.18em; }
a:hover { color: var(--marke-tief); }
:focus-visible { outline: 3px solid var(--marke); outline-offset: 2px; border-radius: 3px; }
.sprung { position: absolute; left: -999px; top: 0; background: var(--flaeche); padding: 0.5rem 1rem; z-index: 10; }
.sprung:focus { left: 1rem; }

/* Kopf + Rot-Grün-Streifen (Duochrom-Test, zugleich Weihnachtsfarben) */
.kopf { background: var(--flaeche); padding: 0.9rem 1rem; }
.kopf-marke { display: inline-flex; align-items: center; min-height: 32px; font: 700 1.05rem/1 var(--tafel); color: var(--tinte); text-decoration: none; max-width: 72rem; }
.kopf { display: flex; justify-content: center; }
.kopf-marke { width: 100%; }
.duochrom { height: 5px; background: linear-gradient(90deg, var(--rot) 0 50%, var(--gruen) 50% 100%); }

.fuss { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; justify-content: center; padding: var(--schritt-3) 1rem; color: var(--leise); font-size: 0.9rem; border-top: 1px solid var(--linie); }
.fuss a { color: var(--leise); }

/* Überschriften */
h1, h2, h3 { font-family: var(--tafel); line-height: 1.15; margin: 0 0 var(--schritt-2); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 var(--schritt-2); max-width: 62ch; }
.leise { color: var(--leise); }
.klein { font-size: 0.9rem; }

/* ---------- Landingpage: Sehtafel ---------- */
.held { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--schritt-4) var(--schritt-5); align-items: start; }
.held > div:first-child { container-type: inline-size; }
.sehtafel { margin: 0 0 var(--schritt-3); font-family: var(--tafel); font-weight: 700; text-align: center; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tinte); }
.sehtafel span { display: block; line-height: 1.04; }
.sehtafel .z1 { font-size: clamp(2.6rem, 1rem + 6.4vw, 5.6rem); letter-spacing: 0.04em; }
.sehtafel .z2 { font-size: clamp(2rem, 0.9rem + 4.4vw, 3.9rem); margin-top: 0.3em; }
.sehtafel .z3 { font-size: clamp(1.3rem, 0.8rem + 2.2vw, 2.25rem); margin-top: 0.55em; letter-spacing: 0.1em; }
.sehtafel .z4 { font-size: clamp(0.95rem, 0.8rem + 0.8vw, 1.3rem); margin-top: 0.9em; letter-spacing: 0.18em; }
.sehtafel .z5 { font-size: 0.8rem; margin-top: 1.1em; letter-spacing: 0.24em; color: var(--leise); font-weight: 400; }
.held-text { text-align: center; margin: 0 auto var(--schritt-3); color: var(--leise); }

.formular-karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-karte);
  padding: var(--schritt-3); box-shadow: 0 1px 0 var(--linie), 0 18px 40px -28px rgba(23, 32, 46, 0.45);
}
.formular-karte h2 { font-size: 1.35rem; margin-bottom: var(--schritt-1); }

/* Formularfelder */
.feld { margin: 0 0 var(--schritt-3); }
.feld label, .feld .label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.feld input[type=text], .feld input[type=email], .feld input[type=url], .feld input[type=tel], .feld input[type=password], .feld input[type=search], .feld textarea {
  width: 100%; font: inherit; color: var(--tinte); background: var(--flaeche);
  border: 1.5px solid var(--linie); border-radius: var(--radius-feld); padding: 0.7rem 0.8rem;
  transition: border-color var(--dauer);
}
.feld textarea { min-height: 8.5rem; resize: vertical; line-height: 1.5; }
.feld input:hover, .feld textarea:hover { border-color: #b7c0cd; }
.feld input:focus, .feld textarea:focus { border-color: var(--marke); outline: none; box-shadow: 0 0 0 3px var(--marke-hell); }
.feld [aria-invalid=true] { border-color: var(--fehler); }
.feld-fehler { color: var(--fehler); font-size: 0.92rem; margin: 0.35rem 0 0; }
.hinweis { font-size: 0.88rem; color: var(--leise); margin: 0.35rem 0 0; }
.haken { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; align-items: start; font-size: 0.95rem; }
.haken input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; accent-color: var(--marke); }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.meldung { border-radius: var(--radius-feld); padding: 0.8rem 1rem; margin: 0 0 var(--schritt-3); background: #fdecea; color: var(--fehler); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%;
  font: 600 1.05rem/1 var(--text); color: #fff; background: var(--marke); border: 0; border-radius: var(--radius-feld);
  padding: 1rem 1.25rem; cursor: pointer; text-decoration: none;
  transition: background-color var(--dauer), transform var(--dauer);
}
.knopf:hover { background: var(--marke-tief); color: #fff; }
.knopf:active { transform: translateY(1px); }
.knopf[disabled] { opacity: 0.7; cursor: progress; }

.ablauf { margin: var(--schritt-5) 0 0; padding: var(--schritt-4) 0 0; border-top: 1px solid var(--linie); }
.ablauf ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--schritt-3); }
.ablauf li { counter-increment: s; padding-left: 3rem; position: relative; }
.ablauf li::before {
  content: counter(s); position: absolute; left: 0; top: -0.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1.5px solid var(--tinte); display: grid; place-items: center; font: 700 1rem/1 var(--tafel);
}
.ablauf h3 { margin-bottom: 0.25rem; }
.ablauf p { color: var(--leise); margin: 0; }
.datenschutz { margin-top: var(--schritt-5); max-width: 62ch; }
.platzhalter { background: var(--bernstein-hell); border-left: 3px solid var(--bernstein); padding: 0.6rem 0.9rem; font-size: 0.9rem; }

/* ---------- Ladeseite: Scharfstellen ---------- */
.warten { max-width: 44rem; margin: 0 auto; text-align: center; }
.warten-tafel {
  font: 700 clamp(1.8rem, 1rem + 4vw, 3.4rem)/1.1 var(--tafel); letter-spacing: 0.05em; text-transform: uppercase;
  margin: var(--schritt-4) 0; overflow-wrap: anywhere; filter: blur(var(--unschaerfe, 9px));
  transition: filter 700ms ease-out;
}
.fortschritt { height: 8px; background: var(--linie); border-radius: 99px; overflow: hidden; margin: 0 auto var(--schritt-2); max-width: 28rem; }
.fortschritt-balken { height: 100%; width: var(--prozent, 4%); background: var(--marke); transition: width 600ms ease-out; }
.schritte { list-style: none; padding: 0; margin: var(--schritt-3) auto 0; max-width: 22rem; text-align: left; }
.schritte li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.6rem; padding: 0.35rem 0; color: var(--leise); }
.schritte li::before { content: ""; width: 0.9rem; height: 0.9rem; margin: 0.35rem 0 0 0.25rem; border-radius: 50%; border: 1.5px solid var(--linie); }
.schritte li.aktiv { color: var(--tinte); font-weight: 600; }
.schritte li.aktiv::before { border-color: var(--marke); border-width: 4px; }
.schritte li.fertig { color: var(--tinte); }
.schritte li.fertig::before { background: var(--gruen); border-color: var(--gruen); }

/* ---------- Korrekturseite ---------- */
.daten-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); gap: var(--schritt-4); align-items: start; }
.daten-raster form { min-width: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--schritt-4); }
legend { font: 700 1.25rem/1.2 var(--tafel); margin-bottom: var(--schritt-2); padding: 0; }
.zwei { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0 var(--schritt-2); }
.feld.fehlt input, .feld.fehlt textarea { border-color: var(--bernstein); background: var(--bernstein-hell); }
.quelle { font-size: 0.85rem; margin: 0.3rem 0 0; color: var(--leise); }
.feld.fehlt .quelle { color: var(--bernstein); font-weight: 600; }
.farbwahl { display: flex; align-items: center; gap: 0.6rem; }
.farbwahl input[type=color] { width: 3rem; height: 2.6rem; padding: 0.15rem; border: 1.5px solid var(--linie); border-radius: var(--radius-feld); background: var(--flaeche); cursor: pointer; }
.farbwahl input[type=text] { max-width: 8rem; font-family: ui-monospace, Menlo, monospace; }
.logo-feld { display: flex; gap: var(--schritt-2); align-items: center; flex-wrap: wrap; }
.logo-feld .logo-rahmen { width: 11rem; height: 5rem; border: 1.5px dashed var(--linie); border-radius: var(--radius-feld); display: grid; place-items: center; background: var(--flaeche); padding: 0.4rem; }
.logo-feld img { max-width: 100%; max-height: 100%; }
.logo-feld.dunkel .logo-rahmen { background: var(--marke); }

.vorschau { position: sticky; top: 1rem; }
.vorschau h2 { font-size: 1.1rem; }
.gutschein {
  --g-farbe: var(--marke); --g-akzent: var(--marke-tief);
  aspect-ratio: 1.75 / 1; background: var(--flaeche); border-radius: var(--radius-karte); position: relative; overflow: hidden;
  box-shadow: 0 1px 0 var(--linie), 0 24px 48px -30px rgba(23, 32, 46, 0.55); border: 1px solid var(--linie);
  display: grid; grid-template-rows: auto 1fr auto; padding: 1.1rem 1.2rem 1rem;
}
.gutschein::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 9px; background: var(--g-farbe); }
.gutschein::after { content: ""; position: absolute; right: -2.2rem; top: -2.2rem; width: 6rem; height: 6rem; border-radius: 50%; border: 10px solid var(--g-akzent); opacity: 0.9; }
.gutschein-logo { height: 2.4rem; max-width: 60%; display: flex; align-items: center; }
.gutschein-logo img { max-height: 100%; max-width: 100%; }
.gutschein-logo .name-text { font: 700 1rem/1.1 var(--tafel); color: var(--g-text, var(--g-farbe)); }
.gutschein-mitte { align-self: center; }
.gutschein-titel { font: 400 0.95rem/1 var(--tafel); letter-spacing: 0.2em; text-transform: uppercase; color: var(--leise); }
.gutschein-betrag { font: 700 2.6rem/1.05 var(--tafel); color: var(--g-text, var(--g-farbe)); }
.gutschein-fuss { font-size: 0.78rem; color: var(--leise); display: flex; justify-content: space-between; gap: 0.5rem; }
.vorschau-knopf { margin-top: var(--schritt-2); background: var(--g-farbe-knopf, var(--marke)); pointer-events: none; }

/* Sehtafel an der Spaltenbreite messen: „GUTSCHEINE“ füllt die Spalte, ohne überzulaufen. */
@supports (font-size: 1cqi) {
  .sehtafel .z1 { font-size: min(5.6rem, 12cqi); }
  .sehtafel .z2 { font-size: min(3.9rem, 8.6cqi); }
  .sehtafel .z3 { font-size: min(2.25rem, 5.4cqi); }
  .sehtafel .z4 { font-size: min(1.3rem, 3.6cqi); }
}

@media (max-width: 860px) {
  .held, .daten-raster { grid-template-columns: 1fr; }
  .ablauf ol { grid-template-columns: 1fr; }
  .vorschau { position: static; order: -1; }
}
@media (max-width: 420px) {
  .zwei { grid-template-columns: 1fr; }
  .formular-karte { padding: var(--schritt-2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .warten-tafel { filter: none; }
}
