/* PDD – Zuhause über den Wolken: Startseite als Scroll-Reise. Baut auf pdd-system.css (Wolken-Designsystem) auf. */
.startseite .pds-header { background: rgba(255, 253, 249, .72) !important; }

.reise { position: relative; }
.reise__buehne { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, var(--pds-sky) 0%, var(--pds-ivory) 100%); }
.reise__buehne canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; }
.reise-aktiv .reise__buehne canvas { opacity: 1; }
/* sanfter Nebel am Rand: Textkarten bleiben lesbar, Produktmitte bleibt frei */
.reise__buehne::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(251,249,245,.35) 0%, rgba(251,249,245,0) 18%, rgba(251,249,245,0) 82%, rgba(251,249,245,.4) 100%); }

/* Abschnitte: jede Szene bekommt Scrollweg; die Karte bleibt beim Lesen stehen */
.reise__szene { position: relative; z-index: 1; min-height: 175vh; padding: 0 var(--pds-gutter); }
.reise__szene:first-of-type { min-height: 150vh; }
.reise__szene--abschluss { min-height: auto; padding-bottom: 12vh; }
.reise__innen { max-width: calc(var(--pds-max) + 0px); margin: 0 auto; height: 100%; display: flex; }
.reise__szene--rechts .reise__innen { justify-content: flex-end; }
.reise__szene--mitte .reise__innen { justify-content: center; }
.reise__karte { position: sticky; top: calc(50vh - 150px); align-self: flex-start; margin-top: 32vh; width: min(440px, 100%);
  background: var(--pds-glass); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 0; border-radius: var(--pds-radius); box-shadow: 0 18px 44px -22px rgba(31,42,51,.3);
  padding: clamp(24px, 2.6vw, 36px); color: var(--pds-ink); }
.reise__szene:first-of-type .reise__karte { margin-top: 22vh; width: min(560px, 100%); }
.reise__ort { display: flex; gap: 10px; align-items: center; font: 500 13px var(--pds-font); color: var(--pds-sky-ink); margin: 0 0 14px; }
.reise__ort::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.reise__karte h1 { font: 600 clamp(38px, 5vw, 64px)/1.02 var(--pds-font) !important; letter-spacing: -0.035em !important; color: var(--pds-ink) !important; margin: 0 0 18px !important; }
.reise__karte h2 { font: 600 clamp(26px, 2.6vw, 36px)/1.08 var(--pds-font) !important; letter-spacing: -0.025em !important; color: var(--pds-ink) !important; margin: 0 0 12px !important; }
.reise__karte h1 .reise__unterzeile { display: block; margin-top: 10px; font: 500 clamp(17px, 1.6vw, 21px)/1.3 var(--pds-font); letter-spacing: 0; color: var(--pds-ink-2); }
.reise__karte p { font-size: 17px; line-height: 1.6; color: var(--pds-ink-2); margin: 0 0 22px; }
.reise__links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.reise__links a { font: 600 15px var(--pds-font); text-decoration: none !important; }
.reise__links .pp-btn { min-height: 48px; padding: 0 22px; border-radius: var(--pds-radius); }
.reise__mehr { color: var(--pds-ink) !important; border-bottom: 1.5px solid var(--pds-wood); padding-bottom: 2px; }
.reise__mehr:hover { color: var(--pds-wood) !important; }
.reise__offerte { color: var(--pds-blue) !important; }
.reise__offerte:hover { text-decoration: underline !important; }
.reise__fakten { list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(31,42,51,.12); display: grid; grid-template-columns: repeat(3, auto); gap: 4px 24px; font-size: 14px; color: var(--pds-ink-2); }
.reise__fakten strong { display: block; color: var(--pds-ink); font-weight: 600; }
.reise__fakten a { color: var(--pds-ink) !important; font-weight: 600; text-decoration: none !important; }

