/*
 * The demo deck (slides.html) on reveal.js 5.2.1. brand.css supplies the tokens, stickers and
 * chat threads; this file adds two layers:
 *
 *   1. reveal-core: the handful of structural rules reveal.js needs (slide stacking, fade
 *      transitions, fragments, progress, slide number, controls, speaker-notes hiding, and the
 *      ?print-pdf page layout). reveal.css is not loaded: stylesheets may only come from Google
 *      Fonts, so the parts this deck uses are written out here.
 *   2. deck: the GUMDROP look at 1280×720, and the per-slide layouts picked with a
 *      "class: title|big|split|chat|join|end" line at the top of a slide in copy/slides.md,
 *      plus the QR sticker a "qr:" line adds (see assets/slides.js).
 */

/* ======================================================================================
 * 1. reveal-core
 * ====================================================================================== */

html.reveal-full-page {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.reveal-viewport {
  height: 100%;
  overflow: hidden;
  position: relative;
  line-height: 1;
  margin: 0;
  background: var(--paper);
}

.reveal {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pinch-zoom;
}

.reveal .slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: auto;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
  text-align: left;
}

.reveal .slides > section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: auto;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 320ms ease,
    visibility 320ms ease;
}
.reveal .slides > section.present {
  opacity: 1;
  visibility: visible;
  z-index: 11;
}

.reveal .slides section .fragment {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 260ms ease,
    transform 360ms cubic-bezier(0.2, 0.9, 0.25, 1.25),
    visibility 260ms ease;
}
.reveal .slides section .fragment.visible {
  opacity: 1;
  visibility: inherit;
}

/* No slide backgrounds in this deck. reveal.js copies each section's classes onto its
   background element, so they are switched off outright rather than styled. */
.reveal .backgrounds {
  display: none !important;
}

.reveal aside.notes,
.reveal .speaker-notes {
  display: none;
}

.reveal .aria-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.reveal .pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--band);
  visibility: hidden;
  opacity: 0;
  transition: opacity 400ms ease;
}
.reveal.paused .pause-overlay {
  visibility: visible;
  opacity: 1;
}

.reveal .jump-to-slide {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 30;
  font-size: 28px;
}
.reveal .jump-to-slide-input {
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--edge);
  border-radius: 12px;
  padding: 6px 10px;
  font: inherit;
}

/* progress: a mocha bar with an ink keyline */
.reveal .progress {
  position: absolute;
  display: block;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 8px;
  z-index: 20;
  background: color-mix(in oklab, var(--ink) 10%, transparent);
  border-top: 2px solid var(--edge);
}
.reveal .progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 0;
  transform: scaleX(0);
  transition: transform 600ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/* slide number: a sticker chip */
.reveal .slide-number {
  position: absolute;
  display: block;
  right: 18px;
  bottom: 22px;
  z-index: 31;
  padding: 6px 12px;
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--edge);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1;
}
.reveal .slide-number a {
  color: inherit;
  text-decoration: none;
}
.reveal .slide-number-delimiter {
  margin: 0 3px;
  opacity: 0.55;
}

/* controls: two round sticker buttons, bottom left */
.reveal .controls {
  position: absolute;
  display: block;
  left: 18px;
  bottom: 22px;
  z-index: 30;
  pointer-events: none;
}
.reveal .controls button {
  --lift: 3px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  padding: 0;
  border: 2.5px solid var(--edge);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--edge);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.35;
  transition:
    opacity 150ms,
    transform 90ms ease-out,
    box-shadow 90ms ease-out;
}
.reveal .controls button.enabled {
  opacity: 1;
}
.reveal .controls button.enabled:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--edge);
}
.reveal .controls .navigate-up,
.reveal .controls .navigate-down {
  display: none;
}
.reveal .controls .controls-arrow {
  display: none;
}
.reveal .controls .navigate-left::before,
.reveal .controls .navigate-right::before {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
}
.reveal .controls .navigate-left::before {
  content: "←";
}
.reveal .controls .navigate-right::before {
  content: "→";
}
.reveal .controls .navigate-right.highlight {
  background: var(--gold);
  color: var(--on-gold);
}

