/* ==========================================================================
   1. BASIS & SCROLLING
   ========================================================================== */
:root {
  --pad-x: 4vw;
  --color-bg: #f4f4f4;
  --color-text: #000;
  --ease-swiss: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-hover: cubic-bezier(0.16, 1, 0.3, 1);
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--color-text); color: var(--color-bg); }
img, video { max-width: 100%; display: block; }

/* ==========================================================================
   2. SCROLL REVEAL
   ========================================================================== */
.reveal-element {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-swiss), transform 0.8s var(--ease-swiss);
  will-change: opacity, transform;
}
.reveal-element.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   3. TYPOGRAFIE & LAYOUT (Bereinigt & Optmiert)
   ========================================================================== */
.text-muted { color: rgba(0, 0, 0, 0.6); }

.text-section,
.menu-wrapper,
.thank-you-section,
.legal-footer {
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 10;
  background: var(--color-bg);
}

.text-section { padding-top: 12vh; padding-bottom: 12vh; z-index: 2; }
.menu-wrapper { padding-top: 12vh; padding-bottom: 6vh; }
.thank-you-section { padding-top: 10vh; padding-bottom: 14vh; }
.legal-footer { padding-bottom: 6vh; }

.project-title {
  font-size: clamp(60px, 12vw, 180px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 4vh;
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 6vw; /* Zurück zu deinem originalen, gut funktionierenden Abstand */
  align-items: start;
  border-top: 1px solid var(--color-text);
  padding-top: 3vh;
}

/* --- Metadaten (Linke Spalte) --- */
.meta-table { width: 100%; }

.meta-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.5vh;
  margin-bottom: 1.5vh;
  border-bottom: 1px solid var(--color-text);
}
.meta-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.editorial-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 400;
  line-height: 1.2;
}

.meta-value { 
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  text-align: right; 
}

/* --- Fließtext (Rechte Spalte) --- */
.project-description {
  /* Ein solider, professioneller Mittelweg für perfekte Lesbarkeit */
  font-size: clamp(16px, 1.3vw, 20px); 
  line-height: 1.5; 
  font-weight: 300;
  max-width: 65ch; /* Der wahre Sweet Spot für ca. 70 echte Buchstaben pro Zeile */
  margin: -0.1em 0 0 0; /* Minimaler Ausgleich nach oben */
  text-rendering: optimizeLegibility;
  
  /* Schweizer Flattersatz */
  text-align: left;
  text-wrap: pretty; /* Vermeidet Hurenkinder und optimiert die Flatterkante */
  -webkit-hyphens: none;
  hyphens: none; 
}

.link-hover {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}
.link-hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.35s var(--ease-swiss);
}
.link-hover:hover::after { width: 100%; }

/* ==========================================================================
   4. PARALLAX
   ========================================================================== */
#parallax-container {
  position: relative;
  z-index: 1;
}

.parallax-section {
  width: 100%;
  height: 100svh;
  position: relative;
  z-index: 1;
  clip-path: inset(0 0 0 0);
}

.parallax-section::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100svh;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  transform: translateZ(0);
  will-change: transform;
}

@media (max-width: 1440px) and (min-width: 1025px) {
  .parallax-section::before { background-size: 100% auto; }
}

/* ==========================================================================
   PARALLAX VIDEO (Desktop & Basis)
   ========================================================================= */
.video-parallax {
  overflow: hidden;
  background-color: transparent; 
}

.video-parallax .bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  object-fit: cover; 
  z-index: -1;
  transform: translateZ(0);
  will-change: transform;
}

/* ==========================================================================
   NEUE RESPONSIVE LOGIK: HANDY VS. TABLET
   ========================================================================== */
@media (max-width: 768px) {
  .video-parallax .bg-video {
    object-fit: contain;
    object-position: center; 
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .video-parallax .bg-video {
    object-fit: cover;
    object-position: center;
  }
}

/* ==========================================================================
   5. MENÜ
   ========================================================================== */
.menu-heading { margin-bottom: 4vh; }

.links-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  list-style: none;
  border-top: 1px solid var(--color-text);
}

.link-item {
  display: grid;
  grid-template-columns: 3vw minmax(0, 1fr) 160px;
  gap: 3vw;
  align-items: flex-start;
  width: 100%;
  text-decoration: none;
  color: inherit;
  padding: 3vh 0;
  border-bottom: 1px solid var(--color-text);
  cursor: pointer;
  contain: layout;
  transition: opacity 0.4s ease;
}

.index-nr { margin-top: 0.6em; }
.link-text-wrapper {
  display: flex;
  align-items: center;
  font-size: clamp(40px, 8vw, 140px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  white-space: nowrap;
  text-transform: uppercase;
}

.meta-wrapper { position: relative; margin-top: 0.6em; height: 1.2em; width: 100%; }
.meta-item { position: absolute; top: 0; right: 0; white-space: nowrap; transition: transform 0.8s var(--ease-swiss), opacity 0.5s ease; }
.meta-year { transform: translateX(0); opacity: 1; }
.meta-category { transform: translateX(15px); opacity: 0; }

.hover-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  vertical-align: middle;
}

