/* success.de. Farben und Schrift nach dem Markenhandbuch (branding/success-logo/MARKENHANDBUCH.md):
   Nachtblau #14213D, Grün #19C37D, Avenir Next (ohne Webfont: wo sie fehlt, die Systemschrift).
   Ohne Skript: Das Kontakt-Overlay nutzt das popover-Attribut von HTML. */

:root {
  color-scheme: light;
  --schrift: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --bg: #ffffff;
  --flaeche-2: #f4f5f7;
  --tinte: #14213d;
  --leise: #556074;
  --linie: #e2e6ec;
  --marke: #19c37d;
  --marke-kraeftig: #12ae6e;
  --marke-tinte: #0a7a4b;
  --marke-sanft: #e4f8ee;
  --auf-marke: #0d1a30;
  --navy: #14213d;
  --navy-tief: #0f1930;
  --auf-navy: #e8edf5;
  --auf-navy-leise: #b4b8c1;
  --stufe-1: #d0d3d8; --stufe-2: #9ca2ae; --stufe-3: #5f687b;
  --radius: 14px;
  --breite: 1280px;
  --winkel: polygon(0 0, 38% 0, 100% 50%, 38% 100%, 0 100%, 62% 50%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; font: 19px/1.65 var(--schrift); color: var(--tinte); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--marke-tinte); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--marke); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(40px, 6.2vw, 78px); font-weight: 700; }
h2 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 700; }
h3 { font-size: clamp(21px, 2vw, 25px); font-weight: 650; }
p { margin: 0 0 16px; }
img { max-width: 100%; height: auto; }
.innen { max-width: var(--breite); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.mitte { text-align: center; margin-left: auto; margin-right: auto; }
h2.mitte { max-width: 22ch; }
.sprung { position: absolute; left: -999px; }
.sprung:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; }
.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Kopfzeile: Logo mit Claim erst ab 180 px Logobreite (Markenhandbuch, Mindestgrößen) */
/* Beim Scrollen wird sie über die ersten 120 px kleiner und halbtransparent: --eng läuft von 0 bis 1.
   Ohne Skript (die CSP verbietet Skripte), über eine an das Scrollen gebundene Animation; Browser ohne
   animation-timeline zeigen die Kopfzeile unverändert. */
@property --eng { syntax: "<number>"; inherits: true; initial-value: 0; }
@keyframes kopf-eng { to { --eng: 1; } }
.kopf { --eng: 0; position: sticky; top: 0; z-index: 5; background: rgb(255 255 255 / calc(94% - 34% * var(--eng))); backdrop-filter: blur(calc(10px + 6px * var(--eng))); border-bottom: 1px solid var(--linie); }
@supports (animation-timeline: scroll()) {
  .kopf { animation: kopf-eng linear both; animation-timeline: scroll(root); animation-range: 0 120px; }
}
.kopf .innen { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: calc(88px - 24px * var(--eng)); }
.kopf .logo img { display: block; height: calc(42px - 8px * var(--eng)); width: auto; }
.kopf .logo .lang { display: none; }
@media (min-width: 640px) { .kopf .logo .kurz { display: none; } .kopf .logo .lang { display: block; height: calc(56px - 16px * var(--eng)); } }
.kopf-nav { display: flex; align-items: center; gap: 28px; }
.kopf-nav > a { color: var(--tinte); text-decoration: none; font-weight: 600; font-size: 16px; }
.kopf-nav > a:hover { color: var(--marke-tinte); }
.kopf .knopf { min-height: calc(46px - 6px * var(--eng)); padding: 0 18px; font-size: 16px; }
.kopf .knopf.zweit { color: var(--tinte); }
.kopf .knopf.zweit:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.kurz-text { display: none; }
@media (max-width: 1000px) { .lang-text { display: none; } .kurz-text { display: inline; } }
@media (max-width: 640px) { .kopf-nav > a { display: none; } }

