/* Shared lit, animated LED screen overlay on the 1200×1600 poster photo.
   Screen face trapezoid: TL (476,237) TR (800,237) BR (772,1167) BL (470,1167).
   Bounding box: left 39.1667%, top 14.8125%, width 27.5%, height 58.125%. */

.screen-glow,
.screen-face {
  position: absolute;
  left: var(--face-left, 39.1667%);
  top: var(--face-top, 14.8125%);
  width: var(--face-w, 27.5%);
  height: var(--face-h, 58.125%);
  clip-path: var(--face-clip, polygon(1.8182% 0%, 100% 0%, 91.5152% 100%, 0% 100%));
  pointer-events: none;
}


/* Perspective-warped overlay: JS sets matrix3d from the 4 screen-face corners.
   Home/rental LedPoster still uses the bounding box + clip-path fallback. */
.screen-layer {
  position: absolute;
  left: var(--face-left, 39.1667%);
  top: var(--face-top, 14.8125%);
  width: var(--face-w, 27.5%);
  height: var(--face-h, 58.125%);
  transform-origin: 0 0;
  z-index: 1;
  pointer-events: none;
}
.screen-layer .screen-glow,
.screen-layer .screen-face {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  clip-path: none;
}
.screen-layer .screen-glow {
  transform: none;
  left: -3%;
  top: -3%;
  width: 106%;
  height: 106%;
  filter: blur(10px);
}

.screen-glow {
  background: color-mix(in srgb, var(--acc, #00f0ff) 65%, #4ad0ff);
  filter: blur(10px);
  opacity: 0.85;
  transform: scale(1.04);
  z-index: 0;
  animation: glow-pulse 3.2s ease-in-out infinite;
}

.screen-face {
  --acc: #00f0ff;
  container-type: size;
  overflow: hidden;
  z-index: 1;
  pointer-events: auto;
  color: #fff;
  background:
    radial-gradient(ellipse at 50% 16%, color-mix(in srgb, var(--acc) 45%, #8ae7ff) 0%, transparent 48%),
    radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--acc) 28%, #2de0d0) 0%, transparent 55%),
    linear-gradient(165deg, #1a4bb8 0%, #3a1a8a 42%, #1a0d70 68%, #0a5a78 100%);
}

/* Static pixel mesh */
.screen-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 3px);
  opacity: 0.45;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 2;
}

/* Inner rim light */
.screen-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  box-shadow:
    inset 0 0 3px rgba(255,255,255,0.85),
    inset 0 0 14px color-mix(in srgb, var(--acc) 70%, #7cf0ff),
    inset 0 0 28px rgba(0, 40, 120, 0.35);
}

.screen-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.fx-wash {
  position: absolute;
  inset: -45%;
  background:
    radial-gradient(ellipse at 28% 22%, rgba(255,255,255,0.38) 0%, transparent 42%),
    radial-gradient(ellipse at 78% 70%, color-mix(in srgb, var(--acc) 55%, transparent) 0%, transparent 48%),
    radial-gradient(ellipse at 40% 90%, rgba(80, 255, 220, 0.28) 0%, transparent 50%);
  animation: fx-drift 8s ease-in-out infinite alternate;
  will-change: transform;
}

.fx-beam {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 36%;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.32) 48%, transparent 100%);
  animation: fx-beam 5.2s ease-in-out infinite;
  will-change: transform, opacity;
}

.fx-wave {
  position: absolute;
  left: -25%;
  width: 150%;
  height: 34%;
  top: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.2) 0%, transparent 70%);
  animation: fx-wave 6.5s ease-in-out infinite;
  will-change: transform;
}

.fx-spark {
  position: absolute;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  filter: blur(0.6px);
  box-shadow: 0 0 8px #fff, 0 0 16px color-mix(in srgb, var(--acc) 80%, #fff);
  opacity: 0;
  animation: fx-spark 4.4s linear infinite;
  will-change: transform, opacity;
}
.fx-spark-a { left: 18%; top: 22%; animation-delay: 0s; }
.fx-spark-b { left: 68%; top: 38%; animation-delay: -1.2s; width: 5%; }
.fx-spark-c { left: 42%; top: 62%; animation-delay: -2.4s; width: 6%; }
.fx-spark-d { left: 76%; top: 78%; animation-delay: -3.1s; width: 4%; }

