/* Raumfrequenz v2 hero: scoped to avoid touching the rest of the landing page. */
.rf-hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #000;
  text-align: center;
  padding: clamp(6rem, 12vh, 8rem) 1.5rem clamp(3rem, 8vh, 5rem);
}

.rf-hero__backgrounds {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #000;
}

.rf-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.02);
  filter: contrast(1.04) saturate(1.02);
  animation: rfHeroSlideshow 21s infinite;
  will-change: opacity;
}

.rf-hero__bg:nth-child(1) { background-image: image-set(url('../hero/Life_Try.avif') type('image/avif'), url('../hero/Life_Try.webp') type('image/webp'), url('../hero/Life_Try.jpg') type('image/jpeg')); animation-delay: 0s; }
.rf-hero__bg:nth-child(2) { background-image: image-set(url('../hero/Life_Try_2.avif') type('image/avif'), url('../hero/Life_Try_2.webp') type('image/webp'), url('../hero/Life_Try_2.jpg') type('image/jpeg')); animation-delay: 3.5s; }
.rf-hero__bg:nth-child(3) { background-image: image-set(url('../hero/Life_Try_3.avif') type('image/avif'), url('../hero/Life_Try_3.webp') type('image/webp'), url('../hero/Life_Try_3.jpg') type('image/jpeg')); animation-delay: 7s; }
.rf-hero__bg:nth-child(4) { background-image: image-set(url('../hero/Life_Try_4.avif') type('image/avif'), url('../hero/Life_Try_4.webp') type('image/webp'), url('../hero/Life_Try_4.jpg') type('image/jpeg')); animation-delay: 10.5s; }
.rf-hero__bg:nth-child(5) { background-image: image-set(url('../hero/Life_Try_5.avif') type('image/avif'), url('../hero/Life_Try_5.webp') type('image/webp'), url('../hero/Life_Try_5.jpg') type('image/jpeg')); animation-delay: 14s; }
.rf-hero__bg:nth-child(6) { background-image: image-set(url('../hero/Life_Try.avif') type('image/avif'), url('../hero/Life_Try.webp') type('image/webp'), url('../hero/Life_Try.jpg') type('image/jpeg')); animation-delay: 17.5s; }

.rf-hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(0,0,0,0) 42%, rgba(0,0,0,0.1) 70%, rgba(0,0,0,0.32) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.22), rgba(0,0,0,0.12) 42%, rgba(0,0,0,0.46));
}

.rf-hero__content {
  position: relative;
  z-index: 2;
  width: min(92vw, 42rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  perspective: 1400px;
}

.rf-hero__logo-wrap {
  width: min(64vw, 340px);
  transform-style: preserve-3d;
  animation: rfHeroBassPulse 0.46875s infinite cubic-bezier(.18,.75,.22,1);
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.16)) drop-shadow(0 0 45px rgba(255,255,255,0.08));
  will-change: transform, filter;
}

.rf-hero__logo {
  display: block;
  width: 100%;
  height: auto;
  animation: rfHeroMicroShake 0.46875s infinite linear;
}

.rf-hero__subtitle {
  color: #fff;
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.35;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.9);
}

.rf-hero .cta-button {
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 22px rgba(0,0,0,.42), 0 0 28px rgba(255,255,255,.08);
}

