/* VOL. 2: the plate and the title (the comic's own styles are in intro2.css). The plate and the big button are game/intro.css's;
   the title is Vol. 2's own, from out/wip/level2/card.html. Played by game/game2.js. */
/* NO MIDS: the plate, the opening comic and the title. The markup is fixed by art/SPEC-step5.md (O1); every size is taken from the
   field's own width (cqw), so the same screens hold at 360 and at 1280. Played by game/intro.js. */
@font-face { font-family: Anton; font-weight: 400; src: url(assets/fonts/anton-400.woff2) format("woff2"); font-display: block; }
@font-face { font-family: Barlow; font-weight: 800; src: url(assets/fonts/barlow-800.woff2) format("woff2"); font-display: block; }
@font-face { font-family: PS2P; src: url(assets/fonts/press-start-2p.woff2) format("woff2"); font-display: block; }

#screens { --ink: #0c0a10; --paper: #f6eeda; --gold: #f5b71a; --blue: #1d43cf; --red: #e2291d; --pink: #ff3ea5; --teal: #19e3d2; }
#screens > section.plate, #screens > section.intro, #screens > section.title {
  position: absolute; inset: 0; overflow: hidden; container-type: size; box-sizing: border-box; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
#screens > section.plate[hidden], #screens > section.intro[hidden], #screens > section.title[hidden] { display: none; }

/* ------------------------------------------------ the big button, on the plate and the title */
#screens .go {
  font-family: Anton, sans-serif; font-weight: 400; font-size: 8.6cqw; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); background: var(--gold); border: 6px solid #000; border-radius: 6cqw; padding: 4.4cqw 8cqw 3.6cqw; min-height: 48px;
  box-shadow: 8px 8px 0 var(--pink); cursor: pointer; touch-action: manipulation; animation: go-pulse 2.4s ease-in-out infinite;
}
#screens .go:active { transform: translate(5px, 5px); box-shadow: 3px 3px 0 var(--pink); animation: none; }
@keyframes go-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }

/* ------------------------------------------------ the plate */
#screens > section.plate { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--ink); gap: 0; }
#screens > section.plate::before {
  content: ''; position: absolute; inset: -10%; pointer-events: none;
  background: radial-gradient(circle at center, var(--gold) 0 26%, transparent 30%) 0 0 / 3.4cqw 3.4cqw, radial-gradient(circle at 50% 36%, rgba(226, 41, 29, .5), transparent 52%);
  -webkit-mask-image: radial-gradient(circle at 50% 36%, #000 0, rgba(0, 0, 0, .0) 62%); mask-image: radial-gradient(circle at 50% 36%, #000 0, rgba(0, 0, 0, 0) 62%);
  opacity: .4; animation: plate-glow 6s ease-in-out infinite alternate;
}
#screens > section.plate::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 10px var(--ink), inset 0 0 0 13px rgba(246, 238, 218, .22);
}
@keyframes plate-glow { 0% { opacity: .25; transform: scale(1); } 100% { opacity: .6; transform: scale(1.07); } }
#screens .plate .badge { position: relative; width: 60cqw; height: auto; display: block; filter: drop-shadow(0 1.6cqw 2.4cqw rgba(0, 0, 0, .6)); margin-top: -4cqw; }   /* his P-and-star logo: the picture is cut so the yellow tile (92% of its width) is in the middle and the blue shadow hangs off */
#screens .plate .presents {
  position: relative; margin: 6cqw 0 8cqw; padding: 0 8cqw; text-align: center; font-family: PS2P, monospace; font-size: 4.3cqw; line-height: 1.8; letter-spacing: .06em; color: var(--gold);
  text-wrap: balance; text-shadow: .5cqw .5cqw 0 #000;
}
#screens .plate .go { position: relative; }
/* the age line under the button, as on the other Pharaoh pages: small print, but it must be readable on a 360 px phone */
#screens .plate .gate {
  position: relative; margin: 5.5cqw 0 0; max-width: 80cqw; text-align: center; text-wrap: balance; font-family: PS2P, monospace; font-size: 2.45cqw; line-height: 1.9;
  letter-spacing: .03em; color: var(--paper); opacity: .8;
}
#screens .plate .age {
  position: absolute; left: 50%; bottom: 6cqw; transform: translateX(-50%); width: 13cqw; height: 13cqw; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--paper); border-radius: 50%; color: var(--paper); font-family: PS2P, monospace; font-size: 3.6cqw; letter-spacing: 0; padding-top: .4cqw; box-sizing: border-box;
}


