:root {
  --primary-color: #ffcc33;
  --secondary-color: black;
  --logo-height-desktop: 200px;
  --logo-height-mobile: 150px;
  --transition-duration: 0.3s;
  --font-size-h2-desktop: 2rem;
  --font-size-h2-mobile: 1.6rem;
  --font-size-p-desktop: 1.2rem;
  --font-size-p-mobile: 1.1em;
}

:root {
  --logo-height: var(--logo-height-desktop);
  --font-size-h2: var(--font-size-h2-desktop);
  --font-size-p: var(--font-size-p-desktop);
}

@media (max-width: 768px) {
  :root {
    --logo-height: var(--logo-height-mobile);
    --font-size-h2: var(--font-size-h2-mobile);
    --font-size-p: var(--font-size-p-mobile);
  }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--primary-color);
  font-family: sans-serif;
  scroll-behavior: smooth;
}

section {
  min-height: 100vh;
  padding: var(--logo-height) 2rem 6rem 2rem;
  box-sizing: border-box;
  z-index: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 1s ease;
}

section.visible {
  opacity: 1;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

#overlay {
  position: fixed;
  top: 1rem;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  z-index: 10;
  box-sizing: border-box;
}

#logo {
  height: var(--logo-height);
}

#logo-link {
  display: inline-block;
  z-index: 11;
}

#menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding-right: 3rem;
  pointer-events: auto;
  transition: opacity var(--transition-duration) ease, transform var(--transition-duration) ease;
}

#menu a {
  text-decoration: none;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
  border-radius: 0.5rem;
  transition: transform 0.2s ease;
  background: var(--primary-color);
}

#menu a:hover,
#menu a.active {
  transform: rotate(-2deg) scale(1.05);
}

#menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--secondary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-duration) ease;
}

#menu a.active::after,
#menu a:hover::after {
  transform: scaleX(1);
}

#burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 11;
  position: relative;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--secondary-color);
  transition: all var(--transition-duration) ease;
  margin: 3px 0;
}

.bar:nth-child(1).close {
  transform: rotate(45deg) translate(5px, 5px);
}

.bar:nth-child(2).close {
  transform: rotate(-45deg) translate(5px, -5px);
}

.bar:nth-child(3).hide {
  display: none;
}

.button {
  background: var(--primary-color);
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: transform var(--transition-duration) ease;
  margin-top: 1rem;
  text-decoration: none;
}

@keyframes wobble {
  0% { transform: scale(1); }
  50% { transform: scale(1.1) rotate(-1deg); }
  100% { transform: scale(1); }
}

.button.clicked {
  animation: wobble 0.3s ease;
}

section h2 {
  font-size: var(--font-size-h2);
  margin-bottom: 1rem;
}

section p {
  max-width: 700px;
  font-size: var(--font-size-p);
  line-height: 1.5rem;
  padding: 0 1rem; 
}

@media (max-width: 768px) {
  #menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    z-index: 9;
  }

  #menu.show {
    display: flex;
    animation: slideDown var(--transition-duration) ease-out forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #burger {
    display: flex;
  }
}

.gallery {
  display: block;
  overflow: hidden;
  padding: 2rem 1.2rem;
}

/* Desktop: zwei versetzte Reihen */
.row {
  display: flex;
  gap: 1rem;
  margin-bottom: -4rem;
  padding-bottom: 4rem;
}

.row.offset {
  margin-left: calc(6rem + 0.5rem); /* halbe Bildbreite + halber Gap */
}

.row img {
  width: 12rem;
  height: 12rem;
  object-fit: cover;
  flex-shrink: 0;
  clip-path: url(#hexClip);
  -webkit-clip-path: url(#hexClip);
  transition: transform 0.3s ease;
  display: block;
}

.row img:hover {
  transform: scale(1.4);
  z-index: 10;
}


/* Mobile: beide Reihen horizontal nebeneinander, scrollbar */
@media (max-width: 768px) {
  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: 100vw;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge (alt) */
  }

  .gallery img {
      scroll-snap-align: center;
      flex: 0 0 55vw;
      height: 55vw;
      object-fit: cover;
    }

  .row,
  .row.offset {
    display: contents; /* löst die Reihen auf */
  }

  .gallery::-webkit-scrollbar {
      display: none; /* Chrome, Safari, Edge (neu) */
  }
}

/* Entfernen des Hover-Effekts auf Touch-Geräten */
@media (hover: none) and (pointer: coarse) {
  .row img {
      transform: none; /* Deaktiviert den Hover-Effekt auf Touchscreens */
  }
}

p.contact-link a {
  display: inline-block;
  margin-bottom: 0.5rem;
}

p a {
  color: var(--secondary-color);
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: transform 0.2s ease;
}

p a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--secondary-color);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.3s ease;
}

p a:hover {
  transform: rotate(-1deg) scale(1.03);
}

p a:hover::after {
  transform: scaleX(0);
}

p a:active {
  animation: wobble 0.3s ease;
  border-radius: 0.2rem;
}

@keyframes wobble {
  0% { transform: scale(1); }
  50% { transform: scale(1.08) rotate(-0.5deg); }
  100% { transform: scale(1); }
}

.video-container {
  max-width: 600px;
  margin: 2rem auto;
}
.video-container video {
  width: 100%;
  border-radius: 7px;
}

.slogan .line1,
.slogan .line2 {
  opacity: 0;
  animation: fadeInUp 1s forwards;
}

.slogan .line2 {
  animation-delay: 0.8s;
}

@keyframes fadeInUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}