/* ============================================================
   WOW-EFFEKTE — modular, jeder Block einzeln entfernbar
   ============================================================
   Spec: docs/superpowers/specs/2026-05-10-wow-effekte-design.md
   ============================================================ */

/* ── 1. TILT ────────────────────────────────────────────────── */
/* Hinweis: .leistung-card::before ist in styles.css bereits fuer den
   Gradient-Border belegt. Daher Shine via ::after. Existierender
   Hover-Lift (translateY(-4px) in styles.css) wird im tilt-active-State
   mit den Rotationen kombiniert, damit er nicht verloren geht. */

.leistungen-grid,
.referenzen-grid {
  perspective: 1200px;
}

.leistung-card,
.referenz-card {
  transform-style: preserve-3d;
}

.leistung-card.tilt-active,
.referenz-card.tilt-active {
  transform: translateY(-4px) rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg));
  transition: transform 0.15s cubic-bezier(0.2, 0.7, 0.3, 1);
  will-change: transform;
}

.leistung-card::after,
.referenz-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 65%
  );
  mix-blend-mode: overlay;
  transform: translateX(var(--shine, -120%));
  transition: transform 0.15s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
}
.leistung-card.tilt-active::after,
.referenz-card.tilt-active::after {
  opacity: 1;
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .leistung-card,
  .referenz-card {
    transform-style: flat;
  }
  .leistungen-grid,
  .referenzen-grid {
    perspective: none;
  }
  .leistung-card::after,
  .referenz-card::after {
    display: none;
  }
}

/* ── 2. REVEAL ──────────────────────────────────────────────── */
.reveal-headline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation-delay: calc(var(--word-index, 0) * 0.18s);
  will-change: transform, opacity;
}

/* Longhand-Properties statt Shorthand, damit animation-delay
   aus der Basis-Regel oben nicht ueberschrieben wird. */
.reveal-headline.in-view .word {
  animation-name: reveal-word;
  animation-duration: 0.9s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  animation-fill-mode: forwards;
}

@keyframes reveal-word {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-headline .word {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ── 4. KONAMI ──────────────────────────────────────────────── */
/* 4a. Pixel-Hero-Modus (5 s) ─────────────────────────────────── */
body.konami-pixel .hero {
  background: linear-gradient(135deg, #1a0033, #000022);
  transition: background 0.3s ease;
}
body.konami-pixel .hero-title,
body.konami-pixel .hero-title .hero-title-gradient,
body.konami-pixel .hero-title .word {
  font-family: 'Courier New', monospace !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00ff88 !important;
  -webkit-text-fill-color: #00ff88 !important;
  background: none !important;
  text-shadow: 1.5px 0 #ff0080, -1.5px 0 #00ffff;
}
body.konami-pixel .hero .btn-primary,
body.konami-pixel .hero .btn {
  border-radius: 0 !important;
  background: #ff0080 !important;
  color: #fff !important;
  font-family: 'Courier New', monospace !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 2px 2px 0 #00ff88 !important;
}
body.konami-pixel .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 255, 136, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 255, 136, 0.04) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
  z-index: 1;
}
.konami-pixel-badge {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #00ff88;
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 10px;
  border: 1px solid #00ff88;
  letter-spacing: 0.1em;
}

/* 4b. Backstage-Modus (8 s) ──────────────────────────────────── */
body.konami-backstage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background-image: repeating-linear-gradient(
    to right,
    rgba(0, 200, 255, 0.20) 0,
    rgba(0, 200, 255, 0.20) 1px,
    transparent 1px,
    transparent calc(100% / 12)
  );
}
body.konami-backstage::after {
  content: "12 COL · 8PX BASELINE · DESIGN SYSTEM";
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 9999;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  color: rgba(0, 200, 255, 0.95);
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border: 1px solid rgba(0, 200, 255, 0.5);
  letter-spacing: 0.1em;
}
body.konami-backstage h1,
body.konami-backstage h2,
body.konami-backstage .btn-primary {
  outline: 1px dashed rgba(255, 200, 80, 0.8);
  outline-offset: 2px;
  position: relative;
}
body.konami-backstage h1::before,
body.konami-backstage h2::before,
body.konami-backstage .btn-primary::before {
  position: absolute;
  top: -14px;
  left: 0;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #000;
  background: rgba(255, 200, 80, 0.9);
  padding: 1px 4px;
  letter-spacing: 0.05em;
  z-index: 9999;
}
body.konami-backstage h1::before { content: "h1 / display / 800"; }
body.konami-backstage h2::before { content: "h2 / heading / 700"; }
body.konami-backstage .btn-primary::before { content: "cta / 14px"; }
/* Console-Egg (3) hat keinen CSS-Block — reine JS-Wirkung */
