/* =============================================
   Projektseite (projekte.html, Relaunch Nov. 2026)
   Einstieg „Projekte.“, Filter, Galerie, Projektansicht (Dialog).
   Baut auf works.css (Raster, Aufbau-Effekt, Cursor) und closing.css
   (Projektanfrage, FAQ, Footer) auf. Logik: js/projekte.js.
============================================= */


.pgal {
}

/* ---------------------------------------------
   Projektübersicht: Bühne (Basis .works aus works.css)
--------------------------------------------- */
.pgal {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

/* Filter */
.pfilter {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.pfilter__head {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  margin-bottom: clamp(1.1rem, 2vw, 1.6rem);
}

.pfilter__label {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-black);
  white-space: nowrap;
}

.pfilter__line {
  flex: 1;
  height: 1px;
  background: rgba(10, 10, 11, 0.14);
}

.pfilter__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pfilter__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0 1.35rem;
  border: 1px solid rgba(10, 10, 11, 0.18);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--c-black);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.pfilter__count {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--c-gray-500);
  transition: color var(--t-fast) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .pfilter__btn:hover {
    border-color: var(--c-black);
  }
}

.pfilter__btn[aria-pressed="true"] {
  background: var(--c-black);
  border-color: var(--c-black);
  color: var(--c-white);
}

.pfilter__btn[aria-pressed="true"] .pfilter__count {
  color: var(--c-dot-green);
}

.pfilter__btn:focus-visible {
  outline: 2px solid var(--c-focus-ring);
  outline-offset: 3px;
}

/* Galerie: 12er-Raster, Größen kommen als data-size aus build-projects.py
   bzw. nach dem Filtern aus js/projekte.js (l = groß, s = klein, w = breit). */
.pgal__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 1.8vw, 2rem);
  row-gap: clamp(3rem, 6vw, 6.5rem);
  align-items: start;
}

.pgal__item {
  min-width: 0;
}

.pgal__item[hidden] {
  display: none;
}

.pgal__item[data-size="l"] { grid-column: span 7; }
.pgal__item[data-size="s"] { grid-column: span 5; }
.pgal__item[data-size="w"] { grid-column: 1 / -1; }

/* Versetzte zweite Fläche einer Reihe (Rhythmus wie bei Tobias/Pechschwarz) */
.pgal__item[data-offset] {
  margin-top: clamp(3rem, 9vw, 9.5rem);
}

/* Große Fläche rechts (zweite Reihe, z. B. Karl Röfe): etwas tiefer, damit
   die Reihe nicht oben bündig wirkt */
.pgal__item[data-size="l"][data-offset] {
  margin-top: clamp(5rem, 15vw, 15.5rem);
}

/* Filterwechsel: weiches Aus-/Einblenden auf dem Link, damit es nicht mit
   dem Reveal (.reveal am Listeneintrag) kollidiert */
.pgal__link {
  transition: opacity 0.38s var(--ease), transform 0.55s var(--ease);
}

.pgal__item.is-out .pgal__link {
  opacity: 0;
  transform: scale(0.97);
}

.pgal .pgal__link:focus-visible {
  outline: 2px solid var(--c-black);
  outline-offset: 6px;
  border-radius: calc(var(--media-radius) + 4px);
}

.pgal__media {
  aspect-ratio: 16 / 10;
}

/* Kleine Flächen: etwas schmaleres Format, ruhigerer Aufbau-Effekt */
.pgal__item[data-size="s"] .pgal__media {
  aspect-ratio: 3 / 2;
  --reveal-x: 6%;
  --reveal-y: 5%;
  --zoom-in: 0.12;
}

/* Breite Fläche: volle Medienbreite, 16:9, höchstens 82 % der Viewporthöhe */
.pgal__item[data-size="w"] .pgal__media {
  aspect-ratio: auto;
  height: min(var(--media-w) * 9 / 16, var(--media-max-h));
  --reveal-x: 10%;
  --reveal-y: 8%;
}

.pgal__item[data-size="w"] .work__video {
  object-position: 50% 50%;
}

/* Status-Etikett (z. B. „In Arbeit“): immer sichtbar, oben links im Bild */
.pgal__badge {
  position: absolute;
  top: clamp(0.75rem, 1.2vw, 1.25rem);
  left: clamp(0.75rem, 1.2vw, 1.25rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 11, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--c-white);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
  pointer-events: none;
}

.pgal__badge-dot,
.pd-status__dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-dot-yellow);
}

/* Name im Bild: auf Touch-Geräten immer sichtbar, mit Maus beim Hover */
.pgal__pill {
  position: absolute;
  left: clamp(0.75rem, 1.2vw, 1.25rem);
  bottom: clamp(0.75rem, 1.2vw, 1.25rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(10, 10, 11, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--c-white);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.15;
  pointer-events: none;
}

.pgal__dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-dot-green);
}

