/* =========================================================
   JAKOB JUST · PORTFOLIO
   style.css – ein Stylesheet für alle Seiten

   Aufbau:
   1.  Schrift (lokal, keine Google-Server)
   2.  Farben & Grundwerte  →  zentrale Design-Variablen
   3.  Reset & Basis
   4.  Hilfsklassen (Container, Buttons, Labels)
   5.  Header & Navigation
   6.  Hero (Startbereich)
   8.  Projekte (Karten)
   10. Über mich & Tools
   11. Kontakt
   12. Footer
   13. Projektseiten (Case Studies, Galerie, Video)
   14. Rechtstexte (Impressum, Datenschutz)
   15. Animationen
   16. Responsive (Tablet & Handy)
   17. Magazin zum Durchblättern
   ========================================================= */


/* ---------- 1. SCHRIFT ----------
   Plus Jakarta Sans liegt in assets/fonts/ und wird vom
   eigenen Server geladen. Variable Font: alle Stärken 200–800 in einer Datei. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ---------- 2. FARBEN & GRUNDWERTE ----------
   Alle Farben zentral als Variablen, Akzent über --accent. */
:root {
  --bg:        #0b0b0d;   /* Seitenhintergrund (fast schwarz) */
  --surface:   #141417;   /* Karten, Kästen */
  --surface-2: #1c1c21;   /* etwas hellere Fläche */
  --text:      #f3f1ec;   /* Haupttext (warmes Weiß) */
  --muted:     #98958e;   /* Nebentext */
  --line:      rgba(255, 255, 255, 0.1);  /* Trennlinien */
  --accent:    #4f7dff;   /* Akzent: Electric Blue */
  --accent-ink:#ffffff;   /* Textfarbe AUF der Akzentfarbe */

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius:    20px;      /* Ecken-Rundung von Karten */
  --radius-sm: 12px;
  --container: 1280px;    /* maximale Inhaltsbreite */
  --gutter:    clamp(16px, 4vw, 48px);  /* Seitenabstand links/rechts */
  --section:   clamp(80px, 12vw, 160px); /* Abstand zwischen Sektionen */

  --ease: cubic-bezier(.2, .7, .2, 1);
}


/* ---------- 3. RESET & BASIS ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
p { margin: 0 0 1em; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* Sichtbarer Fokus für Tastatur-Nutzer (Barrierefreiheit) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* Leichtes Filmkorn über der ganzen Seite – gibt dem Dunkel mehr Tiefe */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- 4. HILFSKLASSEN ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); }

/* kleines Label über Überschriften, z. B. "01 — Ausgewählte Arbeiten" */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: currentColor;
}

.section-title {
  font-size: clamp(40px, 7vw, 96px);
  max-width: 14ch;
}
.section-title .accent { color: var(--accent); }

/* Text nur als Kontur – Effekt für einzelne Wörter */
.outline {
  color: var(--bg);
  -webkit-text-stroke: 3px var(--text);
  paint-order: stroke fill;  /* versteckt Überlappungen innerhalb der Buchstaben */
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--text); border-color: var(--text); }

.btn-ghost:hover { border-color: var(--text); }

/* Text, der nur für Screenreader sichtbar ist */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Link "Zum Inhalt springen" für Tastatur-Nutzer */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 16px; }


/* ---------- 5. HEADER & NAVIGATION ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
/* bekommt per JavaScript die Klasse .is-scrolled, sobald man scrollt */
.site-header.is-scrolled {
  background: rgba(11, 11, 13, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; letter-spacing: -.02em;
}
/* Das "JJ"-Zeichen links neben dem Namen */
.logo-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 14px; letter-spacing: -.04em;
  transition: transform .5s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.05); }

.nav-links {
  display: flex; align-items: center; gap: 36px;
  list-style: none; margin: 0; padding: 0;
  font-size: 15px; font-weight: 600;
}
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links .btn { padding: 11px 20px; font-size: 14px; }

/* Burger-Button: nur auf dem Handy sichtbar */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent; color: var(--text);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 21px; transform: rotate(-45deg); }


/* ---------- 6. HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 120px; padding-bottom: 80px;
  overflow: hidden;
}

/* weicher Lichtschein in Akzentfarbe im Hintergrund */
.hero::after {
  content: "";
  position: absolute;
  width: 60vw; height: 60vw;
  right: -20vw; top: -20vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  position: relative; z-index: 1;
}