/* Standbilder: statische Darstellung (reduzierte Bewegung, ohne JS) und schnelles erstes Bild */
.reise__still { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.reise__still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reise-aktiv .reise__still { display: none; }
.reise__szene:first-of-type .reise__still { position: fixed; z-index: 0; }

/* Kapitelnavigation (Desktop) und Fortschritt (mobil) */
.reise__kapitel { position: fixed; z-index: 5; right: 18px; top: 50%; transform: translateY(-50%); }
.reise__kapitel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.reise__kapitel a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 4px 0; text-decoration: none !important; color: var(--pds-ink) !important; }
.reise__kapitel a span { font: 500 12px var(--pds-font); opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; background: var(--pds-glass); padding: 3px 8px; border-radius: 3px; white-space: nowrap; }
.reise__kapitel a::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(31,42,51,.28); transition: transform .2s, background-color .2s; }
.reise__kapitel a:hover span, .reise__kapitel a:focus-visible span, .reise__kapitel a[aria-current] span { opacity: 1; transform: none; }
.reise__kapitel a[aria-current]::after { background: var(--pds-ink); transform: scale(1.5); }
.reise__fortschritt { display: none; }

/* Abschluss: Wege, Ablauf, Auftraggeber – auf ruhiger Wolkenfläche */
.reise__abschluss { position: relative; z-index: 1; display: grid; gap: 20px; max-width: var(--pds-max); margin: 0 auto; }
.reise__tafel { background: var(--pds-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 0; border-radius: var(--pds-radius); box-shadow: 0 18px 44px -22px rgba(31,42,51,.3); padding: clamp(24px, 3vw, 44px); color: var(--pds-ink); }
.reise__tafel h2, .reise__tafel h3 { color: var(--pds-ink) !important; }
.reise__tafel h2 { font: 600 clamp(26px, 2.8vw, 38px)/1.1 var(--pds-font) !important; letter-spacing: -0.025em !important; margin: 0 0 14px !important; }
.reise__tafel p { color: var(--pds-ink-2); font-size: 16px; line-height: 1.6; }
.reise__wege { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.reise__wege ul, .reise__aktuell ul { list-style: none; margin: 18px 0 22px; padding: 0; border-top: 1px solid rgba(31,42,51,.12); }
.reise__wege li, .reise__aktuell li { border-bottom: 1px solid rgba(31,42,51,.1); }
.reise__wege li a, .reise__aktuell li a { display: block; padding: 12px 0; font: 500 15px var(--pds-font); color: var(--pds-ink) !important; text-decoration: none !important; }
.reise__wege li a:hover, .reise__aktuell li a:hover { color: var(--pds-blue) !important; }
.reise__schritte { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; border-top: 1px solid var(--pds-stone); }
.reise__schritte li { counter-increment: s; padding-top: 18px; }
.reise__schritte li::before { content: counter(s); display: block; font: 600 14px var(--pds-font); color: var(--pds-wood); margin-bottom: 14px; }
.reise__schritte h3 { font: 600 17px var(--pds-font) !important; margin: 0 0 6px !important; }
.reise__schritte p { font-size: 14px !important; margin: 0; }
.reise__kunden { display: flex; gap: 8px 32px; flex-wrap: wrap; list-style: none; margin: 14px 0 8px; padding: 0; }
.reise__kunden li { font: 600 22px var(--pds-font); color: var(--pds-ink); }
.reise__hinweis { font-size: 13px !important; color: var(--pds-ink-3) !important; }

/* Startseite: Footer leicht transparent, damit das Schlussbild (Villa über den Wolken) sichtbar bleibt */
.startseite .pds-footer { background: linear-gradient(180deg, rgba(223,232,241,.55) 0%, rgba(251,249,245,.9) 22%, rgba(243,240,234,.97) 100%) !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 1; }

@media (max-width: 900px) {
  .reise__kapitel { display: none; }
  .reise__fortschritt { display: block; position: fixed; z-index: 1998; left: 0; right: 0; top: 64px; height: 2px; background: rgba(31,42,51,.08); }
  .reise__fortschritt span { display: block; height: 100%; background: var(--pds-ink); transform-origin: left; transform: scaleX(0); }
  .reise__szene { min-height: 160vh; padding: 0 16px; }
  .reise__innen, .reise__szene--rechts .reise__innen { justify-content: center; }
  /* Karte unten im Bild: Produkt bleibt im oberen Bildbereich sichtbar */
  .reise__karte { top: auto; bottom: 16px; margin-top: 70vh; width: 100%; padding: 22px; }
  .reise__szene:first-of-type .reise__karte { margin-top: 42vh; }
  .reise__karte h2 { font-size: 24px !important; }
  .reise__karte p { font-size: 15px; margin-bottom: 16px; }
  .reise__fakten { grid-template-columns: 1fr; }
  .reise__wege, .reise__schritte { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .reise__karte { position: sticky; } }
@media (prefers-reduced-motion: reduce) {
  .reise__still { display: block !important; }
  .reise__szene:first-of-type .reise__still { position: absolute; }
  .reise__buehne canvas { display: none; }
}

/* Korrektur aus der Sichtprüfung: Karte braucht die volle Abschnittshöhe, um beim Lesen stehen zu bleiben */
.reise__szene { display: flex; }
.reise__innen { flex: 1; width: 100%; height: auto; }
@media (max-width: 900px) {
  .reise__innen { align-items: flex-end; }
  .reise__karte { align-self: flex-end; margin-top: 0; margin-bottom: 0; position: sticky; bottom: max(14px, env(safe-area-inset-bottom)); top: auto; }
  .reise__szene { padding-bottom: 14px; }
  .reise__szene:first-of-type .reise__karte { margin-top: 0; }
  .reise__szene:first-of-type .reise__karte h1 { font-size: 34px !important; margin-bottom: 10px !important; }
  .reise__szene:first-of-type .reise__karte > p { font-size: 15px; }
  .reise__fakten { margin-top: 16px; padding-top: 12px; font-size: 13px; }
  .reise__fakten li:nth-child(2) { display: none; }
}
/* Desktop: Produktkarten schmal am unteren Bildrand – die Produkte (Bildmitte/oben) bleiben frei */
@media (min-width: 901px) {
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__innen { align-items: flex-end; }
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte { width: min(380px, 100%); margin-top: 0; top: auto; bottom: 40px; align-self: flex-end; padding: 26px 28px; }
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) { padding-bottom: 40px; }
}

/* Stand 16.11.2026 (Rolle C): Bühne in voller Höhe des grossen Viewports – die ein-/ausfahrende Adressleiste auf Smartphones
   ändert die Canvas-Grösse nicht (kein Neuzeichnen, kein Ausschnittsprung). */
@supports (height: 100lvh) { .reise__buehne { bottom: auto; height: 100lvh; } }
/* Standbilder: Ausschnitt folgt dem Produkt (fokusX aus film.json, inline gesetzt) */
.reise__still img { object-position: var(--fokus, 50%) 50%; }
/* Smartphone/Tablet mit laufender Bildfolge: Szenenkarte fest am unteren Rand (oder oben, wo das Produkt unten liegt –
   film.json «mobil»), damit sie während ihrer kurzen Einblendung nicht über das Produkt wandert. */
@media (max-width: 900px) {
  .reise-aktiv .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte {
    position: fixed; left: 16px; right: 16px; width: auto; top: auto; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 2; margin: 0; }
  .reise-aktiv .reise__szene--oben .reise__karte { top: 80px !important; bottom: auto !important; }
}
/* Smartphone: kompakte Szenenkarte (≤ ca. 30 % der Höhe) – «Offerte anfragen» steht immer im Header, Nebenlinks auf der Produktseite */
@media (max-width: 900px) {
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte { padding: 16px 18px; }
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte h2 { font-size: 21px !important; margin-bottom: 6px !important; }
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte p { font-size: 14px; line-height: 1.45; margin-bottom: 10px; }
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__offerte,
  .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__mehr + .reise__mehr { display: none; }
}

/* Abstand zum Datenschutzhinweis (--pds-hinweis-h aus pdd-system.js): Szenenkarten bleiben über dem Hinweis */
@media (min-width: 901px) { .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte { bottom: calc(40px + var(--pds-hinweis-h, 0px)); } }
@media (max-width: 900px) { .reise-aktiv .reise__szene:not(:first-of-type):not(.reise__szene--abschluss) .reise__karte { bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--pds-hinweis-h, 0px)); } }

