/* ═══════════════════════════════════════════════════════════════════
   ALICE — Spielkarten, Illustrationen, CSS-Filter
   ═══════════════════════════════════════════════════════════════════ */

/* Illustration filters */
.alice-img {
  width: 100%;
  height: auto;
}

.alice-filter-blue {
  filter: invert(1) sepia(1) saturate(3) hue-rotate(195deg) brightness(0.75);
}

.alice-filter-purple {
  filter: invert(1) sepia(1) saturate(3) hue-rotate(230deg) brightness(0.75);
}

.alice-filter-steel {
  filter: invert(1) sepia(1) saturate(1.8) hue-rotate(175deg) brightness(0.8);
}

.alice-filter-green {
  filter: invert(1) sepia(1) saturate(2) hue-rotate(85deg) brightness(0.8);
}

.alice-filter-copper {
  filter: invert(1) sepia(1) saturate(1.5) hue-rotate(5deg) brightness(0.85);
}

.alice-filter-coral {
  filter: invert(1) sepia(1) saturate(2) hue-rotate(325deg) brightness(0.8);
}

/* Hero illustration: heller, mehr Präsenz */
.hero-illustration .alice-img {
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 48%, rgba(0,0,0,0.85) 25%, rgba(0,0,0,0.4) 55%, transparent 85%);
  mask-image: radial-gradient(ellipse 90% 85% at 50% 48%, rgba(0,0,0,0.85) 25%, rgba(0,0,0,0.4) 55%, transparent 85%);
  opacity: 0.9;
  filter: invert(1) sepia(1) saturate(3) hue-rotate(195deg) brightness(0.92);
}

/* Viewport Cat (Grinsekatze) */
.viewport-cat {
  background: var(--bg-base);
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  padding: 40px 60px;
  gap: 40px;
}

.cat-overline {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 32px;
}

.cat-illustration img {
  width: 100%;
  max-width: 680px;
}

.dialog-line {
  margin-bottom: 20px;
}

.dialog-speaker {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.speaker-alice {
  color: var(--blue-electric);
  opacity: 0.7;
}

.speaker-cat {
  color: var(--purple-vivid);
  opacity: 0.7;
}

.dialog-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--text-headline);
  line-height: 1.6;
}

.dialog-divider {
  height: 1px;
  background: rgba(110, 145, 180, 0.15);
  margin: 24px 0;
}

.sonaris-perspective {
  border-left: 2px solid var(--purple-vivid);
  padding-left: 20px;
  margin-top: 32px;
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.7;
}

/* Spielkarten */
.viewport-cards {
  padding: 80px 24px 100px;
  background: var(--bg-base);
}

.cards-header {
  text-align: center;
  margin-bottom: 48px;
}

