/* Tu Tiên Ký homepage. Same pixel kit as the game's web loader (tools/web/web-shell.html): VT323 pixel font, key art and
   logo at whole-number scales (image-rendering: pixelated), the kit window frame 9-sliced via border-image.
   --u = CSS px per art pixel of the kit (panel_frame.png is 64 px at 2 texture px per art pixel). */
@font-face { font-family: "PixelUI"; src: url("/fonts/vt323.woff2") format("woff2"); font-display: swap; }
:root { --u: 1px; --bg: #101c22; --well: #0a1317; --ink: #070d10; --gold: #b59154; --gold-hi: #e2c383; --gold-dark: #7a5f33;
	--text: #f4e8cb; --muted: #a7b7ad; --jade: #53d5ba; --gutter: 16px; color-scheme: dark; }
@media (min-width: 720px) { :root { --u: 2px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 22px/1.2 "PixelUI", "Courier New", monospace;
	-webkit-font-smoothing: none; font-smooth: never; overflow-x: hidden; }
img { image-rendering: pixelated; max-width: 100%; height: auto; display: block; }
a { color: var(--jade); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1; }
h2 { font-size: 40px; color: var(--gold-hi); text-shadow: 0 2px 0 var(--ink); text-align: center; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: 56px 0 8px; }
.sec .solo { margin-bottom: 32px; }
.sec .lead { max-width: 680px; margin: 16px auto 32px; text-align: center; color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 9; background: var(--ink); padding: 8px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; background: rgba(10, 19, 23, .94); box-shadow: 0 2px 0 var(--ink), 0 4px 0 var(--gold-dark); }
.bar .wrap { display: flex; align-items: center; gap: 16px; height: 52px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--gold-hi); text-decoration: none; font-size: 26px; white-space: nowrap; }
.brand img { width: 32px; height: 32px; image-rendering: auto; box-shadow: 0 0 0 2px var(--gold-dark), 0 0 0 4px var(--ink); }
.nav { display: none; gap: 20px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--gold-hi); }
.lang { margin-left: auto; color: var(--muted); text-decoration: none; padding: 4px 8px; box-shadow: 0 0 0 2px var(--gold-dark); }
.lang:hover { color: var(--gold-hi); }
@media (min-width: 760px) { .nav { display: flex; } .lang { margin-left: 0; } }

/* kit pieces */
.frame { border: calc(12 * var(--u)) solid var(--gold-dark); border-image: url("/img/frame.png") 24 fill / calc(12 * var(--u)) stretch;
	padding: calc(4 * var(--u)) calc(6 * var(--u)); }
