/* ==========================================================================
   Abschnitt BEISPIEL (Präfix b-) · id beispiel · Fläche dunkel · Bühne 2 von 4
   Besitz: Builder «beispiel». Fassung 3 (16.10.2026): Fallstudie Yuppi-du wie eine Projektseite.
     1. Abschnitt, senkrechtes Etikett, Datenblatt, Titel (liegt über der Oberkante des Films)
     2. Band: der Film der echten Seite randlos, Umgebungslicht dahinter, Marke 1, Knopf zum Anhalten
     3. Unter dem Band: Anmerkung 01 und die Einleitung
     4. Geräte: Geisterwort BOWLING, Computer (Buchung), Bestätigungsseite, Handy (Speisekarte, läuft langsam)
     5. Anmerkungen 02 bis 04, Marken, Linien (Linien zeichnet beispiel.js, nur ab 1024 px)
     6. Schlusssatz
     7. Mittlere und kleine Fenster, Bewegung reduzieren
   Regeln: BAUPLAN-v3.md. Eigene Variablen mit --b-.
   ========================================================================== */

/* ---------- 1. Abschnitt, Etikett, Datenblatt, Titel ---------- */
.b-beispiel {
  --licht-x: 50%; --licht-y: 46%; --licht-b: 90%; --licht-h: 52%; --licht-a: .26;
  --b-gt: clamp(34px, 5vw, 80px);                 /* Titelgröße */
  --b-band-v: 1920 / 828;                          /* Seitenverhältnis des Films am Computer */
  --b-ueber: calc(var(--b-gt) * 1.04 * .56);       /* so weit liegt der Titel über dem Film */
  --b-linie: rgba(181, 151, 245, .78);
}
/* senkrechtes Mono-Etikett mitten im linken Rand, liest von unten nach oben.
   Änderungen 22.10.: eine Schiene mit derselben feinen Linie oben und unten. Sie reicht von der Oberkante des Datenblatts
   bis zum Ende der Einleitung: Das Etikett liegt absolut in den Rasterzeilen 1 bis 3 (Datenblatt, Titel, Einleitung;
   das Datenblatt steht dank order: -1 in Zeile 1), so wächst die Schiene mit, egal wie viele Zeilen der Text hat.
   Das Etikett steht in zwei Zeilen («Beispielprojekt», darunter die Arten des Betriebs), wie am Handy: Ab 1280 px
   steht das Datenblatt in einer Reihe, die Schiene ist dann nur gut 400 px lang, und in einer Zeile (rund 380 px)
   blieben für die Linien kaum ein paar Pixel. So bleiben oben und unten überall mindestens etwa 70 px Linie. */
.b-beispiel > .b-projekt {
  position: absolute; z-index: 2; grid-row: 1 / 4; top: 0; bottom: 0;
  left: calc(var(--kante) * -1); width: var(--kante);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.b-beispiel > .b-projekt::before, .b-beispiel > .b-projekt::after { content: ''; flex: 1 1 0; min-height: 24px; width: 1px; background: var(--b-linie); opacity: .55; }
.b-projekt-text { writing-mode: vertical-rl; rotate: 180deg; white-space: nowrap; text-align: center; line-height: 1.15; }
.b-projekt-a, .b-projekt-b { display: block; }
.b-projekt-b { margin-block-start: 3px; }
.b-projekt-trenn { display: none; }

.b-kopf { position: relative; z-index: 2; }
/* Datenblatt: im Quelltext nach dem Film (so liest es das Handy), am Computer oben wie bei einer Projektseite */
.b-beispiel > .b-daten { order: -1; margin-bottom: clamp(48px, 5vw, 80px); }
.b-daten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--spalt); }
.b-daten > div { padding-top: 16px; border-top: 1px solid var(--kante-licht); }
.b-daten dt { color: var(--flieder); }
.b-daten dd { margin-top: 10px; font: 500 var(--t-klein)/1.45 var(--f-text); color: var(--text); max-width: 19rem; text-wrap: pretty; }

