/* ============================================================================
   Webdesign-Page Hero — Welle 5.27 v1 (2026-05-21)
   ----------------------------------------------------------------------------
   Pattern: CSS-3D MacBook mit Live-Site-Screenshot im Display.
   - Mobile-First Critical CSS bleibt im Inline-Style (head)
   - Diese Datei: Stage-Layout, 3D MacBook Geometry, BG-Mesh, Chips, Tilt
   - JS Tilt via webdesign-hero-tilt.js (mouse-driven, scroll-driven; reduced-motion safe)
   ============================================================================ */

/* ─── BG-Mesh + Lai-Thai (Brand-Konsistenz zu Startseite-Hero) ──────────── */
.wd-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.wd-hero-bg-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 55% 45% at 25% 30%, rgba(20, 152, 213, 0.18), transparent 65%),
    radial-gradient(ellipse 45% 55% at 80% 70%, rgba(255, 122, 77, 0.12), transparent 65%);
  filter: blur(40px);
  opacity: 0.85;
}
body.is-dark-bg .wd-hero-bg-mesh {
  background:
    radial-gradient(ellipse 55% 45% at 25% 30%, rgba(62, 182, 240, 0.20), transparent 65%),
    radial-gradient(ellipse 45% 55% at 80% 70%, rgba(255, 148, 102, 0.16), transparent 65%);
}
.wd-hero-bg-lai {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(20, 152, 213, 0.06) 1px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.6;
}

/* ─── Hero-Text (Left Column) ────────────────────────────────────────────── */
.wd-hero-back {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(10, 27, 51, 0.55);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.wd-hero-back:hover { color: #1498D5; }
body.is-dark-bg .wd-hero-back { color: rgba(240, 244, 250, 0.55); }
body.is-dark-bg .wd-hero-back:hover { color: #3EB6F0; }

.wd-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.5rem;
}
.wd-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.wd-hero-cta--primary {
  background: linear-gradient(135deg, #1498D5 0%, #0F7BB2 100%);
  color: #fff;
  box-shadow: 0 8px 22px -6px rgba(20, 152, 213, 0.4), 0 4px 10px -4px rgba(20, 152, 213, 0.3);
}
.wd-hero-cta--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -6px rgba(20, 152, 213, 0.48), 0 6px 14px -4px rgba(20, 152, 213, 0.38);
}
.wd-hero-cta--line {
  background: #06C755;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(6, 199, 85, 0.42);
}
.wd-hero-cta--line:hover {
  transform: translateY(-2px);
  background: #05B14A;
}
body.is-dark-bg .wd-hero-cta--primary {
  background: linear-gradient(135deg, #3EB6F0 0%, #1498D5 100%);
}

.wd-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin: 1.5rem 0 0;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(10, 27, 51, 0.55);
  list-style: none;
}
.wd-hero-trust li {
  position: relative;
  padding-left: 1.1rem;
}
.wd-hero-trust li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #1498D5;
  font-weight: 700;
}
body.is-dark-bg .wd-hero-trust { color: rgba(240, 244, 250, 0.55); }
body.is-dark-bg .wd-hero-trust li::before { color: #3EB6F0; }

/* ═══════════════════════════════════════════════════════════════════════════
   3D MACBOOK STAGE — Right Column
   --------------------------------------------------------------------------
   Mobile (Base): Static perspective tilt, kein JS-Tilt (Performance + UX).
   Desktop: JS-Tilt via data-tilt (mouse + scroll), Idle-Hover-Animation.
   ═══════════════════════════════════════════════════════════════════════════ */
.wd-hero-stage {
  position: relative;
  width: 100%;
  margin-top: 2rem;
  perspective: 2400px;
  perspective-origin: 50% 40%;
}

/* MacBook Container — TILT TARGET (JS sets --tilt-x, --tilt-y) */
.wd-macbook {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16 / 11;
  transform-style: preserve-3d;
  transform: rotateX(calc(8deg + var(--tilt-x, 0deg))) rotateY(var(--tilt-y, -4deg)) rotateZ(0deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --tilt-x: 0deg;
  --tilt-y: -4deg;
}

/* Soft ground-shadow underneath */
.wd-macbook-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6%;
  height: 14%;
  background: radial-gradient(ellipse at center, rgba(10, 27, 51, 0.35), transparent 70%);
  filter: blur(28px);
  z-index: -1;
  transition: opacity 0.6s;
}
body.is-dark-bg .wd-macbook-shadow {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.65), transparent 70%);
}

