:root {
  --text: #666;
  --muted: #777;
  --line: #e6e6e6;

  --maxW-Middle: 1100px;

  --pad:60px;
  --maxW: 1300px;
  --light: #888;

  --topNavY:18px;   /* Abstand Navigation von oben */
  --mainTop:170px;  /* Abstand Inhalt von oben (wegen Nav + Circle) */
  --mainTopMobil: 100px;

  --navGap: 28px;                 /* Abstand zwischen den Punkten (Desktop) */
  --navFont: 28px;
  --fontSize: 16px;            /* Schriftgröße Navigation (Desktop) */
  --fontSizeMobile: 16px;
  --fontSizeDesktop: 20px;
  --fontSizeNav: 14px;
  --fontHero: 34px;
}

* { box-sizing: border-box; }

/* --- Grundlayout --- */
html {
  overflow-x: clip;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: var(--text);
  overflow-x: clip;
}

h1, h2, h3 {
  font-weight: 400;
  font-style: italic;
  margin-top: 2em;
}

h4 {
  font-size: 1.15em;
  font-weight: 500;
  margin-bottom: 0;
}

p{
  font-size: var(--fontSize);
}

a {
  text-decoration: underline;
  color:  var(--text);
}

a:hover {
  color:  var(--muted);
}

ul {
  line-height:2;
}

ul.no-bulletpoints {
  list-style: none;
  padding-left: 0;
}

.no-margin-top {
  margin-top: 0!important;
}
.no-margin-bottom {
  margin-bottom: 0!important;
}
/* =========================
   HOME / INTRO (Index)
   ========================= */

body.home {
  overflow: hidden;
}

.intro {
  min-height: 100vh;
  width: 100vw;
  display: grid;
  place-items: center;
  position: relative;
}

.intro__logo {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;

  opacity: 1;
  transform: scale(1);
  transition: opacity 600ms ease, transform 600ms ease;
}

.intro__logo img {
  display: block;
  width: min(520px, 78vw);
  height: auto;
  animation: logoPulse 3s ease-in-out infinite;
  will-change: transform;
}
.intro__logo:hover img{
  animation-play-state: paused;
}

@keyframes logoPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Zustand nach Trigger */
.intro.is-revealed .intro__logo {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.intro__nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  /*inset: 30rem 0;*/
  row-gap: var(--navGap);
  display: grid;
  grid-template-rows: repeat(4, min-content);
  grid-auto-rows: min-content;
  justify-items: center;
  align-items: center;
  place-items: center;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.intro.is-revealed .intro__nav {
  opacity: 1;
  pointer-events: auto;
}

.intro__nav a {
  display: inline-block;
  font-size: clamp(22px, 2.2vw, var(--fontHero));
  line-height: 1.9;
  text-decoration: none;
  color: #555;
  transition: opacity 200ms ease, transform 200ms ease;
}

.intro__nav a:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}

/*.intro__logo:focus-visible,
.intro__nav a:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 6px;
}*/


@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .intro__logo,
  .intro__nav,
  .intro__nav a {
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
/* Tablet/kleiner: enger + ggf. kleinere Schrift */
@media (max-width: 700px){
  :root{
    --navGap: 14px;
  }

  body.home .intro__nav{
    font-size: 20px;
  }
}

/* Mobil: 1 Spalte, damit es ruhig und “tight” wirkt */
@media (max-width: 420px){
  :root{
    --navGap: 18px;               /* enger auf Mobile */
    --navFont: 22px;              /* etwas kleiner */
  }

  body.home .intro__nav{
    font-size: var(--fontSizeMobile);
  }
}


/* ---------- HEADER ---------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  z-index: 10;
}

header nav {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 18px;
}

header nav a {
  text-decoration: none;
  color: var(--text);
  font-size: var(--fontSizeNav);
}

header nav a.is-active{
  color:#7f7f7f;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-title{
  width:100%;
  position: absolute;
  right: -95vw;
  display: flex;
  align-items: center;
}

.site-title img{
  height: 4rem;
  width: auto;
  display: block;
}

/* =========================
   MOBILE BURGER MENU
========================= */
/* Header Layout */
.header-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height: 80px;
  padding: 0 20px;
}

