/* muqing.ai, Apple/DJI-style: white page, light-grey and black product tiles, one red accent. */
:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --tile: #f5f5f7;
  --dark: #000;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --accent: #d4331c;
  --accent-hover: #b52a15;
  --accent-on-dark: #ff6a50;
  --line: #d2d2d7;
  --gap: 12px;
  --gnav: 48px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--gnav) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 17px/1.47 var(--font); letter-spacing: -.022em; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h2, h3 { margin: 0; font-family: var(--font-display); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 60; padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 8px; }

/* ---------- Global nav ---------- */
.gnav { position: sticky; top: 0; z-index: 40; height: var(--gnav); background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .3s ease; }
.gnav.is-stuck { border-bottom-color: rgba(0, 0, 0, .08); }
.gnav-row { display: flex; align-items: center; gap: 2rem; max-width: 1024px; height: 100%; margin: 0 auto; padding: 0 22px; }
.gnav-logo { display: grid; place-items: center; height: 100%; margin-right: auto; }
.gnav-logo img { width: 30px; }
.gnav-links { display: flex; gap: 2.1rem; }
.gnav-links a { font-size: 12px; letter-spacing: -.01em; color: rgba(0, 0, 0, .8); transition: color .2s ease; }
.gnav-links a:hover { color: #000; }
/* Language globe (built by js/language-switcher.js); the empty box keeps its place until the script runs. */
.lang { display: inline-flex; justify-content: center; box-sizing: border-box; min-width: 74px; min-height: 26px; padding: 2px; border-radius: 999px; background: rgba(0, 0, 0, .06); }
.lang:empty { background: transparent; }
.gnav-menu { display: none; width: 40px; height: 40px; margin-right: -10px; border: 0; background: none; cursor: pointer; place-items: center; }
.gnav-menu-lines, .gnav-menu-lines::before { display: block; width: 17px; height: 1.2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease; }
.gnav-menu-lines { position: relative; transform: translateY(-3px); }
.gnav-menu-lines::before { content: ""; position: absolute; left: 0; top: 7px; }
.gnav-menu[aria-expanded="true"] .gnav-menu-lines { transform: translateY(0) rotate(45deg); }
.gnav-menu[aria-expanded="true"] .gnav-menu-lines::before { transform: translateY(-7px) rotate(-90deg); }

/* ---------- Chapter icons ---------- */
.chapters { padding: 22px 0 18px; }
.chapters ul { display: flex; justify-content: flex-start; gap: 6px; overflow-x: auto; padding: 0 22px; scrollbar-width: none; }
.chapters ul::-webkit-scrollbar { display: none; }
/* Centred when it fits; when it doesn't, it still scrolls all the way to the first chip. */
.chapters li:first-child { margin-inline-start: auto; }
.chapters li:last-child { margin-inline-end: auto; }
.chapters a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; padding: 6px 2px; border-radius: 14px; font-size: 12px; line-height: 1.25; text-align: center; color: var(--ink); transition: background-color .2s ease; }
.chapters a:hover { background: var(--tile); }
.chapters img { width: 54px; height: 54px; transition: transform .25s ease; }
.chapters a:hover img { transform: translateY(-2px); }