@keyframes glow-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
@keyframes fx-drift {
  from { transform: translate3d(-8%, -7%, 0) scale(1); }
  to { transform: translate3d(10%, 9%, 0) scale(1.08); }
}
@keyframes fx-beam {
  0% { transform: translate3d(0, -40%, 0); opacity: 0; }
  12% { opacity: 0.75; }
  55% { transform: translate3d(0, 160%, 0); opacity: 0.35; }
  100% { transform: translate3d(0, 260%, 0); opacity: 0; }
}
@keyframes fx-wave {
  0% { transform: translate3d(0, -10%, 0); }
  50% { transform: translate3d(8%, 200%, 0); }
  100% { transform: translate3d(-6%, -10%, 0); }
}
@keyframes fx-spark {
  0%, 12% { opacity: 0; transform: translate3d(0, 8%, 0) scale(0.4); }
  20% { opacity: 0.9; transform: translate3d(0, 0, 0) scale(1); }
  35% { opacity: 0; transform: translate3d(-20%, -40%, 0) scale(0.3); }
  100% { opacity: 0; }
}

.screen-face:has(.live-sticker) .screen-inner {
  padding-bottom: 20%;
}

.screen-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  padding: 8% 8%;
  gap: 5%;
  overflow: hidden;
  z-index: 4;
}

.screen-face .live-logo-wrap,
.screen-face .live-logo,
.screen-face .live-name,
.screen-face .live-slides { position: relative; z-index: 1; }

.live-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: 78%;
  max-height: 16%;
  padding: 0.32em 0.7em;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255,255,255,0.45);
  box-sizing: border-box;
  margin: 0 0 2%;
  z-index: 5;
}

.screen-face .live-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 4.6em;
  object-fit: contain;
  margin: 0;
  filter: none;
}

