/* ============================================================================
   assets/css/header.css - the site header "Floating Island" (2026-10-02).
   Markup: layouts/header.php. Behaviour: assets/js/header.js + assets/js/custom.js.
   Spec: the owner-approved prototype https://claude.ai/artifact/UBcFf8qiM5k43zFD3Dtt6y
   (DECISIONS.md "Header: Floating Island"), ported 1:1 where the site allows.
   - a light glass pill floats 14px under the top edge; the three menus open as ONE card
     12px below it, as wide as the pill
   - phones and tablets (<= 1024px): the pill stays at the TOP (the bottom belongs to the
     sticky bars), the burger opens the menu as a card below the pill, sections as accordions
   - the call to action is the site's own button (.fill-btn, CTA system B1 in cta.css,
     loaded after this file): positioned here, never restyled
   Colours are brand tokens - master: vitec/branding/tokens/tokens.json
   (#14213d textNavy, #003996 primary, #c2411f coralInkOnLight, #070d13 darkBg,
   #4d5461 subtitle, #e55a37 secondaryCta); never invent a value here.
   ========================================================================== */
.site-header,
.isl-mm,
.isl-mm-backdrop {
  --isl-navy: #14213d;
  --isl-primary: #003996;
  --isl-coral: #e55a37;
  --isl-coral-ink: #c2411f;
  --isl-dark: #070d13;
  --isl-subtitle: #4d5461;
  --isl-sub-tt: #d5dbe2;
  --isl-line: rgba(20, 33, 61, 0.08);
  --isl-tint: rgba(20, 33, 61, 0.06);
  --isl-tile: linear-gradient(135deg, rgba(229, 90, 55, 0.12), rgba(0, 57, 150, 0.12));
  --isl-ring: 3px solid #003996;
}

/* ---- The island ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  z-index: 9999;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 16px;
  left: 16px;
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid var(--isl-line);
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(20, 33, 61, 0.12);
  color: var(--isl-navy);
  font-family: "OverusedGrotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* glass on a layer BEHIND the pill: a backdrop-filter on the header itself would make it
   the containing block of everything fixed inside it */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

/* resets at zero specificity, so every component rule below wins over them */
:where(.site-header, .isl-mm) a {
  text-decoration: none;
}

:where(.site-header, .isl-mm) button {
  font: inherit;
  color: inherit;
}

.site-header a:focus-visible,
.site-header button:focus-visible,
.isl-mm a:focus-visible,
.isl-mm button:focus-visible {
  outline: var(--isl-ring);
  outline-offset: 2px;
}

.isl-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 8px 9px 8px 22px;
}

.isl-brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
}

.isl-brand img {
  display: block;
  width: auto;
}

.isl-brand-mark {
  height: 44px;
}

.isl-brand-word {
  height: 29px;
}

.isl-nav {
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.isl-nav > ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.isl-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--isl-navy) !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.isl-trigger:hover {
  background: var(--isl-tint);
}

.isl-item.is-open > .isl-trigger {
  background: rgba(20, 33, 61, 0.09);
}

/* the section the visitor is in: the filled pill */
.isl-trigger.active,
.isl-item.is-open > .isl-trigger.active {
  background: var(--isl-navy);
  color: #ffffff !important;
}

.isl-chev {
  flex: none;
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.isl-item.is-open > .isl-trigger .isl-chev {
  transform: rotate(180deg);
}

.isl-end {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* the language switch: a small segmented control (.lang-option is what the switch
   script in layouts/header.php binds; these rules outrank the legacy .lang-option ones) */
.isl-lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--isl-tint);
}

.isl-lang .lang-option {
  padding: 7px 11px !important;     /* style.css pads .lang-option 4px 6px !important on phones */
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--isl-subtitle);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.isl-lang .lang-option:hover {
  color: var(--isl-navy);
}

.isl-lang .lang-option.active {
  background: #ffffff;
  color: var(--isl-navy);
  box-shadow: 0 1px 4px rgba(20, 33, 61, 0.14);
}

/* the call to action: the site's button; only its label switches here */
.site-header .header-cta {
  flex: none;
}

.site-header .header-cta .cta-short {
  display: none;
}

@media (min-width: 1366px) {
  .site-header .header-cta {
    white-space: nowrap;
  }
}

@media (min-width: 1025px) and (max-width: 1365.98px) {
  .site-header .header-cta .cta-long {
    display: none;
  }

  .site-header .header-cta .cta-short {
    display: inline;
  }

  .site-header .header-cta {
    white-space: nowrap;
  }
}

.isl-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--isl-tint);
  color: var(--isl-navy);
  cursor: pointer;
}

.isl-burger svg {
  display: block;
  width: 22px;
  height: 22px;
}

.isl-burger .isl-i-close,
body.menu-open .isl-burger .isl-i-open {
  display: none;
}

