/*
 * Frisian Orchard — Module 1: Floating Glass-Pill Header
 */

.fo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  max-width: 100%;
  overflow-x: clip;
}

/* Pill-Modus: nie Full-Width-Bar am äußeren Header (Legacy/Customizer) */
.fo-header--pill,
.fo-header--pill.fo-header--scrolled {
  background: transparent !important;
  border: none !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

.fo-header__dock {
  pointer-events: none;
  width: var(--fo-hero-container);
  max-width: var(--fo-hero-max-width);
  margin-inline: auto;
  padding-top: clamp(0.75rem, 2vh, 1.25rem);
}

.fo-header__glass {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.875rem, 2vw, 1.75rem);
  width: 100%;
  max-width: min(var(--fo-header-pill-max-width), calc(100% - 2rem));
  margin-inline: auto;
  padding: 0.5625rem 0.75rem 0.5625rem 1.125rem;
  border-radius: 999px;
  background: var(--fo-header-glass, rgba(11, 17, 13, 0.55));
  backdrop-filter: blur(var(--fo-header-blur, 16px)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--fo-header-blur, 16px)) saturate(1.35);
  border: 1px solid rgba(var(--fo-gold-rgb), 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.25);
  transition:
    background var(--fo-transition),
    border-color var(--fo-transition),
    box-shadow var(--fo-transition),
    backdrop-filter var(--fo-transition);
}

.fo-header__glass--over-hero {
  background: rgba(11, 17, 13, 0.45);
  backdrop-filter: blur(var(--fo-header-blur, 16px)) saturate(1.45);
  -webkit-backdrop-filter: blur(var(--fo-header-blur, 16px)) saturate(1.45);
}

.fo-header__glass--scrolled {
  background: rgba(11, 17, 13, 0.72);
  backdrop-filter: blur(var(--fo-header-blur, 16px)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--fo-header-blur, 16px)) saturate(1.35);
  border-color: rgba(var(--fo-gold-rgb), 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 1100px) {
  .fo-header--pill .fo-header__glass,
  .fo-header--pill .fo-header__glass.fo-header__glass--scrolled {
    max-width: min(var(--fo-header-pill-max-width), calc(100% - 2rem));
    width: 100%;
    margin-inline: auto;
    border-radius: 999px;
    flex-wrap: nowrap;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .fo-header__glass {
    background: rgba(11, 17, 13, 0.92);
  }
}

.fo-header--bar .fo-header__glass {
  max-width: 100%;
  border-radius: 8px;
}

.fo-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--fo-text-white);
  flex-shrink: 0;
  min-width: 0;
  transition: opacity var(--fo-transition);
}

@media (hover: hover) {
  .fo-header__brand:hover,
  .fo-header__brand:focus-visible {
    opacity: 0.92;
  }

  .fo-header__brand:hover .fo-header__name,
  .fo-header__brand:focus-visible .fo-header__name {
    color: var(--fo-gold-champagne);
  }
}

.fo-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.fo-header__logo--brand {
  width: 44px;
  height: 44px;
  overflow: hidden;
}

.fo-header__logo svg {
  width: 22px;
  height: 22px;
}

.fo-header__logo-img {
  max-height: 44px;
  max-width: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.fo-header__brand--logo_only .fo-header__name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fo-header__name {
  font-family: var(--fo-font-serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color var(--fo-transition);
}

.fo-header__end {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-left: auto;
  min-width: 0;
}

.fo-header__nav-wrap {
  min-width: 0;
}

.fo-header__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  align-items: center;
  gap: clamp(0.75rem, 1.75vw, 1.625rem);
}

.fo-header__nav .menu-item {
  margin: 0;
  padding: 0;
}

.fo-header__nav a {
  font-family: var(--fo-font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--fo-nav-letter-spacing, 0.12em);
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  transition:
    color var(--fo-transition),
    text-shadow var(--fo-transition),
    background-color var(--fo-transition);
  white-space: nowrap;
}

.fo-header__nav .menu-item > a {
  position: relative;
  display: inline-block;
}

.fo-header__nav .menu-item > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1px;
  background: var(--fo-gold-champagne);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition:
    opacity var(--fo-transition),
    transform var(--fo-transition);
  pointer-events: none;
}

.fo-header__nav a:hover,
.fo-header__nav a:focus-visible {
  color: var(--fo-gold-champagne);
  text-shadow: 0 0 18px rgba(var(--fo-gold-rgb), 0.35);
}

.fo-header__nav a:hover::after,
.fo-header__nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.fo-header__nav .current-menu-item > a {
  color: var(--fo-gold-champagne);
}

.fo-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.fo-header__cta {
  padding: 0.625rem 1.125rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.fo-header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--fo-gold-rgb), 0.28);
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background var(--fo-transition),
    border-color var(--fo-transition);
}

@media (hover: hover) {
  .fo-header__toggle:hover,
  .fo-header__toggle:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(var(--fo-gold-rgb), 0.55);
  }
}

.fo-header__toggle span {
  display: block;
  width: 16px;
  height: 1px;
  margin-inline: auto;
  background: var(--fo-text-white);
  transition: transform var(--fo-transition), opacity var(--fo-transition);
}

.fo-header__toggle--open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.fo-header__toggle--open span:nth-child(2) {
  opacity: 0;
}

.fo-header__toggle--open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 1100px) {
  .fo-header__nav {
    display: flex;
  }

  .fo-header__toggle {
    display: none;
  }
}

@media (max-width: 1099px) {
  body.fo-nav-open {
    overflow: hidden;
  }

  .fo-header__dock {
    width: 100%;
    max-width: 100%;
    padding-inline: 0.75rem;
    box-sizing: border-box;
  }

  .fo-header__glass {
    flex-wrap: nowrap;
    border-radius: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.625rem;
    gap: 0.5rem;
  }

  .fo-header__brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .fo-header__end {
    flex: 0 0 auto;
    gap: 0.375rem;
    margin-left: auto;
  }

  .fo-header__nav-wrap {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.875rem 1rem;
    background: rgba(11, 17, 13, 0.96);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    border: 1px solid rgba(var(--fo-gold-rgb), 0.28);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }

  .fo-header__nav-wrap--open {
    display: block;
  }

  .fo-header__nav-wrap--open .fo-header__nav,
  .fo-header__nav.fo-header__nav--open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .fo-header__nav a {
    display: block;
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    padding: 0.75rem 0.25rem;
    border-bottom: none;
    border-radius: 6px;
  }

  .fo-header__nav .menu-item > a::after {
    display: none;
  }

  @media (hover: hover) {
    .fo-header__nav a:hover,
    .fo-header__nav a:focus-visible {
      background: rgba(var(--fo-gold-rgb), 0.08);
    }
  }

  .fo-header__nav .menu-item + .menu-item {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .fo-header__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-size: 0.6875rem;
  }
}

@media (max-width: 479px) {
  .fo-header__dock {
    padding-inline: 0.625rem;
  }

  .fo-header__glass {
    padding-inline: 0.5rem;
  }

  .fo-header__brand--logo_and_name .fo-header__name {
    display: none;
  }

  .fo-header__toggle {
    width: 34px;
    height: 34px;
  }
}

.fo-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fo-footer__nav-list a {
  font-family: var(--fo-font-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--fo-text-platinum);
  text-decoration: none;
  transition: color var(--fo-transition);
}

.fo-footer__nav-list a:hover {
  color: var(--fo-gold-champagne);
}
