/* ==========================================================================
   Projekte / Portfolio — Übersicht + Projekt-Unterseiten
   Nutzt die Variablen aus style.css. Alle Klassen tragen das Präfix .pf-,
   damit nichts mit anderen Seiten kollidiert.
   ========================================================================== */

.pf-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(24px, 3vw, 40px); }
.pf-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.8rem);
  margin-bottom: 0.45em;
  overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none;
}
.pf-hero h1 em { color: var(--color-sage); }
.pf-hero .lede { margin-bottom: 0; }

.nw { white-space: nowrap; }

/* ---------- Filterleiste ---------- */
.pf-filter { display: flex; flex-wrap: wrap; gap: 10px; padding: clamp(16px, 2vw, 28px) 0 clamp(8px, 1vw, 16px); }
.pf-btn {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 12px 20px;
  min-height: 44px;
  background: #fff;
  color: #2f2c29;
  border: 1.5px solid #d8d2c5;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.pf-btn:hover { border-color: #2f2c29; }
.pf-btn[aria-pressed="true"] { background: #2f2c29; border-color: #2f2c29; color: #fff; }
.pf-btn:focus-visible, .pf-row:focus-visible, .pf-back:focus-visible, .pf-nav a:focus-visible {
  outline: 2px solid var(--color-sage); outline-offset: 3px;
}

/* ---------- Projekt-Liste (editorial) ---------- */
.pf-list { padding-bottom: clamp(48px, 7vw, 96px); }
.pf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4.5vw, 72px);
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid #e2ddd2;
  color: inherit;
}
.pf-row[hidden] { display: none; }
.pf-row .pf-media { position: relative; }
.pf-row.flip .pf-media { order: 2; }
.no-js .pf-row:nth-child(even) .pf-media { order: 2; }
.pf-text { min-width: 0; }
.pf-text h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.3rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 0.45em;
  overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none;
}
.pf-text p { font-size: 1rem; margin: 0 0 1.2em; max-width: none; }
.pf-row:hover .pf-text h2 { color: var(--color-sage-dark); }

/* Bild / Platzhalter */
.pf-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-beige); min-width: 0; }
.pf-media img { width: 100%; height: 100%; object-fit: cover; }
.pf-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #ede9e1 0%, #e3ddd0 100%);
  color: var(--color-sage-dark);
  font-family: var(--font-sans);
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 16px;
}

