/* ZOLLER-Startseite: Hero »Auf den µm« (hero.js) + Abschnitt »Automation« (auto.js) – Echtzeit-3D, helle Halle.
   Nur auf der Startseite geladen (tools/home3d.py). Alles unter .mx, damit nichts anderes auf der Seite betroffen ist. */
.mx { --glass: rgba(255, 255, 255, .86); --line: rgba(0, 0, 0, .08); --mx-bg: #d6d9db; --hdr: var(--header-h, 64px);
  position: relative; height: 800vh; color: #000; background: var(--mx-bg); }
.mx--hero { margin-top: calc(-1 * var(--hdr)); }               /* Bühne beginnt unter der (gläsernen) Kopfzeile */
.mx__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--mx-bg); isolation: isolate; }
.mx__gl { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
/* Standbild genau dieser Ansicht, bis die 3D-Szene bereit ist (danach weiche Überblendung) */
.mx__poster { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--mx-bg) center / cover no-repeat; transition: opacity .9s ease, visibility 0s .9s; }
.mx--hero .mx__poster { background-image: url(img/hero-land.webp); }
.au .mx__poster { background-image: url(img/auto-land.webp); }
@media (max-aspect-ratio: 4/5) {
  .mx--hero .mx__poster { background-image: url(img/hero-port.webp); }
  .au .mx__poster { background-image: url(img/auto-port.webp); }
}
.mx.is-ready .mx__poster { opacity: 0; visibility: hidden; }
.mx.is-fallback .mx__gl { display: none; }
.mx.is-fallback { height: 100vh; height: 100svh; }
.mx.is-fallback .mx__t:not(.mx__t--hero):not(.mx__t--intro) { display: none; }
.mx.is-fallback :is(.mx__t--hero, .mx__t--intro) { opacity: 1; transform: none; pointer-events: auto; }
.mx.is-fallback .mx__hint { display: none; }
.mx__labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
/* Schleier hinter dem Kopftext (unten links), damit Botschaft und Halle nicht ineinanderlaufen */
.mx__veil { position: absolute; inset: 0; z-index: 2; pointer-events: none; transition: opacity .6s; --v: 236, 238, 239;
  background: radial-gradient(ellipse 52% 50% at 20% 76%, rgba(var(--v), .93) 0, rgba(var(--v), .88) 52%, rgba(var(--v), 0) 100%),
              linear-gradient(0deg, rgba(var(--v), .85) 0, rgba(var(--v), 0) 26%); }
@media (max-width: 900px) { .mx__veil { background: linear-gradient(0deg, rgba(var(--v), .96) 0, rgba(var(--v), .93) 52%, rgba(var(--v), .6) 64%, rgba(var(--v), 0) 80%); } }
.mx__veil.is-off { opacity: 0; }

