/* Spec 058: "How Xocana works" around the website: Home's card, the landing's block, and the page the
   show covers while it plays (the show's own styles are walkthrough/show.css, loaded when it opens). */

.watch-play {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--on-secondary);
  box-shadow: var(--elevation-raised);
}

.watch-play .icon {
  width: 2rem;
  height: 2rem;
}

.watch-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.watch-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-5);
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--gradient-tile-sky);
  color: var(--on-crayon);
  box-shadow: var(--elevation-raised);
}

.watch-band .watch-copy {
  flex: 1 1 16rem;
}

.watch-band p {
  margin: 0;
  font-size: var(--font-md);
}

.watch-title {
  margin: 0;
  font-size: var(--font-xl);
  line-height: 1.15;
}

.watch-button {
  flex: none;
}

.walkthrough-status {
  padding: var(--space-6);
  text-align: center;
}

/* Spec 167 (the owner, 2026-10-15: opening "How it works" flashed an empty page, the footer, then clouds and the dragon):
   the show's sky over everything from the tap (js/views/walkthrough.js openCover): it fades in over the page you came
   from, holds while the show gets ready under it, and lifts off the first scene, composed. The little dragon and
   "Getting the show ready…" come only when that takes long (after WAIT_MS, 1.2 s). Reduce motion: no fades. */
.wt-cover {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px 24px;
  background-color: var(--page);
  background-image: var(--gradient-sky);
  color: var(--text);
  pointer-events: none;
  animation: wt-cover-in 160ms ease-out both;
}

/* The app's cover: FadeTo(0, 260, CubicOut). */
.wt-cover.is-lifting {
  animation: wt-cover-out 260ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

/* As the app's cover (WalkthroughPage.xaml): its three sparkles (Sparkle: the auto-awesome glyph in SkyStar at 22, 16 and
   14 pt), the friend 168 pt tall hopping as BouncingFriend does (1.1 s: up 18 and a tilt, a squash on landing; still with
   Reduce Motion), and the line in Headline's Baloo 2 Bold at 24 pt. */
.wt-cover-sparkle {
  position: absolute;
  width: 22px;
  height: 22px;
  color: var(--sky-star);
  fill: currentColor;
}

.wt-cover-sparkle.is-one { left: 16%; top: 20%; }
.wt-cover-sparkle.is-two { left: 84%; top: 26%; width: 16px; height: 16px; opacity: 0.8; }
.wt-cover-sparkle.is-three { left: 78%; top: 80%; width: 14px; height: 14px; opacity: 0.75; }

.wt-cover-wait {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 420px;
  animation: wt-cover-wait 300ms cubic-bezier(0.33, 1, 0.68, 1) 1200ms both;
}

.wt-cover-friend {
  width: auto;
  height: 168px;
  animation: wt-cover-hop 1100ms linear 1200ms infinite;
}

.wt-cover-text {
  margin: 0;
  font-family: var(--font-family);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
}

.wt-cover.is-still,
.wt-cover.is-still.is-lifting,
.wt-cover.is-still .wt-cover-friend {
  animation: none;
}

.wt-cover.is-still .wt-cover-wait {
  animation: wt-cover-wait 1ms steps(1, end) 1200ms both;
}

/* Spec 167: the show's page does not slide in like other pages (play.css's page-in). Its moving, half-faded section was
   the box the show's fixed stage was drawn in for a quarter of a second: the stage showed small at the top, faded, then
   jumped to the full screen (the "flash" the owner saw). */
#view > section.walkthrough-page {
  animation: none;
}

/* Spec 167: under the sky, while the show opens and while it plays, the page has no header, footer or status line, so a
   frame drawn before the show's first one shows only sky, never the empty page or the footer. */
html.wt-opening .topbar,
html.wt-opening .footer,
html.wt-opening .walkthrough-status,
html.wt-open .topbar,
html.wt-open .footer {
  visibility: hidden;
}

@keyframes wt-cover-hop {
  0% { translate: 0 0; rotate: 0deg; scale: 1; animation-timing-function: ease-out; }
  35% { translate: 0 -18px; rotate: -6deg; animation-timing-function: ease-in; }
  70% { translate: 0 0; rotate: 5deg; scale: 1; }
  82% { scale: 0.96; }
  100% { translate: 0 0; rotate: 0deg; scale: 1; }
}

@keyframes wt-cover-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wt-cover-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes wt-cover-wait {
  from { opacity: 0; }
  to { opacity: 1; }
}

