/* Eigene Ergänzungen zu stil.css (dem ausgedünnten Theme-CSS).
   Hier steht alles, was im Original ein Skript (Theme, Slider Revolution) erledigt hat.
   Die Werte sind am Original gemessen, siehe dokumente/Pflichtenheft_Effekte_2026-11-23.md. */

/* ------------------------------------------------------------------------------------------
   Volle Breite für Abschnitte und Zeilen
   Original: WPBakery-Skript setzt left/width/padding per JavaScript. --blink-breite ist die
   Fensterbreite ohne Scrollbalken (setzt blink.js), ohne Skript gilt 100vw. */

/* Gemessen: Versatz = (Fensterbreite − 1238 px) / 2, mindestens 0; Zeilen mit Spaltenabstand
   (vc_column-gap-N, negativer Außenrand) bekommen N/2 dazu. !important wie im Original (dort Inline-Stil). */
[data-vc-full-width="true"] {
  --blink-versatz: max(0px, (var(--blink-breite, 100vw) - 1238px) / 2);
  --blink-luecke: 0px;
  position: relative !important;
  box-sizing: border-box !important;
  width: var(--blink-breite, 100vw) !important;
  left: calc(-1 * (var(--blink-versatz) + var(--blink-luecke))) !important;
}
[data-vc-full-width="true"]:not([data-vc-stretch-content="true"]) { /* „Inhalt mitstrecken“: kein Innenabstand */
  padding-left: calc(var(--blink-versatz) + var(--blink-luecke)) !important;
  padding-right: calc(var(--blink-versatz) + var(--blink-luecke)) !important;
}
[data-vc-full-width="true"].vc_column-gap-10 { --blink-luecke: 5px; }
[data-vc-full-width="true"].vc_column-gap-20 { --blink-luecke: 10px; }
[data-vc-full-width="true"].vc_column-gap-30 { --blink-luecke: 15px; }

/* ------------------------------------------------------------------------------------------
   Mitwachsende Überschriften (Theme-Skript „responsive font“)
   Gemessen: Schriftgröße = Breite des Elternelements / 12, abgerundet, mindestens 30 px,
   höchstens 50 px (Abschnittstitel) bzw. 60 px (Seitentitel). Ab 1201 px fest.
   Die Überschriften tragen style="font-size: var(--blink-fs) !important; …" (vom Abguss gesetzt),
   ihr Elternelement ist ein Container, damit 100cqw = dessen Breite ist. */

[data-responsive-font="section_title"] {
  --blink-fs: clamp(30px, round(down, 100cqw / 12 + 0.01px, 1px), 50px);
  --blink-lh: calc(var(--blink-fs) * 1.24);
}
[data-responsive-font="page_title"] {
  --blink-fs: clamp(30px, round(down, 100cqw / 12 + 0.01px, 1px), 60px);
  --blink-lh: calc(var(--blink-fs) * 1.25);
}
@media (min-width: 1201px) {
  [data-responsive-font="section_title"] { --blink-fs: 50px; --blink-lh: 62px; }
  [data-responsive-font="page_title"] { --blink-fs: 60px; --blink-lh: 75px; }
}
@media (min-width: 1680px) {
  [data-responsive-font="section_title"] { --blink-lh: 62.5px; }
}

/* ------------------------------------------------------------------------------------------
   Ohne JavaScript: nichts darf unsichtbar bleiben (Original blendet diese Teile per Skript ein) */

.ut-no-js .ut-simple-time-line-event-animation,
.ut-no-js .ut-simple-time-line-event-marker {
  opacity: 1 !important;
}

/* ------------------------------------------------------------------------------------------
   Startbild-Slider (ersetzt Slider Revolution)
   Höhe und Textgrößen in vier Stufen wie im Original (Rasterbreiten 480 / 778 / 1024 / 1240). */