.nav-toggle{
  border:0;
  background:transparent;
  padding:10px;
  cursor:pointer;
}

.burger{
  display:block;
  width:26px;
  height:2px;
  background:currentColor;
  position:relative;
  color: var(--muted);
}
.burger::before,
.burger::after{
  content:"";
  position:absolute;
  left:0;
  width:26px;
  height:2px;
  background:currentColor;
}
.burger::before{ top:-8px; }
.burger::after{ top:8px; }

.main-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px 0;
}
/* Hidden muss IMMER wirklich unsichtbar sein (auch wenn andere Regeln display setzen) */
.main-nav[hidden] {
  display: none !important;
}

/* ---------- OPEN STATE ---------- */

.nav-toggle.is-open .burger {
  background: transparent; /* mittlere Linie verschwindet */
}

.nav-toggle.is-open .burger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-open .burger::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (min-width: 900px){
  .nav-toggle{ display:none; }

  .main-nav{
    display:flex;
    flex-direction:row;
    gap:18px;
    padding:0;
  }

  /* Auf Desktop ignorieren wir hidden */
  .main-nav[hidden]{
    display:flex !important;
  }
}


/* =========================
   ZITAT
========================= */
.hero-quote{
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  text-align:center;
  color: var(--muted);
  max-width: var(--maxW);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fontHero);
  line-height: 1.25;
  letter-spacing: 0.2px;
  margin: 0 0 140px;
}
#intro-hero {
  margin-top: 15rem;
  margin-bottom: 21rem;
}

/* --- Seiteninhalt */
#pageContent {
  padding-top: 100px;
  padding-left: 40px;
  padding-right: 40px;
  padding-bottom: 40px;
  box-sizing: border-box;
}

/* =========================
   ÜBER MICH – Bild = Text-Höhe
   ========================= */
.page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 5rem;
  align-items: stretch;     /* beide Zellen gleich hoch */
  max-width: var(--maxW);
  margin: 1.5rem auto 7rem auto;
}

.page-text{
  align-self: stretch;
}

.page-text p {
  line-height: 1.6;
  font-size: var(--fontSize);
}

