﻿:root {
  --bg: #e1e0e0;
  --bg-light: #f1f1f1;
  --ink: #2a323b;
  --text: #3a3a3a;
  --accent: #37649b;
  --soft: #b1bcc9;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --msg-fs: clamp(2rem, 6vw, 5.5rem); /* Schriftgröße der Botschaft; auch für die Überlappung mit dem Kontakt-Abschnitt */
  --max: 1440px; /* maximale Breite des Inhaltsbereichs (inkl. Seitenrand) – passt für übliche Desktops 1440–1920 px */
  --rand: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); /* Abstand zum Fensterrand für Elemente über die volle Breite (Header, Scroll-Hinweis), bündig mit .wrap */
  --karte-rand: max(2vw, calc((100vw - var(--max)) / 2)); /* Abstand der Popup-Karte zum Fensterrand */
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; color: var(--text);
  background: var(--bg);
  font: 400 1.0625rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(72px, 11vw, 140px) 0; }
h1, h2 { font-family: var(--serif); color: var(--ink); line-height: 1.05; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.eyebrow { display: inline-block; font: 600 .8rem/1 var(--sans); letter-spacing: .18em; color: var(--accent); text-transform: uppercase; margin-bottom: 1rem; }
.eyebrow::after { content: ""; display: inline-block; width: 40px; height: 1px; background: currentColor; vertical-align: middle; margin-left: 12px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--rand);
  will-change: transform;
}
.site-header--solid { background: var(--bg); }
.site-header.snap { transition: transform .6s var(--ease); }
.logo img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(4px, 1.5vw, 12px); }
.nav a { display: inline-flex; flex-direction: column; align-items: center; color: var(--ink); text-decoration: none; font-size: .95rem; padding: 8px 16px; transition: color .25s, letter-spacing .25s; }
/* unsichtbare Kopie (fett, mit Hover-Zeichenabstand) reserviert die Breite, damit das Menü beim Hover nicht springt */
.nav a::after { content: attr(data-text); height: 0; overflow: hidden; visibility: hidden; font-weight: 700; letter-spacing: .06em; }
.nav a:hover { color: var(--accent); font-weight: 700; letter-spacing: .06em; }

