/* =========================================================
   POOL PROMOTION — ALTERNATIVE HOME (nur auf dieser Seite)

   Drei Zustände:
   (ohne Klasse)   kein JS / reduzierte Bewegung → Logo klein oben rechts,
                   Künstler sofort sichtbar
   .pool-alt-js    JS kommt gleich → Logo + Künstler kurz ausgeblendet,
                   damit nichts springt
   .pool-alt-ready JS hat gemessen → Scroll-Animation läuft
   ========================================================= */

.pool-alt-body { overflow-x: clip; }

/* ---------- Header: bleibt immer oben stehen ---------- */
.pool-alt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* Kein eigener Hintergrund/Schatten aus style.css auf dieser Seite —
     die Künstler blenden stattdessen unter dem Header weich aus (JS) */
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  filter: none !important;
}
.pool-alt-header::before,
.pool-alt-header::after { display: none !important; }
.pool-alt-header .main-nav { position: relative; z-index: 2; } /* Dropdowns über dem Logo */

/* ---------- Logo ---------- */
.pool-alt-logo {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  width: clamp(140px, 14.5vw, 215px); /* wie .pool-logo auf den Unterseiten */
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  line-height: 0;
}
.pool-alt-logo img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

/* Platzhalter oben rechts = Ziel der Animation (nur mit JS aktiv) */
.pool-alt-logo-target {
  display: none;
  flex: 0 0 auto;
  width: clamp(140px, 14.5vw, 215px); /* wie .pool-logo auf den Unterseiten */
  aspect-ratio: 2.1 / 1; /* JS setzt das echte Seitenverhältnis des Logos */
  margin-left: auto;
  pointer-events: none;
}

/* ---------- Inhalt ---------- */
.pool-alt-main { position: relative; }
.pool-alt-intro { height: 140px; } /* ohne JS: nur Platz für den fixen Header */
.pool-alt-artists {
  position: relative;
  z-index: 10;
  padding-top: 0;
}

/* ---------- JS lädt noch: kurz ausblenden (Notfall: nach 2.5 s trotzdem zeigen) ---------- */
.pool-alt-js:not(.pool-alt-ready) .pool-alt-logo,
.pool-alt-js:not(.pool-alt-ready) .pool-alt-artists {
  opacity: 0;
  animation: pool-alt-fallback 0s linear 2.5s forwards;
}
@keyframes pool-alt-fallback { to { opacity: 1; } }

/* ---------- Animation aktiv ---------- */
.pool-alt-ready .pool-alt-logo-target { display: block; }
.pool-alt-ready .pool-alt-logo {
  position: fixed;
  top: 0; left: 0;
  margin: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.pool-alt-ready .pool-alt-intro {
  height: 110svh; /* stabil auf dem Handy, wenn die Adressleiste ein-/ausfährt */
}
.pool-alt-ready .pool-alt-artists { box-sizing: border-box; } /* JS rechnet die Höhe inkl. Padding */

/* =========================================================
   KÜNSTLER-GRID (Startseite)
   4 Spalten, Fotos im Pink Mode, Name schiebt sich bei Hover rein
   ========================================================= */
.artist-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 18px);
  width: 100%;
}

.artist-tile {
  position: relative;
  aspect-ratio: 1 / 1;           /* quadratisch */
  overflow: hidden;
  margin: 0;
  outline: none;
  cursor: pointer;
}
.artist-tile:focus-visible { box-shadow: 0 0 0 2px var(--white, #fff); }

/* ---------- Foto im Pink Mode (wie die Vorschau auf den Künstlerseiten) ---------- */
.artist-tile-media {
  position: absolute;
  inset: 0;
  isolation: isolate;
  background: var(--berry, #820A5F); /* Künstler ohne Foto: Berry-Fläche */
}
.artist-tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.12);
  transform: scale(1.01);   /* minimal größer → keine hellen Kanten */
  transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}
.artist-tile-media::after { /* Berry-Farbschicht */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--berry, #820A5F);
  mix-blend-mode: color;
  pointer-events: none;
}
.artist-tile-media::before { /* Verlauf unten, damit der Name lesbar ist */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to top, color-mix(in srgb, var(--background) 70%, transparent) 0%, transparent 45%);
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}

