/*
 * Das Holzspalter-Menü: zwei Holzbohlen, dazwischen fährt ein Keil herunter
 * und spaltet sie auseinander. Zustand steuert allein die Klasse .is-open.
 */

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
}

.menu.is-open {
  pointer-events: auto;
  opacity: 1;
}

.menu__backdrop {
  position: absolute;
  inset: 0;
  background: var(--paper);
}

/* Bohlen ------------------------------------------------------------------ */

.menu__slab {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.28s;
}

.menu__slab--top {
  top: 0;
  background: repeating-linear-gradient(92deg, #2a1f16 0px, #35281c 3px, #2c2118 7px, #3a2c1e 11px, #291e15 14px);
  border-bottom: 3px solid #191308;
  box-shadow: inset 0 -40px 60px -30px #000;
  transform: translateY(0%);
}

.menu__slab--bottom {
  bottom: 0;
  background: repeating-linear-gradient(88deg, #2a1f16 0px, #35281c 3px, #2c2118 7px, #3a2c1e 11px, #291e15 14px);
  border-top: 3px solid #191308;
  box-shadow: inset 0 40px 60px -30px #000;
  transform: translateY(0%);
}

.menu.is-open .menu__slab--top    { transform: translateY(-102%); }
.menu.is-open .menu__slab--bottom { transform: translateY(102%); }

/* Gerissene Kanten */
.menu__tear {
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
}

.menu__tear--top {
  bottom: 0;
  background: linear-gradient(#0000, #12100c);
  clip-path: polygon(0 100%, 4% 30%, 9% 92%, 15% 20%, 22% 88%, 29% 34%, 36% 96%, 43% 26%, 51% 90%, 58% 18%, 65% 84%, 72% 30%, 79% 94%, 86% 22%, 93% 86%, 100% 40%, 100% 100%);
}

.menu__tear--bottom {
  top: 0;
  background: linear-gradient(#12100c, #0000);
  clip-path: polygon(0 0, 4% 70%, 9% 8%, 15% 80%, 22% 12%, 29% 66%, 36% 4%, 43% 74%, 51% 10%, 58% 82%, 65% 16%, 72% 70%, 79% 6%, 86% 78%, 93% 14%, 100% 60%, 100% 0);
}

/* Hydraulikkeil ----------------------------------------------------------- */

.menu__wedge {
  position: absolute;
  left: 50%;
  top: 0;
  width: 120px;
  margin-left: -60px;
  height: 52%;
  transform: translateY(-115%);
  transition: transform 0.42s cubic-bezier(0.7, 0, 0.84, 0);
  z-index: 3;
}

.menu.is-open .menu__wedge {
  transform: translateY(0%);
}

.menu__wedge-rod {
  position: absolute;
  top: 0;
  left: 40px;
  width: 40px;
  height: 78%;
  background: linear-gradient(90deg, #6c7076, #b9bec4 40%, #7d8288);
  border-left: 1px solid #40444a;
  border-right: 1px solid #40444a;
}

.menu__wedge-blade {
  position: absolute;
  top: 78%;
  left: 20px;
  width: 80px;
  height: 22%;
  background: linear-gradient(90deg, #55595f, #cfd4d9 45%, #6a6e74);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.menu__wedge-band {
  position: absolute;
  top: 12%;
  left: 34px;
  width: 52px;
  height: 10px;
  background: var(--green);
}

/* Navigation -------------------------------------------------------------- */

.menu__nav {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 8vw, 140px);
}

.menu__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--green-link);
  margin-bottom: 22px;
  opacity: 0;
  transition: opacity 0.4s 0.7s;
}

.menu.is-open .menu__eyebrow {
  opacity: 1;
}

.menu__item {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 9px 0;
  border-bottom: 2px dashed #d8d3c4;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.5s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu.is-open .menu__item {
  opacity: 1;
  transform: translateX(0);
}

/* Gestaffelter Einflug: 0,62 s + i · 0,07 s */
.menu.is-open .menu__item:nth-of-type(1) { transition-delay: 0.62s; }
.menu.is-open .menu__item:nth-of-type(2) { transition-delay: 0.69s; }
.menu.is-open .menu__item:nth-of-type(3) { transition-delay: 0.76s; }
.menu.is-open .menu__item:nth-of-type(4) { transition-delay: 0.83s; }
.menu.is-open .menu__item:nth-of-type(5) { transition-delay: 0.90s; }
.menu.is-open .menu__item:nth-of-type(6) { transition-delay: 0.97s; }
.menu.is-open .menu__item:nth-of-type(7) { transition-delay: 1.04s; }
.menu.is-open .menu__item:nth-of-type(8) { transition-delay: 1.11s; }

.menu__item:hover {
  color: var(--green-link);
}

.menu__item-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-3);
  width: 34px;
}

.menu__item-label {
  font-weight: 900;
  font-size: clamp(32px, 6vw, 72px);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 1.05;
}

.menu__item-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-3);
}

.menu__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 38px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  opacity: 0;
  transition: opacity 0.4s 1.1s;
}

.menu.is-open .menu__footer {
  opacity: 1;
}

.menu__close {
  position: absolute;
  top: 20px;
  right: 26px;
  z-index: 6;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  box-shadow: var(--shadow-hard-sm);
}

@media (max-width: 700px) {
  .menu__item-meta {
    display: none;
  }
}

/* Säge-Effekt ------------------------------------------------------------- */

.saw {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.saw__stage {
  position: relative;
  width: 200px;
  height: 124px;
}

.saw__bar {
  position: absolute;
  left: 0;
  top: 46px;
  width: 150px;
  height: 15px;
  background: var(--ink);
  border-radius: 4px;
}

.saw__motor {
  position: absolute;
  left: 2px;
  top: 28px;
  width: 40px;
  height: 52px;
  background: var(--green);
  border: 3px solid var(--ink-machine);
  border-radius: 6px;
}

.saw__vent {
  position: absolute;
  left: 7px;
  width: 20px;
  height: 3px;
  background: #14251b88;
  border-radius: 2px;
}

.saw__vent--1 { top: 8px; }
.saw__vent--2 { top: 15px; }

.saw__grip {
  position: absolute;
  left: -12px;
  top: 36px;
  width: 18px;
  height: 36px;
  border: 5px solid var(--ink);
  border-radius: 8px;
}

.saw__blade {
  position: absolute;
  left: 78px;
  top: -6px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: repeating-conic-gradient(#2a2d30 0deg 7deg, #b9bec4 7deg 14deg);
  animation: spin 0.28s linear infinite;
}

.saw__blade-plate {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: linear-gradient(135deg, #e3e7ea, #b9bec4 60%, #d7dbdf);
}

.saw__blade-hub {
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--ink-machine);
}

.cut-line {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--ink));
  transform-origin: left center;
  z-index: 109;
  pointer-events: none;
  opacity: 0;
}
