/* ═══════════════════════════════════════════════════════════════
   MACFLY – Startseite mit Scroll-Film (ergänzt mf-front.css)
   Film bleibt stehen (sticky), Texte und Glaskarten blenden je Szene ein.
═══════════════════════════════════════════════════════════════ */
.mf-movie { position: relative; background: #000; height: 1100vh; /* genaue Höhe setzt mf-film.js */ }
.mf-movie__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.mf-movie__stage { position: absolute; inset: 0; z-index: 0; transform: translate3d(calc(var(--shift, 0) * 15vw), 0, 0); will-change: transform; }
.mf-movie__stage picture { display: contents; }
.mf-movie__poster, .mf-movie__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.mf-movie__video { opacity: 0; transition: opacity .5s; }
.mf-movie__stage.is-live .mf-movie__video { opacity: 1; }
.mf-movie__stage.is-live .mf-movie__poster { opacity: 0; transition: opacity .5s .2s; }
html.mf-film-intro .mf-movie__poster { opacity: 0; }
/* Linke Seite abdunkeln, damit Text und Karten gut lesbar sind */
.mf-movie__shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.5) 28%, rgba(0,0,0,.12) 52%, rgba(0,0,0,0) 64%),
              linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 80%, rgba(0,0,0,.5) 100%); }
html.mf-film-intro .mf-movie__shade { opacity: 0; }
.mf-movie__shade { transition: opacity .8s; }

/* ── Einblendungen ── */
.mf-scene, .mf-glass { position: absolute; z-index: 2; left: var(--gutter); top: 50%; width: min(600px, 44vw);
  transform: translate3d(0, calc(-50% + (1 - var(--in, 1)) * 26px), 0); opacity: 0; visibility: hidden; will-change: opacity, transform; }
