/* ============================================================
   CULVAY deck · stage, slide chrome, navigation
   Slides are authored on a fixed 1280x720 canvas and scaled with
   a CSS transform, so layout is pixel-identical at every size.
   Visual language follows the original deck: a flat black stage
   with a single rounded slide card floating on it.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Stage ---------------------------------------------------- */

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #050506;
}

/* ---- Slides -------------------------------------------------- */

#track { position: fixed; inset: 0; z-index: 2; }

.slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1280px;
  height: 720px;
  margin: 0;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(var(--fit, 1));
  opacity: 0;
  visibility: hidden;
  content-visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition: opacity .38s var(--ease-out);
  border-radius: 26px;
}

.slide.on {
  opacity: 1;
  visibility: visible;
  content-visibility: visible;
  pointer-events: auto;
  z-index: 3;
}

/* Content enters a beat after the card fades in. */
.slide.on .rise { animation: rise .5s var(--ease-out) both; }
.slide.on .rise:nth-child(2) { animation-delay: .04s; }
.slide.on .rise:nth-child(3) { animation-delay: .08s; }
.slide.on .rise:nth-child(4) { animation-delay: .12s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .slide.on .rise { animation: none; }
  .slide { transition: none; }
}

/* ---- Deck UI ------------------------------------------------- */

#ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-body);
}

#progress {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, .07);
}
#progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cherry-500);
  transition: width .4s var(--ease-out);
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .75);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-hover) var(--ease-out),
              color var(--dur-hover) var(--ease-out);
}
.nav:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.nav:focus-visible { outline: 2px solid var(--cherry-500); outline-offset: 2px; }
.nav.off { opacity: .18; pointer-events: none; }
#prev { left: 18px; }
#next { right: 18px; }

#counter {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .42);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
}

#hint {
  position: absolute;
  bottom: 18px; right: 20px;
  color: rgba(255, 255, 255, .22);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity var(--dur-state) var(--ease-out);
}
#hint.gone { opacity: 0; }

@media (max-width: 700px) {
  .nav { width: 36px; height: 36px; font-size: 16px; }
  #prev { left: 6px; }
  #next { right: 6px; }
  #hint { display: none; }
}

/* ---- Print / PDF export mode (press "p") --------------------- */

body.print { overflow: auto; height: auto; background: #050506; }
body.print #ui { display: none; }
body.print #track { position: static; }
body.print .slide {
  position: relative;
  top: auto; left: auto;
  transform: none;
  opacity: 1;
  visibility: visible;
  content-visibility: visible;
  pointer-events: auto;
  margin: 0 auto 22px;
  break-after: page;
}

@media print {
  body { overflow: visible; background: #fff; }
  #ui { display: none; }
  #stage { position: absolute; background: #fff; }
  .slide {
    position: relative;
    top: auto; left: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    content-visibility: visible;
    margin: 0;
    break-after: page;
    border-radius: 0;
  }
  @page { size: 1280px 720px; margin: 0; }
}