.page-text.contact-page {
  min-height:55vh;
  min-width: 450px;
  text-align:center;
  align-content: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Bild-Container schrumpft */
.page-image {
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

/* Bild ist exakt so hoch wie Textblock rechts */
.page-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- MAIN (Leistungen) ---------- */
main{
  padding: var(--mainTop) var(--pad) 80px;
  min-height: 95vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  /*justify-content:flex-start;*/
}

main.intro {
  padding: var(--pad);
}

.wrap{
  max-width: var(--maxW);
  margin: 0 auto;
}

.wrap-imprint {
  width: var(--maxW);
  margin: 0 auto;
}

.wrap hr {
  margin: 4rem 0;
  border: 0;
  border-top: 1px solid var(--line);;
}


.content-center {
  text-align: center;
}

.projects{
  display:flex;
  flex-direction:column;
  gap: 80px; /* distance between entries */
  margin:0;
  padding:0;
  list-style:none;
}

.project-intro{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-nav{
  flex: 1;                 /* gleiche Breite links & rechts */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  text-decoration: none;
}

.intro-content{
  flex: 5;                 /* Mittelbereich größer */
  flex-direction: column;   /* <-- das ist der entscheidende Punkt */
  align-items: center;
  text-align: center;
}

/* Links */
.project-nav.prev{
  left: 0;
}

/* Rechts */
.project-nav.next{
  right: 0;
}

/* Pfeilform */
.project-nav.prev::before, .project-nav.next::after{
  content: "";
  width: 18px;
  height: 18px;
  border-top: 2px solid #444;
  border-right: 2px solid #444;
  transition: 0.2s ease;
}

/* Rotation */
.project-nav.prev::before{
  transform: rotate(-135deg);
}

.project-nav.next::after{
  transform: rotate(45deg);
}

/* Hover */
.project-nav:hover::before{
  border-color: #000;
}

.project-nav.prev:hover::before{
  transform: scale(1.1) rotate(-135deg);
}

.project-nav span {
  font-size: var(--fontSizeNav);
}

.projects a{
  text-decoration:none;
  color: var(--muted);
  text-align: center;
}

.projects a:hover .title{
  color: #777;
}

.title{
  display:block;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.1px;
  color: var(--muted);
}

.subtitle{
  display:block;
  margin-top: 6px;
  font-size: 14px;
  font-style: italic;
  color: #b0b0b0;
  letter-spacing: 0.2px;
}

/* Akkordeon */
.accordion {
  margin-top: 0.5rem;
  max-width: 60%;
}

.accordion > summary {
  font-size: 1.175em;
  font-weight: 400;
  cursor: pointer;
  list-style: none;          /* entfernt Standard-Marker in vielen Browsern */
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0;
  border-bottom: 1px solid #999;
}

/* Standard-Dreieck in WebKit entfernen */
.accordion > summary::-webkit-details-marker {
  display: none;
}

/* Eigener Marker */
.accordion > summary::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border-top: 2px solid #444;
  border-right: 2px solid #444;
  transform: rotate(135deg) translateX(2px) translateY(10px);
  transition: transform 180ms ease;
  margin-left: auto;
}

/* Wenn geöffnet: Pfeil drehen */
.accordion[open] > summary::after {
  transform: rotate(-45deg) translateY(-4px) translateX(-15px);
}

/* Liste etwas sauberer */
.leistungsliste {
  margin: 0.75rem 0 0 0;
  padding-left: 1.25rem;
  line-height: 2;
  transition: opacity 450ms ease, transform 450ms ease;
}


.image-row {
  margin: 1.5rem 0;
  margin-bottom: 4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Mobil: 2 nebeneinander */
  gap: 12px;
}

.image-row {
  grid-template-columns: repeat(4, 1fr); /* Desktop: 4 nebeneinander */
  gap: 16px;
}
.image-card {
  margin: 0 4rem;
}

.image-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;     /* sorgt für gleichmäßige Kacheln */
  object-fit: cover;       /* sauberer Zuschnitt */
  display: block;
  border-radius: 10px;     /* optional, an deinen Stil anpassen */
}

#grey-background-left, #grey-background-right {
  background-color: #efefef;
  position: relative;
  padding-top: 0.5rem;
  padding-bottom: 4rem;
}

/* der Hintergrund, der nach links rausläuft */
#grey-background-left::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -10%;
  background: #efefef;
  z-index: -1;
}

/* der Hintergrund, der nach links rausläuft */
#grey-background-right::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -100vw;
  left: -10%;
  background: #efefef;
  z-index: -1;
}

.contact-social {
  display: flex;
  align-items: center;     /* vertikal exakt mittig */
  gap: 12px;               /* Abstand zwischen Icon & Text */
  margin-top: 8px;
}

.contact-social img {
  width: 27px;             /* etwas ruhiger als 45px */
  height: auto;
  display: block;
}

.contact-social a {
  text-decoration: none;
}


/* __________
PROJEKTE
_____________ */

.project-text {
  max-width: var(--maxW);
  margin: 0 auto;
  line-height: 1.6;
  font-size: var(--fontSize);
}

.project-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.project-text p {
  margin: 0 0 16px;
}

.gallery--collage *{
  box-sizing: border-box;
}

.gallery--collage{
  max-width: var(--maxW) ;
  margin: 2rem auto 3rem;

  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 1.125rem;
  grid-auto-flow: row;

  overflow: visible;
}

/* Basis */
.gallery--collage .g-item{
  margin: 0;
  min-height: 10rem;
  min-width: 0;
  position: relative;
}

.gallery--collage .g-item {
  transform: translateY(var(--shift-y, 0));
  will-change: transform;
}

.gallery--collage .g-item span {
  display: none;
}

.gallery--collage img{
  width: 100%;
  display: block;
}

.up-1   { --shift-y: -0.5rem; }
.up-2   { --shift-y: -1rem; }
.up-3   { --shift-y: -1.5rem; }
.up-6   { --shift-y: -23rem; }

