/* The one-time intro screen between the title and the galaxy map, from Figma "Introduction"
   (file CmD5wuS76aqLyzzpSVK2J5, node 2116:3067, a 2752 x 1548 frame).
   Every size is a Figma pixel times --u, so the screen scales with the 16:9 stage. Borders stay a fixed pixel width.
   Shown once: game.js remembers it in localStorage ('wow26-intro-seen'). */

#s-welcome { --u: calc(100cqw / 2752); background: #000; }

/* ---------- art: space, rocks, Jaimy on the left, Adrian on the right ---------- */
#s-welcome .iw-art { position: absolute; left: 0; top: 0; width: calc(2752 * var(--u)); height: calc(1548 * var(--u)); overflow: hidden; pointer-events: none; }
#s-welcome .iw-art > * { position: absolute; }

/* the frame's own fill: space picture, navy multiply, 20% black */
.iw-space { inset: 0;
  background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .2)), linear-gradient(rgba(18, 42, 75, .5), rgba(18, 42, 75, .5)), url('../art/intro/space-digital.png') center / cover no-repeat;
  background-blend-mode: normal, multiply, normal; }
/* Figma "Background" (Digital): space picture, blue multiply, then a black-to-clear soft-light gradient from the top */
.iw-bg { inset: 0;
  background: linear-gradient(rgba(59, 133, 237, .5), rgba(59, 133, 237, .5)), url('../art/intro/space-digital.png') center / cover no-repeat;
  background-blend-mode: multiply, normal; }
.iw-shade { inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, 0) 48.288%); mix-blend-mode: soft-light; }

.iw-rocks { left: 0; bottom: 0; width: calc(2752 * var(--u)); height: calc(1548 * var(--u)); overflow: hidden; }
.iw-rocks > img { position: absolute; display: block; max-width: none; left: -0.01%; top: 0.78%; width: 100.03%; height: 99.22%; }