/* ---------- Name: wartet unterhalb der Kachel ---------- */
.artist-tile-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  margin: 0;
  padding: clamp(12px, 1.4vw, 22px);
  color: var(--white, #fff);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 700;
  line-height: 1;
  transform: translateY(101%);   /* liegt unsichtbar unter der Kachelkante … */
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
}
.artist-tile-name span { display: block; }

/* ---------- Hover / Tastatur-Fokus ---------- */
/* … und schiebt sich bei Hover herein */
.artist-tile:hover .artist-tile-name,
.artist-tile:focus-visible .artist-tile-name { transform: translateY(0); }
.artist-tile:hover .artist-tile-media::before,
.artist-tile:focus-visible .artist-tile-media::before { opacity: 1; }
.artist-tile:hover .artist-tile-media img,
.artist-tile:focus-visible .artist-tile-media img { transform: scale(1.05); }

/* Kacheln blenden beim Scrollen ein (JS setzt --reveal / --rise) */
/* ---------- Einblenden: „Blop“ vom kleinen Kreis zum Quadrat ----------
   Das Foto wächst als kleiner Kreis aus der Kachelmitte, wird groß
   und rastet als Quadrat ein. Animiert werden nur transform (läuft
   auf der Grafikkarte → flüssig) und border-radius.
   JS setzt .is-in, sobald die Kachel ins Bild kommt (--delay pro Spalte),
   und .is-out, wenn sie das Bild verlässt (dann rückwärts). */
.pool-alt-ready .pool-alt-artists .artist-tile {
  opacity: var(--fade-out, 1);   /* oben unter der Navi ausblenden (JS) */
}
.pool-alt-ready .pool-alt-artists .artist-tile .artist-tile-media {
  transform: scale(0);
  border-radius: 50%;
  will-change: transform;
  backface-visibility: hidden;
}
.pool-alt-ready .pool-alt-artists .artist-tile.is-in .artist-tile-media {
  animation: pool-blop .55s cubic-bezier(.45, 0, .15, 1) var(--delay, 0ms) both;
}

@keyframes pool-blop {
  0%   { transform: scale(.04); border-radius: 50%; }
  55%  { border-radius: 50%; }                     /* bis hier ein Kreis … */
  100% { transform: scale(1);   border-radius: 0; } /* … dann Quadrat */
}

