/* ─────────────────────────────────────────────────────────────────────────────
   Stage + shared chrome

   Screens are authored at exactly 1920 × 1080 and then scaled to fit whatever
   panel they land on. Nothing reflows, so a 4K wall, a 1080p door display and
   a laptop preview are pixel-identical apart from scale — which is what makes
   the layout predictable enough to sign off from a PDF.
   ───────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--backdrop-deep);
  color: var(--paper);
  font-family: var(--font-text);
  /* Kiosk browsers should never show a text cursor or selection highlight. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  transform: translate(-50%, -50%) scale(var(--stage-scale, 1));
  transform-origin: center center;
  overflow: hidden;
}

/* ── Backdrops ──────────────────────────────────────────────────────────── */
/* Rendered from the deck by scripts/build-backdrops.py. Every slide sits on
   black and the photograph goes over it at partial opacity — 50% behind the
   overlay cards — which is why the black underneath is part of the design,
   not a fallback. The agenda board is plain black, without its photo. */

.backdrop {
  position: absolute;
  inset: 0;
  background-color: #000;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.backdrop--overlay {
  background-image: url('/assets/img/bg-overlay.jpg');
}

/* The ZEISS Innovation Summit mark, top-left on every full-screen card and on
   the door displays (not on the agenda and segment boards, whose headline sits
   there). Vector, extracted from the deck. */
.summit-logo {
  position: absolute;
  left: 76.75px;
  top: 40.98px;
  width: 239.13px;
  height: 79.53px;
  z-index: 30;
  display: block;
}

/* ── Headline ───────────────────────────────────────────────────────────── */

/* With `line-height: 1` the first baseline sits at 0.721em from the top, so a
   screen's headline block is positioned by `top = baseline − 0.721 × size`. */
.headline {
  position: absolute;
  left: var(--margin-left);
  top: 45px;
  margin: 0;
  z-index: 2;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: var(--type-headline);
  line-height: 1;
  color: var(--paper);
  white-space: nowrap;
}

.headline strong {
  font-weight: 700;
}

/* ── Utility ────────────────────────────────────────────────────────────── */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* A screen that has lost its data source says so quietly in the corner rather
   than going blank — the event team needs to be able to spot it from the room. */
.status-flag {
  position: absolute;
  right: var(--margin-right);
  bottom: 18px;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 2px;
  background: rgba(183, 7, 72, 0.9);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-flag[data-visible='true'] {
  display: flex;
}

.status-flag[data-tone='demo'] {
  background: rgba(253, 187, 8, 0.92);
  color: #1d1d1b;
}

/* ── Segment tile ───────────────────────────────────────────────────────── */
/* One square per row / card. One segment fills it; two or three split it into
   horizontal bands; four or more (i.e. a cross-segment session) show the full
   nine-colour spectrum mosaic with no icon, as in the source deck. */

.segment-tile {
  display: grid;
  width: var(--tile-size);
  height: var(--tile-size);
  flex: none;
  overflow: hidden;
}

/* `minmax(0, …)` matters: a plain `1fr` track has an automatic minimum, so an
   icon larger than its share would stretch the track and push the tile out of
   square. */
.segment-tile__part {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: var(--part-color, var(--backdrop));
}

/* The segment artwork is drawn to sit inside a circle, so roughly 40% of its
   square viewBox is padding. The box is therefore deliberately larger than the
   space it occupies — at these values the *ink* lands on the sizes measured
   from the deck (≈62px across in a 100px tile, ≈35px in a split half).
   It is positioned absolutely so it can never affect the grid tracks. */
.segment-tile__part svg {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  /* Sized from the part's height, which is the constrained axis on split tiles. */
  height: var(--icon-box, 108%);
  width: auto;
  aspect-ratio: 1;
  color: var(--paper);
}

.segment-tile[data-parts='2'],
.segment-tile[data-parts='3'] {
  --icon-box: 124%;
}

.segment-tile--mosaic {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

/* Breaks and unsegmented plenary sessions get a neutral ZEISS-blue tile. The
   break artwork is cropped to its ink rather than padded like the segment
   icons, so it needs its own size to carry the same optical weight. */
.segment-tile--neutral {
  --icon-box: 58%;
}

.segment-tile--neutral .segment-tile__part {
  background: var(--zeiss-blue);
}

.segment-tile--innovation .segment-tile__part {
  background: var(--innovation-grey);
}

.segment-tile--innovation .segment-tile__part svg {
  color: var(--ink);
}
