/* ==========================================================================
   Referenzen (hell) — seitenspezifische Styles
   Signatur: Filter-Chips mit Zählern + animierte Neuanordnung (GSAP Flip),
   Kachel-Hover mit Infoschild.
   ========================================================================== */

/* ---------- Unterseiten-Hero ---------- */
.page-hero { position: relative; padding: calc(var(--header-h) + clamp(28px, 5vw, 72px)) 0 clamp(72px, 8vw, 128px); background: var(--white); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.page-hero .h1 { hyphens: manual; }
.page-hero .lead { margin-top: 24px; max-width: 44ch; }
.page-hero .btn-row { margin-top: 32px; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 20px; font-size: .9375rem; color: var(--text-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.crumbs a:hover { color: var(--anthracite); text-decoration-color: currentColor; }
.crumbs svg { width: 14px; height: 14px; }
.crumbs [aria-current] { color: var(--anthracite); font-weight: 500; }

.page-hero-visual { position: relative; }
.page-hero-photo { position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4 / 3; background: var(--estrich); }
.page-hero-photo > img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-visual > .schild { position: absolute; left: clamp(-40px, -2.5vw, -16px); bottom: clamp(20px, 3vw, 40px); }

/* Hotspot auf Fotos (wie .st-photo .hot) */
.page-hero-photo .hot, .r-case-photo .hot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(141,198,63,.35), 0 4px 12px rgba(0,0,0,.25); display: grid; place-items: center; z-index: 1; }
.page-hero-photo .hot::before, .r-case-photo .hot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.page-hero-photo .hot::after, .r-case-photo .hot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--signal); animation: ping 2.4s var(--ease-out) infinite; }

/* Kennzeichnung „Symbolbild" */
.sym-tag { position: absolute; right: 14px; top: 14px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--text); font-size: .75rem; font-weight: 600; box-shadow: 0 0 0 1px var(--line); pointer-events: none; }
.proj-fig .sym-tag { right: auto; left: 14px; }

@media (max-width: 1020px) {
  .page-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .page-hero-visual > .schild { left: 16px; }
}
@media (max-width: 600px) {
  .page-hero-photo { aspect-ratio: 5 / 4; }
  .page-hero-visual > .schild { position: relative; left: auto; bottom: auto; margin: -56px 12px 0; max-width: none; }
}

/* ---------- Filter ---------- */
.r-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.no-js .r-toolbar { display: none; }
.r-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 18px; border-radius: 999px; background: var(--white); color: var(--text); font-weight: 600; font-size: .9375rem; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background-color .3s, color .3s, box-shadow .3s, transform .4s var(--ease-out); }
.chip:hover { color: var(--anthracite); box-shadow: inset 0 0 0 1.5px var(--anthracite); }
.chip:active { transform: scale(.97); }
.chip-n { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--estrich); color: var(--anthracite); font-size: .8125rem; font-variant-numeric: tabular-nums; transition: background-color .3s, color .3s; }
.chip[aria-pressed="true"] { background: var(--anthracite); color: #fff; box-shadow: none; }
.chip[aria-pressed="true"] .chip-n { background: var(--signal); color: var(--anthracite); }
.r-status { font-size: .9375rem; color: var(--text-2); }
.r-status .num { color: var(--anthracite); font-weight: 600; }

/* ---------- Kacheln ---------- */
.r-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px); }
.proj { grid-column: span var(--span, 6); min-width: 0; }
.proj-card { position: relative; }
.proj-fig { position: relative; height: clamp(280px, 30vw, 440px); border-radius: var(--r-l); overflow: hidden; background: var(--estrich); isolation: isolate; }
.proj-fig > img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; }
.proj-card:hover .proj-fig > img, .proj-card:focus-within .proj-fig > img { transform: scale(1.04); }
/* Fremdes Firmenschild rechts unten im Foto dauerhaft außerhalb des Ausschnitts halten */
.proj-fig--crop > img { object-position: 0 0; transform-origin: 0 30%; transform: scale(1.6); }
.proj-fig.proj-fig--crop .schild { left: auto; right: 16px; transform-origin: 100% 100%; }
.proj-fig.proj-fig--crop .schild::before { left: auto; right: 22px; }
.proj-card:hover .proj-fig--crop > img, .proj-card:focus-within .proj-fig--crop > img { transform: scale(1.66); }

