/* =============================================================
   AMP PRESENTER — dockable "talking-box" guide
   Built TO ~/WEB-DESIGN-RULESET.md. Navy/gold/cream, IBM Plex.
   Bloomberg-style, muted-start, captioned, dismissible.
   Self-hosted assets only. prefers-reduced-motion safe.
   For KoreConX review — DRAFT video/captions (not live to customers).
   ============================================================= */

:root {
  --amp-pr-navy:      #06101F;
  --amp-pr-navy-lift: #0F2256;
  --amp-pr-gold:      #C9A84C;
  --amp-pr-gold-hot:  #FFD56B;
  --amp-pr-cream:     #F3EFE6;
  --amp-pr-border:    rgba(201,168,76,0.30);
  --amp-pr-border-soft: rgba(201,168,76,0.16);
  --amp-pr-scrim:     rgba(4,8,18,0.82);
  --amp-pr-sans:  'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --amp-pr-mono:  'IBM Plex Mono', ui-monospace, monospace;
  --amp-pr-shadow: 0 18px 48px -12px rgba(0,0,0,0.72), 0 2px 0 rgba(201,168,76,0.12) inset;
  --amp-pr-z: 2147483000;
}

/* The presenter is hidden until JS un-hides it on scroll-in.
   It is also fully removed when dismissed for the session. */
.amp-presenter {
  position: fixed;
  right: 24px;
  /* Bottom offset clears the sticky cohort / footer CTA bar so the
     presenter never docks on top of it. */
  bottom: 96px;
  z-index: var(--amp-pr-z);
  width: 340px;
  max-width: calc(100vw - 32px);
  font-family: var(--amp-pr-sans);
  color: var(--amp-pr-cream);
  /* hidden by default; .is-armed reveals */
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.amp-presenter.is-armed {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---- card shell ---- */
.amp-presenter__card {
  position: relative;
  background: linear-gradient(180deg, var(--amp-pr-navy-lift) 0%, var(--amp-pr-navy) 64%);
  border: 1px solid var(--amp-pr-border);
  border-radius: 14px;
  box-shadow: var(--amp-pr-shadow);
  overflow: hidden;
}

/* ---- header / Bloomberg-style label bar ---- */
.amp-presenter__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  background: rgba(6,16,31,0.65);
  border-bottom: 1px solid var(--amp-pr-border-soft);
  cursor: grab;
  user-select: none;
}
.amp-presenter__bar:active { cursor: grabbing; }
.amp-presenter__tag {
  font-family: var(--amp-pr-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amp-pr-gold);
}
.amp-presenter__bar-spacer { flex: 1 1 auto; }
.amp-presenter__btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--amp-pr-border-soft);
  color: var(--amp-pr-cream);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.amp-presenter__btn:hover { background: rgba(201,168,76,0.14); border-color: var(--amp-pr-border); color: var(--amp-pr-gold-hot); }
.amp-presenter__btn:focus-visible { outline: 2px solid var(--amp-pr-gold-hot); outline-offset: 2px; }
.amp-presenter__btn svg { width: 14px; height: 14px; display: block; }
.amp-presenter__btn.is-on { color: var(--amp-pr-gold-hot); border-color: var(--amp-pr-border); }

/* ---- video / poster stage ---- */
.amp-presenter__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--amp-pr-navy);
  overflow: hidden;
}
.amp-presenter__video,
.amp-presenter__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.amp-presenter__poster {
  background: radial-gradient(120% 120% at 70% 12%, rgba(201,168,76,0.20) 0%, rgba(6,16,31,0) 52%), var(--amp-pr-navy);
  z-index: 1;
}
.amp-presenter.is-playing .amp-presenter__poster { opacity: 0; pointer-events: none; }
.amp-presenter__poster { transition: opacity .4s ease; }

/* preview state (no rendered video yet) */
.amp-presenter__preview-note {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  font-family: var(--amp-pr-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--amp-pr-cream);
  background: var(--amp-pr-scrim);
  padding: 6px 10px;
  text-align: center;
}

/* big play button overlay */
.amp-presenter__play {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--amp-pr-cream);
}
.amp-presenter.is-playing .amp-presenter__play { display: none; }
.amp-presenter__play-disc {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--amp-pr-scrim);
  border: 1.5px solid var(--amp-pr-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px -6px rgba(0,0,0,0.7);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.amp-presenter__play:hover .amp-presenter__play-disc { transform: scale(1.06); border-color: var(--amp-pr-gold-hot); }
.amp-presenter__play:focus-visible { outline: none; }
.amp-presenter__play:focus-visible .amp-presenter__play-disc { outline: 2px solid var(--amp-pr-gold-hot); outline-offset: 3px; }
.amp-presenter__play-disc svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--amp-pr-gold-hot); }

/* duration chip on the stage */
.amp-presenter__dur {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 4;
  font-family: var(--amp-pr-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--amp-pr-cream);
  background: var(--amp-pr-scrim);
  border-radius: 4px;
  padding: 2px 6px;
}

/* captions overlay (default ON) */
.amp-presenter__cc {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  z-index: 5;
  font-size: 12.5px;
  line-height: 1.38;
  font-weight: 500;
  text-align: center;
  color: var(--amp-pr-cream);
  background: var(--amp-pr-scrim);
  border-radius: 6px;
  padding: 6px 9px;
  min-height: 1em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
}
.amp-presenter__cc:empty { display: none; }
.amp-presenter.cc-off .amp-presenter__cc { display: none; }

/* ---- footer: title + standing disclaimer ---- */
.amp-presenter__foot {
  padding: 9px 12px 11px;
  border-top: 1px solid var(--amp-pr-border-soft);
  background: rgba(6,16,31,0.55);
}
.amp-presenter__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--amp-pr-cream);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.amp-presenter__disc {
  font-size: 10px;
  line-height: 1.4;
  color: rgba(243,239,230,0.62);
  margin: 0;
}

/* ---- collapsed launcher / thumbnail ----
   DEFAULT STATE on every viewport: the small launcher pill shows and the
   full card is hidden until the user taps to expand. This guarantees the
   presenter never auto-opens on top of the centered allocator panel or any
   interactive/primary content. The card reveals only on .is-expanded. */
.amp-presenter__launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--amp-pr-navy-lift) 0%, var(--amp-pr-navy) 100%);
  border: 1px solid var(--amp-pr-border);
  border-radius: 999px;
  box-shadow: var(--amp-pr-shadow);
  padding: 8px 14px 8px 8px;
  cursor: pointer;
  color: var(--amp-pr-cream);
  font-family: var(--amp-pr-sans);
}
.amp-presenter__launcher-disc {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--amp-pr-scrim);
  border: 1.5px solid var(--amp-pr-gold);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.amp-presenter__launcher-disc svg { width: 13px; height: 13px; fill: var(--amp-pr-gold-hot); margin-left: 2px; }
.amp-presenter__launcher-label { display: flex; flex-direction: column; line-height: 1.2; }
.amp-presenter__launcher-label b { font-size: 12px; font-weight: 600; }
.amp-presenter__launcher-label span { font-size: 10px; color: rgba(243,239,230,0.6); font-family: var(--amp-pr-mono); letter-spacing: 0.04em; }
.amp-presenter__launcher:focus-visible { outline: 2px solid var(--amp-pr-gold-hot); outline-offset: 2px; }

/* card is hidden by default (launcher-first); only .is-expanded reveals it */
.amp-presenter .amp-presenter__card { display: none; }
.amp-presenter.is-expanded .amp-presenter__card { display: block; }

/* collapsed is the resting state (explicit class kept for JS/back-compat) */
.amp-presenter.is-collapsed .amp-presenter__card { display: none; }
.amp-presenter.is-collapsed .amp-presenter__launcher { display: inline-flex; }
.amp-presenter.is-expanded .amp-presenter__launcher { display: none; }

/* ---- mobile: tighter offsets; launcher-first is already the global default
   so the full card never auto-opens over content on any viewport. ---- */
@media (max-width: 640px) {
  .amp-presenter {
    right: 14px;
    bottom: 84px;
    width: auto;
  }
  .amp-presenter.is-expanded {
    left: 14px;
    right: 14px;
    width: auto;
  }
}

/* ---- reduced motion: no transitions, static reveal ---- */
@media (prefers-reduced-motion: reduce) {
  .amp-presenter,
  .amp-presenter__poster,
  .amp-presenter__play-disc,
  .amp-presenter__btn {
    transition: none !important;
  }
  .amp-presenter {
    transform: none !important;
  }
}