/* ?print-pdf: reveal.js builds one .pdf-page per slide and prints them in order */
html.reveal-print {
  width: 100%;
  height: 100%;
  overflow: visible;
}
html.reveal-print body {
  margin: 0 auto !important;
  border: 0;
  padding: 0;
  float: none !important;
  overflow: visible;
  background: var(--paper);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
html.reveal-print .reveal .controls,
html.reveal-print .reveal .progress,
html.reveal-print .reveal .backgrounds,
html.reveal-print .reveal .aria-status,
html.reveal-print .reveal .pause-overlay {
  display: none !important;
}
html.reveal-print .reveal {
  width: auto !important;
  height: auto !important;
  overflow: hidden !important;
}
html.reveal-print .reveal .slides {
  position: static;
  width: 100% !important;
  height: auto !important;
  zoom: 1 !important;
  pointer-events: initial;
  left: auto;
  top: auto;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
  display: block;
  transform: none !important;
}
html.reveal-print .reveal .slides .pdf-page {
  position: relative;
  overflow: hidden;
  z-index: 1;
  page-break-after: always;
  break-after: page;
  background: var(--paper);
}
html.reveal-print .reveal .slides .pdf-page:last-of-type {
  page-break-after: avoid;
  break-after: avoid;
}
html.reveal-print .reveal .slides section {
  visibility: visible !important;
  display: grid !important;
  position: absolute !important;
  height: 720px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  min-height: 1px;
  opacity: 1 !important;
  transform: none !important;
}
html.reveal-print .reveal .slides section .fragment {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}
html.reveal-print .reveal .slide-number-pdf {
  display: block;
  position: absolute;
  right: 18px;
  bottom: 18px;
  visibility: visible;
}
html.reveal-print .reveal .speaker-notes-pdf {
  display: block;
  position: relative;
  padding: 24px;
  font-size: 18px;
  color: var(--ink);
  page-break-after: always;
}

/* ======================================================================================
 * 2. deck
 * ====================================================================================== */

.reveal {
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
}
.reveal ::selection {
  background: var(--gold);
  color: var(--on-gold);
}

/* reveal.js shows a slide by setting display inline; the deck asks it for "grid".
   Descendant, not child, selector: under ?print-pdf each slide moves into a .pdf-page. */
.reveal .slides section {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: min-content;
  align-content: center;
  justify-items: start;
  row-gap: 26px;
  padding: 64px 88px 84px;
  line-height: 1.35;
}

.reveal h1,
.reveal h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.95;
  text-wrap: balance;
}
.reveal h1 {
  font-size: 92px;
}
.reveal h2 {
  font-size: 46px;
  color: var(--ink-2);
}
.reveal p {
  margin: 0;
  max-width: 34em;
}
.reveal strong {
  font-weight: 700;
}
.reveal code {
  font-size: 0.82em;
}
.reveal ul,
.reveal ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* bullets are stickers that pop in one by one */
.reveal .slides li:not(.msg) {
  position: relative;
  padding: 14px 20px 14px 50px;
  margin: 0 0 14px;
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--edge);
  background: var(--surface);
  font-size: 26px;
  line-height: 1.3;
}
.reveal .slides li:not(.msg)::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 22px;
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--edge);
  border-radius: 50%;
  background: var(--tone, var(--gold));
}
.reveal .slides li:not(.msg):nth-child(5n + 1) {
  --tone: var(--candy-latte);
}
.reveal .slides li:not(.msg):nth-child(5n + 2) {
  --tone: var(--candy-butter);
}
.reveal .slides li:not(.msg):nth-child(5n + 3) {
  --tone: var(--candy-mint);
}
.reveal .slides li:not(.msg):nth-child(5n + 4) {
  --tone: var(--candy-peri);
}
.reveal .slides li:not(.msg):nth-child(5n + 5) {
  --tone: var(--candy-apricot);
}
.reveal .slides li.fragment,
.reveal .slides .stat.fragment {
  transform: translateY(12px) rotate(-1deg);
}
.reveal .slides li.fragment.visible,
.reveal .slides .stat.fragment.visible {
  transform: none;
}
.reveal .slides li strong:first-child {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 1.08em;
  margin-right: 4px;
}