/* ------------------------------------------------ VOL. 2 (the plate's VOL. 2 tag) */
#screens .plate .logo { position: relative; width: 60cqw; margin-top: -4cqw; }
#screens .plate .logo .badge { width: 100%; margin-top: 0; }
#screens .plate .vol {
  position: absolute; right: -3cqw; bottom: 8cqw; transform: rotate(6deg); font: 400 7.2cqw/1 Anton, sans-serif; letter-spacing: .04em; white-space: nowrap; color: var(--ink);
  background: var(--pink); border: .6cqw solid #000; box-shadow: .9cqw .9cqw 0 #000; padding: 1.2cqw 2.4cqw .4cqw;
}

/* ------------------------------------------------ the title: its own painting (card.webp), the lock-up over it. Drawn in a
   1080 x 1920 box in out/wip/level2/card.html: every size here is that mock's pixels / 10.8, in cqw of the field. */
#screens > section.title { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; background: #2a0f66; padding-bottom: 3.4cqw; }
#screens .title .sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; pointer-events: none; -webkit-user-drag: none; }
#screens .title .shade { position: absolute; left: 0; right: 0; top: 0; height: 83.3cqw; background: linear-gradient(#1a0748d9 0%, #1a074899 55%, #1a074800 100%); pointer-events: none; }
#screens .title .name { position: absolute; left: 0; right: 0; top: 10.4cqw; margin: 0; display: flex; flex-direction: column; align-items: center; transform: rotate(-4deg); font-family: Anton, sans-serif; font-weight: 400; text-transform: uppercase; line-height: .96; white-space: nowrap; }
#screens .title .name span { display: block; opacity: 0; -webkit-text-stroke: 0; paint-order: stroke fill; letter-spacing: .01em; }
#screens .title .name span:nth-child(1) { color: var(--paper); font-size: 7.2cqw; letter-spacing: .08em; text-shadow: .08em .09em 0 #000; margin-bottom: .5cqw; }
#screens .title .name span:nth-child(2) { color: var(--gold); font-size: 17.8cqw; -webkit-text-stroke: 1.67cqw #000; filter: drop-shadow(.06em .07em 0 var(--red)); }
#screens .title .name span:nth-child(3) { color: var(--paper); font-size: 21.3cqw; -webkit-text-stroke: 1.67cqw #000; filter: drop-shadow(.06em .07em 0 var(--blue)); margin-top: -.5cqw; }
#screens .title.in .name span { animation: title-slam .34s cubic-bezier(.2, .8, .3, 1) both; }
#screens .title.in .name span:nth-child(2) { animation-delay: .09s; }
#screens .title.in .name span:nth-child(3) { animation-delay: .18s; }
#screens .title.in .name { animation: title-shake .3s linear .18s both; }
@keyframes title-slam { 0% { opacity: 0; transform: scale(2.3); } 45% { opacity: 1; transform: scale(.92); } 70% { opacity: 1; transform: scale(1.035); } 100% { opacity: 1; transform: scale(1); } }
@keyframes title-shake { 0% { translate: 0 0; } 20% { translate: -1.6cqw .8cqw; } 40% { translate: 1.4cqw -.9cqw; } 60% { translate: -.9cqw .5cqw; } 80% { translate: .5cqw -.3cqw; } 100% { translate: 0 0; } }
@keyframes title-rise { 0% { opacity: 0; transform: translateY(3cqw); } 100% { opacity: 1; transform: none; } }
@keyframes title-stamp { 0% { opacity: 0; scale: 2; } 55% { opacity: 1; scale: .92; } 100% { opacity: 1; scale: 1; } }

