/* ==========================================================================
   BC BAUKASTEN · bc-kit.css · v1.1
   Herkunft: kontakt426/bc-loadio-website (Astro-Build V7.2) und
             kontakt426/bc-wichmann-website (public/v8)
   Zweck: Jede neue BC-Website startet hierauf statt bei null.
   Messlatte: LOADIO, Wichmann und Hobohm V4 (Niveau und Ablauf, nicht der Look).
   v1.1 (09.11.2026): Bauteile aus Hobohm V4 – Hero-Video, stehendes Bild mit
   wechselndem Text, Materialwechsel, Versal-Schrift. Siehe Abschnitt 4b.

   Vier Schichten:
     1 TOKENS   – je Projekt überschrieben, sonst nichts anfassen
     2 BAUTEILE – Button, Karte, Label, Chips, Liste, FAQ, Formularfeld
     3 ABSCHNITTE – Rhythmus, Bildband, Scroll-Story, dunkle Fläche, Footer
     4 MOTION   – ein System, nicht pro Seite neu erfunden

   Grundregel: Der Inhalt steht ohne JavaScript und ohne Animation vollständig
   da. Motion ist eine Zutat, die weggenommen werden kann.
   ========================================================================== */

/* ==========================================================================
   1 · TOKENS
   Je Projekt im Seitenkopf überschreiben. Die Namen bleiben.
   ========================================================================== */
:root {
  /* Flächen und Text */
  --bg:         #FFFFFF;   /* Hauptgrund der Textbänder */
  --bg-alt:     #F5F3F2;   /* Wechselband, höchstens zweimal pro Seite */
  --surface:    #FFFFFF;   /* Karten, Felder */
  --surface-2:  #ECEAE9;   /* sekundäre Flächen */
  --ink:        #2A2A2A;   /* Überschriften, Fließtext */
  --ink-soft:   #5E5B5A;   /* Sekundärtext, muss >= 4.5:1 auf --bg liegen */
  --accent:     #8A3034;   /* Handlung: Button, Label, Marker, Linien */
  --accent-ink: #FFFFFF;   /* Text auf --accent */
  --dark:       #2A2A2A;   /* dunkle Vollfläche */
  --on-dark:    #FAF9F8;
  --on-dark-soft:#C6C2C0;
  --line:       #00000020;
  --line-dark:  #FFFFFF26;

  /* Form */
  --r-lg: 20px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-lift: 0 24px 48px -20px rgba(0,0,0,.42);

  /* Raster und Raum */
  --gutter: 20px;
  --max:    1240px;
  --col:    58ch;                               /* Textspalte, nie breiter */
  --space-section: clamp(4rem, 7vw, 7rem);
  --space-block:   clamp(2rem, 4vw, 3.5rem);

  /* Schrift – Familie je Projekt setzen, selbst ausgeliefert */
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Bewegung */
  --ease-out:    cubic-bezier(.23, 1, .32, 1);  /* LOADIO */
  --ease-soft:   cubic-bezier(.2, .7, .2, 1);   /* Wichmann */
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --t-fast:   .18s;
  --t-mid:    .38s;
  --t-slow:   .6s;
  --t-slower: .8s;
  --rv-step:  110ms;   /* Abstand zwischen nacheinander einblendenden Zeilen */
  --rv-delay: 120ms;   /* Vorlauf, bevor die erste Zeile kommt */
  --rv-y:     14px;    /* Weg, den ein einblendendes Element zurücklegt */
}

