Files
portfolio-photo/public/custom/tiefenflug.css
T
Leon Tonhäuser 815f15c4df fix: Body fixieren statt Strecke – verhindert Layout-Sprung
Vorher: .eingerastet pinnt die Strecke per position:fixed; inset:0.
Dadurch schrumpft documentElement.scrollHeight schlagartig (Strecke
ist nicht mehr im Flow), und der Browser schleudert den User vom
Nachwuchspreis-Moment (~540vh) auf das neue Maximum.

Jetzt: Body wird per position:fixed; top:-<scrollY>px eingefroren.
Standard-Pattern fuer mobile Menues / Modals – der Flow bleibt
unveraendert, der User bleibt genau am Preis-Moment stehen.
Beim Beenden wird der Inline-Style wieder entfernt, BEVOR wir auf
scrollY=0 springen.
2026-06-17 20:25:01 +02:00

287 lines
10 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* tiefenflug.css – NUR Startseiten-spezifisch: Landung + Tiefenflug-Intro.
Geteilte Basis-Styles (Topbar, Dock, Typo, Buttons, Footer …) stehen in site.css.
index.html bindet beide Dateien ein. */
/* ==================== LANDUNG (normale Startseite) ==================== */
.landung .hero { padding: 90px 0 40px; }
.landung .hero h1 {
font-size: clamp(40px, 6vw, 72px);
font-weight: 600;
letter-spacing: -0.05em;
line-height: 1.05;
margin: 18px 0 18px;
}
.landung .hero .gedaempft { max-width: 560px; }
.zeilen { padding-bottom: 90px; }
.zeile {
display: flex; justify-content: space-between; align-items: baseline;
border-top: 1px solid var(--linie);
padding: 22px 0;
color: var(--text-leise);
font-size: 16px;
transition: color 0.2s ease-out;
}
.zeile b { color: var(--text); font-size: 20px; font-weight: 600; letter-spacing: -0.04em; }
.zeile:hover { color: var(--text); }
/* ==================== TIEFENFLUG-INTRO ==================== */
.flug-strecke { height: 640vh; position: relative; }
.flug-buehne {
position: sticky; top: 0;
height: 100vh;
overflow: hidden;
perspective: 800px;
perspective-origin: 50% 50%;
background: var(--bg);
}
/* Name als Umriss-Schrift hinter den Fotos */
.flug-name {
position: absolute; left: 50%; top: 50%;
transform: translate(-50%, -50%);
font-weight: 600;
font-size: clamp(40px, 8vw, 110px);
letter-spacing: 18px;
white-space: nowrap;
color: transparent;
-webkit-text-stroke: 1.5px rgba(18, 18, 18, 0.28);
will-change: transform, opacity;
pointer-events: none;
}
/* Verlaufs-Bilder: laufen weich ins Weiße aus, JS steuert die Deckkraft */
.geist {
position: absolute; top: 0; bottom: 0;
width: 52%; height: 100%;
object-fit: cover;
opacity: 0;
will-change: opacity;
pointer-events: none;
}
.geist.links { left: 0; -webkit-mask-image: linear-gradient(to right, black 20%, transparent 95%); mask-image: linear-gradient(to right, black 20%, transparent 95%); }
.geist.rechts { right: 0; -webkit-mask-image: linear-gradient(to left, black 20%, transparent 95%); mask-image: linear-gradient(to left, black 20%, transparent 95%); }
/* Schwebende Fotos */
.flug-foto {
position: absolute; left: 50%; top: 50%;
width: clamp(180px, 22vw, 300px);
aspect-ratio: 3 / 2; /* Fallback bis das Bild geladen ist – JS setzt das echte Format */
transform-style: preserve-3d;
will-change: transform, opacity;
pointer-events: none;
}
/* Hochformat (vom JS erkannt): schmaler, damit das Foto nicht zu hoch wird */
.flug-foto.hochformat { width: clamp(150px, 16vw, 220px); }
.flug-foto img {
width: 100%; height: 100%;
object-fit: cover;
border-radius: 4px;
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
animation: schweben 5s ease-in-out infinite alternate;
}
.flug-foto:nth-child(2n) img { animation-delay: 1.3s; }
.flug-foto:nth-child(3n) img { animation-delay: 2.4s; }
@keyframes schweben {
from { transform: translateY(0); }
to { transform: translateY(-12px); }
}
.flug-hinweis {
position: absolute; bottom: 24px; left: 50%;
transform: translateX(-50%);
font-family: "Fragment Mono", monospace;
font-size: 13px;
letter-spacing: 3px;
color: #98a2b3;
animation: pulsieren 1.8s ease-in-out infinite;
}
@keyframes pulsieren { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
/* Preis-Moment (Gold nur hier – Akzent für die Auszeichnung) */
.preis {
position: absolute; inset: 0;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
opacity: 0;
will-change: opacity, transform;
pointer-events: none;
}
.preis-bild { position: relative; }
.preis-bild img {
display: block;
width: min(560px, 70vw);
border-radius: var(--radius-karte);
box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
/* Gold-Schriftzug: Verlauf wandert durch den Text */
.preis-text {
position: relative;
margin-top: 28px;
font-family: "Fragment Mono", monospace;
font-size: 14px;
letter-spacing: 3px;
background: linear-gradient(100deg, #9a7a1c 0%, #c9a227 30%, #f7e7ae 50%, #c9a227 70%, #9a7a1c 100%);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: goldglanz 3s linear infinite;
}
@keyframes goldglanz {
from { background-position: 200% 0; }
to { background-position: -200% 0; }
}
/* Gold-Rieseln: kleine Partikel fallen vom Schriftzug herab */
.preis-text .rieseln {
position: absolute; top: 100%;
width: 3px; height: 3px;
border-radius: 50%;
background: #c9a227;
opacity: 0;
animation: rieseln 2.8s linear infinite;
}
@keyframes rieseln {
0% { transform: translate(0, 0); opacity: 0; }
15% { opacity: 0.9; }
100% { transform: translate(var(--drift, 0px), 46px); opacity: 0; }
}
.preis-text .rieseln:nth-child(1) { left: 6%; animation-delay: 0.0s; --drift: -6px; }
.preis-text .rieseln:nth-child(2) { left: 16%; animation-delay: 1.1s; --drift: 4px; }
.preis-text .rieseln:nth-child(3) { left: 25%; animation-delay: 0.4s; --drift: -3px; }
.preis-text .rieseln:nth-child(4) { left: 34%; animation-delay: 1.8s; --drift: 5px; }
.preis-text .rieseln:nth-child(5) { left: 45%; animation-delay: 0.8s; --drift: -5px; }
.preis-text .rieseln:nth-child(6) { left: 55%; animation-delay: 2.2s; --drift: 3px; }
.preis-text .rieseln:nth-child(7) { left: 64%; animation-delay: 0.2s; --drift: -4px; }
.preis-text .rieseln:nth-child(8) { left: 75%; animation-delay: 1.4s; --drift: 6px; }
.preis-text .rieseln:nth-child(9) { left: 85%; animation-delay: 2.6s; --drift: -2px; }
.preis-text .rieseln:nth-child(10) { left: 94%; animation-delay: 0.6s; --drift: 4px; }
.konfetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Flug-Partikel: Staub, Lichtstreifen und Bokeh fliegen der Kamera entgegen */
.flug-partikel { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.partikel {
position: absolute; left: 50%; top: 50%;
opacity: 0;
will-change: transform, opacity;
}
.partikel.staub { width: 5px; height: 5px; border-radius: 50%; background: rgba(102, 112, 133, 0.8); }
.partikel.staub.gold { background: rgba(201, 162, 39, 0.8); }
.partikel.streif { width: 42px; height: 2px; background: linear-gradient(to right, transparent, rgba(102, 112, 133, 0.6)); }
.partikel.bokeh {
width: 28px; height: 28px; border-radius: 50%;
background: radial-gradient(circle, rgba(201, 162, 39, 0.35), rgba(201, 162, 39, 0.03));
filter: blur(1px);
}
/* Name-Moment: Umriss-Buchstaben füllen sich nacheinander schwarz.
Das Füllen löst tiefenflug.js einmalig über die Klasse .gefuellt aus;
das Ein-/Ausblenden des Blocks steuert der Scroll-Fortschritt. */
.name-moment {
position: absolute; left: 50%; top: 50%;
transform: translate(-50%, -50%);
font-weight: 600;
font-size: clamp(34px, 6vw, 84px);
letter-spacing: 8px;
white-space: nowrap;
opacity: 0;
will-change: opacity;
pointer-events: none;
}
.name-moment span {
color: transparent;
-webkit-text-stroke: 1.2px rgba(18, 18, 18, 0.4);
transition: color 0.45s ease-out, -webkit-text-stroke-color 0.45s ease-out;
}
.name-moment.gefuellt span { color: var(--text); -webkit-text-stroke-color: transparent; }
.name-moment span:nth-child(1) { transition-delay: 0.00s; }
.name-moment span:nth-child(2) { transition-delay: 0.10s; }
.name-moment span:nth-child(3) { transition-delay: 0.20s; }
.name-moment span:nth-child(4) { transition-delay: 0.30s; }
.name-moment span:nth-child(5) { transition-delay: 0.40s; }
.name-moment span:nth-child(6) { transition-delay: 0.50s; }
.name-moment span:nth-child(7) { transition-delay: 0.60s; }
.name-moment span:nth-child(8) { transition-delay: 0.70s; }
.name-moment span:nth-child(9) { transition-delay: 0.80s; }
.name-moment span:nth-child(10) { transition-delay: 0.90s; }
.name-moment span:nth-child(11) { transition-delay: 1.00s; }
.name-moment span:nth-child(12) { transition-delay: 1.10s; }
.name-moment span:nth-child(13) { transition-delay: 1.20s; }
.name-moment span:nth-child(14) { transition-delay: 1.30s; }
/* Vollbild-Übergang: Gewinnerbild wächst, Verlauf ins Weiße */
.preis-bild { will-change: transform; }
.preis-bild img { transition: border-radius 0.4s ease-out, box-shadow 0.4s ease-out; }
.preis.vollbild .preis-bild img { border-radius: 0; box-shadow: none; }
.landung-verlauf {
position: absolute; left: 0; right: 0; bottom: 0;
height: 30vh;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
opacity: 0;
pointer-events: none;
z-index: 4;
}
/* ==================== FALLBACKS ====================
- .kein-js: steht im HTML und wird von tiefenflug.js entfernt;
ohne JS bleibt sie stehen und das Intro verschwindet.
- .ohne-intro: setzt tiefenflug.js bei prefers-reduced-motion.
- mobil: weniger schwebende Fotos (data-mobil="aus"). */
.kein-js .flug-strecke,
.ohne-intro .flug-strecke { display: none; }
/* Skip-Button für den Auto-Player. */
.autoplayer-skip {
position: fixed;
right: 1.5rem;
bottom: 1.5rem;
z-index: 50;
padding: 0.65rem 1.1rem;
border-radius: 999px;
border: 1px solid rgba(0, 0, 0, 0.12);
background: rgba(255, 255, 255, 0.92);
color: #121212;
font: inherit;
font-size: 0.9rem;
cursor: pointer;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
transition: transform 0.15s ease, background 0.15s ease;
}
.autoplayer-skip:hover { background: #ffffff; transform: translateY(-1px); }
.autoplayer-skip:focus-visible { outline: 2px solid #c9a227; outline-offset: 2px; }
.autoplayer-skip[hidden] { display: none; }
/* Auto-Player-Phase (zwischen Scroll-Ende und Fade-out): Strecke im Flow
lassen, stattdessen den Body fixieren (position:fixed; top: -<scrollY>px)
und Scroll blockieren. So schrumpft der Body nicht und der User bleibt
am Preis-Moment. */
.eingerastet { overflow: hidden; }
.eingerastet body { position: fixed; width: 100%; }
.intro-beendet body { position: static !important; }
/* Intro vorbei (nach Auto-Player-Fade-out): Strecke komplett weg,
damit die echte Seite voll scrollbar ist und der Dock wieder da ist. */
.intro-beendet .flug-strecke { display: none; }
.intro-beendet .flug-buehne,
.intro-beendet .flug-name,
.intro-beendet .flug-hinweis,
.intro-beendet .preis,
.intro-beendet .landung-verlauf,
.intro-beendet .flug-partikel { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
.flug-foto img, .flug-hinweis,
.preis-text, .preis-text .rieseln { animation: none; }
}
@media (max-width: 760px) {
.flug-foto[data-mobil="aus"], .partikel[data-mobil="aus"] { display: none; }
.flug-strecke { height: 500vh; }
.flug-name { -webkit-text-stroke-width: 1px; }
}