:root {
  /* Layout: one pinned film stage that the page scrolls through, then a quiet index on paper. */
  --ink: #06080c;
  --paper: #eef1f0;
  --line: rgba(12, 15, 20, 0.16);
  --text: #0c0f14;
  --muted: #55606b;
  --on-ink: #f4f2ec;
  --on-ink-2: #c3c9d2;
  --blue: #1463ff;
  --yellow: #ffc400;
  --red: #ff4b5c;
  --sans: "Archivo", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad-l: max(20px, env(safe-area-inset-left, 0px));
  --pad-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--on-ink); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
.site [data-l] { display: none; }
.site[data-lang="en"] [data-l="en"], .site[data-lang="zh"] [data-l="zh"], .site[data-lang="ja"] [data-l="ja"],
.site[data-lang="fr"] [data-l="fr"], .site[data-lang="es"] [data-l="es"] { display: revert; }
:lang(ja) { --sans: "Archivo", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; font-family: var(--sans); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.ph { display: inline-block; }   /* keeps a Chinese phrase on one line */

/* ---------- header ---------- */
.top { position: fixed; z-index: 30; top: env(safe-area-inset-top, 0px); left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--pad-r) 16px var(--pad-l); color: #fff; mix-blend-mode: difference; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { font-weight: 800; font-stretch: 125%; font-size: 15px; letter-spacing: 0.16em; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 26px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.langs { display: flex; gap: 2px; }
.langs button, .langs a { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; color: inherit; background: none; border: 1px solid transparent; padding: 7px 8px; cursor: pointer; opacity: 0.6; text-decoration: none !important; white-space: nowrap; }
.langs button[aria-pressed="true"], .langs a[aria-current="true"] { opacity: 1; border-color: currentColor; }
.langs :is(button, a):is(:lang(zh), :lang(ja)) { font-family: var(--sans); letter-spacing: 0; }
@media (max-width: 720px) { .top nav > a { display: none; } }

/* ---------- film ---------- */
.film { position: relative; height: 1470vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink); }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.9s ease; }
.gl-ready #gl { opacity: 1; }
.scrim { position: absolute; inset: auto 0 0 0; height: 62%; background: linear-gradient(to top, rgba(4, 6, 10, 0.9) 0%, rgba(4, 6, 10, 0.6) 40%, rgba(4, 6, 10, 0) 100%); opacity: 0; pointer-events: none; }
.veil { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; z-index: 5; }
.cap, .cap-hero { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 var(--pad-r) clamp(40px, 9vh, 92px) var(--pad-l); pointer-events: none; z-index: 3; }
.cap { opacity: 0; visibility: hidden; }
.cap-in { max-width: 1240px; margin: 0 auto; }
.cap h2 { margin: 0; font-weight: 700; font-stretch: 106%; font-size: clamp(30px, 5.3vw, 80px); line-height: 1; letter-spacing: -0.03em; max-width: 15ch; text-wrap: balance; }
.cap p { margin: 18px 0 0; font-size: clamp(15px, 1.3vw, 19px); line-height: 1.5; max-width: 46ch; color: var(--on-ink-2); }
.cap .tag { margin: 0 0 16px; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow); }
.cap h2:is(:lang(zh), :lang(ja)) { font-weight: 900; font-stretch: 100%; letter-spacing: 0; line-height: 1.16; max-width: 12em; font-size: clamp(30px, 5vw, 72px); }
.cap p:is(:lang(zh), :lang(ja)), .hero-sub:is(:lang(zh), :lang(ja)) { line-height: 1.75; max-width: 30em; text-wrap: balance; }
.cap .tag:is(:lang(zh), :lang(ja)) { letter-spacing: 0.16em; font-family: var(--sans); font-size: 12px; }