/* The MacBook frame holds Screen + Base */
.wd-macbook-frame {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Screen-Hälfte (oben) */
.wd-macbook-screen {
  position: absolute;
  inset: 0 0 18% 0;
  background: linear-gradient(180deg, #1a1d24 0%, #0a0d12 100%);
  border-radius: 14px 14px 8px 8px;
  /* Welle 5.27 v3: Padding gleichmäßig — kein asymmetrischer Rahmen mehr.
     Bezel oben hat eigene height:14px, daher padding ringsum identisch. */
  padding: 10px 10px 12px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 -1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 18px 40px -12px rgba(10, 27, 51, 0.55);
}

/* Bezel oben (mit Camera-Dot) */
.wd-macbook-bezel {
  position: relative;
  height: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.wd-macbook-camera {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4a5061 0%, #14171f 80%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

/* Display — hier die Live-Site */
.wd-macbook-display {
  position: relative;
  width: 100%;
  height: calc(100% - 14px);
  /* Welle 5.27 v5: BG dunkel (#0a0d12 = Screen-Bottom) statt weiß — fixt
     den "gestrichelten Rand" der entstand wenn beim Image-Cross-Fade die
     beiden imgs semi-transparent waren und der weiße BG durchschien.
     Plus border-radius:0 — keine 2px-Ecken mehr die das Cropping zeigen. */
  background: #0a0d12;
  border-radius: 0;
  overflow: hidden;
}
.wd-macbook-display picture,
.wd-macbook-display img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Welle 5.27 v5: Image-Cycle — alle 6 imgs absolute, top/left/0, 100x100%.
   inset:0 weggelassen weil width/height:100% genug ist (vermeidet
   subpixel-edge-Konflikt mit .wd-macbook-display picture/img rule).
   Cross-fade dauert 0.6s mit ease-out — schneller = weniger Zeit für
   semi-transparent Edges = sauberer. */
.wd-macbook-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-out;
  z-index: 1;
}
.wd-macbook-img.is-active {
  opacity: 1;
  z-index: 2;
}

/* Welle 5.27 v4: Screen-Glare deaktiviert — mix-blend-mode:overlay erzeugte unsaubere
   Kanten an den Rändern (David: "gestrichelter Rahmen um die Screenshots"). */
.wd-macbook-glare { display: none; }

/* Base-Hälfte (unten — Keyboard-Area abstrahiert) */
.wd-macbook-base {
  position: absolute;
  left: -3%;
  right: -3%;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, #c8ccd1 0%, #a8acb2 50%, #8a8e94 100%);
  border-radius: 4px 4px 16px 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 8px rgba(0, 0, 0, 0.18),
    0 8px 18px -6px rgba(10, 27, 51, 0.35);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 4px;
}
.wd-macbook-notch {
  width: 22%;
  height: 6px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 0 0 8px 8px;
}
body.is-dark-bg .wd-macbook-base {
  background: linear-gradient(180deg, #2a2e3a 0%, #1a1d24 50%, #0d1018 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 -2px 8px rgba(0, 0, 0, 0.4),
    0 8px 18px -6px rgba(0, 0, 0, 0.55);
}
body.is-dark-bg .wd-macbook-notch {
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Floating Chips around MacBook (Brand-Anchors) ──────────────────────── */
.wd-hero-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(20, 152, 213, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 22px -6px rgba(10, 27, 51, 0.15), 0 2px 6px -2px rgba(10, 27, 51, 0.08);
  z-index: 4;
  animation: wd-chip-float 6s ease-in-out infinite;
}
body.is-dark-bg .wd-hero-chip {
  background: rgba(26, 41, 64, 0.88);
  border-color: rgba(62, 182, 240, 0.22);
  color: #F0F4FA;
}
.wd-hero-chip--google {
  top: 6%;
  left: -2%;
  color: #1498D5;
  animation-delay: 0s;
}
.wd-hero-chip--line {
  top: 38%;
  right: -4%;
  color: #06C755;
  animation-delay: 1.5s;
}
.wd-hero-chip--rating {
  bottom: -2%;
  left: 14%;
  color: #FF7A4D;
  animation-delay: 3s;
}
@keyframes wd-chip-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Hide chips on very narrow screens (cleaner mobile) */
@media (max-width: 539px) {
  .wd-hero-chip--google,
  .wd-hero-chip--rating { display: none; }
  .wd-hero-chip--line { top: 6%; right: -2%; }
}

/* ─── Tablet (≥768px) — MacBook größer, Tilt aktiver ─────────────────────── */
@media (min-width: 768px) {
  .wd-hero-stage { margin-top: 0; }
  .wd-macbook {
    --tilt-y: -8deg;
    transform: rotateX(calc(10deg + var(--tilt-x, 0deg))) rotateY(var(--tilt-y, -8deg));
  }
  .wd-hero-chip { font-size: 0.78rem; padding: 0.55rem 1rem; }
}

/* ─── Desktop (≥1024px) — Final Stage, full tilt ─────────────────────────── */
@media (min-width: 1024px) {
  .wd-macbook {
    --tilt-y: -10deg;
    transform: rotateX(calc(12deg + var(--tilt-x, 0deg))) rotateY(var(--tilt-y, -10deg));
  }
  .wd-macbook-shadow { bottom: -8%; height: 16%; filter: blur(36px); }
}

/* ─── Reduced-Motion: keine Chips-Float, kein Idle-Tilt ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wd-hero-chip { animation: none; }
  .wd-macbook { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIFE-PACK Welle 5.27 v12 — Hero "explodieren ohne Reveal"
   Alles sofort sichtbar, aber CONTINUOUS-Effects lassen die Seite leben:
     - MacBook idle-float (JS)
     - BG-Mesh rotation + breath (JS)
     - Mouse-Parallax (JS Desktop)
     - Floating Particles (JS spawn + drift)
     - Pulse-Rings rund um MacBook (JS spawn alle 3.5s)
     - Display Shine-Sweep (CSS animation, continuous 5s)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Will-change boosts für die animated elements */
.wd-macbook { will-change: transform; }
.wd-hero-bg-mesh,
.wd-hero-bg-lai { will-change: transform; }

/* ─── Floating Particles — Welle 5.27 v18 ──────────────────────────────────
   Container ist jetzt in <main> (siehe webdesign-hero-anim.js) und spannt
   vom Hero-Top bis VS-Section-Bottom — Partikel fallen beim Scroll durch
   beide Sections. Height wird per JS dynamisch gesetzt. */
.wd-particles-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
/* Legacy-Klasse (wird nicht mehr von JS erstellt, aber falls cached) */
.wd-hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.wd-hero-particle {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
  opacity: 0.5;
  will-change: transform, opacity;
  /* Welle 5.27 v17: Composite-Transform aus 3 CSS-Vars:
     --drift-x  = horizontale sway (gsap yoyo)
     --sway-y   = vertikale mini-sway (gsap yoyo)
     --scroll-y = ScrollTrigger-driven fall (scrub)
     Alle 3 werden von JS via gsap.to(p, {'--var': ...}) gesetzt. */
  transform: translate(
    var(--drift-x, 0px),
    calc(var(--sway-y, 0px) + var(--scroll-y, 0px))
  );
}

/* ─── Pulse-Rings rund um MacBook ──────────────────────────────────────── */
.wd-hero-rings {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.wd-hero-pulse-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(20, 152, 213, 0.35);
  pointer-events: none;
  will-change: transform, opacity;
}
body.is-dark-bg .wd-hero-pulse-ring {
  border-color: rgba(62, 182, 240, 0.45);
}

/* ─── MacBook-Display Continuous Shine-Sweep ───────────────────────────── */
.wd-macbook-display::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 65%);
  transform: translateX(-100%);
  animation: wd-hero-shine 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes wd-hero-shine {
  0%, 70% { transform: translateX(-100%); }
  90%     { transform: translateX(100%); }
  100%    { transform: translateX(100%); }
}

/* ─── Headline subtle glow pulse (continuous, kaum sichtbar aber "lebt") ── */
.wd-hero-h1 em {
  animation: wd-hero-em-glow 4.5s ease-in-out infinite;
}
@keyframes wd-hero-em-glow {
  0%, 100% { text-shadow: 0 0 0 rgba(20, 152, 213, 0); }
  50%      { text-shadow: 0 0 24px rgba(20, 152, 213, 0.45); }
}
body.is-dark-bg .wd-hero-h1 em {
  animation: wd-hero-em-glow-dark 4.5s ease-in-out infinite;
}
@keyframes wd-hero-em-glow-dark {
  0%, 100% { text-shadow: 0 0 0 rgba(62, 182, 240, 0); }
  50%      { text-shadow: 0 0 30px rgba(62, 182, 240, 0.6); }
}

/* Reduced-Motion: alle continuous effects aus */
@media (prefers-reduced-motion: reduce) {
  .wd-hero-particles,
  .wd-hero-rings { display: none; }
  .wd-macbook-display::after,
  .wd-hero-h1 em { animation: none; }
}