.btn { display: inline-block; text-decoration: none; color: var(--text); text-shadow: 0 2px 0 var(--ink); text-align: center;
	border: 8px solid #2a9a85; border-image: url("/img/btn-jade.png") 8 fill / 8px stretch; padding: 4px 20px; line-height: 1; white-space: nowrap; }
.bar .btn { padding: 2px 10px; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); }
.btn-big { font-size: 40px; padding: 8px 40px; }
.chip { border: 8px solid #222b30; border-image: url("/img/chip.png") 8 fill / 8px stretch; }

/* hero: key art at a whole-number scale (js/home.js sets background-size), cover fallback */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; justify-content: center; text-align: center;
	background: var(--bg) url("/img/key-art.png") center 40% / cover no-repeat; image-rendering: pixelated; padding: 48px 0 64px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 35%;
	background: linear-gradient(rgba(16, 28, 34, 0), var(--bg)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.logo { width: 234px; }
@media (min-width: 540px) { .logo { width: 468px; } }
@media (min-width: 1000px) { .logo { width: 702px; } }
.tagline { font-size: 32px; color: var(--gold-hi); text-shadow: 0 2px 0 var(--ink), 0 0 12px var(--ink); }
.pitch { max-width: 560px; text-shadow: 0 2px 0 var(--ink), 0 0 10px var(--ink); }
.cta-note { font-size: 20px; color: var(--text); text-shadow: 0 2px 0 var(--ink), 0 0 6px var(--ink), 0 0 12px var(--ink); margin-top: -8px; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store { display: flex; align-items: center; gap: 10px; padding: 2px 10px; width: 280px; font-size: 20px; white-space: nowrap; color: var(--text); text-align: left; line-height: 1; }
.store svg { width: 24px; height: 24px; flex: none; fill: var(--text); }
.store small { display: block; font-size: 18px; color: var(--jade); }
.store[aria-disabled="true"] { opacity: .85; cursor: default; }

/* intro */
.intro { max-width: 760px; margin: 0 auto; text-align: center; }
.intro p { font-size: 24px; margin-top: 16px; }

/* realm path */
.realms { display: flex; flex-direction: column; align-items: stretch; gap: 8px; list-style: none; margin: 0 auto; padding: 0; max-width: 420px; }
.realms li { text-align: center; padding: 6px 12px; }
.realms b { display: block; font-weight: 400; font-size: 30px; color: var(--gold-hi); }
.realms span { color: var(--muted); font-size: 20px; }
.realms .arrow { align-self: center; width: 0; height: 0; padding: 0; border: 8px solid transparent; border-top: 10px solid var(--jade); border-bottom: 0; }
@media (min-width: 760px) {
	.realms { flex-direction: row; align-items: center; max-width: none; justify-content: center; }
	.realms li:not(.arrow) { flex: 1 1 0; max-width: 220px; }
	.realms .arrow { transform: rotate(-90deg); }
}
.note { text-align: center; color: var(--muted); font-size: 20px; margin-top: 16px; }

/* feature cards */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid { grid-template-columns: 1fr 1fr; } .grid .wide { grid-column: 1 / -1; } }
.card h3 { font-size: 30px; color: var(--gold-hi); text-shadow: 0 2px 0 var(--ink); margin-bottom: 8px; }
.card h3::before, .faq summary::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 12px 4px 2px; background: var(--jade);
	transform: rotate(45deg); box-shadow: 0 0 0 2px var(--ink); }
.card p { color: var(--text); }
.card .time { color: var(--jade); }

/* gallery */
.shots { display: grid; gap: 12px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 560px) { .shots { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .shots { grid-template-columns: 1fr 1fr 1fr; } }
.shot { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: var(--well); cursor: zoom-in; color: inherit; font: inherit;
	box-shadow: 0 0 0 2px var(--gold-dark), 0 0 0 4px var(--ink); text-align: left; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: auto; }
.shot span { display: block; padding: 4px 10px 6px; font-size: 20px; color: var(--muted); }
.shot:hover span { color: var(--gold-hi); }
dialog.lb { max-width: min(96vw, 1280px); width: 100%; padding: 0; border: 0; background: var(--ink); color: var(--text); }
dialog.lb::backdrop { background: rgba(4, 8, 10, .88); }
dialog.lb img { width: 100%; image-rendering: auto; }
dialog.lb .lb-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
dialog.lb .lb-bar span { flex: 1; }
dialog.lb button { font: inherit; color: var(--text); background: var(--well); border: 0; box-shadow: 0 0 0 2px var(--gold-dark); padding: 2px 12px; cursor: pointer; }

/* faq */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { padding: 4px 12px; }
.faq summary { cursor: pointer; font-size: 26px; color: var(--gold-hi); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary::before { background: var(--gold-hi); }
.faq p { margin: 8px 0 4px; }

/* closing call + footer */
.again { text-align: center; padding: 64px 0 56px; }
.again p { color: var(--muted); margin-bottom: 20px; }
footer { background: var(--well); box-shadow: 0 -2px 0 var(--ink), 0 -4px 0 var(--gold-dark); padding: 24px 0 32px; color: var(--muted); font-size: 20px; }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
footer a { color: var(--text); }
footer a:hover { color: var(--gold-hi); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:active { transform: none; } }
@media (min-width: 720px) { body { font-size: 24px; } .tagline { font-size: 40px; } .pitch { font-size: 26px; } }