/* Status-Pille */
.status {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.03);
  margin-bottom: 32px;
}
.status .dot { /* optionaler pulsierender Punkt */
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(56px, 10.5vw, 168px);
  line-height: .9;
  letter-spacing: -.055em;
  margin-bottom: 36px;
}
.hero h1 .line { display: block; }
.hero h1 .accent { color: var(--accent); }

.hero-lead {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 40px;
}
.hero-lead strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Porträt rechts im Hero */
.hero-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.hero-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: contrast(1.05);
  transform: scale(1.02);
}
.hero-portrait-wrap { position: relative; }



/* ---------- 8. PROJEKTE ---------- */
#arbeiten { padding-top: clamp(40px, 6vw, 80px); }  /* direkt unter dem Startbereich etwas enger */
.work-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
  margin-bottom: clamp(48px, 7vw, 88px);
}
.work-head p { color: var(--muted); max-width: 38ch; margin: 0; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
/* Breiten der Karten im 12er-Raster */
.card--xl { grid-column: span 12; }
.card--l  { grid-column: span 7; }
.card--m  { grid-column: span 5; }
.card--half { grid-column: span 6; }

.card {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}
.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}
.card--xl .card-media { aspect-ratio: 21 / 9; }
.card--m .card-media  { aspect-ratio: auto; flex: 1; min-height: 320px; }
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.card:hover .card-media img { transform: scale(1.045); }

/* Runder Pfeil-Button, der beim Hover erscheint */
.card-media::after {
  content: "↗";
  position: absolute; right: 22px; top: 22px;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: 24px; font-weight: 800;
  transform: scale(0) rotate(-45deg);
  transition: transform .45s var(--ease);
}
a.card:hover .card-media::after { transform: scale(1) rotate(0); }
.card:not(a) .card-media::after { display: none; }