/* 20.11.2026 – Restbefund G1 / Einstieg iPhone: Die Einstiegskarte beginnt unterhalb der Villa und läuft beim Scrollen mit
   (nicht mehr festgeheftet). Erstes Bild: Villa frei, Titel und Einleitung sichtbar, alles Weitere folgt beim Scrollen;
   «Offerte anfragen» steht immer in der Kopfzeile. Unterkante der Villa im Filmbild bei 68 % der Bildhöhe → im Fenster
   (object-fit: cover, 16:9) max(68lvh, 50lvh + 10.125vw); dazu 16 px Luft, abzüglich Kopfzeile (der Abschnitt beginnt darunter). Bühne bleibt vollflächig, Inhalte unverändert. */
.reise__szene:first-of-type .reise__innen { align-items: flex-start; }
.reise__szene:first-of-type .reise__karte,
.reise-aktiv .reise__szene:first-of-type .reise__karte {
  position: relative; top: auto; bottom: auto; align-self: flex-start; margin-bottom: 0;
  margin-top: calc(max(68vh, 50vh + 10.125vw) + 16px - var(--pds-header-h, 72px));    /* Abschnitt beginnt unter der Kopfzeile, Bühne bei 0 */
  margin-top: calc(max(68lvh, 50lvh + 10.125vw) + 16px - var(--pds-header-h, 72px));
}
/* Schiebetor: das Tor füllt die untere Bildhälfte – Karte auf grossen Bildschirmen oben links (Fassade) statt unten rechts;
   oben rechts läge sie unter der Kapitelbeschriftung. */