.screen-face .live-name {
  max-width: 100%;
  box-sizing: border-box;
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 700;
  font-size: 18px;
  font-size: clamp(11px, 18cqw, 40px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin: 0;
  width: 100%;
  color: #fff;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-shadow:
    0 0 8px #fff,
    0 0 16px var(--acc),
    0 0 32px color-mix(in srgb, var(--acc) 80%, #4ad0ff),
    0 1px 3px rgba(0,0,0,0.55);
}
.screen-face .live-name.is-long {
  font-family: Manrope, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Subtle shine sweep across the name */
.screen-face .live-name::after {
  content: "";
  position: absolute;
  inset: -10% -30%;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.7) 50%, transparent 65%);
  transform: translate3d(-80%, 0, 0);
  animation: name-shine 4.8s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

@keyframes name-shine {
  0%, 35% { transform: translate3d(-80%, 0, 0); }
  55% { transform: translate3d(80%, 0, 0); }
  100% { transform: translate3d(80%, 0, 0); }
}

.screen-face .live-slides {
  font-family: Manrope, sans-serif;
  font-weight: 600;
  font-size: 13px;
  font-size: clamp(11px, 16.5cqw, 28px);
  line-height: 1.28;
  width: 100%;
  padding: 0;
  color: #fff;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  text-shadow:
    0 0 6px #fff,
    0 0 14px color-mix(in srgb, var(--acc) 80%, #4ad0ff),
    0 1px 3px rgba(0,0,0,0.55);
  min-height: 2.8em;
}

.screen-face .live-slides p {
  margin: 0;
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translate3d(0, 18%, 0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.screen-face .live-slides p.is-on {
  position: relative;
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.screen-face .live-slides p.is-out {
  position: absolute;
  opacity: 0;
  transform: translate3d(0, -14%, 0);
}

.screen-face.is-fitting .live-name::after {
  content: none;
  display: none;
  animation: none;
  transform: none;
}


.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0 0 2%;
  padding: 0.22em 0.62em 0.22em 0.45em;
  border-radius: 999px;
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: clamp(8px, 11cqw, 16px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #081018;
  background: #fff;
  box-shadow: 0 0 14px rgba(255,255,255,0.45);
  z-index: 5;
  animation: badge-in 0.6s ease both;
}
.live-badge svg {
  width: 1.15em;
  height: 1.15em;
  display: block;
  flex: 0 0 auto;
}
.live-sticker {
  position: absolute;
  right: 5%;
  bottom: 6%;
  z-index: 6;
  font-family: Manrope, sans-serif;
  font-weight: 800;
  font-size: clamp(9px, 13cqw, 20px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  background: color-mix(in srgb, var(--acc, #00f0ff) 85%, #fff);
  padding: 0.38em 0.62em;
  border-radius: 0.7em 0.7em 0.7em 0.15em;
  box-shadow: 0 0 16px color-mix(in srgb, var(--acc, #00f0ff) 55%, transparent), 0 4px 12px rgba(0,0,0,0.25);
  transform-origin: 80% 80%;
  animation: sticker-pop 3.8s ease-in-out infinite;
}
@keyframes badge-in {
  from { opacity: 0; transform: translate3d(0, -20%, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes sticker-pop {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  40% { transform: rotate(-3deg) scale(1.06); }
  70% { transform: rotate(-8deg) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  .screen-glow,
  .fx-wash,
  .fx-beam,
  .fx-wave,
  .fx-spark,
  .screen-face .live-name::after,
  .live-badge,
  .live-sticker {
    animation: none !important;
  }
  .fx-wash, .fx-beam, .fx-wave, .fx-spark { display: none; }
  .screen-face .live-slides p {
    transition: none;
    animation: none;
    position: static;
    transform: none;
    opacity: 1;
  }
  .screen-face .live-slides p:not(.is-on) { display: none; opacity: 0; }
}

.led-poster-still .screen-glow,
.led-poster-still .screen-face {
  display: none;
}

/* Real example content (posters / videos) inside the lit panel. */
.screen-face.is-media {
  background: #000;
  --acc: #f0f4ff;
}
.screen-face.is-media::before {
  opacity: 0.2;
  mix-blend-mode: soft-light;
}
.screen-face.is-media .screen-fx {
  display: none;
}

.screen-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}
.screen-visual .led-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  opacity: 0;
}
.screen-visual .led-slide.is-on { opacity: 1; z-index: 2; }
.screen-visual .led-slide.is-out { opacity: 1; z-index: 1; }
.screen-visual img,
.screen-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-position: center center;
  display: block;
  max-width: none;
  background: #000;
}

/* ---------- Shared LED look: home/rental posters and the demo pages ----------
   Everything below stays inside .screen-face (overflow: hidden). */

/* A designed poster on a dark LED panel (demo pages) */
.screen-face.is-poster {
  background: #000;
}
.screen-face.is-poster::before {
  opacity: 0.2;
  mix-blend-mode: soft-light;
}
.screen-face.is-poster .screen-fx { display: none; }

.led-art {
  position: absolute;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 42% at 50% 2%, color-mix(in srgb, var(--acc) 62%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 95% 38% at 50% 100%, color-mix(in srgb, var(--acc) 40%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 15% 55%, color-mix(in srgb, var(--acc) 18%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, #08080f 0%, #0c0c18 48%, #050509 100%);
  animation: led-kb-art 16s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes led-kb-art {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-2%, 3%, 0); }
}

/* Slow zoom/pan on still posters (Ken Burns) */
.led-slide.is-still img {
  transform-origin: 50% 45%;
  animation: led-kb-a var(--kb-ms, 6000ms) ease-in-out both;
  will-change: transform;
}
.led-slide.is-still[data-kb="1"] img { animation-name: led-kb-b; }
.led-slide.is-still[data-kb="2"] img { animation-name: led-kb-c; }
@keyframes led-kb-a {
  from { transform: scale(1) translate3d(0, 1.5%, 0); }
  to { transform: scale(1.09) translate3d(0, -2%, 0); }
}
@keyframes led-kb-b {
  from { transform: scale(1.09) translate3d(1.5%, -1.5%, 0); }
  to { transform: scale(1.01) translate3d(-1%, 1%, 0); }
}
@keyframes led-kb-c {
  from { transform: scale(1.02) translate3d(-1.5%, 2%, 0); }
  to { transform: scale(1.1) translate3d(1%, -1.5%, 0); }
}

/* Slide transition: new poster wipes in from the right, old one slides out left */
.led-slide.is-on.is-entering {
  animation: led-slide-in 0.9s cubic-bezier(.65, 0, .25, 1) both;
}
.led-slide.is-out {
  animation: led-slide-out 0.9s cubic-bezier(.65, 0, .25, 1) both;
}
@keyframes led-slide-in {
  from { clip-path: inset(0 0 0 100%); transform: translate3d(10%, 0, 0); }
  to { clip-path: inset(0 0 0 0); transform: translate3d(0, 0, 0); }
}
@keyframes led-slide-out {
  from { transform: translate3d(0, 0, 0); filter: brightness(1); }
  to { transform: translate3d(-18%, 0, 0); filter: brightness(0.35); }
}

/* Bright bar that sweeps across with every change of slide/message */
.led-flash {
  position: absolute;
  top: -5%;
  bottom: -5%;
  left: 0;
  width: 55%;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-120%, 0, 0) skewX(-14deg);
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--acc) 50%, transparent) 30%,
    rgba(255, 255, 255, 0.8) 50%,
    color-mix(in srgb, var(--acc) 50%, transparent) 70%,
    transparent 100%);
  mix-blend-mode: screen;
}
.led-flash.is-go,
.screen-face.is-wiping .led-flash {
  animation: led-flash 0.85s cubic-bezier(.5, 0, .3, 1) both;
}
@keyframes led-flash {
  0% { opacity: 0; transform: translate3d(-120%, 0, 0) skewX(-14deg); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(260%, 0, 0) skewX(-14deg); }
}

/* Soft glare that travels over the panel every few seconds */
.led-sheen {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
}
.led-sheen::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 70%;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 28%,
    rgba(255, 255, 255, 0.26) 47%,
    rgba(255, 255, 255, 0.1) 55%,
    transparent 76%);
  mix-blend-mode: screen;
  transform: translate3d(-140%, 0, 0) skewX(-12deg);
  animation: led-sheen 6.5s ease-in-out infinite;
}
@keyframes led-sheen {
  0%, 50% { transform: translate3d(-140%, 0, 0) skewX(-12deg); }
  82%, 100% { transform: translate3d(240%, 0, 0) skewX(-12deg); }
}

/* Panel breathes a little, like a live LED */
.screen-face.is-media .screen-visual {
  animation: led-breathe 4s ease-in-out infinite;
}
.screen-face.is-poster .led-art {
  animation: led-kb-art 16s ease-in-out infinite alternate, led-breathe 4s ease-in-out infinite;
}
@keyframes led-breathe {
  0%, 100% { filter: brightness(0.96) saturate(1); }
  50% { filter: brightness(1.08) saturate(1.08); }
}
.led-poster-frame .screen-glow {
  animation: led-glow-breathe 4s ease-in-out infinite;
}
@keyframes led-glow-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}

/* Logo floats gently on the demo poster */
.led-float {
  animation: led-float 5s ease-in-out infinite;
}
@keyframes led-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); box-shadow: 0 0 12px rgba(255,255,255,0.35); }
  50% { transform: translate3d(0, -4%, 0) scale(1.035); box-shadow: 0 0 22px rgba(255,255,255,0.6), 0 0 30px color-mix(in srgb, var(--acc) 60%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .led-art,
  .led-slide,
  .led-slide img,
  .led-flash,
  .led-sheen::before,
  .led-float,
  .screen-face.is-media .screen-visual,
  .led-poster-frame .screen-glow {
    animation: none !important;
  }
  .led-flash, .led-sheen { display: none; }
  .led-slide.is-out { display: none; }
}
