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

html,
body {
  height: 100%;
  overscroll-behavior: none;
  touch-action: pan-y;
}

body {
  font-family: Helvetica Neue, Arial, sans-serif;
  background: #fff;
  overflow: hidden;
}

/* =========================
   ONBOARDING
========================= */
.onboarding {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #c6ccb2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#onboarding-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.intro-words {
  position: relative;
  z-index: 2;
}

.intro-words div {
  color: #fff;
  font-size: 24px;
  opacity: 0;
  animation: fadeWord 0.7s forwards;
  text-align: center;
}

.intro-words div:nth-child(1) {
  animation-delay: 0.2s;
}
.intro-words div:nth-child(2) {
  animation-delay: 0.6s;
}
.intro-words div:nth-child(3) {
  animation-delay: 1s;
}
.intro-words div:nth-child(4) {
  animation-delay: 1.4s;
}

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

/* =========================
   TOPBAR
========================= */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 30px;
  background: #168b37;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
  transition: background-color 0.6s ease;
}

.topbar a,
.topbar span {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.topbar .home {
  font-weight: 500;
  cursor: pointer;
}

/* Toggle */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 14px;
}

#toggle-label {
  opacity: 0.9;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: white;
}

.toggle {
  width: 46px;
  height: 22px;
  border: 1px solid white;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: background 0.3s ease;
}
.toggle-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  gap: 10px;

  color: white;
  font-size: 14px;
  white-space: nowrap;
}
#toggle-label {
  width: 70px; /* fixiert Layout-Breite */
  text-align: right;
}

.toggle-knob {
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* aktiv state */
.toggle.active {
  background: rgba(255, 255, 255, 0);
}

.toggle.active .toggle-knob {
  transform: translateX(24px);
  background: rgba(0, 0, 0, 0);
  border: 1px solid white;
}

/* =========================
   TITLE STRIP
========================= */
.titlebox {
  position: fixed;
  top: 30px;
  width: 100%;
  height: 120px;
  background: #fff;
  border-bottom: 1px solid #000;
  overflow: hidden;
  z-index: 900;
}

.track {
  display: flex;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project {
  flex: 0 0 100vw;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 16px;
  cursor: pointer;
}

.num {
  font-size: 12px;
  letter-spacing: 0.12em;
  transform: translateY(24px);
}

.title {
  font-size: clamp(28px, 7vw, 90px);
  line-height: 1;
  letter-spacing: -0.02em;
}

/* =========================
   GALLERY
========================= */
.gallery {
  position: fixed;
  top: 150px;
  width: 100vw;
  height: calc(100vh - 150px);
  background: #000;
  overflow: hidden;
  transform: scaleX(-1);
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-item {
  flex: 0 0 100vw;
  background-size: cover;
  background-position: center;
  transform: scaleX(-1);
  cursor: pointer;
}

/* =========================
   ABOUT
========================= */
.about {
  position: fixed;
  top: 30px;
  left: 0;
  width: 100%;
  height: calc(100vh - 30px);
  background: #fff;
  z-index: 1500;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.about.active {
  opacity: 1;
  pointer-events: all;
}

.about-inner {
  position: relative;
  z-index: 1;

  display: flex;
  gap: 80px;
  align-items: center;

  max-width: 1000px;
  padding: 40px 24px;
}

#about-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* image */
.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 100%;
  max-width: 320px;
  border: 1px solid #000;
}

/* text */
.about-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.intro {
  font-size: 48px;
  font-weight: 500;
  line-height: 1.05;
}

.text {
  font-size: 14px;
  line-height: 1.2;
  text-align: justify;
  hyphens: auto;
}

.outro {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.contact {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
}

.contact a {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: 0.2s;
}

.contact a:hover {
  border-bottom: 1px solid #000;
}

/* =========================
   PROJECT VIEW
========================= */
.project-view {
  position: fixed;
  top: 30px;
  left: 0;
  width: 100%;
  height: calc(100vh - 30px);

  background: #fff;
  z-index: 1400;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;

  overflow-y: scroll;
}

.project-view.active {
  opacity: 1;
  pointer-events: all;
}

.project-content {
  max-width: 100%;
  line-height: 1.6;
}

.project-title {
  font-size: 32px;
  font-weight: 400;
  padding: 16px 16px 0;
}

.project-text {
  font-size: 14px;
  padding: 0 16px 16px;
  max-width: 80ch;
}

/* gallery */
/* .project-gallery {
  display: masonry;
  border-top: 1px solid #000;
} */
/* .project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid #000;
} */
.project-gallery {
  column-count: 3;
  column-gap: 0;
  border-top: 1px solid #000;
  padding-bottom: 120px;
}
.gallery-media {
  width: 100%;
  display: block;
  break-inside: avoid;
}

.gallery-media.large {
  transform: scale(1.08);
}

.gallery-media.xl {
  transform: scale(1.16);
}
*/

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1000px) {
  .project-gallery {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .project-gallery {
    column-count: 1;
  }

  .title {
    font-size: 52px;
  }
}

/* about responsive */
@media (max-width: 900px) {
  .about {
    align-items: flex-start;
  }

  .about-inner {
    flex-direction: column;
    gap: 32px;
    width: 100%;
    padding: 40px 20px 120px;
  }

  .intro {
    font-size: clamp(36px, 10vw, 64px);
  }

  .text {
    text-align: left;
    hyphens: none;
    line-height: 1.45;
  }

  .outro {
    font-size: 12px;
  }
}