body.menu-open .isl-burger .isl-i-close {
  display: block;
}

/* ---- Mega menus: one floating card below the pill --------------------------------- */
.isl-mega {
  position: absolute;
  top: calc(100% + 1px);            /* outside the pill's 1px border: same width, true 12px gap */
  right: -1px;
  left: -1px;
  padding-top: 12px;                /* the gap is part of the menu: the pointer can cross it */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.isl-item.is-open > .isl-mega {
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.isl-card {
  max-height: calc(100vh - 14px - 66px - 12px - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border: 1px solid var(--isl-line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 24px 60px rgba(20, 33, 61, 0.16);
}

.isl-grid {
  display: grid;
  gap: 12px;
}

.isl-split {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.isl-refs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.isl-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.isl-label {
  margin: 0;
  padding: 10px 14px 6px;
  color: var(--isl-subtitle);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.isl-rows-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.isl-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;              /* 28px card - 12px padding */
  color: var(--isl-navy);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.isl-row.is-compact {
  align-items: center;
  padding: 10px 14px;
}

.isl-row:hover,
.isl-row:focus-visible {
  background: #ffffff;
  color: var(--isl-navy);
  box-shadow: 0 6px 18px rgba(20, 33, 61, 0.08);
}

/* the icon tile: light coral-to-blue tint, a dark outline icon (DECISIONS.md "Icons") */
.isl-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--isl-tile);
  color: var(--isl-navy);
}

.isl-tile svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}

.isl-row-text {
  min-width: 0;
}

.isl-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.isl-go {
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.isl-row:hover .isl-go,
.isl-row:focus-visible .isl-go {
  opacity: 1;
  transform: none;
}

.isl-row-desc {
  display: block;
  margin: 4px 0 0;
  color: var(--isl-subtitle);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.isl-tag {
  padding: 3px 10px;
  border-radius: 500px;
  background: #f9e1db;
  color: var(--isl-coral-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.isl-more {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  margin: 2px 6px 6px;
  padding: 8px;
  border-radius: 12px;
  color: var(--isl-primary);
  font-size: 14px;
  font-weight: 600;
}

.isl-more:hover {
  color: var(--isl-primary);
}

.isl-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.isl-more:hover svg {
  transform: translateX(3px);
}

/* the promos: an inner dark card, radius matched to the rows */
.isl-promo-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.isl-promo {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--isl-dark);
  color: #ffffff;
  isolation: isolate;
}

.isl-promo-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.isl-promo:hover .isl-promo-img {
  transform: scale(1.03);
}

.isl-promo-body {
  position: relative;
  z-index: 0;                       /* own layer: the outline button's ring sits above this fill */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 72px 22px 22px;
  background: linear-gradient(180deg, rgba(7, 13, 19, 0) 0%, rgba(7, 13, 19, 0.92) 48%);
}

.isl-promo-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.isl-promo-text {
  margin: 0;
  padding-bottom: 8px;              /* style.css sets p { margin: 0 !important } */
  color: var(--isl-sub-tt);
  font-size: 15px;
  line-height: 1.5;
}

.isl-promo-ki {
  justify-content: flex-start;
  gap: 14px;
  padding: 24px;
}

/* the Vitec mark as a gradient watermark, bottom right */
.isl-promo-ki::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -36px;
  z-index: -1;
  width: 220px;
  height: 186px;
  background: linear-gradient(135deg, #e55a37 10%, #003996 90%);
  -webkit-mask: url("../svg/logoiconB.svg") no-repeat center / contain;
  mask: url("../svg/logoiconB.svg") no-repeat center / contain;
  opacity: 0.22;
  pointer-events: none;
}

.isl-promo-title {
  display: block;                   /* a span: style.css forces every p to the body font */
  margin: 0;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

.isl-kp {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 2px 0 6px;
  padding: 0;
  list-style: none;
}

.isl-kp li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.isl-kp svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: #ffffff;
}

/* the promo's button sits on the left at its own width, one step smaller than the page
   buttons (owner 2026-10-03: "links allein und deutlich kleiner") - the card is a flex
   column, which stretched it across the full width */
.isl-promo .outline-btn {
  align-self: flex-start;
  margin-top: auto;
  color: #ffffff;
  font-size: 15px;
}

.isl-promo-body .outline-btn {
  margin-top: 0;
}

/* without a blur (older engines) the glass turns opaque, so nothing reads through it */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header::before {
    background: rgba(255, 255, 255, 0.98);
  }

  .isl-card {
    background: #ffffff;
  }
}

/* narrow desktops (1025-1199px): the same pill, a little tighter, so logo, three menus,
   language and button fit on one line */
@media (min-width: 1025px) and (max-width: 1199.98px) {
  .isl-bar {
    gap: 10px;
    padding-left: 16px;
  }

  .isl-brand-mark {
    height: 38px;
  }

  .isl-brand-word {
    height: 24px;
  }

  .isl-trigger {
    padding: 0 9px 0 12px;
    font-size: 14px;
  }

  .isl-end {
    gap: 8px;
  }
}

/* ---- Phones and tablets: the pill stays at the top --------------------------------- */
.isl-mm,
.isl-mm-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .site-header {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: 12px;
  }

  .isl-bar {
    min-height: 60px;
    padding: 8px 8px 8px 16px;
  }

  .isl-nav,
  .isl-end .header-cta {
    display: none;
  }

  /* the language switch stays in the bar, between the logo and the menu button (owner
     2026-10-06: "in der mobilen Ansicht in den Header"); finger-sized like the burger -
     the 27px-high buttons of the desktop pill are too small to tap */
  .isl-end {
    gap: 8px;
  }

  .isl-end .isl-lang {
    padding: 3px;
  }

  .isl-end .isl-lang .lang-option {
    min-width: 40px;
    min-height: 38px;
    padding: 0 11px !important;
    font-size: 14px;
  }

  .isl-burger {
    display: inline-flex;
  }

  .isl-brand-mark {
    height: 30px;
  }

  .isl-brand-word {
    height: 18px;
  }

  .isl-mm-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(7, 13, 19, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }

  /* the card starts 12px under the pill (--vitec-header-h = the pill's bottom edge,
     published by custom.js) */
  .isl-mm {
    display: block;
    position: fixed;
    z-index: 9998;
    top: calc(var(--vitec-header-h, 72px) + 12px);
    right: 12px;
    left: 12px;
    max-height: calc(100vh - var(--vitec-header-h, 72px) - 24px);
    max-height: calc(100dvh - var(--vitec-header-h, 72px) - 24px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px;
    border: 1px solid var(--isl-line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(20, 33, 61, 0.18);
    color: var(--isl-navy);
    font-family: "OverusedGrotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.985);
    transform-origin: top center;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.22s;
  }

  body.menu-open .isl-mm {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
  }

  body.menu-open .isl-mm-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s;
  }

  /* the page stays put while the menu is open; the menu scrolls inside */
  html.menu-open,
  body.menu-open {
    overflow: hidden;
  }
}

/* the smallest phones (320px): the bar was 9px short for logo + switch + menu button - the
   logo gets a little smaller and the spacing tighter, the wordmark stays */
@media (max-width: 359.98px) {
  .isl-bar {
    gap: 10px;
    padding-left: 12px;
  }

  .isl-brand {
    gap: 6px;
  }

  .isl-brand-mark {
    height: 26px;
  }

  .isl-brand-word {
    height: 15px;
  }
}

.isl-acc + .isl-acc {
  border-top: 1px solid var(--isl-line);
}

.isl-acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--isl-navy) !important;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

/* the section the visitor is in: brand blue, never a filled bar */
.isl-acc-trigger.active {
  color: var(--isl-primary) !important;
}

.isl-acc-trigger .isl-chev {
  width: 20px;
  height: 20px;
}

.isl-acc.is-open .isl-acc-trigger .isl-chev {
  transform: rotate(180deg);
}

.isl-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.isl-acc.is-open .isl-acc-panel {
  grid-template-rows: 1fr;
}

.isl-acc-inner {
  min-height: 0;
  overflow: hidden;
}

.isl-acc-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 10px;
}

.isl-mm .isl-row {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.isl-mm .isl-row.is-compact {
  padding: 8px 12px;
}

.isl-mm .isl-tile {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.isl-mm .isl-tile svg {
  width: 18px;
  height: 18px;
}

.isl-mm .isl-row-title {
  font-size: 15px;
}

.isl-mm .isl-row-desc {
  font-size: 13.5px;
}

.isl-mm .isl-label {
  padding: 12px 12px 4px;
}

.isl-mm .isl-more {
  margin: 0 4px 4px;
}

.isl-mm .isl-promo {
  min-height: 260px;
  margin: 8px 4px 4px;
}

.isl-mm .isl-promo-body {
  padding: 64px 18px 18px;
}

.isl-mm .isl-promo-ki {
  padding: 20px 18px;
}

.isl-mm .isl-promo-title {
  font-size: 22px;
}

.isl-mm .isl-promo-text,
.isl-mm .isl-kp li {
  font-size: 14px;
}

.isl-mm .outline-btn {
  font-size: 15px;
}

.isl-mm-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 4px;
  padding: 16px 14px 14px;
  border-top: 1px solid var(--isl-line);
}

.isl-mm-foot .isl-lang .lang-option {
  padding: 9px 14px !important;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header *,
  .isl-mm,
  .isl-mm *,
  .isl-mm-backdrop {
    transition-duration: 0.01ms !important;
  }
}
