Files
portfolio-photo/public/custom/fokus.css
T
Leon TonhäuserandClaude Fable 5.2 c793eb7359 feat: Intro flüssiger machen und englische Sprachversion ergänzen
Intro „Fokus":
- zwei Bild-Ebenen blenden ineinander über statt hartem Bildwechsel
- Unschärfe über winzige Vorschaubilder statt live berechnetem Weichzeichner
  (animiert werden nur noch transform und opacity)
- eigene WebP-Dateien für Laptop (quer) und Handy (hoch) in assets/intro,
  erzeugt mit scripts/intro-bilder.py; 1,8 MB bzw. 1,1 MB statt 5,9 MB
- Bühnenhöhe auf dem Handy unabhängig von der Adressleiste, größere HUD-Schrift
- „Überspringen"-Knopf, Scroll-Hinweis blendet jetzt wirklich aus
- Bildpfade relativ zum Skript, damit das Intro auch unter /en/ lädt

Zweisprachigkeit:
- englische Seiten unter public/en/, Sprachschalter in Topbar und Dock
- hreflang-Verweise, SEO-Konfiguration, Sitemap und SEO-Prüfskript angepasst
- docs/zweisprachigkeit.md

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 13:57:00 +01:00

244 lines
8.4 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.
/* fokus.css – NUR Startseiten-spezifisch: Landung + Fokus-Intro.
Ersetzt tiefenflug.css. Geteilte Basis-Styles (Topbar, Dock, Typo, Buttons,
Footer …) stehen weiterhin in site.css. index.html bindet beide Dateien ein.
Hinweis: Der LANDUNG-Block ist 1:1 aus tiefenflug.css übernommen, damit die
normale Startseite unter dem Intro unverändert aussieht. Neu ist nur der
FOKUS-INTRO-Block (ersetzt den früheren TIEFENFLUG-INTRO-Block). */
/* ==================== 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); }
/* ==================== FOKUS-INTRO ====================
Vollbild-Heldenbild, das beim Laden in die Schärfe zieht; beim Scrollen
wechselt die Bildserie (Schärfeverlagerung). Monochrome HUD-Schicht über
dem Foto – Farbe kommt nur aus den Bildern. Logik in custom/fokus.js. */
.fokus-strecke { height: 560vh; position: relative; }
.fokus-buehne {
position: sticky; top: 0;
height: 100vh;
/* lvh = Höhe bei eingeklappter Handy-Adressleiste: das Foto ändert seine
Größe beim Scrollen nicht mehr (kein Springen). */
height: 100lvh;
overflow: hidden;
background: #0a0a0a; /* hinter dem Foto; Foto deckt komplett */
}
/* Zwei Bild-Ebenen, die ineinander überblenden (fokus.js). Animiert werden
nur opacity und transform – das läuft auch auf Handys flüssig. */
/* isolation: die z-index-Wechsel der Ebenen bleiben unterhalb von Vignette + HUD */
.fokus-bildwrap { position: absolute; inset: 0; isolation: isolate; }
.fokus-ebene {
position: absolute; inset: 0;
opacity: 0;
transition: opacity 0.5s ease-out;
will-change: transform, opacity;
}
.fokus-ebene img {
position: absolute; inset: 0;
width: 100%; height: 100%;
object-fit: cover;
}
/* Scharfes Foto blendet leicht verzögert über das unscharfe Vorschaubild */
.fokus-scharf {
opacity: 0;
transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
/* Leichte Abdunklung an den Rändern – hält die weiße HUD-Schrift lesbar */
.fokus-vignette {
position: absolute; inset: 0; pointer-events: none;
background: radial-gradient(125% 125% at 50% 42%, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}
.fokus-hud {
position: absolute; top: 0; left: 0; right: 0;
height: 100vh;
/* dvh = gerade sichtbare Höhe: die Anzeigen unten bleiben auf dem Handy
über der Adressleiste sichtbar. */
height: 100dvh;
pointer-events: none;
color: #fff;
will-change: opacity;
}
/* Fokus-Klammern in der Mitte (rasten beim Laden ein) */
.fokus-rahmen {
position: absolute; top: 50%; left: 50%;
width: clamp(130px, 28vmin, 420px);
height: clamp(130px, 28vmin, 420px);
transform: translate(-50%, -50%);
animation: fokusKlammer 1.4s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fokus-rahmen span {
position: absolute; width: 18%; height: 18%;
border: 0 solid rgba(255, 255, 255, 0.95);
}
.fokus-rahmen .tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.fokus-rahmen .tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.fokus-rahmen .bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.fokus-rahmen .br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
@keyframes fokusKlammer {
from { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* Marke oben links */
.fokus-marke {
position: absolute;
top: clamp(22px, 5vmin, 52px); left: clamp(22px, 5vmin, 56px);
animation: fokusHoch 0.9s 1s both;
}
.fokus-marke .name {
font-weight: 600; /* wie die Seiten-Überschriften; Inter 700 ist nicht eingebunden */
font-size: clamp(20px, 4.6vmin, 54px);
line-height: 1; letter-spacing: 0.004em;
}
.fokus-marke .sub {
margin-top: 1.6vmin;
font-family: "Fragment Mono", monospace;
font-size: clamp(10px, 1.5vmin, 13px);
letter-spacing: 0.26em;
color: rgba(255, 255, 255, 0.82);
}
/* Belichtungsdaten + Bildunterschrift unten links */
.fokus-meta {
position: absolute;
left: clamp(22px, 5vmin, 56px); bottom: clamp(26px, 6vmin, 56px);
animation: fokusHoch 0.9s 1.15s both;
}
.fokus-meta .expo {
font-family: "Fragment Mono", monospace;
font-size: clamp(11px, 1.8vmin, 15px);
letter-spacing: 0.12em;
}
.fokus-meta .cap {
margin-top: 1.4vmin;
font-family: "Fragment Mono", monospace;
font-size: clamp(10px, 1.45vmin, 12px);
line-height: 1.4; letter-spacing: 0.07em;
color: rgba(255, 255, 255, 0.66);
max-width: 62vw;
}
/* „Fokus gesetzt" unten rechts */
.fokus-lock {
position: absolute;
right: clamp(22px, 5vmin, 56px); bottom: clamp(26px, 6vmin, 56px);
display: flex; align-items: center; gap: 1.5vmin;
animation: fokusEin 1s 1.35s both;
}
.fokus-lock .punkt {
width: 1.4vmin; height: 1.4vmin; min-width: 7px; min-height: 7px;
border-radius: 50%; background: #fff;
box-shadow: 0 0 9px rgba(255, 255, 255, 0.9);
animation: fokusBlinken 1.7s infinite;
}
.fokus-lock .text {
font-family: "Fragment Mono", monospace;
font-size: clamp(10px, 1.5vmin, 13px);
letter-spacing: 0.18em;
}
/* Scroll-Hinweis unten Mitte */
.fokus-hinweis {
position: absolute; left: 50%; bottom: clamp(18px, 3.5vmin, 40px);
transform: translateX(-50%);
display: flex; flex-direction: column; align-items: center; gap: 0.9vmin;
color: rgba(255, 255, 255, 0.85);
transition: opacity 0.4s ease-out;
animation: fokusScroll 1.9s ease-in-out infinite;
}
.fokus-hinweis .wort {
font-family: "Fragment Mono", monospace;
font-size: clamp(10px, 1.3vmin, 11px);
letter-spacing: 0.34em;
}
.fokus-hinweis .pfeil { font-size: clamp(12px, 2.2vmin, 18px); line-height: 1; }
/* Dünne Fortschrittslinie am unteren Rand */
.fokus-fortschritt {
position: absolute; left: 0;
top: calc(100vh - 2px);
top: calc(100dvh - 2px);
width: 100%; height: 2px;
background: rgba(255, 255, 255, 0.16);
}
.fokus-fortschritt span {
display: block; height: 100%;
background: #fff;
transform: scaleX(0); transform-origin: left;
}
/* „Überspringen" oben rechts */
.fokus-skip {
position: absolute;
top: clamp(18px, 4.4vmin, 48px); right: clamp(22px, 5vmin, 56px);
padding: 10px 16px;
border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 100px;
background: rgba(0, 0, 0, 0.25);
color: #fff; cursor: pointer;
font-family: "Fragment Mono", monospace;
font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
transition: background 0.2s ease-out, border-color 0.2s ease-out;
animation: fokusEin 1s 1.35s both;
}
.fokus-skip:hover { background: rgba(0, 0, 0, 0.5); border-color: #fff; }
.fokus-skip:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes fokusHoch { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fokusEin { from { opacity: 0; } to { opacity: 1; } }
@keyframes fokusBlinken { 0%, 48% { opacity: 1; } 50%, 100% { opacity: 0.12; } }
@keyframes fokusScroll {
/* nur Bewegung, keine opacity: sonst überstimmt die Animation das
Ausblenden des Hinweises durch fokus.js */
0%, 100% { transform: translateX(-50%) translateY(0); }
50% { transform: translateX(-50%) translateY(7px); }
}
/* ==================== FALLBACKS ====================
- .kein-js: steht im HTML, fokus.js entfernt sie; ohne JS bleibt sie stehen
und das Intro wird ausgeblendet (Besucher sieht direkt die Startseite).
- .ohne-intro: setzt fokus.js bei prefers-reduced-motion. */
.kein-js .fokus-strecke,
.ohne-intro .fokus-strecke { display: none; }
@media (prefers-reduced-motion: reduce) {
.fokus-rahmen, .fokus-marke, .fokus-meta, .fokus-lock,
.fokus-hinweis, .fokus-lock .punkt, .fokus-skip { animation: none; }
}
@media (max-width: 760px) {
.fokus-strecke { height: 480vh; }
/* Bildunterschrift über den Scroll-Hinweis heben, volle Breite nutzen */
.fokus-meta { bottom: 76px; right: 22px; }
.fokus-meta .cap { max-width: none; }
/* „Überspringen" unter den Namen setzen – oben rechts wäre es im Weg */
.fokus-skip { top: 104px; left: 22px; right: auto; }
}