.proj-body { padding: 18px 4px 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.proj-body .h3 { hyphens: manual; }
.proj-meta { font-size: .9375rem; color: var(--text-2); }

/* Infoschild beim Hover/Fokus */
.proj-fig .schild { position: absolute; left: 16px; bottom: 16px; z-index: 2; min-width: 240px; max-width: min(300px, calc(100% - 32px)); opacity: 0; transform: translateY(12px) scale(.97); transform-origin: 0 100%; pointer-events: none; transition: opacity .3s, transform .6s var(--ease-out); }
.proj-card:hover .schild, .proj-card:focus-within .schild { opacity: 1; transform: none; pointer-events: auto; }
.proj-fig .schild::before { content: ""; position: absolute; left: 22px; top: -10px; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(255,255,255,.9); }
.s-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 2px; }
.s-brands img { height: 16px; width: auto; }
.s-brands img.sq { height: 22px; }
.schild dd { text-align: right; }

@media (hover: none), (max-width: 900px) {
  .proj-fig .schild { position: static; }
  .proj-fig .schild { display: none; }
  .proj-body .s-link-touch { display: inline-flex; }
}
.s-link-touch { display: none; width: 100%; align-items: center; gap: 6px; min-height: 44px; font-size: .9375rem; font-weight: 600; color: var(--signal-deep); }
.s-link-touch svg { width: 14px; height: 14px; }

/* Leere Kachel: „Ihr Projekt könnte hier stehen" */
.proj-cta { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); height: 100%; min-height: clamp(200px, 18vw, 260px); padding: clamp(24px, 3vw, 44px); border-radius: var(--r-l); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line-2); position: relative; transition: box-shadow .4s, background-color .4s; }
.proj-cta::before { content: ""; position: absolute; inset: 10px; border-radius: calc(var(--r-l) - 6px); border: 1.5px dashed var(--line-2); pointer-events: none; transition: border-color .4s; }
.proj-cta:hover { box-shadow: inset 0 0 0 1.5px var(--anthracite); }
.proj-cta:hover::before { border-color: rgba(38,41,42,.35); }
.cta-frame { flex: none; width: clamp(64px, 6vw, 88px); height: clamp(64px, 6vw, 88px); border-radius: 18px; background: var(--render); color: var(--text-2); display: grid; place-items: center; }
.cta-frame svg { width: 56%; height: 56%; }
.cta-text { flex: 1; min-width: 0; }
.cta-t { display: block; font-family: var(--f-display); font-size: clamp(1.5rem, 1.6vw + .9rem, 2.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
.cta-s { display: block; margin-top: 10px; color: var(--text); max-width: 64ch; }
.cta-go { flex: none; }
.proj-cta:hover .cta-go { transform: translateY(-2px); }
.proj-cta:hover .cta-go svg.arrow { transform: translateX(4px); }
/* schmale Restspalte (5 von 12): untereinander */
.proj--cta[style*="--span:5"] .proj-cta, .proj--cta[style*="--span: 5"] .proj-cta { flex-direction: column; align-items: flex-start; justify-content: center; }

@media (max-width: 900px) {
  .r-grid { grid-template-columns: minmax(0, 1fr); }
  .proj, .proj[style] { grid-column: 1 / -1; }
  .proj-fig { height: auto; aspect-ratio: 4 / 3; }
  .proj-cta, .proj--cta[style] .proj-cta { flex-direction: column; align-items: flex-start; }
}

/* ---------- Im Detail (demnächst) ---------- */
.r-case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 104px); align-items: center; }
.r-case-copy .h2 { margin-bottom: 20px; }
.r-specs { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.r-specs > div { display: flex; flex-direction: column; gap: 8px; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); }
.r-specs > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.r-specs dt { font-size: .875rem; color: var(--text-2); }
.r-specs dd img { height: 22px; width: auto; }
.r-specs dd img.sq { height: 28px; }
.r-specs dd.uf { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; color: #0559C9; }
.r-case-copy .btn-row { margin-top: 32px; }
.r-case-visual { position: relative; }
.r-case-photo { position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4 / 3; background: var(--estrich); }
.r-case-photo > img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.r-case-visual > .schild { position: absolute; left: clamp(-40px, -2.5vw, -16px); bottom: clamp(20px, 3vw, 40px); }
.r-dossier dd { color: var(--text-2); font-weight: 500; }
@media (max-width: 1020px) { .r-case { grid-template-columns: minmax(0, 1fr); } .r-case-visual > .schild { left: 16px; } }
@media (max-width: 600px) { .r-case-visual > .schild { position: relative; left: auto; bottom: auto; margin: -48px 12px 0; max-width: none; } }

/* ---------- Abschluss (Ergänzung) ---------- */
.close .big-phone { font-size: clamp(2rem, 5vw, 4.5rem); }
.close-photo img { object-position: 50% 60%; }
@media (max-width: 380px) { .close .big-phone { font-size: 1.85rem; gap: 12px; } }