.cap-hero .cap-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero-title { margin: 0 0 22px; font-weight: 800; font-stretch: 112%; font-size: clamp(40px, 8vw, 120px); line-height: 0.94; letter-spacing: -0.035em; max-width: 11ch; }
.hero-title:is(:lang(zh), :lang(ja)), .hero-title [lang] { letter-spacing: 0; }
.gl-ready .hero-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-sub { margin: 0; font-size: clamp(15px, 1.35vw, 19px); line-height: 1.5; max-width: 44ch; color: var(--on-ink-2); }
.hint { flex: none; display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-2); }
.hint i { display: block; width: 1px; height: 38px; background: linear-gradient(var(--on-ink-2), transparent); transform-origin: top; animation: drop 2.2s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.hud { position: absolute; z-index: 4; right: var(--pad-r); top: calc(env(safe-area-inset-top, 0px) + 58px); font: 500 11px/1 var(--mono); letter-spacing: 0.1em; color: var(--on-ink-2); display: flex; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.hud b { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.note { position: absolute; z-index: 4; right: var(--pad-r); bottom: 16px; margin: 0; font: 400 10.5px/1.3 var(--mono); letter-spacing: 0.06em; color: var(--on-ink-2); opacity: 0; text-align: right; max-width: 60vw; }
.progress { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.08); }
.progress i { display: block; height: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); }

/* ---------- no WebGL, or reduced motion: the same story as a plain page ---------- */
.no-gl .film { height: auto; }
.no-gl .stage { position: static; height: auto; padding-block: 130px 40px; background-image: none; }
.no-gl #gl, .no-gl .scrim, .no-gl .veil, .no-gl .hud, .no-gl .note, .no-gl .progress, .no-gl .hint { display: none; }
.no-gl .cap, .no-gl .cap-hero { position: static; opacity: 1 !important; visibility: visible !important; transform: none !important; padding-block: 0 56px; }

/* ---------- index on paper ---------- */
.after { background: var(--paper); color: var(--text); color-scheme: light; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pad-l); padding-right: var(--pad-r); }
.after .wrap { padding-block: clamp(64px, 11vw, 150px); }
.kicker { margin: 0 0 20px; font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.big { margin: 0; font-weight: 750; font-stretch: 108%; font-size: clamp(38px, 6.8vw, 104px); line-height: 0.96; letter-spacing: -0.035em; max-width: 13ch; text-wrap: balance; }
.big:is(:lang(zh), :lang(ja)) { font-weight: 900; font-stretch: 100%; letter-spacing: 0; line-height: 1.12; max-width: 10em; }
.lead { margin: 28px 0 0; font-size: clamp(17px, 1.7vw, 24px); line-height: 1.4; max-width: 34ch; color: var(--muted); }
.lead:is(:lang(zh), :lang(ja)) { line-height: 1.7; max-width: 22em; }
.prods { list-style: none; margin: clamp(48px, 7vw, 96px) 0 0; padding: 0; }
.prods > li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px clamp(24px, 5vw, 80px); padding-block: clamp(28px, 4vw, 52px); border-top: 1px solid var(--line); }
.prods h3 { margin: 0; font-weight: 750; font-stretch: 104%; font-size: clamp(30px, 4.4vw, 62px); line-height: 1; letter-spacing: -0.03em; }
.p-tag { margin: 12px 0 0; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.35; color: var(--blue); font-weight: 600; max-width: 22ch; }
.p-body p { margin: 0; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; max-width: 52ch; min-width: 0; }
.p-body p:is(:lang(zh), :lang(ja)) { line-height: 1.85; }
.p-meta { margin-top: 16px !important; font: 500 12px/1.4 var(--mono) !important; letter-spacing: 0.06em; color: var(--muted); }
.scenes { margin: 26px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.scene { margin: 0; min-width: 0; } .scene:first-child, .scene:last-child:nth-child(even) { grid-column: 1 / -1; }
.scene img { display: block; width: 100%; height: auto; border-radius: 4px; background: #d9dddc; }
.scene figcaption, .scenes-note { margin-top: 8px; font: 400 11px/1.4 var(--mono); letter-spacing: 0.05em; color: var(--muted); }
.scene figcaption:is(:lang(zh), :lang(ja)), .scenes-note:is(:lang(zh), :lang(ja)), .p-shot figcaption:is(:lang(zh), :lang(ja)) { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.02em; }
.scenes-note { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); max-width: 80ch; }
@media (max-width: 520px) { .scenes { grid-template-columns: minmax(0, 1fr); } }
.p-shot { margin: 26px 0 0; }
.p-shot .frame { background: #0b0d10; padding: clamp(8px, 1.2vw, 14px); border-radius: 6px; box-shadow: 0 18px 50px -18px rgba(12, 15, 20, 0.45); }
.p-shot img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 2px; }
.p-shot figcaption { margin-top: 10px; font: 400 11px/1.3 var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.p-tag:is(:lang(zh), :lang(ja)) { max-width: 14em; line-height: 1.5; }
.prods > li.dev { display: block; }
.prods > li.dev p { margin: 0; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.prods > li.dev b { font: 500 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-right: 14px; }
.prods > li.dev b:is(:lang(zh), :lang(ja)) { font-family: var(--sans); font-weight: 700; letter-spacing: 0.12em; }
@media (max-width: 760px) { .prods > li { grid-template-columns: minmax(0, 1fr); } }

.rules { background: var(--ink); color: var(--on-ink); color-scheme: dark; }
.rules .kicker { color: var(--on-ink-2); }
.rule-grid { margin: clamp(40px, 6vw, 80px) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px) clamp(24px, 5vw, 80px); }
.rule-grid h3 { margin: 0; font-weight: 700; font-stretch: 106%; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -0.02em; line-height: 1.05; }
.rule-grid h3:is(:lang(zh), :lang(ja)) { letter-spacing: 0; font-weight: 900; }
.rule-grid p { margin: 12px 0 0; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; color: var(--on-ink-2); max-width: 40ch; }
.rule-grid p:is(:lang(zh), :lang(ja)) { line-height: 1.85; }
@media (max-width: 640px) { .rule-grid { grid-template-columns: minmax(0, 1fr); } }

.contact .big { max-width: 16ch; }
.contact .big:is(:lang(zh), :lang(ja)) { max-width: 12em; }
.mail { margin: clamp(28px, 4vw, 48px) 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.mail span { font-weight: 700; font-stretch: 104%; font-size: clamp(22px, 3.4vw, 46px); letter-spacing: -0.02em; user-select: all; overflow-wrap: anywhere; }
.mail button { font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper); background: var(--text); border: 0; padding: 13px 16px; cursor: pointer; }
.mail button[data-done]::after { content: " \2713"; }
.foot { margin: clamp(56px, 8vw, 110px) 0 0; padding-top: 20px; border-top: 1px solid var(--line); font: 400 12px/1.6 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .hint i { animation: none; } #gl { transition: none; } }

/* ?og: the scene with no page furniture, for the social preview image */
.og .top, .og .cap, .og .cap-hero, .og .hud, .og .note, .og .progress, .og .scrim { display: none !important; }

.motion { display: inline-block; margin-top: 18px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink); border: 1px solid currentColor; padding: 11px 14px; text-decoration: none; pointer-events: auto; }
.motion:is(:lang(zh), :lang(ja)) { font-family: var(--sans); letter-spacing: 0.08em; font-size: 13px; }
.motion[hidden] { display: none; }

/* ---------- stills (site only) ---------- */
.stage { background: var(--ink) center / cover no-repeat; }
.stage:lang(en), .no-gl .cap-hero:lang(en) { background-image: url(still-hero-en-l.jpg); }
.stage:lang(zh), .no-gl .cap-hero:lang(zh) { background-image: url(still-hero-zh-l.jpg); }
.stage:lang(ja), .no-gl .cap-hero:lang(ja) { background-image: url(still-hero-ja-l.jpg); }
.stage:lang(fr), .no-gl .cap-hero:lang(fr) { background-image: url(still-hero-fr-l.jpg); }
.stage:lang(es), .no-gl .cap-hero:lang(es) { background-image: url(still-hero-es-l.jpg); }
@media (max-aspect-ratio: 9/10) {
  .stage:lang(en), .no-gl .cap-hero:lang(en) { background-image: url(still-hero-en-p.jpg); }
  .stage:lang(zh), .no-gl .cap-hero:lang(zh) { background-image: url(still-hero-zh-p.jpg); }
  .stage:lang(ja), .no-gl .cap-hero:lang(ja) { background-image: url(still-hero-ja-p.jpg); }
  .stage:lang(fr), .no-gl .cap-hero:lang(fr) { background-image: url(still-hero-fr-p.jpg); }
  .stage:lang(es), .no-gl .cap-hero:lang(es) { background-image: url(still-hero-es-p.jpg); }
}
.hero-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-gl .stage { padding: 0; background-image: none; }
.no-gl .cap, .no-gl .cap-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding-block: 0 clamp(40px, 9vh, 92px); background: var(--ink) center / cover no-repeat; }
.no-gl .cap::before, .no-gl .cap-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(4, 6, 10, 0.94) 0%, rgba(4, 6, 10, 0.6) 34%, rgba(4, 6, 10, 0) 68%); }
.no-gl .cap > *, .no-gl .cap-hero > * { position: relative; width: 100%; }
.no-gl .cap[data-still="c1"] { background-image: url(still-c1-l.jpg); }
.no-gl .cap[data-still="c2"] { background-image: url(still-c2-l.jpg); }
.no-gl .cap[data-still="c3"] { background-image: url(still-c3-l.jpg); }
.no-gl .cap[data-still="s1"] { background-image: url(still-s1-l.jpg); }
.no-gl .cap[data-still="s2"] { background-image: url(still-s2-l.jpg); }
.no-gl .cap[data-still="c4"] { background-image: url(still-c4-l.jpg); }
.no-gl .cap[data-still="c5"] { background-image: url(still-c5-l.jpg); }
.no-gl .cap[data-still="c6"] { background-image: url(still-c6-l.jpg); }
@media (max-aspect-ratio: 9/10) {
  .no-gl .cap[data-still="c1"] { background-image: url(still-c1-p.jpg); }
  .no-gl .cap[data-still="c2"] { background-image: url(still-c2-p.jpg); }
  .no-gl .cap[data-still="c3"] { background-image: url(still-c3-p.jpg); }
  .no-gl .cap[data-still="s1"] { background-image: url(still-s1-p.jpg); }
  .no-gl .cap[data-still="s2"] { background-image: url(still-s2-p.jpg); }
  .no-gl .cap[data-still="c4"] { background-image: url(still-c4-p.jpg); }
  .no-gl .cap[data-still="c5"] { background-image: url(still-c5-p.jpg); }
  .no-gl .cap[data-still="c6"] { background-image: url(still-c6-p.jpg); }
}
