/* Theatre universe â€” hub video + spokes (from Montesilvano party-showcase) */

.theatre-universe {
  --tu-cyan: var(--cyan, #2ecbd6);
  --tu-display: var(--font, "Manrope", system-ui, sans-serif);
  --tu-line: rgba(255, 255, 255, 0.1);
  --tu-ease: cubic-bezier(0.22, 1, 0.36, 1);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(circle at 8% 12%, rgba(122, 77, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 94% 40%, rgba(46, 203, 214, 0.08), transparent 24rem),
    #0a0d14;
  border-top: 1px solid var(--tu-line);
  border-bottom: 1px solid var(--tu-line);
  overflow-x: clip;
  color: #fff;
}

.theatre-universe .container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.theatre-universe__head {
  display: grid;
  gap: 0.85rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
  max-width: 42rem;
}

.theatre-universe__head .eyebrow {
  margin: 0;
  color: var(--tu-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.theatre-universe__head .section-heading {
  margin: 0;
  color: #fff;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  line-height: 1.08;
  font-weight: 800;
}

.theatre-universe__head .section-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  max-width: 36rem;
}

.theatre-showcase {
  position: relative;
  display: block;
  min-height: clamp(640px, 52vw, 720px);
  isolation: isolate;
}

.theatre-showcase::before,
.theatre-showcase::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(122, 77, 255, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.theatre-showcase::before {
  width: min(72%, 930px);
  aspect-ratio: 1.55;
}

.theatre-showcase::after {
  width: min(57%, 740px);
  aspect-ratio: 1.28;
  border-color: rgba(42, 212, 232, 0.16);
}

.theatre-showcase__flow {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.theatre-showcase__flow-glow,
.theatre-showcase__flow-path {
  fill: none;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.theatre-showcase__flow-glow {
  stroke: #7ad4ff;
  stroke-width: 16;
  filter: blur(7px);
}

.theatre-showcase__flow-path {
  stroke: url("#theatre-flow-gradient");
  stroke-width: 3.25;
  stroke-dasharray: 7 8;
  marker-end: url("#theatre-flow-arrow");
  filter:
    drop-shadow(0 0 3px rgba(42, 212, 232, 0.85))
    drop-shadow(0 0 8px rgba(122, 77, 255, 0.35));
}

.theatre-showcase__flow-glow.is-visible,
.theatre-showcase__flow-path.is-visible {
  opacity: 1;
}

.theatre-showcase__flow-path.is-visible {
  animation: theatreFlowMove 0.72s linear infinite;
}

.theatre-showcase__rail {
  display: contents;
}

.theatre-showcase__item {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.12rem 0.7rem;
  align-content: center;
  width: clamp(180px, 15vw, 215px);
  min-height: 78px;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  color: #fff;
  font: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(135deg, rgba(42, 212, 232, 0.09), transparent 60%),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.35s ease;
}

.theatre-showcase__item > span {
  grid-row: 1 / 3;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  align-self: center;
  border: 1px solid rgba(42, 212, 232, 0.45);
  border-radius: 50%;
  color: var(--tu-cyan);
  background: rgba(42, 212, 232, 0.08);
  font-family: var(--tu-display);
  font-size: 0.92rem;
  font-weight: 800;
}

.theatre-showcase__item strong {
  align-self: end;
  font-size: clamp(0.88rem, 1.05vw, 1.02rem);
  line-height: 1.15;
}

.theatre-showcase__item small {
  align-self: start;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  line-height: 1.25;
}

.theatre-showcase__rail--left .theatre-showcase__item:nth-child(1) {
  top: 0%;
  left: 8%;
}
.theatre-showcase__rail--left .theatre-showcase__item:nth-child(2) {
  top: 19%;
  left: 1%;
}
.theatre-showcase__rail--left .theatre-showcase__item:nth-child(3) {
  top: 38%;
  left: 0;
}
.theatre-showcase__rail--left .theatre-showcase__item:nth-child(4) {
  top: 57%;
  left: 1%;
}
.theatre-showcase__rail--left .theatre-showcase__item:nth-child(5) {
  bottom: 0%;
  left: 8%;
}
.theatre-showcase__rail--right .theatre-showcase__item:nth-child(1) {
  top: 0%;
  right: 8%;
}
.theatre-showcase__rail--right .theatre-showcase__item:nth-child(2) {
  top: 19%;
  right: 1%;
}
.theatre-showcase__rail--right .theatre-showcase__item:nth-child(3) {
  top: 38%;
  right: 0;
}
.theatre-showcase__rail--right .theatre-showcase__item:nth-child(4) {
  top: 57%;
  right: 1%;
}
.theatre-showcase__rail--right .theatre-showcase__item:nth-child(5) {
  right: 8%;
  bottom: 0%;
}

.theatre-showcase__item.is-active {
  z-index: 5;
  border-color: #7ad4ff;
  background: linear-gradient(135deg, #1a3a8a 0%, #2a5fd4 50%, #2ad4e8 100%);
  box-shadow:
    0 0 0 5px rgba(42, 212, 232, 0.14),
    0 0 34px rgba(61, 107, 255, 0.3),
    0 18px 38px rgba(8, 11, 18, 0.35);
}

.theatre-showcase__item.is-active > span {
  color: #fff;
  background: linear-gradient(145deg, #3d6bff, #2ad4e8);
  border-color: transparent;
  animation: theatreServicePulse 0.72s ease-in-out infinite alternate;
}

.theatre-showcase__item.is-active small {
  color: rgba(255, 255, 255, 0.82);
}

.theatre-showcase__item:focus-visible {
  outline: 2px solid var(--tu-cyan);
  outline-offset: 3px;
}

.theatre-showcase__media {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: clamp(390px, 36vw, 500px);
  aspect-ratio: 1;
  overflow: visible;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
}

.theatre-showcase__media::before,
.theatre-showcase__media::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.theatre-showcase__media::before {
  z-index: 0;
  width: 162%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(61, 107, 255, 0) 0deg 7deg,
    rgba(61, 107, 255, 0.22) 7.4deg 8deg,
    rgba(42, 212, 232, 0.08) 8deg 9.2deg,
    rgba(61, 107, 255, 0) 9.2deg 15deg
  );
  opacity: 0.68;
  filter: blur(0.4px) drop-shadow(0 0 8px rgba(61, 107, 255, 0.24));
  mask: radial-gradient(circle, transparent 0 47%, #000 55%, rgba(0, 0, 0, 0.72) 67%, transparent 83%);
  -webkit-mask: radial-gradient(circle, transparent 0 47%, #000 55%, rgba(0, 0, 0, 0.72) 67%, transparent 83%);
  transform: translate(-50%, -50%);
  animation: theatrePortalRays 32s linear infinite;
}

.theatre-showcase__media::after {
  z-index: 0;
  width: 148%;
  border: 1px solid rgba(42, 212, 232, 0.22);
  background:
    radial-gradient(circle at 50% 3%, rgba(42, 212, 232, 0.42), transparent 7%),
    radial-gradient(circle at 97% 50%, rgba(61, 107, 255, 0.34), transparent 7%),
    radial-gradient(circle at 50% 97%, rgba(122, 77, 255, 0.32), transparent 7%),
    radial-gradient(circle at 3% 50%, rgba(61, 107, 255, 0.34), transparent 7%);
  box-shadow:
    0 0 0 18px rgba(61, 107, 255, 0.025),
    0 0 0 42px rgba(61, 107, 255, 0.018),
    inset 0 0 32px rgba(42, 212, 232, 0.08);
  opacity: 0.72;
  transform: translate(-50%, -50%);
  animation: theatrePortalWave 2.8s ease-in-out infinite alternate;
}

.theatre-showcase__portal-ring {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: block;
  width: 126%;
  max-width: none;
  height: 126%;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.92;
  filter:
    drop-shadow(0 0 12px rgba(42, 212, 232, 0.55))
    drop-shadow(0 0 28px rgba(61, 107, 255, 0.34));
  transform: translate(-50%, -50%);
  animation:
    theatrePortalSpin 24s linear infinite,
    theatrePortalGlow 2.8s ease-in-out infinite alternate;
}

.theatre-showcase__portal-intro {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(78%, 330px);
  padding: clamp(0.7rem, 1.5vw, 1rem) clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(235, 219, 255, 0.45);
  border-radius: 18px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, rgba(8, 11, 18, 0.82), rgba(26, 40, 90, 0.62));
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 34px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(42, 212, 232, 0.18);
  opacity: 0.92;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s var(--tu-ease);
}

.theatre-showcase__portal-intro strong {
  font-family: var(--tu-display);
  font-size: clamp(0.95rem, 1.7vw, 1.28rem);
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(42, 212, 232, 0.4);
}

.theatre-showcase__portal-intro strong span {
  display: block;
  margin-top: 0.2rem;
  color: var(--tu-cyan);
  font-size: 0.72em;
  letter-spacing: 0.04em;
}

.theatre-showcase__media.is-playing .theatre-showcase__portal-intro {
  opacity: 0.62;
  transform: translate(-50%, -50%) scale(0.97);
}

.theatre-showcase__media.is-switching .theatre-showcase__video {
  opacity: 0.35;
}

.theatre-showcase__video {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  transition: opacity 0.28s ease;
  box-shadow:
    0 0 0 2px rgba(61, 107, 255, 0.2),
    0 26px 60px rgba(0, 0, 0, 0.35),
    0 0 80px rgba(42, 212, 232, 0.12);
}

.theatre-showcase__play {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 11, 18, 0.66);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease;
}

.theatre-showcase__play > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding-left: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3d6bff, #2ad4e8);
  font-size: 1.05rem;
}

.theatre-showcase__play strong {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theatre-showcase__play:hover,
.theatre-showcase__play:focus-visible {
  background: rgba(8, 11, 18, 0.82);
  transform: translate(-50%, -50%) scale(1.04);
}

.theatre-showcase__media.is-playing .theatre-showcase__play {
  opacity: 0;
  pointer-events: none;
}

@keyframes theatreFlowMove {
  to { stroke-dashoffset: -19; }
}
@keyframes theatrePortalSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes theatrePortalGlow {
  from { opacity: 0.78; }
  to { opacity: 1; }
}
@keyframes theatrePortalRays {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes theatrePortalWave {
  from {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(0.92);
  }
  to {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(1.04);
  }
}
@keyframes theatreServicePulse {
  from { box-shadow: 0 8px 20px rgba(42, 212, 232, 0.24); }
  to {
    box-shadow:
      0 0 0 8px rgba(42, 212, 232, 0.12),
      0 12px 30px rgba(61, 107, 255, 0.36);
  }
}

@media (max-width: 900px) {
  .theatre-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "video video"
      "left right";
    gap: 1rem 0.65rem;
    min-height: 0;
    padding-top: 0.35rem;
  }

  .theatre-showcase::before,
  .theatre-showcase::after {
    display: none;
  }

  /* Spoke arrows only make sense in the desktop orbit layout */
  .theatre-showcase__flow {
    display: none;
  }

  .theatre-showcase__rail {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fit, minmax(0, auto));
    gap: 0.55rem;
    align-content: start;
  }

  .theatre-showcase__rail--left { grid-area: left; }
  .theatre-showcase__rail--right { grid-area: right; }

  .theatre-showcase__item {
    position: static;
    width: auto;
    min-height: 0;
    padding: 0.6rem 0.6rem;
    gap: 0.1rem 0.5rem;
    grid-template-columns: 1.9rem minmax(0, 1fr);
    border-radius: 12px;
  }

  .theatre-showcase__item > span {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.72rem;
  }

  .theatre-showcase__item strong {
    font-size: 0.8rem;
  }

  .theatre-showcase__item small {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .theatre-showcase__media {
    grid-area: video;
    position: relative;
    top: auto;
    left: auto;
    justify-self: center;
    width: min(72vw, 380px);
    margin: 0 auto 0.35rem;
    transform: none;
  }

  .theatre-showcase__media::before,
  .theatre-showcase__media::after {
    width: 138%;
  }

  .theatre-showcase__portal-ring {
    width: 118%;
    height: 118%;
  }
}

@media (max-width: 520px) {
  /* Keep 2 columns so all 9 products stay visible */
  .theatre-showcase {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "video video"
      "left right";
    gap: 0.85rem 0.5rem;
  }

  .theatre-showcase__rail {
    gap: 0.42rem;
  }

  .theatre-showcase__item {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    padding: 0.5rem 0.42rem;
    min-height: 0;
  }

  .theatre-showcase__item > span {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.68rem;
  }

  .theatre-showcase__item strong {
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .theatre-showcase__item small {
    font-size: 0.58rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .theatre-showcase__media {
    width: min(78vw, 300px);
    margin-bottom: 0.15rem;
  }

  .theatre-showcase__play {
    width: 72px;
    height: 72px;
  }

  .theatre-showcase__play > span {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .theatre-showcase__play strong {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theatre-showcase__portal-ring,
  .theatre-showcase__media::before,
  .theatre-showcase__media::after,
  .theatre-showcase__flow-path.is-visible,
  .theatre-showcase__item.is-active > span {
    animation: none !important;
  }
}
