/* ============================================================================
   Present's page on this site: its demo and its two small print pages.
   The demo is carried over from Present's own landing page (variation A, the
   Present repo's site/present.css): the hand that is the pointer, the board the
   demo stands on (the app's Pointer board: paper tinted by the hand in use),
   its slide, its quick hands and the ring a tap leaves. Additive: no rule of
   style.css is changed; only the demo stage gets its own look.
   ========================================================================= */

/* ---------- the pointer is the hand ---------- */
html.hand-on,
html.hand-on * {
  cursor: none !important;
}
.hand-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease-out);
}
.hand-cursor.shown {
  opacity: 1;
}
/* The fingertip is the arm's top-left corner: moving and turning the arm moves
   and turns the hand about its fingertip. */
.hc-arm {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}
/* A tap pushes the hand in by a sixth and its shadow comes in under it
   (HandFilm.pressed); it goes down in 90 ms and comes back in 85. */
.hc-press {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  filter: drop-shadow(5px 9px 7px rgba(20, 24, 40, 0.22));
  transition: transform 85ms var(--ease-out), filter 85ms var(--ease-out);
}
.hc-press.down {
  transform: scale(0.83);
  filter: drop-shadow(1px 2px 2px rgba(20, 24, 40, 0.24));
  transition-duration: 90ms;
}
.hc-hand {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}
/* A long piece of the real stick, repeated from the wrist to past the bottom of the window
   (tools/make-hands.py), so a wooden one keeps its grain. */
.hc-rod {
  position: absolute;
  background: top center / 100% auto repeat-y;
}

/* ---------- the demo: the app's board ---------- */
.stage.board {
  aspect-ratio: 16 / 10;
  background: rgb(244 245 248);
  container-type: inline-size;
  /* taps only: a finger that starts on the demo can still scroll the page */
  touch-action: manipulation;
}
/* Paper tinted by the hand, with a soft pool of its colour (Backdrop in HomeView).
   Two layers: a new colour fades in over the last one. */
.board-tint {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  background:
    radial-gradient(circle 46cqw at 26% 16%, rgb(var(--t) / 0.27) 0%, rgb(var(--t) / 0.21) 40%, rgb(var(--t) / 0) 100%),
    rgb(var(--base));
}

/* something to point at: a slide with a title and a small chart */
.slide {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 12%;
  width: 56%;
  aspect-ratio: 16 / 10;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 5%;
  padding: 7% 8% 8%;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(20, 24, 40, 0.04), 0 1px 2px rgba(20, 24, 40, 0.06), 0 10px 26px rgba(20, 24, 40, 0.1);
}
.slide-title {
  width: 44%;
  height: 8%;
  border-radius: 99px;
  background: #26272c;
}
.slide-line {
  width: 64%;
  height: 5%;
  border-radius: 99px;
  background: #e6e8ee;
}
.slide-bars {
  margin-top: auto;
  height: 52%;
  display: flex;
  align-items: flex-end;
  gap: 8%;
}
.slide-bars i {
  flex: 1;
  height: 34%;
  border-radius: 4px 4px 2px 2px;
  background: #e6e8ee;
}
.slide-bars i:nth-child(2) {
  height: 58%;
}
.slide-bars i:nth-child(3) {
  height: 46%;
}
.slide-bars i.hot {
  height: 92%;
  background: var(--hand-ink, #2f86f0);
  transition: background-color 0.3s var(--ease-out);
}

/* the hand standing in the demo (a copy of the pointer's): on a touch screen it is
   the one that taps; with a mouse it shows what is coming, until the pointer moves */
.stage-hand {
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s var(--ease-out), opacity 0.2s var(--ease-out);
}
.stage.standing .stage-hand {
  opacity: 1;
}
.stage .hud {
  z-index: 4;
}
.stage.touch .turn-off {
  display: none;
}

/* the ring a tap leaves: in the hand's ink, with a pale edge so it shows on any
   picture; opened and faded by main.js (TapRing) */
.tap-ring {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border-style: solid;
  border-radius: 50%;
  pointer-events: none;
  transform: scale(0.22);
  box-shadow: 0 0 var(--glow) rgba(255, 255, 255, 0.95), inset 0 0 var(--glow) rgba(255, 255, 255, 0.95);
}

/* the quick hands, on a bar of glass like the app's rail */
.pick {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 8px 22px rgba(20, 30, 60, 0.16);
}
.pick-hand {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(20, 24, 40, 0.08);
  /* the ring moves at once, as the app's does; only the lift and press ease */
  transition: transform 0.16s var(--ease-out);
}
.pick-hand img {
  display: block;
  width: auto;
  height: 25px;
  pointer-events: none;
  user-select: none;
}
/* the one in use has a ring round it, as on the app's board */
.pick-hand[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--ink), 0 1px 2px rgba(20, 24, 40, 0.08);
}
.pick-hand:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(10, 132, 255, 0.6);
}
@media (hover: hover) and (pointer: fine) {
  .pick-hand:hover {
    transform: translateY(-2px);
  }
}
.pick-hand:active {
  transform: scale(0.94);
}

/* ---------- the video loop ---------- */
.present-film {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
}
.present-film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- support and privacy: the same parts Clatto's pages use, under
   Present's own names, so a change to either app's pages leaves the other's alone ---------- */
.present-fine {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 4px 0 40px;
}
.present-fine a,
.present-back {
  display: inline-block;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: var(--tracking);
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.14s ease, transform 0.12s var(--ease-out);
}
.present-fine a:hover,
.present-back:hover {
  color: var(--ink);
}
.present-fine a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline);
}
.present-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 22px;
}
.present-back img {
  border-radius: 5px;
}
.present-back:active,
.present-fine a:active {
  transform: scale(0.97);
}
.present-lede {
  margin: 0 0 18px;
  max-width: 48ch;
}
.present-foot {
  margin-top: 22px;
  color: var(--ink-3);
}
.present-foot a {
  color: var(--ink-2);
}
.present-foot a:hover {
  color: var(--ink);
}
.present-doc .steps {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .pick {
    gap: 4px;
    padding: 4px;
    bottom: 8px;
  }
  .pick-hand {
    width: 32px;
    height: 32px;
  }
  .pick-hand img {
    height: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hc-press,
  .hc-press.down,
  .board-tint,
  .stage-hand,
  .slide-bars i.hot,
  .pick-hand {
    transition: none;
  }
}
