* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f4f4f5;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
  user-select: none;
}

/* Hide the radio inputs */
input[type="radio"] {
  display: none;
}

/* 1. Fullscreen Background Click-to-Reset */
.bg-reset {
  position: fixed;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.hint {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #64748b;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
}

/* 2. Square Stage */
.square-container {
  position: relative;
  z-index: 10;
  width: min(80vw, 380px);
  aspect-ratio: 1 / 1;
}

/* 3. Base Slide Styles */
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #FF6F15;
  /* border-radius: 24px; */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  text-align: center;
  gap: 1rem;
  cursor: pointer;

  /* Smooth transition used for normal entry and the left reset */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.vatop {
  justify-content: flex-start;
}

/* All slides (except slide 1) wait at -90deg and hidden */
.slide:not(.slide-1) {
  opacity: 0;
  transform: rotate(-90deg);
  pointer-events: none;
  z-index: 1;
}

/* 4. Slide 1 Initial State (0deg on page load) */
.slide-1 {
  opacity: 1;
  transform: rotate(0deg);
  pointer-events: auto;
  z-index: 5;
}

/* When NOT on page 1: Slide 1 stays parked at +90deg (hidden) */
:not(#p1):checked ~ .square-container .slide-1 {
  transform: rotate(90deg);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* 5. Active Slide State (0deg, visible) */
#p2:checked ~ .square-container .slide-2,
#p3:checked ~ .square-container .slide-3,
#p4:checked ~ .square-container .slide-4,
#p5:checked ~ .square-container .slide-5 {
  transform: rotate(0deg);
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}

/* 6. Forward Exit Animation for Intermediate Slides (2, 3, 4...) */
@keyframes forwardExit {
  0% {
    opacity: 1;
    transform: rotate(0deg);
    pointer-events: none;
  }
  85% {
    opacity: 0;
    transform: rotate(90deg);
    pointer-events: none;
  }
  /* Returns to -90deg while invisible, ready for any future rotation */
  100% {
    opacity: 0;
    transform: rotate(-90deg);
    pointer-events: none;
  }
}

#p3:checked ~ .square-container .slide-2,
#p4:checked ~ .square-container .slide-3,
#p5:checked ~ .square-container .slide-4 {
  animation: forwardExit 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 4;
}

/* Transparent click catcher to advance page */
.click-catcher {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 20;
}

/* Visual Accent in corner to highlight rotation */
.slide::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 10px;
  height: 10px;
  background: #FF6F15;
  border-radius: 50%;
}

/* Typography */
.badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFF;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h2 {
  font-size: 1.85rem;
  color: #FFF;
  line-height: 1.2;
}

p {
  color: #FFF;
  font-size: 0.95rem;
  line-height: 1.5;
}

.maximg-bot {
  position: absolute;
  bottom: 0px;
  left: 0rem;
  width: 100%;
  border-top: 1px white;
}
#kontakt {
  position: fixed;
  top: 40px;
  right: 30%;
  z-index: 30;
}
#kontakt a {
  background: none;
  font-size: 28px;
  color: #FF6F15;
}
#kontakt a:hover {
  color: white;
  background: #555;
  text-decoration: none;
}
  a:link { color: #FF6F15;
          text-decoration: none;
          background-color: white;
    }
  a:visited { color: #FF6F15;
          text-decoration: none
          background-color: white;    }
  a:hover { color: white;
          text-decoration: underline;
          background-color: #FF6F15;
    }
  a:active { color: #FF6F15;
          text-decoration: none;
          background-color: white;
    }