/* Knöpfe: grün für die eine Hauptaktion, umrandet für alles Weitere */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 12px; font: 650 17px/1.2 var(--schrift); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; text-align: center; }
.knopf.gross { min-height: 62px; padding: 0 30px; font-size: 18px; }
.knopf.haupt { background: var(--marke); color: var(--auf-marke); }
.knopf.haupt:hover { background: var(--marke-kraeftig); }
.knopf.zweit { background: transparent; border: 2px solid currentColor; color: inherit; }
.knopf.zweit.hell { color: #fff; border-color: rgb(255 255 255 / 45%); }
.knopf.zweit.hell:hover { border-color: #fff; }
.knopf .winkel { width: 11px; height: 16px; flex: none; background: currentColor; clip-path: var(--winkel); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 520px) { .knoepfe .knopf { width: 100%; } }

/* 1 · Kopf der Seite: Text auf Nachtblau, rechts das Foto, das links mit einer Winkelkerbe beginnt */
.buehne { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.buehne-foto { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 55% 35%; }
.buehne-raster { padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(56px, 8vw, 96px); }
.buehne h1 { max-width: 13ch; }
.buehne .leit { font-size: clamp(19px, 1.8vw, 23px); color: var(--auf-navy); max-width: 34ch; margin: 28px 0 40px; }
@media (min-width: 980px) {
  .buehne { min-height: min(760px, calc(100svh - 88px)); display: flex; align-items: center; }
  .buehne-foto { position: absolute; inset: 0 0 0 auto; width: 54%; height: 100%; aspect-ratio: auto; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16% 50%); }
  .buehne-raster { width: 100%; padding-top: 96px; padding-bottom: 96px; }
  .buehne-text { max-width: 46%; }
}
.dachzeile.hell { color: var(--marke); }

/* Abschnitte */
.abschnitt { padding: clamp(80px, 10vw, 144px) 0; }
.abschnitt.grau { background: var(--flaeche-2); }
.abschnitt.dunkel { background: var(--navy); color: #fff; }
.vorspann { font-size: 21px; color: var(--leise); max-width: 46ch; margin-top: 18px; }
.zwei { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 960px) { .zwei { grid-template-columns: 5fr 6fr; gap: 80px; align-items: start; } }

/* 2 · Was auf dem Spiel steht */
.verlust { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.verlust li { position: relative; padding: 22px 26px 22px 64px; background: var(--flaeche-2); border-radius: var(--radius); font-size: 20px; }
.verlust li::before, .verlust li::after { content: ""; position: absolute; left: 26px; top: 50%; width: 18px; height: 3px; background: var(--stufe-3); border-radius: 2px; }
.verlust li::before { transform: translateY(-50%) rotate(45deg); }
.verlust li::after { transform: translateY(-50%) rotate(-45deg); }

/* 3 · Nutzen */
.karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; margin-top: 56px; }
.karte { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 32px; }
.karte h3 { display: flex; gap: 14px; margin-bottom: 12px; }
.karte h3::before { content: ""; width: 13px; height: 20px; flex: none; margin-top: 4px; background: var(--marke); clip-path: var(--winkel); }
.karte p { color: var(--leise); margin: 0; }
.zwischen { font-size: clamp(24px, 2.6vw, 32px); margin: 88px 0 0; text-align: center; }
.punkte { display: grid; gap: 22px; margin-top: 36px; }
@media (min-width: 900px) { .punkte { grid-template-columns: 2fr 3fr; } }
.punkte-gruppe { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 28px 32px 32px; }
.punkte-gruppe:first-child { border-top: 5px solid var(--marke); }
.punkte-gruppe:last-child { border-top: 5px solid var(--navy); }
.punkte-titel { font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); margin: 0 0 18px; }
.punkte ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px 24px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.punkte li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.sym { width: 44px; height: 44px; flex: none; padding: 10px; border-radius: 12px; background: var(--marke-sanft); color: var(--marke-tinte); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* 4 · Begleiter */
.begleiter > p { font-size: 21px; margin-bottom: 30px; }
.beleg { display: flex; gap: 20px; align-items: flex-start; background: var(--flaeche-2); border-radius: var(--radius); padding: 26px 28px; }
.beleg img { flex: none; margin-top: 5px; }
.beleg p { margin: 0; color: var(--leise); }
.beleg strong { color: var(--tinte); }

/* 5 · Plan als Winkelband */
.plan { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: schritt; }
.plan li { counter-increment: schritt; }
.plan .pfeil { height: 76px; clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 50%, calc(100% - 32px) 100%, 0 100%, 32px 50%); display: flex; align-items: center; padding-left: 50px; font-weight: 700; font-size: 17px; }
.plan li:first-child .pfeil { clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 50%, calc(100% - 32px) 100%, 0 100%); padding-left: 26px; }
.plan li:nth-child(1) .pfeil { background: var(--stufe-1); color: var(--tinte); }
.plan li:nth-child(2) .pfeil { background: var(--stufe-2); color: var(--tinte); }
.plan li:nth-child(3) .pfeil { background: var(--stufe-3); color: #fff; }
.plan li:nth-child(4) .pfeil { background: var(--marke); color: var(--auf-marke); }
.plan .pfeil::before { content: counter(schritt) ".\00a0"; }
.plan p { color: var(--leise); margin: 18px 14px 0 0; }
@media (max-width: 860px) { .plan { grid-template-columns: 1fr; gap: 16px; } .plan p { margin: 10px 0 0; } }
.unter-plan { margin: 52px 0 0; }

/* 6 · Erklärender Absatz */
.erklaerung > * { max-width: 780px; }
.erklaerung h2 { margin-bottom: 28px; }
.erklaerung p { font-size: 20px; }

/* 9 · Fuß */
.fuss { background: var(--navy-tief); color: var(--auf-navy-leise); padding: 56px 0; font-size: 16px; }
.fuss .innen { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.fuss img { display: block; height: 36px; width: auto; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; }
.fuss a, .fuss-link { color: var(--auf-navy); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.fuss a:hover, .fuss-link:hover { text-decoration: underline; }

/* Kontakt-Overlay */
.overlay { width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; border: 0; border-radius: 20px; padding: clamp(28px, 5vw, 48px); background: #fff; color: var(--tinte); box-shadow: 0 30px 80px rgb(8 15 32 / 35%); }
.overlay::backdrop { background: rgb(10 18 36 / 72%); backdrop-filter: blur(3px); }
.overlay h2 { font-size: clamp(26px, 3vw, 34px); padding-right: 40px; }
.overlay-leit { color: var(--leise); margin: 12px 0 26px; }
.schliessen { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--flaeche-2); color: var(--tinte); font: 400 28px/1 var(--schrift); cursor: pointer; }
.schliessen:hover { background: var(--linie); }
.overlay form { display: grid; gap: 16px; }
.felder { display: grid; gap: 16px; }
@media (min-width: 560px) { .felder { grid-template-columns: 1fr 1fr; } }
.overlay label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.overlay input, .overlay textarea { font: 17px var(--schrift); color: var(--tinte); border: 1.5px solid var(--linie); border-radius: 10px; padding: 12px 14px; width: 100%; background: #fff; }
.overlay input:focus, .overlay textarea:focus { outline: none; border-color: var(--marke); box-shadow: 0 0 0 3px var(--marke-sanft); }
.overlay .haken { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--leise); }
.overlay .haken input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--marke-tinte); }
.overlay .knopf { width: 100%; margin-top: 6px; }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.klein { font-size: 14px; color: var(--leise); margin: 0; }

/* Textseiten (Impressum, Danke, 404) */
.text { max-width: 760px; }
.text h1 { font-size: clamp(34px, 4.4vw, 52px); margin-bottom: 28px; }
.text h2 { font-size: 22px; margin: 36px 0 8px; }
.text address { font-style: normal; }
@media (min-width: 760px) { .karten.vier { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .knopf.gross { font-size: 17px; padding: 14px 20px; min-height: 58px; } }

/* Dachzeile: Problem, Lösung, Erfolg */
.dachzeile { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--marke-tinte); margin: 0 0 16px; }
.dachzeile.mitte-text { text-align: center; }
.abschnitt .zwei .vorspann { margin-top: 24px; }
.wandlung { font-size: clamp(22px, 2.4vw, 30px); font-weight: 650; line-height: 1.3; margin: 64px auto 0; max-width: 30ch; }
.abschnitt.grau .beleg { background: #fff; border: 1px solid var(--linie); }

/* Hilfen zum Ausrichten */
.mitte-block { max-width: 820px; margin: 0 auto; text-align: center; }
.vorspann.mitte { margin-left: auto; margin-right: auto; }
@media (min-width: 960px) { .zwei.mitte-achse { align-items: center; } }

/* 2 · Warum Geschichten wirken: sechs Kapitel */
.geschichte-kopf { max-width: 860px; }
.geschichte .vorspann { color: var(--auf-navy); max-width: 60ch; }
.geschichte .vorspann strong { color: #fff; }
.kapitel { list-style: none; padding: 0; margin: 64px 0 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .kapitel { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .kapitel { grid-template-columns: repeat(3, 1fr); } }
.kapitel li { position: relative; padding: 30px 28px 28px; border-radius: var(--radius); background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 12%); }
.kapitel li:nth-child(1) { border-top: 4px solid var(--marke); }
.kapitel-nr { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--marke); color: var(--auf-marke); font-weight: 700; margin-bottom: 18px; }
.kapitel li:nth-child(3) { background: rgb(25 195 125 / 12%); border-color: rgb(25 195 125 / 40%); }
.kapitel h3 { color: #fff; font-size: 21px; margin: 0 0 8px; }
.kapitel p { margin: 0; color: var(--auf-navy-leise); font-size: 17px; }
.geschichte-fazit { margin: 56px 0 0; font-size: clamp(20px, 2vw, 25px); line-height: 1.45; max-width: 52ch; color: var(--auf-navy); }
.geschichte-fazit strong { color: #fff; }

/* 3 · Beispiele: Karten mit Foto, Branchenschild im Winkel, vorher und nachher, Kontaktpunkte als Marken */
.beispiele { display: grid; gap: 24px; margin-top: 64px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .beispiele { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .beispiele { grid-template-columns: repeat(4, 1fr); gap: 20px; } .beispiel-text { padding: 22px 22px 24px; } .nachher { font-size: 18px; } }
.beispiel { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linie); border-radius: 18px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.beispiel:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgb(20 33 61 / 12%); }
.beispiel-bild { position: relative; overflow: hidden; }
.beispiel-bild img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s; }
.beispiel:hover .beispiel-bild img { transform: scale(1.04); }
.beispiel-art { position: absolute; left: 0; bottom: 18px; margin: 0; padding: 7px 34px 7px 18px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); }
.beispiel-text { padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.beispiel-text p { margin: 0; }
.vorher, .nachher { display: grid; gap: 4px; }
.vorher span, .nachher span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.vorher { color: var(--leise); font-size: 16px; }
.vorher span { color: var(--stufe-2); }
.nachher { font-size: 19px; font-weight: 650; line-height: 1.42; padding-left: 16px; border-left: 4px solid var(--marke); flex: 1; }
.nachher span { color: var(--marke-tinte); }
.orte { list-style: none; padding: 14px 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--linie); }
.orte li { font-size: 13px; font-weight: 600; color: var(--marke-tinte); background: var(--marke-sanft); border-radius: 999px; padding: 4px 11px; }
.beispiel-bild img[src*="kfz"] { object-position: 70% 50%; }
.beispiel-bild img[src*="physio"] { object-position: 60% 40%; }
.beispiel-bild img[src*="zahnarzt"] { object-position: 50% 45%; }
@media (prefers-reduced-motion: reduce) { .beispiel, .beispiel-bild img { transition: none; } .beispiel:hover { transform: none; } .beispiel:hover .beispiel-bild img { transform: none; } }
.hinweis { margin: 36px auto 0; max-width: 60ch; font-size: 15px; color: var(--leise); text-align: center; }

/* 4 · Kontaktpunkte */
.kontakt-bild { display: block; width: 100%; max-width: 600px; justify-self: center; }
#kontaktpunkte .punkte { margin-top: 56px; }

/* 5 · Begleiter: Foto im Winkelfenster */
.fenster { margin: 0; }
.fenster img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 35% 50%; border-radius: 0; clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%, 22% 50%); }
.begleiter h2 { margin-bottom: 22px; }
.begleiter > p:not(.dachzeile) { font-size: 20px; margin-bottom: 30px; }

/* Schluss auf Nachtblau */
.schluss .erklaerung p { color: var(--auf-navy); }
.schluss h2 { color: #fff; }

/* Einblenden beim Scrollen, nur wo der Browser es kann und Bewegung erwünscht ist */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    @keyframes auftauchen { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
    .zeigen { animation: auftauchen linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}
