/* =====================================================
   LOCAL FONTS: Inter (self-hosted)
   ===================================================== */

  @font-face{
    font-family: "Inter";
    src: url("../fonts/inter/Inter-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  @font-face{
    font-family: "Inter";
    src: url("../fonts/inter/Inter-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
  }
  @font-face{
    font-family: "Inter";
    src: url("../fonts/inter/Inter-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
  }
  @font-face{
    font-family: "Inter";
    src: url("../fonts/inter/Inter-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
  @font-face{
    font-family: "Inter";
    src: url("../fonts/inter/Inter-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
  }



/* =====================================================
   LANDINGPAGE (nur wenn body.landing)
   ===================================================== */



body.landing {
  --margin-x: 8vw;
  --margin-y: 8vh;
  --bg: #0b0b0b;

  --fly-distance: 18vmin;
  --fly-duration: 900ms;
  --fly-ease: cubic-bezier(.2,.8,.2,1);

  background: var(--bg);
}

body.landing,
body.landing html {
  height: 100%;
}

body.landing {
  margin: 0;
}

body.landing .stage {
  height: 100vh;
  width: 100%;
  padding: var(--margin-y) var(--margin-x);
  box-sizing: border-box;

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

body.landing .frame {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Alle PNGs übereinander */
body.landing .layer {
  position: absolute;
  inset: 0;
  margin: auto;

  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;

  object-fit: contain;
  pointer-events: none;

  opacity: 0;
  transform: translate(var(--from-x, 0), var(--from-y, 0));
  will-change: transform, opacity;
}

/* Einflug */
body.landing .layer.enter {
  animation: landingFlyIn var(--dur, var(--fly-duration)) var(--fly-ease) forwards;
}

@keyframes landingFlyIn {
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

/* =====================================================
   ROOT / VARIABLEN
   ===================================================== */

:root {
  --bg: #ffffff;
  --text: #0b0b0c;
  --muted: #5a5a5f;
  --line: #0b0b0c;

  /* Layout */
  --pad-x: 50px;
  --header-h: 50px;
  --footer-h: 35px;

  /* Typografie */
  --title-size: clamp(34px, 4.8vw, 74px);
  --meta-size: clamp(14px, 1.35vw, 18px);

  /* Interaction */
  --hover-scale: 1.06;

  /* Preview */
  --preview-w: min(420px, 34vw);
  --preview-right: 50px;
}

/* =====================================================
   RESET / BASE
   ===================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =====================================================
   LAYOUT WRAPPER
   ===================================================== */

.full {
  width: 100%;
  padding-inline: var(--pad-x);
}

/* =====================================================
   HEADER & FOOTER (FIX 50px)
   ===================================================== */

.site-footer {
  height: var(--header-h);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  height: var(--header-h);
}

.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent var(--pad-x),
    var(--line) var(--pad-x),
    var(--line) calc(100% - var(--pad-x)),
    transparent calc(100% - var(--pad-x))
  );
}

.site-footer {
  height: var(--footer-h);
  margin-top: 0px;
  font-size: 14px;
}

/* Gemeinsame innere Struktur */
.header-inner,
.footer-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .full,
.site-footer .full {
  height: 100%;
}

.legal-link{
  position: fixed;
  right: 14px;
  bottom: 12px;
  font-size: 12px;
  text-decoration: none;
  color: #999;
  z-index: 9999;
}

.legal-link:hover{
  color: #fff;
  text-decoration: underline;
}


/* =====================================================
   LOGO
   ===================================================== */

.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-img {
  height: 100%;
  max-height: 34px; /* Luft nach oben/unten */
  width: auto;
  display: block;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.nav {
  position: relative;
  display: flex;
  gap: 32px;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  padding-bottom: 6px;
}

/* Unterstreichung */
.nav-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background-color: var(--text);
  transition: left 300ms ease, width 300ms ease;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =====================================================
   OVERVIEW / LIST
   ===================================================== */

.overview {
  padding: 0 0 10px;
}

.list {
  border-top: 2px solid var(--line);
}

.row {
  width: 100%;
  display: block;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  padding: 14px 0;
  text-align: left;
  cursor: pointer;
}

.row:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.25);
  outline-offset: 6px;
}

/* =====================================================
   ROW CONTENT
   ===================================================== */

.row-content {
  display: flex;
  align-items: baseline;
  gap: 22px;
  width: 100%;
}

.scale-target {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;

  transform-origin: left center;
  transition: transform 180ms ease;
  will-change: transform;
}

.row:hover .scale-target {
  transform: scale(var(--hover-scale));
}

.row-title {
  display: inline-block;
  font-size: var(--title-size);
  line-height: 1.05;
  padding-block: 0.08em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-right {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: var(--meta-size);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  text-align: right;
}

/* =====================================================
   PREVIEW FLOATING IMAGE
   ===================================================== */

.preview {
  position: fixed;
  right: var(--preview-right);
  top: 0;

  width: var(--preview-w);
  transform: translateY(-50%) translateX(22px) scale(0.98);
  opacity: 0;
  pointer-events: none;

  transition:
    opacity 220ms ease,
    transform 420ms cubic-bezier(.2,.8,.2,1);

  z-index: 3000; 
}

.preview.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.preview img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
}

/* =====================================================
   RESPONSIVE (HOME/LIST)
   ===================================================== */

@media (max-width: 900px) {
  :root {
    --pad-x: 20px;
    --preview-right: 20px;
    --preview-w: min(360px, 70vw);
  }
}



.page-divider {
  width: 100%;
  height: 0;
  border-top: 2px solid var(--line);
}


@media (max-width: 780px) {

  /* Sicherheit: kein horizontaler Overflow auf Mobile */
  html, body { overflow-x: hidden; }

  /* WICHTIG: Egal welcher Wrapper flex ist – alle auf Column zwingen */
  .row,
  .row-content,
  .scale-target{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100%;
    min-width: 0;
  }

  .row{ padding: 18px 0; }

  /* Titel: blau + Umbruch erlauben */
  .row-title{
    color: #000000;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
  }

  /* Subtitle: neue Zeile + rechtsbündig + darf NIE rauslaufen */
  .row-right{
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    text-align: right;

    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;

    align-self: flex-end; /* rechts an die Kante */
  }

  .preview{ display: none; }
}








/* =========================================
   CUSTOM CURSOR
   ========================================= */

/* Systemcursor wirklich überall aus */
html, body,
a, button, .row,
[role="button"],
input, textarea, select, label {
  cursor: none !important;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;

  pointer-events: none;
  z-index: 9999;

  transform: translate(-50%, -50%);
  transition:
    width 160ms ease,
    height 160ms ease,
    background-color 160ms ease;

  /* Invert */
  mix-blend-mode: difference;
}

/* Hover-Zustand für klickbare Elemente */
.custom-cursor.is-hover {
  width: 42px;
  height: 42px;
}

/* =========================================
   MEDIA SLIDESHOW (global – wie vorher)
   ========================================= */

.media-slideshow .media-box{
  position: relative;
}

.media-slideshow img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  /*transition: opacity 600ms ease;*/
}

.media-slideshow img:first-child{
  position: relative;
  opacity: 1;
}

/* =====================================================
   Projektseiten – SPLIT LAYOUT
   (nur aktiv auf body.project-split)
   ===================================================== */

body.project-split{
  /* Seite soll genau wie vorher funktionieren: nur rechts scrollt */
  overflow: hidden;
  background: #000000;

  /* Projekt-spezifische Variablen (nicht global!) */
  --pe-left-bg: #f5f5f5;
  --pe-right-bg: #000000;
  --pe-split-left: 25%;
  --pe-split-right: 75%;
  --pe-col-pad: 25px;
  --pe-rule: 2px;
}

/* Split Grid */
body.project-split .split{
  display: grid;
  grid-template-columns: var(--pe-split-left) var(--pe-split-right);
  height: 100vh;
  width: 100%;
}

/* LEFT (fixed) */
body.project-split .left{
  height: 100vh;
  background: var(--pe-left-bg);
}

body.project-split .left-inner{
  height: 100%;
  display: grid;
  grid-template-rows: var(--header-h) 1fr var(--footer-h);
}

/* Header/Footer nur links – ohne Linien */
body.project-split .left header.site-header,
body.project-split .left footer.site-footer{
  margin: 0;
  background: transparent;
}

body.project-split .left .full{
  height: 100%;
  padding-inline: var(--pe-col-pad);
}

body.project-split .left .header-inner,
body.project-split .left .footer-inner{
  height: 100%;
}

/* Content links */
body.project-split .left-content{
  padding-inline: 15px; /* <-- dein gewünschtes Padding */
  padding-block: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;

  /* WICHTIG: verhindert "rausdrücken" in Flex-Layouts */
  min-width: 0;
}

body.project-split .left-top,
body.project-split .left-bottom{
  min-width: 0; /* Shrinking erlauben */
}


/* Split-LEFT: Header-Linie (pseudo-element) AUS */
body.project-split .left header.site-header::after{
  content: none !important;
  display: none !important;
}


body.project-split .left-top{
  padding-top: 0px;
}

body.project-split .rule{
  height: var(--pe-rule);
  background: #000;
  width: 100%;
}

body.project-split .project-title{
  margin: 14px 0 0;
  font-size: clamp(36px, 3.2vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-weight: 600;

  /* Umbruch robust machen */
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

body.project-split .project-subtitle{
  margin: 10px 0 0;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: black;
  font-weight: 500;
}

body.project-split .left-bottom{
  padding-bottom: 0px;
}

body.project-split .bottom-copy{
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  /*max-width: 46ch;*/

  /* Umbruch robust machen */
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

/* RIGHT (scrollable) */
body.project-split .right{
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--pe-right-bg);
}

body.project-split .right-inner{
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Gallery */
body.project-split .media{
  display: grid;
  gap: 0;
}

body.project-split .media-item{
  display: flex;
  justify-content: center;
  margin: 0;
}

body.project-split .media-item + .media-item{
  margin-top: 22px;
}

body.project-split .media-item .media-box{
  width: 100%;
  max-width: 100%;
}

body.project-split .media-item img{
  display: block;
  width: 100%;
  height: auto;
}

body.project-split .project-nav {
  margin-top: 100px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.project-split .project-nav-btn {
  font-size: 20px;          /* etwas größer */
  font-weight: 100;         /* fett */
  text-decoration: none;
  color: var(--text);
  line-height: 1;
  transition: transform 160ms ease, opacity 160ms ease;
}

body.project-split .project-nav-btn:hover {
  transform: scale(1.15);
  opacity: 0.75;
}

/* =====================================================
   Projektseiten – MOBILE SINGLE COLUMN (FINAL)
   ===================================================== */

/* Mobile-Layout standardmäßig verstecken */
body.project-split .pe-mobile{
  display: none;
}

@media (max-width: 900px){

  /* Scroll wieder erlauben (Desktop nutzt overflow:hidden) */
  body.project-split{
    overflow: auto !important;
    height: auto !important;
  }

  /* Desktop-Split ausblenden */
  body.project-split .split{
    display: none !important;
  }

  /* Mobile-Layout zeigen */
  body.project-split .pe-mobile{
    display: block;
    background: var(--bg);
    color: var(--text);
  }

  /* =========================
   HEADER: sticky
   ========================= */
  body.project-split .pe-mobile .site-header{
    position: sticky;
    top: 0;
    z-index: 2000;
    background: var(--bg);
  }

  /* =========================
    Weißer Bereich UNTER dem Header (full width)
    Linie oben im weißen Bereich, eingerückt
    ========================= */
  body.project-split .pe-mobile .site-header::after{
    content: "";
    display: block;

    /* Höhe: Linie + 10px Weißraum */
    height: calc(var(--pe-rule) + 10px);

    /* Weißer Bereich full width */
    background:
      /* Linie (eingezogen) */
      linear-gradient(
        to right,
        transparent 19px,
        var(--line) 19px,
        var(--line) calc(100% - 19px),
        transparent calc(100% - 19px)
      ) 0 0 / 100% var(--pe-rule) no-repeat,
      /* Weißfläche darunter */
      #fff;

    box-sizing: border-box;
  }

  /* =========================
     Divider im Content: normal
     ========================= */
  body.project-split .pe-divider{
    height: var(--pe-rule);
    background: var(--line);
    width: 100%;
    margin: 14px 0;
  }

  /* =========================
     Bilder: schwarzer Hintergrund full-bleed
     ========================= */
  body.project-split .pe-mobile .pe-media{
    background: var(--pe-right-bg);
    padding: 14px 0;

    /* Full-bleed bis zum Viewport-Rand */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);

    display: grid;
    gap: 0;
  }

  body.project-split .pe-mobile .pe-media:first-of-type{
    padding-top: 0;
  }

  body.project-split .pe-mobile .media-item{
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    margin: 0;
    display: flex;
    justify-content: center;

    /* Luft fürs Bild */
    padding: 0 16px;
    box-sizing: border-box;
  }

  body.project-split .pe-mobile .media-item + .media-item{
    margin-top: 18px;
  }

  body.project-split .pe-mobile .media-box{
    width: 100%;
    max-width: 100%;
  }

  body.project-split .pe-mobile .media-box img{
    width: 100%;
    height: auto;
    display: block;
  }

  /* =========================
     Textbereich: normal
     ========================= */
  body.project-split .pe-mobile .pe-info{
    position: static;
    z-index: auto;
    background: var(--bg);
    padding-top: 16px;
  }

  /* =========================
     Cursor auf Mobile deaktivieren
     ========================= */
  html, body, a, button{
    cursor: auto !important;
  }

  .custom-cursor{
    display: none;
  }
}

/* =========================================
   SLIDESHOW – SLIDE LEFT → RIGHT (neu)
   ========================================= */

.media-slideshow-slide .media-box{
  position: relative;
  overflow: visible; /* wichtig: nicht clippen */
}

/* Startzustand: links außerhalb der rechten Spalte */
.media-slideshow-slide img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;

  opacity: 0;
  transform: translateX(calc(-100% - 80px));

  transition:
    transform 900ms cubic-bezier(.2,.8,.2,1),
    opacity 200ms ease;
}

/* Aktives Bild */
.media-slideshow-slide img.is-active{
  position: relative; /* spannt Höhe auf */
  display: block;

  opacity: 1;
  transform: translateX(0);

  transition:
    transform 900ms cubic-bezier(.2,.8,.2,1),
    opacity 200ms ease;
}

/* Exit: fährt komplett raus → wird ERST DANACH unsichtbar */
.media-slideshow-slide img.is-exit{
  transform: translateX(calc(150%));
  opacity: 0;

  transition:
    transform 900ms cubic-bezier(.2,.8,.2,1),
    opacity 200ms ease 900ms; /* <-- DAS ist der Trick */
}


/* =====================================================
   ABOUT – SLIDE-IN ANIMATION
   ===================================================== */

html, body.about-split{
  overflow-x: clip;
}

@supports not (overflow: clip){
  html, body.about-split{
    overflow-x: hidden;
  }
}

/* Grundzustand (bevor sichtbar) */
.about-img.reveal{
  opacity: 0;
  transform: translateX(var(--reveal-x, 0)) translateY(var(--reveal-y, 0));
  transition: transform 700ms cubic-bezier(.2,.8,.2,1), opacity 700ms ease;
  will-change: transform, opacity;
}

/* Sichtbar */
.about-img.reveal.is-visible{
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Richtungen */
.about-img.reveal.from-left{  --reveal-x: -14vw; }
.about-img.reveal.from-right{ --reveal-x:  14vw; }
.about-img.reveal.from-bottom{--reveal-y:  6vh; }

/* Optional: reduziert Bewegung für Accessibility */
@media (prefers-reduced-motion: reduce){
  .about-img.reveal{
    transition: none;
    opacity: 1;
    transform: none;
  }
}

