/* ===========================================================================
   MyersMojo — public pitch deck viewer.

   Full-bleed dark stage so slide artwork carries the page, using the site's
   own navy/blue/cyan palette and Playfair Display headings. Slides are shown
   with object-fit: contain, so 16:9, 4:3, portrait and square decks all render
   at their true aspect ratio without cropping or stretching.
   =========================================================================== */

:root {
  --pd-navy:    #0A1E3F;
  --pd-deep:    #001933;
  --pd-blue:    #0080FF;
  --pd-cyan:    #44D0FF;
  --pd-text:    #E4E8F0;
  --pd-muted:   #9aa8bd;
  --pd-border:  rgba(255, 255, 255, .14);
}

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

html, body { height: 100%; }

body.pd-body {
  font-family: 'Playfair Display', Georgia, serif;
  background: var(--pd-deep);
  color: var(--pd-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* ------------------------------------------------------------------ head */
.pd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: var(--pd-navy);
  border-bottom: 1px solid var(--pd-border);
  flex: none;
}
.pd-head__titles { min-width: 0; }
.pd-head__title {
  font-size: clamp(15px, 2.4vw, 20px);
  font-weight: 700;
  color: var(--pd-cyan);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pd-head__sub {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 12.5px; color: var(--pd-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pd-head__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.pd-draft {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(240, 173, 46, .18); color: #ffd489;
  border: 1px solid rgba(240, 173, 46, .5);
}

/* --------------------------------------------------------------- buttons */
.pd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 14px; font-weight: 600; line-height: 1;
  padding: 9px 15px; border-radius: 6px; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: var(--pd-text);
  border: 1px solid var(--pd-border); text-decoration: none;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.pd-btn:hover { background: rgba(68, 208, 255, .18); border-color: var(--pd-cyan); color: #fff; }
.pd-btn:focus-visible { outline: 3px solid var(--pd-cyan); outline-offset: 2px; }
.pd-btn[disabled] { opacity: .35; cursor: default; }
.pd-btn[disabled]:hover { background: rgba(255, 255, 255, .08); border-color: var(--pd-border); color: var(--pd-text); }
.pd-btn--primary { background: var(--pd-blue); border-color: var(--pd-blue); color: #fff; }
.pd-btn--primary:hover { background: #1a90ff; border-color: #1a90ff; }
.pd-btn--icon { padding: 9px 12px; font-size: 17px; }

/* ----------------------------------------------------------------- stage */
.pd-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;                /* lets the flex child actually shrink */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 128, 255, .10), transparent 60%),
    var(--pd-deep);
  touch-action: pan-y;
  overflow: hidden;
}

.pd-slide {
  display: none;
  width: 100%; height: 100%;
  align-items: center; justify-content: center;
}
.pd-slide.is-active { display: flex; }

/* Aspect ratio is preserved: the image scales to fit, never crops. */
.pd-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
  background: #06101f;
}

.pd-slide__caption {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 13px; color: var(--pd-muted);
  background: rgba(0, 25, 51, .82);
  padding: 5px 14px; border-radius: 999px;
  max-width: 84%; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}

/* Large click targets down the left and right edges of the stage. */
.pd-edge {
  position: absolute; top: 0; bottom: 0; width: 13%; max-width: 120px;
  border: 0; background: transparent; cursor: pointer;
  color: transparent; padding: 0;
  transition: background .2s ease;
}
.pd-edge:hover { background: rgba(255, 255, 255, .05); }
.pd-edge:focus-visible { outline: 3px solid var(--pd-cyan); outline-offset: -6px; }
.pd-edge--prev { left: 0; }
.pd-edge--next { right: 0; }
.pd-edge[disabled] { cursor: default; }
.pd-edge[disabled]:hover { background: transparent; }
@media (max-width: 720px) { .pd-edge { display: none; } }

/* ------------------------------------------------------------------ foot */
.pd-foot {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--pd-navy);
  border-top: 1px solid var(--pd-border);
  flex: none;
}
.pd-counter {
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 14px; font-weight: 600; color: var(--pd-text);
  min-width: 96px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.pd-counter small { color: var(--pd-muted); font-weight: 400; }

/* Thin progress strip so the position in a long deck is obvious. */
.pd-progress { height: 3px; background: rgba(255, 255, 255, .09); flex: none; }
.pd-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--pd-blue), var(--pd-cyan));
  transition: width .25s ease;
}

/* ---------------------------------------------------------------- empty  */
.pd-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 24px; gap: 14px;
}
.pd-empty h2 { color: var(--pd-cyan); font-size: 26px; }
.pd-empty p { font-family: 'Roboto', system-ui, sans-serif; color: var(--pd-muted); max-width: 460px; }

/* ------------------------------------------------------------- no-script */
.pd-noscript { padding: 20px; display: grid; gap: 20px; overflow-y: auto; }
.pd-noscript img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 4px; }

/* ------------------------------------------------------------ utilities */
.pd-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Scrolling is allowed again when JavaScript is off, so all slides are reachable. */
body.pd-body.pd-no-js { overflow: auto; }

@media (max-width: 560px) {
  .pd-head { padding: 8px 12px; }
  .pd-head__sub { display: none; }
  .pd-stage { padding: 10px; }
  .pd-foot { padding: 10px 12px; gap: 7px; }
  .pd-btn { padding: 9px 12px; font-size: 13px; }
  .pd-counter { min-width: 78px; font-size: 13px; }
}

@media print {
  .pd-head, .pd-foot, .pd-edge, .pd-progress { display: none !important; }
  body.pd-body { overflow: visible; background: #fff; }
  .pd-slide { display: flex !important; page-break-after: always; }
}