@media (min-width: 901px) {
  .reise-aktiv .reise__szene.reise__szene--oben-desktop:not(:first-of-type) .reise__karte {
    position: fixed; z-index: 2; top: calc(var(--pds-header-h, 72px) + 28px); bottom: auto; margin: 0;
    left: calc(var(--pds-gutter) + max(0px, (100vw - 2 * var(--pds-gutter) - var(--pds-max)) / 2)); right: auto; }
}

/* 20.11.2026 – Leistung: Mit JavaScript zeichnet die Bildfolge alle Szenen; die Standbilder der Folgeszenen (loading=lazy) werden
   nur ohne JS oder bei reduzierter Bewegung gebraucht (dort gilt oben display:block !important) → nicht vorab laden. */
.reise-js .reise__szene:not(:first-of-type) .reise__still { display: none; }

/* 24.11.2026 – Smartphone hochkant: sauberes Vollbild (Ausschnitt folgt dem Produkt, film.json fokusX); mehr Scrollweg je Szene
   → ruhigeres Tempo beim Wischen (vorher 160vh). Stufe: reise.js wählt hochkant höchstens «desktop» (1920 px). */
@media (max-width: 900px) and (orientation: portrait) {
  .reise__szene { min-height: 230vh; }
  .reise__szene:first-of-type { min-height: 170vh; }
  /* reise.js bettet hochkant das ganze Bild ein (Band in voller Breite bei 42 % der freien Höhe, Rest weich aus demselben Bild):
     alle Karten unten in der weichen Fläche – nie über dem Bild */
  .reise-aktiv .reise__szene--oben .reise__karte { top: auto !important; bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--pds-hinweis-h, 0px)) !important; }
  /* Einstiegskarte beginnt unter der Villa: Unterkante Villa = 42 % der freien Höhe + 68 % der Bildhöhe (56,25vw) */
  .reise__szene:first-of-type .reise__karte,
  .reise-aktiv .reise__szene:first-of-type .reise__karte {
    margin-top: calc((100vh - 56.25vw) * .42 + 56.25vw * .68 + 16px - var(--pds-header-h, 60px));
    margin-top: calc((100lvh - 56.25vw) * .42 + 56.25vw * .68 + 16px - var(--pds-header-h, 60px)); }
  /* Standbild vor dem ersten Canvas-Bild: ebenfalls ganzes Bild auf derselben Höhe (kein Sprung beim Umschalten) */
  .reise__szene:first-of-type .reise__still { background: linear-gradient(180deg, var(--pds-sky) 0%, var(--pds-ivory) 100%); }
  .reise__szene:first-of-type .reise__still img { object-fit: contain; object-position: 50% 42%; }
}
