/* Rocky Game Launcher · rocky.haoyong.app
   Rocky's gaming room at night: the neon sign on the wall says what this is, the desk is where the download starts. */

@font-face { font-family: "Tilt Neon"; src: url(fonts/tilt-neon.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; src: url(fonts/barlow-condensed-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 400; src: url(fonts/barlow-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 500; src: url(fonts/barlow-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow"; font-weight: 600; src: url(fonts/barlow-600.woff2) format("woff2"); font-display: swap; }
/* only the Chinese characters the signs and headings use (built by site/build.ps1) */
@font-face { font-family: "Rocky Sign SC"; font-weight: 900; src: url(fonts/noto-sans-sc-900-sub.woff2) format("woff2"); font-display: swap; }

:root {
  --night: #0E0F14;
  --wall-paint: #15121A;
  --board: #1D1A1F;
  --bezel: #0A0A0D;
  --dead: #4A4650;
  --cream: #FFF4E0;
  --ink: #D9CFC3;
  --muted: #A99E92;
  --orange: #FF8A00;
  --cyan: #33E1FF;
  --pink: #FF3D7F;
  --green: #3BE37A;
  --zh-sign: "Rocky Sign SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --zh-body: "Microsoft YaHei UI", "Microsoft JhengHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--dead) var(--night); }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 18px/1.6 "Barlow", var(--zh-body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--orange); color: var(--night); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--orange); color: var(--night); padding: 8px 14px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- neon tubes ---------- */
.tube { --glow: var(--orange); color: #FFE7C4; }
.t-orange { --glow: var(--orange); color: #FFE7C4; }
.t-cyan { --glow: var(--cyan); color: #DDFBFF; }
.t-pink { --glow: var(--pink); color: #FFDCE8; }
.t-green { --glow: var(--green); color: #DDFFE6; }
.t-cream { --glow: #FFB25A; color: #FFF6E8; }
.tube, .tube-text {
  text-shadow: 0 0 .03em #fff9, 0 0 .1em var(--glow), 0 0 .28em var(--glow), 0 0 .7em color-mix(in srgb, var(--glow) 55%, transparent);
}
.dead { color: var(--dead); text-shadow: none; }

/* ---------- the room ---------- */
.room { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--night); isolation: isolate; }
/* very wide screens: the room stops scaling and the edges fade into a blurred copy of itself */
.room::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: url(img/room.jpg) center 40% / cover; filter: blur(28px) brightness(.45); }
.stage {
  /* coordinates in the room image, in %: the empty wall for the sign, the black monitor screen,
     the desk front where the plaque sits, where Rocky stands */
  --bx: 35.5; --by: 6.5; --bw: 35.6; --bh: 25.5;
  --mx: 41.7; --my: 35.1; --mw: 20.9; --mh: 18.8;
  --desk: 61.5; --rx: 27; --feet: 92.5;
  position: absolute; left: 50%; top: 50%;
  width: max(min(100vw, 200svh), calc(max(100svh, 560px) * 1.7768));
  aspect-ratio: 1672 / 941;
  transform: translate(-50%, -50%);
  container-type: inline-size;
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.board { position: absolute; left: calc(var(--bx) * 1%); top: calc(var(--by) * 1%); width: calc(var(--bw) * 1%); height: calc(var(--bh) * 1%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lockup { display: flex; align-items: center; gap: 1.4cqw; }
.word { font-family: "Tilt Neon", sans-serif; font-size: 8.2cqw; line-height: .78; letter-spacing: .01em; }
.zh { font-family: var(--zh-sign); font-weight: 900; font-size: 1.7cqw; line-height: 1.02; writing-mode: vertical-rl; letter-spacing: .06em; }
.tagline { margin: .8cqw 0 0; font-family: "Tilt Neon", var(--zh-sign); font-size: 1.45cqw; letter-spacing: .02em; }

/* the black monitor on the desk shows the real launcher */
.monitor { position: absolute; left: calc(var(--mx) * 1%); top: calc(var(--my) * 1%); width: calc(var(--mw) * 1%); height: calc(var(--mh) * 1%);
  object-fit: cover; object-position: 50% 0; border-radius: .15cqw; }

/* small neon signs hung on the wall */
.wsign { position: absolute; padding: .5cqw .9cqw .55cqw; background: color-mix(in srgb, var(--board) 70%, transparent); border-radius: 4px;
  box-shadow: 0 .8cqw 1.6cqw #0009, inset 0 0 0 1px #ffffff10; line-height: 1.05; }
.wsign b { display: block; font: 400 1.3cqw "Tilt Neon", var(--zh-sign); text-shadow: 0 0 .03em #fff9, 0 0 .12em var(--c), 0 0 .32em var(--c); }
.wsign small { display: block; margin-top: .35cqw; font: 500 max(11px, .68cqw) "Barlow Condensed", var(--zh-body); letter-spacing: .1em; text-transform: uppercase; color: var(--cream); opacity: .8; }
.c-orange { --c: var(--orange); } .c-orange b { color: #FFE7C4; }
.c-cyan { --c: var(--cyan); } .c-cyan b { color: #DDFBFF; }
.c-pink { --c: var(--pink); } .c-pink b { color: #FFDCE8; }
.c-green { --c: var(--green); } .c-green b { color: #DDFFE6; }
.w1 { left: 27.5%; top: 34%; } .w2 { left: 27.5%; top: 44.5%; }
.w3 { left: 64.4%; top: 37%; }

.rocky { position: absolute; left: calc(var(--rx) * 1%); bottom: calc(100% - var(--feet) * 1%); height: 21.5cqw; width: auto; transform: translateX(-50%);
  filter: drop-shadow(0 1cqw 1.2cqw #000a); pointer-events: none; }

/* the orange plaque on the desk front: the one primary action */
.plaque { display: inline-block; text-align: center; text-decoration: none; background: var(--orange); color: #1A0D00; border-radius: 3px;
  font: 700 26px/1.05 "Barlow Condensed", var(--zh-sign); letter-spacing: .03em;
  box-shadow: 0 0 0 1px #ffb45a, 0 0 28px color-mix(in srgb, var(--orange) 70%, transparent), 0 14px 26px #000b;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1), box-shadow .25s; }
.plaque small { display: block; margin-top: 4px; font: 500 14px/1.2 "Barlow Condensed", var(--zh-body); letter-spacing: .03em; opacity: .78; }
.plaque:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #ffc078, 0 0 46px color-mix(in srgb, var(--orange) 85%, transparent), 0 18px 30px #000c; }
.plaque:active { transform: translateY(0) scale(.98); }
.stage .plaque { position: absolute; z-index: 2; left: 50%; top: calc(var(--desk) * 1%); transform: translateX(-50%); padding: max(12px, .85cqw) max(30px, 2.3cqw);
  font-size: max(22px, 1.7cqw); white-space: nowrap; }
.stage .plaque small { font-size: max(13px, .82cqw); }
.stage .plaque:hover { transform: translateX(-50%) translateY(-2px); }
.stage .plaque:active { transform: translateX(-50%) scale(.98); }

/* the nav is a small lit strip on the wall */
.topnav { position: absolute; z-index: 2; top: 14px; left: clamp(12px, 2vw, 36px); display: flex; gap: 2px; padding: 3px;
  background: #0E0F14b8; border-radius: 4px; box-shadow: inset 0 0 0 1px #ffffff12; }
.topnav a { text-decoration: none; font: 500 15px "Barlow Condensed", var(--zh-body); letter-spacing: .1em; text-transform: uppercase; color: var(--cream); opacity: .85; padding: 6px 10px; border-radius: 3px; white-space: nowrap; }
.topnav a:hover { opacity: 1; color: #FFE7C4; background: #ffffff0d; }
html:lang(zh) .topnav a { letter-spacing: .12em; }

.langs { position: absolute; top: 14px; right: clamp(12px, 2vw, 36px); z-index: 2; display: flex; gap: 2px; background: #0E0F14b8; border-radius: 4px; padding: 3px; box-shadow: inset 0 0 0 1px #ffffff12; }
.langs button { appearance: none; border: 0; background: none; color: var(--muted); font: 500 14px "Barlow Condensed", var(--zh-body); letter-spacing: .08em; padding: 6px 10px; border-radius: 3px; cursor: pointer; }
.langs button:hover { color: var(--cream); }
.langs button[aria-pressed="true"] { color: #1A0D00; background: var(--orange); }

/* the floor fades into the wall below, under the plaque */
.room:not(.closing) .stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20%; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--wall-paint) 60%, transparent) 55%, var(--wall-paint)); }
.room:not(.closing)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4%; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, var(--wall-paint)); }

/* ---------- along the wall ---------- */
/* the room's painted wall, washed by the ceiling LED and the warm desk lamp */
.wall { --pad: clamp(16px, 4vw, 48px); --rail: 18px; position: relative; padding: 72px var(--pad) 0; background:
    linear-gradient(var(--wall-paint), transparent 240px),
    radial-gradient(1200px 520px at 50% 0, #33E1FF14, transparent 70%),
    radial-gradient(800px 600px at 88% 32%, #FF8A0016, transparent 70%),
    radial-gradient(800px 600px at 8% 66%, #33E1FF10, transparent 70%),
    radial-gradient(900px 700px at 70% 92%, #FF8A0012, transparent 70%),
    var(--wall-paint); }
/* the LED strip leaves the desk and runs down the wall past every screen */
.feed, .feed-h { position: absolute; z-index: 1; background: var(--orange); box-shadow: 0 0 8px var(--orange), 0 0 22px color-mix(in srgb, var(--orange) 70%, transparent); }
.feed { left: 50%; top: -40px; width: 3px; height: 115px; }
.feed-h { top: 72px; height: 3px; right: calc(50% - 3px);
  left: calc(var(--pad) + max(0px, (100% - 2 * var(--pad) - 1240px) / 2) + var(--rail)); }

.screen-row { --c: var(--orange); position: relative; isolation: isolate; max-width: 1240px; margin: 0 auto; padding: 104px 0 104px 72px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.screen-row::before { content: ""; position: absolute; left: var(--rail); top: 0; bottom: 0; width: 3px; background: var(--c);
  box-shadow: 0 0 8px var(--c), 0 0 22px color-mix(in srgb, var(--c) 70%, transparent); transition: opacity .8s; }
.js .screen-row:not(.on)::before { opacity: .35; }
.screen-row.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.screen-row.flip .window { order: 2; }
.d-orange { --c: var(--orange); --glass: #FFE7C4; }
.d-cyan { --c: var(--cyan); --glass: #DDFBFF; }
.d-pink { --c: var(--pink); --glass: #FFDCE8; }
.d-green { --c: var(--green); --glass: #DDFFE6; }
.d-cream { --c: #FFB25A; --glass: #FFF6E8; }

/* each feature is a wall-mounted screen with a neon sign above it and its own bias light behind */
.window { position: relative; margin: 0; border: 12px solid var(--bezel); border-radius: 8px; background: #000;
  box-shadow: 0 0 0 1px #2A2730, 0 30px 60px #000c; }
.window::before { content: ""; position: absolute; inset: -14px; z-index: -1; border-radius: 18px; background: var(--c); filter: blur(34px); opacity: .28; }
.window img { display: block; width: 100%; height: auto; border-radius: 2px; }
.window::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 2px; background: linear-gradient(118deg, #ffffff10, transparent 38%); }
.window.tall { max-width: 460px; justify-self: center; }
.sign { position: absolute; z-index: 1; top: -58px; left: 4px; margin: 0; white-space: nowrap;
  font: 400 32px/1 "Tilt Neon", var(--zh-sign); color: var(--glass); --glow: var(--c); transition: opacity .6s; }
.caption { position: absolute; z-index: 1; top: -40px; right: 2px; font: 500 12px "Barlow Condensed", var(--zh-body); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); border: 1px solid #ffffff1f; padding: 2px 8px; border-radius: 2px; }

.copy { min-width: 0; }
h2 { margin: 0 0 18px; font: 700 clamp(36px, 4.2vw, 60px)/1 "Barlow Condensed", var(--zh-sign); color: var(--cream); letter-spacing: -.005em; text-wrap: balance; }
html:lang(zh) h2 { font-weight: 900; letter-spacing: .02em; line-height: 1.15; }
.copy p { margin: 0 0 16px; max-width: 34em; }
.copy ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.copy li { position: relative; padding-left: 26px; color: var(--ink); }
.copy li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 3px; border-radius: 2px; background: var(--c); }
.aside { color: var(--muted); font-size: 16px; }
.more { color: var(--glass); text-decoration-color: color-mix(in srgb, var(--c) 70%, transparent); text-underline-offset: 4px; font-weight: 500; }
.more:hover { text-decoration-thickness: 2px; }

/* four small screens, one per theme */
.looks { grid-template-columns: 1fr; gap: 72px; }
/* the heading itself is the neon sign here */
.sign-heading { font: 400 clamp(40px, 4.4vw, 60px)/1.05 "Tilt Neon", var(--zh-sign); letter-spacing: .01em; transition: opacity .6s; }
html:lang(zh) .sign-heading { font-weight: 900; letter-spacing: .06em; }
.panes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.panes li { position: relative; isolation: isolate; margin: 0; }
.panes li::before { content: ""; position: absolute; inset: -10px -10px 30px; z-index: -1; border-radius: 16px; background: var(--c); filter: blur(30px); opacity: .2; }
.panes img { display: block; width: 100%; height: auto; border: 10px solid var(--bezel); border-radius: 8px; box-shadow: 0 0 0 1px #2A2730, 0 18px 36px #000b; }
.panes span { display: block; margin-top: 10px; font: 500 16px "Barlow Condensed", var(--zh-body); letter-spacing: .1em; text-transform: uppercase; color: var(--cream); }

.privacy { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }
.sidekick { width: min(260px, 100%); justify-self: center; filter: drop-shadow(0 18px 24px #000a); }

/* back at the desk: the same room, the sign now says your games are waiting */
.closing { margin: 0 calc(var(--pad) * -1); }
/* Rocky stands a step further left at the end so the specs under the plaque stay clear of him */
.closing .stage { --rx: 22.5; }
.closing::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14%; z-index: 1; pointer-events: none;
  background: linear-gradient(var(--wall-paint), transparent); }
.closing-sign { margin: 0; text-align: center; font: 400 3.4cqw/1.12 "Tilt Neon", var(--zh-sign); letter-spacing: .02em; text-wrap: balance; }
html:lang(zh) .closing-sign { font-weight: 900; letter-spacing: .08em; }
.soon { position: absolute; z-index: 2; left: 50%; top: calc(var(--desk) * 1% + 5.2cqw); transform: translateX(-50%); margin: 0; white-space: nowrap;
  font: 500 max(14px, 1cqw) "Barlow Condensed", var(--zh-body); letter-spacing: .06em; color: #FFE7C4; text-shadow: 0 1px 3px #000, 0 0 12px #000; }
.specs { position: absolute; z-index: 2; left: 50%; top: calc(var(--desk) * 1% + 7.4cqw); transform: translateX(-50%); margin: 0;
  white-space: normal; width: 34cqw; text-align: center; line-height: 1.5;
  font: 500 max(13px, .9cqw) "Barlow Condensed", var(--zh-body); letter-spacing: .1em; text-transform: uppercase; color: var(--cream); text-shadow: 0 1px 3px #000, 0 0 12px #000; }

.foot { padding: 30px 16px 40px; text-align: center; color: var(--muted); font-size: 15px; background: var(--night); border-top: 1px solid #ffffff0d; }
.foot a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- motion: the sign ignites once, one tube keeps misbehaving, each screen's sign switches on as you reach it ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .room:not(.closing) .board .tube, .js .wsign b { opacity: .12; }
  .js.lit .room:not(.closing) .board .tube, .js.lit .wsign b { animation: ignite 1.1s steps(1, end) var(--d, 0s) forwards; }
  .js.lit .word { --d: .15s; } .js.lit .zh { --d: .55s; } .js.lit .tagline { --d: .85s; }
  .js.lit .w1 b { --d: 1s; } .js.lit .w2 b { --d: 1.15s; } .js.lit .w3 b { --d: 1.05s; }
  .js.lit .dead { animation: stutter 9s 3s infinite; }
  .js.lit .room:not(.closing) .rocky { animation: arrive .9s cubic-bezier(.16, 1, .3, 1) .4s both; }
  .js .screen-row:not(.on) .sign, .js .screen-row:not(.on) .sign-heading, .js .closing:not(.on) .closing-sign { opacity: .15; }
  .js .screen-row.on .sign, .js .screen-row.on .sign-heading, .js .closing.on .closing-sign { animation: ignite 1.1s steps(1, end) .15s both; }
}
@keyframes ignite {
  0% { opacity: .12; } 8% { opacity: 1; } 12% { opacity: .2; } 22% { opacity: .9; } 26% { opacity: .35; } 40%, 100% { opacity: 1; }
}
@keyframes stutter {
  0%, 90%, 100% { color: var(--dead); text-shadow: none; }
  91%, 93.5% { color: #FFE7C4; text-shadow: 0 0 .03em #fff9, 0 0 .1em var(--orange), 0 0 .28em var(--orange); }
  92.5%, 94.5% { color: var(--dead); text-shadow: none; }
}
@keyframes arrive { from { opacity: 0; transform: translateX(-50%) translateY(6%); } to { opacity: 1; transform: translateX(-50%); } }

.og .topnav, .og .langs, .og .wsign { display: none; }
/* ?capture=1: full-page captures in a tall window keep a normal 900px first and last screen */
.capture .room { height: 900px; }
.capture .stage { width: max(100%, 1599px); }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .w2 { display: none; }
}
@media (max-width: 860px) {
  .screen-row, .screen-row.flip, .privacy { grid-template-columns: 1fr; padding: 88px 0 84px 52px; }
  .screen-row.flip .window { order: 0; }
  .wall { --rail: 12px; }
  .panes { gap: 28px 18px; }
  .sidekick { width: 180px; justify-self: start; }
}
/* portrait phones: the tall room, the sign high on the wall, nav as a strip at the top */
@media (max-aspect-ratio: 3/4) and (max-width: 900px) {
  .room::before { background-image: url(img/room-phone.jpg); }
  /* room-phone.jpg (941x1672): empty wall 90..870 x 242..610 (sign box uses 201..502), monitor 355..585 x 836..956, desk front ~1000 */
  .stage { --bx: 9.6; --by: 12; --bw: 80.8; --bh: 18; --mx: 37.7; --my: 50; --mw: 24.5; --mh: 7.2; --desk: 61.4; --rx: 26; --feet: 87;
    width: max(min(100vw, 75svh), calc(max(100svh, 560px) * .5628)); aspect-ratio: 941 / 1672; }
  .lockup { gap: 3cqw; }
  .word { font-size: 19cqw; }
  .zh { font-size: 4.6cqw; }
  .tagline { font-size: 4.1cqw; margin-top: 2.2cqw; }
  .wsign { display: none; }
  .wsign.w1 { display: block; left: 50%; top: 30.5%; transform: translateX(-50%); white-space: nowrap; text-align: center; padding: 1.4cqw 2.6cqw 1.5cqw; }
  .wsign.w1 b { font-size: 4.2cqw; }
  .wsign.w1 small { font-size: 11px; margin-top: 1cqw; }
  .rocky { height: 28cqw; }
  .soon { top: calc(var(--desk) * 1% + 14cqw); font-size: 14px; }
  .stage .plaque { font-size: 22px; padding: 13px 26px; }
  .topnav { top: 12px; left: 12px; }
  .topnav a { font-size: 13px; letter-spacing: .04em; padding: 6px 8px; }
  .topnav a[href="privacy.html"] { display: none; }
  .langs { top: 58px; right: 12px; left: auto; }
  .closing-sign { font-size: 7.6cqw; max-width: calc(100vw - 40px); }
  .specs span { display: block; }
  .specs .sep { display: none; }
  .specs { white-space: normal; width: min(84cqw, calc(100vw - 32px)); text-align: center; line-height: 1.6; top: calc(var(--feet) * 1% + 3cqw); font-size: 13px; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .screen-row, .screen-row.flip, .privacy { padding-left: 42px; }
  .wall { --rail: 10px; }
  .sign { font-size: 26px; top: -50px; }
  .panes { gap: 14px; }
}
.specs span { white-space: nowrap; }
.specs .langlist { display: block; }
.specs .sep { font-style: normal; }
