/* drahtkartenhalter.ch – Ergänzungen zu main.css (Oktober 2026)
   Ursprüngliches Layout: Vollbilder mit Text. Neu: weisse Startseite mit Röntgen-3D,
   Schriftzug oben mittig, «Geschichte» und «Kaufen» unten. Kopf und unten sind schwarz/weiss:
   schwarz auf hellem Grund, weiss auf dunklen Bildern. */

@font-face { font-family: 'Favorit Mono'; src: url(../assets/fonts/ABCFavoritMonoEdu-Regular.woff2) format('woff2'), url(../assets/fonts/ABCFavoritMonoEdu-Regular.woff) format('woff'); font-display: swap; }

:root { --rand: clamp(16px, 2.2vw, 32px); --kopf: clamp(64px, 9vh, 96px); --unten: 64px; }

/* alter Kopf und Kaufen-Knopf aus main.css nicht mehr verwenden */
header:not(.kopf) { display: none; }

/* schwarz auf hellem Grund (Startseite, helle Bilder), sonst weiss */
body.hell header.kopf, body.hell nav.unten { color: #000; }

/* Kopf: Schriftzug mittig */
header.kopf { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--kopf); margin: 0;
              display: flex; justify-content: center; align-items: center; pointer-events: none;
              color: #fff; font-size: 16px; transition: color .25s; }
header.kopf a { pointer-events: auto; display: block; color: inherit; }
header.kopf .logo { display: block; height: clamp(34px, 5.2vh, 52px); width: auto; aspect-ratio: 167.129 / 120.508; fill: currentColor; }

/* Unten: Geschichte links, Kaufen rechts */
nav.unten { position: fixed; inset: auto 0 0 0; z-index: 50; height: var(--unten); padding: 0 var(--rand) 18px;
            display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none;
            color: #fff; transition: color .25s; font-family: 'Favorit Mono', ui-monospace, monospace; font-size: 17px; line-height: 1; }
nav.unten a { pointer-events: auto; color: inherit; text-decoration: none; }
nav.unten a:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* Startseite weiss, 3D zwischen Kopf und unterer Leiste */
section.hero { position: relative; height: 100dvh; background: #fff; overflow: hidden; }
#xr-stage { position: absolute; top: var(--kopf); bottom: var(--unten); left: var(--rand); right: var(--rand);
            cursor: grab; opacity: 0; transition: opacity .9s ease; }
#xr-stage.ready { opacity: 1; }
#xr-stage:active { cursor: grabbing; }
#xr-stage canvas { display: block; width: 100%; height: 100%; }

/* Footer: am Ende einrasten, Platz für die untere Leiste */
footer { scroll-snap-align: end; height: auto; min-height: 4.25em; padding: 2.5em 1em calc(var(--unten) + 2em); }
footer p { line-height: 1.4; }
footer .links { margin-top: 1.25em; font-size: .85em; }

@media (max-width: 640px) {
    :root { --unten: 56px; }
    nav.unten { font-size: 15px; padding-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { #xr-stage { transition: none; } }

/* Unterseiten (Geschichte, Impressum & AGB): weiss, Kopf und Leiste schwarz */
body.hell nav.unten a[aria-current="page"] { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
body.hell:not(:has(section.hero, section.description)) main { padding-top: var(--kopf); }
body.hell:not(:has(section.hero, section.description)) header.kopf,
body.hell:not(:has(section.hero, section.description)) nav.unten { background: #fff; }      /* auf Textseiten nichts überlagern */
body.hell:not(:has(section.hero, section.description)) nav.unten { align-items: center; padding-bottom: 0; }

/* Oben und unten: durchgehende schwarze Balken, Schrift immer weiss */
header.kopf, nav.unten,
body.hell header.kopf, body.hell nav.unten,
body.hell:not(:has(section.hero, section.description)) header.kopf,
body.hell:not(:has(section.hero, section.description)) nav.unten { background: #000; color: #fff; transition: none; }
nav.unten, body.hell:not(:has(section.hero, section.description)) nav.unten { align-items: center; padding-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
header.kopf { padding-top: env(safe-area-inset-top); }

/* ===== Stand 11.10.: Schriftzug nur oben auf der ersten Seite, untere Leiste weiss ===== */
body { position: relative; }                       /* Kopf scrollt mit der Seite weg */
html body header.kopf { position: absolute !important; background: none !important; color: #000 !important; padding-top: 0; }
html body nav.unten { background: #fff !important; color: #000 !important; }
html body nav.unten a[aria-current="page"] { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* Geschichte: erste Seite weiss mit grossem Titel, danach Vollbilder mit Text wie auf der Startseite */
section.hero.titel { display: flex; align-items: center; justify-content: center; padding: var(--kopf) 10% var(--unten); }
section.hero.titel h2 { color: #000; margin: 0; text-align: left; }
.geschichte-bild h2.lang { font-size: clamp(26px, 3.6vw, 54px); line-height: 1.05; max-width: min(16em, 80vw); }
.geschichte-bild.text-schwarz h2 { color: #000; }

/* Footer im gleichen Stil auf allen Seiten */
footer.ende { display: flex; justify-content: center; align-items: center; text-align: center; background: #000; color: #fff;
              font-family: 'Favorit Bold', -apple-system, Arial, sans-serif; font-size: 16px; line-height: 1.4;
              scroll-snap-align: end; min-height: 4.25em; padding: 2.5em 1em calc(var(--unten) + 2em); }
footer.ende p { margin: 0; }
footer.ende a { color: #fff; }
footer.ende .links { margin-top: 1.25em; font-size: .85em; }
.recht + footer.ende, body:not(:has(section.hero, section.description)) footer.ende { margin-top: 12svh; }

@media (max-width: 640px) {
    .geschichte-bild h2.lang { font-size: 8.2vw; }
}

/* ===== Stand 11.10. (2): grösserer Schriftzug, schmalere untere Leiste, Footer mit drei Punkten ===== */
:root { --kopf: clamp(88px, 13.5vh, 136px); --unten: 46px; }
html body header.kopf .logo { height: clamp(58px, 9.5vh, 96px); aspect-ratio: 169.239 / 120.508; }
html body nav.unten { height: var(--unten); font-size: 20px; padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; }

/* Footer: drei Punkte, gross wie die Bildtexte, untereinander */
footer.ende { display: block; text-align: left; min-height: 70dvh; padding: 12dvh 10% calc(var(--unten) + 7dvh); }
footer.ende .ende-links { display: flex; flex-direction: column; align-items: flex-start; gap: .08em;
                          font-family: 'Favorit Bold', -apple-system, Arial, sans-serif; font-size: 7.5dvw; line-height: .95; }
footer.ende .ende-links a { color: #fff; text-decoration: none; }
footer.ende .ende-links a:hover { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
footer.ende .ende-adresse { margin-top: 2.2em; font-family: 'Favorit Mono', ui-monospace, monospace; font-size: 15px; line-height: 1.4; opacity: .75; }

@media (max-width: 640px) {
    :root { --kopf: 96px; --unten: 42px; }
    html body header.kopf .logo { height: 62px; }
    html body nav.unten { font-size: 17px; }
    footer.ende .ende-links { font-size: 9dvw; }
    footer.ende .ende-adresse { font-size: 13px; }
}

/* ===== Footer: drei Punkte übereinander, mittig, gleiche Schrift wie «Geschichte» und «Kaufen», weiss ===== */
html body footer.ende { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
                        min-height: 50dvh; padding: 8dvh 1em calc(var(--unten) + 8dvh); }
html body footer.ende .ende-links { flex-direction: column; align-items: center; gap: .55em;
                                    font-family: 'Favorit Mono', ui-monospace, monospace; font-size: 20px; line-height: 1; letter-spacing: 0; }
html body footer.ende .ende-links a { color: #fff; text-decoration: none; }
html body footer.ende .ende-links a:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
@media (max-width: 640px) { html body footer.ende .ende-links { font-size: 17px; } }

html body nav.unten { z-index: 150; transition: background-color .2s, color .2s; }
html body.am-ende nav.unten { background: #000 !important; color: #fff !important; }   /* verschmilzt mit dem Footer */

/* ===== Letzte Runde: 3D über die ganze Startseite, kleinerer Schriftzug, höhere Leiste ===== */
:root { --kopf: clamp(76px, 11.5vh, 116px); --unten: 56px; }
html body header.kopf .logo { height: clamp(46px, 7.4vh, 74px); }
html body nav.unten { height: var(--unten); }
#xr-stage { inset: 0 !important; }                                  /* ganze Seite, nichts wird abgeschnitten */
html body.auf-start nav.unten { background: transparent !important; color: #000 !important; }
html body header.kopf { z-index: 60; }
@media (max-width: 640px) {
    :root { --kopf: 84px; --unten: 52px; }
    html body header.kopf .logo { height: 50px; }
}

/* ===== 17.10.: ruhiges Blättern, Browserleiste oben in der Farbe der Seite ===== */
html, body { background-color: #fff; transition: background-color .35s ease; }   /* Startfarbe weiss; danach setzt seite.js die Farbe */
html body header.kopf { box-sizing: content-box; padding-top: env(safe-area-inset-top); }   /* Schriftzug nie unter der Statusleiste */
@media (prefers-reduced-motion: reduce) { html, body { transition: none; } }

/* ===== 17.10. (2): Die Seite scrollt als Ganzes (nicht mehr nur der body).
   So kann Safari am iPhone die Fotos auch hinter der Statusleiste oben zeigen. ===== */
html { height: auto !important; width: auto !important; overflow-x: hidden; overflow-y: auto !important; scroll-snap-type: y mandatory; }
html body { height: auto !important; width: auto !important; overflow: visible !important; scroll-snap-type: none !important; }
html:has(main.recht) { scroll-snap-type: none; }                      /* Impressum & AGB: normal scrollen */
@supports (height: 100lvh) {                                           /* Bilder füllen den Bildschirm auch hinter den Browserleisten */
  main > section.description, main > section.description img { height: 100lvh !important; }
}

/* ===== 17.10. (3), überarbeitet: Am Handy hat jedes Bild oben einen Überstand, der in einer Lücke vor dem Abschnitt liegt.
   So füllt das Bild beim Blättern laufend auch den Bereich hinter der Statusleiste, ohne Umschalten. ===== */
:root { --ueberstand: 0px; }
@media (pointer: coarse) { :root { --ueberstand: 64px; } }
main > section.description { position: relative; margin-top: var(--ueberstand); }
main > section.description > div { overflow-x: clip !important; overflow-y: visible !important; }   /* oben darf das Bild hinausragen, seitlich nicht */
main > section.description img { position: relative; top: calc(-1 * var(--ueberstand)); height: calc(100lvh + var(--ueberstand)) !important; }
@supports not (height: 100lvh) { main > section.description img { height: calc(100vh + var(--ueberstand)) !important; } }
main > section.description h2 { z-index: 1; }
html body section.hero:not(.titel) { height: 100svh; }                 /* Startseite: genau der sichtbare Bereich, springt nicht */
/* Kein Einrasten durch den Browser: seite.js blättert am Computer und am Handy selbst (zuverlässiger als Safaris Einrasten). */
html { scroll-snap-type: none !important; overscroll-behavior-y: none; }

/* ===== 17.10. (4): kein Blitzen beim Blättern ===== */
html, body { transition: none !important; }
main > section.description img { transform: translateZ(0); backface-visibility: hidden; }   /* Bild bleibt fertig gerechnet */

/* ===== 20.10.: Handy: der Browser rastet selbst ein (gleicher Fluss wie studiodreitausend.ch).
   Die ganze Seite scrollt, damit Safari die Fotos auch hinter der Statusleiste zeigt.
   Jedes Foto ragt dafür 64 px nach oben in eine Lücke vor seinem Abschnitt (siehe oben). ===== */
@media (pointer: coarse) {
  html { scroll-snap-type: y mandatory !important; }
  html:has(main.recht) { scroll-snap-type: none !important; }
  main > section { scroll-snap-align: start; }
}

/* ===== 29.10.: Video (wie ein GIF: stumm, in Schleife) verhält sich wie die Bilder ===== */
main > section.description video { display: block; width: 100%; height: calc(100lvh + var(--ueberstand)); object-fit: cover; object-position: center;
                                   position: relative; top: calc(-1 * var(--ueberstand)); background: #111; }
@supports not (height: 100lvh) { main > section.description video { height: calc(100vh + var(--ueberstand)); } }

/* ===== 29.10.: Titelseite der Geschichte: Prototypen-Foto über die ganze Seite, Titel darüber (quer am Computer, hoch am Handy) ===== */
section.hero.titel { position: relative; }
section.hero.titel .titelbild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
section.hero.titel h2 { position: relative; z-index: 1; }
@media (orientation: portrait) { section.hero.titel .titelbild img { object-fit: contain; } }   /* Handy: alle Drähte sichtbar, der weisse Rand geht in die Seite über */

/* Museum-Bild: Halter und Schild bleiben am Computer im Ausschnitt */
main > section.description .museum img { object-position: 50% 74%; }

/* ===== 29.10. (2): Stop-Motion-Videos auf Weiss. Handy: ganze Seite. Computer: ganzes Video rechts, Text links, Weiss geht nahtlos über. ===== */
main > section.description:has(video.video-weiss) { background: #fff; }
main > section.description video.video-weiss { background: #fff; }
main > section.description:has(video.video-weiss) h2 { color: #000 !important; }
@media (orientation: landscape) {
  main > section.description video.video-weiss { object-fit: contain; object-position: 84% 50%; }
}

/* Text oben statt in der Mitte (Handy), damit er das Video nicht verdeckt */
@media (orientation: portrait) {
  main > section.description .text-oben h2 { margin-top: 0 !important; transform: none !important; top: max(13lvh, calc(env(safe-area-inset-top) + 72px)); }
}

/* ===== 29.10. (3): Handy: das Wort «draht» ganz zeigen (vorher links und rechts abgeschnitten und unten von der Browserleiste verdeckt).
   Volle Breite, etwas nach oben gesetzt; das Weiss geht nahtlos in die Seite über. ===== */
@media (orientation: portrait) {
  main > section.description video.video-wort { object-fit: contain; object-position: 50% 30%; }
}

/* ===== 29.10. (4): Seiten aus dem Inhaltsplan gebaut ===== */
/* Textfarbe pro Folie (aus dem Plan: hell = schwarzer Text, dunkel = weisser Text) */
main > section.description .text-schwarz h2 { color: #000; }
main > section.description .text-weiss h2 { color: #fff; }

/* Text unten (Handy), damit er unter dem Gegenstand im Video steht */
@media (orientation: portrait) {
  main > section.description .text-unten h2 { margin-top: 0 !important; top: 82lvh; transform: translateY(-100%) !important; }
}

/* Erste Folie der Geschichte: Foto über die ganze Seite (Handy und Computer), Text links darüber */
section.hero.titel.voll { justify-content: flex-start; background: #000; }
section.hero.titel.voll .titelbild img, section.hero.titel.voll .titelbild video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover !important; object-position: 45% 50%; display: block; }
section.hero.titel.voll h2 { color: #fff; font-size: clamp(26px, 3.6vw, 54px); line-height: 1.05; max-width: min(16em, 80vw); }
@media (orientation: portrait) { section.hero.titel.voll h2 { font-size: 8.2vw; } }
section.hero.titel.voll[data-ton="hell"] h2 { color: #000; }
@media (orientation: portrait) { section.hero.titel.voll { align-items: flex-start; padding-top: max(16svh, calc(env(safe-area-inset-top) + 80px)); } }   /* Handy: Text oben, das Foto bleibt frei */
section.hero.titel.voll { align-items: flex-start; padding-top: max(16svh, calc(env(safe-area-inset-top) + 80px)); }   /* Text oben, das Foto bleibt frei */
@media (orientation: landscape) {
  /* Stop-Motion am Computer: Video weiter rechts, Text bricht früher um, damit er den Gegenstand nicht überdeckt */
  main > section.description video.video-weiss { object-position: 94% 50%; }
  main > section.description:has(video.video-weiss) h2 { max-width: 74vw; box-sizing: border-box; }
}

/* ===== 30.10.: keine weisse Leiste mehr unten. Bilder und Videos gehen bis ganz unten,
   «Geschichte» und «Kaufen» stehen direkt darauf: schwarz auf hellen, weiss auf dunklen Bildern ===== */
html body nav.unten { background: transparent !important; color: #fff !important; }
html body.hell nav.unten, html body.auf-start nav.unten { color: #000 !important; }
html body.am-ende nav.unten { background: #000 !important; color: #fff !important; }   /* über dem schwarzen Footer */

/* ===== 30.10.: keine feinen dunklen Linien an Videos beim Blättern ===== */
main > section.description video { background: transparent; transform: translateZ(0); backface-visibility: hidden; }
main > section.description video.video-weiss { background: #fff; }
main > section.description:has(video) > div { background: inherit; }
/* Video und Bild ragen 2 px über den unteren Rand, damit keine Rundungs-Lücke zum nächsten Abschnitt entsteht */
/* kein Play-Knopf über dem Video (Safari/Chrome blenden ihn sonst ein, solange das Video lädt) */
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; opacity: 0; }

/* ===== 30.10.: Computer: Wort «draht» als eigene Querversion über die ganze Breite ===== */
@media (orientation: landscape) {
  main > section.description video.video-wort { object-fit: cover; object-position: 50% 60%; }
}

/* ===== 30.10. (2): sauberer Seitenaufbau, vor allem am Handy =====
   Alle Abschnitte sind genau gleich hoch (ganze Bildschirmhöhe, auch hinter den Browserleisten).
   Vorher war die erste Seite kürzer (sichtbarer Bereich) als die Bilder (ganzer Bildschirm):
   deshalb schaute beim Wischen manchmal das nächste Bild von unten herein, und die Höhen sprangen. */
html body main > section.hero, html body main > section.hero.titel, html body section.hero:not(.titel) { height: 100lvh; }
@supports not (height: 100lvh) { html body main > section.hero { height: 100vh; } }
@media (pointer: coarse) { main > section { scroll-snap-stop: always; } }   /* pro Wischen genau eine Seite */

/* Feine Linien: jedes Bild und Video ragt 2 px in den Abschnitt davor (überdeckt Rundungslücken zwischen zwei Seiten) */
main > section.description img, main > section.description video {
  top: calc(-1 * (var(--ueberstand) + 2px)) !important; height: calc(100lvh + var(--ueberstand) + 2px) !important; }
@supports not (height: 100lvh) { main > section.description img, main > section.description video { height: calc(100vh + var(--ueberstand) + 2px) !important; } }
main > section.description video.video-weiss, main > section.description:has(video.video-weiss) { background: #fff; }

/* ===== 30.10. (2): Footer weiss und länger, Leiste unten bleibt schwarz, drei Links in den Farben der Kartenhalter ===== */
html body footer.ende { background: #fff; color: #000; min-height: 80lvh; }
html body.am-ende nav.unten { background: transparent !important; color: #000 !important; }
html body footer.ende .ende-links a { text-decoration: none; }
html body footer.ende .ende-links a:nth-child(1) { color: #1f5fd6; }    /* Kontakt: Blau */
html body footer.ende .ende-links a:nth-child(2) { color: #e0102b; }    /* Instagram: Rot */
html body footer.ende .ende-links a:nth-child(3) { color: #38d95a; }    /* Impressum & AGB: Hellgrün */
html body footer.ende .ende-links a:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* ===== 30.10. (3): EIN System für alle Seiten (Startseite und Geschichte), am Handy auch unten randlos =====
   Problem (Screenshots iPhone): Safari zeigt unter der schwebenden Adressleiste noch einen Streifen.
   Dort schaute bisher das NÄCHSTE Bild herein (dunkler Strich unten).
   Lösung: Jede Seite hat oben einen Überstand (hinter der Statusleiste) UND unten einen Unterstand (hinter der Adressleiste).
   Zwischen zwei Seiten liegt eine Lücke von Überstand + Unterstand: unten füllt sie die aktuelle Seite, oben die nächste.
   Am Computer sind beide 0, dort ändert sich nichts. */
:root { --unterstand: 0px; }
@media (pointer: coarse) { :root { --ueberstand: 64px; --unterstand: 110px; } }

/* erste Seite (Startseite: 3D, Geschichte: Titelbild) reicht selbst bis in den Unterstand */
html body main > section.hero, html body main > section.hero.titel, html body section.hero:not(.titel) { height: calc(100lvh + var(--unterstand)); }
@supports not (height: 100lvh) { html body main > section.hero { height: calc(100vh + var(--unterstand)); } }
html body #xr-stage { inset: 0 0 var(--unterstand) 0 !important; }   /* 3D bleibt im sichtbaren Bereich zentriert */
section.hero.titel.voll .titelbild img, section.hero.titel.voll .titelbild video { inset: 0; height: 100%; }

/* Lücken zwischen den Seiten */
main > section.description { margin-top: calc(var(--ueberstand) + var(--unterstand)); }
main > section.hero + section.description { margin-top: var(--ueberstand); }      /* nach der ersten Seite: deren Unterstand ist schon drin */
footer.ende { margin-top: var(--unterstand) !important; }                           /* letzte Seite füllt auch ihren Unterstand */

/* Bild/Video: oben Überstand, unten Unterstand, je 2 px Überlappung gegen feine Linien */
main > section.description img, main > section.description video {
  top: calc(-1 * (var(--ueberstand) + 2px)) !important;
  height: calc(100lvh + var(--ueberstand) + var(--unterstand) + 4px) !important; }
@supports not (height: 100lvh) { main > section.description img, main > section.description video {
  height: calc(100vh + var(--ueberstand) + var(--unterstand) + 4px) !important; } }

/* lange Wörter in den Geschichtstexten am Handy sauber trennen statt abschneiden */
.geschichte-bild h2.lang, section.hero.titel h2 { -webkit-hyphens: auto; hyphens: auto; }

/* ===== 30.10. (4) ===== */
/* Videos sind Bilder, keine Player: kein Klick, darum blendet Safari auch kein Pause-/Play-Symbol mit grauem Schleier ein */
main video { pointer-events: none; -webkit-user-select: none; user-select: none; }

/* Handy: Wort «draht» als hohes Video (oben und unten weiss verlängert), füllt die Seite randlos, keine Kante mehr sichtbar */
@media (orientation: portrait) {
  main > section.description video.video-wort { object-fit: cover; object-position: 50% 100%; }   /* unten bündig: Wort immer gleich weit über der Leiste */
}

/* Footer kürzer: etwa ein Fünftel der Seite */
html body footer.ende { min-height: 22lvh; padding: 4vh 1em calc(var(--unten) + 3vh); }

/* ===== 30.10. (5): Werte aus dem Inhaltsplan (pro Seite: Texthöhe, Bildausschnitt, Zoom; getrennt für Handy und Computer) =====
   Die Seite trägt sie als Variablen: --hx/--hy (Ausschnitt 0–1), --hz (Zoom), --ht (Texthöhe in % der Bildschirmhöhe), --c… für den Computer.
   Zoom: Bild/Video wird vergrössert und auf seine ursprüngliche Fläche zugeschnitten (clip-path), damit es nicht in die Nachbarseiten ragt. */
main > section[style] { --px: var(--hx); --py: var(--hy); --pz: var(--hz); --pt: var(--ht); }
@media (orientation: landscape) { main > section[style] { --px: var(--cx); --py: var(--cy); --pz: var(--cz); --pt: var(--ct); } }
html body main > section[style] img, html body main > section[style] video {
  object-position: calc(var(--px) * 100%) calc(var(--py) * 100%) !important;
  transform: translateZ(0) scale(var(--pz)) !important;
  transform-origin: calc(var(--px) * 100%) calc(var(--py) * 100%);
  clip-path: inset(calc((var(--py) - var(--py) / var(--pz)) * 100%) calc((1 - var(--px)) * (1 - 1 / var(--pz)) * 100%)
                    calc((1 - var(--py)) * (1 - 1 / var(--pz)) * 100%) calc((var(--px) - var(--px) / var(--pz)) * 100%)); }
html body main > section.description[style] > div > h2 {
  margin-top: 0 !important; top: calc(var(--pt) * 1lvh) !important; bottom: auto !important; transform: translateY(-50%) !important; }
@supports not (height: 1lvh) { html body main > section.description[style] > div > h2 { top: calc(var(--pt) * 1vh) !important; } }
html body section.hero.titel.voll[style] { padding: 0; }
html body section.hero.titel.voll[style] > h2 { position: absolute; left: 10%; margin: 0; top: calc(var(--pt) * 1lvh); transform: translateY(-50%); }

/* ===== 31.10.: Computer (Querformat): links Text, rechts ein hochkantiges Bild.
   Gilt für alle Folien mit der Klasse .split (Startseite und Geschichte). Ausnahmen: das 3D-Modell oben und das Wort «draht» am Schluss.
   Das Bild ist rechts bündig, ganze Höhe, höchstens halb so breit wie der Bildschirm und nie breiter als 4:5 (auch auf sehr breiten Bildschirmen hochkant).
   Die linke Fläche hat die Farbe der Folie (--farbe), der Text steht darauf. ===== */
@media (orientation: landscape) {
  :root { --panel: min(50vw, 80vh); }
  html body main > section.split { background: var(--farbe, #fff) !important; }
  html body main > section.description.split > div { position: relative; height: 100%; background: var(--farbe, #fff) !important; overflow: hidden !important; }
  html body main > section.description.split > div > img,
  html body main > section.description.split > div > picture > img,
  html body main > section.description.split > div > video,
  html body main > section.description.split > div > video.video-weiss {
    position: absolute !important; top: 0 !important; bottom: auto !important; left: auto !important; right: 0 !important;
    width: var(--panel) !important; height: 100% !important; object-fit: cover !important; background: transparent !important; }
  html body main > section.description.split > div > h2 {
    position: absolute !important; left: 0 !important; right: auto !important; margin: 0 !important;
    width: calc(100vw - var(--panel)) !important; max-width: none !important; box-sizing: border-box !important;
    padding: 0 6vw 0 8vw !important; font-size: clamp(30px, 4.6vw, 80px) !important; line-height: 0.95 !important; }
  html body main > section.description.split > div > h2.lang { font-size: clamp(22px, 2.7vw, 46px) !important; line-height: 1.08 !important; }

  /* erste Folie der Geschichte: gleiches System */
  html body section.hero.titel.voll.split { background: var(--farbe, #111) !important; }
  html body section.hero.titel.voll.split .titelbild img, html body section.hero.titel.voll.split .titelbild video {
    inset: 0 0 0 auto !important; left: auto !important; right: 0 !important; width: var(--panel) !important; height: 100% !important; object-fit: cover !important; }
  html body section.hero.titel.voll.split[style] > h2 {
    left: 0 !important; width: calc(100vw - var(--panel)) !important; max-width: none !important; box-sizing: border-box;
    padding: 0 6vw 0 8vw; font-size: clamp(22px, 2.7vw, 46px) !important; line-height: 1.08; }
}

/* ===== 31.10. (2): Computer: linke Fläche immer weiss, Text darum immer schwarz. Erste Folie der Geschichte bleibt Vollbild. ===== */
@media (orientation: landscape) {
  html body main > section.split, html body main > section.description.split > div { background: #fff !important; }
  html body main > section.description.split > div > h2 { color: #000 !important; }
}

/* ===== 1.11. TEST: «Geschichte» und «Kaufen» als feine Knöpfe, weiter innen ===== */
html body nav.unten { height: auto !important; align-items: flex-end !important; top: auto !important;
  bottom: calc(22px + env(safe-area-inset-bottom)) !important;      /* nicht am Rand kleben: sonst färbt Safari seine Leiste weiss */
  padding: 0 7vw !important; box-sizing: border-box !important; }
html body nav.unten a { display: inline-block; padding: .55em 1em .5em; border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor; -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1; letter-spacing: .01em; text-decoration: none !important; transition: background-color .2s; }
html body nav.unten a:hover { background: rgba(128,128,128,.18); }
@media (orientation: landscape) {
  html body nav.unten { padding: 0 5vw !important; bottom: calc(28px + env(safe-area-inset-bottom)) !important; }
  html body nav.unten a { font-size: 16px; }
}

/* Geschichte: «Zurück» mit feinem Pfeil statt «Geschichte» */
html body nav.unten a.zurueck { display: inline-flex; align-items: center; gap: .5em; }
html body nav.unten a.zurueck .pfeil { width: 1.05em; height: .7em; flex: none; }

/* ===== 4.11.: Startseite beginnt mit dem Karten-Video statt dem 3D-Modell ===== */
html body main > section.description:first-child { margin-top: var(--ueberstand); }   /* Handy: oben Platz für das Bild unter der Statusleiste, wie bei den anderen Folien */
/* Handy: «CHF 2 & Scheine» bleibt auf einer Zeile (darf bis an den rechten Rand) */
@media (orientation: portrait) { html body main > section.description > div > h2.eng { padding-right: 0 !important; white-space: nowrap; } }

html body section.hero.titel.voll.weiss { background: #fff; }   /* Geschichte: erste Seite nur Text auf Weiss */

/* Titel: keine automatische Silbentrennung mehr, der Text nutzt am Handy die ganze Breite (10 % Rand links und rechts) */
html body .geschichte-bild h2.lang, html body section.hero.titel h2 { -webkit-hyphens: manual !important; hyphens: manual !important; overflow-wrap: normal; }
@media (orientation: portrait) {
  html body main > section.description > div.geschichte-bild > h2.lang { max-width: none !important; width: 100% !important; box-sizing: border-box !important; padding-right: 10vw !important; }
  html body section.hero.titel.voll[style] > h2 { max-width: 80vw !important; width: 80vw; }
}

/* Geschichte: erste Seite in leichtem Grau */
html body section.hero.titel.voll.grau { background: #f0f1f3; }
/* Unterschiedliche Texte für Handy (hoch) und Computer (quer) */
@media (orientation: portrait) { .nur-computer { display: none; } }
@media (orientation: landscape) { .nur-handy { display: none; } }

/* ===== 5.11.: Fussbereich: Kontakt, Instagram, Impressum als gleiche feine Knöpfe wie «Geschichte» und «Kaufen», nebeneinander (bricht um, wenn es eng wird) ===== */
html body footer.ende .ende-links { flex-direction: row !important; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px !important; font-size: 15px !important; }
html body footer.ende .ende-links a, html body footer.ende .ende-links a:nth-child(n) {
  display: inline-block; padding: .55em 1em .5em; border: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px currentColor;
  color: #000 !important; font-size: 15px; line-height: 1; letter-spacing: .01em; text-decoration: none !important; white-space: nowrap;
  -webkit-font-smoothing: antialiased; transition: background-color .2s; }
html body footer.ende .ende-links a:hover { background: rgba(128,128,128,.18); text-decoration: none !important; }
@media (orientation: landscape) { html body footer.ende .ende-links a, html body footer.ende .ende-links a:nth-child(n) { font-size: 16px; } }
@media (orientation: portrait) { html body footer.ende { padding-bottom: calc(var(--unten) + 3vh + 18px) !important; } }   /* Handy: etwas Luft zu «Geschichte» und «Kaufen» */

/* ===== 5.11. (2): Computer: Kontakt, Instagram, Impressum enden beim Hinunterscrollen genau auf der Höhe von «Geschichte» und «Kaufen».
   Alle fünf Knöpfe stehen dann in einer Reihe, mit gleichen Abständen. Die Breiten von «Geschichte»/«Kaufen» setzt seite.js (--k-links/--k-rechts). ===== */
@media (orientation: landscape) {
  html body footer.ende { display: flex !important; flex-direction: column !important; justify-content: flex-end !important; align-items: stretch !important;
    padding: 0 5vw calc(28px + env(safe-area-inset-bottom)) !important; }
  html body footer.ende .ende-links { width: 100%; flex-wrap: nowrap !important; justify-content: space-between !important; gap: 0 !important; }
  html body footer.ende .ende-links::before { content: ''; flex: none; width: var(--k-links, 130px); }
  html body footer.ende .ende-links::after  { content: ''; flex: none; width: var(--k-rechts, 90px); }
}

/* ===== 5.11. (3): Schrift «Favorit Bold» als woff2 und mit font-display: swap (vorher nur .woff ohne swap: Titel erschienen am Handy erst nach Sekunden) ===== */
@font-face { font-family: 'Favorit Bold'; src: url(../assets/fonts/ABCFavoritEdu-Bold.woff2) format('woff2'), url(../assets/fonts/ABCFavoritEdu-Bold.woff) format('woff'); font-display: swap; }

/* ===== 5.11. (4): Erste Folie der Geschichte genau bildschirmhoch (vorher + 110 px Unterstand).
   War sie höher als der Bildschirm, konnte die Seite beim Einrasten darin stehen bleiben (Geschichte startete nicht ganz oben).
   Die Lücke zur nächsten Folie ist jetzt ein Abstand wie zwischen allen anderen Folien; das Bild sieht gleich aus. ===== */
html body main > section.hero, html body main > section.hero.titel, html body section.hero:not(.titel) { height: 100lvh; }
@supports not (height: 100lvh) { html body main > section.hero { height: 100vh; } }
main > section.hero + section.description { margin-top: calc(var(--ueberstand) + var(--unterstand)); }

/* ===== 5.11. (5): Geschichte, erste Folie: technische Zeichnung des draht (grüne Linien).
   Handy/Hochformat: gross und blass hinter dem Text (Jonatans Wahl, Variante B). Computer/Querformat: rechts neben dem Text. ===== */
section.hero.titel .titelzeichnung { position: absolute; z-index: 0; pointer-events: none; user-select: none; -webkit-user-select: none; max-width: none; width: auto; }
section.hero.titel h2 { z-index: 1; }
/* die Ausschnitt-/Zoom-Regel aus dem Inhaltsplan gilt nicht für die Zeichnung */
html body main > section[style] img.titelzeichnung { transform: none !important; clip-path: none !important; -webkit-clip-path: none !important; object-position: center !important; }
@media (orientation: portrait) {
  section.hero.titel .titelzeichnung { left: 0; right: 0; margin: 0 auto; top: 17%; height: 66%; opacity: .28; }   /* Variante B: gross und blass hinter dem Text */
}
@media (orientation: landscape) {
  section.hero.titel .titelzeichnung { height: min(66vh, 34vw); right: 6vw; top: calc(50% - min(33vh, 17vw)); opacity: .8; }
}

/* ===== 5.11. (6): Geschichte-Texte im Hochformat immer gleich gross wie am Handy (8,2 % der Breite).
   Vorher galt das nur bis 640 px Breite; das iPad im Hochformat bekam die Computer-Regel und damit nur 26 px. ===== */
@media (orientation: portrait) { html body .geschichte-bild h2.lang { font-size: 8.2vw; } }

/* ===== 5.11. (7): Computer/Querformat: alle Texte der Geschichte gleich gross, 4 % der Breite (vorher Titelfolie 3,6 %, die anderen 2,7 %) ===== */
@media (orientation: landscape) {
  html body section.hero.titel.voll[style] > h2,
  html body section.hero.titel.voll.split[style] > h2,
  html body main > section.description.split > div > h2.lang { font-size: clamp(28px, 4vw, 66px) !important; line-height: 1.06 !important; }
  html body section.hero.titel.voll[style] > h2 { max-width: 54vw !important; }   /* Titelfolie: Platz für die Zeichnung rechts */
}