.down-1 { --shift-y: 0.5rem; }
.down-2 { --shift-y: 2.5rem; }
.down-3 { --shift-y: 5rem; }

.start-col-1  { grid-column-start: 1; }
.shift-col-1  { grid-column-start: 2; }
.shift-col-2  { grid-column-start: 3; }
.shift-col-3  { grid-column-start: 4; }
.shift-col-4  { grid-column-start: 5; }
.shift-col-5  { grid-column-start: 6; }
.shift-col-6  { grid-column-start: 7; }
.shift-col-15 { grid-column-start: 16; }
.shift-col-19 { grid-column-start: 20; }

/* Größen-Module (Desktop) */
.gallery--collage .g-xs       { grid-column-end: span 4;  min-height: 150px; } /* extra klein */
.gallery--collage .g-sm       { grid-column-end: span 7;  min-height: 150px; } /* klein */
.gallery--collage .g-md       { grid-column-end: span 9;  min-height: 240px; } /* mittel */
.gallery--collage .g-lg       { grid-column-end: span 11; min-height: 320px; } /* groß */
.gallery--collage .g-lg-flat  { grid-column-end: span 11; min-height: 100px; } /* groß & flach */
.gallery--collage .g-xl       { grid-column-end: span 24; min-height: 320px; } /* ganze Breite */
.gallery--collage .g-wide     { grid-column-end: span 15; min-height: 260px; } /* breit */
.gallery--collage .g-flat     { grid-column-end: span 15; min-height: 320px; overflow:hidden; } /* breit & flach */
.gallery--collage .g-flat img { width: 100%; height:320px; object-fit: cover; object-position: center 80%; display:block; }
.gallery--collage .g-flat-wide     { grid-column-end: span 20; min-height: 320px; overflow:hidden; } /* extra breit & flach */
.gallery--collage .g-flat-wide img { width: 100%; height:100%; object-fit: cover; object-position: center 80%; display:block; }
.gallery--collage .g-quad     { grid-column-end: span 7;  min-height: 320px; overflow: hidden; width:100%; } /* quadratisch */
.gallery--collage .g-quad img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover;}
.gallery--collage .g-pt-xs { grid-column-end: span 2;  min-height: 320px; } /* portrait extra small */
.gallery--collage .g-pt-s  { grid-column-end: span 4;  min-height: 320px; } /* portrait small */
.gallery--collage .g-pt-m  { grid-column-end: span 5;  min-height: 320px; } /* portrait middle */
.gallery--collage .g-pt-l  { grid-column-end: span 6;  min-height: 360px; max-height: 360px; } /* portrait tall */
.gallery--collage .g-pt-xl { grid-column-end: span 12; min-height: 450px; }

.gallery--collage .align-top    { align-self: flex-start; }
.gallery--collage .align-strech { align-self: stretch; }
.gallery--collage .align-strech img { height: 100%; width: 100%; object-fit: cover; }
.gallery--collage .align-bottom { align-content: flex-end; }


.gallery--collage .g-item div:hover, .gallery--collage .g-item a:hover {
  cursor: url('images/magnifying-glass-solid.svg') 10 10, zoom-in;
}

.height-auto { height: auto; }

.info-text {
  font-size: 0.7rem;
  width: 25vw;
}

figcaption {
  margin-left: 4.5rem;
}

/* Tablet */
@media (max-width: 1300px){
  .site-title {
    right: -92vw;
  }

  .gallery--collage{
    max-width: var(--maxW-Middle);
    margin: 1.5rem auto 2.5rem;
    gap: 16px;
  }

  .gallery--collage .g-sm   { min-height: 120px; } /* klein */
  .gallery--collage .g-md   { min-height: 210px; } /* mittel */
  .gallery--collage .g-lg   { min-height: 260px; } /* groß */
  .gallery--collage .g-wide { min-height: 230px; } /* breit */
  .gallery--collage .g-flat { min-height: 280px; }
  .gallery--collage .g-quad { min-height: 280px; }
  .gallery--collage .g-pt-s { min-height: 260px; } /* portrait small */
  .gallery--collage .g-pt-m { min-height: 260px; } /* portrait middle */
  .gallery--collage .g-pt-l { min-height: 320px; max-height: 330px; }
  .gallery--collage .g-xl   { min-height: 260px; }
  .gallery--collage .g-pt-xl {grid-column-end: span 12; min-height: 190px;}

  figcaption {
    margin-left: 4rem;
  }
}

