/* JIGSTY landing */
:root {
	--bg: #fff8ec;
	--bg-alt: #fff1da;
	--card: #ffffff;
	--ink: #1d2a44;
	--muted: #56627b;
	--line: rgba(29, 42, 68, .1);
	--brand: #c8372d;
	--brand-hi: #e0503f;
	--sun: #ffb22e;
	--blue: #1f6fe5;
	--blue-deep: #0d2f78;
	--link: #1f6fe5;
	--hero-ink: #ffffff;
	--shadow: 0 18px 50px -20px rgba(13, 47, 120, .35);
	--radius: 22px;
	--font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0b1530;
		--bg-alt: #0f1d40;
		--card: #14244d;
		--ink: #eef3ff;
		--muted: #a9b6d4;
		--line: rgba(255, 255, 255, .1);
		--shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
		--link: #8fb8ff;
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body.jigsty { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border-radius: 999px; font-weight: 800; text-decoration: none; line-height: 1; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn-sm { padding: .75em 1.2em; font-size: .95rem; }
.btn-lg { padding: 1.05em 1.8em; font-size: 1.08rem; }
.btn-primary { background: linear-gradient(180deg, var(--brand-hi), var(--brand)); color: #fff; box-shadow: 0 10px 24px -10px rgba(200, 55, 45, .8), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(200, 55, 45, .9), inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .25s, box-shadow .25s; }
.site-header.scrolled { background: color-mix(in srgb, var(--blue-deep) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .5); }
.header-in { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: block; transform-origin: left top; transition: transform .35s ease; }
.brand img { width: 120px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
/* Big logo over the hero; it shrinks into the bar once the page scrolls. */
.site-header:not(.scrolled) .brand { transform: scale(2.3); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #fff; text-decoration: none; font-weight: 700; opacity: .9; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.lang { position: relative; color: #fff; }
.lang summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 800; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.lang summary::-webkit-details-marker { display: none; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; background: var(--card); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); min-width: 170px; }
.lang-menu a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; }
.lang-menu a:hover, .lang-menu a[aria-current] { background: var(--bg-alt); }
.lang-menu a[aria-current]::after { content: " ✓"; color: var(--brand); }

/* Hero */
.hero { position: relative; isolation: isolate; color: var(--hero-ink); padding: 120px 0 72px; overflow: hidden; background: radial-gradient(1200px 600px at 80% 0%, #3d8bff 0%, transparent 60%), linear-gradient(160deg, #1a5fd6 0%, #0d2f78 70%, #0a2460 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 -1px; height: 70px; background: var(--bg); clip-path: ellipse(75% 100% at 50% 100%); z-index: -1; }
.hero-bg i { position: absolute; z-index: -1; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; background: rgba(255, 255, 255, .07); animation: drift 18s ease-in-out infinite alternate; }
.hero-bg i:nth-child(1) { width: 520px; height: 520px; left: -160px; top: 80px; }
.hero-bg i:nth-child(2) { width: 380px; height: 380px; right: -80px; top: -120px; animation-delay: -6s; background: rgba(120, 190, 255, .12); }
.hero-bg i:nth-child(3) { width: 240px; height: 240px; left: 45%; bottom: -60px; animation-delay: -12s; }
@keyframes drift { to { transform: translate(40px, -30px) rotate(25deg) scale(1.08); } }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; padding: 7px 14px; border-radius: 999px; background: rgba(255, 178, 46, .18); color: #ffd27a; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.6rem); margin-bottom: .35em; }
.hero h1::after { content: ""; display: block; width: 84px; height: 8px; margin-top: 18px; border-radius: 99px; background: linear-gradient(90deg, var(--sun), var(--brand-hi)); }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: rgba(255, 255, 255, .86); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chips li { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-weight: 700; font-size: .92rem; }
.hero-visual { position: relative; justify-self: center; width: min(360px, 82vw); }
.phone { position: relative; border-radius: 44px; padding: 12px; background: linear-gradient(145deg, #1b2235, #0b0f1a); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 255, 255, .08); transform: rotate(3deg); }
.phone img { border-radius: 34px; width: 100%; aspect-ratio: 540 / 1206; object-fit: cover; }
.float-card { position: absolute; left: -26%; bottom: 14%; width: 56%; border-radius: 26px; overflow: hidden; border: 5px solid #fff; box-shadow: var(--shadow); transform: rotate(-6deg); animation: bob 6s ease-in-out infinite; background: #fff; }
.float-icon { position: absolute; border-radius: 22%; box-shadow: var(--shadow); animation: bob 7s ease-in-out infinite; }
.float-icon-a { right: -14%; top: 12%; width: 88px; animation-delay: -2s; }
.float-icon-b { right: -6%; bottom: 6%; width: 72px; animation-delay: -4s; }
@keyframes bob { 50% { translate: 0 -12px; } }

/* Sections */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section > .wrap > h2 { margin-bottom: 40px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: none; }
.step { background: var(--card); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 18px; font-weight: 900; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); }
.step:nth-child(2) .step-n { background: linear-gradient(135deg, var(--sun), #f07c1e); }
.step:nth-child(3) .step-n { background: linear-gradient(135deg, var(--brand-hi), var(--brand)); }
.step p { color: var(--muted); margin: 0; }

.alive { background: var(--bg-alt); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); aspect-ratio: 1; }
.tile:nth-child(odd) { transform: rotate(-1.2deg); }
.tile:nth-child(even) { transform: rotate(1.2deg) translateY(10px); }
.scene { width: 100%; height: 100%; object-fit: cover; cursor: pointer; background: #dfe8ff; }

.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .25s; }
.product:hover { transform: translateY(-6px); }
.product-free { outline: 3px solid var(--sun); outline-offset: -3px; }
.product-media { position: relative; aspect-ratio: 1; }
.badge { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .82rem; background: rgba(255, 255, 255, .92); color: #1d2a44; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.product-free .badge { background: var(--sun); }
.product-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product-body > p { color: var(--muted); font-size: .98rem; flex: 1; }
.product-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.app-icon { width: 56px; border-radius: 14px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); }
.product-head h3 { margin: 0; font-size: 1.12rem; }
.product-head .meta { margin: 0; color: var(--brand); font-weight: 800; font-size: .9rem; }

.stores { display: flex; flex-wrap: wrap; gap: 8px; }
.store { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 10px; border-radius: 13px; background: #0f1422; color: #fff; text-decoration: none; min-width: 148px; transition: transform .2s, background .2s; }
.store:hover { transform: translateY(-2px); background: #1d2540; }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: .66rem; opacity: .8; }
.store b { font-size: 1rem; }
.product .stores { flex-direction: column; }
.product .store { width: 100%; }
html.os-ios .store-appstore, html.os-android .store-gplay { order: -1; }

.bento { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { background: var(--card); border-radius: var(--radius); padding: 28px 26px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feat-1 { grid-column: span 2; background: linear-gradient(140deg, #1f6fe5, #0d2f78); color: #fff; border: 0; }
.feat-4 { grid-column: span 2; background: linear-gradient(140deg, #ffcf6e, #ff9c3a); color: #2b1a05; border: 0; }
.feat p { color: var(--muted); margin: 0; }
.feat-1 p { color: rgba(255, 255, 255, .85); }
.feat-4 p { color: rgba(43, 26, 5, .8); }
.feat-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--bg-alt); font-size: 1.6rem; margin-bottom: 16px; }
.feat-1 .feat-icon, .feat-4 .feat-icon { background: rgba(255, 255, 255, .22); }

.faq { background: var(--bg-alt); }
.qa { background: var(--card); border-radius: 18px; margin-bottom: 12px; border: 1px solid var(--line); }
.qa summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 800; font-size: 1.08rem; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; font-size: 1.6rem; color: var(--brand); transition: rotate .2s; }
.qa[open] summary::after { rotate: 45deg; }
.qa p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

.final { padding: 90px 0; color: #fff; text-align: center; background: radial-gradient(800px 400px at 50% 0%, #3d8bff, transparent 70%), linear-gradient(160deg, #1a5fd6, #0d2f78); }
.final-in { display: flex; flex-direction: column; align-items: center; }
.final-in img { border-radius: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.final p { color: rgba(255, 255, 255, .86); font-size: 1.15rem; margin-bottom: 26px; }
.final .stores { justify-content: center; }

.site-footer { padding: 46px 0 110px; background: #08122b; color: #c9d3ec; text-align: center; font-size: .95rem; }
.footer-in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.footer-links a, .footer-langs a { color: #fff; }
.footer-langs { margin: 0; line-height: 2; }
.rights { margin: 0; opacity: .7; }

.sticky-cta { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px; display: none; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 20px; background: color-mix(in srgb, var(--blue-deep) 90%, transparent); backdrop-filter: blur(14px); color: #fff; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .6); translate: 0 140%; transition: translate .35s; }
.sticky-cta img { border-radius: 10px; }
.sticky-cta b { flex: 1; }
body.show-sticky .sticky-cta { translate: 0 0; }

.lang-toast { position: fixed; z-index: 60; left: 16px; bottom: 16px; max-width: min(360px, calc(100% - 32px)); display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); font-weight: 700; }
body.show-sticky .lang-toast { bottom: 88px; }
.lang-toast .btn { flex: none; }
.lang-toast button { flex: none; border: 0; background: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 4px; }

.plain { padding: 60px 0; }

/* Reveal on scroll (only when JS runs) */
html.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .7s ease, translate .7s ease; }
html.js .reveal.in { opacity: 1; translate: 0 0; }

/* AI notice under the scene gallery (text = the game's terms file) */
.ai-note { display: flex; gap: 16px; align-items: flex-start; margin-top: 40px; padding: 22px 24px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ai-note-icon { font-size: 1.6rem; line-height: 1.2; }
.ai-note h3 { margin: 0 0 .35em; font-size: 1.05rem; }
.ai-note p { margin: 0 0 .5em; color: var(--muted); font-size: .98rem; }
.ai-note a { color: var(--link); font-weight: 700; }

/* Legal pages: the game's TextMeshPro text rendered by [jigsty_terms] */
.doc-page { padding-bottom: 80px; }
.doc-band { height: 210px; background: radial-gradient(900px 400px at 80% 0%, #3d8bff 0%, transparent 60%), linear-gradient(160deg, #1a5fd6 0%, #0d2f78 80%); }
.doc { position: relative; margin-top: -56px; padding: clamp(24px, 5vw, 56px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tmp { white-space: pre-line; overflow-wrap: anywhere; }
.doc .tmp { font-size: 1.05rem; line-height: 1.7; }
.tmp a { color: var(--link); }
.tmp-block { display: block; }
.tmp-title { display: block; font-weight: 800; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }

@media (max-width: 1020px) {
	.products { grid-template-columns: repeat(2, 1fr); }
	.bento { grid-template-columns: repeat(2, 1fr); }
	.tiles { grid-template-columns: repeat(3, 1fr); }
	.tiles .tile:nth-child(n+7) { display: none; }
}
@media (max-width: 820px) {
	.nav { display: none; }
	.lang { margin-left: auto; }
	.hero { padding-top: 116px; }
	.site-header:not(.scrolled) .brand { transform: scale(1.75); }
	.hero-grid { grid-template-columns: 1fr; gap: 56px; }
	.hero-visual { width: min(270px, 66vw); }
	.float-card { left: -30%; }
	.steps { grid-template-columns: 1fr; }
	.sticky-cta { display: flex; }
	.site-header .btn { display: none; }
}
@media (max-width: 560px) {
	body.jigsty { font-size: 16px; }
	.brand img { width: 104px; }
	.tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.tiles .tile:nth-child(n+5) { display: none; }
	.products { grid-template-columns: 1fr; }
	.bento { grid-template-columns: 1fr; }
	.feat-1, .feat-4 { grid-column: auto; }
	.cta-row .btn { flex: 1 1 100%; }
	.final .stores { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
	.ai-note { flex-direction: column; gap: 6px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html.js .reveal { opacity: 1; translate: none; }
}