@keyframes rfHeroSlideshow {
  0% { opacity: 0; }
  8% { opacity: 1; }
  24% { opacity: 1; }
  32% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes rfHeroBassPulse {
  0%, 100% { transform: scale(1) translateZ(0); filter: drop-shadow(0 0 10px rgba(255,255,255,0.16)) drop-shadow(0 0 45px rgba(255,255,255,0.08)); }
  10% { transform: scale(1.028) translateZ(22px); filter: blur(.7px) drop-shadow(0 0 12px rgba(255,255,255,0.18)) drop-shadow(0 0 48px rgba(255,255,255,0.09)); }
  20% { transform: scale(.992) translateZ(-5px); filter: blur(.3px) drop-shadow(0 0 10px rgba(255,255,255,0.16)) drop-shadow(0 0 45px rgba(255,255,255,0.08)); }
  32% { transform: scale(1.006) translateZ(3px); filter: blur(.15px) drop-shadow(0 0 10px rgba(255,255,255,0.16)) drop-shadow(0 0 45px rgba(255,255,255,0.08)); }
  45% { transform: scale(.999) translateZ(-1px); filter: drop-shadow(0 0 10px rgba(255,255,255,0.16)) drop-shadow(0 0 45px rgba(255,255,255,0.08)); }
}

@keyframes rfHeroMicroShake {
  0%, 100% { transform: translateX(0); }
  8% { transform: translateX(.3px); }
  12% { transform: translateX(-.3px); }
  18% { transform: translateX(.15px); }
}

@media (prefers-reduced-motion: reduce) {
  .rf-hero__bg,
  .rf-hero__logo-wrap,
  .rf-hero__logo {
    animation: none;
  }
  .rf-hero__bg:first-child { opacity: 1; }
}

@media (max-width: 640px) {
  .rf-hero__content { width: min(92vw, 25rem); }
  .rf-hero__logo-wrap { width: min(72vw, 280px); }
  .rf-hero__subtitle { letter-spacing: .08em; }
}

/* ============================================================
   Gallery Lightbox Modal (scoped .rfg-modal__*)
   ============================================================ */
.rfg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 2.5rem);
}
.rfg-modal--open {
  display: flex;
}
.rfg-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: -1;
}
.rfg-modal__box {
  position: relative;
  background: #111;
  border: 1px solid rgba(255, 0, 168, 0.25);
  border-radius: 12px;
  width: min(96vw, 1100px);
  margin: auto;
  box-shadow: 0 0 60px rgba(255, 0, 168, 0.15);
  overflow: hidden;
}
.rfg-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.5);
}
.rfg-modal__title {
  color: #fff;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0;
  -webkit-text-fill-color: #fff;
}
.rfg-modal__close {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s, transform .2s;
}
.rfg-modal__close:hover {
  background: rgba(255, 0, 168, 0.25);
  border-color: #ff00a8;
  color: #fff;
  transform: rotate(90deg);
}
.rfg-modal__body {
  padding: 1.5rem;
  min-height: 200px;
}
.rfg-modal__loading,
.rfg-modal__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  letter-spacing: .05em;
}
.rfg-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: .75rem;
}
.rfg-modal__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: #1a1a1a;
  aspect-ratio: 1 / 1;
}
.rfg-modal__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, opacity .3s;
  opacity: .92;
}
.rfg-modal__item:hover img {
  transform: scale(1.04);
  opacity: 1;
}
.rfg-modal__caption {
  position: absolute;
  inset: auto 0 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff;
  font-size: .75rem;
  padding: 1.5rem .5rem .4rem;
  text-align: center;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.rfg-modal__item:hover .rfg-modal__caption {
  opacity: 1;
}
@media (max-width: 480px) {
  .rfg-modal__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Image Lightbox Modal for media photos */
.rfg-image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9100;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}
.rfg-image-modal--open { display: flex; }
.rfg-image-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}
.rfg-image-modal__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(94vw, 1200px);
  max-height: 90vh;
  display: grid;
  gap: .75rem;
  justify-items: center;
}
.rfg-image-modal__image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 70px rgba(255, 0, 168, 0.18);
}
.rfg-image-modal__caption {
  color: rgba(255,255,255,.82);
  font-size: .9rem;
  letter-spacing: .06em;
  text-align: center;
}
.rfg-image-modal__close {
  position: absolute;
  top: -1rem;
  right: -1rem;
  z-index: 2;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.rfg-image-modal__close:hover {
  background: rgba(255,0,168,.28);
  border-color: #ff00a8;
  transform: rotate(90deg);
}
.rfg-modal__item {
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

/* Gallery modal adapts to small image counts to avoid empty horizontal space. */
.rfg-modal__box:has(.rfg-modal__grid--count-1) {
  width: min(96vw, 410px);
}
.rfg-modal__box:has(.rfg-modal__grid--count-2) {
  width: min(96vw, 700px);
}
.rfg-modal__box:has(.rfg-modal__grid--count-3) {
  width: min(96vw, 960px);
}
.rfg-modal__grid {
  justify-content: center;
}
.rfg-modal__grid--count-1,
.rfg-modal__grid--count-2,
.rfg-modal__grid--count-3 {
  grid-template-columns: repeat(var(--rfg-count), minmax(0, 280px));
}
@media (max-width: 760px) {
  .rfg-modal__box:has(.rfg-modal__grid--count-2),
  .rfg-modal__box:has(.rfg-modal__grid--count-3) {
    width: min(96vw, 410px);
  }
  .rfg-modal__grid--count-2,
  .rfg-modal__grid--count-3 {
    grid-template-columns: 1fr;
  }
}

/* Lightbox gallery navigation */
.rfg-image-modal__nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: clamp(2.4rem, 5vw, 3.25rem);
  height: clamp(2.4rem, 5vw, 3.25rem);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .46);
  color: rgba(255, 255, 255, .82);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: .85;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.rfg-image-modal__nav--prev { left: clamp(.75rem, 3vw, 2rem); }
.rfg-image-modal__nav--next { right: clamp(.75rem, 3vw, 2rem); }
.rfg-image-modal__nav:hover {
  background: rgba(255, 0, 168, .25);
  border-color: #ff00a8;
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}
.rfg-image-modal__nav[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .rfg-image-modal__nav {
    background: rgba(0, 0, 0, .32);
  }
  .rfg-image-modal__nav--prev { left: .35rem; }
  .rfg-image-modal__nav--next { right: .35rem; }
  .rfg-image-modal__figure {
    max-width: 88vw;
  }
}
