/* webdesign.tkai.tech — Stand 01.09.2026
   Farbkonzept und Typografie nach "Redesign-Plan webdesign.tkai.tech.md".
   Keine fremden Hosts, keine Bibliothek: Prüfpunkt C8 gilt auch für uns. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-variable.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Inter Tight";
  src: url("fonts/inter-tight-latin-variable.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}

:root {
  /* Dunkelwelt */
  --tinte:        #0B0908;
  --tinte-hoch:   #141010;
  --karte:        #1A1513;
  --karte-hoch:   #241D19;
  --linie:        #2B2320;
  --linie-hell:   #3D342C;
  --text:         #F5F0E9;
  --leise:        #A79C93;

  /* Gold, zweistufig */
  --gold:         #E6B25C;
  --gold-tief:    #A9761F;
  --gold-schwach: rgba(230, 178, 92, .10);

  /* Hellwelt */
  --papier:       #F6F2EA;
  --papier-tief:  #EDE7DC;
  --papier-karte: #FFFDF8;
  --papier-linie: #DED5C6;
  --dunkel:       #1A1512;
  --dunkel-leise: #5C534B;
  --gold-papier:  #8A5E15;

  /* Befundfarben — nur in Diagrammen und der Report-Vorschau */
  --gut:      #86C08F;
  --achtung:  #E4915F;
  --kritisch: #D9605A;
  --stahl:    #6E8CA0;

  --maxw: 1120px;
  --sp: clamp(1.1rem, .8rem + 1.4vw, 1.8rem);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;
  --schwung: cubic-bezier(.16, 1, .3, 1);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Muss vor allen display-Regeln stehen und sie schlagen: sonst überschreibt
   ein `display: flex` das eingebaute Verhalten von [hidden] — die Stufe 2 des
   Formulars und die zweite Report-Reihe wären trotz `hidden` sichtbar. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--tinte);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp); }

h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.018em; }
h1 { font-size: clamp(2.4rem, 1.5rem + 3.9vw, 4.6rem); line-height: 1.03; }
h1 em { font-style: normal; color: var(--gold); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.3vw, 3.1rem); line-height: 1.1; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.08rem; letter-spacing: -.004em; }

