/**
 * Decorative Jazz Atmosphere Styles
 * RMS JazzOrchester Köln
 *
 * Subtle ambient elements for jazz atmosphere
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --decoration-opacity: 0.08;
  --particle-color: var(--gold, #D4AF37);
  --vinyl-decoration-size: 500px;
  --smoke-blur: 30px;
  --bokeh-blur: 40px;
}

/* Theme-specific particle colors */
body[data-theme="midnight-blue"] {
  --particle-color: rgba(107, 154, 196, 0.3);
}

body[data-theme="warm-jazz"] {
  --particle-color: rgba(232, 167, 53, 0.4);
}

body[data-theme="vintage-brass"] {
  --particle-color: rgba(205, 127, 50, 0.3);
}

/* Light theme - enhanced contrast for visibility */
body[data-theme="light-classic"] {
  --decoration-opacity: 0.12;
  --particle-color: rgba(26, 74, 109, 0.6);
  --smoke-blur: 35px;
}

/* ============================================
   Hero Vinyl Decoration
   ============================================ */
.hero-vinyl-decoration {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: var(--vinyl-decoration-size);
  height: var(--vinyl-decoration-size);
  opacity: 0.15;
  animation: vinyl-decoration-spin 8s linear infinite;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.6s ease;
  will-change: transform;
}

.hero-vinyl-decoration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 80px rgba(212, 175, 55, 0.5));
}

@keyframes vinyl-decoration-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Theme-aware glow */
body[data-theme="dark-gold"] .hero-vinyl-decoration img {
  filter: drop-shadow(0 0 80px rgba(212, 175, 55, 0.5));
}

body[data-theme="midnight-blue"] .hero-vinyl-decoration img {
  filter: drop-shadow(0 0 80px rgba(107, 154, 196, 0.5));
}

body[data-theme="warm-jazz"] .hero-vinyl-decoration img {
  filter: drop-shadow(0 0 80px rgba(232, 167, 53, 0.5));
}

body[data-theme="vintage-brass"] .hero-vinyl-decoration img {
  filter: drop-shadow(0 0 80px rgba(205, 127, 50, 0.5));
}

body[data-theme="light-classic"] .hero-vinyl-decoration {
  opacity: 0.25;
}

body[data-theme="light-classic"] .hero-vinyl-decoration img {
  filter: drop-shadow(0 0 50px rgba(0, 0, 0, 0.15));
}

/* Mobile - smaller and more subtle */
@media (max-width: 767px) {
  :root {
    --vinyl-decoration-size: 150px;
  }

  .hero-vinyl-decoration {
    opacity: 0 !important; /* Hide on mobile for performance */
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --vinyl-decoration-size: 350px;
  }
}

/* Desktop - extra large and prominent */
@media (min-width: 1024px) {
  :root {
    --vinyl-decoration-size: 500px;
  }

  .hero-vinyl-decoration {
    top: 1rem;
    right: 1rem;
  }
}

/* ============================================
   Jazz Particles
   ============================================ */
.jazz-particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.jazz-particle {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: var(--particle-color);
  animation: float-up 30s ease-in infinite;
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes float-up {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-100vh) translateX(20px);
    opacity: 0;
  }
}

/* ============================================
   Smoke Effects
   ============================================ */
.smoke-effect {
  position: absolute;
  bottom: 0;
  width: 300px;
  height: 400px;
  background: radial-gradient(
    ellipse at bottom,
    rgba(245, 245, 245, 0.12) 0%,
    transparent 60%
  );
  opacity: 0.6;
  filter: blur(var(--smoke-blur));
  animation: smoke-rise 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

.smoke-left {
  left: 5%;
}

.smoke-right {
  right: 5%;
  animation-delay: 6s;
}

@keyframes smoke-rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-200px) scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-400px) scale(1.4);
    opacity: 0.2;
  }
}

/* Light theme smoke - enhanced contrast */
body[data-theme="light-classic"] .smoke-effect {
  background: radial-gradient(
    ellipse at bottom,
    rgba(26, 74, 109, 0.15) 0%,
    transparent 60%
  );
  opacity: 0.7;
}

/* Mobile - hide smoke */
@media (max-width: 767px) {
  .smoke-effect {
    display: none;
  }
}

/* ============================================
   Section Background Textures (Disabled - textures not available)
   ============================================ */
/*
#about::before,
#galerie::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.6s ease;
}

#about::before {
  background: url('/assets/images/decorative/textures/leather.webp') repeat;
  background-size: 400px 400px;
}

#galerie::before {
  background: url('/assets/images/decorative/textures/velvet.webp') repeat;
  background-size: 500px 500px;
  mix-blend-mode: overlay;
}

body[data-theme="light-classic"] #about::before,
body[data-theme="light-classic"] #galerie::before {
  mix-blend-mode: overlay;
}
*/

/* ============================================
   Floating Instruments
   ============================================ */
