/* Verhindert Aufblitzen vor GSAP (defer): nur Startseite setzt html.va-intro per Inline-Skript im Head */
html.va-intro #stage .leaf,
html.va-intro #stage .hero-title,
html.va-intro #stage .nav,
html.va-intro #stage #sectionAbout:not([hidden]),
html.va-intro #stage #sectionDownloads:not([hidden]),
html.va-intro #stage .favicon-wrap,
html.va-intro #stage .footer {
  opacity: 0;
}

:root {
  --color-background: #d8e1e8;
  --color-light: #98bad5;
  --color-dark: #304674;
  --color-accent: #cfb98b;
  --color-accent-hover: #745e30;
  --color-darker: #162037;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter Variable", system-ui, sans-serif;
  background: var(--color-background);
  color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-root {
  min-height: 100dvh;
  min-height: 100svh;
  background: var(--color-background);
}

.stage-scaler {
  width: 100%;
}

.stage {
  position: relative;
  width: min(100%, 1920px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--color-background);
  overflow: clip;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 72px) clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
}

.leaf {
  position: fixed;
  z-index: 0;
  pointer-events: none;
}

.leaf__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Exakte Figma-Positionen aus Node 1:47, 1:48, 1:49 relativ zu 1920x1080 */
.leaf--1 {
  /* links oben: Vector-1.svg */
  left: clamp(24px, 5vw, 96px);
  top: 0;
  width: auto;
  height: clamp(220px, 38vh, 520px);
  aspect-ratio: 544.016350210657 / 555.7662525779979;
  transform: rotate(0deg);
  transform-origin: center center;
}

.leaf--2 {
  /* links unten: Vector-2.svg */
  left: clamp(-14px, 0.8vw, 0px);
  bottom: clamp(8px, 4vh, 36px);
  top: auto;
  width: auto;
  height: clamp(210px, 38vh, 460px);
  aspect-ratio: 515.8088640922415 / 493.9941941402758;
  transform: rotate(0deg);
  transform-origin: center center;
}

.leaf--3 {
  /* rechts: Vector.svg */
  right: clamp(-8px, 1vw, 22px);
  left: auto;
  top: clamp(120px, 35vh, 399px);
  width: auto;
  height: clamp(250px, 48vh, 620px);
  aspect-ratio: 402.2758885067824 / 646.7330728077202;
  transform: rotate(0deg);
  transform-origin: center center;
}

.nav-btn--home-top {
  position: absolute;
  left: clamp(12px, 2vw, 20px);
  top: clamp(12px, 2vw, 20px);
  z-index: 3;
  display: inline-flex;
  align-items: flex-start;
  padding: 8px 16px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-darker);
}

.nav-btn--home-top:hover,
.nav-btn--home-top:focus-visible {
  background: var(--color-light);
  color: var(--color-darker);
  outline: none;
}

