/* ==========================================================================
   MOZILLA FIREFOX DEDICATED QUARANTINE OVERRIDES (firefox.css)
   Universal Golden Master (Chrome & Safari v=quad-v4108) remains 100% untouched.
   ========================================================================== */

/* 1. Menu Drawer: Unerwünschte Scrollleiste eliminieren & Hintergrund-Shift stoppen */
html.is-firefox .menu-overlay {
  overflow-y: hidden !important;
  overflow: hidden !important;
  scrollbar-width: none !important;
}

/* 2. Central Logo Eye Poke & Optical Recovery Fix for Mozilla Firefox (Gecko SVG Engine) */

/* A. Masken-Deckel & Balken Grundzustand */
html.is-firefox #eye-lid-left,
html.is-firefox #eye-lid-right,
html.is-firefox #menu-scrolled-eye-lid-left,
html.is-firefox #menu-scrolled-eye-lid-right,
html.is-firefox #hero-eye-bar-left rect,
html.is-firefox #hero-eye-bar-right rect,
html.is-firefox #menu-scrolled-eye-bar-left rect,
html.is-firefox #menu-scrolled-eye-bar-right rect {
  transform: none !important;
}

/* B. Gestochenes Auge: Direkte Verengung auf 8.5px Schlitzhöhe (zentriert bei y=1348.64px) */
/* Linkes Auge gestochen: */
html.is-firefox body.eye-poked-left #eye-lid-left,
html.is-firefox body.eye-poked-left #menu-scrolled-eye-lid-left,
html.is-firefox body.eye-poked-left #hero-eye-bar-left rect,
html.is-firefox body.eye-poked-left #menu-scrolled-eye-bar-left rect {
  height: 8.5px !important;
  y: 1348.64px !important;
  transform: none !important;
}

/* Rechtes Auge gestochen: */
html.is-firefox body.eye-poked-right #eye-lid-right,
html.is-firefox body.eye-poked-right #menu-scrolled-eye-lid-right,
html.is-firefox body.eye-poked-right #hero-eye-bar-right rect,
html.is-firefox body.eye-poked-right #menu-scrolled-eye-bar-right rect {
  height: 8.5px !important;
  y: 1348.64px !important;
  transform: none !important;
}

/* C. Schmerz-Zittern (Tremor) auf dem gestochenen Balken (ohne !important im Keyframe) */
@keyframes firefox-eye-tremor {
  0% { transform: translateY(-0.8px); }
  100% { transform: translateY(0.8px); }
}

html.is-firefox body.eye-poked-left #hero-eye-bar-left,
html.is-firefox body.eye-poked-left #menu-scrolled-eye-bar-left,
html.is-firefox body.eye-poked-right #hero-eye-bar-right,
html.is-firefox body.eye-poked-right #menu-scrolled-eye-bar-right {
  animation: firefox-eye-tremor 0.06s infinite alternate ease-in-out !important;
}

/* D. 4-Stufen Reinigungs-Zwinkern des Auges beim Loslassen (Optisches Wiedererfassen - 650ms) */
@keyframes firefox-eye-recovery-lid {
  0% { height: 8.5px; y: 1348.64px; }
  25% { height: 37px; y: 1334.39px; }       /* Stufe 1: Vorsichtiges Blinzeln */
  48% { height: 6px; y: 1349.89px; }        /* Stufe 2: Reinigender Lidschlag zu */
  72% { height: 82px; y: 1312px; }          /* Stufe 3: Weit aufreißen zum Scharfstellen */
  88% { height: 74px; y: 1315.89px; }       /* Einpendeln */
  100% { height: 77.0735px; y: 1314.35px; } /* Vollständig wiederhergestellt */
}

html.is-firefox #eye-lid-left.eye-recovering,
html.is-firefox #eye-lid-right.eye-recovering,
html.is-firefox #menu-scrolled-eye-lid-left.eye-recovering,
html.is-firefox #menu-scrolled-eye-lid-right.eye-recovering,
html.is-firefox #hero-eye-bar-left.eye-recovering rect,
html.is-firefox #hero-eye-bar-right.eye-recovering rect,
html.is-firefox #menu-scrolled-eye-bar-left.eye-recovering rect,
html.is-firefox #menu-scrolled-eye-bar-right.eye-recovering rect {
  transform: none !important;
  animation: firefox-eye-recovery-lid 0.65s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

/* E. Orientierungs-Schütteln (Saccade) der Pupille bei der Erholung (ohne Skalierungs-Offset) */
@keyframes firefox-eye-recovery-pupil {
  0% { opacity: 0; transform: translate(0px, 0px); }
  25% { opacity: 0.7; transform: translate(-8px, 0px); }    /* Schielt vorsichtig nach links */
  48% { opacity: 0; transform: translate(0px, 0px); }       /* Schließt kurz beim Lidschlag */
  68% { opacity: 1; transform: translate(16px, -2px); }     /* Saccade 1: zuckt nach rechts, sucht! */
  82% { opacity: 1; transform: translate(-10px, 1px); }     /* Saccade 2: zuckt nach links, gleicht ab! */
  92% { opacity: 1; transform: translate(3px, 0px); }       /* Feinjustierung */
  100% { opacity: 1; transform: translate(0px, 0px); }      /* Scharfgestellt & zentriert */
}

html.is-firefox #eye-pupil-left.pupil-recovering,
html.is-firefox #eye-pupil-right.pupil-recovering,
html.is-firefox #menu-scrolled-eye-pupil-left.pupil-recovering,
html.is-firefox #menu-scrolled-eye-pupil-right.pupil-recovering {
  animation: firefox-eye-recovery-pupil 0.65s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

/* F. Vergrößerte Schock-Pupille im unversehrten Nachbar-Auge (von Marcus bestätigt) */
html.is-firefox body.eye-poked-left #eye-pupil-right,
html.is-firefox body.eye-poked-left #menu-scrolled-eye-pupil-right {
  width: 44px !important;
  height: 44px !important;
  x: 2938.14px !important;
  y: 1330.89px !important;
  transform: translate(-79px, 0px) !important;
  opacity: 1 !important;
  transition: opacity 0.08s ease, transform 0.08s ease !important;
}

html.is-firefox body.eye-poked-right #eye-pupil-left,
html.is-firefox body.eye-poked-right #menu-scrolled-eye-pupil-left {
  width: 44px !important;
  height: 44px !important;
  x: 2610.58px !important;
  y: 1330.89px !important;
  transform: translate(60px, 0px) !important;
  opacity: 1 !important;
  transition: opacity 0.08s ease, transform 0.08s ease !important;
}

/* 3. Hero Intro Synchronization: Disable CSS transitions on logo parts during intro so rAF loop drives them in 100% lockstep */
html.is-firefox .hero-logo-svg-container .logo-part {
  transition: none !important;
}

/* 4. Zen Falling Sand & Meadow Canvas Hardware-Compositing */
html.is-firefox .zen-trail-canvas.is-falling,
html.is-firefox .zen-trail-fg-canvas.is-falling {
  will-change: transform !important;
  backface-visibility: hidden !important;
}




