/* =====================================================================
   Impressionen (public/impressionen/index.php) – wird nur dort geladen. Neues Design seit 25.10.2026.
   Gemeinsame Bausteine (ns-koernung, ns-tape, ns-baender, ns-dock, ns-finale, ns-sticky …) in style.css;
   hier nur Impressionen-Eigenes, Präfix im-.
   ===================================================================== */

/* ---------- Hero ---------- */
.im-hero {
    padding: calc(var(--header-h) + clamp(2rem, 6vh, 4rem)) 0 clamp(6rem, 13vh, 8.5rem);
    background: var(--ink); color: var(--text-on-dark);
}
.im-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(50% 65% at 80% 60%, rgba(255, 91, 20, .36), transparent 70%),
        radial-gradient(45% 50% at 0% 0%, rgba(255, 197, 49, .1), transparent 70%);
}
.im-hero__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.im-hero .breadcrumb { margin-bottom: 1.3rem; }
.im-hero__titel { margin: 0 0 clamp(1rem, 2.6vh, 1.7rem); font-size: clamp(2.8rem, min(5.6vw, 11vh), 5.8rem); line-height: .9; letter-spacing: -.032em; text-transform: uppercase; }
.im-hero__lead { max-width: 46ch; margin: 0 0 2rem; font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.55; color: #d9cbbb; }
.im-hero__aktionen { display: flex; flex-wrap: wrap; gap: .8rem; }
.im-hero .btn--ghost { color: var(--text-on-dark); }

/* Pinnwand: Polaroids mit gelbem Klebeband, fallen beim Laden nacheinander herein */
.im-pinnwand { position: relative; height: clamp(430px, 40vw, 570px); }
.im-polaroid {
    --r: 0deg;
    position: absolute; z-index: 1; width: clamp(165px, 15.5vw, 224px); margin: 0; padding: .55rem .55rem 2.3rem;
    border-radius: 6px; background: #fffdf8; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .9);
    transform: rotate(var(--r)); transition: transform .5s var(--ease);
    animation: im-reinfallen .9s var(--ease) backwards;
}
.im-polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.im-polaroid figcaption {
    position: absolute; left: 0; right: 0; bottom: .7rem; text-align: center;
    font: 800 .8rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
/* Klebeband oben */
.im-polaroid::before {
    content: ""; position: absolute; z-index: 1; top: -.75rem; left: 50%; width: 82px; height: 26px;
    background: rgba(255, 197, 49, .9); box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    transform: translateX(-50%) rotate(var(--t, -4deg));
}
.im-polaroid:nth-child(1) { --r: -8deg; left: 0; top: 3%; z-index: 2; animation-delay: .25s; }
.im-polaroid:nth-child(2) { --r: 6deg; --t: 5deg; right: 3%; top: 0; animation-delay: .4s; }
.im-polaroid:nth-child(3) { --r: 4deg; --t: -6deg; left: 11%; bottom: 0; z-index: 3; animation-delay: .55s; }
.im-polaroid:nth-child(4) { --r: -5deg; --t: 3deg; right: 0; bottom: 5%; z-index: 4; animation-delay: .7s; }
.im-polaroid:hover { z-index: 5; transform: rotate(0deg) scale(1.06); }
@keyframes im-reinfallen { from { opacity: 0; transform: translateY(-50px) rotate(calc(var(--r) * 3)) scale(1.08); } }

@media (max-width: 900px) {
    .im-hero__inner { grid-template-columns: minmax(0, 1fr); }
    .im-pinnwand { height: 330px; margin-top: 1rem; }
    .im-polaroid { width: 160px; padding: .45rem .45rem 1.9rem; }
    .im-polaroid figcaption { bottom: .55rem; font-size: .7rem; }
    .im-polaroid::before { width: 64px; height: 20px; top: -.6rem; }
    .im-polaroid:nth-child(1) { left: 2%; }
    .im-polaroid:nth-child(2) { right: 4%; }
    .im-polaroid:nth-child(3) { left: 22%; }
}
@media (max-width: 600px) {
    .im-hero__titel { font-size: 11.6vw; }
    .im-pinnwand { height: 290px; }
    .im-polaroid { width: 136px; }
    .im-polaroid:nth-child(3) { left: 14%; }
}

/* ---------- Galerie ---------- */
.im-galerie-sektion { padding: clamp(6.5rem, 11vw, 9rem) 0 var(--section); background: var(--cream); }
.im-galerie-sektion .ns-head { margin-bottom: clamp(1.5rem, 3vw, 2.2rem); }
.im-marquee { margin-bottom: clamp(1.5rem, 3vw, 2.2rem); }
.im-marquee img { border-radius: 18px; }
.im-filter { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }

/* Bento-Raster: Hochformate zwei Zeilen hoch, Panoramen zwei Spalten breit, jedes siebte Bild groß (siehe $format / impressionen.js) */
.im-galerie { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 15.5vw, 230px); grid-auto-flow: dense; gap: clamp(.6rem, 1.2vw, 1rem); }
.im-bild { position: relative; min-width: 0; margin: 0; overflow: hidden; border-radius: 20px; background: var(--cream-2); }
.im-bild--hoch { grid-row: span 2; }
.im-bild--breit { grid-column: span 2; }
.im-bild--gross { grid-column: span 2; grid-row: span 2; }
.im-bild button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.im-bild button:focus-visible { outline: 3px solid var(--flame); outline-offset: -3px; border-radius: 20px; }
.im-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.im-bild:hover img { transform: scale(1.06); }
.im-bild figcaption {
    position: absolute; inset: auto 0 0; padding: 2.6rem 1rem .9rem; pointer-events: none;
    color: #fff; font-weight: 700; font-size: .9rem; line-height: 1.35; background: linear-gradient(0deg, rgba(21, 17, 14, .85), transparent);
    opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.im-bild:hover figcaption, .im-bild:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .im-bild figcaption { opacity: 1; transform: none; padding-top: 2rem; font-size: .8rem; } }
/* Nach dem Filtern blenden die Bilder kurz ein */
.im-galerie.is-gefiltert .im-bild { animation: im-ein .55s var(--ease) both; }
@keyframes im-ein { from { opacity: 0; transform: scale(.94); } }
.im-leer { margin: 1rem 0 0; text-align: center; color: var(--text-2); }

@media (max-width: 1000px) {
    .im-galerie { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(140px, 22vw, 210px); }
}
@media (max-width: 640px) {
    .im-galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 42vw; }
    .im-bild { border-radius: 16px; }
    .im-bild--breit, .im-bild--gross { grid-column: span 2; }
    .im-bild--gross { grid-row: span 1; }
}