/* Texte */
.mx__t { position: absolute; z-index: 4; left: var(--gutter); bottom: clamp(92px, 12vh, 130px); width: min(560px, calc(100vw - 2 * var(--gutter)));
  opacity: 0; transform: translateY(22px); transition: opacity .55s, transform .8s var(--ease-out); pointer-events: none; color: #000; }
.mx__t.is-on { opacity: 1; transform: none; pointer-events: auto; }
.mx__t:not(.mx__t--hero) { padding: 22px 24px 20px; border-radius: 18px; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 60px -30px rgba(0, 0, 0, .5); }
.mx__t:not(.mx__t--hero) p:last-child { margin-bottom: 0; }
.mx__t--right { left: auto; right: calc(var(--gutter) + 40px); width: min(470px, calc(100vw - 2 * var(--gutter))); }
.mx__t--hero { width: min(640px, calc(100vw - 2 * var(--gutter))); bottom: clamp(70px, 8.5vh, 104px); }
.mx__t h1 { margin: .35em 0 .3em; font-size: clamp(42px, 5.1vw, 80px); font-weight: 500; line-height: 1; letter-spacing: -.035em; color: #000; }
.mx__t h2 { margin: .3em 0 .35em; font-size: clamp(30px, 3.4vw, 52px); font-weight: 500; line-height: 1.02; letter-spacing: -.025em; color: #000; }
.mx__t em { font-style: normal; color: #5d6166; }
.mx__t p { margin: 0 0 1.2em; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5; color: #202326; max-width: 34em; }
.mx__what { display: inline-block; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em; color: #202326; }
.mx__no { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #000; display: inline-flex; gap: 8px; align-items: center; }
.mx__no::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 10px rgba(240, 230, 0, .7); flex: none; }
.mx__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.mx .btn--ghost { color: #000; }
.mx .btn--plan { display: inline-flex; align-items: center; gap: 8px; }
.mx .btn--plan svg { width: 18px; height: 18px; flex: none; }
.mx .btn--plan::after { display: none; }
.mx__hint { display: flex; align-items: center; gap: 10px; margin-top: 1.3em !important; font-size: 14px !important; color: #33363a !important; }
.mx__hint i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); flex: none; }
/* Puls als eigene Ebene (transform/opacity läuft auf der Grafikkarte – ein wachsender box-shadow ließ die Seite in jedem Bild
   neu zeichnen) und nur, solange die Karte zu sehen ist */
.mx__hint i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(240, 230, 0, .7); opacity: 0; pointer-events: none; }
.mx.is-near .mx__t.is-on .mx__hint i::after { animation: mx-ping 1.6s infinite; }
@keyframes mx-ping { 0% { transform: scale(1); opacity: 1; } 70% { transform: scale(3.4); opacity: 0; } 100% { transform: scale(3.4); opacity: 0; } }
.mx__t--end { width: min(640px, calc(100vw - 2 * var(--gutter))); }
.mx__t--end h2 { font-size: clamp(40px, 5vw, 78px); }
/* Texte im Schattenbild: weiß hinterlegt (die Glasfläche über dem schwarzen Werkzeug sähe sonst grau aus) */
.mx.is-light .mx__t:not(.mx__t--hero) { background: rgba(255, 255, 255, .97); box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .45); }
.mx.is-light .mx__t p { color: #33363a; }
.mx.is-light .mx__t em { color: #6c7075; }

/* Stationsschilder */
.mx .st { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, .94); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45); font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.2; letter-spacing: 0; text-transform: none; color: #44484c; margin: 0;
  white-space: nowrap; cursor: pointer; opacity: 0; transition: opacity .4s, box-shadow .3s; }
.mx .st.is-on { opacity: 1; }
.mx .st b { width: 26px; height: 26px; border-radius: 50%; background: var(--yellow); color: #000; display: grid; place-items: center; font-size: 13px; flex: none; }
.mx .st span { display: flex; flex-direction: column; text-align: left; }
.mx .st em { font-style: normal; font-weight: 700; color: #000; font-size: 12.5px; }
.mx .st small { font-size: inherit; }
@media (max-width: 480px) { .mx .st small { display: none; } .mx .st { padding-right: 10px; } }
.mx .st:hover, .mx .st.is-hot { box-shadow: 0 0 0 2px var(--yellow), 0 10px 24px -12px rgba(0, 0, 0, .45); }
.mx .st::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: calc(18px + var(--lift, 0px)); background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.mx .st:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Schattenbild-Ebene (Vektor) + Messkreuz im 3D-Schattenbild + Lichtblitz beim Eintritt */
.mx__svg { position: absolute; inset: 0; z-index: 1; opacity: 0; pointer-events: none; }
.mx__svg svg { width: 100%; height: 100%; display: block; }
.mx__read { position: absolute; left: 0; top: 0; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.35; color: #000; background: rgba(240, 230, 0, .95); padding: 6px 9px; border-radius: 6px;
  white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s; }
.mx__read.is-on { opacity: 1; }
.mx__mumark { position: absolute; left: 0; top: 0; font-size: 17px; font-weight: 700; letter-spacing: .01em; color: #000; opacity: 0; transition: opacity .4s; white-space: nowrap; }
.mx__mumark.is-on { opacity: 1; }
.mx__xh { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .4s; }
.mx__xh i { position: absolute; background: #e3d600; }
.mx__xh i:first-child { left: 0; right: 0; top: var(--y); height: 1.6px; margin-top: -.8px; }
.mx__xh i:nth-child(2) { top: 0; bottom: 0; left: var(--x); width: 1.6px; margin-left: -.8px; }
.mx__xh span { position: absolute; left: var(--x); top: var(--y); transform: translate(-150px, -58px); font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.35; color: #000;
  background: rgba(240, 230, 0, .95); padding: 6px 9px; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx__flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: #f5f5f1; }

/* Stations-Karte (nach Antippen) */
.mx__card { position: absolute; z-index: 5; right: var(--gutter); bottom: clamp(92px, 12vh, 130px); width: min(380px, calc(100vw - 2 * var(--gutter))); padding: 22px 22px 20px;
  border-radius: 18px; color: #000; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, .5); animation: mx-pop .5s var(--ease-out); }
.mx__card[hidden] { display: none !important; }
@keyframes mx-pop { from { opacity: 0; transform: translateY(14px); } }
.mx__card h3 { margin: .4em 0 .3em; font-size: 26px; font-weight: 500; color: #000; }
.mx__card p { margin: 0 0 1em; color: #33363a; line-height: 1.5; font-size: 15px; }
.mx__link { font-weight: 700; color: #000; border-bottom: 2px solid var(--yellow); text-decoration: none; }
.mx__x { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #eef0f1; font-size: 20px; color: #000; cursor: pointer; }

/* Hochformat (Handy, iPad hochkant): Texte unten über die ganze Breite, kleinere Schrift */
@media (max-aspect-ratio: 4/5) {
  .mx__t, .mx__t--right { left: var(--gutter); right: auto; bottom: 84px; }
  .mx__t h1 { font-size: clamp(36px, 10vw, 54px); }
  .mx__t h2 { font-size: clamp(25px, 7vw, 38px); }
  .mx__t p { font-size: 15px; }
  .mx__what { font-size: 11px; }
  .mx__card { left: var(--gutter); right: var(--gutter); width: auto; bottom: 84px; }
}
@media (max-width: 480px) {
  .mx__t, .mx__t--right, .mx__card { bottom: 92px; }                /* frei vom »Nach oben«-Knopf */
  .mx__t:not(.mx__t--hero) { padding: 18px 18px 16px; }
  .mx__t--hero { bottom: 72px; }
  .mx__what { display: none; }
  .mx__t--hero p:not(.mx__hint) { font-size: 14.5px; line-height: 1.45; margin-bottom: 1em; }
  .mx__btns { gap: 8px; }
  .mx__btns .btn { margin: 0; padding: .72em 1.05em; font-size: 14.5px; }
  .mx__hint { font-size: 13px !important; margin-top: 1em !important; }
}

/* ------------------------------------------------------------------ ZOLLER Automation (zweiter Abschnitt, auto.js) */
.mx.au { height: 720vh; }
.au .mx__gl { opacity: 0; transition: opacity .9s; }
.au.is-ready .mx__gl { opacity: 1; }
.au__wait { position: absolute; z-index: 2; left: 50%; top: 46%; width: 160px; height: 2px; margin-left: -80px; background: rgba(0, 0, 0, .1); overflow: hidden; transition: opacity .4s; }
.au__wait i { position: absolute; inset: 0; width: 40%; background: var(--yellow); animation: au-wait 1.2s var(--ease-out) infinite; }
@keyframes au-wait { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.au.is-ready .au__wait, .au.is-fallback .au__wait { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.au.is-ready .au__wait i, .au.is-fallback .au__wait i, .au:not(.is-near) .au__wait i { animation-play-state: paused; }
.au__hud { position: absolute; left: var(--gutter); top: calc(var(--hdr) + 16px); z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.au__chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, .4); font-size: 12.5px; color: #33363a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.au__chip b { font-weight: 500; color: #000; }
.au__chip svg { width: 14px; height: 14px; color: #000; }
.au__chip--opt { opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .5s var(--ease-out); }
.au__chip--opt.is-on { opacity: 1; transform: none; }
.au .mx__labels .st b { background: #000; color: var(--yellow); }
.au.is-fallback .au__hud { display: none; }
@media (max-width: 700px) { .au__chip--opt { display: none; } .au__chip--opt.is-on { display: inline-flex; } }
