/* ===== LIVE WEBSITE PREVIEW (frindz) =====
   Shows the REAL client site running inside a scaled iframe, framed as a
   premium browser window with a pulsing LIVE badge and click-to-open overlay.
   Used on index.html (Pillar 01) and details.html (Referenzen). */

.live-preview {
  --lp-accent: #0D9488;
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0e13;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  isolation: isolate;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1),
              border-color .55s cubic-bezier(.16, 1, .3, 1),
              box-shadow .55s cubic-bezier(.16, 1, .3, 1);
}
.live-preview:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 44px 90px -34px rgba(0, 0, 0, 0.9), 0 0 70px -26px var(--lp-accent);
}
/* accent glow bleeding from the top */
.live-preview::before {
  content: "";
  position: absolute;
  inset: -45% -12% auto -12%;
  height: 72%;
  z-index: -1;
  background: radial-gradient(60% 100% at 50% 0%, rgba(13, 148, 136, 0.30), transparent 70%);
  opacity: .55;
  filter: blur(34px);
  pointer-events: none;
}

/* ---- browser chrome bar ---- */
.lp-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .62rem .9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.lp-dot { width: .6rem; height: .6rem; border-radius: 50%; background: rgba(255, 255, 255, 0.16); flex-shrink: 0; }
.lp-dot:nth-child(1) { background: rgba(255, 95, 87, 0.65); }
.lp-dot:nth-child(2) { background: rgba(254, 188, 46, 0.65); }
.lp-dot:nth-child(3) { background: rgba(40, 200, 64, 0.65); }
.lp-url {
  margin-left: .5rem;
  flex: 1;
  min-width: 0;
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-live {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lp-accent);
  padding: .22rem .55rem;
  border-radius: 9999px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.35);
}
.lp-live::before {
  content: "";
  width: .42em;
  height: .42em;
  border-radius: 50%;
  background: var(--lp-accent);
  animation: lp-pulse 1.8s infinite;
}
@keyframes lp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

/* ---- stage: scaled live iframe over a poster screenshot ---- */
.lp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0c11;
}
.lp-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
  transition: opacity .6s ease;
}
.lp-scaler {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  transform-origin: top left;
  transform: scale(var(--lp-s, .4));
  z-index: 2;
  opacity: 0;
  transition: opacity .6s ease;
}
.lp-scaler iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #0a0c11;
  pointer-events: none;
}
.live-preview.lp-ready .lp-scaler { opacity: 1; }
.live-preview.lp-ready .lp-poster { opacity: 0; }

/* subtle top sheen so the scaled site reads as "inside glass" */
.lp-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%);
}

/* ---- open-live overlay ---- */
.lp-open {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity .35s ease;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 8, 12, 0.4));
}
.live-preview:hover .lp-open,
.live-preview:focus-visible .lp-open { opacity: 1; }
.lp-open span {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 9999px;
  background: rgba(10, 12, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@media (prefers-reduced-motion: reduce) {
  .live-preview, .lp-poster, .lp-scaler, .lp-open { transition: none; }
  .lp-live::before { animation: none; }
}