/* the slide badge: a sticker in the top right corner */
.reveal .slide-badge {
  position: absolute;
  top: 22px;
  right: 40px;
  z-index: 5;
  font-size: 22px;
}
.reveal .slide-badge.badge--loud {
  font-size: 26px;
  padding: 10px 20px;
}
.reveal .slide-badge.badge--loud::before {
  width: 26px;
  height: 26px;
  font-size: 18px;
}

/* ---- class: title / end ---- */
.reveal section.title,
.reveal section.end {
  grid-template-columns: minmax(0, 1fr) 360px;
  column-gap: 56px;
  align-content: center;
  justify-content: stretch;
}
.reveal section.title > *,
.reveal section.end > * {
  grid-column: 1;
}
.reveal section.title .deck-mascot,
.reveal section.end .deck-mascot {
  grid-column: 2;
  grid-row: 1 / span 6;
  align-self: center;
  justify-self: center;
  width: 330px;
  height: auto;
}
.reveal section.title h1 {
  font-size: 196px;
  line-height: 0.86;
  color: var(--surface);
  -webkit-text-stroke: 5px var(--edge);
  paint-order: stroke fill;
  text-shadow:
    3px 4px 0 var(--edge),
    6px 8px 0 var(--mocha),
    9px 12px 0 var(--gold);
  transform: rotate(-3deg) skewX(-6deg);
  transform-origin: left center;
  margin-bottom: 12px;
}
.reveal section.title h2 {
  font-size: 50px;
  color: var(--ink);
}
.reveal section.title p {
  font-size: 30px;
  color: var(--ink-2);
}
.reveal section.title p:last-of-type {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 24px;
  color: var(--accent-ink);
}
.reveal section.end h1 {
  font-size: 82px;
}
.reveal section.end p {
  font-size: 30px;
  color: var(--ink-2);
}
.reveal section.end p strong {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 24px;
  border: 2.5px solid var(--edge);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--edge);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 34px;
}
.reveal section.end p:last-of-type {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 26px;
  color: var(--accent-ink);
}

/* ---- class: big ---- */
.reveal section.big {
  justify-items: start;
}
.reveal section.big h1 {
  font-size: 142px;
  line-height: 0.88;
  max-width: 11em;
}
.reveal section.big p {
  font-size: 42px;
  color: var(--ink-2);
  padding: 10px 22px;
  border: 2.5px dashed var(--gold);
  border-radius: 18px;
  background: var(--gold-soft);
}

/* a shout that is only "## heading": as loud as "# heading" */
.reveal section.big h2 {
  font-size: 112px;
  line-height: 0.9;
  max-width: 11em;
  color: var(--ink);
}

/* ---- class: split / chat: heading left, content right ---- */
.reveal section.split,
.reveal section.chat {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: 56px;
  align-items: center;
  justify-items: stretch;
}
.reveal section.chat {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}
.reveal .col-a,
.reveal .col-b {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.reveal section.split h1,
.reveal section.chat h1 {
  font-size: 84px;
}
.reveal .col-a p {
  font-size: 30px;
  color: var(--ink-2);
}
.reveal .col-b > p {
  font-size: 26px;
  color: var(--ink-2);
}

/* "**Would have flagged 7 / 180** — …" paragraphs become stat stickers */
.reveal .stat {
  padding: 16px 22px;
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--edge);
  background: var(--surface);
  font-size: 24px;
  color: var(--ink-2);
}
.reveal .stat strong:first-child {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 48px;
  line-height: 1;
  color: var(--ink);
}