.b-titel {
  position: relative; z-index: 2;
  font: 700 var(--b-gt)/1.04 var(--f-display); letter-spacing: -.03em; text-wrap: balance;
}
.b-titel .b-zeile { display: block; }
.b-titel .g-kraeftig { letter-spacing: -.035em; }

/* ---------- 2. Einleitung (das frühere Filmband ist gestrichen, der Film läuft nur im Einstieg) ---------- */
.b-einleitung { margin-top: clamp(24px, 2.6vw, 40px); }
.b-einleitung .b-lede { grid-column: 1 / span 7; padding-top: 0; }
@media (max-width: 1023px) { .b-einleitung .b-lede { grid-column: 1 / -1; } }
.b-band { position: relative; z-index: 1; margin-top: calc(var(--b-ueber) * -1); }
.b-film { position: relative; aspect-ratio: var(--b-band-v); isolation: isolate; }
/* Umgebungslicht: eine stark unscharfe, gesättigte Kopie des Films strahlt in den Raum (über, unter und links vom Band) */
.b-schein {
  position: absolute; z-index: -1; inset: -12% 0 -9% -7%; pointer-events: none;
  filter: blur(56px) saturate(1.7) brightness(1.05); opacity: .56;
}
.b-schein > img, .b-schein > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.b-schein-film { opacity: 0; transition: opacity 1.2s var(--kurve); }
.b-film.b-licht-an .b-schein-film { opacity: 1; }
/* das Bild selbst: randlos nach rechts, links abgerundet wie eine Bildkarte, feine Fliederkante */
.b-film-bild {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: var(--r-karte) 0 0 var(--r-karte); background: var(--graphit-0);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
}
.b-film-bild::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(18, 4, 15, .62) 0%, rgba(18, 4, 15, .22) 12%, rgba(18, 4, 15, 0) 24%);
  box-shadow: inset 1px 1px 0 rgba(181, 151, 245, .34), inset 0 -1px 0 rgba(181, 151, 245, .26);
}
.b-film-standbild, .b-film-video { position: absolute; inset: 0; width: 100%; height: 100%; }
.b-film-standbild img, .b-film-video { width: 100%; height: 100%; object-fit: cover; object-position: 0% 50%; background: var(--graphit-0); }
.b-film-video { opacity: 0; transition: opacity .5s var(--kurve); }
.b-film.b-laeuft .b-film-video { opacity: 1; }
.b-film > .b-marke { z-index: 3; }

/* Knopf zum Anhalten des Films (WCAG 2.2.2); erscheint erst, wenn der Film läuft. Die Beschriftung wechselt (anhalten, abspielen). */
.b-film-knopf {
  position: absolute; z-index: 4; right: var(--kante); bottom: clamp(12px, 1.6vw, 22px);
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 14px;
  border: 0; border-radius: 999px; background: rgba(18, 4, 15, .62); color: var(--elfenbein);
  box-shadow: inset 0 0 0 1px rgba(181, 151, 245, .34);
  font: 500 var(--t-klein)/1 var(--f-text);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color var(--dauer-s) var(--kurve);
}
.b-film-knopf:hover { background: rgba(55, 27, 61, .86); }
.b-film-zeichen { position: relative; width: 12px; height: 12px; flex: none; }
.b-film-zeichen::before, .b-film-zeichen::after { content: ""; position: absolute; top: 0; bottom: 0; width: 3.5px; border-radius: 1px; background: var(--flieder); }
.b-film-zeichen::before { left: 1px; } .b-film-zeichen::after { right: 1px; }
.b-film-knopf[data-b-aus="ja"] .b-film-zeichen::before { left: 2px; width: 0; height: 0; border-radius: 0; background: none; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--flieder); }
.b-film-knopf[data-b-aus="ja"] .b-film-zeichen::after { display: none; }

