/* PawClawStudios website. Tokens first; one bold moment (the curtain-call hero with the real game characters), everything else quiet. */
@font-face { font-family: "Bagel Fat One"; src: url("/assets/fonts/bagel-fat-one.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Lexend"; src: url("/assets/fonts/lexend.woff") format("woff"); font-weight: 100 900; font-display: swap; }

:root {
	--night: #1d2145;
	--night-2: #131637;
	--night-3: #2a2f63;
	--cream: #fff4e2;
	--paper: #fffaf1;
	--claw: #ff7a45;
	--claw-deep: #b8400f;       /* orange for text on cream (contrast) */
	--ink: #1d2145;
	--ink-soft: #4b5080;
	--line: #eadcc4;
	--pop: #38b6ff;
	--paw: #13c4b5;
	--pets: #5cc8f5;
	--funky: #8e4bd6;
	--bubble: #ff8fd2;
	--display: "Bagel Fat One", "Lexend", system-ui, sans-serif;
	--body: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 70rem;
	--cut: clamp(1.6rem, 4vw, 3.2rem);
	--radius: 1.1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--claw-deep); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--claw); outline-offset: 3px; border-radius: .3rem; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--cream); color: var(--ink); padding: .6rem 1rem; border-radius: .5rem; z-index: 100; }