/* ---- class: join: the QR sticker left (about 45%), heading and instructions right ---- */
.reveal section.join {
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  column-gap: 52px;
  align-items: center;
  justify-items: stretch;
  padding-top: 40px;
  padding-bottom: 76px;
}
.reveal section.join > .col-qr {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  min-width: 0;
}
/* compact on purpose: a join slide carries every step at once (no fragments) */
.reveal section.join > .col-b {
  grid-column: 2;
  grid-row: 1;
  gap: 14px;
}
.reveal section.join h1 {
  font-size: 64px;
}
.reveal section.join h2 {
  font-size: 36px;
}
.reveal section.join .col-b > p {
  font-size: 24px;
  line-height: 1.3;
}
.reveal section.join li:not(.msg) {
  font-size: 21px;
  line-height: 1.28;
  padding: 9px 16px 9px 44px;
  margin-bottom: 9px;
}
.reveal section.join li:not(.msg):last-child {
  margin-bottom: 0;
}
.reveal section.join li:not(.msg)::before {
  left: 15px;
  top: 14px;
  width: 14px;
  height: 14px;
}

/* the QR sticker: ink modules on white in both themes, a keyline, a hard shadow, a tilt */
.reveal .qr-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  padding: 18px 18px 16px;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 8px 8px 0 var(--edge);
  transform: rotate(-2deg);
}
.reveal .qr-code {
  width: 400px;
  height: 400px;
}
.reveal .qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}
.reveal .qr-code--ph {
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}
.reveal .qr-code--ph .ph {
  font-size: 22px;
  text-align: center;
}
.reveal .qr-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 400px;
  text-align: center;
}
.reveal .qr-caption-text {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 36px;
  line-height: 1;
  color: #211d2e;
  text-wrap: balance;
}
.reveal .qr-caption .qr-url {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: #5a5468;
  background: none;
  border: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

/* chat threads at deck scale */
.reveal .thread {
  padding: 30px 22px 22px;
}
.reveal .thread > .badge {
  top: -20px;
  font-size: 20px;
}
.reveal .thread > .badge--loud {
  font-size: 24px;
}
.reveal .thread-list {
  gap: 12px;
}
.reveal .bubble {
  font-size: 21px;
  line-height: 1.33;
  padding: 9px 15px 10px;
  border-radius: 20px;
}
.reveal .bubble .who {
  font-size: 16px;
}
.reveal .pill {
  font-size: 17px;
  padding: 5px 14px;
}
.reveal .kb-btn {
  font-size: 18px;
  padding: 8px 14px;
}
.reveal .avatar {
  width: 44px;
  height: 44px;
}
.reveal .thread .msg.fragment {
  transform: translateY(14px) scale(0.96);
}
.reveal .thread .msg.fragment.visible {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal .slides > section,
  .reveal .slides section .fragment,
  .reveal .progress span {
    transition: none !important;
  }
  .reveal .slides li.fragment,
  .reveal .slides .stat.fragment,
  .reveal .thread .msg.fragment {
    transform: none !important;
  }
}

/* A screenshot on a slide is a sticker like everything else. */
.reveal section img {
  max-width: 100%;
  max-height: 560px;
  border: 2.5px solid var(--edge);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--edge);
  background: #fff;
}

/* Nested bullets stay inside their parent sticker as plain lines (indent them by two
   spaces under the item in slides.md). */
.reveal .slides li:not(.msg) ul {
  margin: 8px 0 0;
  padding: 0;
}
.reveal .slides li:not(.msg) li:not(.msg) {
  padding: 2px 0 2px 22px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-size: 0.85em;
  line-height: 1.3;
  --tone: var(--edge);
}
.reveal .slides li:not(.msg) li:not(.msg)::before {
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-width: 2px;
  background: var(--tone);
}