.card-body {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px;
  padding: 24px 26px 28px;
}
.card-num { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .1em; margin-bottom: 8px; display: block; }
.card h3 { font-size: clamp(24px, 2.6vw, 36px); margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; max-width: 52ch; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tag {
  font-size: 12px; font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

/* Logo-Karte (Brenner-Just): helles Feld, weil das Logo dunkel ist */
.card-media--logo {
  background: #eceae5;
  display: grid; place-items: center;
  padding: 12%;
}
.card-media--logo img { object-fit: contain; height: auto; }
.card:hover .card-media--logo img { transform: scale(1.03); }

/* "Neu"-Badge auf einer Karte */
.badge {
  position: absolute; left: 22px; top: 22px; z-index: 2;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px;
}


/* ---------- 10. ÜBER MICH & TOOLS ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.about-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: sticky; top: 110px;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }

.about-text .big {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.3;
  letter-spacing: -.02em;
  font-weight: 600;
  margin-bottom: 32px;
}
.about-text .big em { font-style: normal; color: var(--accent); }
.about-text p { color: var(--muted); }

.facts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 40px 0 56px;
}
.fact { background: var(--bg); padding: 22px 24px; }
.fact dt { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fact dd { margin: 0; font-weight: 700; font-size: 18px; }

.tools h3 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; font-weight: 600; }
.tool-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 36px; }
.tool-list li {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: background .25s, color .25s, border-color .25s;
}
.tool-list li:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }


/* ---------- 11. KONTAKT ---------- */
.contact {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact .eyebrow { justify-content: center; }
.contact h2 {
  font-size: clamp(56px, 12vw, 190px);
  line-height: .9;
  letter-spacing: -.06em;
  margin-bottom: 40px;
}
.contact-mail {
  display: inline-block;
  font-size: clamp(20px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -.02em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  transition: color .25s;
  word-break: break-all;
}
.contact-mail:hover { color: var(--accent); }
.contact-sub { color: var(--muted); margin-top: 28px; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }


/* ---------- 12. FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a:hover { color: var(--text); }


/* ---------- 13. PROJEKTSEITEN ---------- */
.project-hero {
  padding-top: 160px;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.back-link {
  display: inline-flex; gap: 8px; align-items: center;
  color: var(--muted); font-weight: 600; font-size: 15px;
  margin-bottom: 40px;
  transition: color .2s, gap .2s;
}
.back-link:hover { color: var(--text); gap: 12px; }

.project-hero h1 {
  font-size: clamp(52px, 10vw, 150px);
  line-height: .92;
  letter-spacing: -.055em;
  margin-bottom: 32px;
}
.project-hero .lead {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  max-width: 44ch;
  color: var(--muted);
}
.project-hero .lead strong { color: var(--text); font-weight: 600; }

/* Eckdaten-Leiste (Rolle, Jahr, Leistungen …) */
.meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 56px;
}
.meta div { padding: 22px 20px 22px 0; }
.meta div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.meta dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.meta dd { margin: 0; font-weight: 600; }

/* großes Titelbild einer Projektseite */
.project-cover {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.project-cover img { width: 100%; }

/* Aufgabe / Idee / Ergebnis */
.case {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.case h2 {
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px; font-weight: 700;
}
.case p { color: var(--muted); font-size: 17px; }
.case p strong { color: var(--text); font-weight: 600; }

/* Bildergalerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(12px, 1.6vw, 24px);
}
.gallery figure { margin: 0; grid-column: span 6; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); position: relative; }
.gallery figure.wide   { grid-column: span 12; }
.gallery figure.third  { grid-column: span 4; }
.gallery figure.twothird { grid-column: span 8; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(11,11,13,.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
/* Bilder in der Galerie sind anklickbar (Lightbox, siehe main.js) */
.gallery a { display: block; height: 100%; cursor: zoom-in; }

/* Farbfelder (z. B. für Novaro) */
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.swatch { border-radius: var(--radius-sm); padding: 80px 18px 18px; font-size: 14px; font-weight: 600; border: 1px solid var(--line); }
.swatch small { display: block; font-weight: 500; opacity: .7; }

/* Video-Player */
.video-block { margin-bottom: clamp(64px, 9vw, 120px); }
.video-frame {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-info {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px;
  margin-top: 28px;
}
.video-info h2 { font-size: clamp(30px, 4vw, 52px); }
.video-info p { color: var(--muted); }

/* Weiter zum nächsten Projekt */
.next-project {
  display: block;
  border-top: 1px solid var(--line);
  padding-block: clamp(56px, 8vw, 110px);
  transition: background .4s;
}
.next-project:hover { background: var(--surface); }
.next-project small { color: var(--muted); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.next-project strong {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-size: clamp(40px, 8vw, 120px);
  letter-spacing: -.05em; line-height: 1;
  margin-top: 16px;
}
.next-project .arrow { color: var(--accent); transition: transform .4s var(--ease); }
.next-project:hover .arrow { transform: translateX(12px); }

/* Lightbox (Großansicht von Bildern) */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5,5,7,.94);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px 80px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 88vh;
  width: auto; height: auto;
  border-radius: 10px;
  cursor: pointer;
}
.lightbox button {
  position: absolute;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  border: 0; font-size: 20px; font-weight: 800; cursor: pointer;
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox [hidden] { display: none; }

/* Lupen-Symbol beim Hover zeigt: dieses Bild kann man vergrößern */
.gallery a { position: relative; }
.gallery a::after {
  content: "⤢";
  position: absolute; right: 14px; top: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-size: 20px; font-weight: 800;
  opacity: 0; transform: scale(.7);
  transition: opacity .3s, transform .3s var(--ease);
}
.gallery a:hover::after { opacity: 1; transform: scale(1); }
.gallery a img { transition: transform .8s var(--ease); }
.gallery a:hover img { transform: scale(1.03); }

@media (max-width: 760px) {
  .lightbox { padding: 16px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 20px; transform: none; }
  .lightbox .lb-prev { left: calc(50% - 60px); }
  .lightbox .lb-next { right: calc(50% - 60px); }
}


/* ---------- 14. RECHTSTEXTE ---------- */
.legal { padding-top: 160px; padding-bottom: var(--section); }
.legal h1 { font-size: clamp(48px, 8vw, 110px); letter-spacing: -.05em; margin-bottom: 48px; }
.legal-body { max-width: 760px; }
.legal-body h2 { font-size: 22px; letter-spacing: -.01em; margin: 44px 0 12px; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body strong { color: var(--text); }
.legal-body a { color: var(--text); border-bottom: 1px solid var(--accent); }
.legal-body ul { padding-left: 20px; }


/* ---------- 15. ANIMATIONEN ---------- */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* Elemente mit .reveal blenden beim Scrollen weich ein (siehe main.js).
   Nur wenn JavaScript läuft (Klasse .js am <html>), sonst bleibt alles sichtbar. */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .1s; }
.js .reveal[data-delay="2"] { transition-delay: .2s; }
.js .reveal[data-delay="3"] { transition-delay: .3s; }

/* Wer in den Systemeinstellungen "Bewegung reduzieren" an hat, bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}


/* ---------- 16. RESPONSIVE ---------- */

/* Tablet */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait-wrap { max-width: 460px; }
  .card--l, .card--m, .card--half { grid-column: span 12; }
  .card--m .card-media { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img { position: relative; top: 0; max-width: 520px; }
  .meta { grid-template-columns: repeat(2, 1fr); }
  .meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .meta div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .case { grid-template-columns: 1fr; }
  .video-info { grid-template-columns: 1fr; gap: 12px; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
}

/* Handy */
@media (max-width: 760px) {
  body { font-size: 16px; }

  /* Menü klappt als Vollbild-Overlay auf */
  .nav-toggle { display: block; z-index: 2; }
  .nav-links {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--bg);
    font-size: 30px; font-weight: 800;
    opacity: 0; pointer-events: none;
    transition: opacity .35s var(--ease);
  }
  .nav-links a:not(.btn) { color: var(--text); }
  .nav-links .btn { font-size: 18px; padding: 16px 28px; }
  .nav-open .nav-links { opacity: 1; pointer-events: auto; }
  .nav-open { overflow: hidden; }

  .hero { padding-top: 110px; min-height: auto; }
  .hero h1 { margin-bottom: 28px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }

  .card-body { flex-direction: column; padding: 20px 20px 24px; }
  .tags { justify-content: flex-start; }
  .card-media::after { display: none; }
  .card--xl .card-media { aspect-ratio: 4 / 3; }

  .facts { grid-template-columns: 1fr; }

  .gallery figure,
  .gallery figure.third,
  .gallery figure.twothird { grid-column: span 12; }
  .gallery figure.half-mobile { grid-column: span 6; }

  .meta { grid-template-columns: 1fr; }
  .meta div, .meta div + div { padding-left: 0; border-left: 0; }
  .meta div + div { border-top: 1px solid var(--line); }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}


/* =========================================================
   17. Magazin zum Durchblättern (Walpair)
   ========================================================= */
.flipbook { outline: none; max-width: calc((100vh - 200px) * 1.414); margin-inline: auto; } /* passt immer ganz auf den Bildschirm */
.flipbook-stage {
  position: relative;
  aspect-ratio: 1800 / 1273;           /* Format einer Doppelseite */
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
}
.flipbook-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0; visibility: hidden;
  transform: translateX(var(--fb-shift, 40px));
  transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s .6s;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7);
}
.flipbook-stage img.cover { object-position: right center; }  /* Titelseite liegt rechts */
.flipbook-stage img.back  { object-position: left center; }   /* Rückseite liegt links */
.flipbook-stage img.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s;
}
.flipbook-stage::after {               /* feine Falz in der Mitte */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.12) 45%, rgba(0,0,0,.18) 50%, rgba(0,0,0,.12) 55%, transparent);
  pointer-events: none;
}
.flipbook-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 20px;
}
.flipbook-bar button {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  font-size: 20px; cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.flipbook-bar button:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.flipbook-bar button:disabled { opacity: .3; cursor: default; }
.fb-info { text-align: center; }
.fb-label { display: block; font-size: 18px; }
.fb-count { color: var(--muted); font-size: 14px; }
.fb-hint { color: var(--muted); font-size: 14px; text-align: center; margin-top: 12px; }


/* =========================================================
   18. Vorher-Nachher-Regler (Café Brandwerk)
   Der Regler (input type="range") liegt unsichtbar über dem Bild.
   main.js setzt --pos, damit wird das linke Bild abgeschnitten.
   ========================================================= */
.compare {
  --pos: 50%;
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  user-select: none;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare .compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.compare-line::after {            /* runder Griff in der Mitte */
  content: "↔";
  position: absolute;
  top: 50%; left: 50%;
  width: 48px; height: 48px;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.compare-label {
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, .75);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.compare-label--before { left: 16px; }
.compare-label--after  { right: 16px; }
.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(input:focus-visible) .compare-line::after { outline: 3px solid var(--accent); }
.compare-caption {
  max-width: 760px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}


/* =========================================================
   19. Kachel zum Umdrehen (Vorder- und Rückseite)
   main.js schaltet beim Klick auf den Button .is-flipped um.
   ========================================================= */
.gallery figure.flip { overflow: visible; background: none; perspective: 1600px; }
.flip-inner {
  position: relative;
  aspect-ratio: 16 / 10;
  transform-style: preserve-3d;
  transition: transform .7s var(--ease);
}
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-inner > a {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-inner > .flip-back { transform: rotateY(180deg); }
.flip-btn {
  position: absolute;
  right: 14px; bottom: 14px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.flip-btn:hover { filter: brightness(1.1); }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }
