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

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Hide the mouse cursor during playback — this is clicker/keyboard driven,
   not a video app. The splash screen and jump menu override this since
   those need an actual click.
   touch-action: none + tap-highlight transparent stop mobile/tablet
   browsers from treating left/right taps as double-tap-zoom or a
   scroll gesture, and from flashing a blue highlight on tap. */
#stage {
  position: fixed;
  inset: 0;
  background: #000;
  cursor: none;
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* Center the video and scale to fit the viewport without cropping.
   Using max-width/max-height (not width/height 100%) avoids browsers
   clipping ultra-wide townhall exports at the top and bottom. */
.video-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #000;
  opacity: 0;
  z-index: 1;
  /* No opacity transition — fades caused a visible dip during seamless loop swaps. */
}

.video-layer.active {
  opacity: 1;
  z-index: 2;
}

/* On-screen overlay (slide number / title / progress bar) — client asked
   2026-08-23 for this not to be shown during playback. Hidden outright via
   display:none rather than ripping out the HTML/JS, so it's a one-line
   revert (delete the display:none rule below) if they want it back later,
   e.g. once real titles replace the "TBD" placeholders. app.js still runs
   updateOverlay()/showOverlay() as before; the element just never renders. */

#overlay {
  display: none;
  position: fixed;
  left: 24px;
  bottom: 20px;
  right: 24px;
  color: #fff;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

#overlay.visible {
  opacity: 1;
}

#slide-info {
  font-size: 13px;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

#slide-title {
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
}

#progress-track {
  margin-top: 10px;
  width: 240px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 300ms ease;
}

/* Tap-zone guides — same fade timing as #overlay, same white/drop-shadow
   look, but centered vertically at each edge instead of bottom-left. */
#nav-hints {
  position: fixed;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

#nav-hints.visible {
  opacity: 1;
}

.nav-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 44px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

#nav-hint-left {
  left: 20px;
}

#nav-hint-right {
  right: 20px;
}

/* Jump-to-slide menu (Phase 2 nice-to-have) */

#menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 8, 20, 0.92);
  color: #fff;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
}

#menu.visible {
  display: flex;
}

#menu-heading {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 16px;
}

#menu-list {
  list-style: none;
  max-height: 60vh;
  overflow-y: auto;
  width: min(560px, 80vw);
}

#menu-list li {
  padding: 10px 16px;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
}

#menu-list li:hover,
#menu-list li.selected {
  background: rgba(255, 255, 255, 0.12);
}

#menu-hint {
  margin-top: 16px;
  font-size: 12px;
  opacity: 0.5;
}

/* Click-to-begin splash (required for autoplay/fullscreen gesture) —
   also the one place a first-time viewer gets told how the controls work,
   since there's no other on-screen documentation once playback starts. */

#splash {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  padding: 24px;
}

#splash.hidden {
  display: none;
}

#splash-inner {
  max-width: 480px;
}

/* Logo sits on a small white card since the brand mark is dark-on-transparent
   and would disappear against the black splash background. */
#splash-logo {
  display: block;
  margin: 0 auto 32px;
  width: 180px;
  height: auto;
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
}

.splash-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: left;
}

.splash-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  opacity: 0.85;
}

/* Second instructions row spaces itself from the first automatically via
   this adjacent-sibling rule, so adding further rows later needs no extra
   margin bookkeeping. */
.splash-row + .splash-row {
  margin-top: 14px;
}

/* Amber caution row (buffering black-screen / audio-overlap note) — stands
   out from the neutral white instructions above it without being alarming. */
.splash-row--caution {
  color: #ffb84d;
}

.splash-row--caution .splash-icon {
  opacity: 1;
}

#splash-instructions p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.9;
}

#splash-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 22px;
  opacity: 0.55;
}

.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  min-width: 62px;
}

.shortcut svg {
  width: 20px;
  height: 20px;
}

#splash-cta {
  margin-top: 28px;
  font-size: 22px;
  letter-spacing: 0.02em;
  font-weight: 600;
}