p { margin: 0 0 1rem; max-width: 66ch; }
a { color: var(--gold); text-underline-offset: 3px; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.lead { font-size: 1.2rem; color: var(--leise); line-height: 1.6; max-width: 58ch; }
.zahl { font-variant-numeric: tabular-nums; }

/* ── Sektionen und der Hell/Dunkel-Wechsel ───────────────────────── */

section { padding: clamp(3.4rem, 8vw, 6.5rem) 0; }

.hell {
  background: var(--papier);
  color: var(--dunkel);
}
.hell h1, .hell h2 { color: var(--dunkel); }
.hell p { color: var(--dunkel-leise); }
.hell a { color: var(--gold-papier); }
.hell .lead { color: var(--dunkel-leise); }
.hell .abschnitt-marke { color: var(--gold-papier); }

.abschnitt-marke {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 600; color: var(--gold); margin-bottom: .9rem;
}
.abschnitt-kopf { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.abschnitt-kopf p { margin-top: .9rem; }

/* ── Kopfzeile ───────────────────────────────────────────────────── */

.kopf {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 9, 8, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--schwung), background .3s var(--schwung);
}
.kopf.gescrollt { border-bottom-color: var(--linie); }
.kopf .container { display: flex; align-items: center; gap: 1.2rem; height: 62px; }
.wortmarke {
  font-family: var(--display); font-size: 1.28rem; font-weight: 500;
  color: var(--text); text-decoration: none; letter-spacing: -.01em;
}
.wortmarke span { color: var(--gold); }
.wortmarke small {
  font-family: var(--sans); font-size: .62em; font-weight: 500;
  color: var(--leise); letter-spacing: .01em;
}
.kopf nav { margin-left: auto; display: flex; gap: 1.6rem; align-items: center; }
.kopf nav a {
  color: var(--leise); text-decoration: none; font-size: .93rem;
  transition: color .2s var(--schwung);
}
.kopf nav a:hover { color: var(--text); }
/* `.kopf nav a` ist spezifischer als `.knopf` — ohne diese Zeile stünde
   blasser Text auf der goldenen Fläche. */
.kopf nav a.knopf { color: #14100D; }
@media (max-width: 760px) { .kopf nav a.nur-breit { display: none; } }

/* ── Knöpfe ──────────────────────────────────────────────────────── */

.knopf, button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .78rem 1.5rem; border-radius: 999px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  background: var(--gold); color: #14100D;
  border: 0; cursor: pointer; text-decoration: none;
  transition: transform .3s var(--schwung), background .3s var(--schwung);
}
.knopf:hover, button[type="submit"]:hover { background: #F0C173; transform: translateY(-2px); }
.knopf-leise {
  background: transparent; color: var(--text);
  border: 1px solid var(--linie-hell);
}
.knopf-leise:hover { background: var(--karte-hoch); border-color: var(--gold-tief); }
.hell .knopf-leise { color: var(--dunkel); border-color: var(--papier-linie); }
.hell .knopf-leise:hover { background: var(--papier-tief); }

/* ── Aufmacher ───────────────────────────────────────────────────── */

.aufmacher { position: relative; overflow: hidden; padding: 0; }
.aufmacher-medien { position: absolute; inset: 0; z-index: 0; }
.aufmacher-medien img, .aufmacher-medien video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.aufmacher-medien video { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--schwung); }
.aufmacher-medien video.sichtbar { opacity: 1; }
/* Der Text steht links: dort ist das Bild bewusst leer. */
.aufmacher-schleier {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, var(--tinte) 26%, rgba(11,9,8,.82) 48%, rgba(11,9,8,.35) 78%);
}
.aufmacher .container { position: relative; z-index: 2; }
.aufmacher-inhalt {
  padding: clamp(4.5rem, 12vw, 8.5rem) 0 clamp(3.4rem, 8vw, 5.5rem);
  max-width: 46rem;
}
.aufmacher h1 { margin-bottom: 1.4rem; }
.aufmacher .knopfzeile { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.9rem; }

.merkmalzeile {
  display: flex; flex-wrap: wrap; gap: .6rem 1.9rem;
  margin-top: 2.4rem; padding-top: 1.5rem;
  border-top: 1px solid var(--linie);
  font-size: .9rem; color: var(--leise);
}
.merkmalzeile b { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .aufmacher-schleier { background: linear-gradient(180deg, rgba(11,9,8,.62) 0%, rgba(11,9,8,.93) 62%, var(--tinte) 100%); }
}

/* ── Karten allgemein ────────────────────────────────────────────── */

