/* The curtains before the first round (curtain.js), in the house's colours: night blue velvet,
   gold at the edges where they meet. Sizes on the broadcast are in its 1920x1080 stage; the phone
   sets its own through the variables. */
.cur {
  --cur-size: 380px;
  --cur-cap: 42px;
  --cur-gold: #c9922f;
  position: absolute; inset: 0; z-index: 60; display: none; overflow: hidden; pointer-events: none;
  font-family: var(--font, inherit);
}
.cur.phone { position: fixed; z-index: 1000; --cur-size: min(50vw, 260px); --cur-cap: 17px; }

.cur-side {
  position: absolute; top: 0; bottom: 0; width: 51%;
  background:
    linear-gradient(180deg, rgba(255, 226, 160, .10), transparent 18%, transparent 82%, rgba(0, 0, 0, .35)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .34) 0, rgba(255, 255, 255, .05) 3.2%, rgba(0, 0, 0, .34) 6.4%),
    linear-gradient(180deg, #1d2d3a, #0b1116);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}
.cur-a { left: 0; transform: translateX(-104%); box-shadow: inset -10px 0 0 var(--cur-gold), inset -22px 0 30px rgba(0, 0, 0, .5); }
.cur-b { right: 0; transform: translateX(104%); box-shadow: inset 10px 0 0 var(--cur-gold), inset 22px 0 30px rgba(0, 0, 0, .5); }
.cur.phone .cur-a { box-shadow: inset -4px 0 0 var(--cur-gold), inset -12px 0 16px rgba(0, 0, 0, .5); }
.cur.phone .cur-b { box-shadow: inset 4px 0 0 var(--cur-gold), inset 12px 0 16px rgba(0, 0, 0, .5); }
.cur[data-state="shut"] .cur-side { transform: none; }
.cur[data-state="open"] .cur-side { transition: transform 1.4s cubic-bezier(.7, 0, .3, 1); }

.cur-mid {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--cur-size) * .06); opacity: 0; transition: opacity .4s, transform .6s;
}
.cur-mid::before {
  content: ""; position: absolute; width: calc(var(--cur-size) * 1.3); aspect-ratio: 1; border-radius: 50%;
  border: calc(var(--cur-size) * .012) solid rgba(201, 146, 47, .55);
  box-shadow: 0 0 calc(var(--cur-size) * .25) rgba(201, 146, 47, .22), inset 0 0 calc(var(--cur-size) * .2) rgba(201, 146, 47, .18);
  background: radial-gradient(circle, rgba(11, 17, 22, .85) 55%, rgba(11, 17, 22, .4));
}
.cur[data-state="shut"] .cur-mid { opacity: 1; transition-delay: .35s; }
.cur[data-state="open"] .cur-mid { opacity: 0; transform: scale(1.5); }
.cur-cap { position: relative; font-size: var(--cur-cap); font-weight: 900; color: rgba(219, 232, 240, .82); text-align: center; padding: 0 1em; }
.cur-n {
  position: relative; font-size: var(--cur-size); font-weight: 900; line-height: .9; min-height: .9em;
  color: #f2c25e; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 calc(var(--cur-size) * .12) rgba(201, 146, 47, .65), 0 calc(var(--cur-size) * .025) 0 #6e4b14;
}
.cur-n.pop { animation: cur-pop .85s cubic-bezier(.2, .9, .3, 1.25); }
.cur.last .cur-n { color: #ffe9c4; text-shadow: 0 0 calc(var(--cur-size) * .16) rgba(239, 125, 107, .85), 0 calc(var(--cur-size) * .025) 0 #7a2e22; }
.cur.last .cur-mid::before { border-color: rgba(239, 125, 107, .6); animation: cur-beat 1s ease-out infinite; }
@keyframes cur-pop {
  0% { transform: scale(1.6); opacity: 0; filter: blur(10px); }
  30% { opacity: 1; filter: none; }
  100% { transform: scale(1); }
}
@keyframes cur-beat {
  0% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* The light through the gap as the curtains part. */
.cur-flash {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; margin-left: -5px; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 228, 170, .95) 30%, #fff6dc 50%, rgba(255, 228, 170, .95) 70%, transparent);
}
.cur[data-state="open"] .cur-flash { animation: cur-flash 1.3s ease-out forwards; }
@keyframes cur-flash {
  0% { opacity: 1; transform: scaleX(1); }
  35% { opacity: .75; transform: scaleX(40); }
  100% { opacity: 0; transform: scaleX(200); }
}

@media (prefers-reduced-motion: reduce) {
  .cur-side, .cur[data-state="open"] .cur-side { transition-duration: .3s; }
  .cur-n.pop, .cur.last .cur-mid::before, .cur[data-state="open"] .cur-flash { animation: none; }
}
