/* The Actions & Stuff page (kem108.dev/actionsandstuff): the campsite fills the screen, KK's two-line logo on top,
   the download button in the middle where the chicken pecks it. Boxes, buttons and the switch come from site.css. */

html, body { height: 100%; overflow: hidden; }
/* the sky (the scene's canvas is see-through; js/aas/scene.js fades its fog into the same horizon colour) */
body.aas { overscroll-behavior: none; background: linear-gradient(#8ab8ff 0%, #b2d2ff 45%, #dcebff 75%, #dcebff 100%); }

.aas-scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1s ease; touch-action: pan-y; }
.aas.is-ready .aas-scene { opacity: 1; }

/* the logo, under the top bar */
.aas-title {
  position: fixed; z-index: 5; top: calc(clamp(74px, 9.5vh, 92px) + env(safe-area-inset-top, 0px)); left: 0; right: 0;
  display: flex; justify-content: center; margin: 0; pointer-events: none;
  animation: rise-in 1s var(--ease) both .15s;
}
.aas-title img { display: block; width: auto; height: clamp(96px, 24vh, 280px); max-width: 92vw; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }

/* the button: its top edge is where the chicken's beak lands (--anchor-y comes from js/aas/campsite.js) */
.aas-dl-wrap {
  position: fixed; z-index: 6; left: 50%; top: var(--anchor-y, 63vh);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transform: translateX(-50%);
}
.aas-dl {
  min-width: 280px; height: 74px; padding-inline: 40px 46px; gap: 14px;
  font: 700 32px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; text-shadow: 2px 2px 0 rgba(0, 0, 0, .45);
}
.aas-dl svg { flex: none; width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: square; stroke-linejoin: miter; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .45)); }
/* while it downloads the label is the percentage, so keep the width steady */
.aas-dl .aas-dl-label { min-width: 5.2ch; text-align: center; }
.aas-dl.is-busy { cursor: progress; }
/* every peck pushes it down two pixels, like pressing it */
.aas-dl.is-pecked { --b: var(--box-red-pressed); padding-top: calc(var(--gpx) * 2); padding-bottom: 0; }
.aas-for { margin: 0; font-size: 14px; color: var(--text-dim); }

/* what it is, bottom left, in a launcher box */
.aas-about {
  position: fixed; z-index: 6; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 340px; padding: 14px 18px 18px;
  --b: var(--box); border: 0 solid transparent; border-image: var(--b) 6 fill / calc(var(--gpx) * 6) / 0 stretch; image-rendering: pixelated;
}
.aas-about > * { position: relative; z-index: 2; }
.aas-about b { display: block; margin-bottom: 6px; font: 700 13px/1.3 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.aas-about p { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text-dim); }
.aas-about .aas-credit { margin-top: 8px; font-size: 12px; color: var(--text-faint); }

.aas-lite { position: fixed; z-index: 6; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

/* no WebGL: just the sky, the logo and the button */
.aas.no-webgl .aas-scene { display: none; }

@media (max-width: 860px), (max-height: 620px) {
  .aas-about { display: none; }
}
@media (max-width: 560px) {
  .aas-dl { min-width: 220px; height: 60px; padding-inline: 28px 32px; font-size: 24px; }
  .aas-dl svg { width: 24px; height: 24px; }
  .aas-for { font-size: 12px; white-space: nowrap; }
  .aas-title img { height: clamp(80px, 18vh, 200px); }
}
@media (prefers-reduced-motion: reduce) {
  .aas-title { animation: none; }
}
