/* =========================================
   INDEX HEADER – FINAL CLEAN BLUE GLASS V2
========================================= */

.index-header {
  position: fixed;
  top: 16px;
  left: 0;
  width: 100%;
  z-index: 9998;
  pointer-events: auto;
  transition: top 0.32s ease;
}

.index-header .container {
  position: relative;
  pointer-events: auto;
}

.index-header-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 12px;
  pointer-events: auto;
}

/* =========================
   BASE
========================= */

.index-header-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.95rem 0 1rem;
  border-radius: 999px;
  background: rgba(10, 16, 28, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition:
    min-height 0.32s ease,
    padding 0.32s ease,
    background 0.32s ease,
    border-color 0.32s ease,
    box-shadow 0.32s ease,
    backdrop-filter 0.32s ease,
    -webkit-backdrop-filter 0.32s ease,
    transform 0.32s ease;
}

.index-header-brand,
.index-header-menu-btn,
.index-header-menu-btn span,
.index-header-cta {
  transition:
    color 0.28s ease,
    background 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    opacity 0.28s ease,
    transform 0.28s ease;
}

/* =========================
   TOP STATE
========================= */

.index-header-brand {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-accent) !important;
  font-style: italic;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.96;
  white-space: nowrap;
  text-shadow: 0 6px 18px rgba(7, 15, 34, 0.18);
}

.index-header-brand:hover {
  color: #ffffff;
  opacity: 0.9;
}

.index-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
  z-index: 2;
}

.index-header-cta {
  min-height: 40px;
  padding: 0 0.95rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
  box-shadow: 0 12px 24px rgba(13, 110, 253, 0.22);
}

.index-header-cta:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(13, 110, 253, 0.28);
}

.index-header-menu-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 10001;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  cursor: pointer;
}

.index-header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.index-header-menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.28s ease, background 0.28s ease;
}

.index-header-menu-btn.is-active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.index-header-menu-btn.is-active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* =========================
   SCROLLED STATE
========================= */

.index-header.scrolled {
  top: 10px;
}

.index-header.scrolled .index-header-inner {
  min-height: 54px;
  padding: 0 0.82rem 0 0.92rem;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: scale(0.985);
}

.index-header.scrolled .index-header-brand {
  color: #111827;
  opacity: 0.96;
}

.index-header.scrolled .index-header-menu-btn {
  width: 38px;
  height: 38px;
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.08);
}

.index-header.scrolled .index-header-menu-btn span {
  background: #111827;
}

.index-header.scrolled .index-header-cta {
  min-height: 36px;
  padding: 0 0.85rem;
  font-size: 0.86rem;
  box-shadow: 0 10px 22px rgba(13, 110, 253, 0.18);
}

/* =========================
   MENU OPEN STATE
========================= */

body.index-menu-open .index-header-inner {
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.index-menu-open .index-header-brand {
  color: #111827;
}

body.index-menu-open .index-header-menu-btn {
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.08);
}

body.index-menu-open .index-header-menu-btn span {
  background: #111827;
}

/* =========================
   BACKDROP
========================= */

.index-header-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9996;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 18%, rgba(13, 110, 253, 0.04), transparent 24%),
    radial-gradient(circle at 76% 74%, rgba(72, 120, 255, 0.05), transparent 26%),
    rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.index-header-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   PANEL
========================= */

.index-header-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(410px, 92vw);
  height: 100vh;
  z-index: 9997;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(.22, .61, .36, 1);
  pointer-events: none;
}

.index-header-panel.is-active {
  transform: translateX(0);
  pointer-events: auto;
}

.index-header-panel-inner {
  height: 100%;
  padding: 24px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.14) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    -18px 0 40px rgba(15, 23, 42, 0.08),
    inset 1px 0 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.index-header-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.index-header-panel-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.45);
}

/* optional falls noch im HTML */
.index-header-panel-close {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.18);
}

.index-header-panel-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
}

.index-header-panel-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.index-header-panel-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* =========================
   NAV
========================= */