/* ==========================================================================
   2 · BASIS UND TYPOGRAFIE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;              /* 320-px-Sicherung */
}
img, picture, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
p  { margin: 0 0 1em; max-width: var(--col); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd, dt { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Jedes Rasterkind darf schrumpfen – sonst bricht 320 px */
.grid > *, .story-step > *, .band-grid > * { min-width: 0; }

.wrap  { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.col   { max-width: var(--col); }
.vh    { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.h1 { font-size: clamp(2rem, 1.1rem + 3.4vw, 3.5rem); line-height: 1.04; letter-spacing: -.015em; }
.h2 { font-size: clamp(1.55rem, 1rem + 2vw, 2.25rem); line-height: 1.12; letter-spacing: -.01em; }
.h3 { font-size: clamp(1.15rem, .95rem + .7vw, 1.4rem); line-height: 1.25; }
.lead  { font-size: clamp(1.06rem, 1rem + .5vw, 1.3rem); line-height: 1.45; color: var(--ink-soft); max-width: 34ch; }
.small { font-size: .9rem; color: var(--ink-soft); }
.label {
  display: inline-block; margin: 0 0 .7rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); line-height: 1.3;
}
/* Linie unter der H1 – zeichnet sich mit .rv-rule */
.rule { display: block; width: 72px; height: 3px; background: var(--accent); border: 0; margin: 1.1rem 0 1.4rem; }

/* ==========================================================================
   3 · BAUTEILE
   ========================================================================== */

/* Button – Klickfläche nie unter 44 px */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: 0 1.75rem;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-size: 1.06rem; font-weight: 700; line-height: 1.2;
  border: 0; border-radius: var(--r-md); text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast) var(--ease-out);
}
.btn:hover  { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-ghost  { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-block  { width: 100%; }
.on-dark .btn-ghost { color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--line-dark); }

.tlink {
  display: inline-block; padding: .6rem 0; min-height: 44px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: text-decoration-color var(--t-fast) var(--ease-out);
}
.tlink:hover { text-decoration-color: var(--accent); }

.card { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 1.5rem; }

/* Marker-Liste – die Zeilen kommen nacheinander, siehe .rv-stagger */
.marked { display: grid; gap: .65rem; max-width: var(--col); }
.marked li { display: grid; grid-template-columns: 9px 1fr; gap: .9rem; align-items: start; }
.marked li::before {
  content: ""; width: 9px; height: 9px; margin-top: .62em;
  background: var(--accent); border-radius: 2px;
}

/* Chips – Material, Rollen, Stichworte */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  font-size: .95rem; font-weight: 600; padding: .45rem .85rem;
  border-radius: 999px; background: var(--surface-2); color: var(--ink);
}
.on-dark .chips li { background: rgba(255,255,255,.1); color: var(--on-dark); }

/* Datenzeile – belegte Eckdaten, durch Punkte getrennt */
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin: 0; font-size: .98rem; color: var(--ink-soft); max-width: none; }
.facts li { display: flex; align-items: center; gap: .9rem; }
.facts li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.facts b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Beschriftetes Bild */
.figure { margin: 0; }
.figure .frame { overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); }
.figure .frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-32 { aspect-ratio: 3/2; }  .frame-43 { aspect-ratio: 4/3; }
.frame-11 { aspect-ratio: 1/1; }  .frame-45 { aspect-ratio: 4/5; }
.figure figcaption { margin-top: .7rem; font-size: .88rem; color: var(--ink-soft); }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 1.1rem 2.4rem 1.1rem 0; font-size: 1.1rem; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg); transition: transform var(--t-fast) var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 0 1.3rem; }