.blink-slider {
  /* Stufe ab 1024 px */
  --h: 800px;
  --wort-fs: 160px; --wort-yo: 0px; --wort2-yo: 0px;
  --claim-fs: 25px; --claim-lh: 25px; --claim-ls: 10px; --claim-pad: 20px; --claim-yo: -280px;
  --knopf-fs: 20px; --knopf-lh: 70px; --knopf-pad: 40px; --knopf-yo: 250px;
  --unter-fs: 16px; --unter-lh: 20px; --unter-yo: 319px; --unter-w: max-content;
  /* Folienbreite: Höhe × 1,5 (Bildformat), höchstens die volle Breite */
  --fw: min(100%, calc(var(--h) * 1.5));

  position: relative;
  height: var(--h);
  overflow: hidden;
  background: #000;
  font-family: 'Work Sans', sans-serif;
  color: #fff;
  /* Wischen: senkrecht scrollt weiter der Browser, waagrecht übernimmt blink.js */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.ut-js .blink-slider { cursor: grab; }
.ut-js .blink-slider.blink-zieht { cursor: grabbing; }
@media (max-width: 1023px) {
  .blink-slider {
    --h: 700px;
    --wort-fs: 120px; --wort-yo: -150px;
    /* zweizeilige Wörter (nur B-15): erste Zeile auf Höhe der einzeiligen, sonst laufen sie in den Claim */
    --wort2-yo: calc(var(--wort-fs) / 2);
    --claim-yo: -250px;
    --knopf-yo: 210px;
    --unter-yo: 280px;
  }
}
@media (max-width: 777px) {
  .blink-slider {
    --h: 600px;
    --wort-fs: 80px; --wort-yo: -160px;
    --claim-fs: 17px; --claim-lh: 20px; --claim-ls: 5px; --claim-pad: 10px; --claim-yo: -230px;
    --knopf-fs: 17px; --knopf-lh: 60px; --knopf-pad: 30px; --knopf-yo: 170px;
    --unter-yo: 230px;
  }
}
@media (max-width: 479px) {
  .blink-slider {
    --h: 500px;
    --wort-fs: 60px; --wort-yo: -130px;
    --claim-fs: 15px; --claim-lh: 15px; --claim-yo: -180px;
    --knopf-fs: 15px; --knopf-lh: 50px; --knopf-yo: 140px;
    --unter-fs: 13px; --unter-lh: 18px; --unter-yo: 200px; --unter-w: 300px;
  }
}

.blink-folie {
  position: absolute;
  top: 0;
  height: 100%;
  width: var(--fw);
  left: calc(50% - var(--fw) / 2);
  overflow: hidden;
  /* Platz im Karussell: --pos Folienbreiten neben der Mitte, beim Wischen um --zieh mitgezogen */
  transform: translateX(calc(var(--pos, 0) * 100% + var(--zieh, 0px)));
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.blink-zieht .blink-folie,
.blink-folie.blink-sprung { transition: none; } /* beim Ziehen und beim Sprung ans andere Ende (unsichtbar) */

.blink-folie-bild {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Ebenen: waagrecht mittig, senkrecht mittig plus Versatz je Stufe */
.blink-ebene {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}
.blink-inhalt { width: max-content; }

.blink-wort {
  margin-top: var(--wort-yo);
  font-size: var(--wort-fs);
  line-height: var(--wort-fs);
  font-weight: 600;
  white-space: nowrap;
}
.blink-wort-2 { margin-top: calc(var(--wort-yo) + var(--wort2-yo)); }
.blink-claim {
  margin-top: var(--claim-yo);
  z-index: 12;
}
.blink-maske { overflow: hidden; } /* Original: Maske, der Claim schiebt sich hinein */
.blink-claim .blink-inhalt {
  padding: var(--claim-pad);
  font-size: var(--claim-fs);
  line-height: var(--claim-lh);
  letter-spacing: var(--claim-ls);
  font-weight: 500;
  text-align: center;
  text-shadow: 0 5px 30px #000;
}
.blink-knopf {
  margin-top: var(--knopf-yo);
  z-index: 11;
}
.blink-knopf-link {
  display: block;
  padding: 0 var(--knopf-pad);
  font-size: var(--knopf-fs);
  line-height: var(--knopf-lh);
  font-weight: 600;
  color: #fff;
  background-color: #004c3f;
  border-radius: 35px;
  white-space: nowrap;
  transition: background-color 0.3s, filter 0.3s;
}
.blink-knopf-link:hover,
.blink-knopf-link:focus {
  color: #fff;
  background-color: #008060;
  filter: brightness(1.2);
}
.blink-unter {
  margin-top: var(--unter-yo);
  z-index: 10;
}
/* Die Unterzeile ist die Hauptüberschrift (h1) der Startseite, fürs Auge aber dieselbe Zeile wie vorher */
.blink-unter h1.blink-inhalt {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-style: inherit;
}
.blink-unter .blink-inhalt {
  width: var(--unter-w);
  font-size: var(--unter-fs);
  line-height: var(--unter-lh);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}
.blink-verlauf {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 200px;
  z-index: 9;
  background: linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,0.01) 6.67%, rgba(0,0,0,0.03) 13.34%, rgba(0,0,0,0.09) 20.01%, rgba(0,0,0,0.14) 26.68%, rgba(0,0,0,0.21) 33.35%, rgba(0,0,0,0.3) 40.02%, rgba(0,0,0,0.38) 46.69%, rgba(0,0,0,0.47) 53.36%, rgba(0,0,0,0.55) 60.03%, rgba(0,0,0,0.64) 66.70%, rgba(0,0,0,0.71) 73.37%, rgba(0,0,0,0.77) 80.04%, rgba(0,0,0,0.82) 86.71%, rgba(0,0,0,0.84) 93.38%, rgba(0,0,0,0.85) 100%);
}

/* Maus-Parallaxe: blink.js setzt --px/--py */
.blink-pxl { transform: translate(var(--px, 0px), var(--py, 0px)); }

/* Einstieg (nur mit JavaScript, ausgelöst sobald das mittlere Foto geladen ist: .blink-los) */
@keyframes blink-einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink-wort-rein { from { transform: translateX(calc(var(--fw) / 2 + 50%)); } to { transform: none; } }
@keyframes blink-claim-rein { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: none; } }
@keyframes blink-knopf-rein { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes blink-unter-rein { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes blink-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }

.ut-js .blink-slider:not(.blink-los) .blink-folie,
.ut-js .blink-slider:not(.blink-los) .blink-ebene,
.ut-js .blink-slider:not(.blink-los) .blink-verlauf { visibility: hidden; }

.blink-los .blink-folie { animation: blink-einblenden 1s ease both; }
/* Zoom läuft nur auf der sichtbaren Folie; danach bleibt er stehen und wird zurückgesetzt, sobald die Folie
   außer Sicht ist (blink.js), damit nichts springt */
.blink-los .blink-folie-bild { animation: blink-zoom 10s linear both paused; }
.blink-los .blink-aktiv .blink-folie-bild { animation-play-state: running; }
.blink-los .blink-aktiv .blink-wort .blink-inhalt { animation: blink-wort-rein 1s cubic-bezier(0.165, 0.84, 0.44, 1) both; }
.blink-los .blink-claim .blink-inhalt { animation: blink-claim-rein 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.6s both; }
.blink-los .blink-knopf .blink-inhalt { animation: blink-knopf-rein 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0.7s both; }
.blink-los .blink-unter .blink-inhalt { animation: blink-unter-rein 1s cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.8s both; }
.blink-los .blink-verlauf { animation: blink-einblenden 1.5s cubic-bezier(0.77, 0, 0.175, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .blink-los .blink-folie,
  .blink-los .blink-folie-bild,
  .blink-los .blink-inhalt,
  .blink-los .blink-verlauf { animation: none !important; }
  .blink-folie { transition: none; }
}

/* ------------------------------------------------------------------------------------------
   Referenzen (B-16): neuer Abschnitt, gestaltet wie die Abschnittsköpfe des Themes
   (Werte von „Seit 20 Jahren / Schreinerhandwerk aus Tradition.“ gemessen) */

.blink-referenzen {
  margin: 0 -20px; /* wie die Theme-Abschnitte (vc_section), sonst 20 px versetzt */
  background-color: #fbf7ed;
  padding: 80px 0 0; /* unten schließt der Bildstreifen bündig ab, wie der Streifen über dem Fuß */
  font-family: 'Work Sans', sans-serif;
}
.blink-ref-innen {
  max-width: 1238px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.blink-ref-kopf {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 26px;
  font-weight: 500;
  color: #008060;
}
.blink-ref-titelbox { container-type: inline-size; }
.blink-ref-titel {
  margin: 0;
  font-size: clamp(30px, round(down, 100cqw / 12 + 0.01px, 1px), 50px);
  line-height: 1.24 !important; /* Theme: h2 { line-height: 130% !important } */
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #004c3f;
}
.blink-ref-lead {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #42474c;
}
/* Schräge Bildstreifen mit Fächer-Effekt: Referenzen und der Streifen über dem Fuß (B-16).
   Aufbau und Schräge kommen von den Theme-Klassen (ut-skewed-image-border).
   Hier nur: Überstand passend zur Höhe, Breite je Bild beweglich, Unterschrift (nur Referenzen). */
.blink-ref-band {
  overflow: hidden;      /* der Theme-Streifen ragt links und rechts über den Rand */
  margin-top: 40px;
}
.blink-faecher {
  /* Höhe je Stufe wie der Theme-Streifen (Referenzen am Handy höher, sonst ist der Fächer zu flach).
     --ue = Überstand links und rechts = halber Versatz der 20°-Schräge (tan 20° ≈ 0,364), damit die
     Schrägkanten außerhalb des Bildschirms liegen, aber kein Bild ganz verschwindet. */
  --h: 478px;
  --ue: calc(var(--h) * 0.182);
  height: var(--h);
  left: calc(-1 * var(--ue));
  width: calc(100% + 2 * var(--ue));
  margin-bottom: 0;
}
@media (min-width: 768px) and (max-width: 1024px) { .blink-faecher { --h: 300px; } }
@media (max-width: 767px) { .blink-faecher { --h: 188px; } #referenzen .blink-faecher { --h: 380px; } }
.blink-faecher-teil {
  position: relative;
  margin: 0 0 0 -2px;    /* wie .ut-skewed-image-border-slice; figure bringt eigene Ränder mit */
  flex: 1 1 0;
  min-width: 0;          /* sonst hält die Unterschrift schmale Streifen breit */
  transition: flex-grow 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  outline: none;
}
.blink-faecher-teil:first-child,
.blink-faecher-teil:last-child { flex-basis: var(--ue); } /* der Rand verdeckt im Schnitt --ue, das bekommen sie dazu */
.blink-faecher-teil:first-child figcaption { left: calc(2 * var(--ue)); }  /* Unterschrift in den sichtbaren Teil */
.blink-faecher-teil:last-child figcaption { right: calc(2 * var(--ue)); }
.blink-faecher-teil img { transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); }
.blink-faecher-teil figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  transform: skewX(20deg); /* Schrift wieder gerade */
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.blink-faecher-teil figcaption span {
  display: inline-block;
  padding: 0 18px;
  font-size: 14px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background-color: #004c3f;
  border-radius: 17px;
  white-space: nowrap;
}
/* Desktop (Maus): das Bild unter der Maus wird breiter, Unterschrift erscheint */
@media (hover: hover) and (pointer: fine) {
  .blink-faecher-teil:hover,
  .blink-faecher-teil:focus-visible { flex-grow: 1.8; }
  .blink-faecher-teil:hover figcaption,
  .blink-faecher-teil:focus-visible figcaption { opacity: 1; }
}
/* Handy und Tablet (Finger): ein Bild ist offen (.blink-faecher-offen), Antippen öffnet ein anderes */
@media (hover: none), (pointer: coarse) {
  .blink-faecher-teil.blink-faecher-offen { flex-grow: 5; }
  .blink-faecher-teil.blink-faecher-offen figcaption { opacity: 1; }
}
/* Ohne Animation, wenn das System „Bewegung reduzieren“ verlangt */
@media (prefers-reduced-motion: reduce) {
  .blink-faecher-teil, .blink-faecher-teil figcaption { transition: none; }
}

/* Handy: mittig wie die anderen Abschnittsköpfe */
@media (max-width: 767px) {
  .blink-ref-kopf, .blink-ref-titelbox, .blink-ref-lead { text-align: center; }
}
@media (min-width: 1025px) {
  .blink-referenzen { padding: 120px 0 0; }
  .blink-ref-lead { font-size: 16px; }
}
@media (min-width: 1201px) {
  .blink-ref-titel { font-size: 50px; line-height: 62px !important; }
}