.pgal__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pgal__type {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.pgal__type::before {
  content: "·";
  margin-right: 0.55rem;
}

/* Mit Maus übernimmt allein der AVIO-Cursor; der Name erscheint nur bei
   Tastaturfokus (ruhigeres Bild, kein doppelter Hinweis) */
@media (hover: hover) and (pointer: fine) {
  .pgal__pill {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  }

  .pgal__link:focus-visible .pgal__pill {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .pgal__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(1.75rem, 6vw, 2.5rem);
  }

  .pgal__item[data-size] {
    grid-column: 1 / -1;
  }

  .pgal__item[data-offset] {
    margin-top: 0;
  }

  .pgal__item[data-size] .pgal__media {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .pfilter__head .works__motion span {
    display: none;
  }

  .pgal__type {
    display: none;
  }
}

@media (max-width: 420px) {
  .pfilter__btn {
    min-height: 44px;
    padding: 0 1.05rem;
    font-size: 0.95rem;
  }
}

/* ---------------------------------------------
   Projektansicht (natives <dialog>)
--------------------------------------------- */
html.pdlg-open {
  overflow: hidden;
}

html.pdlg-open body {
  padding-right: var(--pdlg-scrollbar, 0px);
}

.pdlg {
  --pd-pad: clamp(1.25rem, 2.4vw, 2.25rem);
  position: fixed;
  inset: 0;
  width: min(1440px, calc(100vw - 2.5rem));
  height: min(900px, calc(100dvh - 2.5rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--c-white);
  color: var(--c-black);
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.6);
}

.pdlg[open] {
  display: flex;
  flex-direction: column;
  animation: pdlg-in 0.55s var(--ease);
}

.pdlg::backdrop {
  background: rgba(10, 10, 11, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: pdlg-fade 0.4s ease;
}

.pdlg.is-closing {
  animation: pdlg-out 0.28s ease forwards;
}

.pdlg.is-closing::backdrop {
  animation: pdlg-fade 0.28s ease reverse forwards;
}

@keyframes pdlg-in {
  from { opacity: 0; transform: translate3d(0, 28px, 0) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes pdlg-out {
  to { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.99); }
}

@keyframes pdlg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pdlg__bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.7rem 0.7rem var(--pd-pad);
  border-bottom: 1px solid rgba(10, 10, 11, 0.08);
}

.pdlg__pos {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: var(--c-gray-500);
}

.pdlg__pos [data-pdlg-index] {
  color: var(--c-black);
}

.pdlg__sep {
  margin: 0 0.45em;
  opacity: 0.5;
}

.pdlg__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pdlg__step,
.pdlg__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  height: 44px;
  padding: 0 0.95rem;
  border: 1px solid rgba(10, 10, 11, 0.14);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--c-black);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

.pdlg__step:not(.pdlg__step--next) {
  padding: 0;
}

.pdlg__close {
  width: 44px;
  padding: 0;
  margin-left: 0.25rem;
  background: var(--c-black);
  border-color: var(--c-black);
  color: var(--c-white);
}

@media (hover: hover) and (pointer: fine) {
  .pdlg__step:hover {
    background: var(--c-black);
    border-color: var(--c-black);
    color: var(--c-white);
  }
  .pdlg__close:hover {
    background: var(--c-gray-700);
    border-color: var(--c-gray-700);
  }
}

.pdlg__step:focus-visible,
.pdlg__close:focus-visible,
.pd-nav__btn:focus-visible,
.pd-chip:focus-visible,
.pd-btn:focus-visible,
.pd-acc__sum:focus-visible {
  outline: 2px solid var(--c-focus-ring);
  outline-offset: 3px;
}

.pdlg__body {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* Ein Projekt */
.pd {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  height: 100%;
}

.pd[hidden] {
  display: none;
}

.pd.is-entering .pd__info > *,
.pd.is-entering .pd-stage {
  animation: pd-enter 0.6s var(--ease) both;
}

.pd.is-entering .pd__info > *:nth-child(2) { animation-delay: 0.04s; }
.pd.is-entering .pd__info > *:nth-child(3) { animation-delay: 0.08s; }
.pd.is-entering .pd__info > *:nth-child(n + 4) { animation-delay: 0.12s; }

@keyframes pd-enter {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: none; }
}

/* Medien (links, dunkel: Websites und Renderings wirken auf Schwarz) */
.pd__media {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  min-height: 0;
  padding: var(--pd-pad);
  background: var(--c-black-soft);
  color: var(--c-white);
}

/* 16:9 wie die Aufnahmen; reicht die Höhe nicht, schrumpft die Fläche
   (contain verhindert jeden Beschnitt) */
.pd-stage {
  position: relative;
  flex: 0 1 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
  touch-action: pan-y;
  outline: none;
}

.pd-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.pd-slide.is-active {
  opacity: 1;
}

.pd-slide[hidden] {
  display: none;
}

/* contain: Aufnahmen werden nie beschnitten */
.pd-slide__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.pd-under {
  display: grid;
  flex-shrink: 0;
  gap: 0.9rem;
}

.pd-cap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.pd-cap__item[hidden] {
  display: none;
}

.pd-cap__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-white);
}

