/* Bauwerksbuch Kaiser – Film „Fahrt durch Wien“ im Titelbild der Startseite (20.11.2026)
   Der Film ist EIN Element (.ff), das zwischen drei Rahmen wandert: Titelbild · volle Fläche · klein unten rechts.
   Ablauf: js/film.js. Farben und Schriften kommen aus site.css (--shade, --sans). */
.ff-back { position: fixed; inset: 0; z-index: 200; background: #000; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.ff-back.on { opacity: 1; pointer-events: auto; }
.ff { --ff-dur: 1.15s; --ff-ease: cubic-bezier(.62,.04,.22,1); position: fixed; z-index: 201; left: 0; top: 0; width: 10px; height: 10px; overflow: hidden; isolation: isolate; background: #000; color: #fff; font: 500 14px/1.3 var(--sans); opacity: 0; border-radius: 0;
  transition: left var(--ff-dur) var(--ff-ease), top var(--ff-dur) var(--ff-ease), width var(--ff-dur) var(--ff-ease), height var(--ff-dur) var(--ff-ease), border-radius var(--ff-dur) var(--ff-ease), box-shadow var(--ff-dur) var(--ff-ease), opacity .6s ease; }
.ff.on { opacity: 1; }
.ff [hidden] { display: none !important; }
/* .ff-in ist das Filmbild (16:9). Das Standbild darin ist das GANZE Titelbild und ragt oben und unten darüber hinaus:
   so deckt die Filmschicht das Titelbild auch dort, wo es mehr zeigt als das erste Filmbild; .ff schneidet zu. */
.ff-in { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transition: left var(--ff-dur) var(--ff-ease), top var(--ff-dur) var(--ff-ease), width var(--ff-dur) var(--ff-ease), height var(--ff-dur) var(--ff-ease); }
.ff-still { position: absolute; display: block; max-width: none; }
.ff-video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; object-fit: contain; opacity: 0; transition: opacity .35s ease; }
.ff.laeuft .ff-video { opacity: 1; }
.ff.snap, .ff.snap .ff-in { transition: none !important; }
.ff[data-state="klein"] { z-index: 58; border-radius: 10px; box-shadow: 0 14px 44px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.14); cursor: pointer; }
.ff :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.ff-schatten { position: absolute; inset: auto 0 0 0; height: 34%; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); pointer-events: none; opacity: 0; transition: opacity .4s; }
.ff[data-state="kino"] .ff-schatten, .ff[data-state="klein"] .ff-schatten { opacity: 1; }
.ff-oben, .ff-unten { transition: opacity .4s; }
.ff-oben { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.ff-unten { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; gap: 12px; }
.ff-k { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; margin: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.38); background: rgba(var(--shade),.58); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ff-k:hover, .ff-text:hover { background: rgba(var(--shade),.88); }
.ff-k svg { width: 18px; height: 18px; display: block; }
.ff-zeit { flex: none; font: 500 13px/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ff-text { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 40px; margin: 0; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.38); background: rgba(var(--shade),.58); color: #fff; font: 500 14px/1 var(--sans); white-space: nowrap; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ff-text svg { width: 16px; height: 16px; display: block; }
.ff-lauf { --p: 0%; -webkit-appearance: none; appearance: none; flex: 1 1 auto; min-width: 24px; width: 100%; height: 24px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.ff-lauf::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,.32) var(--p)); }
.ff-lauf::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ff-lauf::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.32); }
.ff-lauf::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.ff-lauf::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ff-lauf:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.ff-hinweis { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.38); background: rgba(var(--shade),.58); font: 500 14px/1.3 var(--sans); text-align: center; opacity: 0; transition: opacity .5s; pointer-events: none; }
.ff-hinweis.on { opacity: 1; }
.ff-warten { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.28); border-top-color: #fff; opacity: 0; transition: opacity .3s; pointer-events: none; animation: ff-dreh .9s linear infinite; }
.ff.wartet .ff-warten { opacity: 1; }
@keyframes ff-dreh { to { transform: rotate(360deg); } }
.ff-meldung { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: min(440px, calc(100% - 32px)); margin: 0; padding: 14px 18px; border-radius: 10px; background: rgba(var(--shade),.9); font: 500 15px/1.45 var(--sans); text-align: center; }
.ff:not([data-state="kino"]) .ff-hinweis, .ff:not([data-state="kino"]) .nur-kino { display: none; }
.ff:not([data-state="klein"]) .nur-klein { display: none; }
.ff[data-state="start"] .ff-oben, .ff[data-state="start"] .ff-unten, .ff[data-state="start"] .ff-meldung { display: none; }
.ff[data-state="klein"] .ff-unten { left: 8px; right: 8px; bottom: 8px; gap: 8px; }
.ff[data-state="klein"] .ff-oben { top: 8px; right: 8px; }
.ff[data-state="klein"] .ff-k { width: 32px; height: 32px; }
.ff[data-state="klein"] .ff-k svg { width: 15px; height: 15px; }
.ff[data-state="klein"] .ff-zeit { display: none; }
.ff[data-state="klein"] .ff-meldung { font-size: 12px; padding: 8px 10px; }
/* volle Fläche: Die Steuerung blendet aus, solange der Film läuft und sich nichts rührt */
.ff.ruhe[data-state="kino"] { cursor: none; }
.ff.ruhe[data-state="kino"] .ff-oben, .ff.ruhe[data-state="kino"] .ff-unten, .ff.ruhe[data-state="kino"] .ff-schatten { opacity: 0; pointer-events: none; }
.ff:fullscreen { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.ff:fullscreen .ff-in { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.ff:fullscreen .ff-still { display: none; }
.ff:-webkit-full-screen { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.ff:-webkit-full-screen .ff-in { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.ff:-webkit-full-screen .ff-still { display: none; }
/* Handy: Laufleiste in eigener Zeile über den Knöpfen, Hinweis oben; im kleinen Rahmen nur die Knöpfe */
@media (max-width: 640px) {
  .ff[data-state="kino"] .ff-unten { flex-wrap: wrap; gap: 2px 8px; left: 10px; right: 10px; bottom: 8px; }
  .ff[data-state="kino"] .ff-lauf { order: -1; flex: 0 0 100%; }
  .ff[data-state="kino"] .ff-zeit { margin-right: auto; }
  .ff[data-state="kino"] .ff-text span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ff[data-state="kino"] .ff-text { width: 40px; padding: 0; justify-content: center; }
  .ff-hinweis { left: 10px; bottom: auto; top: 12px; transform: none; max-width: calc(100% - 72px); padding: 7px 12px; font-size: 13px; text-align: left; }
  .ff-schatten { height: 52%; }
  .ff[data-state="klein"] .ff-lauf { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .ff { --ff-dur: .01s; } }
@media print { .ff, .ff-back { display: none !important; } }