/* Formularfeld */
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: .5rem; font-size: .86rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; font: inherit;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input { min-height: 52px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field .help { margin: .4rem 0 0; font-size: .86rem; color: var(--ink-soft); }
.form-note { margin: .9rem 0 0; padding: .8rem 1rem; background: var(--surface-2); border-radius: var(--r-md); font-size: .95rem; }

/* Entwurfsleiste über der Seite */
.draft-bar {
  max-width: none;
  background: var(--surface-2); color: var(--ink-soft);
  padding: .55rem var(--gutter); text-align: center;
  font-size: .85rem; letter-spacing: .02em;
}

/* Fixierte Handlungsleiste – erst unterhalb des Heros, gleiches Ziel wie der Haupt-CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--accent); color: var(--accent-ink);
  transform: translateY(100%); transition: transform 280ms var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom);
}
.sticky-cta.on { transform: none; }
.sticky-cta a { display: flex; align-items: center; justify-content: center; gap: .6em; min-height: 58px; font-weight: 700; text-decoration: none; }
.sticky-cta--top { top: 0; bottom: auto; transform: translateY(-100%); background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); }

/* ==========================================================================
   4 · ABSCHNITTE
   ========================================================================== */
.section { padding: var(--space-section) 0; }
.section + .section:not(.section--dark):not(.band) { border-top: 1px solid var(--line); }
.section--alt  { background: var(--bg-alt); border-top: 0 !important; }
.section--dark { background: var(--dark); color: var(--on-dark); border-top: 0 !important; }
.section--dark .lead, .section--dark .small, .section--dark .facts { color: var(--on-dark-soft); }
.section--dark .figure figcaption { color: var(--on-dark-soft); }
.section--dark + .section { border-top: 0; }
.section > .wrap > .h2 { margin-bottom: 1rem; max-width: 24ch; }
.section > .wrap > .lead { margin-bottom: 2rem; }

/* Randabfallendes Bildband mit hineingesetztem Text (LOADIO) */
.band { position: relative; isolation: isolate; }
.band > picture, .band > img { width: 100%; }
.band img { width: 100%; height: 100%; object-fit: cover; }
.band-media { position: relative; height: clamp(360px, 58vh, 660px); overflow: hidden; background: var(--surface-2); }
/* Scrim – Text liegt nur auf Himmel, nie auf strukturierter Dachfläche */
.band-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.52) 0%, rgba(0,0,0,.22) 42%, rgba(0,0,0,0) 72%);
}
.band-copy { position: absolute; z-index: 2; top: 0; left: 0; right: 0; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter); }
.band-copy .inner { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.band-copy .in { max-width: 30ch; color: #fff; }
.band-line { max-width: 24ch; position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 1.4rem; margin: 0; color: #fff; font-size: clamp(1.05rem, .9rem + .8vw, 1.5rem); font-weight: 600; line-height: 1.3; max-width: 24ch; }

/* Geteilte Gegenüberstellung mit Naht (LOADIO h7-split) */
.split { position: relative; display: grid; grid-template-columns: 1fr; }
.split-seam {
  display: none; position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%;
  width: 4px; translate: -50%; background: var(--accent); transform-origin: top;
}
.split > * { padding: var(--space-block) var(--gutter); }

/* Scroll-Story: Schritte wechseln die Seite (Wichmann .step) */
.story { display: grid; gap: clamp(3rem, 7vw, 6.5rem); }
.story-step { display: grid; gap: 1.5rem; }
.story-no { display: inline-block; margin-bottom: .6rem; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.story-title { font-size: clamp(1.35rem, 1.05rem + 1.3vw, 2.05rem); line-height: 1.16; letter-spacing: -.01em; margin: 0 0 .8rem; max-width: 18ch; }
.story-text  { font-size: 1.05rem; line-height: 1.55; color: var(--ink-soft); margin: 0 0 .9rem; max-width: var(--col); }
.story-mark  { margin: 0; font-weight: 700; color: var(--accent); }
.story-viz   { display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.story-viz > * { max-width: 100%; }

/* Bildreihe mit Beschriftung */
.gallery { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

/* Kontaktblock – vier Angaben groß, nichts wird mehr erklärt */
.contact-list { display: grid; gap: 0; max-width: 34rem; }
.contact-list > div { display: grid; gap: .25rem; padding: 1.1rem 0; border-top: 1px solid var(--line-dark); }
.contact-list > div:first-child { border-top: 0; padding-top: 0; }
.section:not(.section--dark) .contact-list > div { border-top-color: var(--line); }
.contact-list dt { font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.contact-list dd { font-size: clamp(1.1rem, 1rem + .6vw, 1.45rem); font-weight: 600; }
.contact-list dd a { text-decoration: none; display: inline-block; min-height: 44px; line-height: 44px; }
.contact-phone { font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem) !important; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* Footer */
.footer { background: var(--dark); color: var(--on-dark); padding: 3rem 0 2.5rem; }
.footer p { margin: 0 0 .5rem; font-size: .95rem; color: var(--on-dark-soft); max-width: none; }
.footer a { color: var(--on-dark); }

/* ==========================================================================
   4b · BAUTEILE AUS HOBOHM V4 (v1.1)
   Niveau-Bauteile: großer erster Bildschirm, sichtbare Bewegung, ein Bild das
   bleibt. Farben, Schrift und Bildwelt kommen aus dem Projekt, nie von Hobohm.
   ========================================================================== */

/* Versal-Schrift für Überschriften. Braucht eine Schrift mit kräftigem,
   schmalem Schnitt (variable Schrift mit Breitenachse oder ein Condensed-Schnitt). */
.disp { font-weight: 800; font-stretch: 78%; text-transform: uppercase; letter-spacing: -.012em; line-height: .92; text-wrap: balance; }

/* ---------- Hero mit Vollbild-Video ----------
   Poster ist sofort da und trägt den ersten Bildschirm, das Video blendet
   erst ein, wenn es wirklich läuft (bc-kit.js, video[data-autoplay]).
   Text steht unten auf einem Verlauf, auf Desktop links neben dem Bild. */
.hero-video { position: relative; isolation: isolate; display: flex; align-items: flex-end; overflow: hidden;
  min-height: max(600px, min(100svh, 900px)); background: var(--dark); color: var(--on-dark); }
.hero-video-media { position: absolute; inset: 0; z-index: -2; }
.hero-video-media img, .hero-video-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 50% 30%); }
.hero-video-media video { opacity: 0; transition: opacity .8s ease; }
.hero-video-media video.is-playing { opacity: 1; }
.hero-video-media img { animation: kit-drift 16s ease-out both; }
.hero-video::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgb(var(--hero-scrim, 10 12 14) / .62) 0%, rgb(var(--hero-scrim, 10 12 14) / 0) 20%, rgb(var(--hero-scrim, 10 12 14) / 0) 34%, rgb(var(--hero-scrim, 10 12 14) / .78) 62%, rgb(var(--hero-scrim, 10 12 14) / .97) 100%); }
.hero-video-in { width: 100%; padding: 0 var(--gutter) clamp(1.5rem, 5vw, 3rem); }
.hero-video h1 { margin: 0 0 .95rem; font-size: clamp(2.7rem, 14.6vw, 7rem); line-height: .88; }
/* Überschrift Zeile für Zeile: <span class="ln"><span>Zeile</span></span> */
.hero-video h1 .ln { display: block; overflow: hidden; padding-top: .06em; }
.hero-video h1 .ln > span { display: block; animation: kit-rise .8s cubic-bezier(.2,.8,.2,1) both; }
.hero-video h1 .ln:nth-child(2) > span { animation-delay: .1s; }
.hero-video h1 .ln:nth-child(3) > span { animation-delay: .2s; }
.hero-video .hero-sub { margin: 0 0 1.3rem; max-width: 34ch; font-size: 1.08rem; line-height: 1.45; font-weight: 500; animation: kit-fade .7s ease .45s both; }
.hero-video .hero-act { display: grid; gap: .7rem; animation: kit-fade .7s ease .6s both; }
@keyframes kit-rise  { from { transform: translateY(105%); } to { transform: none; } }
@keyframes kit-fade  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kit-drift { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Stehendes Bild mit wechselndem Text ----------
   Ein Bild bleibt oben stehen und wechselt, während die Textblöcke
   durchlaufen. Markup: [data-pinned] > .pinned-pin > .pinned-stage (Bilder,
   Zähler, Balken) + .pinned-steps > .pinned-step. Ohne JS: erstes Bild, alle
   Texte lesbar. .pinned-pin löst sich mobil auf, damit das Bild über die ganze
   Strecke stehen bleibt. */
.pinned-pin { display: contents; }
.pinned-stage { position: sticky; top: 0; z-index: 3; height: 40svh; min-height: 250px; max-height: 380px; overflow: hidden; background: var(--surface-2); box-shadow: 0 18px 30px -18px rgba(0,0,0,.6); }
.pinned-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity .55s ease, transform 2.4s var(--ease-soft); }
.pinned-stage img.on { opacity: 1; transform: none; }
.pinned-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 62%, rgba(0,0,0,.7) 100%); }
.pinned-no { position: absolute; z-index: 2; left: var(--gutter); bottom: 14px; display: flex; align-items: baseline; gap: .35rem; font-weight: 900; line-height: .8; color: #fff; }
.pinned-no b { display: inline-block; min-width: 1.15em; padding: .08em .14em .04em; background: var(--accent); color: var(--accent-ink); font-size: 3.4rem; font-variant-numeric: tabular-nums; border-radius: 4px; }
.pinned-no span { font-size: 1.25rem; opacity: .75; }
.pinned-bar { position: absolute; z-index: 2; right: var(--gutter); bottom: 22px; display: flex; gap: 5px; }
.pinned-bar i { width: 22px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); transition: background .3s ease, width .3s ease; }
.pinned-bar i.on { background: #fff; width: 34px; }
.pinned-tag { position: absolute; z-index: 3; right: 8px; top: 8px; padding: .18rem .4rem; border-radius: 3px; font-size: .6rem; font-weight: 600; letter-spacing: .05em; background: rgba(10,12,14,.72); color: #E9E6E1; transition: opacity .3s ease; }
.pinned-tag.off { opacity: 0; }
.pinned-step { padding: 1.9rem var(--gutter) 2.2rem; border-bottom: 1px solid var(--line); min-height: 44svh; display: flex; flex-direction: column; justify-content: center; }
.pinned-step:last-child { border-bottom: 0; }
.motion-on .pinned-step > * { opacity: .28; transform: translateX(-10px); transition: opacity .45s ease, transform .45s ease; }
.motion-on .pinned-step.on > * { opacity: 1; transform: none; }
.motion-on .pinned-step.on > :nth-child(2) { transition-delay: .06s; }
.motion-on .pinned-step.on > :nth-child(3) { transition-delay: .12s; }

/* ---------- Wechselbühne (Materialwechsel) ----------
   Mehrere Bilder an einem Platz, läuft von selbst, Antippen wählt.
   Markup: [data-swap] > .swap-stage (img mit data-name, .swap-name)
   + .swap-tabs > button. Takt: data-swap-ms, Standard 1700. */
.swap-stage { position: relative; aspect-ratio: 1/1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.swap-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .5s ease, transform 2.2s ease-out; }
.swap-stage img.on { opacity: 1; transform: none; }
.swap-name { position: absolute; z-index: 2; left: 14px; top: 12px; font-weight: 800; text-transform: uppercase; font-size: clamp(2.6rem, 14vw, 5rem); line-height: .9; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.swap-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 8px; }
.swap-tabs button { position: relative; appearance: none; border: 0; cursor: pointer; min-height: 52px; padding: 0 .2rem; border-radius: 6px; background: var(--surface); color: var(--ink-soft); font: inherit; font-weight: 700; font-size: .86rem; overflow: hidden; }
.swap-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--ink); }
.swap-tabs button i { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.swap-tabs button[aria-selected="true"] i { animation: kit-fill var(--swap-ms, 1700ms) linear both; }
.swap-paused .swap-tabs button[aria-selected="true"] i { animation: none; transform: none; }
@keyframes kit-fill { to { transform: scaleX(1); } }

@media (min-width: 900px) {
  .hero-video { min-height: min(100svh, 860px); align-items: center; }
  .hero-video-media { left: 46%; }
  .hero-video::after { background:
    linear-gradient(90deg, var(--dark) 0%, var(--dark) 46%, rgb(var(--hero-scrim, 10 12 14) / .55) 62%, rgb(var(--hero-scrim, 10 12 14) / 0) 82%),
    linear-gradient(180deg, rgb(var(--hero-scrim, 10 12 14) / .5) 0%, rgb(var(--hero-scrim, 10 12 14) / 0) 22%); }
  .hero-video-in { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding-top: 6rem; padding-bottom: 3rem; }
  .hero-video h1 { font-size: clamp(4.6rem, 8.2vw, 8.6rem); }
  .hero-video .hero-sub { font-size: 1.22rem; max-width: 36ch; }
  .hero-video .hero-act { display: flex; align-items: center; gap: 1.4rem; }
  [data-pinned] { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding: 0 var(--gutter); }
  .pinned-pin { display: block; align-self: stretch; }
  .pinned-stage { top: 12vh; height: 76vh; max-height: 640px; border-radius: var(--r-md); }
  .pinned-no { left: 22px; } .pinned-bar { right: 22px; }
  .pinned-step { padding-inline: 0; min-height: 62vh; }
  .swap-stage { aspect-ratio: 5/4; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-media video { display: none; }   /* Poster bleibt, nichts bewegt sich */
}

/* ==========================================================================
   5 · MOTION
   Ein System. Ohne JS steht alles sofort da; JS setzt .rv-wait, der
   IntersectionObserver tauscht es gegen .rv-in.
   ========================================================================== */

/* Grundeinblendung */
.rv-wait { opacity: 0; transform: translateY(var(--rv-y)); }
.rv-in   { opacity: 1; transform: none;
           transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slower) var(--ease-out); }

/* Richtungen */
.rv-left.rv-wait  { transform: translateX(calc(-1 * var(--rv-x, 60px))); }
.rv-right.rv-wait { transform: translateX(var(--rv-x, 60px)); }
.rv-scale.rv-wait { transform: scale(.96); }
.rv-lift.rv-wait  { transform: translateY(32px); }          /* Medien, LOADIO */
.rv-lift.rv-in    { transition: opacity var(--t-slow) var(--ease-out), transform .7s var(--ease-out) .25s; }

/* Zeilen nacheinander – Simons Vorgabe vom 26.10. Kinder bekommen --k aus JS. */
.rv-stagger > *   { transition: opacity .55s var(--ease-out), transform .55s var(--ease-soft); }
.rv-stagger.rv-wait > * { opacity: 0; transform: translateY(var(--rv-y)); }
.rv-stagger.rv-in  > * { opacity: 1; transform: none;
                         transition-delay: calc(var(--rv-delay) + var(--rv-step) * var(--k, 0)); }
.rv-stagger.rv-left.rv-wait > *  { transform: translateX(-24px); }
.rv-stagger.rv-right.rv-wait > * { transform: translateX(24px); }
/* Richtung des Elternteils darf die Kinder nicht mitziehen */
.rv-stagger.rv-left.rv-wait, .rv-stagger.rv-right.rv-wait, .rv-stagger.rv-scale.rv-wait { transform: none; }

/* Textzeile wird freigewischt (LOADIO compare) */
.rv-wipe > * { transition: clip-path .52s var(--ease-out) .12s; }
.rv-wipe.rv-wait > * { clip-path: inset(-.3em 100% -.3em 0); }
.rv-wipe.rv-in   > * { clip-path: inset(-.3em -1rem -.3em 0); }

/* Linie zeichnet sich */
.rv-rule { transform-origin: left; transition: transform .55s var(--ease-out) .18s; }
.rv-rule.rv-wait { transform: scaleX(0); opacity: 1; }
.rv-rule.rv-in   { transform: none; }
.rv-seam { transform-origin: top; transition: transform .6s var(--ease-in-out) .25s; }
.rv-seam.rv-wait { transform: scaleY(0); opacity: 1; }
.rv-seam.rv-in   { transform: none; }

/* Balken wachsen (Wichmann .days) */
.rv-bars .bar { transform-origin: bottom; transition: transform .9s var(--ease-soft); }
.rv-bars.rv-wait .bar { transform: scaleY(0); }
.rv-bars.rv-in   .bar { transition-delay: calc(100ms + 120ms * var(--k, 0)); }
/* Messbalken füllen (Wichmann .fit) */
.rv-meter i { transform-origin: left; transition: transform .5s var(--ease-soft); }
.rv-meter.rv-wait i { transform: scaleX(0); }
.rv-meter.rv-in   i { transition-delay: calc(200ms + 150ms * var(--k, 0)); }

/* Gezeichnete Linien in SVG – Aufmaß, Skizze, Pfeil */
.rv-draw [data-draw] { stroke-dasharray: none; }
.motion-on .rv-draw [data-draw] { stroke-dasharray: var(--len, 1200); stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease-out); }
.motion-on .rv-draw.rv-wait [data-draw] { stroke-dashoffset: var(--len, 1200); }
.motion-on .rv-draw.rv-in [data-draw] { transition-delay: calc(var(--rv-delay) + 180ms * var(--k, 0)); }
.rv-draw [data-fade] { transition: opacity .5s var(--ease-out); }
.rv-draw.rv-wait [data-fade] { opacity: 0; }
.rv-draw.rv-in   [data-fade] { transition-delay: calc(700ms + 200ms * var(--k, 0)); }

/* Zahl zählt hoch – JS schreibt den Text, CSS hält die Breite ruhig */
.rv-count { font-variant-numeric: tabular-nums; }

/* Schreibmarke für den Tippeffekt */
.tcaret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px;
          background: var(--accent); animation: bc-caret 900ms step-end infinite; }
