/* lumeya.ai – effects.css: Zusatzschicht zu effects.js + Viewport-Robustheit (kurze Querformat-Handys, iPad-Split-View).
   Alles Visuelle hängt an html.fx (setzt effects.js) → ohne JS / mit <html data-fx="off"> bleibt die Seite unverändert.
   Nur transform/opacity. Kommt direkt nach base.css; wo Seiten-CSS gewinnen würde, erhöht :root die Spezifität. */

/* ---------- Lese-Fortschritt ---------- */
.fx-progress{position:fixed;left:0;top:var(--safe-t,0px);z-index:70;width:100%;height:3px;pointer-events:none;transform-origin:0 50%;transform:scaleX(0);opacity:0;
  background:linear-gradient(90deg,var(--brand),var(--brand-2));transition:opacity var(--d-3) var(--e-std)}
.t-hub .fx-progress{background:linear-gradient(90deg,var(--call),var(--web))}
.fx-progress.is-on{opacity:1}
@media print{.fx-progress{display:none}}

/* ---------- Parallax: Bild wandert im beschnittenen Rahmen (translate/scale setzt JS) ---------- */
.fx .fx-px-box{overflow:hidden}
.fx .fx-px{will-change:translate}
@media (prefers-reduced-motion:reduce){.fx .fx-px{translate:none!important;scale:none!important;will-change:auto}}

/* ---------- Ehrliche Balken (Story-Folie „Neurowebdesign-Test“): füllen sich beim Aufdecken auf ihren Wert ---------- */
@media (prefers-reduced-motion:no-preference){
  .fx .story__slide .bars i{position:relative;overflow:hidden}
  .fx .story__slide .bars i::after{content:"";position:absolute;inset:0;background:var(--surface-3);transform-origin:100% 50%;transform:scaleX(1)}
  .fx .story__slide.is-active .bars i::after{transform:scaleX(calc(1 - var(--w,1)));transition:transform 760ms var(--e-out) 200ms}
  .fx .story__slide.is-active .bars li:nth-child(2) i::after{transition-delay:280ms}
  .fx .story__slide.is-active .bars li:nth-child(3) i::after{transition-delay:360ms}
  .fx .story__slide.is-active .bars li:nth-child(4) i::after{transition-delay:440ms}
}

/* ---------- Magnet-Knöpfe: nur translate (verträgt sich mit .btn:active transform) ---------- */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .fx .btn--primary{will-change:translate}
}
@media (prefers-reduced-motion:reduce){.fx .btn--primary{translate:none!important}}

/* ---------- Lichtschein unter dem Zeiger (nur feine Zeiger; eine Ebene, per transform bewegt) ---------- */
.fx-light-on .fx-light-host{isolation:isolate}
.fx-light{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;border-radius:inherit;opacity:0;transition:opacity var(--d-5) var(--e-std)}
.fx-light.is-on{opacity:1}
.fx-light__dot{position:absolute;left:0;top:0;width:560px;height:560px;margin:-280px 0 0 -280px;border-radius:50%;will-change:transform;
  background:radial-gradient(closest-side,color-mix(in srgb,var(--brand-2) 34%,transparent),transparent)}
.t-hub .fx-light__dot{background:radial-gradient(closest-side,color-mix(in srgb,var(--web-2) 26%,transparent),color-mix(in srgb,var(--call-2) 10%,transparent) 55%,transparent)}
@media (prefers-reduced-motion:reduce),(hover:none),(pointer:coarse){.fx-light{display:none}}

/* ---------- Viewport-Robustheit ---------- */
/* Lange Wörter/Tabellen dürfen nie seitlich schieben */
main :where(h1,h2,h3,p,li,dd,figcaption){overflow-wrap:break-word}
main :where(img,svg,video,canvas,iframe){max-width:100%}

/* Kurze Viewports (Querformat-Handy 844×390 / 740×360, kleine Laptop-Fenster):
   klebende Elemente würden Inhalt verdecken → abschalten; Abstände straffen, damit Text + CTA früher sichtbar sind. */
@media (max-height:560px){
  :root{--nav-h:52px;--sec-y:clamp(40px,3vw + 24px,72px)}
  :root .calc__out,:root .stack__result,:root .faq-wrap .sec-head,:root [data-sticky]{position:static!important;top:auto!important}
  /* Story: die klebende Bühne wäre nur teilweise sichtbar → ausblenden, Schritte einspaltig als Karten lesen */
  :root .story{grid-template-columns:minmax(0,1fr)!important}
  :root .story__visual{display:none!important}
  :root .story__rail{display:none}
  :root .step{min-height:0!important;padding-block:var(--s-24)!important}
  .sec-head{margin-bottom:clamp(24px,3vw,40px)}
  .sec-cta{margin-top:var(--s-32)}
  /* Erste Sektion (egal welcher Hero): keine Mindesthöhe aus vh, damit der CTA nicht unter die Falz rutscht */
  main > section:first-of-type{min-height:0!important}
}
@media (max-height:420px){
  :root{--sec-y:clamp(32px,2vw + 20px,56px)}
  main > section:first-of-type .h-display{font-size:clamp(1.75rem,1.2rem + 2.2vw,2.5rem)}
}

/* iPad-Split-View / schmale Tablets (507, 694, 981 breit): Raster dürfen nicht über den Rand wachsen */
@media (min-width:480px) and (max-width:1023px){
  main :where(.wrap){min-width:0}
  main :where([class*="grid"],[class*="__in"],.story,.calc,.stack__body,.bento,.contact,.beta,.own,.day){min-width:0}
  main :where([class*="grid"],.story,.calc,.bento,.contact,.beta,.own,.day) > *{min-width:0}
}
