/* An event's stage screen, for a television or projector in a room, sized to
   the screen rather than the text. The firm's approved primary color is the
   ground and its contrasting color the text; panels, lines and quieter text
   are mixed from the two, so any approved color stays legible. A tall or
   small screen scrolls instead. */

:root {
  color-scheme: dark;
  --bg: var(--brand-primary, #0F1417);
  --text: var(--brand-on-primary, #F2F3F4);
  --panel: #182025;
  --line: #2C363D;
  --muted: #A9B1B9;
  --panel: color-mix(in srgb, var(--text) 8%, var(--bg));
  --line: color-mix(in srgb, var(--text) 22%, var(--bg));
  --muted: color-mix(in srgb, var(--text) 72%, var(--bg));
  --focus: #8AB4F8;
  --font: system-ui, "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.stage { background: var(--bg); color: var(--text); font: 1rem/1.5 var(--font); overflow: hidden; }
.stage-view { display: grid; grid-template-rows: auto 1fr; height: 100vh; padding: 5vh 4vw 6vh; gap: 4vh; }
.stage-view[hidden] { display: none; }

.stage-head .firm { margin: 0; color: var(--muted); font-size: 2.4vh; }
.stage-head h1 { margin: 1vh 0 0; font-size: 6.4vh; line-height: 1.25; padding-inline-start: 1.6vw; border-inline-start: 0.8vh solid var(--muted); }

.stage-body { display: grid; grid-template-columns: minmax(0, 1fr) 36vw; gap: 3vw; min-height: 0; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(20vw, 1fr));
  gap: 2.4vh 1.6vw; align-content: center; }
.people li, .widget { background: var(--panel); border: 1px solid var(--line); border-radius: 1.6vh; }
.people li { padding: 3vh 1.8vw; display: grid; gap: 1vh; align-content: start; }
.people li[data-role="host"] { border-color: var(--text); border-width: 0.3vh; }
.people small { color: var(--muted); font-size: 1.9vh; }
.people strong { font-size: 3.4vh; line-height: 1.3; }
.people span { color: var(--muted); font-size: 2.2vh; line-height: 1.4; }

.widgets { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "date time" "place place" "timer timer"; gap: 2vh; align-content: center; }
.date { grid-area: date; }
.time { grid-area: time; }
.place { grid-area: place; min-height: 0; }
.widget { padding: 2.4vh 1.4vw; display: grid; gap: 0.8vh; align-content: start; min-height: 19vh; }
.widget .label { color: var(--muted); font-size: 1.9vh; }
.date .face { display: grid; }
.date .face[hidden] { display: none; }
.date .face strong { font-size: 7.4vh; line-height: 1; }
.date .face span { font-size: 2.8vh; }
.date .face small { color: var(--muted); font-size: 2vh; }
.place strong { font-size: 2.8vh; line-height: 1.35; }
.time div { font-size: 2vh; }
.time strong { font-size: 3.6vh; }
.time small { color: var(--muted); }
.timer { grid-area: timer; }
.timer p { margin: 0; font-size: 2.8vh; }
.timer strong { font-size: 6.4vh; font-variant-numeric: tabular-nums; }
.timer[data-phase="finished"] strong, .timer[data-phase="finished"] p { color: var(--muted); }
.timer progress { width: 100%; height: 1.2vh; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); }
.timer progress::-webkit-progress-bar { background: var(--line); }
.timer progress::-webkit-progress-value { background: var(--text); }
.timer progress::-moz-progress-bar { background: var(--text); }
.timer progress[hidden] { display: none; }

.stage-fullscreen { position: fixed; inset-block-end: 2vh; inset-inline-end: 2vw; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.5em 1.2em; font: inherit; opacity: 0.35; cursor: pointer; }
.stage-fullscreen:hover, .stage-fullscreen:focus-visible { opacity: 1; }
.stage-fullscreen:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:fullscreen .stage-fullscreen { display: none; }

@media (max-aspect-ratio: 1/1), (max-width: 900px) {
  body.stage { overflow: auto; }
  .stage-view { height: auto; min-height: 100vh; padding: 24px 16px 72px; gap: 24px; }
  .stage-head .firm { font-size: 0.95rem; }
  .stage-head h1 { font-size: 1.8rem; border-inline-start-width: 6px; padding-inline-start: 12px; }
  .stage-body { grid-template-columns: 1fr; gap: 16px; }
  .people { grid-template-columns: 1fr; gap: 12px; }
  .people li { padding: 16px; }
  .people small { font-size: 0.8rem; }
  .people strong { font-size: 1.25rem; }
  .people span { font-size: 0.95rem; }
  .people li[data-role="host"] { border-width: 2px; }
  .widgets { gap: 12px; }
  .widget { padding: 14px; min-height: 0; border-radius: 12px; }
  .widget .label { font-size: 0.8rem; }
  .date .face strong { font-size: 2.6rem; }
  .date .face span, .place strong, .time strong { font-size: 1.1rem; }
  .date .face small, .time div { font-size: 0.9rem; }
  .timer p { font-size: 1rem; }
  .timer strong { font-size: 2.2rem; }
  .timer progress { height: 8px; }
  .stage-fullscreen { display: none; }
}