.pd-cap__text {
  max-width: 62ch;
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

.pd-nav {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}

.pd-nav__count {
  margin-right: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
}

.pd-nav__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--c-white);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .pd-nav__btn:hover {
    background: var(--c-white);
    border-color: var(--c-white);
    color: var(--c-black);
  }
}

.pd-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.pd-chips::-webkit-scrollbar {
  display: none;
}

.pd-chip {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .pd-chip:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--c-white);
  }
}

/* Aktive Ansicht: Weiß statt Grün – Grün bleibt der Hauptaktion vorbehalten */
.pd-chip[aria-pressed="true"] {
  background: var(--c-white);
  border-color: var(--c-white);
  color: var(--c-black);
}

.pd-note {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Informationen (rechts) */
.pd__info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: var(--pd-pad) var(--pd-pad) 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pd-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--c-gray-300);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--c-black);
}

.pd-eyebrow {
  margin: 0 0 0.9rem;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-gray-500);
}

.pd-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.7vw, 2.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--c-black);
  hyphens: manual;
}

.pd-intro {
  max-width: 36em;
  margin: 1.25rem 0 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--c-gray-700);
}

.pd-quote {
  margin: 2rem 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--avio-green);
}

.pd-quote blockquote {
  margin: 0;
}

.pd-quote p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--c-black);
}

.pd-quote figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.8rem;
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--c-gray-600);
}

.pd-quote__stars,
.pd-review__src span {
  color: var(--avio-green);
  letter-spacing: 0.12em;
}

/* Kennzahlen: ruhige Zahlenzeile statt Dashboard – feine Trennlinien
   zwischen den Werten, mittleres Gewicht */
.pd-kpis {
  margin-top: 2rem;
  padding: 1.25rem 0 1.1rem;
  border-top: 1px solid rgba(10, 10, 11, 0.1);
}

.pd-kpis__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.pd-kpi {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.3rem;
  margin: 0;
  padding: 0 0.9rem;
  border-left: 1px solid rgba(10, 10, 11, 0.08);
}

.pd-kpi:first-child {
  padding-left: 0;
  border-left: 0;
}

.pd-kpi dd {
  margin: 0;
  font-size: clamp(1.2rem, 1.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--c-black);
}

.pd-kpi dt {
  font-size: 0.76rem;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--c-gray-500);
}

.pd-kpi--accent dd {
  color: var(--avio-green-text);
}

.pd-kpis__note {
  margin: 0.9rem 0 0;
  font-size: 0.76rem;
  color: var(--c-gray-500);
}

.pd-acc {
  margin-top: 2rem;
  border-top: 1px solid rgba(10, 10, 11, 0.1);
}

.pd-kpis + .pd-acc {
  margin-top: 0.75rem;
}

.pd-acc__item {
  border-bottom: 1px solid rgba(10, 10, 11, 0.1);
}

.pd-acc__sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-black);
  list-style: none;
  cursor: pointer;
}

.pd-acc__sum::-webkit-details-marker {
  display: none;
}

.pd-acc__icon {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(10, 10, 11, 0.16);
  border-radius: 50%;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    transform 0.4s var(--ease);
}

.pd-acc__icon::before,
.pd-acc__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  margin: -0.75px 0 0 -5px;
  background: currentColor;
  transition: transform 0.4s var(--ease);
}

.pd-acc__icon::after {
  transform: rotate(90deg);
}

/* Geöffnet: Plus wird ruhig zum Minus, keine gefüllte Fläche */
.pd-acc__item[open] .pd-acc__icon {
  border-color: rgba(10, 10, 11, 0.35);
}

.pd-acc__item[open] .pd-acc__icon::after {
  transform: rotate(0deg);
}

@media (hover: hover) and (pointer: fine) {
  .pd-acc__sum:hover .pd-acc__icon {
    background: var(--c-black);
    border-color: var(--c-black);
    color: var(--c-white);
  }
}

.pd-acc__body {
  padding: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-gray-700);
}

.pd-list,
.pd-impact {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-list li {
  position: relative;
  padding-left: 1.35rem;
}

.pd-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0.2rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--avio-green);
}