/* ---------- Tiles ---------- */
.tile { position: relative; display: flex; flex-direction: column; align-items: center; overflow: hidden; margin: 0 var(--gap) var(--gap); padding: 56px 24px 0; text-align: center; }
.tile--light { background: var(--tile); color: var(--ink); }
.tile--dark { background: var(--dark); color: var(--on-dark); }
.tile--hero { min-height: 692px; }
.tile-copy { position: relative; z-index: 1; max-width: 680px; }
.tile h2 { font-size: 56px; line-height: 1.07; font-weight: 600; letter-spacing: -.005em; }
.tile-sub { margin-top: 6px; font-size: 28px; line-height: 1.14; font-weight: 400; letter-spacing: .007em; }
.tile-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 10px 21px; border-radius: 980px; font-size: 17px; line-height: 1.18; font-weight: 400; letter-spacing: -.022em; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn-fill { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-fill:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-line { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.btn-line:hover { background: var(--accent); color: #fff; }
.tile--dark .btn-line { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.tile--dark .btn-line:hover { background: var(--accent-on-dark); color: #000; }
.tile-art { width: min(100%, 860px); margin: auto auto 0; padding-top: 18px; }
.tile-art--wide { width: min(100%, 1180px); aspect-ratio: 16 / 8.4; object-fit: cover; object-position: 50% 52%; }
.tile-film { width: min(100%, 1120px); margin: 44px auto 0; }
.tile-film video { width: 100%; border-radius: 18px; background: #111; }
.tile-note { margin: 22px auto 56px; max-width: 34em; color: var(--on-dark-2); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin: 0 var(--gap) var(--gap); }
.grid .tile { margin: 0; min-height: 580px; padding-top: 52px; }
.grid .tile h2 { font-size: 40px; line-height: 1.1; }
.grid .tile .tile-sub { font-size: 21px; line-height: 1.19; }
.grid .tile-ctas { margin-top: 16px; }
.grid .btn { font-size: 14px; padding: 8px 16px; }
.grid .tile-art { width: min(108%, 680px); max-width: none; margin-bottom: -6px; }

.stills { position: relative; width: min(100%, 560px); height: 300px; margin: auto auto 40px; }
.stills img { position: absolute; width: 72%; border-radius: 12px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .9); }
.stills img:first-child { left: 0; top: 18px; transform: rotate(-3deg); }
.stills img:last-child { right: 0; top: 96px; transform: rotate(2.5deg); }

/* Gentle reveal: art rises in once. Content is visible without JS. */
.js .reveal { opacity: 0; transform: translateY(36px) scale(.985); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Shelves (horizontal rows) ---------- */
.shelf { padding-top: 84px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; max-width: 1240px; margin: 0 auto; padding: 0 22px; }
.shelf h2 { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: 0; }
.shelf-arrows { display: flex; gap: 10px; }
.shelf-arrows button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e8e8ed; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; transition: background-color .2s ease; }
.shelf-arrows button:hover { background: #dcdce1; }
.row { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(22px, calc((100vw - 1240px) / 2 + 22px)); padding: 26px max(22px, calc((100vw - 1240px) / 2 + 22px)) 34px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > li { flex: 0 0 auto; scroll-snap-align: start; }
.card { display: flex; flex-direction: column; width: 272px; height: 100%; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 2px 4px 12px rgba(0, 0, 0, .08); transition: transform .3s cubic-bezier(0, 0, .5, 1), box-shadow .3s cubic-bezier(0, 0, .5, 1); }
a.card:hover { transform: scale(1.02); box-shadow: 2px 4px 16px rgba(0, 0, 0, .16); }
.card-art { display: grid; place-items: center; aspect-ratio: 16 / 11; background: var(--tile); }
.card-art img { width: 96px; height: 96px; }
.card strong { padding: 18px 20px 0; font: 600 19px/1.21 var(--font-display); letter-spacing: .012em; }
.card > span:last-child { padding: 6px 20px 22px; color: var(--ink-2); font-size: 14px; line-height: 1.43; letter-spacing: -.016em; }
.row--wide .card { width: 372px; }
.card-art--photo { display: block; overflow: hidden; }
.card-art--photo img, .card-art--photo video { width: 100%; height: 100%; object-fit: cover; }
.card-art--top img { object-position: 50% 0; }

.row--photos > li { height: 460px; }
.row--photos figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.row--photos img { height: calc(100% - 34px); width: auto; max-width: none; border-radius: 18px; }
.row--photos figcaption { padding-top: 12px; font-size: 14px; color: var(--ink-2); }
.row--photos figcaption strong { color: var(--ink); font-weight: 600; margin-right: .3em; }

/* ---------- About ---------- */
.about { flex-direction: row; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 72px); margin-top: 84px; padding: 64px clamp(24px, 6vw, 80px); text-align: left; }
.about-photo { width: min(34vw, 340px); border-radius: 22px; }
.about-copy { max-width: 520px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: -.01em; }
.about h2 { margin: 8px 0 18px; font-size: 48px; line-height: 1.08; font-weight: 600; }
.about-copy p:not(.eyebrow) { color: var(--ink-2); font-size: 17px; }
.about-copy .about-lead { color: var(--ink); font-size: 21px; line-height: 1.38; margin-bottom: 12px; }
.tile-ctas--left { justify-content: flex-start; margin-top: 28px; }

/* ---------- Footer directory ---------- */
.footer { margin-top: 84px; background: var(--tile); color: var(--ink-2); font-size: 12px; line-height: 1.33; letter-spacing: -.01em; }
.footer-inner { max-width: 1024px; margin: 0 auto; padding: 34px 22px 22px; }
.footer-note { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 22px 0 28px; }
.footer h3 { margin-bottom: 10px; font: 600 12px/1.33 var(--font); color: var(--ink); }
.footer-h3-gap { margin-top: 26px !important; }
.footer li + li { margin-top: 8px; }
.footer a { color: #424245; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { display: flex; justify-content: space-between; gap: 1rem; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- Tablet ---------- */
@media (max-width: 1068px) {
  .tile--hero { min-height: 620px; }
  .tile h2 { font-size: 48px; }
  .tile-sub { font-size: 24px; }
  .grid .tile { min-height: 500px; }
  .grid .tile h2 { font-size: 32px; }
  .grid .tile .tile-sub { font-size: 19px; }
  .stills { height: 240px; }
  .stills img:last-child { top: 76px; }
}

/* ---------- Phone ---------- */
@media (max-width: 734px) {
  :root { --gnav: 48px; --gap: 10px; }
  .gnav-menu { display: grid; }
  .gnav-row { gap: 12px; padding: 0 16px; }
  .gnav-links {
    position: absolute; top: var(--gnav); left: 0; right: 0; flex-direction: column; gap: 0;
    height: calc(100vh - var(--gnav)); height: calc(100dvh - var(--gnav)); padding: 8px 32px 28px; background: #fff; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
  }
  .gnav-links.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s ease, transform .25s ease; }
  .gnav-links a { padding: 10px 0; font-size: 24px; font-weight: 600; color: var(--ink); }
  .chapters ul { justify-content: flex-start; }
  .chapters a { width: 80px; }
  .chapters img { width: 46px; height: 46px; }
  .tile { padding: 44px 18px 0; }
  .tile--hero { min-height: 0; }
  .tile h2, .grid .tile h2 { font-size: 32px; line-height: 1.12; }
  .tile-sub, .grid .tile .tile-sub { font-size: 19px; line-height: 1.21; }
  .tile-ctas { gap: 10px; margin-top: 16px; }
  .btn, .grid .btn { font-size: 15px; padding: 8px 16px; }
  .tile-art--wide { width: 130%; max-width: none; margin: auto -15% 0; aspect-ratio: 16 / 10; }
  .tile-film { margin-top: 28px; }
  .tile-film video { border-radius: 12px; }
  .tile-note { margin-bottom: 36px; }
  .grid { grid-template-columns: 1fr; }
  .grid .tile { min-height: 0; padding-top: 40px; }
  .grid .tile-art { width: 112%; margin: auto -6% -6px; }
  .stills { height: 210px; margin-top: 28px; }
  .stills img:last-child { top: 66px; }
  .shelf { padding-top: 64px; }
  .shelf h2 { font-size: 28px; }
  .shelf-arrows { display: none; }
  .row { gap: 14px; padding: 20px 16px 28px; scroll-padding: 0 16px; }
  .card { width: 240px; }
  .row--wide .card { width: 290px; }
  .row--photos > li { height: 300px; }
  .about { flex-direction: column; align-items: flex-start; margin-top: 64px; padding: 40px 22px; }
  .about-photo { width: 100%; max-width: 360px; }
  .about h2 { font-size: 34px; }
  .footer { margin-top: 64px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* A full-width game tile keeps its art the same size as in the grid. */

/* A film inside a grid tile. */
.tile-video { width: min(100%, 600px); margin: auto auto 48px; padding-top: 24px; }
.tile-video video { width: 100%; border-radius: 14px; background: #111; box-shadow: 0 24px 50px -24px rgba(255, 255, 255, .12); }
@media (max-width: 734px) { .tile-video { margin-bottom: 32px; } }

/* A tile that spans both grid columns (odd tile at the end). */
.grid .tile--span { grid-column: 1 / -1; }
.tile--span .tile-video { width: min(100%, 900px); }

/* Games tile (2026-11-06): led by Silent Link, with the jets from its title screen and the logo over the empty sky. */
.sl-art { position: relative; display: block; width: min(100%, 1120px); margin: auto auto 48px; border-radius: 18px; overflow: hidden; background: #0a1020; box-shadow: 0 24px 50px -24px rgba(255, 255, 255, .12); }
.grid .sl-art { margin-top: 28px; }
.sl-art .sl-back { display: block; width: 100%; height: auto; transition: transform .9s ease; }
.sl-art:hover .sl-back { transform: scale(1.025); }
.sl-art .sl-logo { position: absolute; left: 5%; top: 40%; width: 27%; height: auto; transform: translateY(-50%); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .55)); }
.sl-art .sl-logo-zh { display: none; width: 19%; }
:root[lang="zh-CN"] .sl-art .sl-logo-en { display: none; }
:root[lang="zh-CN"] .sl-art .sl-logo-zh { display: block; }
@media (max-width: 734px) { .sl-art { margin-bottom: 32px; border-radius: 12px; } .grid .sl-art { margin-top: 24px; } }

/* A note under a film in a grid tile. */
.tile-video + .tile-note { margin-top: -24px; }
@media (max-width: 734px) { .tile-video + .tile-note { margin-top: -16px; } }

/* No grey tap flash on iPhone. */
a, button { -webkit-tap-highlight-color: transparent; }
/* A film on a light tile gets a softer shadow. */
.tile--light .tile-video video { box-shadow: 0 24px 50px -26px rgba(0, 0, 0, .35); }
@media (max-width: 734px) {
  /* Benchtop: less empty grey above the periodic table. */
  .tile-art--wide { aspect-ratio: 16 / 8.6; object-position: 50% 55%; }
}

/* ---------- Light / dark (moon button from assets/theme/theme-kit.js) ---------- */
/* Every visit opens light; the moon next to the globe switches to dark (shared "site-theme" choice). */
.gnav-tools { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.site-theme-slot { display: inline-flex; }
:root { --st-size: 26px; --st-icon: 14px; }

:root[data-theme="dark"] {
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #86868b;
  --tile: #1d1d1f;
  --dark: #000;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --line: #424245;
  --page: #000;
  color-scheme: dark;
}
:root[data-theme="dark"] body { background: var(--page); }
:root[data-theme="dark"] :focus-visible { outline-color: var(--accent-on-dark); }
:root[data-theme="dark"] .skip-link { background: #f5f5f7; color: #000; }
:root[data-theme="dark"] .gnav { background: rgba(22, 22, 23, .8); }
:root[data-theme="dark"] .gnav.is-stuck { border-bottom-color: rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .gnav-links a { color: rgba(255, 255, 255, .8); }
:root[data-theme="dark"] .gnav-links a:hover { color: #fff; }
:root[data-theme="dark"] .lang { background: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .lang:empty { background: transparent; }
:root[data-theme="dark"] .lang .lang-kit { color: #f5f5f7; }
:root[data-theme="dark"] .lang .lang-kit button:hover { background: rgba(255, 255, 255, .1); }
/* The black tiles sit a step above the black page, with a hairline, so they still read as tiles. */
:root[data-theme="dark"] .tile--dark { background: #0b0b0c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
:root[data-theme="dark"] .btn-line { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
:root[data-theme="dark"] .btn-line:hover { background: var(--accent-on-dark); color: #000; }
:root[data-theme="dark"] .eyebrow { color: var(--accent-on-dark); }
:root[data-theme="dark"] .shelf-arrows button { background: #2c2c2e; }
:root[data-theme="dark"] .shelf-arrows button:hover { background: #3a3a3c; }
:root[data-theme="dark"] .card { background: #1d1d1f; box-shadow: none; }
:root[data-theme="dark"] .footer a { color: #d2d2d7; }
:root[data-theme="dark"] .footer a:hover { color: #fff; }
@media (max-width: 734px) {
  :root[data-theme="dark"] .gnav-links { background: #000; }
  :root[data-theme="dark"] .gnav-links a { color: var(--ink); }
}