.mf-scene--hero { opacity: 1; visibility: visible; }
html.mf-film-intro .mf-scene--hero { opacity: 0; visibility: hidden; }
.mf-scene .mf-eyebrow { display: block; margin-bottom: 18px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.mf-scene__h1, .mf-scene__h2 { margin: 0 0 20px; font-family: var(--f-display); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
.mf-scene__h1 { font-size: clamp(40px, min(5.2vw, 9vh), 88px); }
.mf-scene__h2 { font-size: clamp(36px, min(4.6vw, 8vh), 76px); }
.mf-scene__lead { margin: 0 0 28px; max-width: 34em; font-size: clamp(16px, 1.25vw, 19px); color: #c9d2de; line-height: 1.55; }
.mf-scene__act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-bottom: 26px; }
.mf-scene__tel, .mf-scene__link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: #fff; padding: 12px 4px; }
.mf-scene__tel svg, .mf-scene__link svg { width: 18px; height: 18px; }
.mf-scene__link:hover svg { transform: translateX(3px); }
.mf-scene__link svg { transition: transform .3s var(--ease); }
.mf-scene__trust { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--mute); }
.mf-scene__trust b { color: #fff; font-weight: 600; }
.mf-scene__trust i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.mf-scene__trust a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.mf-scene__big { margin: 0 0 14px; font-family: var(--f-display); font-weight: 800; font-size: clamp(52px, min(7.4vw, 13vh), 132px); letter-spacing: -.045em; line-height: .95; }
.mf-scene__sub { margin: 0; font-size: clamp(16px, 1.4vw, 21px); color: #d6dde7; }

/* ── Glaskarte je Welt ── */
.mf-glass { width: min(470px, 38vw); padding: 26px 28px 24px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.025)), rgba(10,12,18,.5);
  border: 1px solid rgba(255,255,255,.13); box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.mf-glass__kick { margin: 0 0 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.mf-glass__kick b { font-weight: 500; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mf-glass__t { margin: 0 0 12px; font-family: var(--f-display); font-size: clamp(24px, min(2.3vw, 4.2vh), 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.12; text-wrap: balance; }
.mf-glass__p { margin: 0 0 20px; font-size: 15.5px; line-height: 1.55; color: #c3ccd8; }
.mf-glass__act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.mf-glass__more { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); transition: background .3s, border-color .3s; }
.mf-glass__more:hover { background: var(--grad); border-color: transparent; }
.mf-glass__more svg { width: 16px; height: 16px; }
.mf-glass__go { font-size: 14.5px; font-weight: 600; color: #fff; opacity: .85; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 4px; }
.mf-glass__go:hover { opacity: 1; text-decoration-color: var(--orange); }

/* ── Kapitel-Leiste (01–04) ── */
.mf-chapters { position: absolute; z-index: 3; right: var(--gutter); top: 50%; transform: translateY(-50%); opacity: 0; visibility: hidden;
  padding: 10px; border-radius: 18px; background: rgba(8,10,15,.55); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.mf-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: relative; }
.mf-chapters a { display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 12px; border-radius: 11px; font-size: 13.5px; color: rgba(238,243,249,.55); transition: color .3s, background .3s; }
.mf-chapters a b { font-family: var(--f-mono); font-weight: 500; font-size: 11.5px; color: rgba(238,243,249,.4); transition: color .3s; }
.mf-chapters a:hover { color: #fff; }
.mf-chapters a.is-on { color: #fff; background: rgba(255,255,255,.08); }
.mf-chapters a.is-on b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mf-chapters::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--prog, 0)); opacity: .9; }

/* ── Scroll-Hinweis & Überspringen ── */
.mf-movie__hint { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(238,243,249,.7); transition: opacity .5s; }
.mf-movie__hint i { width: 1px; height: 38px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: mf-hint 1.8s var(--ease) infinite; transform-origin: 50% 0; }
.mf-movie__hint.is-off { opacity: 0; }
@keyframes mf-hint { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.mf-movie__skip { position: absolute; z-index: 4; left: var(--gutter); bottom: 20px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.7); font-size: 13px; opacity: 0; pointer-events: none; }
.mf-movie__skip:focus-visible { opacity: 1; pointer-events: auto; outline: 2px solid #fff; outline-offset: 2px; }

/* Weite Sprünge (z.B. Film → Formular): kurz ausblenden statt durch den ganzen Film zu spulen */
.mf-main, .mf-foot { transition: opacity .25s; }
.mf.is-jump .mf-main, .mf.is-jump .mf-foot { opacity: 0; }

/* ── Niedrige Bildschirme (Laptop) ── */
@media (max-height: 760px) and (min-aspect-ratio: 29/20) and (min-width: 980px) {
  .mf-scene__lead { margin-bottom: 20px; font-size: 15.5px; }
  .mf-scene__act { margin-bottom: 18px; }
  .mf-scene .mf-eyebrow { margin-bottom: 12px; }
  .mf-glass { padding: 20px 22px 18px; }
  .mf-glass__p { margin-bottom: 14px; font-size: 14.5px; }
  .mf-chapters a { padding: 7px 12px 7px 10px; }
}
@media (min-aspect-ratio: 29/20) and (min-width: 980px) and (max-width: 1180px) {
  .mf-scene, .mf-glass { width: min(520px, 50vw); }
  .mf-chapters a span { display: none; }
}

/* ── Hochformat und schmale Fenster (Handy, Tablet): Text unten, Film oben ── */
@media (max-aspect-ratio: 29/20), (max-width: 979px) {
  .mf-movie__shade { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 16%, rgba(0,0,0,0) 38%, rgba(0,0,0,.72) 62%, rgba(0,0,0,.92) 100%); }
  .mf-scene, .mf-glass { left: var(--gutter); right: var(--gutter); top: auto; bottom: calc(22px + env(safe-area-inset-bottom)); width: auto;
    transform: translate3d(0, calc((1 - var(--in, 1)) * 22px), 0); }
  .mf-scene .mf-eyebrow { margin-bottom: 10px; font-size: 11px; }
  .mf-scene__h1 { font-size: clamp(31px, 9vw, 52px); margin-bottom: 12px; }
  .mf-scene__h2 { font-size: clamp(30px, 8.6vw, 48px); margin-bottom: 12px; }
  .mf-scene__lead { font-size: 15px; margin-bottom: 18px; }
  .mf-scene__act { gap: 6px 18px; margin-bottom: 14px; }
  .mf-scene__trust { font-size: 12.5px; }
  .mf-scene--tor { bottom: calc(60px + env(safe-area-inset-bottom)); }
  .mf-scene__big { font-size: clamp(48px, 14vw, 88px); }
  .mf-glass { padding: 18px 18px 16px; border-radius: 18px; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.02)), rgba(10,12,18,.62); }
  .mf-glass__t { font-size: clamp(21px, 6vw, 28px); }
  .mf-glass__p { font-size: 14.5px; margin-bottom: 14px; }
  .mf-glass__more { padding: 10px 15px; font-size: 14px; }
  .mf-chapters { right: auto; left: 50%; top: calc(68px + env(safe-area-inset-top)); transform: translateX(-50%); padding: 5px; border-radius: 999px; }
  .mf-chapters ol { display: flex; gap: 2px; }
  .mf-chapters a { padding: 7px 11px; border-radius: 999px; font-size: 12px; gap: 6px; }
  .mf-chapters a b { font-size: 10.5px; }
  .mf-chapters a:not(.is-on) span { display: none; }
  .mf-chapters::after { left: 14px; right: 14px; bottom: 2px; }
  .mf-movie__hint { display: none; }
}
@media (max-height: 640px) and (max-aspect-ratio: 29/20), (max-height: 640px) and (max-width: 979px) {
  .mf-scene__lead { display: none; }
}
/* Text unten, aber breiter Bildschirm (Tablet quer/hoch, Handy quer): Karten nicht über die ganze Breite */
@media (min-width: 640px) and (max-aspect-ratio: 29/20), (min-width: 640px) and (max-width: 979px) {
  .mf-scene, .mf-glass { right: auto; width: min(560px, 100% - var(--gutter) * 2); }
  .mf-scene--tor { width: auto; right: var(--gutter); }
}
/* Sehr niedrige Bildschirme (Handy quer): Kapitel-Leiste ausblenden, sonst stösst sie an die Karte */
@media (max-height: 500px) {
  .mf-chapters { display: none; }
  .mf-glass__p { display: none; }
  .mf-scene, .mf-glass { bottom: calc(14px + env(safe-area-inset-bottom)); }
}

/* ── Demos & Filme: Filme als zweite Reihe ── */
.mf-demos__films { margin-top: clamp(64px, 10vh, 120px); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; column-gap: clamp(30px, 5vw, 80px); align-items: start; }
.mf-demos__sub { grid-column: 1; margin: 0 0 14px; font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 38px); font-weight: 700; letter-spacing: -.03em; }
.mf-demos__subtxt { grid-column: 1; margin: 0; max-width: 34em; color: var(--mute); }
.mf-demos__films .mf-films__grid { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 1000px) {
  .mf-demos__films { grid-template-columns: 1fr; }
  .mf-demos__films .mf-films__grid { grid-column: 1; grid-row: auto; margin-top: 24px; }
}
/* Hochformat-Filme: auf Tablet und Handy kleiner, zwei nebeneinander, nie höher als ~60 % des Bildschirms */
@media (max-width: 1000px) {
  .mf-demos__films .mf-films__grid { justify-content: flex-start; }
  .mf-demos__films .mf-film { width: min(calc(50% - 8px), 240px, (60svh) * 9 / 16); }
}

/* ── Chat-Knopf mit m-Fly ── */
.mf-dock.mf-dock--film { width: auto; height: 58px; display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: rgba(10,12,18,.72); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 16px 40px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .35s var(--ease), border-color .3s, opacity .3s; }
.mf-dock--film:hover { transform: translateY(-2px); border-color: rgba(232,102,143,.6); }
.mf-dock--film img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #000; }
.mf-dock__txt { font-size: 14px; font-weight: 600; white-space: nowrap; }
.mf-dock--film .mf-dock__ping { right: auto; left: 42px; top: 6px; width: 10px; height: 10px; }
@media (max-width: 760px) {
  .mf-dock.mf-dock--film { width: 56px; height: 56px; padding: 5px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mf-dock__txt { display: none; }
  .mf-dock--film .mf-dock__ping { left: auto; right: 4px; top: 4px; }
}

/* Während des Films liegt der Chat-Knopf sonst über Text und Karten (Text steht unten) → erst nach dem Film zeigen */
@media (max-aspect-ratio: 29/20), (max-width: 979px) {
  body.mf-in-film .mf-dock.mf-dock--film { opacity: 0; pointer-events: none; transform: scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
  .mf-movie__hint i { animation: none; }
}

/* ── Der Mensch hinter MACFLY (direkt nach dem Film) – Mobile First ── */
.mf-human { position: relative; padding: clamp(72px, 12vh, 140px) 0; border-top: 1px solid var(--line);
  background: radial-gradient(70% 60% at 0% 0%, rgba(181,19,90,.16), transparent 70%), radial-gradient(60% 50% at 100% 100%, rgba(212,118,62,.10), transparent 70%), var(--bg); }
.mf-human__grid { display: grid; gap: 26px; }
.mf-human__head .mf-kicker { margin-bottom: 14px; }
.mf-human__title { margin: 0; font-family: var(--f-display); font-size: clamp(36px, 10vw, 80px); font-weight: 700; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; }
.mf-human__title span { display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mf-human__lead { margin: 0 0 28px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: #d3dae4; }
.mf-human__label { margin: 0 0 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.mf-human__list { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 10px; }
.mf-human__list li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 15.5px; line-height: 1.45; color: #c3ccd8; }
.mf-human__list b { color: #fff; font-weight: 600; }
.mf-human__list svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--orange); stroke-width: 2.4; }
.mf-human__note { margin: 0 0 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.mf-human__more { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); transition: background .3s, border-color .3s; }
.mf-human__more:hover { background: var(--grad); border-color: transparent; }
.mf-human__more svg { width: 16px; height: 16px; }
@media (min-width: 640px) {
  .mf-human__list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .mf-human__grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(48px, 6vw, 96px); align-items: start; }
  .mf-human__head { position: sticky; top: 120px; }
}

/* ── Demo-Webseiten: Branchen-Filter (Handy: seitlich wischbar) ── */
.mf-demos__filter { display: flex; gap: 8px; margin: 0 calc(var(--gutter) * -1) 22px; padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.mf-demos__filter::-webkit-scrollbar { display: none; }
.mf-demos__filter button { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: #d6dde7; font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background .3s, border-color .3s, color .3s; }
.mf-demos__filter button span { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 600; color: #fff; }
.mf-demos__filter button:hover { border-color: rgba(255,255,255,.32); color: #fff; }
.mf-demos__filter button[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; }
.mf-demos__filter button[aria-pressed="true"] span { background: rgba(0,0,0,.22); }
.mf-demos__filter button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (min-width: 760px) { .mf-demos__filter { margin: 0 0 28px; padding: 2px 0 6px; flex-wrap: wrap; overflow: visible; } }
