/* ==========================================================================
   F39 Decks: core
   The parts of a deck that are the same in every Deck Style Guide: the 1920x1080
   stage, showing one slide at a time, click-by-click reveals, and the presenter's
   tools (speaker notes, phone remote card, hint). Everything a slide LOOKS like
   lives in a style: web/decks/css/styles/<id>.css (see /decks/styles/).
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; -webkit-font-smoothing: antialiased; }
body { background: #000; }

.stage {
  position: absolute; top: 50%; left: 50%;
  width: 1920px; height: 1080px;
  transform-origin: center center;
  overflow: hidden;
}

/* One slide at a time */
.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .45s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .45s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .45s cubic-bezier(.2, .7, .2, 1); }
.slide .notes { display: none; }
.ghost { visibility: hidden; }   /* holds a line's space so text stays put across a click */

/* Reveals (.step) */
.step { opacity: 0; transform: translateY(18px); transition: opacity .5s cubic-bezier(.2, .7, .2, 1), transform .5s cubic-bezier(.2, .7, .2, 1); }
.step.is-shown { opacity: 1; transform: none; }

/* Picture slides: the picture and effect layers sit behind the content */
.slide.has-bg { overflow: hidden; }
.slide.has-bg > :not(.bg):not(.notes):not(.fx) { position: relative; z-index: 2; }
.fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* Motion off: M while presenting, or the viewer's reduce-motion setting (js/deck-style.js).
   Reveals still fade; nothing loops. */
.no-motion .slide .bg, .no-motion .slide .fx, .no-motion .slide .fx::before, .no-motion .slide .fx::after,
.no-motion .slide.has-bg::after, .no-motion .fx.ambient, .no-motion .fx.ambient::before, .no-motion .fx.ambient::after,
.no-motion .duo-panel::before { animation: none !important; }
.no-motion .slide .figure-ghost { animation: none !important; opacity: var(--fig-opacity, .24); }

/* ---- Presenter tools (same in every style) ------------------------------ */
.notes-panel {
  --np-accent: #8DB6E2;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  max-height: 38vh; overflow: auto;
  padding: 20px 28px 28px;
  background: rgba(17, 17, 16, .96); border-top: 3px solid var(--np-accent);
  font: 400 17px/1.55 "Inter", "Helvetica Neue", Arial, system-ui, sans-serif; color: #E4DED3;
  display: none;
}
body.show-notes .notes-panel { display: block; }
.notes-panel strong { color: #fff; }
.notes-panel a { color: var(--np-accent); }
.notes-panel .np-head { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--np-accent); font-weight: 700; margin-bottom: 8px; }
.notes-panel p + p { margin-top: 8px; }
.notes-panel ul { padding-left: 1.2em; }
.notes-panel li + li { margin-top: 4px; }
.notes-panel em { color: #F0D9A8; font-style: normal; }
/* Directions vs. words you say: .cue is dim italic so it never gets read aloud. */
.notes-panel .cue { color: #B8B1A4; font-style: italic; }
.notes-panel .ask { display: inline-block; margin-bottom: 10px; padding: 6px 14px; border-radius: 999px; background: #F0D9A8; color: #161514; font-weight: 700; }
.notes-panel .ask b { margin-right: 6px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: .8em; }
.notes-panel .np-next { float: right; position: sticky; top: 0; width: 320px; margin: 0 0 12px 24px; }
.notes-panel .np-next-label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #B8B1A4; font-weight: 700; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-panel .np-next-frame { aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; border: 1px solid rgba(247, 243, 236, .16); background: #000; }
.notes-panel .np-next-frame iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.notes-panel .np-next.is-end .np-next-frame { display: none; }
.notes-panel .np-next.is-waiting { visibility: hidden; }

.hint {
  position: fixed; right: 18px; top: 16px; z-index: 11;
  font: 600 12px/1 "Inter", "Helvetica Neue", Arial, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: #E4DED3; background: rgba(17, 17, 16, .9);
  border: 1px solid rgba(247, 243, 236, .16); border-radius: 999px; padding: 10px 14px;
  transition: opacity .8s;
}
.hint.is-gone { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .8s, visibility 0s .8s; }

/* Exit link (top left): shows when the mouse moves, on keyboard focus, and always on touch screens */
.deck-exit {
  position: fixed; left: 16px; top: 14px; z-index: 11;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  font: 600 13px/1 "Inter", "Helvetica Neue", Arial, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: #F7F3EC; background: rgba(17, 17, 16, .88); text-decoration: none;
  border: 1px solid rgba(247, 243, 236, .2); border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
body.show-ui .deck-exit, .deck-exit:focus-visible { opacity: 1; pointer-events: auto; }
.deck-exit:hover { background: #161514; border-color: rgba(247, 243, 236, .5); }
.deck-exit:focus-visible { outline: 3px solid #BA9554; outline-offset: 2px; }
@media (hover: none) and (pointer: coarse) { .deck-exit { opacity: .8; pointer-events: auto; } }
body.is-preview .deck-exit { display: none !important; }

/* Phone remote pairing card (R) */
.remote-card {
  position: fixed; right: 18px; bottom: 18px; z-index: 12;
  display: none; align-items: center; gap: 18px;
  padding: 16px; border-radius: 8px;
  background: rgba(17, 17, 16, .97); border: 1px solid rgba(247, 243, 236, .16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  font-family: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif; color: #F7F3EC;
}
.remote-card.is-open { display: flex; }
.rc-qr { width: 148px; height: 148px; flex: none; background: #fff; border-radius: 4px; overflow: hidden; }
.rc-qr:empty { display: none; }
.rc-qr svg { display: block; width: 100%; height: 100%; }
.rc-kicker { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #8DB6E2; }
.rc-code { font-size: 44px; font-weight: 900; letter-spacing: .12em; line-height: 1.1; margin-top: 6px; }
.rc-url { font-size: 13px; color: #B8B1A4; }
.rc-status { margin-top: 10px; font-size: 13px; font-weight: 600; color: #E4DED3; display: flex; align-items: center; gap: 8px; }
.rc-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B8B1A4; }
.rc-status.is-on::before { background: #4ADE80; box-shadow: 0 0 10px #4ADE80; }
.rc-stop {
  margin-top: 12px; min-height: 32px; font: 700 11px/1 inherit; letter-spacing: .14em; text-transform: uppercase;
  color: #E4DED3; background: none; border: 1px solid rgba(247, 243, 236, .3); border-radius: 999px; padding: 8px 12px; cursor: pointer;
}
.rc-stop:hover { color: #fff; border-color: #fff; }
.rc-stop:focus-visible, .notes-panel a:focus-visible { outline: 3px solid #BA9554; outline-offset: 2px; }

/* The preview copy (next-slide box, specimens): no presenter tools */
body.is-preview .hint, body.is-preview .notes-panel, body.is-preview .remote-card,
body.is-preview .progress, body.is-preview [data-counter] { display: none !important; }

/* Phones & tablets: lighter effects so pinch-zoom doesn't run the tab out of memory.
   Touch screens get the still pictures and text; the projector keeps the motion. */
@media (hover: none) and (pointer: coarse) {
  .slide.has-bg::after, .fx.ash, .fx.ash.ambient, .fx.sweep, .fx.flicker { display: none; }
  .bg.blur::after, .text-panel { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .slide.is-active .bg { animation: none !important; }
}