/* Figma "Strength" box */
.iw-strength { left: calc(711 * var(--u)); top: calc(1418 * var(--u)); width: calc(99 * var(--u)); height: calc(34 * var(--u)); box-sizing: border-box; background: #000; border: 1px solid #fff; }

/* Figma "Character Full Body": the front view cropped from each sprite sheet */
.iw-person { top: calc(1052 * var(--u)); width: calc(304 * var(--u)); height: calc(387 * var(--u)); }
.iw-jaimy { left: calc(117 * var(--u)); }
.iw-adrian { left: calc(2354 * var(--u)); }
.iw-body { position: absolute; left: 0; right: 0; bottom: 0; top: -3.36%; overflow: hidden; }
.iw-body > img { position: absolute; display: block; max-width: none; top: 0; width: 263.16%; height: 200%; }
.iw-jaimy .iw-body > img { left: -18.61%; }
.iw-adrian .iw-body > img { left: -20.32%; }

/* ---------- Figma "Story Card" ---------- */
.iw-card { position: absolute; z-index: 2; left: 50%; top: calc(50% - 103.06 * var(--u)); translate: -50% -50%; box-sizing: border-box; width: calc(1680 * var(--u));
  display: flex; flex-direction: column; align-items: flex-start; gap: calc(29.647 * var(--u));
  padding: calc(49.412 * var(--u)) calc(59.294 * var(--u)) calc(34.588 * var(--u));
  background: rgba(0, 0, 0, .75); border: 4.941px solid #fff; border-radius: calc(9.882 * var(--u));
  filter: drop-shadow(0 calc(14.824 * var(--u)) 0 rgba(0, 0, 0, .6));
  color: #fff; font-family: Inter, var(--font-body); font-weight: 400; }
.iw-count { margin: 0; font-size: calc(29.647 * var(--u)); line-height: 1.3; color: var(--brand-orange, #fcb24f); white-space: nowrap; }
.iw-row { display: flex; align-items: flex-start; gap: calc(148.235 * var(--u)); width: 100%; }
.iw-line { flex: 1 0 0; min-width: 1px; margin: 0; font-size: calc(44.471 * var(--u)); line-height: 1.5; color: #fff; }
.iw-avatar { position: relative; flex: none; width: calc(177.882 * var(--u)); height: calc(177.882 * var(--u)); }
.iw-avatar > img { position: absolute; inset: -2.78%; display: block; width: calc(100% + 2 * 2.78%); height: calc(100% + 2 * 2.78%); max-width: none; }
/* the three how-to lines: arrow keys and E on keyboards, the joystick and Tap on touch screens (kb-only / touch-only, phone.css).
   The keycaps reuse the How to play keys (game.css kbd); the four arrows sit as an inverted T.
   Every row's icon box is the height of the arrow keys, so the three lines are evenly spaced (BugHerd 15). */
.iw-how { display: flex; flex-direction: column; gap: calc(22 * var(--u)); margin: calc(18 * var(--u)) 0; padding: 0; list-style: none; font-size: calc(34 * var(--u)); line-height: 1.4; }
.iw-how li { display: flex; align-items: center; gap: calc(24 * var(--u)); }
.iw-ico { flex: none; display: flex; align-items: center; justify-content: center; width: calc(180 * var(--u)); height: calc(88 * var(--u) + 4px); }
/* touch screens: a small copy of the game's joystick (world3d.css .w3d-joy) and a matching tap button (BugHerd 19) */
.iw-pad { position: relative; display: block; box-sizing: border-box; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line-strong, rgba(255, 255, 255, .85)); background: var(--box, rgba(0, 0, 0, .62)); }
.iw-joy { width: calc(88 * var(--u) + 4px); }
.iw-joy i { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border-radius: 50%; background: rgba(255, 255, 255, .75); box-shadow: 0 0 0 2px #000; }
.iw-tap { width: calc(56 * var(--u) + 4px); }
.iw-tap i { position: absolute; inset: 31%; border-radius: 50%; background: rgba(255, 255, 255, .75); box-shadow: 0 0 0 2px #000, 0 0 0 calc(2px + 7 * var(--u)) rgba(255, 255, 255, .3); }
/* the strength crystal, rendered from the game's 3D gem (world/js/crystals.js) with its green glow (BugHerd 16) */
.iw-gem { display: block; width: auto; height: calc(80 * var(--u)); filter: drop-shadow(0 0 calc(10 * var(--u)) rgba(0, 189, 140, .55)); }
.iw-keys { display: inline-grid; grid-template-columns: repeat(3, auto); gap: calc(5 * var(--u)); }
.iw-keys .iw-up { grid-column: 2; }
.iw-keys kbd:not(.iw-up) { grid-row: 2; }
.iw-how kbd { box-sizing: border-box; min-width: 2.1em; padding: .2em .55em; font-size: calc(26 * var(--u)); line-height: 1.2; text-align: center; opacity: 1; }
.iw-foot { display: flex; align-items: center; justify-content: flex-end; gap: calc(39.529 * var(--u)); width: 100%; overflow: clip; }
/* Figma "World Button", Text variant */
.iw-btn { display: flex; align-items: center; justify-content: center; gap: calc(19.765 * var(--u)); box-sizing: border-box; height: calc(108.706 * var(--u));
  margin: 0; padding: calc(29.647 * var(--u)) calc(9.882 * var(--u)); border: 0; border-radius: calc(9.882 * var(--u)); background: transparent; color: #fff;
  font: 600 calc(39.529 * var(--u)) / 1.3 Inter, var(--font-body); letter-spacing: calc(1.5812 * var(--u)); text-transform: uppercase; white-space: nowrap; }

/* the art bleeds to the window edges like the title and map (game.css, --cover from game.js) */
body[data-screen="welcome"] { background: #000; }
body[data-screen="welcome"] #stage, #s-welcome { overflow: visible; }
#s-welcome .iw-art { transform-origin: 0 0; scale: var(--cover, 1); translate: calc((1 - var(--cover, 1)) * 50cqw) calc((1 - var(--cover, 1)) * 50cqh); }