.replace-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 2.5em;
  overflow: hidden;
  white-space: nowrap;
  padding: 0 0.08em;
  margin: 0 -0.08em;
  will-change: max-width, opacity, padding, margin;
  transition: max-width 0.6s var(--ease-hover), opacity 0.4s ease,
              padding 0.6s var(--ease-hover), margin 0.6s var(--ease-hover);
}

.hover-image {
  width: 0;
  height: 1.2em;
  object-fit: cover;
  opacity: 0;
  border-radius: 2px;
  margin: 0;
  transform: scale(0.8) translateZ(0);
  transform-origin: center;
  will-change: width, margin, transform, opacity;
  transition: width 0.6s var(--ease-hover), margin 0.6s var(--ease-hover),
              transform 0.6s var(--ease-hover), opacity 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .links-container:hover .link-item { opacity: 0.25; }
  .links-container .link-item:hover { opacity: 1; }
  .link-item:hover .meta-year { transform: translateX(-15px); opacity: 0; }
  .link-item:hover .meta-category { transform: translateX(0); opacity: 1; }
  .link-item:hover .replace-letter {
    max-width: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
  }
  .link-item:hover .hover-image {
    width: 0.9em;
    opacity: 1;
    margin: 0 0.06em;
    transform: scale(1) translateZ(0);
  }
}

/* ==========================================================================
   6. EINBLICK
   ========================================================================== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2vw;
  align-items: stretch;
}

.left-col {
  grid-column: 1 / 7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 4vw;
}

.image-container {
  grid-column: 7 / 13;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2vw;
  align-items: start;
}

.thank-you-title {
  font-size: clamp(40px, 8vw, 140px);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.05em;
  margin: 0 0 5vh 0;
}
.thank-you-text {
  font-size: clamp(16px, 1.3vw, 20px); /* Synchronisiert mit .project-description */
  line-height: 1.5;
  font-weight: 300;
  max-width: 65ch;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}
.thank-you-text p { margin-bottom: 1.2em; }
.contact-block { margin-top: 5vh; }
.contact-label { display: block; margin-bottom: 0.5em; }
.thank-you-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
}
.offset-image { margin-top: 50%; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.legal-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-text);
  padding-top: 2.5vh;
}
.legal-link, .legal-copy { text-decoration: none; }
.legal-link {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}
.legal-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.35s var(--ease-swiss);
}
.legal-link:hover::after { width: 100%; }

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 1350px) {
  .thank-you-text, .project-description { max-width: 100%; }
}

@media (max-width: 1024px) {
  .reveal-element {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
  }
  .text-section { padding-top: 8vh; padding-bottom: 8vh; }
  .project-title { margin-bottom: 3vh; }
  .editorial-grid { grid-template-columns: 1fr; gap: 4vh; padding-top: 1.5vh; }
  .content-grid { grid-template-columns: 1fr; gap: 8vh; }
  .left-col { grid-column: 1 / -1; padding-right: 0; gap: 6vh; }
  .image-container { grid-column: 1 / -1; }
  .parallax-section::before { background-size: contain; }
  .menu-wrapper { padding-top: 8vh; }
  .link-item { grid-template-columns: auto 1fr; padding: 3vh 0; gap: 4vw; }
  .index-nr { margin-top: 0; }
  .meta-wrapper { display: none; }
  .hover-image { display: none !important; }
  .replace-letter {
    max-width: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .thank-you-title { margin-bottom: 3vh; }
  .offset-image { margin-top: 0; }
  .legal-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .legal-footer-inner .editorial-label {
    font-size: clamp(10px, 3vw, 12px);
  }
}

/* ==========================================================================
   9. DATENSCHUTZSEITE
   ========================================================================== */
main:has(.page-title) {
  padding: 10vh var(--pad-x) 8vh;
}

.page-title {
  font-size: clamp(42px, 8vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 300;
  margin-bottom: 8vh;
  text-transform: uppercase;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8vw;
  border-top: 1px solid var(--color-text);
  padding-top: 3vh;
}

.legal-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
}

.legal-content {
  max-width: 65ch; /* Synchronisiert mit Lauftext */
}

.legal-block {
  margin-bottom: 5vh;
}

.legal-block h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 1.2em;
}

.legal-block p {
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.5;
  margin-bottom: 1em;
  text-wrap: pretty;
}

.legal-block a,
.footer .back-link {
  color: inherit;
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

.legal-block a::after,
.footer .back-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--color-text);
  transition: width 0.35s var(--ease-swiss);
}

.legal-block a:hover::after,
.footer .back-link:hover::after {
  width: 100%;
}

.footer {
  padding: 0 var(--pad-x) 6vh;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-text);
  padding-top: 2.5vh;
}

.footer .back-link {
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.footer .back-link:hover {
  color: var(--color-text);
}

.footer span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  main:has(.page-title) {
    padding-top: 8vh;
  }
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 4vh;
  }
  .footer-inner {
    align-items: flex-start;
    gap: 1.5vh;
    flex-direction: column;
  }
}

/* ==========================================================================
   10. STARTSEITE (INDEX) SPEZIFISCH
   ========================================================================== */
body.page-index main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.page-index .menu-wrapper {
  padding-top: 2vh;
}

@media (max-width: 1024px) {
  body.page-index .menu-wrapper { 
    padding-top: 8vh; 
  }
}