/* Hero */
.hero { background: var(--bg); isolation: isolate; position: relative; min-height: 100svh; display: flex; align-items: center; padding: 150px 0 190px; overflow: hidden; overflow: clip; } /* clip: der Hero lässt sich auch per Skript/Tastatur nicht seitlich verschieben (Collage ragt rechts hinaus) */
.hero-inner { position: relative; z-index: 1; }
/* Text direkt unter der Überschrift, linksbündig mit ihr – wie im Abschnitt Kontakt */
.hero-intro { position: relative; top: 0; max-width: 46ch; margin: clamp(28px, 4vw, 56px) 0 0; font-size: .95rem; line-height: 1.7; }
.scroll-hint { position: absolute; z-index: 1; left: var(--rand); bottom: 48px; display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
/* Pfeil nach unten (Scroll-Hinweis und "Mehr laden"): schwebt langsam auf und ab */
.pfeil { display: inline-block; flex: none; width: 16px; height: 44px; animation: pfeil-schweben 2.2s var(--ease) infinite; }
.pfeil svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pfeil-schweben {
  0%   { transform: translateY(-5px); opacity: .35; }
  50%  { transform: translateY(6px);  opacity: 1; }
  100% { transform: translateY(-5px); opacity: .35; }
}
@media (prefers-reduced-motion: reduce) { .pfeil { animation: none; } }
/* Beim Darüberfahren zieht sich der Text auseinander (Zeichenabstand, mit Überschwingen) – wie bei „Let’s get it done.“ */
@media (hover: hover) and (min-width: 761px) {
  .scroll-hint > span:first-child, .more-btn > span:first-child { transition: letter-spacing .9s cubic-bezier(.3, 1.45, .5, 1); }
  .scroll-hint:hover > span:first-child, .scroll-hint:focus-visible > span:first-child,
  .more-btn:hover > span:first-child, .more-btn:focus-visible > span:first-child { letter-spacing: .36em; }
}
@media (prefers-reduced-motion: reduce) { .scroll-hint > span:first-child, .more-btn > span:first-child { transition: none; } }
.hero h1 { font-size: clamp(2rem, 5.1vw, 4.25rem); line-height: .98; margin-bottom: 0; max-width: 11ch; }
.hero-pre { margin: 0 0 .9rem; color: var(--ink); font-size: 1.07rem; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 em { font-style: italic; color: var(--accent); }
/* Überschrift zweizeilig mit Umbruch vor „&“ (Desktop und mobil); keine weiteren Umbrüche */
@media (min-width: 761px) { .hero--start h1 { max-width: none; white-space: nowrap; } .hero--start { padding-top: 110px; } } /* Desktop: Startbildschirm beginnt näher unter der Kopfzeile (sonst 150px) */
/* mobil: Schrift so groß, dass „Visuelle Gestaltung“ in die Breite passt */
@media (max-width: 760px) { .hero--start h1 { max-width: none; font-size: calc((100vw - 2 * var(--gutter)) / 11.6); } } /* mit Reserve für breitere Ersatzschriften auf Handys ohne Georgia */
.hero-nach { margin: 1.1rem 0 0; line-height: 1.5; } /* gleich groß wie „Hi, mein“ über der Überschrift */
@media (min-width: 761px) { .hero-nach br { display: none; } } /* Zeilenumbruch nach „und“ nur mobil */
/* Über-mich: Porträt rechtsbündig am Seitenraster, Text rechtsbündig direkt links daneben (beides unten bündig) */
.hero-about { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 4vw, 64px) clamp(16px, 2vw, 28px); align-items: start; margin: clamp(36px, 4.5vw, 72px) 0 0 25%; } /* rechts bündig am Seitenraster; Abstand oben 25 % kleiner als zuvor */
.hero-about-text { align-self: end; justify-self: end; text-align: right; } /* Zeilenumbrüche sind im HTML gesetzt (nur Desktop) */
.hero-about p { margin: 0 0 1.1em; font-size: .95rem; line-height: 1.7; }
.hero-about p:last-child { margin-bottom: 0; }
/* Querformat, ganzes Bild sichtbar (etwa so hoch wie das frühere Hochformat-Porträt), am rechten Rand; weißer Bildhintergrund verschwindet per multiply */
.hero-about-bild { display: block; align-self: end; justify-self: end; width: clamp(220px, 22vw, 330px); height: auto; mix-blend-mode: multiply; }
/* Desktop: Collage deutlich größer und bis an den rechten Fensterrand (Text bleibt direkt links daneben) */
@media (min-width: 761px) {
  /* margin-left 0: die 25 %-Einrückung hätte neben dem großen Bild keinen Platz mehr für den Text;
     margin-top: Bild samt Text um 50 % der Bildhöhe (Bild 1600 x 1067) nach oben in den Startbildschirm geschoben */
  .hero-about { --bildbreite: clamp(476px, 62.5vw, 1012px); margin-left: 0; margin-top: calc(var(--bildbreite) * -1067 * .5 / 1600); }
  /* Text: eine Zeile (.95rem × 1.7) unter der Unterkante der Betonfläche in der Collage (147 px über dem Bildrand bei 1600 px Bildbreite) */
  /* rechts: Text rückt in den leeren linken Bildrand (96 px bei 1600 px Bildbreite) bis 16 px vor die Collage */
  .hero-about { column-gap: 0; }
  .hero-about-text { margin-bottom: calc(var(--bildbreite) * 147 / 1600 - .95rem * 1.7); margin-right: calc(var(--bildbreite) * -96 / 1600 + 16px); }
  /* ein Drittel des Bildes ragt über den rechten Fensterrand hinaus (der Hero schneidet es ab) */
  .hero-about-bild { width: var(--bildbreite); max-width: none; margin-right: calc(-1 * max(var(--gutter), (100vw - var(--max)) / 2 + var(--gutter)) - var(--bildbreite) / 3); }
}
/* mobil: ohne Einrückung; erster Absatz über die volle Breite, darunter zweiter Absatz und Bild nebeneinander */
@media (max-width: 760px) {
  .hero-nach { margin-top: .55rem; } /* mobil halber Abstand zur Überschrift */
  .hero-about { gap: 20px 18px; margin: 40px 0 0; }
  .hero-about-text { display: contents; }
  .hero-about p { margin: 0; align-self: end; }
  .hero-about-text p { font-size: min(.95rem, calc((100vw - 2 * var(--gutter)) / 23.6)); } /* schmale Handys: Schrift so klein, dass die mittlere Zeile (bis „chaotisch,“) nicht umbricht */
  /* mobil: eine Spalte – Bild über die volle Breite oben, Text darunter */
  .hero-about { grid-template-columns: minmax(0, 1fr); }
  /* fast doppelt so breit wie die Spalte; so verschoben, dass die Gesichtsmitte (bei 25 % der Bildbreite) in der Bildschirmmitte liegt – rechts deutlich angeschnitten */
  .hero-about-bild { --mb: calc(1.95 * (100vw - 2 * var(--gutter))); order: -1; width: var(--mb); max-width: none; justify-self: start; margin-left: calc(50vw - var(--gutter) - var(--mb) * .25); }
} /* Zeile unter der Überschrift, im Stil der Zeile darüber */
/* Kontakt-Abschnitt: gleiches Layout wie der Hero, anderes Bild (Platzhalter für die Karte) */
/* Botschaft als Übergang zwischen Projekten und Kontakt (Schrift wie die kleine Zeile im Hero, nur viel größer) */
.message { position: relative; z-index: 1; display: flex; align-items: flex-end; padding: clamp(96px, 13vw, 200px) 0 0; }
.message .wrap { width: 100%; }
.message-text .zeile { display: block; width: max-content; letter-spacing: .08em; }
.message-text .hang { position: absolute; transform: translateX(-100%); }
/* Desktop: beim Darüberfahren zieht sich die jeweilige Zeile wie eine Ziehharmonika auseinander (Zeichenabstand, mit Überschwingen) – jede Zeile für sich */
@media (hover: hover) and (min-width: 761px) {
  .message-text .zeile { transition: letter-spacing .9s cubic-bezier(.3, 1.45, .5, 1); }
  .message-text .zeile:hover { letter-spacing: .3em; }
}
@media (prefers-reduced-motion: reduce) { .message-text .zeile { transition: none; } } /* Anführungszeichen hängt links heraus, damit alle Zeilen bündig beginnen */
.message-text { margin: 0 0 0 50%; text-align: left; white-space: nowrap; color: var(--ink); font-size: var(--msg-fs); line-height: 1.08; letter-spacing: .08em; text-transform: uppercase; will-change: transform;
  /* schwebt von unten nach oben ein (translate ist unabhängig vom Parallax-transform aus main.js) */
  opacity: 0; translate: 0 70px; transition: opacity 1.3s var(--ease), translate 1.5s var(--ease); }
.message-text.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .message-text { opacity: 1; translate: none; transition: none; } }
/* Der blaue Bereich schiebt sich unter die Botschaft: die letzte Zeile geht in ihn über. Das Padding gleicht die Überlappung aus, der Inhalt bleibt an seinem Platz. */
.hero--kontakt { --ueberlapp: calc(var(--msg-fs) * 1.08 + 24px); background: #b1bcc9; min-height: auto; margin-top: calc(var(--ueberlapp) * -1); padding: calc(clamp(24px, 3vw, 44px) + var(--ueberlapp)) 0 clamp(160px, 17vw, 260px); }
.hero--kontakt::before { display: none; }
.hero--kontakt .hero-intro { top: 0; margin: clamp(28px, 4vw, 56px) 0 0; }
.hero--kontakt h1 { pointer-events: none; }
/* Karte rechts (gleiche Lage wie das Hero-Bild); das Label (SVG) liegt exakt an der Stelle, an der es in der mobilen Karte eingebaut ist */
.karte { position: absolute; z-index: -1; left: 68%; top: 62%; transform: translate(-50%, -50%); width: clamp(345px, 42vw, 540px); aspect-ratio: 484 / 392; pointer-events: none; }
.karte picture, .karte-bild { display: block; width: 100%; height: 100%; }
.karte-bild { opacity: .88; filter: contrast(1.45); } /* kräftig, aber noch leicht abgeschwächt, damit der Text darüber lesbar bleibt (das Label bleibt voll deckend) */
.karte-label { position: absolute; left: 52.48%; top: 39.54%; width: 26.68%; height: auto; transform-origin: 9% 55%; transition: transform .5s var(--ease); pointer-events: auto; cursor: default; }
.karte-label:hover { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .karte-label { transition: none; } }
.kontakt-daten p, .kontakt-daten address { margin: 0 0 1.1em; font-style: normal; line-height: 1.7; }
.kontakt-daten a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.kontakt-daten a:hover { color: var(--accent); }


/* Portfolio */
.portfolio { padding-top: clamp(100px, 14.67vw, 187px); padding-bottom: 0; } /* Luft zwischen der Botschaft und 02 */
.portfolio .section-head { position: relative; top: -24px; } /* „02 Projekte“ leicht nach oben, das Raster bleibt an seinem Platz */
.work { --tgap: 0px; --pgap: clamp(10px, 1.4vw, 20px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pgap); width: 100%; max-width: var(--max); padding: 0 var(--gutter); margin: clamp(40px, 6vw, 72px) auto 0; /* gleicher Rand links/rechts wie .wrap (Überschriften) */ }
.project[hidden] { display: none; }
.project { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
.work .project { cursor: pointer; }
.work .project:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.work .project:hover .thumb img { transform: scale(1.04); }
/* Beim "Mehr laden" schweben die neuen Projekte von unten nach oben ein */
.work .project.schwebt { opacity: 0; translate: 0 80px; }
.work .project.schwebt.schwebt-ein { opacity: 1; translate: 0 0; transition: opacity 1.1s var(--ease), translate 1.3s var(--ease); }
/* Raster: Bild oben, Text in Schwarz darunter (im Popup bleibt der Text auf dem Bild) */
.work .project { aspect-ratio: auto; overflow: visible; background: none; }
.work .project::after { display: none; }
.work .project .thumb { position: relative; inset: auto; aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
.work .project-info { position: static; display: block; padding: clamp(14px, 1.6vw, 22px) 0 clamp(18px, 2.4vw, 32px); color: var(--ink); }
/* Bilder im Raster in Farbe; beim Darüberfahren werden sie schwarzweiß */
.work .project .thumb { isolation: isolate; border-radius: 7px; } /* halb so stark gerundet wie das Popup (14px) */
.work .project { border-radius: 7px; }
.work .project-count, .work .project-info h3 { padding-left: 7px; } /* Texte über und unter dem Bild um den Eckenradius eingerückt */
.work .project .thumb img { transition: transform .9s var(--ease), filter .5s var(--ease); }
.work .project.reveal .thumb img { transition: transform 1.6s var(--ease), filter .5s var(--ease); }
.work .project:hover .thumb img, .work .project:focus-visible .thumb img { filter: grayscale(1); }
.work .project-count { color: var(--ink); opacity: .7; margin-bottom: .6rem; }
.work .project-info h3 { color: var(--ink); font-size: clamp(1.2rem, 1.8vw, 1.75rem); margin: 0 0 .06em; transition: color .4s var(--ease); }
.work .project:hover .project-info h3, .work .project:focus-visible .project-info h3 { color: var(--accent); }
.work .tags li { color: var(--ink); opacity: .75; }
/* Raster: Nummer – Linie – Kategorie in einer Zeile über dem Bild (Linie wie bei „01 ——“), Titel darunter */
.work .project { display: grid; grid-template-columns: auto 1fr; align-items: baseline; }
.work .project[hidden] { display: none; } /* sonst überstimmt display: grid das Ausblenden – Projekte nach „Mehr laden“ wären ohne Bild sichtbar */
.work .project-info { display: contents; }
.work .project-count { grid-row: 1; grid-column: 1; margin: 0 0 .7rem; }
.work .project-count::after { content: ""; display: inline-block; width: 40px; height: 1px; background: currentColor; vertical-align: middle; margin: 0 16px; }
.work .tags { grid-row: 1; grid-column: 2; justify-content: flex-start; }
.work .project .thumb { grid-row: 2; grid-column: 1 / -1; }
.work .project-info h3 { grid-row: 3; grid-column: 1 / -1; margin: clamp(10px, 1.2vw, 16px) 0 clamp(18px, 2.4vw, 32px); }
.work .project.reveal .project-count, .work .project.reveal .tags, .work .project.reveal .project-info h3 { opacity: 0; transform: translateY(20px); transition: opacity 1.2s var(--ease) .3s, transform 1.2s var(--ease) .3s, color .4s var(--ease); }
.work .project.reveal .project-count, .work .project.reveal .tags { transition-duration: .6s, .6s, .4s; transition-delay: .15s, .15s, 0s; } /* Zeile über dem Bild: doppelt so schnell und früher */
.work .project.reveal.in .tags, .work .project.reveal.in .project-info h3 { opacity: 1; transform: none; }
.work .project.reveal.in .project-count { opacity: .7; transform: none; }
.project .thumb { position: absolute; inset: 0; display: block; }
.project .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.project a.thumb:hover img { transform: scale(1.04); }
/* unteres Bild: ein Drittel niedriger */
.project-copy { aspect-ratio: auto; }
.more-wrap[hidden] { display: none; }
.more-wrap { display: flex; justify-content: center; padding: clamp(32px, 5vw, 64px) var(--gutter); }
/* "Mehr laden" im selben Stil wie der Scroll-Hinweis im Hero: Text in Großbuchstaben, weiter Buchstabenabstand, Pfeil nach unten */
.more-btn { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; font: inherit; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; transition: color .25s; }
.more-btn:hover, .more-btn:focus-visible { color: var(--accent); }
.more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.project.project-copy::after { display: none; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tgap); }
.tile { aspect-ratio: 1 / 1; position: relative; display: block; overflow: hidden; background: #fff; }
/* jede Kachel zeigt das komplette Bild, also drei einzelne Bilder nebeneinander */
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .9s var(--ease); }
.project a.tile:hover img { transform: scale(1.04); }
.project::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to right, rgba(42, 50, 59, .7), rgba(42, 50, 59, 0) 75%); }
.project-info { position: absolute; z-index: 1; left: var(--gutter); top: 0; bottom: 0; right: var(--gutter); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; color: #fff; pointer-events: none; }
.project-count { display: block; font: 600 .8rem/1 var(--sans); letter-spacing: .18em; color: #fff; opacity: .85; margin-bottom: 1rem; }
.project-info h3 { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 3.4rem); line-height: 1; letter-spacing: -.015em; color: #fff; margin: 0 0 .3em; }
.project-info p { margin: 0 0 1.2em; max-width: 46ch; color: rgba(255, 255, 255, .88); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.project-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 1.4em; color: #fff; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px; pointer-events: auto; }
.project-link:hover { color: #fff; }
.project-link span { transition: transform .3s var(--ease); }
.project-link:hover span { transform: translateX(6px); }

/* Projekt-Popup (Vollbild): großes Bild mit Text oben, drei Streifen darunter */
html.modal-open { overflow: hidden; }
/* Popup als Karte: 8 % Rand ringsum, Hintergrund durchsichtig, dezenter Schlagschatten, damit klar ist, dass es ein Popup ist */
/* Die Karte baut sich nach unten auf (Höhe nach Inhalt); gescrollt wird .modal-scroll, die Scrollleiste ist ausgeblendet */
/* .modal selbst scrollt nicht: wegen backdrop-filter würden fixierte Buttons sonst mitscrollen */
.modal { position: fixed; inset: 0; z-index: 200; overflow: hidden; background: rgba(255, 255, 255, .38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .35s var(--ease); }
.modal-scroll { position: absolute; inset: 0; box-sizing: border-box; padding: 2%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
.modal-scroll::-webkit-scrollbar { display: none; }
.modal[hidden] { display: none; }
.modal.in { opacity: 1; }
.modal-body { max-width: var(--max); margin: 0 auto; border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 10px 40px rgba(42, 50, 59, .28), 0 2px 8px rgba(42, 50, 59, .18); }
/* Schließen-Button: dünnes blaues × ohne Hintergrund; beim Hover wird es etwas fetter (siehe unten) */
.modal-close { position: fixed; top: calc(2vw + 28px); right: calc(var(--karte-rand) + 28px); z-index: 2; width: 36px; height: 60px; padding: 0; border: 0; background: none; cursor: pointer; }
.modal-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 12px; }
.modal-close .blob { position: relative; display: block; width: 100%; height: 100%; }
.modal-close i { position: absolute; left: 53%; top: 28%; width: 28px; height: 28px; transform: translate(-50%, -50%); color: var(--accent); }
.modal-close i svg { display: block; width: 100%; height: 100%; }
/* Projektgalerie: Pfeile links/rechts, immer sichtbar in der Bildschirmmitte verankert (scrollen nicht mit); schmal und hoch gestreckt */
.modal-nav { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: clamp(45.6px, 5.76vw, 74.4px); height: clamp(51.2px, 7.68vw, 89.6px); padding: 0; border: 0; border-radius: 14px; background: none; color: var(--accent); cursor: pointer; transform: translateY(-50%); transition: transform .3s var(--ease); }
.modal-nav svg { width: 100%; height: 100%; }
.modal-nav.zurueck { left: calc(var(--karte-rand) + 12px); }
.modal-nav.weiter { right: calc(var(--karte-rand) + 12px); }
/* Hover: Pfeil und × werden nur etwas fetter */
.modal-nav path, .modal-close i path { transition: stroke-width .2s var(--ease); }
.modal-nav:hover path, .modal-close:hover i path { stroke-width: 3; }
.modal-nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.modal-nav[hidden] { display: none; }
@media (hover: none), (max-width: 760px) { .modal-nav { display: none; } } /* Touch-Geräte und mobil: blättern per Wischen */
/* Wechsel zwischen Projekten: --r = Richtung (1 = nächstes, -1 = voriges); gewechselt wird erst nach dem Loslassen */
.modal-body.raus { opacity: 0; transform: translateX(calc(var(--r) * -6%)); transition: opacity .22s ease-in, transform .22s ease-in; }
.modal-body.rein-start { opacity: 0; transform: translateX(calc(var(--r) * 6%)); }
.modal-body.rein { transition: opacity .42s var(--ease), transform .42s var(--ease); }
/* Am ersten/letzten Projekt: kurzes Anfedern statt Wechsel */
.modal-body.anschlag { animation: anschlag .42s var(--ease); }
@keyframes anschlag { 35% { transform: translateX(calc(var(--r) * -2.5%)); } }
.modal .project { aspect-ratio: auto; height: clamp(280px, 53svh, 600px); }
.modal .project-copy { height: auto; }
/* Text oben ausgerichtet, mit deutlichem Abstand zum oberen Bildrand (ca. 5x so groß wie vorher) */
/* Der Text bestimmt die Höhe mit (mindestens die Bildhöhe), unten bleibt ein fester Abstand zur Bildunterkante */
.modal .project:not(.project-copy) { height: auto; min-height: clamp(238px, 45svh, 510px); } /* 15 % niedriger als zuvor (280px / 53svh / 600px) */
.modal .project-info { position: relative; inset: auto; justify-content: flex-start; padding: clamp(72px, 7.5vw, 104px) var(--gutter) 60px; }
.modal .project-info p.beschreibung { margin-bottom: 0; }
.modal .project-info h3 { font-size: clamp(1.25rem, 2.35vw, 2rem); }
/* Beschreibung: Desktop höchstens bis zur Bildmitte (die Textbox beginnt am linken Rand, ihr Außenabstand ist so groß wie der rechte) */
.modal .project-info p.beschreibung { max-width: 50%; white-space: pre-line; } /* Zeilenumbrüche (\n) aus projekte.js bleiben erhalten */
/* Oberes Bild im Popup immer in Schwarzweiß (die drei Bilder darunter bleiben farbig) */
.modal .project:not(.project-copy) .thumb img { filter: grayscale(1) contrast(.55); } /* deutlich flacher, damit der weiße Text ruhig darauf steht */


/* Footer */
.site-footer { width: 100%; padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, .12); background: var(--ink); color: var(--soft); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { display: inline-flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; text-underline-offset: 4px; transition: letter-spacing .25s; }
/* unsichtbare Kopie reserviert die Hover-Breite (fett + Zeichenabstand), damit nichts springt */
.site-footer a::after { content: attr(data-text); height: 0; overflow: hidden; visibility: hidden; font-weight: 700; letter-spacing: .06em; }
.site-footer a:hover { font-weight: 700; letter-spacing: .06em; text-decoration: underline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Cookie-Banner (Google Analytics nur mit Zustimmung) – beide Knöpfe gleich gewichtet */
.cookie-banner { position: fixed; left: var(--rand); bottom: 24px; z-index: 150; max-width: 460px; padding: 22px 24px; border-radius: 14px; background: var(--ink); color: var(--bg-light); font-size: .88rem; line-height: 1.5; box-shadow: 0 10px 30px rgba(42, 50, 59, .25); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 16px; }
.cookie-banner a { color: inherit; text-underline-offset: 3px; }
.cookie-knoepfe { display: flex; gap: 10px; }
.cookie-knoepfe button { flex: 1; padding: 10px 14px; border: 1px solid var(--soft); border-radius: 10px; background: none; color: var(--bg-light); font: inherit; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.cookie-knoepfe button:hover, .cookie-knoepfe button:focus-visible { background: var(--bg-light); color: var(--ink); }
.cookie-knoepfe button:focus-visible { outline: 2px solid var(--soft); outline-offset: 3px; }
@media (max-width: 760px) { .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 18px; } }

/* Rechtstexte */
.legal { padding: 140px 0 60px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.25rem; margin: 2em 0 .4em; }
.legal p, .legal li { overflow-wrap: anywhere; }

/* Scroll-Animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.reveal-slow:not(.in) { transform: translateY(70px); }
.reveal.reveal-slow { transition-duration: 1.8s; }
/* Projektbilder: der Block selbst bleibt stehen (kein grauer Hintergrund sichtbar),
   nur das Bild darin gleitet von unten nach oben und das Overlay-Textfeld blendet ein */
.project.reveal { opacity: 1; transform: none; transition: none; }
.project.reveal .thumb img, .project.reveal .tile img { transform: scale(1.2) translateY(8%); transition: transform 1.6s var(--ease); }
.project.reveal.in .thumb img, .project.reveal.in .tile img { transform: none; }
.project.reveal.in a.thumb:hover img, .project.reveal.in a.tile:hover img { transform: scale(1.04); }
.project.reveal .project-info { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease) .3s, transform 1.2s var(--ease) .3s; }
.project.reveal.in .project-info { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }


/* Button "Zum Seitenanfang" – nur mobil */
.to-top { display: none; }
@media (max-width: 760px) {
  .to-top { display: flex; align-items: center; justify-content: center; position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 48px; height: 48px; border-radius: 14px; background: rgba(211, 210, 210, .5); color: var(--accent); box-shadow: 0 4px 14px rgba(42, 50, 59, .11); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s; }
  .to-top.sichtbar { opacity: 1; transform: none; pointer-events: auto; }
  .to-top:active { background: rgba(194, 193, 193, .5); }
}
@media (max-width: 760px) {
  .site-header { padding: 10px 12px; }
  .logo img { height: 34px; }
  .nav a { padding: 7px 11px; font-size: .88rem; }
  .hero { padding: 120px 0 56px; min-height: auto; align-items: flex-start; }
  .hero-intro { top: 0; margin: 28px 0 0; }
  :root { --msg-fs: clamp(2rem, 12vw, 3.2rem); } /* Botschaft: gleiche Formatierung wie am Desktop (linksbündig ab der Mitte), nur kleiner */
  .modal .tiles { grid-template-columns: 1fr; } /* Popup mobil: die drei kleinen Bilder untereinander */
  .modal .project-info p.beschreibung { max-width: 80vw; } /* mobil höchstens 80 % der Bildbreite */
  .hero--kontakt { padding: calc(48px + var(--ueberlapp)) 0 130px; }
  .hero--kontakt .hero-intro { margin-top: 28px; }
  /* Mobil: Karte (mit eingebautem Label) zentriert unter den Kontaktdaten */
  .karte { position: relative; z-index: auto; left: auto; top: auto; transform: none; width: min(90%, 420px); margin: 36px auto 0; }
  .karte-bild { height: auto; opacity: .85; filter: contrast(1.45); }
  .karte-label { display: none; }
  .scroll-hint { display: none; }
  .work { grid-template-columns: 1fr; }
  .work .project .thumb { aspect-ratio: 4 / 3; }
  .work .project-info h3 { font-size: clamp(1.25rem, 5.4vw, 1.7rem); }
  .project-copy { aspect-ratio: auto; }
  .project-info h3 { font-size: clamp(2rem, 8vw, 3rem); }
}
@media (max-width: 400px) { .nav a { padding: 7px 8px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .project.reveal .thumb img, .project.reveal .tile img, .project.reveal .project-info { opacity: 1; transform: none; }
}