@keyframes bc-caret { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Balkengrundlage für .rv-bars */
.bars { display: grid; grid-auto-flow: column; gap: .6rem; align-items: end; height: clamp(120px, 18vw, 190px); }
.bars li { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: .3rem; }
.bars .bar { display: block; height: calc(var(--h, 50) * 1%); border-radius: 4px; background: var(--accent); }
.bars b { font-size: .78rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-soft); text-align: center; }

/* Einmal abspielende Szene (LOADIO armed/play): Grundzustand = fertiges Bild */
.scene.armed .scene-el { opacity: 0; transform: translateY(24px); }
.scene.armed.play .scene-el { opacity: 1; transform: none; transition: opacity .55s var(--ease-out), transform .6s var(--ease-soft); }
.scene.armed.play .scene-el { transition-delay: calc(var(--rv-delay) + 220ms * var(--k, 0)); }

/* Alles aus, wenn der Besucher das so will */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .rv-wait, .rv-wait > *, .scene.armed .scene-el { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .rv-draw [data-draw] { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
}

/* ==========================================================================
   6 · BREITEN
   Geprüft wird 1440, 1024, 390, 375, 320.
   ========================================================================== */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .btn-block { width: auto; }
}

@media (min-width: 1024px) {
  :root { --gutter: 56px; --rv-y: 18px; }
  body { font-size: 18px; }
  .section > .wrap > .lead { margin-bottom: 2.5rem; }

  .split { grid-template-columns: 1fr 1fr; }
  .split-seam { display: block; }
  .split > * { padding: var(--space-block) clamp(2rem, 3.5vw, 3.5rem); }

  .story { gap: clamp(5rem, 8vw, 8rem); }
  .story-step { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
  .story-step:nth-child(even) .story-copy { order: 2; }
  .story-step:nth-child(even) .story-viz  { order: 1; }
  .story-text { font-size: 1.1rem; }

  .gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery--3 { grid-template-columns: repeat(3, 1fr); }

  .band-copy { padding: clamp(2.5rem, 4vw, 4rem) var(--gutter); }
  .band-line { bottom: 2.4rem; }

  /* Die Handlungsleiste braucht der Desktop nicht, der CTA steht im Bild */
  .sticky-cta:not(.sticky-cta--top) { display: none; }
  .footer { padding: 4rem 0 3rem; }
}

@media (min-width: 1280px) { :root { --gutter: 80px; } }

/* Ganz schmal: nichts darf überlaufen */
@media (max-width: 359.98px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .btn { padding: 0 1.1rem; font-size: 1rem; }
}
