/* The Popup Games — "Pop Arcade" */
:root {
  --ink: #14121f;
  --ink-2: #4b4860;
  --paper: #f7f2e8;
  --white: #ffffff;
  --coral: #ff5a36;
  --sun: #ffd23f;
  --lime: #b6f35c;
  --violet: #7c5cff;
  --lilac: #d9ceff;
  --sky: #8fdcff;
  --r: 18px;
  --bw: 2.5px;
  --head: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.05; margin: 0 0 .45em; letter-spacing: -.02em; }
.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--white); padding: 8px 14px; border: 2px solid var(--ink); border-radius: 10px; }
::selection { background: var(--sun); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--bw) solid var(--ink);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { white-space: nowrap; display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.logo-img { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--coral); transition: transform .25s cubic-bezier(.2, .9, .3, 1.6); }
.logo:hover .logo-img { transform: rotate(-8deg) scale(1.06); }
.logo small { display: block; font-family: var(--body); font-size: .62rem; font-weight: 800; letter-spacing: .2em; color: var(--ink-2); text-transform: uppercase; }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; font-weight: 800; padding: 8px 16px; border-radius: 999px; border: 2px solid transparent; transition: border-color .15s, background .15s; }
.nav a:hover { border-color: var(--ink); }
.nav a[aria-current="page"] { background: var(--sun); border-color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  --c: var(--coral); --t: var(--white); --s: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--head); font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
  padding: 14px 22px; border-radius: 14px; border: var(--bw) solid var(--ink); cursor: pointer;
  background: var(--c); color: var(--t); text-decoration: none;
  box-shadow: 4px 4px 0 var(--s);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--s); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--s); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.play { font-size: 1.08rem; padding: 16px 26px; }
.btn.dark { --c: var(--ink); --s: var(--coral); }
.btn.ghost { --c: var(--white); --t: var(--ink); }
.btn[aria-disabled="true"] { --c: #ece6d9; --t: #7a7690; --s: #d3ccbc; border-color: #d3ccbc; pointer-events: none; }
.btn small { display: block; font-family: var(--body); font-size: .68rem; font-weight: 700; opacity: .8; line-height: 1; letter-spacing: .02em; }
.btn .two { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; gap: 2px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  background: var(--white); border: 2px solid var(--ink); padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

/* dotted texture */
.dots { position: relative; }
.dots::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(20, 18, 31, .13) 1.4px, transparent 1.7px); background-size: 18px 18px; pointer-events: none; }

/* ---------- home hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: var(--bw) solid var(--ink); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; padding: 84px 0 96px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; }
.hero h1 .pop {
  display: inline-block; background: var(--sun); border: var(--bw) solid var(--ink); border-radius: 18px;
  padding: 0 .16em .04em; box-shadow: 5px 5px 0 var(--ink); animation: wobble 3.4s ease-in-out infinite;
}
.hero .lead { font-size: 1.18rem; font-weight: 600; color: var(--ink-2); max-width: 38ch; margin: 0 0 32px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.stats { list-style: none; display: flex; gap: 34px; padding: 0; margin: 44px 0 0; flex-wrap: wrap; }
.stats li { font-weight: 700; color: var(--ink-2); font-size: .88rem; }
.stats b { display: block; font-family: var(--head); font-weight: 800; font-size: 2.1rem; line-height: 1.1; color: var(--ink); }

.shape { position: absolute; z-index: 0; pointer-events: none; }
.shape.star { width: 48px; aspect-ratio: 1; background: var(--coral); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: spin 12s linear infinite; }
.shape.ring { width: 84px; aspect-ratio: 1; border-radius: 50%; background: var(--lime); border: var(--bw) solid var(--ink); -webkit-mask: radial-gradient(circle, transparent 0 34%, #000 35%); mask: radial-gradient(circle, transparent 0 34%, #000 35%); }
.shape.pill { width: 96px; height: 30px; border-radius: 99px; background: var(--sky); border: var(--bw) solid var(--ink); rotate: -24deg; }
.hero .s1 { top: 9%; left: 47%; }
.hero .s2 { bottom: 5%; left: 51%; }
.hero .s3 { top: 12%; right: 3%; }

/* sticker board of game icons */
.board-wrap { position: relative; max-width: 470px; width: 100%; margin-left: auto; }
.board {
  position: relative; background: var(--violet); border: var(--bw) solid var(--ink); border-radius: 30px;
  box-shadow: 10px 10px 0 var(--ink); padding: 30px; rotate: 2deg;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.board::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: radial-gradient(rgba(255, 255, 255, .25) 1.5px, transparent 1.8px); background-size: 16px 16px; }
