/* ==========================================================================
   KOBIL — Header / Hauptnavigation (sticky, full-bleed)
   Figma: header/desktop, instance "product" (1440x120)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--navy-20);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-stuck {
  box-shadow: 0 8px 24px rgba(17, 36, 74, 0.08);
}

/* --------------------------------------------------------------------------
   Announcement bar (40px, border-bottom navy-40)
   -------------------------------------------------------------------------- */

.site-header__announce {
  border-bottom: 1px solid var(--navy-40);
}

.site-header__announce-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 39px; /* 40px incl. border */
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.site-header__announce-spacer {
  flex: 1 0 0;
  min-width: 1px;
}

.site-header__announce-msg {
  display: flex;
  flex: 1 0 0;
  min-width: 1px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  white-space: nowrap;
}

.site-header__announce-headline {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--navy-80);
}

.site-header__announce-new {
  background: linear-gradient(
    90deg,
    #3ebffc 13.354%,
    #2962f6 32.357%,
    #696ef5 59.145%,
    #ca80f4 84.827%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.site-header__announce-link {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--blue);
  text-decoration: underline;
  text-underline-position: from-font;
  transition: color var(--dur) var(--ease);
}

.site-header__announce-link:hover {
  color: #1e4fd6;
}

/* ---- Language selector ---- */

.site-header__lang {
  position: relative;
  display: flex;
  flex: 1 0 0;
  min-width: 1px;
  justify-content: flex-end;
}

.site-header__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--navy-70);
  transition: color var(--dur) var(--ease);
}

.site-header__lang-btn:hover {
  color: var(--navy);
}

.site-header__lang-chev {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease);
}

.site-header__lang.is-open .site-header__lang-chev {
  transform: rotate(180deg);
}

.site-header__lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  min-width: 132px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--navy-40);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(17, 36, 74, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s var(--ease);
}

.site-header__lang.is-open .site-header__lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.site-header__lang-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  color: var(--navy);
  transition: background-color 0.2s var(--ease);
}

.site-header__lang-option:hover {
  background: var(--navy-20);
}

.site-header__lang-option.is-active {
  font-weight: 600;
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Main bar (80px)
   -------------------------------------------------------------------------- */

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 20px var(--page-pad);
}

/* ---- Logo (SVG ragt 8px über die 30px-Box hinaus, wie in Figma) ---- */

.site-header__logo {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  width: 150px;
  height: 30px;
}

.site-header__logo img {
  width: 150px;
  height: 38px;
  max-width: none;
}

/* ---- Menu ---- */

.site-header__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header__item {
  position: relative;
}

.site-header__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--navy);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.site-header__link:hover {
  color: var(--blue);
}

.site-header__chev {
  flex: 0 0 auto;
  transition: transform 0.2s var(--ease);
}

/* Label-Span reserviert die Breite des Semibold-Zustands (kein Nav-Jiggle) */

.site-header__link-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.site-header__link-label::after {
  content: attr(data-label);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 600;
  pointer-events: none;
}

/* Offen bzw. aktiver Bereich (/products/*) — Figma: Menu/Products, blau + semibold */

.site-header__item.is-open > .site-header__link,
.site-header__item.is-active > .site-header__link {
  color: var(--blue);
  font-weight: 600;
}

.site-header__mobile-item.is-active > .site-header__mobile-link {
  color: var(--blue);
}

/* ---- Dropdowns ---- */

.site-header__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 20;
  padding-top: 10px; /* Hover-Brücke */
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s var(--ease);
}

.site-header__item.is-open > .site-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.site-header__dropdown-panel {
  min-width: 240px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--navy-40);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(17, 36, 74, 0.12);
}

.site-header__dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--navy);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.site-header__dropdown-link:hover {
  background: var(--navy-20);
  color: var(--blue);
}

.site-header__dropdown-link[aria-disabled="true"] {
  cursor: default;
}

/* --------------------------------------------------------------------------
   Mega-Menü "Products" (Figma: Menu/Products → dropdownmenu/products)
   Panel ist im Viewport zentriert, 4px unter der Header-Bar.
   -------------------------------------------------------------------------- */

.site-header__item--mega {
  position: static; /* Dropdown positioniert sich am .site-header */
}

.site-header__dropdown--mega {
  top: 100%;
  left: 50%;
  margin-top: -30px; /* Hover-Brücke: Hitbox beginnt oberhalb der Bar-Unterkante */
  padding-top: 34px; /* … sichtbar bleiben trotzdem nur 4px Abstand */
}

/* Abdunkelung des Seiteninhalts (Figma: rgba(17,36,74,0.05) unterhalb des Headers) */

.site-header__dropdown--mega::before {
  content: "";
  position: fixed;
  top: 120px;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(17, 36, 74, 0.05);
  pointer-events: none;
}

.site-header__mega {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding: 40px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 6px rgba(17, 36, 74, 0.12);
}

