/* live.ecp360.ca, the studio test page: the studio picture, Anna in its monitor, the ON AIR light, the name strap and one call button */

:root {
  color-scheme: dark;
  --red: #ff3b2f;
  --ink: #f4f1ea;
  --night: #050608;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; background: var(--night); }

body { font-family: var(--sans); color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased; }

.room {
  height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 42%, #10151d 0%, var(--night) 72%);
}

/* the stage keeps the picture's 16:9 at any window size, every size inside follows its width */
.stage {
  position: relative;
  width: min(100vw, calc(100vh * 16 / 9));
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  overflow: hidden;
  background: #07090c;
}

.set {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.set.ready { opacity: 1; }

/* the monitor's black screen in the picture: x 1073 to 2766 and y 408 to 1326 of 3840 by 2160 */
.screen {
  position: absolute;
  left: 27.943%;
  top: 18.889%;
  width: 44.115%;
  height: 42.546%;
  background: #000;
  overflow: hidden;
}

.screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.9s ease, transform 1.6s ease;
}
.stage.anna-on .screen video { opacity: 1; transform: none; }

/* the glass of the monitor: a faint sheen and darker corners, so the picture sits in the screen */
.glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: inset 0 0 2.4cqw rgba(0, 0, 0, 0.55);
}

/* the ON AIR light, on the dark band above the monitor, lit while Anna speaks */
.on-air {
  position: absolute;
  left: 50%;
  top: 13.6%;
  transform: translateX(-50%);
  padding: 0.38cqw 0.95cqw;
  border-radius: 0.22cqw;
  background: linear-gradient(#170806, #0c0403);
  border: 0.1cqw solid #2b2b2b;
  box-shadow: 0 0.3cqw 0.9cqw rgba(0, 0, 0, 0.65);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.on-air span {
  display: block;
  font: 800 1.02cqw/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: rgba(130, 28, 20, 0.6);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.on-air.lit {
  background: linear-gradient(#3b0d08, #1f0604);
  box-shadow: 0 0 1.1cqw rgba(255, 59, 47, 0.55), 0 0 3.2cqw rgba(255, 59, 47, 0.22), 0 0.3cqw 0.9cqw rgba(0, 0, 0, 0.65);
}
.on-air.lit span {
  color: #ffe0dc;
  text-shadow: 0 0 0.3cqw #ff6a5c, 0 0 0.9cqw var(--red), 0 0 1.7cqw rgba(255, 59, 47, 0.8);
}

/* the name strap, over the front of the desk, in once Anna is on screen */
.strap {
  position: absolute;
  left: 6%;
  bottom: 14%;
  display: flex;
  align-items: stretch;
  opacity: 0;
  transform: translateX(-1.6cqw);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}
.stage.anna-on .strap { opacity: 1; transform: none; }
.strap .bar { width: 0.42cqw; background: var(--red); }
.strap .name {
  padding: 0.72cqw 1.7cqw 0.72cqw 1.1cqw;
  background: linear-gradient(90deg, rgba(8, 10, 14, 0.92), rgba(8, 10, 14, 0.7));
  backdrop-filter: blur(6px);
  font: 700 1.6cqw/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* one button that starts and ends the call */
.controls {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55cqw;
}

#call {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6cqw;
  padding: 0.8cqw 2cqw;
  border-radius: 999px;
  font: 600 1.02cqw/1 var(--sans);
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(12, 14, 18, 0.8);
  box-shadow: inset 0 0 0 0.09cqw rgba(255, 255, 255, 0.18), 0 0.6cqw 1.6cqw rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.1s ease;
}
#call::before {
  content: "";
  width: 0.58cqw;
  height: 0.58cqw;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0.6cqw var(--red);
}
#call:hover { background: rgba(28, 30, 36, 0.88); }
#call:active { transform: scale(0.98); }
#call:focus-visible { outline: 0.12cqw solid rgba(255, 255, 255, 0.7); outline-offset: 0.2cqw; }
.stage[data-state="live"] #call { background: rgba(150, 22, 14, 0.88); }
.stage[data-state="live"] #call::before { background: #fff; box-shadow: none; }
.stage[data-state="connecting"] #call::before { animation: pulse 1s ease-in-out infinite; }

.status {
  min-height: 1.2em;
  font-size: 0.85cqw;
  color: rgba(244, 241, 234, 0.78);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

@keyframes pulse { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}