.content {
  position: relative;
  z-index: 1;
  width: min(100%, 1359px);
  margin: clamp(28px, 4vw, 84px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.hero-title {
  margin: 0;
  width: 100%;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  color: var(--color-darker);
}

.nav {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: flex-start;
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  color: var(--color-dark);
  white-space: nowrap;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  background: var(--color-light);
  color: var(--color-darker);
  outline: none;
}

.nav-btn.is-active {
  background: var(--color-accent);
  color: var(--color-darker);
}

.nav-btn.is-active:hover,
.nav-btn.is-active:focus-visible {
  background: var(--color-accent);
  color: var(--color-darker);
}

.nav-btn--external {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-btn__icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background-color: currentColor;
  mask-image: url("/assets/arrow-up-right.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: url("/assets/arrow-up-right.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.body-copy {
  margin: 0;
  width: min(100%, 700px);
  text-align: center;
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 16px);
  line-height: 1.4;
  color: var(--color-dark);
}

.body-copy p {
  margin: 0 0 0 0;
}

.body-copy p + p {
  margin-top: 0;
}

.body-copy .para-spacer {
  min-height: 1em;
}

.download-panel {
  margin: 0;
  width: min(100%, 700px);
  text-align: left;
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 16px);
  line-height: 1.4;
  color: var(--color-dark);
}

.download-panel[hidden] {
  display: none !important;
}

.download-panel:not([hidden]) ~ .favicon-wrap {
  display: none;
}

.download-panel__group + .download-panel__group {
  margin-top: 1.75rem;
}

.download-panel__heading {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.25;
  color: var(--color-darker);
}

.download-panel__subtitle {
  margin: 0 0 0.5rem;
}

.download-panel__list {
  margin: 0;
  padding-left: 1.25rem;
}

.download-panel__list li + li {
  margin-top: 0.15rem;
}

.download-panel__list a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.download-panel__list a:hover {
  color: var(--color-accent-hover);
}

.favicon-wrap {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.favicon-wrap img {
  display: block;
  width: 100%;
  height: 100%;
}

.footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  padding: clamp(16px, 2.5vw, 20px) 0 0;
  gap: clamp(16px, 2.5vw, 39px);
  font-weight: 400;
  font-size: 16px;
  line-height: normal;
  color: var(--color-dark);
  white-space: nowrap;
}

.footer a:hover {
  color: var(--color-accent-hover);
}

.legal-body {
  position: relative;
  z-index: 1;
  width: min(100%, 1359px);
  margin: clamp(56px, 8vw, 140px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.legal-body .hero-title {
  width: 100%;
}

.legal-copy {
  margin-top: 30px;
  width: min(100%, 700px);
  color: var(--color-dark);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.5;
  text-align: left;
}

.legal-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.2;
  color: var(--color-darker);
  font-weight: 700;
}

.legal-copy p {
  margin: 0 0 12px;
}

.legal-copy ul {
  margin: 0 0 14px;
  padding-left: 1.2rem;
}

.legal-copy li {
  margin: 0 0 6px;
}

.intro-hidden {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 1024px) {
  .stage {
    padding: clamp(32px, 5vw, 40px) clamp(16px, 4vw, 32px) 20px;
  }

  .content {
    width: min(100%, 900px);
    margin-top: clamp(24px, 5vw, 48px);
    gap: 22px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .footer {
    flex-wrap: wrap;
    white-space: normal;
  }

  .leaf--1 {
    height: clamp(160px, 28vh, 300px);
  }

  .leaf--2 {
    height: clamp(170px, 30vh, 320px);
    bottom: clamp(4px, 1.8vh, 14px);
  }

  .leaf--3 {
    height: clamp(210px, 40vh, 420px);
    top: clamp(140px, 38vh, 360px);
  }
}

@media (min-width: 1900px) and (min-height: 960px) {
  .leaf--1 {
    height: clamp(420px, 44vh, 620px);
    left: clamp(42px, 5vw, 128px);
  }

  .leaf--2 {
    height: clamp(360px, 42vh, 540px);
    left: clamp(-20px, 0.6vw, -2px);
  }

  .leaf--3 {
    height: clamp(460px, 56vh, 760px);
    right: clamp(-12px, 0.8vw, 20px);
    top: clamp(90px, 32vh, 360px);
  }
}

@media (max-width: 700px) {
  .stage {
    padding-top: 56px;
  }

  .content {
    gap: 18px;
    margin-top: 12px;
  }

  .hero-title {
    font-size: clamp(30px, 9vw, 42px);
  }

  .nav {
    width: 100%;
    gap: 6px;
  }

  .nav-btn {
    font-size: 14px;
    padding: 7px 12px;
  }

  .body-copy,
  .download-panel {
    font-size: 14px;
    line-height: 1.45;
  }

  .download-panel:not([hidden]) {
    margin-bottom: clamp(24px, 6vw, 40px);
  }

  .favicon-wrap {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }

  .footer {
    font-size: 14px;
    gap: 12px;
    padding-top: 18px;
    justify-content: center;
    text-align: center;
  }

  .nav-btn--home-top {
    left: 12px;
    top: 12px;
    font-size: 14px;
    padding: 7px 12px;
  }

  .leaf--1 {
    display: none;
  }

  .leaf--2 {
    height: clamp(170px, 31vh, 250px);
    bottom: 0;
    left: -10px;
  }

  .leaf--3 {
    height: clamp(190px, 36vh, 280px);
    right: -6px;
    top: clamp(170px, 44vh, 320px);
  }
}

/* Niedrige Höhen absichern: verhindert Überlappungen zwischen links oben und links unten */
@media (max-height: 820px) {
  .leaf--1 {
    height: clamp(140px, 22vh, 230px);
    left: clamp(8px, 2vw, 30px);
  }

  .leaf--2 {
    height: clamp(150px, 24vh, 250px);
    bottom: 0;
    left: -8px;
  }

  .leaf--3 {
    height: clamp(180px, 35vh, 350px);
    top: clamp(110px, 28vh, 250px);
  }
}

@media (max-height: 680px) {
  .leaf--1 {
    display: none;
  }

  .leaf--2 {
    height: clamp(130px, 24vh, 200px);
  }

  .leaf--3 {
    height: clamp(150px, 31vh, 260px);
    top: clamp(70px, 20vh, 170px);
  }
}