/* ---- Linke Spalte: Produktliste ---- */

.site-header__mega-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 190px;
}

.site-header__mega-title {
  padding-left: 12px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--navy);
}

.site-header__mega-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-header__mega-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--navy);
  white-space: nowrap;
  transition: background-color 0.2s var(--ease);
}

.site-header__mega-link:hover,
.site-header__mega-link:focus-visible {
  background: var(--navy-20);
}

/* "Soon…"-Pill neben AI Trust (Gradient-Text wie Announcement "New!") */

.site-header__mega-soon {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 32px;
  background: var(--navy-20);
  transition: background-color 0.2s var(--ease);
}

.site-header__mega-link:hover .site-header__mega-soon,
.site-header__mega-link:focus-visible .site-header__mega-soon {
  background: var(--white);
}

.site-header__mega-soon-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  background: linear-gradient(
    90deg,
    #3ebffc 13.354%,
    #2962f6 32.357%,
    #696ef5 59.145%,
    #ca80f4 84.827%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ---- Rechte Spalte: Feature-Karte ---- */

.site-header__mega-feature {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 270px;
}

.site-header__mega-img {
  display: block;
  width: 270px;
  height: 188px;
  border-radius: 8px;
  object-fit: cover;
}

.site-header__mega-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-header__mega-eyebrow {
  margin-bottom: 4px; /* Figma: 8px zum Titel, 4px Titel → Beschreibung */
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  color: var(--navy);
}

.site-header__mega-feature-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--navy);
}

.site-header__mega-feature-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--navy-70);
}

.site-header__mega-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  color: var(--blue);
}

.site-header__mega-more img {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease);
}

.site-header__mega-more:hover img {
  transform: translateX(3px);
}

.site-header__mega-more[aria-disabled="true"] {
  cursor: default;
}

/* --------------------------------------------------------------------------
   Mega-Menü "Solutions" (Figma: Menu/Solution → dropdownmenu/solutions)
   Gleiches Panel wie Products; Abweichungen lt. Figma: Titel 16/23 SemiBold,
   Feature-Bild mit 12px-Radius.
   -------------------------------------------------------------------------- */

.site-header__mega--solutions .site-header__mega-title {
  font-size: 16px;
  line-height: 23px;
}

.site-header__mega--solutions .site-header__mega-img {
  border-radius: 12px;
}

/* --------------------------------------------------------------------------
   Mega-Menü "Industries" (Figma: Menu/Industries → dropdownmenu/solutions,
   node 16513:18331). Vier Karten nebeneinander: Kachel + Titel + Beschreibung.
   Hover legt eine #F9FAFD-Fläche (System/%10) um die ganze Karte.
   -------------------------------------------------------------------------- */

.site-header__mega--industries {
  gap: 4px;
}

.site-header__industry {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Figma Ruhezustand (Karten 2–4); Hover-Karte zeigt 16px, konstant gehalten gegen Layout-Sprung */
  width: 212px;
  padding: 6px 6px 16px;
  border-radius: 12px;
  transition: background-color 0.2s var(--ease);
}

.site-header__industry:hover,
.site-header__industry:focus-visible {
  background: #f9fafd;
}

.site-header__industry-tile {
  display: block;
  width: 200px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
}

.site-header__industry-tile img {
  display: block;
  width: 200px;
  height: 180px;
  object-fit: cover;
}

.site-header__industry-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 12px;
}

.site-header__industry-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--navy);
}

.site-header__industry-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--navy-80);
}

/* ---- Actions: CTA + Burger ---- */

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* CTA "Book a demo" — Navy-Form mit abgeschrägter Ecke (Figma-Shape als Maske) */

.site-header__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 4px 20px 4px 16px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  color: var(--white);
  white-space: nowrap;
}

.site-header__cta-bg {
  position: absolute;
  inset: 0;
  background: var(--navy);
  border-radius: 4px;
  -webkit-mask-image: url("/assets/header/btn-bg-left.svg"),
    url("/assets/header/btn-bg-right.svg");
  -webkit-mask-position: left center, right center;
  -webkit-mask-size: calc(100% - 40px) 100%, 67px 100%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-image: url("/assets/header/btn-bg-left.svg"),
    url("/assets/header/btn-bg-right.svg");
  mask-position: left center, right center;
  mask-size: calc(100% - 40px) 100%, 67px 100%;
  mask-repeat: no-repeat, no-repeat;
  transition: background-color var(--dur) var(--ease);
}

.site-header__cta-label,
.site-header__cta-icon {
  position: relative;
}

.site-header__cta-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--dur) var(--ease);
}

.site-header__cta:hover .site-header__cta-bg {
  background: #1a3164;
}

.site-header__cta:hover .site-header__cta-icon {
  transform: translateX(3px);
}

.site-header__cta:active {
  transform: translateY(1px);
}

.site-header__cta--full {
  width: 100%;
  justify-content: center;
}

