@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(205, 255, 1, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 0.7em rgba(205, 255, 1, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(205, 255, 1, 0);
  }
}

@keyframes kaepLogoBlob {
  from {
    transform: translateY(3rem) rotate(180deg);
  }
  to {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes kaepLetterDrop {
  from {
    transform: translateY(3.75rem);
  }
  to {
    transform: none;
  }
}

@keyframes kaepBlobSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes kaepHeroFadeUp {
  from {
    opacity: 0;
    transform: translateY(1.375rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes kaepHeroMaskReveal {
  from {
    transform: translateY(110%) rotate(var(--hero-rotate, 7deg));
  }
  to {
    transform: translateY(0) rotate(0deg);
  }
}


@keyframes kaepFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


@keyframes kaepImgSettle {
  from {
    transform: scale(1.18);
  }
  to {
    transform: scale(1);
  }
}

/* ══════════════════════════════════════════════════════════════
     Footer Logo — SVG Entrance
     ══════════════════════════════════════════════════════════════ */

.footer__logo path {
  transform-box: fill-box;
  transform-origin: center;
}

.logo-blob {
  transform: translateY(3rem) rotate(180deg);
}

.logo-letter {
  transform: translateY(3.75rem);
}

.footer__logo.logo-animate .logo-blob {
  animation: kaepLogoBlob 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.footer__logo.logo-animate .logo-letter {
  animation: kaepLetterDrop 0.6s cubic-bezier(0.16, 1, 0.3, 1)
    var(--letter-delay, 0.45s) both;
}

/* ══════════════════════════════════════════════════════════════
     Header Logo — Grüner Blob Hover
     ══════════════════════════════════════════════════════════════ */

.header__logo path:first-child {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.45, 0, 0.55, 1);
}

.header__logo-link:hover .header__logo path:first-child {
  transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════════════════
     Hero — Entrance (Page Load)
     ══════════════════════════════════════════════════════════════ */

.hero__show-mask {
  overflow: hidden;
  padding-bottom: 0.1em;
}

.hero__show-heading {
  display: block;
  transform-origin: left bottom;
  --hero-rotate: 7deg;
  animation: kaepHeroMaskReveal 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero__heading,
.hero__show-heading {
  opacity: 0;
}

.hero__line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
}

.hero__line-inner {
  display: block;
  transform-origin: left bottom;
  animation: kaepHeroMaskReveal 1.3s cubic-bezier(0.16, 1, 0.3, 1)
    var(--hero-delay, 0.55s) both;
}

.hero__text {
  animation: kaepFadeIn 0.7s ease 0.8s both;
}

.event-preview-card {
  animation: kaepFadeIn 0.7s ease 1.1s both;
}


/* ══════════════════════════════════════════════════════════════
     Fullwidth Image — Parallax · .full-img-project
     Bild ist 400px größer als Wrapper, zentriert via margin-top.
     JS verschiebt per translateY basierend auf Viewport-Position.
     ══════════════════════════════════════════════════════════════ */

.img-parallax-wrapper {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
}

.img-parallax-wrapper:has(.full-img-project) {
  aspect-ratio: 16 / 9;
  max-height: 800px;
}

.img-parallax-wrapper:has(.project-img) {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.img-parallax-wrapper .full-img-project,
.img-parallax-wrapper .project-img {
  position: absolute;
  top: -200px;
  left: 0;
  width: 100%;
  height: calc(100% + 400px);
  object-fit: cover;
}

.img-parallax-wrapper .project-img {
  top: -80px;
  height: calc(100% + 160px);
}

/* ══════════════════════════════════════════════════════════════
     Button — Text + Icon Slide-Up Hover
     ══════════════════════════════════════════════════════════════ */

.btn__text {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
}

.btn__text-inner,
.btn__text-clone {
  display: block;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.btn__icon-wrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 1.5rem;
  flex-shrink: 0;
}

.btn__icon-wrap .btn__icon,
.btn__icon-wrap .blog-card__btn-icon {
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.btn:hover .btn__text-inner,
.btn:hover .btn__text-clone,
.btn:hover .btn__icon-wrap .btn__icon {
  transform: translateY(-100%);
}

/* ══════════════════════════════════════════════════════════════
     Blog Card — Hover Animations
     ══════════════════════════════════════════════════════════════ */

.blog-card,
.event-card {
  transition:
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover,
.event-card:hover {
  transform: translateY(-0.625rem);
  box-shadow:
    0px 16rem 6.375rem rgba(0, 0, 0, 0.01),
    0px 9rem 5.375rem rgba(0, 0, 0, 0.05),
    0px 4rem 4rem rgba(0, 0, 0, 0.09),
    0px 1rem 2.1875rem rgba(0, 0, 0, 0.1);
}


.blog-card__media {
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.blog-card:hover .blog-card__media {
  transform: scale(1.05);
}

.blog-card:hover .blog-card__btn-text .btn__text-inner,
.blog-card:hover .blog-card__btn-text .btn__text-clone,
.blog-card:hover .btn__icon-wrap .blog-card__btn-icon {
  transform: translateY(-100%);
}

/* ══════════════════════════════════════════════════════════════
     Scroll Rotation — .img-rotate-overlap
     ══════════════════════════════════════════════════════════════ */

.img-rotate-overlap {
  transform: rotate(var(--img-rotate, 0deg));
  will-change: transform;
}

/* ══════════════════════════════════════════════════════════════
     Animation Toggle — Button UI
     ══════════════════════════════════════════════════════════════ */

.anim-toggle {
  --anim-toggle-bg: #0e2b0e;
  --anim-toggle-border: #2d5a1a;
  --anim-toggle-border-hover: #4a8a2a;
  --anim-toggle-radius: 100px;
  --anim-toggle-gap: 0.5rem;
  --anim-toggle-padding: 0.3rem 0.875rem 0.3rem 0.3rem;
  --anim-toggle-icon-size: 1.75rem;
  --anim-toggle-icon-bg: #153f15;
  --anim-toggle-icon-color: #cdff01;
  --anim-toggle-svg-size: 0.9375rem;
  --anim-toggle-label-size: 0.8125rem;
  --anim-toggle-label-color: #c8d4b8;
  --anim-toggle-state-color: #ddd8ce;
}

.anim-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--anim-toggle-gap);
  background: var(--anim-toggle-bg);
  border: 1.5px solid var(--anim-toggle-border);
  border-radius: var(--anim-toggle-radius);
  padding: var(--anim-toggle-padding);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease;
}

.anim-toggle:hover {
  border-color: var(--anim-toggle-border-hover);
}

.anim-toggle__icon {
  width: var(--anim-toggle-icon-size);
  height: var(--anim-toggle-icon-size);
  border-radius: 50%;
  background: var(--anim-toggle-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.anim-toggle__icon svg {
  width: var(--anim-toggle-svg-size);
  height: var(--anim-toggle-svg-size);
  fill: var(--anim-toggle-icon-color);
}

.anim-toggle__label {
  font-size: var(--anim-toggle-label-size);
  font-weight: 500;
  color: var(--anim-toggle-label-color);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.anim-toggle__state {
  color: var(--anim-toggle-state-color);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
     Animations Off — html.anims-off
     ══════════════════════════════════════════════════════════════ */

html.anims-off .logo-blob,
html.anims-off .logo-letter {
  transform: none !important;
  animation: none !important;
}

html.anims-off .hero__heading,
html.anims-off .hero__show-heading,
html.anims-off .hero__line-inner,
html.anims-off .hero__text,
html.anims-off .event-preview-card {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}


html.anims-off .img-parallax-wrapper .full-img-project,
html.anims-off .img-parallax-wrapper .project-img {
  transform: none !important;
}

html.anims-off .header__logo path:first-child {
  transition: none !important;
}

html.anims-off .header__logo-link:hover .header__logo path:first-child {
  transform: none !important;
}

html.anims-off .img-rotate-overlap {
  --img-rotate: 0deg;
}

html.anims-off .pulse-wrap,
html.anims-off .dot,
html.anims-off .core {
  animation-play-state: paused !important;
}

html.anims-off .btn__text-inner,
html.anims-off .btn__text-clone,
html.anims-off .btn__icon-wrap .btn__icon {
  transition: none !important;
  transform: none !important;
}

html.anims-off .blog-card,
html.anims-off .event-card {
  transition: none !important;
}

html.anims-off .blog-card:hover,
html.anims-off .event-card:hover {
  transform: none !important;
  box-shadow: none !important;
}

html.anims-off .blog-card__media {
  transition: none !important;
}

html.anims-off .blog-card:hover .blog-card__media {
  transform: none !important;
}

html.anims-off .blog-card__btn-text .btn__text-inner,
html.anims-off .blog-card__btn-text .btn__text-clone,
html.anims-off .btn__icon-wrap .blog-card__btn-icon {
  transition: none !important;
  transform: none !important;
}

/* ══════════════════════════════════════════════════════════════
     Reduced Motion
     ══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .anim-toggle {
    display: none !important;
  }
  .img-parallax-wrapper .full-img-project,
  .img-parallax-wrapper .project-img {
    transform: none !important;
  }
  .blog-card,
  .event-card {
    transition: none !important;
  }
  .blog-card:hover,
  .event-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  .blog-card__media {
    transition: none !important;
  }
  .blog-card:hover .blog-card__media {
    transform: none !important;
  }
  .blog-card__btn-text .btn__text-inner,
  .blog-card__btn-text .btn__text-clone,
  .btn__icon-wrap .blog-card__btn-icon {
    transition: none !important;
    transform: none !important;
  }
  .hero__heading,
  .hero__show-heading,
  .hero__line-inner,
  .hero__text,
  .event-preview-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .logo-blob,
  .logo-letter {
    transform: none !important;
    animation: none !important;
  }
  .img-rotate-overlap {
    --img-rotate: 0deg;
  }
  .pulse-wrap,
  .dot,
  .core {
    animation: none !important;
  }
  .header__logo path:first-child {
    transition: none !important;
  }
  .btn__text-inner,
  .btn__text-clone {
    transition: none !important;
    transform: none !important;
  }
}

@media (max-width: 767px) {
  .img-parallax-wrapper .full-img-project,
  .img-parallax-wrapper .project-img {
    top: 0;
    height: 100%;
  }
}