/* Tags */
.pf-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pf-tags-br { flex: 0 0 100%; height: 0; margin: -8px 0 0; padding: 0; border: 0; }
.pf-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #c9c2b6;
  color: #4a4640;
  background: transparent;
  white-space: nowrap;
}
.pf-tag.cat { border-color: transparent; color: #fff; }
.pf-tag.cat-planung { background: #6c6e51; }
.pf-tag.cat-design { background: #4b2c35; }
.pf-tag.cat-umsetzung { background: #333f2c; }
.pf-tag.status { border-color: #6c6e51; color: #4a4c37; background: #f6f4f0; }

/* Leerzustand */
.pf-empty { padding: clamp(40px, 6vw, 72px) 0; max-width: 40em; }
.pf-empty[hidden] { display: none; }
.pf-empty p { font-family: var(--font-serif); font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.35; margin: 0 0 1em; }
.pf-empty a { font-weight: 600; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }

/* ---------- Unterseite ---------- */
.pf-detail { padding: clamp(32px, 4.5vw, 64px) 0 clamp(40px, 6vw, 80px); }
.pf-back {
  display: inline-block;
  font-size: 0.86rem; font-weight: 500; letter-spacing: 0.04em;
  margin-bottom: clamp(20px, 3vw, 36px);
  border-bottom: 1.5px solid transparent;
}
.pf-back:hover { border-bottom-color: currentColor; }
.pf-detail h1 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  margin: 22px 0 0.35em;
  max-width: none;
  overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none;
}
.pf-detail .lede { margin-bottom: clamp(24px, 3.5vw, 44px); max-width: none; }
.pf-story { display: block; margin-bottom: clamp(32px, 5vw, 64px); }
.pf-story p { margin: 0; max-width: none; }
.pf-story p + p { margin-top: 1em; }

.pf-ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(12px, 2vw, 28px); margin: 0; }
.pf-ba figure { margin: 0; min-width: 0; }
.pf-ba figcaption {
  margin-top: 12px;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-sage-dark);
}

/* Vorheriges / nächstes Projekt */
.pf-nav {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid #e2ddd2;
}
.pf-nav a { display: block; padding: 28px 0; color: inherit; min-width: 0; }
.pf-nav a.next { text-align: right; }
.pf-nav .dir {
  display: block;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-sage-dark); margin-bottom: 8px;
}
.pf-nav .ttl {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.1;
  overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none;
}
.pf-nav a:hover .ttl { color: var(--color-sage-dark); }

/* CTA-Block */
.pf-cta { background: #333f2c; color: #f6f4f0; text-align: center; padding: clamp(56px, 8vw, 104px) 0; }
.pf-cta .eyebrow { color: #a9ab8d; }
.pf-cta h2 { color: #fff; font-size: clamp(2.1rem, 4vw, 3.2rem); margin: 0 0 0.6em; overflow-wrap: normal; hyphens: none; }
.pf-cta .btn { margin-top: 4px; }

@media (max-width: 860px) {
  .pf-story { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 760px) {
  .pf-row { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 32px 0; }
  .pf-row.flip .pf-media, .no-js .pf-row:nth-child(even) .pf-media { order: 0; }
}
@media (max-width: 560px) {
  .pf-ba { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pf-nav { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pf-nav a.next { text-align: left; border-top: 1px solid #e2ddd2; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-media-label, .pf-media::after { transition: none; }
}

/* ---------- Projekt-Unterseite: Bildbereiche (Stand 01.10.2026) ---------- */
.pf-sec { margin-top: clamp(28px, 4vw, 52px); padding: 0; }
.pf-sec > h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 0 0 clamp(16px, 2vw, 28px);
  overflow-wrap: normal; word-break: normal; -webkit-hyphens: none; hyphens: none;
}
.pf-fig { margin: 0; min-width: 0; }
.pf-fig img, .pf-fig video { display: block; width: 100%; height: auto; background: var(--color-beige); }
.pf-ba .pf-fig img, .pf-ba .pf-fig video { object-fit: cover; }
.pf-ba + .pf-ba { margin-top: clamp(20px, 3vw, 40px); }
.pf-ba .pf-fig figcaption, .pf-fig figcaption {
  margin-top: 10px;
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-sage-dark); line-height: 1.5;
}
.pf-zoom { display: block; cursor: zoom-in; }
.pf-zoom:focus-visible { outline: 2px solid var(--color-sage); outline-offset: 3px; }
.pf-vid video { background: #1c1a17; }
.pf-vids { max-width: 760px; }
.pf-vids .pf-vid { max-width: 100%; }

/* Galerie: Spalten (Bilder behalten ihr Seitenverhältnis) */
.pf-gal { column-count: 3; column-gap: clamp(12px, 1.6vw, 22px); }
.pf-gal .pf-fig { break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 22px); }
.pf-gal.pf-gal-small { column-count: 2; max-width: 760px; }

/* KI-Kennzeichnung (Hinweiszeile): schlichter Text, kein Kasten */
.pf-ki { display: inline; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; margin: 0; padding: 0; background: none; color: inherit; }
.pf-zoom { position: relative; }
.pf-note { margin: clamp(24px, 3vw, 40px) 0 0; font-size: 0.86rem; color: #5c574f; }

/* Lightbox */
.pf-lb {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 18, 16, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px 16px;
}
.pf-lb[hidden] { display: none; }
.pf-lb img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; }
.pf-lb .pf-lb-cap { color: #f6f4f0; font-size: 0.9rem; margin-top: 14px; text-align: center; max-width: 40em; }
.pf-lb button {
  position: absolute; background: transparent; border: 0; color: #fff; cursor: pointer;
  font-size: 2rem; line-height: 1; width: 52px; height: 52px; border-radius: 999px;
}
.pf-lb button:hover { background: rgba(255,255,255,0.12); }
.pf-lb button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pf-lb .pf-lb-close { top: 12px; right: 12px; }
.pf-lb .pf-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.pf-lb .pf-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

@media (max-width: 900px) { .pf-gal { column-count: 2; } }
@media (max-width: 560px) {
  .pf-ba { grid-template-columns: minmax(0, 1fr); }
  .pf-gal.pf-gal-small { column-count: 1; }
}

/* Bereiche (Einliegerwohnung), Einzelbild, Hochformat-Video */
.pf-area { border-top: 1px solid rgba(47,44,41,0.12); padding-top: clamp(20px, 2.5vw, 32px); margin-top: clamp(28px, 4vw, 52px); }
.pf-sub { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: #5c574f; margin: clamp(18px, 2vw, 26px) 0 10px; }
.pf-single { max-width: 760px; margin: 0 0 clamp(16px, 2vw, 24px); }
.pf-single img { width: 100%; height: auto; display: block; }
.pf-vids .pf-vport, .pf-vport { max-width: 420px; }

/* Abstände zwischen den Blöcken straffen */
.pf-detail { padding-bottom: clamp(32px, 4vw, 56px); }
.pf-story { margin-bottom: clamp(20px, 3vw, 36px); }
.pf-area > h2 { margin-bottom: 0; }
.pf-note { margin-top: clamp(20px, 2.5vw, 32px); }
.pf-gal.pf-gal-x { column-count: 4; }
@media (max-width: 1100px) { .pf-gal.pf-gal-x { column-count: 3; } }
@media (max-width: 900px) { .pf-gal.pf-gal-x { column-count: 2; } }

/* Vorher/Nachher-Regler (wie auf der Umsetzungs-Seite) */
.pf-cmpfig { margin: 0 0 clamp(16px, 2vw, 24px); }
.pf-cmp { --position: 50%; position: relative; overflow: hidden; background: #d9d4cc; max-width: 880px; touch-action: pan-y; }
.pf-cmp.pf-cmp-p { max-width: 540px; }
.pf-cmp .after, .pf-cmp .before { position: absolute; inset: 0; }
.pf-cmp .before { z-index: 2; overflow: hidden; clip-path: inset(0 calc(100% - var(--position)) 0 0); }
.pf-cmp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 5; margin: 0; }
.pf-cmp .handle { position: absolute; left: var(--position); top: 0; bottom: 0; width: 2px; background: #fff; z-index: 4; pointer-events: none; }
.pf-cmp .handle::after {
  content: '\2194'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: #fff; color: var(--color-ink, #2a2420); font-size: 1.25rem; box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.pf-cmp:focus-within .handle::after { outline: 2px solid var(--color-sage); outline-offset: 2px; }
.pf-cmp-lbl {
  position: absolute; top: 1rem; z-index: 4; background: rgba(255,255,255,.9); padding: .45rem .65rem;
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #2f2c29; pointer-events: none;
}
.pf-cmp-lbl.before-label { left: 1rem; }
.pf-cmp-lbl.after-label { right: 1rem; }
.pf-cmpfig figcaption { margin-top: 10px; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-sage-dark); }
@media (max-width: 560px) { .pf-cmp-lbl { top: .6rem; padding: .35rem .5rem; } .pf-cmp .handle::after { width: 2.6rem; height: 2.6rem; } }

/* Galerien: Raster mit Leserichtung links nach rechts (Reihenfolge = Dateinummern) */
.pf-gal { display: grid; column-count: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); align-items: start; }
.pf-gal .pf-fig { margin: 0; }
.pf-gal.pf-gal-small { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.pf-gal.pf-gal-x { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-gal.pf-gal-x .pf-fig img { aspect-ratio: 1 / 1; object-fit: cover; height: auto; }
@media (max-width: 1100px) { .pf-gal.pf-gal-x { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .pf-gal, .pf-gal.pf-gal-x { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pf-gal.pf-gal-small { grid-template-columns: minmax(0, 1fr); } }

/* Hinweis zu einem Bereich (z. B. Rolle bei diesem Bereich) */
.pf-areanote { margin: 0 0 12px; max-width: none; font-size: 0.95rem; color: #5c574f; }

/* Zwei Bilder nebeneinander auf gleicher Höhe (Flex-Anteil = Seitenverhältnis) */
.pf-gal.pf-gal-eq { display: flex; gap: clamp(14px, 1.8vw, 24px); align-items: flex-start; }
.pf-gal.pf-gal-eq .pf-fig { margin: 0; min-width: 0; }
.pf-gal.pf-gal-eq img { width: 100%; height: auto; display: block; }
@media (max-width: 700px) { .pf-gal.pf-gal-eq { flex-direction: column; } .pf-gal.pf-gal-eq .pf-fig { flex: none !important; width: 100%; } }

/* Hinweis unter der Projektbeschreibung (z. B. Airbnb-Link) */
.pf-airbnb { margin: clamp(18px, 2.4vw, 28px) 0 0; padding-top: clamp(14px, 1.8vw, 20px); border-top: 1px solid rgba(47, 44, 41, 0.14); max-width: none; font-size: 0.98rem; line-height: 1.6; }
.pf-airbnb a { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #6c6e51; }
.pf-airbnb a:hover, .pf-airbnb a:focus-visible { color: #4a4c37; }

/* Sichtbarer Hinweis, dass die ganze Karte anklickbar ist */
.pf-more { display: inline-block; margin: 0 0 1.4em; font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; color: var(--color-ink, #2f2c29); background-image: linear-gradient(currentColor, currentColor); background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 1.5px; padding-bottom: 2px; transition: background-size 0.35s var(--ease, ease); }
.pf-more .pf-arrow { display: inline-block; transition: transform 0.35s var(--ease, ease); }
.pf-row:hover .pf-more, .pf-row:focus-visible .pf-more { background-size: 100% 1.5px; }
.pf-row:hover .pf-more .pf-arrow, .pf-row:focus-visible .pf-more .pf-arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .pf-more, .pf-more .pf-arrow { transition: none; } }

/* Hover auf dem Bild: abdunkeln und Etikett einblenden */
.pf-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: rgba(35, 30, 27, 0); transition: background .45s var(--ease); }
.pf-media-label { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -38%); opacity: 0; transition: opacity .45s var(--ease), transform .45s var(--ease); background: #fff; color: #2f2c29; font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; line-height: 1.2; padding: 11px 20px; border-radius: 999px; white-space: nowrap; pointer-events: none; }
@media (hover: hover) {
  .pf-row:hover .pf-media::after, .pf-row:focus-visible .pf-media::after { background: rgba(35, 30, 27, 0.42); }
  .pf-row:hover .pf-media-label, .pf-row:focus-visible .pf-media-label { opacity: 1; transform: translate(-50%, -50%); }
}


/* Redaktionelle Texte der Projektseiten (Stand 02.10.2026) */
.pf-prose p { margin: 0 0 1em; max-width: none; }
.pf-prose p:last-child { margin-bottom: 0; }
.pf-sec > .pf-prose { margin-bottom: clamp(14px, 2vw, 24px); }
.pf-area > .pf-prose { margin-top: 12px; }
.pf-text > h2 { margin-bottom: clamp(10px, 1.5vw, 18px); }
.pf-areanote.pf-credit { margin: clamp(16px, 2vw, 24px) 0 0; }