.cards-overline {
  display: block;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cards-headline {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 400;
  color: var(--text-headline);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 270px);
  grid-template-rows: repeat(2, 405px);
  gap: 32px;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Karten-Deal-Animation */
.viewport-cards .playing-card {
  opacity: 0;
  transform: translateY(40px) rotate(8deg) scale(0.85);
}

.viewport-cards.dealt .playing-card {
  animation: dealCard 0.5s ease-out forwards;
}

@keyframes dealCard {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(8deg) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

.playing-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.playing-card:hover {
  transform: translateY(-10px) scale(1.02) rotate(-2deg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.playing-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid currentColor;
  border-radius: 8px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

.playing-card::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 0.5px solid currentColor;
  border-radius: 6px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

.card-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.card-corner-top { top: 14px; left: 14px; }
.card-corner-bottom { bottom: 14px; right: 14px; transform: rotate(180deg); }

.card-rank {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}

.card-suit {
  font-size: 16px;
  margin-top: -4px;
}

.card-illustration {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 0;
}

.card-illustration img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.card-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.card-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 12px;
  opacity: 0.8;
}

.card-station {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
}

/* Kartenfarben + Rauten-Pattern */
.card-blue {
  color: #3B82F6;
  background-color: rgba(59, 130, 246, 0.12);
  background-image:
    repeating-linear-gradient(45deg, rgba(59, 130, 246, 0.05) 0px, rgba(59, 130, 246, 0.05) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(59, 130, 246, 0.05) 0px, rgba(59, 130, 246, 0.05) 1px, transparent 1px, transparent 18px);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.card-purple {
  color: #8B5CF6;
  background-color: rgba(139, 92, 246, 0.12);
  background-image:
    repeating-linear-gradient(45deg, rgba(139, 92, 246, 0.05) 0px, rgba(139, 92, 246, 0.05) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(139, 92, 246, 0.05) 0px, rgba(139, 92, 246, 0.05) 1px, transparent 1px, transparent 18px);
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.card-steel {
  color: #6E91B4;
  background-color: rgba(110, 145, 180, 0.12);
  background-image:
    repeating-linear-gradient(45deg, rgba(110, 145, 180, 0.05) 0px, rgba(110, 145, 180, 0.05) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(110, 145, 180, 0.05) 0px, rgba(110, 145, 180, 0.05) 1px, transparent 1px, transparent 18px);
  border: 1px solid rgba(110, 145, 180, 0.2);
}
.card-green {
  color: #6EB48C;
  background-color: rgba(110, 180, 140, 0.12);
  background-image:
    repeating-linear-gradient(45deg, rgba(110, 180, 140, 0.05) 0px, rgba(110, 180, 140, 0.05) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(110, 180, 140, 0.05) 0px, rgba(110, 180, 140, 0.05) 1px, transparent 1px, transparent 18px);
  border: 1px solid rgba(110, 180, 140, 0.2);
}
.card-copper {
  color: #AA7D55;
  background-color: rgba(170, 125, 85, 0.12);
  background-image:
    repeating-linear-gradient(45deg, rgba(170, 125, 85, 0.05) 0px, rgba(170, 125, 85, 0.05) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(170, 125, 85, 0.05) 0px, rgba(170, 125, 85, 0.05) 1px, transparent 1px, transparent 18px);
  border: 1px solid rgba(170, 125, 85, 0.2);
}
.card-coral {
  color: #A0555F;
  background-color: rgba(160, 85, 95, 0.12);
  background-image:
    repeating-linear-gradient(45deg, rgba(160, 85, 95, 0.05) 0px, rgba(160, 85, 95, 0.05) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(-45deg, rgba(160, 85, 95, 0.05) 0px, rgba(160, 85, 95, 0.05) 1px, transparent 1px, transparent 18px);
  border: 1px solid rgba(160, 85, 95, 0.2);
}

.card-blue .alice-filter-blue { filter: invert(1) sepia(1) saturate(3) hue-rotate(195deg) brightness(0.75); }
.card-purple .alice-filter-purple { filter: invert(1) sepia(1) saturate(3) hue-rotate(230deg) brightness(0.75); }
.card-steel .alice-filter-steel { filter: invert(1) sepia(1) saturate(1.8) hue-rotate(175deg) brightness(0.8); }
.card-green .alice-filter-green { filter: invert(1) sepia(1) saturate(2) hue-rotate(85deg) brightness(0.8); }
.card-copper .alice-filter-copper { filter: invert(1) sepia(1) saturate(1.5) hue-rotate(5deg) brightness(0.85); }
.card-coral .alice-filter-coral { filter: invert(1) sepia(1) saturate(2) hue-rotate(325deg) brightness(0.8); }

/* Sidebar — Flip-Karten */
.card-sidebar {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.card-sidebar.visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-card {
  width: 57px;
  height: 83px;
  border-radius: 6px;
  text-decoration: none;
  position: relative;
  display: block;
  transition: transform 0.3s ease;
}
.sidebar-card:hover {
  transform: scale(1.15) rotate(-2deg);
}

.sidebar-card .card-container {
  width: 100%;
  height: 100%;
  perspective: 600px;
}

.sidebar-card .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-card .card-back,
.sidebar-card .card-front {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Rückseite (unbesucht): neutral, Rauten-Pattern, "?" */
.sidebar-card .card-back {
  background: rgba(110, 145, 180, 0.06);
  background-image:
    repeating-linear-gradient(45deg, rgba(110, 145, 180, 0.08) 0px, rgba(110, 145, 180, 0.08) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(110, 145, 180, 0.08) 0px, rgba(110, 145, 180, 0.08) 1px, transparent 1px, transparent 10px);
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  opacity: 0.3;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
}

.sidebar-card .card-back::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 0.5px solid currentColor;
  border-radius: 4px;
  opacity: 0.4;
}

/* Vorderseite (besucht): Stationsfarbe, Rank/Suit, Doppelrand */
.sidebar-card .card-front {
  border: 1px solid currentColor;
  transform: rotateY(180deg);
  background: transparent;
}

.sidebar-card .card-front::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 0.5px solid currentColor;
  border-radius: 4px;
  opacity: 0.3;
  pointer-events: none;
}

/* Shimmer auf Vorderseite bei .visited */
.sidebar-card.visited .card-front::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(110deg, transparent 0%, transparent 35%, rgba(255,255,255,0.12) 50%, transparent 65%, transparent 100%);
  background-size: 250% 100%;
  animation: shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Flip bei .visited */
.sidebar-card.visited .card-inner {
  transform: rotateY(180deg);
}

/* Dezenter Glow bei besuchten Karten */
.sidebar-card.visited .card-front {
  box-shadow: 0 0 12px currentColor;
}

.sidebar-card .card-rank { font-size: 20px; }
.sidebar-card .card-front .card-rank { font-family: 'Playfair Display', serif; font-weight: 700; }
.sidebar-card .card-suit { font-size: 14px; }
.sidebar-card .card-front .card-suit { margin-top: -2px; }

/* Hover-Label (auf dem Link) */
.sidebar-card::before {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-body);
  background: var(--bg-elevated);
  padding: 6px 12px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border: 1px solid rgba(110, 145, 180, 0.15);
  z-index: 10;
}

.sidebar-card:hover::before {
  opacity: 1;
}

/* Sidebar-Reset (unterhalb der 6. Karte, im Stil der .reset-icon) */
.card-sidebar .reset-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(140,160,190,0.12);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin: 4px auto 0;
}

.card-sidebar .reset-icon:hover {
  color: var(--text-body);
  border-color: rgba(140,160,190,0.3);
  background: rgba(140,160,190,0.05);
}

.card-sidebar .reset-icon:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.card-sidebar .reset-icon svg {
  width: 15px;
  height: 15px;
}

.card-sidebar .reset-icon .tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid rgba(140,160,190,0.15);
  color: var(--text-body);
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.card-sidebar .reset-icon:hover .tooltip,
.card-sidebar .reset-icon:focus-visible .tooltip {
  opacity: 1;
}

/* ========================================
   TESTIMONIAL TEASER — Unterseiten
   ======================================== */
.testimonial-teaser {
  display: block;
  max-width: 680px;
  width: 100%;
  margin: 96px auto 0 auto;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.teaser-inner {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.4s ease, transform 0.3s ease;
  border: 1px solid rgba(225, 225, 225, 0.05);
}

.testimonial-teaser:hover .teaser-inner {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  border-color: rgba(170, 125, 85, 0.12);
}

/* Linkes Feld — streckt sich auf volle Höhe */
.teaser-card-area {
  flex-shrink: 0;
  width: 100px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Die eigentliche Karte — mittig im Feld, Proportion 5:7 */
.teaser-card-back {
  width: 56px;
  height: 78px;
  border-radius: 5px;
  border: 1px solid rgba(170, 125, 85, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rautenmuster */
.teaser-card-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(170, 125, 85, 0.04) 0px,
      rgba(170, 125, 85, 0.04) 1px,
      transparent 1px,
      transparent 10px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(170, 125, 85, 0.04) 0px,
      rgba(170, 125, 85, 0.04) 1px,
      transparent 1px,
      transparent 10px
    );
  z-index: 1;
}

/* Innerer Rahmen */
.teaser-card-back::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(170, 125, 85, 0.1);
  border-radius: 4px;
  z-index: 2;
}

.teaser-card-symbol {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  color: var(--warm-copper);
  opacity: 0.25;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.testimonial-teaser:hover .teaser-card-symbol {
  opacity: 0.45;
}

/* Content-Bereich */
.teaser-content {
  flex: 1;
  background: rgba(170, 125, 85, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teaser-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  opacity: 0.85;
  position: relative;
  padding-left: 16px;
}

.teaser-quote::before {
  content: '„';
  position: absolute;
  left: -4px;
  top: -4px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  color: var(--warm-copper);
  opacity: 0.25;
  line-height: 1;
}

.teaser-attribution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teaser-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teaser-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(170, 125, 85, 0.2);
  flex-shrink: 0;
}

.teaser-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) sepia(0.3) brightness(0.85) contrast(1.05) hue-rotate(-5deg);
  transition: filter 0.3s ease;
}

.testimonial-teaser:hover .teaser-photo img {
  filter: grayscale(0.15) sepia(0.15) brightness(0.9) contrast(1.05);
}

.teaser-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.teaser-title {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.teaser-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--warm-copper);
  opacity: 0.5;
  transition: opacity 0.3s ease;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.testimonial-teaser:hover .teaser-cta {
  opacity: 0.85;
}

.teaser-cta-arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.testimonial-teaser:hover .teaser-cta-arrow {
  transform: translateX(3px);
}

/* Responsive: Karten-Bereich ausblenden unter 560px */
@media (max-width: 560px) {
  .teaser-card-area {
    display: none;
  }
  .teaser-content {
    padding: 20px 22px;
  }
  .teaser-quote {
    font-size: 15px;
  }
  .teaser-attribution {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
