/* Phase 6 – Hero (22.11.2026, C2): echtes Werkstattfoto mit Tiefe (Parallax per Maus/Scroll) + gläserne Info-Karte.
   Rückbau: .hero-photo in components/hero.php + Datei + js/hero-depth.js + Zeilen in functions.php entfernen. */
@media (min-width: 1025px) { body .hero h1 { font-size: clamp(46px, 4.2vw, 60px); } }

/* ── Foto-Hero : echtes Werkstattfoto mit Tiefe + gläserne Info-Karte ── */
.hero--photo { --mx: 0; --my: 0; --hy: 0; isolation: isolate; }
.hero--photo::before { display: none; }
.hero--photo .hero-photo { position: absolute; inset: -30px; z-index: 0; overflow: hidden; pointer-events: none; }
.hero--photo .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 55%;
  transform: translate3d(calc(var(--mx) * 14px), calc(var(--my) * 10px + var(--hy) * .18px), 0) scale(1.04);
  transition: transform .5s cubic-bezier(.2,.7,.2,1); animation: heroPhotoIn 1.6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes heroPhotoIn { from { opacity: 0; scale: 1.08; filter: blur(6px); } to { opacity: 1; scale: 1; filter: blur(0); } }
/* Unscharfe Kopie füllt Ränder, wenn das Foto verschoben ist */
.hero--photo .hero-photo::before { content: ''; position: absolute; inset: -40px; background: url(../images/hero/werkstatt-mobil.jpg) 90% 50% / cover no-repeat; filter: blur(30px) brightness(.92); }
.hero--photo .hero-photo img { position: relative; z-index: 1; }
.hero--photo .hero-photo::after { z-index: 2; }
/* Verlauf links, damit der Text ruhig lesbar bleibt */
.hero--photo .hero-photo::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #f7f6f2 0%, rgba(247,246,242,.94) 26%, rgba(247,246,242,.62) 44%, rgba(247,246,242,.08) 64%, rgba(247,246,242,0) 100%),
              linear-gradient(0deg, rgba(247,246,242,.35) 0%, rgba(247,246,242,0) 30%); }
.hero--photo .hero-left, .hero--photo .hero-right { position: relative; z-index: 2; }

@media (min-width: 1025px) {
  /* Foto so verschieben, dass das geöffnete Handy in der Lücke zwischen Text und Karte sichtbar ist */
  .hero--photo .hero-photo img { position: absolute; top: 0; right: 17%; width: auto; height: 100%; min-width: 0; max-width: none; object-fit: cover; }
  /* Info-Panel als schwebende Glas-Karte über dem Foto (bewegt sich leicht gegenläufig = Tiefe) */
  body .hero--photo .hero-right { background: rgba(255,255,255,.74); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(255,255,255,.7); border-left: 1px solid rgba(255,255,255,.7); border-radius: 22px; margin: 28px 36px 28px 12px; padding: 30px 30px 26px;
    box-shadow: 0 30px 60px -20px rgba(12,12,12,.35); align-self: center;
    transform: translate3d(calc(var(--mx) * -6px), calc(var(--my) * -4px), 0); transition: transform .5s cubic-bezier(.2,.7,.2,1);
    animation: heroCardIn 1s .35s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes heroCardIn { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
}

@media (max-width: 1024px) {
  /* Mobil/Tablet: Foto als Bühne oben, weich in den Hintergrund übergehend */
  .hero--photo .hero-photo { inset: 0 0 auto 0; height: 300px; }
  .hero--photo .hero-photo::before { display: none; }
  .hero--photo .hero-photo img { object-position: 78% 50%; transform: translate3d(0, calc(var(--hy) * .25px), 0) scale(1.06); }
  .hero--photo .hero-photo::after { background: linear-gradient(180deg, rgba(247,246,242,0) 35%, rgba(247,246,242,.85) 80%, #f7f6f2 100%); }
  body .hero--photo .hero-left { padding-top: 230px !important; }
}
@media (prefers-reduced-motion: reduce) { .hero--photo .hero-photo img, .hero--photo .hero-right { animation: none; transition: none; transform: none; } }