.skip:focus { left: .5rem; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .6em; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: 1.2rem; line-height: 1.6; max-width: 56ch; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.5rem; border-radius: 999px; border: 3px solid var(--night); background: var(--claw); color: var(--night); font: 700 1.05rem/1 var(--body); text-decoration: none; box-shadow: 0 5px 0 var(--night); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:hover { color: var(--night); transform: translateY(-2px); box-shadow: 0 7px 0 var(--night); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--night); }
.btn.alt { background: var(--cream); }
.btn.ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: 0 5px 0 rgba(255, 244, 226, .35); }
.btn.ghost:hover { color: var(--cream); box-shadow: 0 7px 0 rgba(255, 244, 226, .35); }
.btn.small { padding: .6rem 1.1rem; font-size: .95rem; box-shadow: 0 4px 0 var(--night); }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ---------- header ---------- */
.site-head { background: var(--night); color: var(--cream); position: relative; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .9rem; }
.brand img { height: 3rem; width: auto; }
.nav { display: flex; align-items: center; gap: .4rem; }
.nav a { color: var(--cream); text-decoration: none; font-weight: 500; padding: .55rem .9rem; border-radius: 999px; }
.nav a:hover { background: var(--night-3); color: #fff; }
.nav a[aria-current="page"] { background: var(--night-3); }
.nav .btn { margin-left: .6rem; color: var(--night); padding: .6rem 1.2rem; box-shadow: 0 4px 0 #0c0e26; border-color: #0c0e26; }
.nav .btn:hover { background: #ff9366; }
.menu { display: none; }
@media (max-width: 52rem) {
	.menu { display: block; }
	.menu summary { list-style: none; cursor: pointer; padding: .55rem 1rem; border: 2px solid var(--cream); border-radius: 999px; font-weight: 600; }
	.menu summary::-webkit-details-marker { display: none; }
	.menu[open] summary { background: var(--night-3); }
	.nav.full { display: none; }
	.menu .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--night); padding: .5rem 1.25rem 1.25rem; border-top: 1px solid var(--night-3); }
	.menu .nav a { padding: .85rem 1rem; }
	.menu .nav .btn { margin: .6rem 0 0; justify-content: center; }
}


/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; position: relative; }
.section.night { background: var(--night); color: var(--cream); }
.section.paper { background: var(--paper); }
.cut-top::before { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--cut) * -1 + 1px); height: var(--cut); background: inherit; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.cut-top.flip::before { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.section-head { max-width: 40rem; margin-bottom: 2.2rem; }

/* playable games: big rows, not equal cards */
.play-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-bottom: clamp(3rem, 6vw, 5rem); }
.play-row:last-child { margin-bottom: 0; }
.play-row.rev .media { order: 2; }
.media { position: relative; border-radius: var(--radius); overflow: hidden; border: 4px solid var(--night); box-shadow: .7rem .7rem 0 var(--accent, var(--claw)); aspect-ratio: 16 / 9; background: var(--night); }
.media video, .media img { width: 100%; height: 100%; object-fit: cover; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.tags li { background: var(--night); color: var(--cream); padding: .25rem .8rem; border-radius: 999px; font-size: .9rem; }
@media (max-width: 52rem) { .play-row { grid-template-columns: 1fr; } .play-row.rev .media { order: 0; } }

/* coming soon: compact art strips */
.soon-list { display: grid; gap: 1.2rem; }
.soon-item { display: grid; grid-template-columns: minmax(10rem, 17rem) 1fr; gap: 1.6rem; align-items: center; background: var(--night-3); border-radius: var(--radius); overflow: hidden; color: var(--cream); }
.soon-item img { width: 100%; height: 100%; object-fit: cover; min-height: 8.5rem; }
.soon-item > div { padding: 1.2rem 1.4rem 1.2rem 0; }
.soon-item h3 { margin-bottom: .3em; }
.soon-item p { color: #dcd8ee; margin-bottom: .6rem; }
.pill { display: inline-block; border: 2px solid currentColor; border-radius: 999px; padding: .1rem .8rem; font-size: .9rem; font-weight: 600; }
@media (max-width: 40rem) { .soon-item { grid-template-columns: 1fr; } .soon-item > div { padding: 0 1.2rem 1.3rem; } .soon-item img { min-height: 0; aspect-ratio: 2 / 1; } }

/* plain fact list (parents) */
.facts { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; margin: 0; border-top: 2px solid currentColor; }
.facts dt, .facts dd { padding: .9rem 0; margin: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.facts dt { font-weight: 700; padding-right: 1rem; }
@media (max-width: 40rem) { .facts { grid-template-columns: 1fr; } .facts dt { border-bottom: 0; padding-bottom: 0; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 52rem) { .two-col { grid-template-columns: 1fr; } }

/* ---------- game page ---------- */
.game-hero { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 75%, var(--night)) 0%, var(--night) 100%); color: var(--cream); padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.game-hero .wrap { display: grid; grid-template-columns: 1fr minmax(14rem, 26rem); gap: 2.5rem; align-items: center; }
.game-hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); }
.game-hero .art { border-radius: var(--radius); border: 4px solid var(--night); box-shadow: .6rem .6rem 0 rgba(19, 22, 55, .55); overflow: hidden; transform: rotate(2deg); }
@media (max-width: 52rem) { .game-hero .wrap { grid-template-columns: 1fr; } .game-hero .art { transform: none; max-width: 26rem; } }
.player { margin-top: -2.4rem; position: relative; z-index: 3; }
.frame { position: relative; aspect-ratio: 16 / 9; background: var(--night); border: 5px solid var(--night); border-radius: var(--radius); box-shadow: .8rem .8rem 0 var(--accent); overflow: hidden; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.frame .poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: var(--night) center / cover no-repeat; display: grid; place-items: center; }
.frame .poster::before { content: ""; position: absolute; inset: 0; background: rgba(19, 22, 55, .35); transition: background .2s; }
.frame .poster:hover::before { background: rgba(19, 22, 55, .15); }
.frame .poster .btn { position: relative; font-size: clamp(1.1rem, 2.6vw, 1.7rem); padding: 1rem 2.4rem; pointer-events: none; }
.player-bar { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; margin-top: 1.8rem; }
.player-bar p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.controls { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.controls th, .controls td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.controls th { font-weight: 600; width: 36%; }
kbd { display: inline-block; font: 600 .85rem/1 var(--body); background: #fff; border: 2px solid var(--night); border-bottom-width: 4px; border-radius: .5rem; padding: .3rem .55rem; margin: 0 .15rem .15rem 0; min-width: 1.8rem; text-align: center; }
.gallery { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .4rem .2rem 1.2rem; margin: 0 -.2rem; }
.gallery button { flex: 0 0 min(78%, 28rem); scroll-snap-align: start; padding: 0; border: 3px solid var(--night); border-radius: var(--radius); overflow: hidden; background: var(--night); cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 78rem); }
dialog.lightbox::backdrop { background: rgba(19, 22, 55, .9); }
dialog.lightbox img { border-radius: var(--radius); width: 100%; }
dialog.lightbox form { text-align: right; margin-bottom: .6rem; }
.more-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.more-games a { display: grid; gap: .5rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.more-games img { border-radius: var(--radius); border: 3px solid var(--night); aspect-ratio: 2 / 1; object-fit: cover; }

/* ---------- prose pages ---------- */
.page-title { background: var(--night); color: var(--cream); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 4.5rem); position: relative; }
.page-title h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.page-title p { margin: .8rem 0 0; color: #dcd8ee; }
.prose { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.prose .wrap { max-width: 46rem; }
.prose h2 { font-size: 1.8rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6rem; }
.prose li { margin-bottom: .4rem; max-width: 62ch; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0 1.6rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; border-bottom: 2px solid var(--night); }
.note { background: var(--paper); border: 2px solid var(--night); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.6rem 0; }
.note p:last-child { margin-bottom: 0; }

/* contact */
.contact-box { display: grid; gap: 1rem; }
.contact-box label { font-weight: 600; display: grid; gap: .35rem; }
.contact-box input, .contact-box textarea { font: inherit; padding: .8rem 1rem; border-radius: .8rem; border: 3px solid var(--night); background: #fff; color: var(--ink); width: 100%; }
.contact-box textarea { min-height: 9rem; resize: vertical; }
.mail-line { font-family: var(--display); font-size: clamp(1.4rem, 4vw, 2.2rem); word-break: break-all; }

/* ---------- mascot + footer ---------- */
.mascot { width: clamp(9rem, 20vw, 14rem); margin-inline: auto; margin-bottom: -2px; }
.mascot .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.mascot .ear-l { transform-box: fill-box; transform-origin: 100% 100%; animation: ear 7s infinite; }
@keyframes blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.08); } }
@keyframes ear { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(-9deg); } 96% { transform: rotate(3deg); } }
.about-cat { background: var(--night); position: relative; }
.site-foot { background: var(--night); color: #dcd8ee; padding: 3.2rem 0 2.2rem; font-size: .95rem; }
.site-foot a { color: var(--cream); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.foot-grid h2 { font: 700 1rem/1.3 var(--body); margin: 0 0 .7rem; color: var(--cream); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot-grid img { height: 3.4rem; width: auto; margin-bottom: .8rem; }
.foot-note { border-top: 1px solid var(--night-3); margin-top: 2rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
@media (max-width: 52rem) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.mascot .eye { animation: none !important; }
}

.play-row h3 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.night a:not(.btn), .page-title a, .soon-item a { color: #ffb08f; }
.night a:not(.btn):hover, .soon-item a:hover { color: #fff; }

.frame:fullscreen { aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.frame:-webkit-full-screen { aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }

/* portrait games: a tall 9:16 frame beside the instructions */
.play-row.portrait { grid-template-columns: minmax(11rem, 17rem) 1fr; }
.play-row.portrait .media.portrait { aspect-ratio: 9 / 16; width: 100%; max-width: 17rem; margin-inline: auto; }
.play-row.portrait.rev .media { order: 0; }
.play-row.portrait.rev { grid-template-columns: 1fr minmax(11rem, 17rem); }
.play-row.portrait.rev .media { order: 2; }
@media (max-width: 52rem) { .play-row.portrait, .play-row.portrait.rev { grid-template-columns: 1fr; } .play-row.portrait .media.portrait { max-width: 15rem; } .play-row.portrait.rev .media { order: 0; } }
.player-grid { display: grid; grid-template-columns: minmax(16rem, 26rem) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.frame.portrait { aspect-ratio: 9 / 16; width: 100%; max-height: 82vh; justify-self: center; }
.player-side .steps { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.player-side .steps li { margin-bottom: .35rem; }
.gallery.portrait button { flex: 0 0 min(46%, 13rem); }
.gallery.portrait img { aspect-ratio: 9 / 16; }
@media (max-width: 52rem) { .player-grid { grid-template-columns: 1fr; } .frame.portrait { max-width: 24rem; margin-inline: auto; } }

/* ---- SEO pages: breadcrumbs, topic cards, FAQ, language switch ---- */
.crumbs { margin: 0 0 1rem; font-size: .92rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin: 0; padding: 0; color: #dcd8ee; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .6; }
.crumbs a { color: #ffb08f; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.4rem; }
.pick { display: grid; gap: .9rem; align-content: start; background: #fff; border: 3px solid var(--night); border-radius: var(--radius); padding: 1rem; box-shadow: 0 6px 0 var(--accent, var(--night)); }
.pick-art img { width: 100%; border-radius: calc(var(--radius) - 6px); border: 2px solid var(--night); aspect-ratio: 2 / 1; object-fit: cover; }
.pick h3 { margin: 0 0 .3rem; font-size: 1.5rem; }
.pick h3 a { text-decoration: none; color: var(--ink); }
.pick p { margin: 0 0 .7rem; }
.link-cloud { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.link-cloud a { display: inline-block; padding: .45rem .95rem; border: 2px solid var(--night); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; color: var(--ink); }
.link-cloud a:hover { background: var(--night); color: var(--cream); }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.6rem; margin-bottom: 1.4rem; }
.explore-grid h3 { margin: 0 0 .6rem; font-size: 1.15rem; }
.topic-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.topic-list a { display: grid; gap: .3rem; padding: 1.1rem 1.2rem; background: #fff; border: 3px solid var(--night); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.topic-list a:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--night); }
.topic-list b { font-size: 1.15rem; }
.topic-list span { font-size: .95rem; color: var(--ink-soft); }
.faq { max-width: 50rem; }
.faq details { background: #fff; border: 2px solid var(--night); border-radius: .9rem; margin-bottom: .7rem; padding: .2rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: .8rem 0; }
.faq details[open] summary { border-bottom: 1px solid var(--paper); margin-bottom: .6rem; }
.faq details p { margin: 0 0 .9rem; }
.updated, .note-en { font-size: .9rem; color: var(--ink-soft); }
.lang-switch { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; border-top: 1px solid var(--night-3); margin-top: 2rem; padding-top: 1.2rem; font-size: .95rem; }
.lang-switch span { font-weight: 700; color: var(--cream); }
.lang-switch a[aria-current] { font-weight: 700; text-decoration: none; }
.foot-grid.cols4 { grid-template-columns: 1.3fr repeat(4, 1fr); }
@media (max-width: 52rem) { .foot-grid.cols4 { grid-template-columns: 1fr 1fr; } }

/* ================= home hero: the curtain call (real characters from all four games) ================= */
.stage-hero { position: relative; overflow: hidden; isolation: isolate; color: var(--cream); text-align: center; padding: clamp(1.8rem, 4vw, 3.4rem) 0 0;
	background: radial-gradient(ellipse 48% 42% at 50% 84%, rgba(255, 150, 90, .5), transparent 70%), radial-gradient(ellipse 40% 50% at 8% 90%, rgba(255, 95, 162, .28), transparent 70%),
		radial-gradient(ellipse 40% 50% at 92% 88%, rgba(56, 182, 255, .3), transparent 70%), linear-gradient(180deg, var(--night) 0%, #2b1f70 50%, #4628a0 100%); }
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rays { position: absolute; left: 50%; bottom: 0; width: 140vmax; height: 140vmax; translate: -50% 50%; background: repeating-conic-gradient(rgba(255, 255, 255, .06) 0deg 6deg, transparent 6deg 18deg);
	-webkit-mask: radial-gradient(closest-side, #000 18%, transparent 72%); mask: radial-gradient(closest-side, #000 18%, transparent 72%); }
.beam { position: absolute; top: -12%; width: min(30vw, 26rem); height: 118%; transform-origin: 50% 0; background: linear-gradient(180deg, rgba(255, 238, 205, .2), rgba(255, 238, 205, 0) 78%); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); }
.b1 { left: 4%; rotate: -26deg; } .b2 { right: 4%; rotate: 26deg; }
.spark { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: #ffe27a; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: twinkle 3.6s ease-in-out var(--d) infinite; }
@keyframes twinkle { 0%, 100% { opacity: .2; scale: .55; } 50% { opacity: 1; scale: 1.15; } }
.hero-copy { position: relative; z-index: 3; }
.hero-copy h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1.02; max-width: 12.5em; margin: 0 auto .32em; text-shadow: 0 .07em 0 rgba(13, 10, 40, .5); }
.hero-copy .lead { margin: 0 auto 1.5rem; max-width: 58ch; color: #ece7fb; font-size: clamp(1.02rem, 1.4vw, 1.2rem); }
.hero-copy .row { justify-content: center; }
.btn.big { font-size: 1.1rem; padding: .95rem 1.7rem; }

.cast { position: relative; z-index: 1; height: clamp(14rem, min(30vw, 44vh), 25rem); max-width: 86rem; margin: clamp(.6rem, 2vw, 1.6rem) auto 0; }
.floor { position: absolute; left: 50%; bottom: -16%; width: min(118%, 100rem); height: 44%; translate: -50% 0; border-radius: 50%;
	background: radial-gradient(closest-side, #8a63ff 0%, #6a43e0 52%, #4a2bb0 100%); box-shadow: inset 0 .55rem 0 rgba(255, 255, 255, .2), 0 -1.4rem 4rem rgba(255, 150, 90, .28); }
.cast-row { position: absolute; left: 0; right: 0; display: flex; justify-content: center; align-items: flex-end; }
.cast-row.back { bottom: 40%; height: 50%; gap: clamp(.5rem, 5.5vw, 6.5rem); }
.cast-row.front { bottom: 2%; height: 76%; }
.cast-row .c { flex: none; height: calc(100% * var(--f, 1)); width: auto; margin-inline: clamp(-1.8rem, -1.3vw, -.4rem); transform-origin: 50% 100%;
	animation: hop .85s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i) * 80ms + .3s) both, bob var(--b, 3.4s) ease-in-out calc(var(--i) * 80ms + 1.2s) infinite alternate; }
.cast-row.back .c { margin-inline: 0; }
.cast-row .c:nth-child(2n) { --b: 2.8s; } .cast-row .c:nth-child(3n) { --b: 3.9s; }
@keyframes hop { from { translate: 0 75%; scale: .55; opacity: 0; } 55% { opacity: 1; } to { translate: 0 0; scale: 1; opacity: 1; } }
@keyframes bob { from { transform: translateY(0) rotate(-.6deg); } to { transform: translateY(-4%) rotate(1.4deg); } }
.c.fly { position: absolute; height: 30%; width: auto; animation: hop .85s cubic-bezier(.3, 1.6, .5, 1) 1s both, hover 4.6s ease-in-out 1.6s infinite alternate; }
.fly-r { right: 5%; top: -4%; } .fly-l { left: 6%; top: 4%; height: 24%; }
@keyframes hover { from { transform: translate(0, 0) rotate(-4deg); } to { transform: translate(-1.6rem, -1rem) rotate(5deg); } }

.stage-hero .bubbles { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.stage-hero .bubble { position: absolute; left: var(--x); top: 100%; width: var(--s); height: var(--s); border-radius: 50%; padding: 0; pointer-events: auto; cursor: pointer; border: 2px solid rgba(255, 255, 255, .78);
	background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9) 0 9%, rgba(255, 255, 255, .16) 10%, rgba(160, 220, 255, .1) 55%, rgba(255, 143, 210, .26) 100%); animation: float-up var(--t) linear var(--d) infinite; }
.stage-hero .bubble.pop { animation: float-up var(--t) linear var(--d) infinite, burst .3s ease-out forwards; }
@keyframes float-up { from { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(1.3rem, -28rem, 0); } to { transform: translate3d(-.7rem, -56rem, 0); } }
@keyframes burst { 0% { scale: 1; opacity: 1; } 60% { scale: 1.45; opacity: .7; } 100% { scale: 1.8; opacity: 0; } }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(2rem, 5vw, 4.4rem); fill: var(--cream); z-index: 4; display: block; }

@media (max-width: 52rem) {
	.cast { height: clamp(14rem, 68vw, 22rem); }
	.cast-row .m-hide { display: none; }
	.cast-row.front { height: 58%; }
	.cast-row.front .c { margin-inline: -.35rem; }
	.cast-row.back { bottom: 44%; height: 40%; gap: 1.2rem; }
	.fly-l { display: none; } .fly-r { height: 20%; top: -4%; right: 2%; }
	.beam { display: none; }
	.stage-hero .bubble:nth-child(n+6) { display: none; }
}
@media (max-width: 30rem) { .hero-copy .row .btn { width: 100%; justify-content: center; } }

/* ================= game cards: the character steps out of its world ================= */
.games-sec { background: var(--cream); }
.gcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(4rem, 6vw, 5.2rem) clamp(1.4rem, 3vw, 2.4rem); padding-top: 2.6rem; }
.gcard { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(17rem, 25vw, 21rem); border-radius: 1.6rem; background: var(--night); color: var(--cream);
	box-shadow: 0 .55rem 0 var(--accent), 0 1.4rem 2.4rem rgba(29, 33, 69, .2); }
.gcard-world { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; }
.gcard-world img, .gcard-world video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .4s; }
.gcard.port .gcard-world img, .gcard.port .gcard-world video { object-position: center 42%; }
.gcard-world video { opacity: 0; }
.gcard.playing .gcard-world video { opacity: 1; }
.gcard-world::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19, 22, 55, .95) 0%, rgba(19, 22, 55, .84) 40%, rgba(19, 22, 55, .2) 70%, rgba(19, 22, 55, 0) 100%), linear-gradient(0deg, rgba(19, 22, 55, .55), transparent 45%); }
.gcard-hero { position: absolute; right: 1.5%; bottom: 0; height: 124%; width: auto; max-width: 50%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.gcard-body { padding: clamp(1.3rem, 2.6vw, 2rem); max-width: 60%; }
.gcard h3 { font-size: clamp(1.55rem, 2.6vw, 2.2rem); margin: 0 0 .35rem; line-height: 1.05; }
.gcard h3 a { color: #fff; text-decoration: none; }
.gcard h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.gcard p { color: #e4def7; margin: 0 0 .9rem; }
.gcard .tags { margin-bottom: 1rem; }
.gcard .tags li { background: rgba(255, 255, 255, .14); color: #fff; }
.gcard .btn { position: relative; z-index: 1; }
.gcard:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (hover: hover) {
	.gcard:hover .gcard-hero { transform: translateY(-.7rem) rotate(-3deg) scale(1.05); }
	.gcard:hover .gcard-world img { transform: scale(1.06); }
}
@media (max-width: 52rem) { .gcards { grid-template-columns: 1fr; } }
@media (max-width: 34rem) {
	.gcards { gap: 4.6rem; }
	.gcard { min-height: 0; }
	.gcard-body { max-width: none; padding-top: 10.5rem; }
	.gcard-hero { top: -2.6rem; bottom: auto; right: .8rem; height: 13rem; max-width: 62%; }
	.gcard-world::after { background: linear-gradient(180deg, rgba(19, 22, 55, .05) 0%, rgba(19, 22, 55, .55) 34%, rgba(19, 22, 55, .94) 58%); }
	.gcard.port .gcard-world img, .gcard.port .gcard-world video { object-position: center 30%; }
}

/* ================= meet the cast: two slow conveyor belts of characters ================= */
.cast-strip { position: relative; overflow: hidden; background: radial-gradient(ellipse 60% 80% at 50% 120%, #3a2a86, transparent 70%), var(--night); color: var(--cream); padding: clamp(3rem, 7vw, 5rem) 0 clamp(2.4rem, 5vw, 3.6rem); }
.cast-strip .section-head p { color: #dcd8ee; }
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.track { display: flex; width: max-content; list-style: none; margin: 0; padding: .8rem 0 1rem; animation: belt 90s linear infinite; }
.rev .track { animation-direction: reverse; animation-duration: 110s; }
.marquee:hover .track { animation-play-state: paused; }
.track li { padding-right: clamp(1rem, 2.4vw, 2.2rem); }
.track figure { margin: 0; display: grid; justify-items: center; align-content: end; gap: .45rem; width: 9rem; }
.track img { height: 8.4rem; width: auto; max-width: 100%; object-fit: contain; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.track li:hover img { transform: translateY(-.5rem) rotate(-4deg) scale(1.08); }
.track figcaption { text-align: center; line-height: 1.2; }
.track b { display: block; font-weight: 700; font-size: .95rem; }
.track span { font-size: .76rem; color: #b9b3dc; }
@keyframes belt { to { transform: translateX(-50%); } }

/* pause every looping animation while its section is off screen (js adds .is-off) */
.is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
	.marquee { overflow-x: auto; -webkit-mask: none; mask: none; }
	.track li[aria-hidden] { display: none; }
	.stage-hero .bubble { top: auto; bottom: 30%; }
}
