/* ==========================================================
   Metallbau Bassauer – Effekte (gehört zu technik/effekte.js und technik/modell3d.js)
   Alles hier ist Zusatz: Wird diese Datei samt effekte.js aus den Seiten entfernt,
   sieht die Webseite wieder aus wie vorher.
   ========================================================== */

/* ---------- Weicher Seitenwechsel (Browser, die das können) ---------- */
@view-transition { navigation: auto; }
.kopf { view-transition-name: kopf; }
::view-transition-old(root) { animation: fx-raus .2s ease-in both; }
::view-transition-new(root) { animation: fx-rein .42s cubic-bezier(.2,.7,.2,1) both; }
@keyframes fx-raus { to { opacity: 0; transform: translateY(-10px); } }
@keyframes fx-rein { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Lese-Fortschritt oben: glühende Linie ---------- */
.fx-fortschritt { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 130; pointer-events: none; overflow: hidden; }
.fx-fortschritt b {
  position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, var(--rot-tief), var(--rot-hell) 82%, #ffd9a0 97%, #fff);
  box-shadow: 0 0 12px rgba(232,70,58,.7);
}

/* ---------- Knopf "nach oben" mit Fortschritts-Ring ---------- */
.fx-hoch {
  position: fixed; right: 22px; bottom: 22px; z-index: 140; width: 54px; height: 54px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(19,21,24,.9); color: #fff; cursor: pointer; display: grid; place-items: center;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 28px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .35s, transform .35s cubic-bezier(.2,.7,.2,1), background .25s;
}
.fx-hoch.da { opacity: 1; transform: none; pointer-events: auto; }
.fx-hoch:hover { background: var(--rot); }
.fx-hoch .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.fx-hoch circle { fill: none; stroke-width: 2.5; }
.fx-hoch .bahn { stroke: rgba(255,255,255,.16); }
.fx-hoch .wert { stroke: var(--rot-hell); stroke-linecap: round; }
.fx-hoch:hover .wert { stroke: #fff; }
.fx-hoch .pfeil { width: 20px; height: 20px; position: relative; }

/* ---------- Maßlinie unter den Überschriften (wie auf einer Werkstattzeichnung) ---------- */
.fx-mass {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px auto 0; height: 14px;
  width: var(--w, 180px); max-width: 100%; color: #9a9fa8;
  font: 500 .68rem/1 Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', monospace; letter-spacing: .1em;
}
.fx-mass i { position: relative; flex: 1; height: 1px; background: currentColor; transform: scaleX(0); transition: transform 1s cubic-bezier(.2,.7,.2,1) .15s; }
.fx-mass i:first-child { transform-origin: 100% 50%; }
.fx-mass i:last-child { transform-origin: 0 50%; }
.fx-mass i::before { content: ''; position: absolute; top: -6px; width: 1px; height: 13px; background: currentColor; }          /* Maßhilfslinie */
.fx-mass i::after { content: ''; position: absolute; top: -3px; border: 3.5px solid transparent; }                              /* Maßpfeil */
.fx-mass i:first-child::before { left: 0; } .fx-mass i:last-child::before { right: 0; }
.fx-mass i:first-child::after { left: 0; border-left: 0; border-right: 8px solid var(--rot); }
.fx-mass i:last-child::after { right: 0; border-right: 0; border-left: 8px solid var(--rot); }
.fx-mass b { color: var(--rot); font-weight: 600; opacity: 0; transition: opacity .5s .2s; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-mass.da i { transform: scaleX(1); }
.fx-mass.da b { opacity: 1; }
.dunkel .fx-mass { color: #6f757e; }
.dunkel .fx-mass b { color: var(--rot-hell); }
.fx-zahl { font-variant-numeric: tabular-nums; font-weight: inherit; }

/* ---------- Karten: Lichtkante, die der Maus folgt ---------- */
.fx-licht { position: relative; }
.fx-licht::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(232,70,58,.95), rgba(232,70,58,0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.fx-licht:hover::after { opacity: 1; }

/* ---------- Foto-Kacheln: neigen sich zur Maus, Glanz und Zeichnungs-Ecken ---------- */
.fx-kippen { will-change: transform; transition: transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.fx-kippen.aktiv { transition: transform .09s linear, box-shadow .4s; box-shadow: var(--schatten-gross); }
.fx-glanz { position: absolute; inset: 0; z-index: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .35s; }
.fx-kippen.aktiv .fx-glanz { opacity: 1; }
.kachel::after {
  content: ''; position: absolute; inset: 8px; pointer-events: none; opacity: 0; transform: scale(1.06);
  transition: opacity .35s, transform .5s cubic-bezier(.2,.7,.2,1);
  background:
    linear-gradient(#fff, #fff) 0 0 / 14px 1.5px, linear-gradient(#fff, #fff) 0 0 / 1.5px 14px,
    linear-gradient(#fff, #fff) 100% 0 / 14px 1.5px, linear-gradient(#fff, #fff) 100% 0 / 1.5px 14px,
    linear-gradient(#fff, #fff) 0 100% / 14px 1.5px, linear-gradient(#fff, #fff) 0 100% / 1.5px 14px,
    linear-gradient(#fff, #fff) 100% 100% / 14px 1.5px, linear-gradient(#fff, #fff) 100% 100% / 1.5px 14px;
  background-repeat: no-repeat;
}
.kachel:hover::after { opacity: .85; transform: none; }

/* ---------- Rote Knöpfe: Lichtreflex beim Überfahren ---------- */
.knopf.voll { position: relative; overflow: hidden; }
.knopf.voll::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
}
.knopf.voll:hover::after { left: 130%; transition: left .7s cubic-bezier(.2,.7,.2,1); }

/* ---------- Menü: Strich fährt beim Überfahren aus ---------- */
@media (min-width: 901px) {
  .menue li:not(.menue-anfrage) a::before {
    content: ''; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 1.5px; background: rgba(255,255,255,.55);
    transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s cubic-bezier(.2,.7,.2,1);
  }
  .menue li:not(.menue-anfrage) a:hover::before { transform: scaleX(1); }
  .menue a.aktiv::before { display: none; }
}

/* ---------- Dunkle Abschnitte: Zeichenraster, das im Licht der Maus aufleuchtet ---------- */
.abschnitt.dunkel:not(.konf-abschnitt) { position: relative; overflow: hidden; }
.abschnitt.dunkel:not(.konf-abschnitt)::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  -webkit-mask-image: radial-gradient(560px circle at var(--sx, 50%) var(--sy, 0%), #000 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.12) 100%);
  mask-image: radial-gradient(560px circle at var(--sx, 50%) var(--sy, 0%), #000 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.12) 100%);
}
.abschnitt.dunkel:not(.konf-abschnitt)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(460px circle at var(--sx, 50%) var(--sy, 0%), rgba(207,42,31,.13), transparent 70%);
}
.abschnitt.dunkel:not(.konf-abschnitt) > .container { position: relative; z-index: 1; }

/* ---------- Ablauf: Schweißnaht verbindet die Schritte ---------- */
.fx-ablauf { position: relative; padding-top: 54px; }
.fx-naht { position: absolute; left: 0; top: 0; width: 100%; height: 54px; pointer-events: none; }
.fx-ablauf > div::before { transition: color .6s; }
.fx-ablauf > div.fx-an::before { color: rgba(207,42,31,.2); }
.fx-ablauf > div svg { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.fx-ablauf > div.fx-an svg { animation: fx-puls .6s cubic-bezier(.2,.8,.2,1); }
@keyframes fx-puls { 40% { transform: scale(1.28); } }
@media (max-width: 960px) { .fx-ablauf { padding-top: 0; } .fx-naht { display: none; } }

/* ---------- Bildband: Funkenregen ---------- */
.bildband > canvas.fx-funken { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bildband { overflow: hidden; }

/* ---------- Fotos: werden von einem Laserstrahl "freigeschnitten" ---------- */
.fx-laser { display: block; position: relative; }
.fx-laser > img { clip-path: inset(0 0 0 0); transition: clip-path 1.25s cubic-bezier(.6,.05,.2,1); }
.fx-laser.fx-vor > img { clip-path: inset(0 100% 0 0); }
.fx-laser.fx-fertig > img { clip-path: none; }
.fx-laser::after {
  content: ''; position: absolute; top: -2%; bottom: -2%; left: 0; width: 2px; background: #ff7a5c; opacity: 0; pointer-events: none;
  box-shadow: 0 0 14px 3px rgba(255,90,60,.85), 0 0 44px 10px rgba(255,90,60,.35);
}
.fx-laser.fx-lauf::after { animation: fx-laser 1.25s cubic-bezier(.6,.05,.2,1) both; }
@keyframes fx-laser { 0% { left: 0; opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* ---------- Galerie: Bilder kommen nacheinander ---------- */
.fx-gal > a { opacity: 0; transform: translateY(20px) scale(.96); transition: opacity .6s, transform .7s cubic-bezier(.2,.7,.2,1); }
.fx-gal > a.fx-da { opacity: 1; transform: none; }
.grossansicht.offen img { animation: fx-zoom .4s cubic-bezier(.2,.8,.2,1); }
@keyframes fx-zoom { from { transform: scale(.93); opacity: 0; } }

/* ---------- Titel: Wörter fahren einzeln hoch ---------- */
.fx-wort { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.fx-wort > span { display: inline-block; transform: translateY(112%); transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.fx-los .fx-wort > span { transform: none; }

/* ---------- Laufband mit den Leistungen (Startseite) ---------- */
.fx-band {
  position: relative; overflow: hidden; background: var(--dunkel); padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.07); border-bottom: 1px solid rgba(255,255,255,.07);
}
.fx-band::before, .fx-band::after { content: ''; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.fx-band::before { left: 0; background: linear-gradient(90deg, var(--dunkel), transparent); }
.fx-band::after { right: 0; background: linear-gradient(270deg, var(--dunkel), transparent); }
.fx-band-spur { display: flex; align-items: center; width: max-content; will-change: transform; }
.fx-band-spur span {
  font-weight: 700; font-size: clamp(1.5rem, 3.6vw, 2.7rem); line-height: 1.1; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap;
  padding: 0 .55em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.5);
}
.fx-band-spur span:nth-of-type(3n+1) { color: #fff; -webkit-text-stroke: 0; }
.fx-band-spur i { flex: none; width: 10px; height: 10px; background: var(--rot-hell); transform: rotate(45deg); }

/* ---------- Fußzeile: großer Schriftzug als Stahl-Umriss ---------- */
.fuss { overflow: hidden; }
.fx-wasser {
  margin: 44px 0 0; text-align: center; font-weight: 700; font-size: clamp(3.4rem, 17.5vw, 15.5rem); line-height: .8; letter-spacing: -.03em;
  white-space: nowrap; user-select: none; pointer-events: none; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.09);
  background: linear-gradient(100deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.2) 50%, rgba(255,255,255,0) 58%) 120% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; animation: fx-schimmer 8s linear infinite;
}
@keyframes fx-schimmer { to { background-position: -120% 0; } }

/* ---------- 3D-Planung (Startseite, technik/modell3d.js) ---------- */
.fx-modell { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 52px; align-items: center; }
.fx-modell h2 { margin-bottom: .5em; }
.fx-modell-buehne {
  position: relative; aspect-ratio: 1.16; border-radius: var(--radius); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none;
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 70px rgba(0,0,0,.45);
  background: radial-gradient(110% 80% at 50% 100%, rgba(207,42,31,.14), transparent 62%), linear-gradient(180deg, #14171b, #0c0d10);
}
.fx-modell-buehne.zieht { cursor: grabbing; }
.fx-modell-buehne canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fx-hud {
  position: absolute; pointer-events: none; color: rgba(255,255,255,.55); text-transform: uppercase;
  font: 500 .64rem/1.6 Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', monospace; letter-spacing: .1em;
}
.fx-hud b { color: #ff8a80; font-weight: 600; }
.fx-hud.ol { left: 14px; top: 11px; } .fx-hud.or { right: 14px; top: 11px; text-align: right; }
.fx-hud.ul { left: 14px; bottom: 10px; } .fx-hud.ur { right: 14px; bottom: 10px; text-align: right; }
.fx-modell-buehne::before, .fx-modell-buehne::after {                                  /* Ecken wie im CAD-Fenster */
  content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none; z-index: 1; border: 1.5px solid rgba(255,255,255,.35);
}
.fx-modell-buehne::before { left: 6px; top: 6px; border-right: 0; border-bottom: 0; }
.fx-modell-buehne::after { right: 6px; bottom: 6px; border-left: 0; border-top: 0; }
.fx-modell-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 26px; }
.fx-modell-knoepfe button {
  font: inherit; font-weight: 600; font-size: .86rem; line-height: 1.2; padding: 9px 17px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.3); background: transparent; color: #fff; transition: background .25s, border-color .25s;
}
.fx-modell-knoepfe button:hover { border-color: #fff; }
.fx-modell-knoepfe button[aria-pressed="true"] { background: var(--rot); border-color: var(--rot); }
.fx-stueck { width: 100%; border-collapse: collapse; font-size: .86rem; line-height: 1.4; }
.fx-stueck caption {
  text-align: left; padding: 0 10px 8px; color: #8d939c; text-transform: uppercase;
  font: 600 .66rem/1 Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', monospace; letter-spacing: .14em;
}
.fx-stueck th {
  text-align: left; padding: 7px 10px; color: #8d939c; border-top: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16);
  font: 600 .64rem/1 Consolas, 'SF Mono', Menlo, 'DejaVu Sans Mono', monospace; letter-spacing: .12em; text-transform: uppercase;
}
.fx-stueck td { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,.07); color: #b9bdc4; transition: color .2s; }
.fx-stueck td:first-child, .fx-stueck td:last-child, .fx-stueck th:last-child { font-family: Consolas, 'SF Mono', Menlo, monospace; }
.fx-stueck td:last-child, .fx-stueck th:last-child { text-align: right; }
.fx-stueck td:first-child { color: #ff8a80; }
.fx-stueck tbody tr { transition: background .2s; cursor: default; }
.fx-stueck tbody tr.an { background: rgba(232,70,58,.16); }
.fx-stueck tbody tr.an td { color: #fff; }
@media (max-width: 960px) { .fx-modell { grid-template-columns: 1fr; gap: 30px; } }
@media (max-width: 460px) { .fx-stueck th:nth-child(3), .fx-stueck td:nth-child(3) { display: none; } }

/* ---------- Wer weniger Bewegung möchte, bekommt Ruhe ---------- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .fx-wasser { animation: none; }
  .fx-mass i, .fx-mass b, .fx-gal > a, .fx-wort > span, .fx-laser > img { transition: none; }
  .knopf.voll::after { display: none; }
}