.index-header-panel-nav {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.index-header-panel-nav a {
  position: relative;
  display: block;
  padding: 0.88rem 0.75rem 0.88rem 0.95rem;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(17, 24, 39, 0.88);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: transparent;
  opacity: 0;
  transform: translateX(18px);
  transition:
    background 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease,
    opacity 0.22s ease;
}

.index-header-panel.is-active .index-header-panel-nav a {
  animation: indexHeaderLinkIn 0.44s cubic-bezier(.22, 1, .36, 1) forwards;
}

.index-header-panel.is-active .index-header-panel-nav a:nth-child(1) { animation-delay: 0.04s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(2) { animation-delay: 0.08s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(3) { animation-delay: 0.12s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(4) { animation-delay: 0.16s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(5) { animation-delay: 0.20s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(6) { animation-delay: 0.24s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(7) { animation-delay: 0.28s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(8) { animation-delay: 0.32s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(9) { animation-delay: 0.36s; }
.index-header-panel.is-active .index-header-panel-nav a:nth-child(10) { animation-delay: 0.40s; }

@keyframes indexHeaderLinkIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.index-header-panel-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  width: 3px;
  height: 56%;
  border-radius: 999px;
  background: linear-gradient(180deg, #0d6efd, #0b5ed7);
  opacity: 0;
  transform: scaleY(0.6);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.index-header-panel-nav a:hover {
  background: rgba(13, 110, 253, 0.06);
  color: #111827;
  transform: translateX(4px);
  opacity: 1;
}

.index-header-panel-nav a.is-current {
  background: rgba(13, 110, 253, 0.08);
  color: #111827;
  font-weight: 800;
  opacity: 1;
}

.index-header-panel-nav a.is-current::before {
  opacity: 1;
  transform: scaleY(1);
}

/* =========================
   PKV HIGHLIGHT
========================= */

.index-header-panel-nav a.is-highlight {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.index-header-panel-nav a.is-highlight:not(.is-current) {
  opacity: 1;
}

.index-header-panel-nav a.is-highlight:not(.is-current)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff7a00, transparent);
  opacity: 0.9;
}

.index-header-panel-nav a:not(.is-highlight) {
  opacity: 0.68;
}

.index-header-panel-nav a:hover,
.index-header-panel-nav a.is-current {
  opacity: 1;
}

/* =========================
   CONTACT
========================= */

.index-header-panel-contact {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(17, 24, 39, 0.10);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.index-header-panel-contact a {
  color: rgba(17, 24, 39, 0.76);
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.5;
}

.index-header-panel-contact a:hover {
  color: #111827;
}

.index-header-panel-socials {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.45rem;
}

.index-header-panel-socials a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(17, 24, 39, 0.06);
  color: #0d6efd;
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.index-header-panel-socials a iconify-icon {
  font-size: 1.05rem;
}

.index-header-panel-socials a:hover {
  transform: translateY(-1px);
  background: rgba(13, 110, 253, 0.10);
  box-shadow:
    0 10px 20px rgba(13, 110, 253, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.40);
}

.index-header-panel-cta {
  margin-top: 0.55rem;
  min-height: 50px;
  padding: 0 1rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
  box-shadow: 0 12px 24px rgba(13, 110, 253, 0.18);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767.98px) {
  .index-header {
    top: 10px;
  }

  .index-header-shell {
    padding: 0 6px;
  }

  .index-header-inner {
    min-height: 56px;
    padding: 0 0.8rem 0 0.95rem;
    border-radius: 20px;
  }

  .index-header-brand {
    font-size: 1rem;
  }

  .index-header-cta {
    display: none !important;
  }

  .index-header-panel {
    width: 100vw;
  }

  .index-header-panel-inner {
    padding: 20px 16px 20px;
  }

  .index-header-panel-nav a {
    font-size: 0.98rem;
    padding: 0.84rem 0.68rem 0.84rem 0.88rem;
  }

  .index-header.scrolled .index-header-inner {
    min-height: 52px;
    padding: 0 0.78rem 0 0.88rem;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    transform: none;
  }

  .index-header.scrolled .index-header-menu-btn {
    width: 38px;
    height: 38px;
  }

  body.index-menu-open .index-header-inner {
    background: rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .index-header-panel-nav a.is-highlight:not(.is-current)::after {
    left: 12px;
    right: 12px;
    bottom: 7px;
    height: 2px;
  }

  .index-header-panel-nav a:not(.is-highlight) {
    opacity: 0.78;
  }
}