.floating-instrument {
  position: fixed;
  width: 80px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: transform 20s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 2s ease-in;
  z-index: 0;
  will-change: transform, opacity;
}

.floating-instrument img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.6;
}

/* Theme-specific instrument colors */
body[data-theme="dark-gold"] .floating-instrument img {
  filter: brightness(0) saturate(100%) invert(74%) sepia(28%) saturate(802%) hue-rotate(359deg);
}

body[data-theme="midnight-blue"] .floating-instrument img {
  filter: brightness(0) saturate(100%) invert(64%) sepia(19%) saturate(839%) hue-rotate(170deg);
}

body[data-theme="warm-jazz"] .floating-instrument img {
  filter: brightness(0) saturate(100%) invert(70%) sepia(44%) saturate(685%) hue-rotate(359deg);
}

body[data-theme="light-classic"] .floating-instrument img {
  filter: brightness(0) saturate(100%) invert(35%) sepia(12%) saturate(1500%) hue-rotate(170deg);
  opacity: 0.15;
}

/* ============================================
   Bokeh Light Effects
   ============================================ */
.bokeh-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

.bokeh-light {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--theme-primary, var(--gold)) 0%,
    transparent 70%
  );
  opacity: 0.04;
  filter: blur(var(--bokeh-blur));
  pointer-events: none;
  animation: bokeh-pulse 8s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes bokeh-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.03;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.05;
  }
}

/* Mobile - hide bokeh */
@media (max-width: 767px) {
  .bokeh-light {
    display: none;
  }
}

/* ============================================
   Card Enhancements
   ============================================ */

/* Featured Event Card - Golden Frame */
.termin-card.is-featured {
  position: relative;
  border: none;
  padding: 2.5rem;
}

.termin-card.is-featured::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: url('/assets/images/decorative/frames/golden-frame.svg') no-repeat center;
  background-size: 100% 100%;
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}

/* Vintage Stamp Style */
.termin-card.vintage-stamp {
  border: 3px dashed rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  position: relative;
}

.termin-card.vintage-stamp::after {
  content: '★';
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 36px;
  color: var(--gold);
  opacity: 0.15;
}

/* Polaroid Effect */
.termin-card.polaroid {
  background: #fff;
  padding: 15px 15px 50px 15px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 0 0 12px #fff,
    0 0 0 13px rgba(0, 0, 0, 0.1);
  transform: rotate(-0.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.termin-card.polaroid:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.25),
    0 0 0 12px #fff,
    0 0 0 13px rgba(0, 0, 0, 0.15);
}

/* Light theme card adjustments */
body[data-theme="light-classic"] .termin-card.vintage-stamp {
  border-color: rgba(0, 0, 0, 0.2);
}

/* ============================================
   Decorative Section Dividers
   ============================================ */
.section-divider {
  position: relative;
  height: 1px;
  margin: 4rem 0;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(212, 175, 55, 0.3) 50%,
    transparent 100%
  );
}

.section-divider::after {
  content: '♦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  color: var(--gold);
  background: var(--theme-bg);
  padding: 0 1rem;
}

/* ============================================
   Scroll Reveal Animations
   ============================================ */
.reveal-pending {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-pending.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Accessible Mode - Disable ALL Decorations
   ============================================ */
body[data-accessible="true"] .hero-vinyl-decoration,
body[data-accessible="true"] .jazz-particle,
body[data-accessible="true"] .jazz-particles-container,
body[data-accessible="true"] .smoke-effect,
body[data-accessible="true"] .floating-instrument,
body[data-accessible="true"] .bokeh-light,
body[data-accessible="true"] .bokeh-container,
body[data-accessible="true"] #about::before,
body[data-accessible="true"] #galerie::before {
  display: none !important;
}

body[data-accessible="true"] .termin-card.is-featured::before,
body[data-accessible="true"] .termin-card.vintage-stamp::after {
  display: none !important;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-vinyl-decoration,
  .jazz-particle,
  .smoke-effect,
  .floating-instrument,
  .bokeh-light {
    animation: none !important;
    transition: none !important;
  }

  .reveal-pending {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================
   Performance - Hide when tab not visible
   ============================================ */
body.tab-hidden .jazz-particle,
body.tab-hidden .floating-instrument,
body.tab-hidden .smoke-effect {
  animation-play-state: paused;
}

/* ============================================
   Print - Hide all decorations
   ============================================ */
@media print {
  .hero-vinyl-decoration,
  .jazz-particles-container,
  .smoke-effect,
  .floating-instrument,
  .bokeh-container,
  .termin-card.is-featured::before,
  .termin-card.vintage-stamp::after {
    display: none !important;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.no-decorations {
  --decoration-opacity: 0 !important;
}

.no-decorations .hero-vinyl-decoration,
.no-decorations .jazz-particles-container,
.no-decorations .smoke-effect,
.no-decorations .floating-instrument,
.no-decorations .bokeh-container {
  display: none !important;
}