/* the edition's sticker: a teal starburst, the words in the game's own lettering */
#screens .title .seal { position: absolute; left: 4.1cqw; top: 54.8cqw; width: 27.8cqw; height: 27.8cqw; transform: rotate(-11deg); display: flex; flex-direction: column; align-items: center; justify-content: center; filter: drop-shadow(.83cqw .93cqw 0 #000); opacity: 0; pointer-events: none; }
#screens .title .seal svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#screens .title .seal polygon { fill: var(--teal); stroke: #000; stroke-width: 5; stroke-linejoin: round; }
#screens .title .seal b { position: relative; font: 400 7.2cqw/.92 Anton, sans-serif; letter-spacing: .03em; color: var(--ink); text-align: center; margin-top: .56cqw; }
#screens .title .seal i { position: relative; font: 1.94cqw/1 PS2P, monospace; font-style: normal; letter-spacing: .04em; color: var(--ink); margin-top: 1.1cqw; }
/* the volume */
#screens .title .vol { position: absolute; right: 6.85cqw; top: 54.8cqw; transform: rotate(5deg); font: 400 12.8cqw/1 Anton, sans-serif; letter-spacing: .04em; white-space: nowrap; color: var(--ink); background: var(--pink); border: .74cqw solid #000; box-shadow: 1.1cqw 1.1cqw 0 #000; padding: 1.85cqw 3.15cqw .56cqw; opacity: 0; pointer-events: none; }
#screens .title.in .seal { animation: title-stamp .4s ease-out .5s both; }
#screens .title.in .vol { animation: title-stamp .4s ease-out .6s both; }

#screens .title .feat { position: absolute; left: 0; right: 0; top: 79.3cqw; margin: 0; display: flex; align-items: center; justify-content: center; gap: 2.2cqw; opacity: 0; }
#screens .title .feat .featuring { font-family: Barlow, sans-serif; font-weight: 800; font-size: 4.26cqw; line-height: 1; color: var(--paper); text-shadow: .37cqw .37cqw 0 #000; letter-spacing: .02em; }
#screens .title .feat .badge { width: 17cqw; height: auto; display: block; filter: drop-shadow(.46cqw 0 0 #000) drop-shadow(-.46cqw 0 0 #000) drop-shadow(0 .46cqw 0 #000) drop-shadow(0 -.46cqw 0 #000) drop-shadow(.74cqw .83cqw 0 #000); }
#screens .title .feat .brand { font-family: Anton, sans-serif; font-size: 5.37cqw; line-height: 1; letter-spacing: .03em; color: var(--gold); text-shadow: .46cqw .46cqw 0 #000; }
#screens .title.in .feat { animation: title-rise .4s ease-out .5s both; }

/* the lower part, from the bottom up: the caption, the big button, the best score, the three pills */
#screens .title .cap { position: relative; margin: auto 0 0; transform: rotate(-2deg); width: max-content; max-width: 94cqw; font: 400 5.2cqw/1.12 Anton, sans-serif; letter-spacing: .03em; text-transform: uppercase; text-align: center; color: var(--ink); background: var(--gold); border: .56cqw solid #000; box-shadow: .83cqw .83cqw 0 #000; padding: 1.5cqw 2.8cqw .8cqw; opacity: 0; }
#screens .title .go { position: relative; margin-top: 3.2cqw; width: 79.6cqw; font-size: 7.8cqw; padding: 3cqw 0 2.5cqw; border-width: .6cqw; border-radius: 4.2cqw; box-shadow: 1.1cqw 1.1cqw 0 var(--pink); opacity: 0; }
#screens .title .go:active { transform: translate(.5cqw, .5cqw); box-shadow: .3cqw .3cqw 0 var(--pink); animation: none; }
#screens .title > .best { position: relative; margin: 2.6cqw 0 0; font-family: PS2P, monospace; font-size: 3.2cqw; letter-spacing: .06em; color: var(--paper); text-shadow: .4cqw .4cqw 0 #000; opacity: 0; }
#screens .title .best[hidden] { display: none; }
#screens .title .pills { position: relative; margin-top: 3cqw; display: flex; align-items: center; justify-content: center; gap: max(6px, 2.2cqw); }
#screens .title .small {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-family: PS2P, monospace; font-size: 3cqw; letter-spacing: .06em; color: var(--ink); background: var(--paper); border: 4px solid #000; border-radius: 999px;
  padding: 2.4cqw 4cqw 2cqw; min-height: 48px; box-shadow: 4px 4px 0 #000; cursor: pointer; touch-action: manipulation; opacity: 0; white-space: nowrap;
}
#screens .title .small:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
#screens .title .small.gold { background: var(--gold); }
#screens .title.in .cap { animation: title-rise .4s ease-out .75s both; }
#screens .title.in .go { animation: title-rise .4s ease-out .85s both, go-pulse 2.4s ease-in-out 1.45s infinite; }
#screens .title.in .best, #screens .title.in .small { animation: title-rise .4s ease-out 1s both; }