.raster { display: grid; gap: 1rem; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
/* Vier Referenzen brauchen zwei feste Spalten — mit auto-fit stünden sie
   auf breiten Schirmen als 3 + 1 da, und die vierte Karte wirkt wie ein Rest. */
@media (min-width: 900px) { .raster-referenzen { grid-template-columns: 1fr 1fr; } }

.karte {
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1.5rem 1.6rem;
}
.karte h3 { margin-bottom: .5rem; }
.karte p { color: var(--leise); font-size: .97rem; margin-bottom: 0; }
.hell .karte {
  background: var(--papier-karte); border-color: var(--papier-linie);
  box-shadow: 0 1px 0 rgba(255,255,255,.7), 0 14px 30px -26px rgba(60,45,20,.45);
}
.hell .karte p { color: var(--dunkel-leise); }
.hell .karte h3 { color: var(--dunkel); }

/* ── Der Check: sechs Bereiche zum Aufklappen ────────────────────── */

.zaehler {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.4rem, 2rem + 6vw, 6.5rem); line-height: 1;
  color: var(--gold-papier); font-variant-numeric: tabular-nums;
}
.zaehler-zeile { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.zaehler-zeile span { font-size: 1.05rem; color: var(--dunkel-leise); }

.bereich {
  background: var(--papier-karte); border: 1px solid var(--papier-linie);
  border-radius: var(--radius); overflow: hidden;
}
.bereich summary {
  cursor: pointer; padding: 1.1rem 1.3rem; list-style: none;
  display: flex; align-items: baseline; gap: .85rem;
  font-weight: 600; color: var(--dunkel);
}
.bereich summary::-webkit-details-marker { display: none; }
.bereich summary::after {
  content: "+"; margin-left: auto; color: var(--gold-papier);
  font-weight: 400; font-size: 1.35rem; line-height: 1;
  transition: transform .3s var(--schwung);
}
.bereich[open] summary::after { transform: rotate(45deg); }
.bereich .kennung {
  font-family: var(--display); font-size: 1.1rem; color: var(--gold-papier);
  min-width: 1.1em;
}
.bereich ul {
  margin: 0; padding: 0 1.3rem 1.2rem 3.2rem;
  color: var(--dunkel-leise); font-size: .95rem;
}
.bereich li { margin-bottom: .32rem; }
.bereich li::marker { color: var(--papier-linie); }

/* ── Report-Vorschau ─────────────────────────────────────────────── */

.report-schalter { display: flex; gap: .5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.report-schalter button {
  padding: .5rem 1.05rem; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--papier-linie);
  color: var(--dunkel-leise); font-family: var(--sans); font-size: .92rem;
  transition: all .25s var(--schwung);
}
.report-schalter button[aria-pressed="true"] {
  background: var(--dunkel); border-color: var(--dunkel); color: var(--papier);
}
.report-blaetter {
  display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
.report-blaetter > * { scroll-snap-align: start; flex: 0 0 auto; }
.report-blatt {
  width: 260px; height: auto; display: block;
  background: #fff; border: 1px solid var(--papier-linie);
  border-radius: 4px; box-shadow: 0 18px 34px -28px rgba(60,45,20,.6);
  transition: transform .3s var(--schwung), box-shadow .3s var(--schwung);
}
.report-blatt:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -24px rgba(60,45,20,.7);
}
.report-hinweis { font-size: .88rem; color: var(--dunkel-leise); margin-top: .4rem; }

/* ── Workflow: Sticky-Scroll ─────────────────────────────────────── */

.workflow { display: grid; gap: 2.6rem; }
@media (min-width: 900px) {
  /* Kein `align-items: start` — die linke Spalte muss über die volle Höhe der
     Schritte reichen, sonst hat `position: sticky` keinen Raum zum Kleben und
     die Bühne scrollt nach dem ersten Schritt aus dem Bild. Genau das war der
     Fehler: Die letzten Kapitelbilder bekam niemand zu sehen. */
  .workflow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3.5rem; }
  .workflow-spalte { height: 100%; }
}
.workflow-buehne {
  aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden;
  background: var(--tinte-hoch); position: relative;
  border: 1px solid var(--papier-linie);
}
.workflow-buehne img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s var(--schwung);
}
.workflow-buehne img.aktiv { opacity: 1; }

/* Muss NACH der Basisregel stehen: dort setzt `position: relative` die
   Bildbühne als Bezugspunkt für die Kapitelbilder, und bei gleicher
   Spezifität gewinnt die spätere Regel. Stand `sticky` weiter oben, wurde es
   still überschrieben — die Bühne scrollte weg und die letzten Kapitelbilder
   sah niemand. */
@media (min-width: 900px) {
  .workflow-buehne { position: sticky; top: 96px; }
}

