/* Automatisch erzeugt aus call-me-human-kommunikation/public/css/style.css
   durch tools/startseite/kopfzeile-einsetzen.js. Nicht von Hand ändern. */

/* ===== Kopfzeile mit Menü (Entwurf 3b: Symbole mittig, Flagge rechts) ===== */

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: 12px clamp(1rem, 3vw, 2.25rem) 16px;
  background: transparent; /* kein schwarzer Balken, Menü steht direkt im Sternenhimmel (Marko 2026-10-23) */
}

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.25rem);
}

.site-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--color-text);
  text-shadow: 2px 2px 0 var(--color-bg-deep);
}

.nav-icon {
  width: 36px;
  height: auto;
  flex: none;
  filter: drop-shadow(2px 2px 0 rgba(12, 5, 4, 0.8));
}

/* goldener Pixel-Unterstrich, erscheint nur farblich (keine Bewegung) */
.site-menu a::after {
  content: "";
  position: absolute;
  left: 46px;
  right: 0;
  bottom: 0;
  height: 4px;
  background: transparent;
  box-shadow: 2px 2px 0 transparent;
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  color: var(--color-primary-light);
}

.site-menu a:hover::after,
.site-menu a[aria-current="page"]::after {
  background: var(--color-primary);
  box-shadow: 2px 2px 0 var(--color-bg-deep);
}

.lang-switch {
  position: absolute;
  right: clamp(1rem, 3vw, 2.25rem);
  /* Kopfzeilen-Polster 12/16 px und Link-Polster 8/10 px: Symbolmitte liegt 3 px über der Kopfzeilenmitte */
  top: calc(50% - 3px);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.lang-switch svg {
  /* Runde Pixel-Flagge 11x11, je Spielpixel 3px wie die Menü-Symbole, Rand ist im Bild */
  width: 33px;
  height: 33px;
  margin-right: 1px; /* ungerade Breite in 44er-Box: hält die Flagge auf ganzen Pixeln */
  display: block;
  filter: drop-shadow(2px 2px 0 rgba(12, 5, 4, 0.8));
}

/* Pixel-Menüknopf (nur auf schmalen Bildschirmen) */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--color-surface);
  clip-path: polygon(
    0 4px, 4px 4px, 4px 0,
    calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%,
    4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)
  );
  box-shadow:
    inset 0 0 0 2px var(--frame-dark),
    inset 0 0 0 4px var(--frame-light),
    inset 0 0 0 6px var(--frame-dark);
}

.menu-toggle:hover {
  background: var(--frame-dark);
}

.menu-toggle svg {
  display: block;
}

@media (max-width: 1023px) {
  .site-header {
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
  }

  .lang-switch {
    position: static;
    transform: none;
  }

  .lang-switch svg {
    margin-bottom: 1px; /* ganze Pixel auch senkrecht */
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-menu {
    display: none;
  }

  .site-header.is-open .site-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 6px 20px 10px;
    background: rgba(20, 9, 6, 0.96);
    border-top: 4px solid var(--frame-light);
    border-bottom: 4px solid var(--frame-light);
    box-shadow: 0 4px 0 var(--frame-dark), 0 -4px 0 var(--frame-dark);
  }

  .site-header.is-open .site-menu a {
    padding: 14px 4px;
    font-size: 1.3rem;
    gap: 14px;
  }

  .site-header.is-open .site-menu a + a {
    border-top: 2px solid rgba(224, 162, 74, 0.2);
  }

  .site-header.is-open .site-menu a::after {
    display: none;
  }

  .site-header.is-open .site-menu a[aria-current="page"] {
    color: var(--color-primary-light);
  }
}

/* Startseite: Kopfzeile liegt über dem Startbild */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}
