.hero-nav {
  --nav-width: min(85vw, 1460px);
  --glass-width: min(94vw, 1610px);
  --glass-height: 80px;
  --glass-padding: 22px;
  --glass-radius: 25px;
  --nav-ease: cubic-bezier(.22, .75, .26, 1);
  position: fixed;
  z-index: 10;
  top: calc(18px + env(safe-area-inset-top));
  inset-inline: 0;
  width: var(--nav-width);
  min-height: 56px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  color: #f9f7ff;
  box-sizing: border-box;
  padding-inline: 0;
  transition: width .32s var(--nav-ease), min-height .32s var(--nav-ease),
    padding-inline .32s var(--nav-ease), top .32s var(--nav-ease), color .24s ease;
}
.hero-nav::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid #ffffffb8;
  border-radius: var(--glass-radius);
  background: linear-gradient(115deg, #ffffff45, #eee6f827), #f7f3fbd6;
  box-shadow: inset 0 1px 0 #ffffff80, 0 8px 28px #24163524;
  -webkit-backdrop-filter: blur(22px) saturate(130%);
  backdrop-filter: blur(22px) saturate(130%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s ease;
}
.hero-nav:is(.floating, .legal-nav, :has(.menu-toggle[aria-expanded=true])) {
  top: calc(13px + env(safe-area-inset-top));
  width: var(--glass-width);
  min-height: var(--glass-height);
  padding-inline: var(--glass-padding);
  color: #221a30;
}
.hero-nav:is(.floating, .legal-nav, :has(.menu-toggle[aria-expanded=true]))::before {
  opacity: 1;
}
.hero-nav .brand, .app-store-brand {
  justify-self: start;
  gap: 10px;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.hero-nav .brand img, .app-store-brand img { width: 36px; height: auto; flex: none; }
.hero-nav .brand img { filter: invert(1); transition: filter .24s ease, transform .2s; }
.hero-nav:is(.floating, .legal-nav, :has(.menu-toggle[aria-expanded=true])) .brand img { filter: invert(0); }
.hero-nav nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 46px); }
.hero-nav nav a { font-size: 16px; font-weight: 600; padding-block: 12px; white-space: nowrap; }
.hero-nav nav a:hover { color: #d6b7ff; }
.hero-nav:is(.floating, .legal-nav, :has(.menu-toggle[aria-expanded=true])) nav a:hover { color: #6237b4; }
.hero-nav .discover {
  justify-self: end;
  min-height: 52px;
  font-size: 16px;
  gap: 12px;
  white-space: nowrap;
  color: white;
  background: linear-gradient(135deg, #9277f2, #7454e5 50%, #5938c9);
  text-shadow: 0 1px 3px #27106766;
}
.hero-nav .menu-toggle { display: none; }
.about:has(.hero-nav) main { padding-top: calc(108px + env(safe-area-inset-top)); }
#problem, #loesung, #demo, #handel { scroll-margin-top: calc(90px + env(safe-area-inset-top)); }
.hero-intro {
  --hero-height: max(570px, 100svh);
  --wave-height: calc(var(--hero-height) * .162);
  --wave-travel: clamp(58px, 9svh, 100px);
  position: relative;
  overflow: clip;
}
.alpine-hero {
  position: relative;
  isolation: isolate;
  color: #fcfbff;
  min-height: var(--hero-height);
  background: #201b30 url("assets/hero-alpine.webp") center bottom / cover no-repeat;
  overflow: hidden;
}
.alpine-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(99deg, #17162160, transparent 73%), linear-gradient(180deg, #15142342, transparent 55%);
}
.hero-layout {
  width: min(84.5%, 1460px);
  min-height: inherit;
  margin-inline: auto;
  padding-bottom: var(--wave-height);
}
.alpine-copy {
  position: relative;
  z-index: 2;
  width: max-content;
  max-width: 58%;
  padding-top: max(130px, 22svh);
  pointer-events: none;
}
.alpine-copy h1 {
  font-size: clamp(50px, 5.35vw, 92px);
  font-weight: 700;
  line-height: 1.025;
  letter-spacing: -.066em;
  text-wrap: initial;
}
.alpine-copy h1 span {
  display: block;
  color: #ba8bef;
}
.alpine-copy p {
  margin-top: clamp(19px, 2vw, 36px);
  color: #d4cedd;
  max-width: min(100%, 30rem);
  font-size: clamp(18px, 1.46vw, 26px);
  line-height: 1.48;
  letter-spacing: -.018em;
}
.alpine-model {
  position: absolute;
  top: 8.5%;
  bottom: max(14.5%, 8.17vw);
  left: 37%;
  right: 4.8%;
}
.alpine-model canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.alpine-model canvas { pointer-events: none; }
.alpine-model:not([data-ready]) canvas { visibility: hidden; }


.hero-transition {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: var(--wave-height);
  pointer-events: none;
}
.hero-transition::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: var(--wave-travel);
  background: #efedf7;
}
.hero-wave {
  display: block;
  width: 100%;
  height: calc(var(--wave-height) + 1px);
  filter: drop-shadow(0 -5px 12px #19152f55);
  clip-path: inset(-40px 0 0);
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll(root block)) {
    .hero-transition {
      animation: wave-rise auto cubic-bezier(.22, .65, .35, 1) both;
      animation-timeline: scroll(root block);
      animation-range: 0px calc(var(--wave-travel) * 3);
    }
  }
}
@keyframes wave-rise {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-1 * var(--wave-travel))); }
}
.hero-intro + .paper { background: linear-gradient(#efedf7, #faf9f6 260px, #faf9f6 28%, #f5f1f8 64%, #faf9f6); }
.hero-next {
  position: absolute;
  bottom: clamp(10px, 2.1vh, 24px);
  left: 50%;
  translate: -50% 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #5b536a;
  border-radius: 50%;
  pointer-events: auto;
}
.hero-next:hover { color: #603ac2; background: #e6e0f6; }
.hero-next svg { width: 25px; height: 25px; }
@media (min-width: 881px) and (max-width: 1200px) {
  .hero-nav { --nav-width: 93vw; --glass-width: 96vw; --glass-padding: 12px; gap: 10px; }
  .hero-nav nav { gap: clamp(12px, 1.6vw, 19px); }
  .hero-nav nav a { font-size: 14px; }
  .hero-nav .discover { font-size: 15px; padding-inline: 16px; gap: 8px; }
}
@media (max-width: 880px) {
  .hero-nav {
    --nav-width: min(89vw, 665px);
    --glass-width: min(96vw, 695px);
    --glass-height: 68px;
    --glass-padding: 12px;
    --glass-radius: 21px;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }
  .hero-nav .brand, .app-store-brand { font-size: 26px; gap: 7px; }
  .hero-nav .brand img, .app-store-brand img { width: 29px; }
  .hero-nav .discover { min-height: 48px; font-size: 14px; padding-inline: 13px; gap: 6px; }
  .hero-nav .discover svg { width: 14px; height: 14px; }
  .hero-nav .menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    border: 1px solid #ffffff45;
    color: white;
    background: #21193082;
  }
  .hero-nav:is(.floating, .legal-nav) .menu-toggle, .menu-toggle[aria-expanded=true] {
    color: #35264c;
    background: #fffa;
    border-color: #fff;
  }
  .menu-toggle svg { width: 22px; height: 22px; }
  .hero-nav nav {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 7px);
    display: none;
    padding: 9px;
    border-radius: 14px;
    border: 1px solid #fffc;
    background: #f9f4ffeb;
    color: #221a30;
    box-shadow: 0 12px 24px #211a3440;
  }
  .hero-nav nav[data-open] { display: grid; gap: 0; }
  .hero-nav nav a { padding: 11px 14px; font-size: 15px; border-radius: 12px; }
  .hero-nav nav a:hover { background: #fff9; }
  .hero-intro {
    --hero-height: max(640px, 100svh);
    --wave-height: calc(var(--hero-height) * .118);
    --wave-travel: clamp(42px, 7svh, 65px);
  }
  .alpine-hero { background-position: 65% bottom; }
  .hero-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: calc(var(--hero-height) * .13);
  }
  .alpine-copy { text-align: center; margin-inline: auto; max-width: 90%; padding-top: max(calc(92px + env(safe-area-inset-top)), 10svh); }
  .alpine-copy h1 { font-size: clamp(42px, 8.8vw, 75px); }
  .alpine-copy p { font-size: clamp(16px, 2.8vw, 22px); margin: 14px auto 0; }
  .alpine-model {
    position: relative;
    inset: auto;
    flex: 1;
    min-height: 235px;
    margin: 12px 1.5% 0;
  }
}
@media (max-width: 540px) {
  .hero-intro {
    --hero-height: clamp(595px, 100svh, calc(385px + 95vw));
    --wave-height: clamp(56px, 11vw, 76px);
  }
  .alpine-hero {
    background-image: url("assets/hero-alpine-mobile.webp");
    background-position: center bottom;
  }
  .hero-layout { padding-bottom: var(--wave-height); }
  .alpine-copy { padding-top: calc(104px + env(safe-area-inset-top)); }
  .alpine-copy h1 { font-size: clamp(33px, 9.5vw, 51px); }
  .alpine-copy p { max-width: 25rem; margin-top: 12px; }
  .alpine-model { margin-top: 20px; }
  .hero-next { bottom: 3px; }
}
@media (max-width: 355px) {
  .hero-nav { --nav-width: 93vw; --glass-padding: 8px; gap: 6px; }
  .hero-nav .brand, .app-store-brand { font-size: 23px; gap: 5px; }
  .hero-nav .brand img, .app-store-brand img { width: 25px; }
  .hero-nav .discover { font-size: 13px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-nav, .hero-nav::before, .hero-nav .brand img { transition: none; }
}