/* ---- Burger (nur < 1024px) ----
   Figma header/mobile (3577:34200): 40x40-Button, Radius 4, icon/line "menu"
   22px → drei Linien 17x2 im Abstand 5.5px (Lücke 3.5px). */

.site-header__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.site-header__burger-line {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.site-header__burger[aria-expanded="true"] .site-header__burger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.site-header__burger[aria-expanded="true"] .site-header__burger-line:nth-child(2) {
  opacity: 0;
}

.site-header__burger[aria-expanded="true"] .site-header__burger-line:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Mobile slide-in panel
   -------------------------------------------------------------------------- */

.site-header__mobile {
  position: fixed;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.32s var(--ease);
  /* Geparktes Panel (translateX(105%)) darf keine Scrollbreite erzeugen */
  overflow: hidden;
}

.site-header__mobile.is-open {
  visibility: visible;
  pointer-events: auto;
}

.site-header__mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 36, 74, 0.44);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

.site-header__mobile.is-open .site-header__mobile-backdrop {
  opacity: 1;
}

.site-header__mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100% - 48px));
  padding: 16px 24px 24px;
  background: var(--white);
  box-shadow: -16px 0 48px rgba(17, 36, 74, 0.18);
  transform: translateX(105%);
  transition: transform 0.32s var(--ease);
  overflow-y: auto;
}

.site-header__mobile.is-open .site-header__mobile-panel {
  transform: none;
}

.site-header__mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--navy-40);
}

.site-header__mobile-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--navy-70);
}

.site-header__mobile-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -10px;
  border-radius: 8px;
  color: var(--navy);
  transition: background-color 0.2s var(--ease);
}

.site-header__mobile-close:hover {
  background: var(--navy-20);
}

.site-header__mobile-nav {
  flex: 1 0 auto;
  padding: 8px 0 24px;
}

.site-header__mobile-item {
  border-bottom: 1px solid var(--navy-30);
}

.site-header__mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 15px 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 23px;
  text-align: left;
  color: var(--navy);
  transition: color 0.2s var(--ease);
}

.site-header__mobile-link:hover {
  color: var(--blue);
}

.site-header__mobile-item.is-open > .site-header__mobile-link {
  color: var(--blue);
}

.site-header__mobile-item.is-open > .site-header__mobile-link .site-header__chev {
  transform: rotate(180deg);
}

.site-header__mobile-sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}

.site-header__mobile-item.is-open > .site-header__mobile-sub {
  grid-template-rows: 1fr;
}

.site-header__mobile-sublist {
  overflow: hidden;
}

.site-header__mobile-sublink {
  display: block;
  padding: 10px 0 10px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--navy-70);
  transition: color 0.2s var(--ease);
}

.site-header__mobile-sublink:hover {
  color: var(--blue);
}

.site-header__mobile-sublink[aria-disabled="true"] {
  cursor: default;
}

.site-header__mobile-sublist > li:last-child .site-header__mobile-sublink {
  padding-bottom: 16px;
}

.site-header__mobile-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--navy-40);
}

.site-header__mobile-langs {
  display: flex;
  gap: 8px;
}

.site-header__mobile-lang {
  padding: 8px 14px;
  border: 1px solid var(--navy-40);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  color: var(--navy-70);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.site-header__mobile-lang:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.site-header__mobile-lang.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .site-header__nav {
    display: none;
  }

  .site-header__burger {
    display: inline-flex;
  }

  .site-header__announce-inner,
  .site-header__bar {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  .site-header__bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Announcement-Bar mobil (Figma "Sticky Bar", 3577:34201): kein
     Sprachwähler, Inhalt rechtsbündig mit 48px Abstand zum rechten Rand,
     Inter 11px (Headline Medium/20, Link Regular/16). */

  .site-header__announce-inner {
    padding: 0 48px 0 16px;
  }

  .site-header__announce-spacer,
  .site-header__lang {
    display: none;
  }

  .site-header__announce-msg {
    justify-content: flex-end;
  }

  .site-header__announce-headline {
    min-width: 0;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 500;
    line-height: 20px;
  }

  .site-header__announce-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header__announce-link {
    font-size: 11px;
  }

  /* Hauptleiste mobil (Figma header/mobile, 3577:34200): 60px hoch,
     Padding 10/16, Wortmarke 80px breit. */

  .site-header__bar {
    height: 60px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-header__logo {
    width: 80px;
    height: 20px;
  }

  /* kobil-logo.svg trägt rechts 20% Leerraum (Artwork 120/150):
     100px Img-Breite ⇒ 80px sichtbare Wortmarke wie im Figma-Asset. */
  .site-header__logo img {
    width: 100px;
    height: auto;
  }
}

@media (max-width: 480px) {
  .site-header__cta--bar {
    display: none;
  }

  .site-header__mobile-panel {
    width: 100%;
  }
}
