/* Emivita – Scroll-Startseite, Teil „Die App“ mit dem Telefon in 3D (templates/startseite_3d.html, Abschnitt .s3-app).
   Zweig startseite-app3d, 31.10.2026. Gehört zu app3d.js; lädt nach start3d.css und überschreibt dort nur den App-Teil
   und die Hintergründe der Abschnitte darunter.
   Aufbau: 1. Ohne Bewegung (Standard)  2. Bühne und Raum  3. Abschied von der Fahrt  4. Telefon  5. Berichtsblatt
   6. Texte neben dem Telefon  7. Abschnitte darunter: weicher Übergang, Tiefe, Parallaxe
   Alles hinter der Klasse a3-an (setzt app3d.js, nur wenn kopf.js s3-bewegt gesetzt hat, also nicht bei „Bewegung
   reduzieren“, nicht im Datensparmodus und nicht ohne JavaScript). Bewegt wird nur mit transform und opacity, kein
   animierter Filter; Schatten sind feste Verläufe. Keine Versalien (Regel 9). */

/* ── 1. Ohne Bewegung: die Module wie bisher, die Bühne ist aus ──────────── */
.a3-buehne { display: none; }

/* ── 2. Bühne und Raum ─────────────────────────────────────────────────── */
/* Der App-Teil schiebt sich eine Fensterhöhe unter das Ende der Fahrt: Seine Bühne klebt genau in dem Moment oben fest,
   in dem die Bühne der Fahrt sich löst. Bis dahin ist sie unsichtbar (a3-sichtbar setzt app3d.js). */
.a3-an .s3-app { margin-top: -100vh; margin-top: -100svh; padding: 0; background: none; border-radius: 0; z-index: auto; }
.a3-an .a3-buehne {
  display: block; position: sticky; top: 0; z-index: 0; height: 100vh; height: 100svh; overflow: hidden;
  visibility: hidden; pointer-events: none;
}
.a3-an .a3-buehne.a3-sichtbar { visibility: visible; }
/* Ruhiger, neutraler Raum: heller Creme-Ton, zur Mitte etwas heller, am Rand genau der Grund der Seite (#f6efe5),
   damit die Bühne am Ende ohne Kante in die Abschnitte darunter übergeht. */
.a3-raum {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 62% at 62% 52%, #fffaf2 0%, #fbf5ec 38%, #f6efe5 78%);
}
@media (max-aspect-ratio: 1/1), (max-width: 699px) {
  .a3-raum { background: radial-gradient(ellipse 90% 55% at 50% 38%, #fffaf2 0%, #fbf5ec 40%, #f6efe5 80%); }
}

/* ── 3. Abschied von der Fahrt ─────────────────────────────────────────── */
/* Erst eine scharfe Kopie des Bildes, das die Fahrt beim Festkleben zeigt (deckt sich mit dem Canvas), die kleiner wird und vergeht, darüber
   eine vorab weichgezeichnete, an den Rändern ausgeblendete Fassung: so wirkt es, als zöge die Kamera zurück und
   verlöre die Schärfe. Danach ist nur noch der Raum da. */
.a3-abschied { position: absolute; inset: 0; will-change: transform; transform-origin: 50% 50%; }
.a3-abschied img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }
/* Die scharfe Kopie ist nur in den äußersten Ecken weich ausgeblendet: Beim Festkleben liegt darunter noch dasselbe
   Bild der Fahrt (kein sichtbarer Unterschied), beim Kleinerwerden zeigt sie keine harte Bildkante. */
.a3-abschied-scharf {
  will-change: opacity;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 70%, transparent 100%);
}
.a3-abschied-weich {
  opacity: 0; will-change: opacity;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 45%, transparent 100%);
}

/* ── 4. Telefon ────────────────────────────────────────────────────────── */
/* Gebaut wie das Telefon der 3D-Videos (sport-modus/werkzeug/komp): Maße in festen Pixeln (414 × 868, Bildschirm
   390 × 844), Größe und Lage per transform aus app3d.js. Die Seitenkante sind zwölf hintereinander liegende Ringe
   (nur Rand, innen durchsichtig, daher kaum Grafikspeicher), Farbe wie Titan natur. */