.schritt {
  padding: 1.6rem 0 1.7rem;
  border-bottom: 1px solid var(--papier-linie);
  opacity: .45; transition: opacity .5s var(--schwung);
}
.schritt.aktiv { opacity: 1; }
.schritt:last-child { border-bottom: 0; }
.schritt-kopf { display: flex; align-items: baseline; gap: .9rem; margin-bottom: .5rem; }
.schritt-nr {
  font-family: var(--display); font-size: 1.5rem; color: var(--gold-papier);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.schritt h3 { font-size: 1.2rem; color: var(--dunkel); }
.schritt-dauer { margin-left: auto; font-size: .84rem; color: var(--dunkel-leise); white-space: nowrap; }
.schritt p { font-size: .98rem; margin-bottom: .7rem; }
.schritt-braucht {
  font-size: .87rem; color: var(--dunkel-leise);
  padding-left: .85rem; border-left: 2px solid var(--gold-papier);
}
.schritt-braucht b { color: var(--dunkel); font-weight: 600; }

.zeitstrahl {
  margin-top: 2.6rem; padding: 1.3rem 1.5rem;
  background: var(--papier-tief); border-radius: var(--radius);
  font-family: var(--display); font-size: 1.35rem; color: var(--dunkel);
}

/* ── Preise ──────────────────────────────────────────────────────── */

.preis-karte { display: flex; flex-direction: column; }
.preis-karte.anker { border-color: var(--gold-papier); border-width: 2px; }
.preis-marke {
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-papier); margin-bottom: .6rem;
  min-height: 1.1em;
}
.preis {
  font-family: var(--display); font-size: 2.5rem; line-height: 1;
  color: var(--dunkel); font-variant-numeric: tabular-nums; margin: .7rem 0 .2rem;
}
.preis-netto { font-size: .84rem; color: var(--dunkel-leise); }
.preis-karte ul { list-style: none; padding: 0; margin: 1.2rem 0 0; font-size: .95rem; }
.preis-karte li { padding: .38rem 0 .38rem 1.4rem; position: relative; color: var(--dunkel-leise); }
.preis-karte li::before {
  content: ""; position: absolute; left: 0; top: .95em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold-papier);
}
.preis-fuss { margin-top: 2rem; font-size: .95rem; }

/* ── Referenzen ──────────────────────────────────────────────────── */

.ref-karte {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--linie); border-radius: var(--radius);
  overflow: hidden; background: var(--karte);
  transition: transform .4s var(--schwung), border-color .4s var(--schwung);
}
.ref-karte:hover, .ref-karte:focus-visible {
  transform: translateY(-6px); border-color: var(--gold-tief);
}
.ref-buehne { position: relative; aspect-ratio: 8 / 5; background: var(--tinte-hoch); }
.ref-buehne img, .ref-buehne video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ref-buehne video { opacity: 0; transition: opacity .4s var(--schwung); }
.ref-karte:hover .ref-buehne video.bereit,
.ref-karte:focus-visible .ref-buehne video.bereit { opacity: 1; }
.ref-text { padding: 1.15rem 1.3rem 1.4rem; }
.ref-text h3 { margin-bottom: .35rem; }
.ref-text p { font-size: .93rem; color: var(--leise); margin-bottom: .5rem; }
.ref-schwer { font-size: .87rem; color: var(--gold); }

/* ── Person ──────────────────────────────────────────────────────── */

.person { display: grid; gap: 2rem; }
@media (min-width: 780px) { .person { grid-template-columns: 220px 1fr; gap: 2.8rem; } }
.person-bild {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--karte); border: 1px solid var(--linie);
  display: grid; place-items: center; color: var(--leise);
  font-size: .85rem; text-align: center; padding: 1rem;
}
.person-bild img { width: 100%; height: 100%; object-fit: cover; }
.zitat {
  margin: 1.6rem 0 0; padding-left: 1.3rem;
  border-left: 2px solid var(--gold-tief);
  font-family: var(--display); font-size: 1.22rem; line-height: 1.5;
  color: var(--text); max-width: 54ch;
}

/* ── Fragen ──────────────────────────────────────────────────────── */