/* ---------- 3. Unter dem Band ---------- */
.b-unterband { margin-top: clamp(40px, 4.4vw, 72px); row-gap: 32px; align-items: start; }
.b-unterband .b-notiz { grid-column: 1 / span 4; }
.b-lede { grid-column: 7 / -1; max-width: 36rem; padding-top: 6px; }

/* ---------- 4. Geräte ---------- */
.b-geraete { position: relative; margin-top: clamp(88px, 9vw, 150px); }
.b-geraete > .b-wort {
  --b-wg: min(var(--t-xxl), var(--inhalt) / 5.98);
  position: relative; z-index: 0; font-size: var(--b-wg); line-height: .8;
  color: transparent; -webkit-text-fill-color: transparent;
  background: linear-gradient(180deg, rgba(181, 151, 245, .24) 0%, rgba(181, 151, 245, .10) 46%, rgba(181, 151, 245, .02) 78%);
  -webkit-background-clip: text; background-clip: text;
  margin-left: -.04em;
}
.b-buehne {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--spalt); align-items: start;
  margin-top: calc(var(--b-wg, 200px) * -.38);
}
.b-geraete { --b-wg: min(var(--t-xxl), var(--inhalt) / 5.98); }
.b-buehne > figure { position: relative; min-width: 0; }
.b-laptop { grid-column: 1 / span 8; grid-row: 1; margin-top: clamp(40px, 5vw, 76px); }
.b-laptop .g-browser { box-shadow: 0 0 0 1px var(--kante-licht), 0 0 0 1px rgba(255, 255, 255, .06) inset, var(--schatten-dunkel), 0 40px 140px -30px rgba(122, 59, 216, .55); }
.b-mail { grid-column: 8 / span 2; grid-row: 1; z-index: 2; justify-self: start; width: clamp(180px, 16.5vw, 250px); margin-top: clamp(250px, 26vw, 380px); margin-left: clamp(-60px, -3vw, -24px); }
.b-mail-bild {
  position: relative; overflow: visible; border-radius: 18px; background: #0F1A2B; aspect-ratio: 600 / 849;
  box-shadow: 0 0 0 1px rgba(181, 151, 245, .4), 0 30px 60px -20px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .4);
}
.b-mail-bild picture, .b-mail-bild img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.b-handy { grid-column: 10 / -1; grid-row: 1; justify-self: end; z-index: 3; }
.b-handy .g-handy { --handy-b: min(300px, 20.6vw); }
.b-handy .g-handy { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 0 0 2.5px rgba(0, 0, 0, .55), 0 0 0 1px rgba(181, 151, 245, .3), var(--schatten-dunkel), 0 30px 120px -30px rgba(242, 200, 150, .32); }
/* Handy: Kopf der Kundenseite steht, die Seite darunter läuft langsam durch (nur mit Skript, nur im Bild) */
.b-handy-bild { container-type: inline-size; background: #F4EDE2; }
.b-handy-leiste { position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 13.5cqw; background: #12202F; }
.b-handy-kopf { position: absolute; z-index: 1; top: 13.5cqw; left: 0; right: 0; }
.b-handy-kopf img { width: 100%; height: auto; }
.b-handy-strecke { position: absolute; left: 0; right: 0; top: 30.4cqw; will-change: transform; }
.b-handy-strecke img { width: 100%; height: auto; object-fit: initial; }
.b-handy.b-laeuft .b-handy-strecke { animation: b-blaettern 22s var(--kurve-ein-aus) infinite; }
.b-handy.b-steht .b-handy-strecke { animation-play-state: paused; }
@keyframes b-blaettern {
  0%, 10% { transform: translate3d(0, 0, 0); }
  24%, 36% { transform: translate3d(0, -21%, 0); }
  50%, 62% { transform: translate3d(0, -39%, 0); }
  74%, 86% { transform: translate3d(0, -57%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- 5. Anmerkungen, Marken, Linien ---------- */
.b-marke {
  position: absolute; z-index: 3; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(18, 4, 15, .82); color: var(--flieder);
  box-shadow: 0 0 0 1px var(--flieder), 0 0 0 6px rgba(181, 151, 245, .16), 0 4px 18px rgba(0, 0, 0, .5);
  font: 600 12px/1 var(--f-mono); letter-spacing: 0;
  pointer-events: none;
}
.b-marke-1 { left: 48.6%; top: 86.6%; }   /* Wunsch «Kinderbahn mit Banden» im Formular */
.b-marke-2 { left: 45%; top: 94.4%; }    /* rechtes Ende des Knopfs «Ja, bestätigen» */
.b-marke-3 { left: 2%; top: 62%; }       /* linke Kante des Handys */

.b-notizen { margin-top: clamp(56px, 5vw, 84px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--spalt); row-gap: 40px; counter-reset: none; }
.b-notizen > .b-notiz:nth-child(1) { grid-column: 1 / span 4; }
.b-notizen > .b-notiz:nth-child(2) { grid-column: 5 / span 4; }
.b-notizen > .b-notiz:nth-child(3) { grid-column: 9 / span 4; }
.b-notiz { display: block; position: relative; }
.b-notiz > span { display: block; }
.b-nr { font: 200 clamp(40px, 3.4vw, 56px)/1 var(--f-display); letter-spacing: -.04em; color: var(--flieder); font-variant-numeric: tabular-nums; }
.b-notiz-etikett { margin-top: 16px; color: var(--elfenbein); }
.b-notiz-text { margin-top: 8px; font: 400 var(--t-text)/var(--zeile-text) var(--f-text); color: var(--text-2); max-width: 22rem; text-wrap: pretty; }

.b-linien { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; display: none; }
.b-linien.b-bereit { display: block; }
.b-linien path { fill: none; stroke: var(--b-linie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.b-linien .b-linie-schatten { stroke: rgba(18, 4, 15, .55); stroke-width: 3; }
.b-linien circle { fill: var(--flieder); }
.b-linien.b-zieht path { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.5s var(--kurve) .15s; }
.b-linien.b-zieht circle { opacity: 0; transition: opacity .4s var(--kurve) 1.3s; }
.b-linien.b-zieht.b-gezogen path { stroke-dashoffset: 0; }
.b-linien.b-zieht.b-gezogen circle { opacity: 1; }

/* ---------- 6. Schlusssatz ---------- */
.b-schluss { margin-top: clamp(96px, 10vw, 168px); font: 200 clamp(30px, 4.3vw, 66px)/1.08 var(--f-display); letter-spacing: -.03em; text-wrap: balance; }
.b-schluss-link { color: var(--text); text-decoration: none; display: inline-block; max-width: 100%; border-radius: 6px; }
.b-schluss-vor { color: var(--elfenbein); }
.b-schluss-ziel {
  font-weight: 800; color: var(--flieder); white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 2px no-repeat;
  padding-bottom: .06em; transition: background-size .5s var(--kurve);
}
.b-schluss-pfeil { display: inline-block; width: .74em; height: .74em; margin-left: .2em; vertical-align: -.04em; transition: transform var(--dauer-s) var(--kurve); }
.b-schluss-link:hover .b-schluss-ziel, .b-schluss-link:focus-visible .b-schluss-ziel { background-size: 100% 2px; }
.b-schluss-link:hover .b-schluss-pfeil { transform: translateX(.12em); }
.b-schluss-link:focus-visible { outline-offset: 8px; }

/* ---------- 7. Mittlere und kleine Fenster ---------- */
@media (max-width: 1279px) {
  .b-daten { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .b-daten dd { max-width: 26rem; }
}
@media (max-width: 1023px) {
  .b-unterband .b-notiz { grid-column: 1 / span 4; }
  .b-lede { grid-column: 1 / -1; }
  .b-buehne { grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: 0; }
  .b-laptop { grid-column: 1 / -1; margin-top: 24px; }
  .b-mail { grid-column: 1 / span 3; grid-row: 2; width: 100%; margin: -40px 0 0 0; }
  .b-handy { grid-column: 5 / -1; grid-row: 2; justify-self: end; margin-top: -72px; }
  .b-handy .g-handy { --handy-b: min(280px, 34vw); }
  .b-notizen { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .b-notizen > .b-notiz:nth-child(n) { grid-column: 1 / -1; }
  .b-notizen > .b-notiz { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); column-gap: 8px; }
  .b-notizen .b-nr { grid-row: 1 / span 2; font-size: 40px; }
  .b-notizen .b-notiz-etikett { margin-top: 4px; }
  .b-linien.b-bereit { display: none; }
  /* Unter 1024 px (Handy und Tablet hochkant): das Etikett liegt quer über dem Titel, in zwei Zeilen: «Beispielprojekt»
     mit der feinen Linie bis zum Rand, darunter die Arten des Betriebs (so bricht es auch bei 360 px nie mitten in der
     Aufzählung). Nachbessern 22.10.: schon ab 1023 px statt erst am Handy; im linken Rand (5,5 vw) stand die senkrechte
     Schiene zwischen 768 und 1023 px nur 6 bis 9 px vom Fensterrand. Von 768 bis 1023 px steht es so zwischen
     Datenblatt und Titel, am Handy oben im Abschnitt über dem Titel. */
  .b-beispiel > .b-projekt {
    position: static; grid-row: auto; width: auto; margin-bottom: 28px;
    display: grid; grid-template-columns: auto minmax(24px, 1fr); align-items: center; column-gap: 14px; row-gap: 4px;
  }
  .b-beispiel > .b-projekt::before { display: none; }
  .b-beispiel > .b-projekt::after { grid-column: 2; grid-row: 1; width: auto; min-height: 0; height: 1px; }
  .b-projekt-text { display: contents; writing-mode: horizontal-tb; rotate: none; white-space: normal; text-align: start; line-height: inherit; }
  .b-projekt-a { grid-column: 1; grid-row: 1; }
  .b-projekt-b { grid-column: 1 / -1; grid-row: 2; margin: 0; }
}
@media (max-width: 767px) {
  .b-beispiel { --b-band-v: 720 / 540; --b-gt: clamp(32px, 8.6vw, 44px); }
  .b-titel .b-zeile { display: inline; }
  .b-beispiel > .b-daten { order: 0; margin: 56px 0 0; }
  .b-geraete > .b-wort { margin-bottom: 0; }
  .b-buehne { margin-top: calc(var(--b-wg) * -.16); }
  .b-marke-3 { left: 97%; top: 30%; }
}
@media (max-width: 599px) {
  .b-daten { grid-template-columns: minmax(0, 1fr); row-gap: 0; border-bottom: 1px solid var(--kante-leise); }
  .b-daten > div { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); column-gap: 12px; padding: 12px 0; border-top-color: var(--kante-leise); }
  .b-daten > div:first-child { border-top-color: var(--kante-licht); }
  .b-daten dt { padding-top: .25em; }
  .b-daten dd { margin-top: 0; }
  .b-unterband .b-notiz { grid-column: 1 / -1; }
  .b-unterband .b-notiz { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); column-gap: 8px; }
  .b-unterband .b-nr { grid-row: 1 / span 2; font-size: 40px; }
  .b-unterband .b-notiz-etikett { margin-top: 4px; }
  .b-buehne { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .b-mail { grid-column: 1 / span 2; margin-top: -28px; }
  .b-handy { grid-column: 3 / -1; margin-top: -56px; }
  .b-handy .g-handy { --handy-b: min(240px, 50vw); }
  .b-notizen { grid-template-columns: minmax(0, 1fr); }
  .b-film-knopf { padding: 0 14px 0 12px; }
  .b-schluss-ziel { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .b-handy .b-handy-strecke { animation: none !important; transform: none !important; }
  .b-schein-film { display: none; }
}