.a3-welt { position: absolute; left: 0; top: 0; width: 0; height: 0; perspective: 1700px; }
.a3-tel {
  position: absolute; width: 414px; height: 868px; left: -207px; top: -434px;
  transform-style: preserve-3d; will-change: transform; opacity: 0;
}
.a3-tel > div, .a3-tel > i { position: absolute; }
.a3-schatten {
  inset: 40px 30px; border-radius: 80px; background: rgba(74, 54, 30, .20);
  box-shadow: 0 0 70px 34px rgba(74, 54, 30, .20); transform: translate3d(34px, 56px, -110px);
}
.a3-kanten, .a3-kanten i { position: absolute; inset: 0; border-radius: 68px; }
.a3-kanten { transform-style: preserve-3d; }
.a3-kanten i { border: 6px solid #a39d92; }
.a3-kanten i:nth-child(1) { transform: translateZ(-2.4px); border-color: #b9b3a8; }
.a3-kanten i:nth-child(2) { transform: translateZ(-4.8px); border-color: #aca69b; }
.a3-kanten i:nth-child(3) { transform: translateZ(-7.2px); }
.a3-kanten i:nth-child(4) { transform: translateZ(-9.6px); border-color: #9a948a; }
.a3-kanten i:nth-child(5) { transform: translateZ(-12px); border-color: #959086; }
.a3-kanten i:nth-child(6) { transform: translateZ(-14.4px); border-color: #959086; }
.a3-kanten i:nth-child(7) { transform: translateZ(-16.8px); border-color: #9a948a; }
.a3-kanten i:nth-child(8) { transform: translateZ(-19.2px); border-color: #8e897f; }
.a3-rahmen {
  inset: 0; border-radius: 68px;
  background: linear-gradient(135deg, #e6e1d8 0%, #b3ada2 12%, #8d877d 34%, #7b766d 58%, #a49e93 84%, #d9d4ca 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55), inset 0 0 0 4px #4a4640, inset 0 0 10px rgba(255, 255, 255, .25);
}
.a3-blende { inset: 5px; border-radius: 63px; background: #040505; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.a3-taste { width: 5px; border-radius: 3px; background: linear-gradient(90deg, #c9c3b8, #8a857c); transform: translateZ(-9px); }
.a3-t1 { left: -4px; top: 140px; height: 34px; }
.a3-t2 { left: -4px; top: 205px; height: 62px; }
.a3-t3 { left: -4px; top: 285px; height: 62px; }
.a3-t4 { right: -4px; top: 230px; height: 98px; }
.a3-schirm {
  left: 12px; top: 12px; width: 390px; height: 844px; border-radius: 56px; overflow: hidden;
  background: linear-gradient(90deg, #f3eee5, #f2e9d8 50%, #efe1c6); transform: translateZ(.6px);
}
.a3-ansicht { position: absolute; inset: 0; background: linear-gradient(90deg, #f3eee5, #f2e9d8 50%, #efe1c6); will-change: opacity, transform; }
.a3-ansicht img { position: absolute; left: 0; top: 47px; width: 390px; height: 797px; max-width: none; }
.a3-v2 { opacity: 0; }
/* Bericht: die erste Seite des PDFs, wie in der Vorschau des iPhones auf grauem Grund */
.a3-v3 { background: #e9e5dc; transform: translateX(100%); box-shadow: -14px 0 34px rgba(20, 30, 40, .16); }
.a3-v3 img { left: 14px; top: 70px; width: 362px; height: 512px; border-radius: 3px; box-shadow: 0 1px 3px rgba(21, 32, 28, .12), 0 8px 22px rgba(21, 32, 28, .10); }
.a3-statuszeile { position: absolute; left: 0; right: 0; top: 0; height: 47px; z-index: 3; font: 600 16px/1 "Inter", -apple-system, sans-serif; color: #14241e; letter-spacing: -.01em; }
.a3-uhr { position: absolute; left: 44px; top: 18px; }
.a3-symbole { position: absolute; right: 30px; top: 18px; }
.a3-insel { position: absolute; left: 50%; top: 11px; width: 116px; height: 34px; margin-left: -58px; border-radius: 17px; background: #010202; z-index: 4; }
.a3-leiste { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: rgba(20, 36, 30, .78); z-index: 4; }
/* Tipp-Kreis wie bei iOS „Berührungen anzeigen“: zeigt, wohin getippt wird, bevor der Bildschirm wechselt */
.a3-tipp {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; z-index: 5;
  background: rgba(36, 36, 36, .26); border: 2px solid rgba(255, 255, 255, .9); opacity: 0; will-change: transform, opacity;
}
.a3-glanz {
  position: absolute; left: -90px; right: -90px; top: 0; bottom: 0; z-index: 6; will-change: transform;
  background: linear-gradient(112deg, rgba(255, 255, 255, .20) 0%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, .08) 100%);
}
.a3-etikett {
  position: absolute; z-index: 7; top: 60px; right: 22px; font: 600 15px/1.3 "Inter", -apple-system, sans-serif; color: var(--tinte);
  background: rgba(252, 248, 241, .95); border: 1px solid var(--linie); border-radius: 999px; padding: 3px 12px;
}

/* ── 5. Berichtsblatt ──────────────────────────────────────────────────── */
/* Liegt zuerst deckungsgleich auf der Seite im Bildschirm und löst sich dann nach vorn zur Seite. */
.a3-blatt {
  left: 26px; top: 82px; width: 362px; height: 512px; border-radius: 4px; background: #fff; opacity: 0;
  box-shadow: 0 2px 6px rgba(21, 32, 28, .08), 0 34px 70px rgba(60, 44, 26, .20); will-change: transform, opacity;
}
.a3-blatt img { width: 100%; height: 100%; border-radius: 4px; max-width: none; }
.a3-blatt .a3-etikett { top: auto; bottom: 14px; right: 14px; font-size: 14px; }
.a3-boden {
  position: absolute; left: -200px; top: -30px; width: 400px; height: 60px; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(74, 54, 30, .26) 0%, rgba(74, 54, 30, .10) 45%, rgba(74, 54, 30, 0) 72%);
}

/* ── 6. Texte neben dem Telefon ────────────────────────────────────────── */
/* Die Texte bleiben echte Abschnitte im HTML. Jeder Schritt ist eine Fensterhöhe hoch; app3d.js blendet den Text des
   aktiven Schritts ein. Die Bilder der Module bleiben für Screenreader im Dokument, sind aber unsichtbar (die Bühne
   zeigt dieselben Bilder). */
.a3-an .a3-schritte { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; max-width: none; padding: 0; pointer-events: none; }
.a3-an .a3-text { pointer-events: auto; }
.a3-an .a3-anfang { height: 125vh; height: 125svh; }
.a3-an .a3-slot:not(.a3-anfang) { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 0 16px 24px; margin: 0; max-width: none; }
.a3-an .s3-module { display: block; }
.a3-an .s3-modul { background: none; border-radius: 0; gap: 0; }
.a3-an .s3-modul-bild { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.a3-an .a3-text {
  width: 100%; max-width: 560px; margin: 0 auto; background: rgba(252, 248, 241, .95); border-radius: 22px; padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(21, 32, 28, .04), 0 14px 40px rgba(60, 44, 26, .12);
  opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1);
}
.a3-an .a3-da > .a3-text { opacity: 1; transform: none; }
/* Hochformat: Die Karte bleibt am unteren Rand stehen, solange ihr Schritt läuft, und blendet aus, bevor sie über das
   Telefon wandern würde (app3d.js). */
@media (max-aspect-ratio: 1/1), (max-width: 699px) {
  .a3-an .a3-slot:not(.a3-anfang):not(.a3-kopf) > .a3-text { position: sticky; bottom: 24px; }
}
.a3-an .a3-text h3 { font-size: 22px; margin-bottom: 8px; }
.a3-an .a3-text p { font-size: 16px; line-height: 1.55; }
.a3-an .a3-text .s3-grenze { font-size: 14.5px; }
.a3-an .a3-ende .s3-hinweis { margin-top: 0; }
.a3-an .a3-ende .s3-cta { margin-top: 16px; }
/* Überschrift des App-Teils: allein und mittig im Raum, erst nach dem Abschied von der Fahrt (app3d.js) */
.a3-an .a3-slot.a3-kopf { align-items: center; justify-content: center; padding: 0 16px; }
.a3-an .a3-kopf .a3-text { max-width: 760px; text-align: center; background: none; box-shadow: none; padding: 0 8px; }
.a3-an .a3-kopf h2 { font-size: clamp(30px, 6.4vw, 54px); }
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
  .a3-an .a3-slot:not(.a3-anfang):not(.a3-kopf) { align-items: center; padding: 0 0 0 max(32px, 6vw); }
  .a3-an .a3-slot:not(.a3-kopf) .a3-text { max-width: 440px; margin: 0; background: none; box-shadow: none; padding: 0; }
  .a3-an .a3-text h3 { font-size: 30px; margin-bottom: 12px; }
  .a3-an .a3-text p { font-size: 18px; }
  .a3-an .a3-text .s3-grenze { font-size: 15.5px; }
}

/* ── 7. Abschnitte darunter: weicher Übergang, Tiefe, Parallaxe ────────── */
/* Keine harten Farbkanten mehr: Olli, Datenschutz, Ratgeber und Schluss liegen auf dem durchgehenden Creme-Grund der
   Seite, die Flächen (Tafeln, Ratgeber-Zeilen) tragen das Weiß. Beim Hereinscrollen kommen die Blöcke aus leichter
   Tiefe (a3-auf → a3-zeigen, app3d.js), die Überschriften laufen mit leichter Parallaxe (CSS-Eigenschaft translate). */
.a3-an .s3-olli, .a3-an .s3-ds, .a3-an .s3-ratgeber, .a3-an .s3-schluss { background: transparent; }
.a3-an .s3-olli { padding-top: 40px; }
.a3-an .s3-olli-innen { background: rgba(255, 255, 255, .72); border-radius: 28px; padding: 28px; box-shadow: 0 1px 2px rgba(21, 32, 28, .04), 0 18px 50px rgba(60, 44, 26, .08); }
.a3-an .s3-ds { background: linear-gradient(to bottom, rgba(250, 248, 243, 0), #faf8f3 180px, #faf8f3 calc(100% - 180px), rgba(250, 248, 243, 0)); }
.a3-an .s3-rg-liste a { background: #fff; box-shadow: 0 1px 2px rgba(21, 32, 28, .04), 0 8px 24px rgba(60, 44, 26, .06); }
.a3-an .s3-fuss-hinweis { background: transparent; }
.a3-an .s3-fuss { background: linear-gradient(to bottom, rgba(239, 232, 220, 0), #efe8dc 48px); }
.a3-an .a3-auf { opacity: 0; transform: translate3d(0, 46px, 0) scale(.965); transition: opacity .8s ease, transform 1s cubic-bezier(.16, .8, .24, 1); }
.a3-an .a3-auf.a3-zeigen { opacity: 1; transform: none; }
.a3-an .a3-para { will-change: translate; }
