/* ----------------------------------------------------------
   GLOBAL
   ---------------------------------------------------------- */
body {
    color: green;
    position: relative;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Share Tech Mono', monospace;
    -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------------------------
   FONTS
   ---------------------------------------------------------- */
@font-face {
  font-family: "Orbitron";
  src: url("../fonts/Orbitron/Orbitron-VariableFont_wght.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url("../fonts/Orbitron/Orbitron-VariableFont_wght.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Share Tech Mono";
  src: url("../fonts/Share_Tech_Mono/ShareTechMono-Regular.ttfm") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------
   COUNTER
   ---------------------------------------------------------- */
.scifi-counter .frame {
  padding: 9px 15px;
  border: 1px solid green;
  box-shadow: 0 0 8px 2px green;
  text-align: center;
  border-radius: 8px;
  position: absolute;
  bottom: 100px;
  left: 40px;
  z-index: 50;
}

#counter {
  font-size: 24px;
  color: green;
  letter-spacing: 4px;
}

.label {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 3px;
  color: green;
}

.frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: green;
  animation: scan 3s linear infinite;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ----------------------------------------------------------
   HEADINGS
   ---------------------------------------------------------- */
h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
}

h1 {
    font-size: 40px;
    margin-top: 160px;
    margin-bottom: 20px;
    margin-left: 40px;
}

h2 {
    font-size: 30px;
    margin-bottom: 20px;
    margin-left: 40px;
}

h3 {
    font-size: 20px;
    margin-bottom: 20px;
    margin-left: 40px;
}

/* ----------------------------------------------------------
   BACKGROUND
   ---------------------------------------------------------- */
.background-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../img/Leiterbahn.png");
  background-size: cover;
  background-repeat: repeat;

  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20%,
    black 80%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20%,
    black 80%,
    transparent 100%
  );

  will-change: transform;
  transform: translateZ(0);
  pointer-events: none;
}

/* ----------------------------------------------------------
   MENU STACK
   ---------------------------------------------------------- */
.menu {
    overscroll-behavior: contain;
    position: relative;
    width: 220px;
    margin-top: 100px;
    margin-left: 10px;
    z-index: 100; /* Menü immer oben */
}

.menu-button {
    position: absolute;
    left: 40px;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 12px;
    text-decoration: none;
    color: green;

    border: 2px solid green;
    border-radius: 8px;

    opacity: 0;
    transform: translateY(40px) scale(0.9);
    z-index: 0;

    transition:
        transform 0.15s cubic-bezier(.4,0,.2,1),
        opacity 0.15s linear,
        box-shadow 0.15s linear;

    pointer-events: auto; /* WICHTIG: Buttons klickbar */
}

.menu-button.active {
    opacity: 1;
    transform: translateY(0) scale(1.1);
    z-index: 3;
    box-shadow: 0 0 8px 2px green;
}

.menu-button.behind {
    opacity: 0.4;
    transform: translateY(55px) scale(0.88);
    z-index: 1;
}

/* ----------------------------------------------------------
   FOOTER
   ---------------------------------------------------------- */
.site-footer {
    margin-top: 120vh;
    padding: 40px;
    text-align: left;
    font-family: 'Share Tech Mono', monospace;
    color: green;
    background: none;
}

/* ----------------------------------------------------------
   MOBILE FIXES
   ---------------------------------------------------------- */
@media (max-width: 600px) {
  h1 { font-size: 26px; margin-left: 20px; margin-top: 120px; }
  h2 { font-size: 20px; margin-left: 20px; }
  h3 { font-size: 16px; margin-left: 20px; }

  .menu {
    margin-left: 0;
    width: 180px;
  }

  .menu-button {
    left: 20px;
    padding: 10px;
    font-size: 16px;
  }

  .scifi-counter .frame {
    bottom: 20px;
    right: 20px;
    transform: scale(0.8);
  }
}