/* Kacheln sind Links zur Künstlerseite */
a.artist-tile {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* ---------- Tablet: 3 Spalten ---------- */
@media (max-width: 1000px) {
  .artist-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Handy: 2 Spalten ---------- */
@media (max-width: 700px) {
  .artist-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .artist-tile-name { font-size: 18px; padding: 10px 12px; }
}

/* ---------- Geräte ohne Hover (Touch): Name immer sichtbar ---------- */
@media (hover: none) {
  .artist-tile-name { transform: none; }
  .artist-tile-media::before { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .artist-tile-name,
  .artist-tile-media img { transition: none; }
}

/* =========================================================
   UMSCHALTER RASTER / LISTE (Startseite)
   ========================================================= */

.view-switch {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  margin: 0 0 22px;
}
.view-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--berry, #820A5F);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  opacity: .6;
  cursor: pointer;
  transition: opacity .2s ease, border-color .2s ease;
}
.view-switch-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.view-switch-btn:hover,
.view-switch-btn:focus-visible { opacity: 1; }
.view-switch-btn.is-active {
  opacity: 1;
  border-bottom-color: var(--berry, #820A5F);
}

.artist-views [hidden] { display: none !important; }

/* =========================================================
   LISTEN-ANSICHT
   Links die Namen, rechts (Desktop) das Foto des Artists,
   über dem die Maus gerade ist.
   ========================================================= */

.artist-list-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(30px, 5vw, 80px);
  align-items: start;
}

.artist-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.artist-list li {
  animation: pool-row-in .6s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes pool-row-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.artist-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 7px 0;
  color: var(--white, #fff);
  text-decoration: none;
  opacity: var(--fade-out, 1);   /* oben unter der Navi ausblenden (JS) */
}
.artist-row-name {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  transition: color .2s ease;
}
.artist-row:hover .artist-row-name,
.artist-row:focus-visible .artist-row-name,
.artist-row.is-current .artist-row-name {
  color: var(--berry, #820A5F);
}

/* kleines Foto nur auf dem Handy */
.artist-row-thumb { display: none; }

/* großes Foto rechts, bleibt beim Scrollen stehen */
.artist-list-preview {
  position: sticky;
  top: calc(var(--header-height, 120px) + 30px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  isolation: isolate;
}
.artist-list-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: pool-photo-in .45s ease both;
}
@keyframes pool-photo-in {
  from { opacity: .4; }
  to   { opacity: 1; }
}

/* Farbfilter wie bei allen anderen Fotos (Werte aus dem Panel) */
.artist-list-preview::after,
.artist-row-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--photo-tint, var(--berry, #820A5F));
  opacity: var(--photo-tint-opacity, 1);
  mix-blend-mode: color;
  pointer-events: none;
}
.artist-list-preview img,
.artist-row-thumb img {
  filter:
    grayscale(var(--photo-grayscale, 100%))
    contrast(var(--photo-contrast, 1.12))
    brightness(var(--photo-brightness, 1));
}

@media (max-width: 1000px) {
  .artist-row-name { font-size: 26px; }
}

/* Handy: eine Spalte, kleines Foto vor dem Namen, Kategorie immer sichtbar */
@media (max-width: 700px) {
  .view-switch { gap: 18px; margin-bottom: 16px; }
  .view-switch-btn { font-size: 18px; }

  .artist-list-wrap { display: block; }
  .artist-list-preview { display: none; }

  .artist-row {
    align-items: center;
    gap: 12px;
    padding: 6px 0;
  }
  .artist-row-thumb {
    position: relative;
    display: block;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    overflow: hidden;
    isolation: isolate;
    background: var(--berry, #820A5F);
  }
  .artist-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .artist-row-name { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .artist-list li,
  .artist-list-preview img { animation: none; }
}

/* Handy: angedocktes Logo so groß wie auf den Unterseiten (92px),
   damit es nicht in das Menü ragt */
@media (max-width: 700px) {
  .pool-alt-logo-target,
  .pool-alt-logo:not(.pool-alt-ready *) { width: 96px; }
}

/* =========================================================
   Header auf der Startseite ohne Transparenz
   ========================================================= */
.pool-alt-header {
  background: var(--background) !important;
}

/* =========================================================
   Berry-Spot beim Hover über das Logo
   (wie auf den Unterseiten, .pool-logo in style.css)
   ========================================================= */
.pool-alt-logo {
  --logo-x: 50%;
  --logo-y: 50%;
  --logo-r: 36px;   /* JS rechnet die Skalierung des Logos heraus */
}
.pool-alt-logo img { position: relative; z-index: 1; }
.pool-alt-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-color: var(--berry, #820A5F);
  -webkit-mask: url("/assets/images/poolpromotion-logo.svg") center / 100% 100% no-repeat;
          mask: url("/assets/images/poolpromotion-logo.svg") center / 100% 100% no-repeat;
  -webkit-clip-path: circle(0px at var(--logo-x) var(--logo-y));
          clip-path: circle(0px at var(--logo-x) var(--logo-y));
  transition:
    -webkit-clip-path 1.1s cubic-bezier(.16, 1, .3, 1),
    clip-path 1.1s cubic-bezier(.16, 1, .3, 1);
}
.pool-alt-logo.has-cursor::after {
  -webkit-clip-path: circle(var(--logo-r) at var(--logo-x) var(--logo-y));
          clip-path: circle(var(--logo-r) at var(--logo-x) var(--logo-y));
}
@media (hover: none), (pointer: coarse) {
  .pool-alt-logo::after { display: none; }
}

/* Blop rückwärts – verlässt eine Kachel das Bild,
   schrumpft sie wieder zum Punkt (kommt sie zurück, ploppt sie neu auf) */
.pool-alt-ready .pool-alt-artists .artist-tile.is-out .artist-tile-media {
  animation: pool-blop-out .35s cubic-bezier(.55, 0, .85, .35) both;
}
@keyframes pool-blop-out {
  0%   { transform: scale(1);   border-radius: 0; }
  45%  { border-radius: 50%; }
  100% { transform: scale(.04); border-radius: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .pool-alt-ready .pool-alt-artists .artist-tile .artist-tile-media,
  .pool-alt-ready .pool-alt-artists .artist-tile.is-in .artist-tile-media,
  .pool-alt-ready .pool-alt-artists .artist-tile.is-out .artist-tile-media {
    animation: none;
    transform: none;
    border-radius: 0;
  }
}