/* Tablet */
@media (max-width: 900px){
  .gallery--collage{
    grid-template-columns: repeat(12, 1fr);
    max-width: 720px;
    gap: 16px;
  }

  .gallery--collage .g-item span {
    display: block;
    z-index: 9;
    position: absolute;
    bottom: 0%;
    width: 2rem;
    right: 7%;
  }

  .gallery--collage .g-sm   { grid-column-end: span 4; }
  .gallery--collage .g-md   { grid-column-end: span 6; }
  .gallery--collage .g-lg   { grid-column-end: span 8; min-height: 260px; }
  .gallery--collage .g-wide { grid-column-end: span 10; }
  .gallery--collage .g-flat { grid-column-end: span 12; min-height: 260px; }
  .gallery--collage .g-quad { grid-column-end: span 6; min-height: 260px; }
  .gallery--collage .g-pt-s   { grid-column-end: span 3; min-height: 260px; }
  .gallery--collage .g-pt-m   { grid-column-end: span 6; min-height: 260px; }
  .gallery--collage .g-pt-l   { grid-column-end: span 6; min-height: none; max-height: none; }
  .gallery--collage .g-xl   { grid-column-end: span 12; min-height: 260px; }
  .gallery--collage .g-pt-xl {grid-column-end: span 6; min-height: 190px;}

  .mobile-full-width {
    grid-column-end: span 12 !important;
    min-height: 100px !important;
  }

  .info-text {
    font-size: 0.7rem;
    width: 45vw;
  }

  .shift-col-1 { grid-column-start: 1; }
  .shift-col-2 { grid-column-start: 1; }
  .shift-col-3 { grid-column-start: 1; }
  .shift-col-4 { grid-column-start: 2; }
  .shift-col-5 { grid-column-start: 2; }
  .shift-col-6 { grid-column-start: 2; }

  .down-1 { --shift-y: 0rem; }
  .down-2 { --shift-y: 0rem; }
  .down-3 { --shift-y: 0rem; }

  figcaption {
    margin-left: 2.5rem;
  }
}

/* Mobile */
@media (max-width: 490px){
  .gallery--collage{
    grid-template-columns: repeat(6, 1fr);
  }

  /* auf Mobile ruhiger: alles 2 Spalten breit */
  .gallery--collage .g-sm {grid-column-end: span 2; min-height: 90px;}
  .gallery--collage .g-md {grid-column-end: span 4; min-height: 150px;}
  .gallery--collage .g-lg {grid-column-end: span 6; min-height: 190px;}
  .gallery--collage .g-xl { grid-column-end: span 6; min-height: 230px; }

  .mobile-full-width {
    grid-column-end: span 6 !important;
  }

  .info-text {
    font-size: 0.7rem;
    width: 75vw;
  }
  .gallery--collage .g-wide {grid-column-end: span 6; min-height: 150px;}
  .gallery--collage .g-flat {grid-column-end: span 6; min-height: 190px;}
  .gallery--collage .g-quad {grid-column-end: span 4; min-height: 190px;}
  .gallery--collage .g-pt-s {grid-column-end: span 2;min-height: 190px;}
  .gallery--collage .g-pt-m {grid-column-end: span 3; min-height: 190px;}
  .gallery--collage .g-pt-xl {grid-column-end: span 3; min-height: 190px;}

  .shift-col-1,
  .shift-col-2,
  .shift-col-3,
  .shift-col-4,
  .shift-col-5,
  .shift-col-6
  {
    grid-column-start: 1;
    align-content: flex-end;
  }

  .gallery--collage img{
    object-fit: contain;
  }
  .gallery--collage .g-quad img {
    aspect-ratio: 1 / 1;
  }

  figcaption {
    margin-left: 1.5rem;
  }
}


#lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);

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

  opacity: 0;
  pointer-events: none;

  transition: opacity .25s ease;
  z-index: 9999;
}

#lightbox.active{
  opacity: 1;
  pointer-events: auto;
}

#lightbox img{
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;

  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}

#lightbox button{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  padding: 20px;
}

.lb-prev{
  left: 20px;
}

.lb-next{
  right: 20px;
}

/* ---------- FOOTER ---------- */
.footer-line{
  height: 1px;
  background: var(--line);
  min-width: 100%;
}

#footerNav{
  display: inline-flex;
  gap: 12px;
  font-size: 14px;
  color: var(--light);
  align-items:center;
}

.footer-wrap{
  text-align: center;
  min-height: 30px;
  margin-top: 0.5rem;
}

#footerNav a{
  color: var(--light);
  text-decoration:none;
}

#footerNav a:hover{ text-decoration: underline; }

.pipe{ color: var(--light); }

/* ---------- SCROLL-TO-TOP ---------- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(200%);
  transition: transform 0.3s, opacity 0.2s;
  z-index: 50;
}

.scroll-top--visible {
  opacity: 0.6;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top::before {
  content: "";
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-top: 1.5px solid var(--text);
  border-right: 1.5px solid var(--text);
  transform: rotate(-45deg) translateY(2px);
}

.scroll-top:hover { opacity: 1; }

@media (max-width: 490px) {
  #footerNav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .copyright {
    flex-basis: 100%;
    text-align: center;
  }
  #footerNav .pipe:last-of-type {
    display: none;
  }
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  header nav { left: 20px; }
  header nav a {
    font-size: var(--fontSizeDesktop);
  }
  .site-title { right: -85vw; }
  #headerNav{
    background-color: white;
    margin-top: 10rem;
    width: 100vw;
    box-shadow: 0 4px 6px -6px var(--muted);
    padding-left: 30px;
    padding-bottom: 2rem;
    margin-left: 0rem;
    position: absolute;
    left: 0;
  }

  .page-grid { grid-template-columns: 1fr; }
  .page-text.contact-page {
    min-height: 25px;
    min-width:93vw;
  }

  .page-image { min-height: 500px; }

  .page-image img {
    height: auto;
    aspect-ratio: 4 / 5;
  }
  .project-nav span {
    display: none;
  }
  .accordion {
    max-width: 95%;
  }

  #grey-background-left::before{
    right: 0;
    left: 0;
  }

  #grey-background-right::before{
    right: 0;
    left: 0;
  }

}

@media (max-width: 768px){
  :root {
    --pad: 15px;
  }
  .page-grid{
    grid-template-columns: 1fr;
  }

  .page-image{
    height: auto;                 /* nicht 100% */
    aspect-ratio: 4 / 5;          /* gibt Höhe -> Bild verschwindet nicht */
    min-height: 280px;            /* Fallback, falls aspect-ratio nicht greift */
  }

  .page-text p {
    font-size: var(--fontSizeMobile);
  }

  .project-meta {
    white-space: pre;
  }
  .project-meta span{
    display: none;
  }

  #intro-hero {
    margin-top:5rem;
    margin-bottom:8rem;
  }

  main {
    padding: var(--mainTopMobil) var(--pad) 80px;
  }

  .project-nav span {
    display: none;
  }

  #grey-background-left, #grey-background-right {
    padding-left: 0.5rem;
  }

}

@media (max-width: 420px){

  .site-title { right: -80vw; }

   #headerNav{
     gap: 10px;
     background-color: white;
     font-size: 22px !important;
     margin-top: 115px;
     width: 100vw;
     box-shadow: 0 4px 6px -6px var(--muted);
     padding-left: 30px;
     margin-left: 0rem;
     position: absolute;
     left: 0;
   }

   .project-nav span {
     display: none;
   }

   .image-row {
     grid-template-columns: 1fr;
   }

  .image-card {
    margin: 0 2rem;
  }

  .wrap-imprint {
    max-width: 90vw;
  }

}