.sticker {
  position: relative; aspect-ratio: 1; border-radius: 26%; background: var(--white); padding: 5px;
  border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  rotate: var(--r, 0deg); animation: float 5s ease-in-out infinite; animation-delay: var(--d, 0s);
  transition: rotate .25s cubic-bezier(.2, .9, .3, 1.6), scale .25s cubic-bezier(.2, .9, .3, 1.6);
}
.sticker img { width: 100%; height: 100%; border-radius: 21%; object-fit: cover; }
.sticker:hover { rotate: 0deg; scale: 1.14; z-index: 2; }
.badge {
  position: absolute; z-index: 3; top: -44px; right: -34px; width: 124px; height: 124px; border-radius: 50%;
  background: var(--sun); border: var(--bw) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  display: grid; place-items: center; text-decoration: none; transition: scale .2s;
}
.badge:hover { scale: 1.08; }
.badge svg.ring-text { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.badge text { font-family: var(--head); font-size: 9px; font-weight: 700; fill: var(--ink); }
.badge .go { width: 46px; height: 46px; border-radius: 50%; background: var(--coral); border: 2px solid var(--ink); display: grid; place-items: center; color: var(--white); }
.badge .go svg { width: 22px; height: 22px; margin-left: 3px; }

/* marquee */
.marquee { background: var(--ink); color: var(--paper); border-bottom: var(--bw) solid var(--ink); overflow: hidden; padding: 20px 0; }
.marquee .track { display: flex; width: max-content; animation: marq 45s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee a { display: inline-flex; align-items: center; gap: 14px; font-family: var(--head); font-weight: 700; font-size: 1.45rem; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; text-decoration: none; padding: 0 20px; transition: color .15s; }
.marquee a:hover { color: var(--accent, var(--sun)); }
.marquee a:hover img { border-color: var(--accent, var(--sun)); }
.marquee a img { width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--paper); flex: none; transition: rotate .2s; }
.marquee a:nth-of-type(odd) img { rotate: -6deg; }
.marquee a:nth-of-type(even) img { rotate: 6deg; }
.marquee a:hover img { rotate: 0deg; }
.marquee i { font-style: normal; color: var(--sun); font-size: 1.2rem; align-self: center; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin: 0; }

/* game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 32px; }
.card {
  position: relative; background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r);
  --accent: var(--sun);
  box-shadow: 6px 6px 0 var(--accent); overflow: hidden; display: flex; flex-direction: column;
  transition: opacity .6s, transform .18s, box-shadow .18s;
}
.card:hover { transform: translate(-4px, -4px) rotate(-.6deg); box-shadow: 10px 10px 0 var(--accent); }
.card .shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--accent); border-bottom: var(--bw) solid var(--ink); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .shot img { transform: scale(1.06); }
.card .shot.phones img.ph {
  position: absolute; width: 27%; height: auto; top: 13%; object-fit: initial;
  border: var(--bw) solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); background: var(--white);
  transition: rotate .3s cubic-bezier(.2, .9, .3, 1.5), translate .3s cubic-bezier(.2, .9, .3, 1.5);
}
.card .shot.phones img.mid { left: 36.5%; top: 10%; z-index: 1; }
.card .shot.phones img.l { left: 9%; top: 22%; rotate: -9deg; }
.card .shot.phones img.r { right: 9%; top: 22%; rotate: 9deg; }
.card:hover .shot.phones img.ph { transform: none; }
.card:hover .shot.phones img.mid { translate: 0 -6px; }
.card:hover .shot.phones img.l { rotate: -14deg; translate: -8px -2px; }
.card:hover .shot.phones img.r { rotate: 14deg; translate: 8px -2px; }
.card .tag { z-index: 2; }
.games.four { grid-template-columns: repeat(4, 1fr); gap: 26px; }
.games.four .card .shot { aspect-ratio: 4 / 3; }
@media (max-width: 1100px) { .games.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .games.four { grid-template-columns: 1fr; } }
.card .tag { position: absolute; top: 14px; left: 14px; background: var(--white); border: 2px solid var(--ink); font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; }
.card .tag.web { left: auto; right: 14px; background: var(--lime); }
.card .body { padding: 18px 22px 22px; display: grid; grid-template-columns: 64px 1fr; gap: 6px 16px; align-items: center; flex: 1; }
.card .icon { width: 64px; height: 64px; border-radius: 16px; border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); margin-top: -44px; background: var(--white); position: relative; }
.card h3 { font-size: 1.12rem; margin: 0; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card p { grid-column: 1 / -1; margin: 6px 0 14px; color: var(--ink-2); font-weight: 600; font-size: .97rem; }
.card .links { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 2; align-self: end; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-weight: 800; font-size: .84rem; text-decoration: none; background: var(--white); border: 2px solid var(--ink); transition: background .15s, transform .15s; }
.chip:hover { background: var(--sun); transform: translateY(-2px); }
.chip.play { background: var(--coral); color: var(--white); }
.chip.play:hover { background: #ff7655; }
.chip svg { width: 15px; height: 15px; }
.chip.soon { border-style: dashed; color: var(--ink-2); opacity: .7; pointer-events: none; }

/* about band */
.band { background: var(--ink); color: var(--paper); }
.band h2 { color: var(--paper); }
.band .eyebrow { background: transparent; color: var(--paper); border-color: var(--paper); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feat { --c: var(--sun); background: var(--c); color: var(--ink); border: var(--bw) solid var(--paper); border-radius: var(--r); padding: 28px; box-shadow: 7px 7px 0 var(--coral); rotate: -1deg; transition: rotate .2s, opacity .6s, transform .6s; }
.feat:nth-child(2) { --c: var(--lime); rotate: 1deg; box-shadow: 7px 7px 0 var(--violet); }
.feat:nth-child(3) { --c: var(--lilac); rotate: -.5deg; box-shadow: 7px 7px 0 var(--sky); }
.feat:hover { rotate: 0deg; }
.feat .num { font-family: var(--head); font-weight: 800; font-size: 2.6rem; line-height: 1; display: block; }
.feat b { font-family: var(--head); font-weight: 700; font-size: 1.15rem; display: block; margin: 16px 0 8px; }
.feat p { margin: 0; font-weight: 600; color: #2c2940; }

/* ---------- inner page heroes ---------- */
.page-hero { --c: var(--sun); background: var(--c); border-bottom: var(--bw) solid var(--ink); padding: 60px 0 72px; position: relative; overflow: hidden; }
.page-hero.c1 { --c: var(--lime); }
.page-hero.c2 { --c: var(--lilac); }
.page-hero.c3 { --c: var(--sky); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.page-hero .lead { font-size: 1.15rem; font-weight: 600; color: #2c2940; max-width: 46ch; margin: 14px 0 0; }
.page-hero .shape.star { top: 18%; right: 6%; }

/* game page */
.game-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.game-hero .title { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; }
.game-hero .title img { width: 96px; height: 96px; border-radius: 24px; border: var(--bw) solid var(--ink); box-shadow: 5px 5px 0 var(--ink); background: var(--white); flex: none; }
.game-hero .genre { font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #2c2940; display: block; margin-top: 8px; }
.game-hero .cta { margin-top: 26px; }
.game-hero .cover { max-height: 540px; width: auto; max-width: 100%; justify-self: center; border-radius: var(--r); border: var(--bw) solid var(--ink); box-shadow: 10px 10px 0 var(--ink); rotate: 2deg; background: var(--white); }
.shots { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 12px 26px 4px; }
.shots img { height: 460px; width: auto; border-radius: 16px; border: var(--bw) solid var(--ink); box-shadow: 6px 6px 0 var(--ink); scroll-snap-align: start; flex: none; }
.shots.landscape img { height: 300px; }
.prose { max-width: 72ch; font-size: 1.06rem; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.05rem; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--coral); font-weight: 800; }
.prose a { color: var(--ink); text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 700; }
.prose a:hover { background: var(--sun); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.panel { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); padding: 26px; position: sticky; top: 100px; }
.panel h3 { font-size: 1.1rem; }
.panel dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.panel dt { font-weight: 800; color: var(--ink-2); }
.panel dd { margin: 0; font-weight: 700; }
.ad-slot { min-height: 100px; margin: 30px 0; display: grid; place-items: center; color: #9a95ad; font-size: .8rem; border: 2px dashed #d3ccbc; border-radius: 16px; }

/* privacy policy */
.policy { display: grid; grid-template-columns: 270px 1fr; gap: 64px; align-items: start; }
.toc { position: sticky; top: 100px; background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); padding: 20px 14px; }
.toc b { display: block; font-family: var(--head); font-size: .85rem; padding: 0 10px 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc a { display: flex; gap: 10px; padding: 6px 10px; border-radius: 9px; text-decoration: none; font-weight: 700; font-size: .88rem; line-height: 1.35; }
.toc a::before { counter-increment: t; content: counter(t, decimal-leading-zero); font-family: var(--head); font-size: .7rem; color: var(--coral); padding-top: 2px; }
.toc a:hover { background: var(--sun); }
.policy .prose > p:first-child { font-size: 1.15rem; font-weight: 600; }
.policy .prose h2 { scroll-margin-top: 100px; }
.pp-sec { border-top: 2px dashed rgba(20, 18, 31, .18); margin-top: 34px; padding-top: 4px; }
.pp-sec > h2:first-child { margin-top: .9em; }
.policy .prose > p:last-child { margin-top: 44px; display: inline-block; background: var(--sun); border: var(--bw) solid var(--ink); box-shadow: 5px 5px 0 var(--ink); border-radius: 14px; padding: 12px 20px; rotate: -1.5deg; }

/* footer */
.site-foot { background: var(--ink); color: #bdb8d1; padding: 70px 0 30px; }
.foot-big { display: inline-block; font-family: var(--head); font-weight: 800; font-size: clamp(2.6rem, 8vw, 6rem); line-height: .95; letter-spacing: -.04em; color: var(--paper); text-decoration: none; }
.foot-big span { color: var(--sun); display: inline-block; transition: rotate .2s; }
.foot-big:hover span { rotate: -6deg; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; align-items: end; }
.site-foot .foot-big-row { width: 100%; margin-bottom: 24px; }
.site-foot .logo-img { border-color: var(--paper); }
.site-foot .logo { color: var(--paper); }
.site-foot a { color: var(--paper); text-decoration: none; font-weight: 700; }
.site-foot nav a:hover { color: var(--sun); }
.site-foot nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-foot .fine { width: 100%; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 18px; margin: 10px 0 0; font-size: .88rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s, transform .6s cubic-bezier(.2, .9, .3, 1.2); }
.reveal.in { opacity: 1; transform: none; }
.card.reveal.in { transition: opacity .6s, transform .18s, box-shadow .18s; }
.card.reveal.in:hover { transform: translate(-4px, -4px) rotate(-.6deg); }

@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(2deg) scale(1.04); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marq { to { transform: translateX(-50%); } }

@media (max-width: 860px) {
  .hero .wrap, .game-hero .wrap, .two-col, .policy { grid-template-columns: 1fr; }
  .hero .wrap { padding: 44px 0 70px; gap: 56px; }
  .board-wrap { max-width: 330px; margin: 0 auto; }
  .board { padding: 20px; gap: 14px; border-radius: 24px; box-shadow: 7px 7px 0 var(--ink); }
  .badge { width: 96px; height: 96px; top: -34px; right: -16px; }
  .badge .go { width: 38px; height: 38px; }
  .stats { gap: 24px; margin-top: 34px; }
  .stats b { font-size: 1.7rem; }
  .hero .s1 { top: 3%; left: auto; right: 6%; width: 34px; }
  .hero .s2, .hero .s3 { display: none; }
  .grid3 { grid-template-columns: 1fr; gap: 22px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: .88rem; }
  .logo { font-size: .86rem; gap: 9px; }
  .logo-img { width: 38px; height: 38px; border-radius: 10px; }
  .logo small { display: none; }
  .panel { position: static; }
  .toc { display: none; }
  .shots img { height: 380px; }
  .shots.landscape img { height: 200px; }
  .marquee a { font-size: 1.1rem; gap: 10px; }
  .marquee a img { width: 36px; height: 36px; border-radius: 10px; }
  section { padding: 64px 0; }
  .page-hero { padding: 44px 0 54px; }
}
@media (max-width: 560px) {
  .site-head .logo span { display: none; }
  .nav a { padding: 6px 12px; font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