.pd-impact {
  gap: 0.9rem;
}

.pd-impact strong {
  display: block;
  font-weight: 600;
  color: var(--c-black);
}

.pd-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.pd-steps dt {
  display: flex;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--c-black);
}

.pd-steps dt span {
  padding-top: 0.3em;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--c-gray-500);
}

.pd-steps dd {
  margin: 0.25rem 0 0;
}

.pd-review {
  margin: 0;
}

.pd-review blockquote {
  margin: 0;
}

.pd-review p {
  margin: 0;
  color: var(--c-black);
}

.pd-review figcaption {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.9rem;
  font-size: 0.88rem;
}

.pd-review__name {
  font-weight: 600;
  color: var(--c-black);
}

.pd-review__role,
.pd-review__src {
  color: var(--c-gray-600);
}

/* Aktionen: unten, beim Scrollen der Spalte stehenbleibend */
.pd-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding: 2rem 0 var(--pd-pad);
  background: linear-gradient(rgba(255, 255, 255, 0), var(--c-white) 1.6rem);
}

/* Wie der Abschluss der Startseite: grüner Hauptbutton (.ask__primary)
   plus ruhiger Textlink (.ref-link) */
.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0 1.6rem 0 1.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.pd-btn svg {
  flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}

.pd-btn--primary {
  background: var(--avio-green);
  color: var(--c-white);
  box-shadow: 0 10px 30px -12px var(--avio-green-shadow);
}

.pd-btn--ghost,
.pd-btn--text {
  min-height: 44px;
  padding: 0 0.5rem;
  gap: 0.5rem;
  background: transparent;
  color: var(--c-black);
}

.pd-btn--ghost .pd-btn__label,
.pd-btn--text span {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.45s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .pd-btn--primary:hover {
    background: var(--avio-green-hover);
  }
  .pd-btn--primary:hover svg,
  .pd-btn--text:hover svg {
    transform: translate3d(4px, 0, 0);
  }
  .pd-btn--ghost:hover .pd-btn__label,
  .pd-btn--text:hover span {
    background-size: 100% 1px;
  }
  .pd-btn--ghost:hover svg {
    transform: translate3d(2px, -2px, 0);
  }
}

/* Tablet/Smartphone: Vollbild, eine Spalte, ganze Ansicht scrollt */
@media (max-width: 960px) {
  .pdlg {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .pdlg__bar {
    padding-top: calc(0.6rem + env(safe-area-inset-top));
  }

  .pdlg__body {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .pd {
    display: block;
    height: auto;
  }

  .pd__media {
    padding: 1rem;
  }

  .pd-stage {
    flex: none;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
  }

  .pd__info {
    overflow: visible;
    padding: 1.75rem clamp(1.25rem, 5vw, 2.5rem) 0;
  }

  .pd-actions {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .pdlg__step--next span {
    display: none;
  }

  .pdlg__step--next {
    padding: 0;
  }

  .pd-cap {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pd-nav {
    align-self: stretch;
    justify-content: space-between;
  }

  .pd-nav__count {
    margin-right: auto;
  }

  .pd-kpis__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.1rem;
  }

  .pd-kpi:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  /* Kompakte Aktionsleiste: Hauptaktion breit, Website als Rund-Button */
  .pd-actions {
    flex-wrap: nowrap;
    padding-top: 1.25rem;
  }

  .pd-btn--primary {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 1.1rem;
    font-size: 0.95rem;
  }

  .pd-btn--ghost {
    flex: 0 0 52px;
    width: 52px;
    min-height: 52px;
    padding: 0;
    border-color: rgba(10, 10, 11, 0.2);
  }

  .pd-btn--ghost .pd-btn__label {
    display: none;
  }

  /* Verweis „Zum Website-Projekt“ (3D) als eigene Zeile über den Buttons */
  .pd-actions:has(.pd-btn--text) {
    flex-wrap: wrap;
  }

  .pd-btn--text {
    order: -1;
    flex: 1 1 100%;
    justify-content: flex-start;
    min-height: 40px;
    font-size: 0.92rem;
  }
}

@media (max-width: 380px) {
  .pd-btn--primary {
    padding: 0 0.8rem;
    font-size: 0.86rem;
  }

  .pd-btn--primary svg {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdlg[open],
  .pdlg::backdrop,
  .pdlg.is-closing,
  .pdlg.is-closing::backdrop,
  .pd.is-entering .pd__info > *,
  .pd.is-entering .pd-stage {
    animation: none;
  }

  .pgal__link,
  .pgal__pill,
  .pd-slide,
  .pfilter__btn,
  .pd-acc__icon,
  .pd-acc__icon::before,
  .pd-acc__icon::after {
    transition: none;
  }
}