.frage {
  border-bottom: 1px solid var(--papier-linie);
}
.frage summary {
  cursor: pointer; list-style: none; padding: 1.05rem 0;
  font-weight: 600; color: var(--dunkel); display: flex; gap: 1rem;
}
.frage summary::-webkit-details-marker { display: none; }
.frage summary::after {
  content: "+"; margin-left: auto; color: var(--gold-papier);
  font-size: 1.3rem; font-weight: 400; line-height: 1;
  transition: transform .3s var(--schwung);
}
.frage[open] summary::after { transform: rotate(45deg); }
.frage p { padding-bottom: 1.1rem; font-size: .98rem; }

/* ── Formular ────────────────────────────────────────────────────── */

.check-form {
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem);
  max-width: 44rem;
}
.check-form fieldset { border: 0; margin: 0; padding: 0; }
.check-form legend {
  font-family: var(--display); font-size: 1.5rem; padding: 0 0 1rem;
  color: var(--text);
}
.feld { margin-bottom: 1rem; }
.feld-paar { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .feld-paar { grid-template-columns: 1fr 1fr; } }
.check-form label { display: block; font-size: .93rem; margin-bottom: .35rem; font-weight: 500; }
.check-form .hinweis { display: block; font-weight: 400; color: var(--leise); font-size: .85rem; }
.pflicht { color: var(--gold); }
.check-form input[type="text"], .check-form input[type="email"],
.check-form input[type="tel"], .check-form select, .check-form textarea {
  width: 100%; padding: .72rem .85rem;
  background: var(--tinte-hoch); color: var(--text);
  border: 1px solid var(--linie-hell); border-radius: 7px;
  font-family: var(--sans); font-size: 1rem;
  transition: border-color .25s var(--schwung);
}
.check-form input:focus, .check-form select:focus, .check-form textarea:focus {
  border-color: var(--gold); outline: none;
}
.check-form .kasten { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1rem; }
.check-form .kasten input { margin-top: .32em; accent-color: var(--gold); flex: none; }
.check-form .kasten label { margin: 0; font-weight: 400; font-size: .93rem; }
.check-form button[type="submit"] { width: 100%; margin-top: .6rem; }
.form-fuss { font-size: .86rem; color: var(--leise); margin: 1rem 0 0; }
.feld-fehler { display: block; color: var(--kritisch); font-size: .86rem; margin-top: .3rem; }
.fehler-box {
  background: rgba(217, 96, 90, .1); border: 1px solid var(--kritisch);
  border-radius: 7px; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .93rem;
}
.rueckruf-zeit { margin-bottom: 1rem; }
.rueckruf-zeit[hidden], .feld[hidden] { display: none; }

/* Stufe 2 des Formulars — erst nach der Adresse */
#stufe-zwei { display: none; }
#stufe-zwei.offen { display: block; }

/* ── Fußzeile ────────────────────────────────────────────────────── */

.fuss {
  padding: 2.6rem 0 3.4rem; border-top: 1px solid var(--linie);
  font-size: .9rem; color: var(--leise);
}
.fuss-zeile { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: center; }
.fuss a { color: var(--leise); text-decoration: none; }
.fuss a:hover { color: var(--text); text-decoration: underline; }
.tkai-endorsement { margin: 1.2rem 0 0; font-size: .85rem; color: var(--leise); }
.tkai-endorsement a {
  color: var(--text); text-decoration: none;
  font-family: var(--display); font-weight: 500;
}
.tkai-endorsement a span { color: var(--gold); }
.tkai-endorsement a small {
  font-family: var(--sans); font-size: .8em; font-weight: 500; color: var(--leise);
}
.tkai-endorsement a:hover span { text-decoration: underline; }

/* ── Bewegung ────────────────────────────────────────────────────── */

/* Nur verstecken, wenn JavaScript tatsächlich läuft — die Klasse `js` setzt
   ein Einzeiler im <head>. Ohne diese Bedingung bliebe bei abgeschaltetem oder
   fehlgeschlagenem Skript der halbe Seiteninhalt unsichtbar. */
.js .zeigt-sich {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--schwung), transform .8s var(--schwung);
}
.js .zeigt-sich.ist-sichtbar { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .js .zeigt-sich { opacity: 1; transform: none; }
  .aufmacher-medien video { display: none; }
}
