/* Projektübersicht: eine Auswahl als Projektmagazin.
   Baut auf css/styles.css, css/service-variants/shared/service-base.css, projects-base.css, projects-kiosk.css (Hefte, Regal, Leser)
   und projects-case.css (Brotkrumen, Abschluss) auf. Lokal adaptiert von wordpress/tools/build-projects-archive-20261012.cjs. */

/* ------------------------------------------------------------------ */
/* Einstieg: dunkel wie die Profilseite, darin der Filter               */
/* ------------------------------------------------------------------ */
.ap-hero {
    padding-block: clamp(130px, 13vw, 170px) clamp(2.4rem, 4vw, 3.4rem);
    background: var(--space);
    color: var(--white);
}

.ap-hero h1 { margin-top: 1.6rem; font-size: clamp(3.2rem, 7.6vw, 7.4rem); font-stretch: 76%; font-weight: 640; letter-spacing: -0.055em; line-height: 0.88; }
.ap-hero__intro { max-width: 60ch; margin-top: 1.4rem; color: var(--text-on-dark); font-size: 1.06rem; line-height: 1.7; }

.ap-filter { display: grid; gap: 1.3rem; margin-top: clamp(2.2rem, 4vw, 3.2rem); padding-top: clamp(1.4rem, 2.4vw, 2rem); border-top: 1px solid var(--line-on-dark); }
.ap-filter__group { min-width: 0; margin: 0; padding: 0; border: 0; }
.ap-filter__group legend { margin-bottom: 0.7rem; padding: 0; color: var(--muted-on-dark); font-size: 0.84rem; font-weight: 620; }
.ap-filter__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Jede Option ist ein Optionsfeld; sichtbar ist nur die Beschriftung */
.ap-chip { position: relative; display: inline-flex; }
.ap-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ap-chip > span {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 560;
    line-height: 1.2;
    white-space: nowrap;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ap-chip__n { color: var(--muted-on-dark); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.ap-chip:hover > span { border-color: var(--white); }
.ap-chip input:checked + span { border-color: var(--pj-mint); background: var(--pj-mint); color: var(--pj-ink); }
.ap-chip input:checked + span .ap-chip__n { color: var(--pj-ink); }
.ap-chip input:focus-visible + span { outline: 2px solid var(--pj-mint); outline-offset: 3px; }
/* Keine Treffer in Verbindung mit dem anderen Filter: wählbar, aber zurückgenommen */
.ap-chip.is-empty > span { border-style: dashed; color: var(--muted-on-dark); }

.ap-filter__count { color: var(--white); font-size: 0.95rem; font-weight: 620; }

/* ------------------------------------------------------------------ */
/* Regal                                                                */
/* ------------------------------------------------------------------ */
.ap-shelf { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6.5rem); }
.ap-shelf .pj-kiosk { margin-top: 0; }
.ap-empty { display: grid; justify-items: start; gap: 1.2rem; padding: 2rem 0; }
.ap-empty p { font-size: 1.15rem; font-weight: 560; }

/* ------------------------------------------------------------------ */
/* Bald im Regal                                                        */
/* ------------------------------------------------------------------ */
.ap-soon { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: 2rem clamp(2rem, 5vw, 5rem); padding-block: clamp(3.5rem, 7vw, 6rem); background: var(--mist); }
.ap-soon h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); font-stretch: 80%; font-weight: 560; letter-spacing: -0.05em; line-height: 1; }
.ap-soon__text p { max-width: 36ch; margin-top: 1rem; color: var(--text); }
.ap-soon__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); margin: 0; padding: 0; list-style: none; }
.ap-soon__cover { display: block; }
.ap-soon .pj-cover--soon { box-shadow: 0 22px 34px -22px rgba(7, 17, 15, 0.45), 0 0 0 1px rgba(7, 17, 15, 0.06); }
.ap-soon__caption { display: grid; gap: 0.15rem; margin-top: 0.9rem; font-size: 0.86rem; line-height: 1.4; overflow-wrap: anywhere; }
.ap-soon__caption span { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Kleinere Bildschirme                                                 */
/* ------------------------------------------------------------------ */
@media (max-width: 980px) {
    .ap-soon { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    /* Die Filter werden zu wischbaren Reihen, damit das Regal früh beginnt */
    .ap-filter__chips { flex-wrap: nowrap; margin-inline: calc(var(--page-gutter) * -1); padding-inline: var(--page-gutter); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
    .ap-filter__chips::-webkit-scrollbar { display: none; }
    .ap-chip { flex: 0 0 auto; }
    .ap-soon__list { gap: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ap-chip > span { transition: none; }
}
