/* Same "case file" look as the game: a dark desk, grey paper, black ink, a red marker. */
:root {
  --desk: #1b1a19;
  --desk-2: #262422;
  --paper: #ecebe5;
  --paper-2: #dddbd3;
  --white: #f7f6f1;
  --ink: #171717;
  --ink-2: #484846;
  --ink-3: #7d7c77;
  --red: #d8453a;
  --red-d: #a3261d;
  --gold: #e3a12f;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 14px 30px rgba(0, 0, 0, 0.5);
  --font-head: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-num: 'Special Elite', 'Courier New', monospace;
  color-scheme: dark;
}
/* CJK fonts set curly quotes full-width, so English pages put Latin faces first. */
html[data-lang="en"] {
  --font-head: Georgia, 'Times New Roman', 'Noto Serif SC', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; color: var(--white); font-family: var(--font-body); font-size: 17px; line-height: 1.75;
  background: var(--grain), radial-gradient(ellipse at 50% 0, #2c2925, var(--desk) 70%) fixed, var(--desk);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.num { font-family: var(--font-num); font-weight: 400; letter-spacing: 0.06em; }
.soft { color: #b9b6ad; }
em { font-style: normal; color: var(--red); }
:focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 10px max(16px, calc((100% - 1180px) / 2));
  background: rgba(20, 19, 18, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 900; font-size: 18px; white-space: nowrap; }
.brand img { border-radius: 6px; }
.nav-links { display: flex; gap: 22px; margin-right: auto; }
.nav-links a { text-decoration: none; color: #c9c6bd; font-size: 15px; }
.nav-links a:hover { color: var(--white); }
.nav-end { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1.5px solid #5d5a55; border-radius: 3px; overflow: hidden; }
.lang button { padding: 3px 10px; border: 0; background: none; color: #a9a69e; font: inherit; font-size: 13px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }

/* ---------- buttons: paper slips cut on a slant, like in the game ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px;
  border: 2.5px solid var(--ink); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer;
  clip-path: polygon(0 4%, 100% 0, 98.5% 100%, 1% 96%);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5); transition: transform 0.12s;
}
.btn:hover { transform: translateY(-2px) rotate(-0.6deg); }
.btn.primary { background: var(--red); color: var(--white); }
.btn.small { padding: 6px 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn .num { font-weight: 400; opacity: 0.75; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero picture { position: absolute; inset: 0; z-index: -1; }
.hero-art { width: 100%; height: 100%; object-fit: cover; object-position: 12% 30%; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(27, 26, 25, 0.1) 30%, rgba(27, 26, 25, 0.75) 70%, var(--desk)),
              linear-gradient(to right, rgba(27, 26, 25, 0.75), transparent 55%);
}
.hero-inner { width: min(1120px, 100% - 32px); margin: 0 auto; padding: 0 0 64px; }
.logo { margin: 0 0 18px; width: min(620px, 100%); transform: rotate(-1.5deg); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6)); }
.tagline { margin: 0; font-family: var(--font-head); font-weight: 900; font-size: clamp(26px, 4vw, 44px); line-height: 1.3; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.lede { max-width: 620px; margin: 14px 0 26px; color: #dedbd2; font-size: clamp(16px, 1.6vw, 19px); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { margin: 24px 0 0; color: #a9a69e; font-size: 14px; }

/* ---------- sections ---------- */
.block { padding: clamp(56px, 9vw, 110px) 0 0; }
.two { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.two.reverse { grid-template-columns: 7fr 5fr; }
.copy p { margin: 0 0 16px; color: #dedbd2; font-size: 19px; }
.copy blockquote {
  margin: 8px 0 20px; padding: 14px 20px; border-left: 4px solid var(--red);
  background: var(--paper); color: var(--ink); font-family: var(--font-head); font-weight: 900; font-size: 22px; line-height: 1.5;
  box-shadow: var(--shadow); transform: rotate(-0.6deg);
}
.copy .punch { font-family: var(--font-head); font-weight: 900; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.4; color: var(--white); }
.copy .punch, .tagline em, .finale-line em { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 5px; text-underline-offset: 8px; }
.tagline em, .finale-line em { color: inherit; }

/* black title strip with a red underline (the store-page banner style) */
.strip { display: flex; justify-content: center; align-items: center; gap: 18px; width: min(1120px, 100% - 32px); margin: 0 auto 40px; padding: 16px 20px; background: #111; border: 1.5px solid #3b3935; box-shadow: var(--shadow); font-family: var(--font-head); font-weight: 900; font-size: clamp(22px, 3vw, 34px); line-height: 1.3; text-align: center; }
.strip::before, .strip::after { content: ''; flex: 0 1 90px; height: 1.5px; background: #8d8a83; }
.strip span { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 5px; text-underline-offset: 10px; }

/* paper */
.paper {
  position: relative; color: var(--ink);
  background: var(--grain), radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.35), transparent 60%), var(--paper);
  border: 2.5px solid var(--ink); border-radius: 2px 4px 3px 5px / 4px 2px 5px 3px;
  box-shadow: var(--shadow), inset 0 0 36px rgba(90, 80, 50, 0.12);
}
.tilt-l { transform: rotate(-1deg); }
.tilt-r { transform: rotate(0.8deg); }
.tape { position: absolute; top: -12px; left: 50%; width: 96px; height: 24px; margin-left: -48px; background: rgba(236, 228, 196, 0.8); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); clip-path: polygon(3% 0, 97% 6%, 100% 50%, 96% 100%, 2% 94%, 0 45%); transform: rotate(-3deg); }
.clip { position: absolute; top: -18px; left: 28px; z-index: 3; width: 18px; height: 48px; border: 3px solid #8f8f8f; border-radius: 10px; box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4); }
.clip::after { content: ''; position: absolute; inset: 6px 2px 9px; border: 2.5px solid #a9a9a9; border-radius: 6px; }
.pin { position: absolute; top: -8px; right: 34px; z-index: 3; width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.45); }

.case-note { padding: 34px 32px 26px; }
.case-note h2 { margin: 2px 0 14px; font-family: var(--font-head); font-weight: 900; font-size: clamp(26px, 3vw, 34px); line-height: 1.3; }
.case-note p { margin: 0 0 12px; color: var(--ink-2); }
.stamp { display: inline-block; margin: 0; padding: 2px 10px; border: 2px solid var(--red-d); color: var(--red-d); font-size: 14px; transform: rotate(-2deg); }

/* video frames */
.clip-frame { margin: 0; padding: 8px; background: #0d0d0c; border: 1.5px solid #3b3935; box-shadow: var(--shadow); }
.clip-frame video { width: 100%; height: auto; aspect-ratio: 1170 / 494; object-fit: cover; background: #000; }
#case .clip-frame video { aspect-ratio: 1170 / 584; }
.clip-frame.inset { margin: 0 0 18px; padding: 5px; }

/* the two sides */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.side { padding: 26px 26px 22px; }
.side-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; padding: 6px 14px; background: var(--ink); color: var(--white); font-family: var(--font-head); font-weight: 900; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35; }
.side-head .num { color: var(--gold); font-size: 0.75em; }
.side ul { margin: 0 0 16px; padding: 0; list-style: none; }
.side li { position: relative; margin: 0 0 8px; padding-left: 26px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.side li::before { content: '✕'; position: absolute; left: 2px; top: 0; color: var(--red); font-weight: 900; }
.det li::before { content: '?'; color: #1b6e92; font-family: var(--font-head); }
.win { margin: 0; padding-top: 12px; border-top: 1.5px dashed var(--ink-3); font-weight: 900; font-size: 17px; }

/* gallery */
.label { margin: 0 0 22px; color: #a9a69e; font-size: 16px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery button { padding: 5px; border: 1.5px solid #3b3935; background: #0d0d0c; cursor: zoom-in; box-shadow: var(--shadow); transition: transform 0.15s; }
.gallery button:hover { transform: scale(1.02) rotate(-0.4deg); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* facts */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1.5px solid #3b3935; border-bottom: 1.5px solid #3b3935; }
.facts > div { padding: 22px 18px; border-left: 1.5px solid #3b3935; }
.facts > div:first-child { border-left: 0; }
.facts dt { color: #a9a69e; font-size: 14px; }
.facts dd { margin: 4px 0 0; }
.facts b { display: block; font-size: 30px; line-height: 1.3; color: var(--white); }
.facts span { color: #c9c6bd; font-size: 15px; line-height: 1.5; }

/* finale */
.finale { position: relative; margin-top: clamp(64px, 10vw, 120px); min-height: 520px; display: grid; place-items: center; overflow: hidden; isolation: isolate; text-align: center; }
.finale-art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.finale::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, var(--desk) 2%, rgba(27, 26, 25, 0.4) 38%, rgba(27, 26, 25, 0.55) 70%, var(--desk)); }
.finale-inner { padding: 64px 16px; }
.finale-line { margin: 0 0 28px; font-family: var(--font-head); font-weight: 900; font-size: clamp(30px, 5vw, 56px); line-height: 1.3; text-shadow: 0 3px 20px rgba(0, 0, 0, 0.8); }
.finale .actions { justify-content: center; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; width: min(1120px, 100% - 32px); margin: 0 auto; padding: 28px 0 36px; color: #8d8a83; font-size: 14px; }
.foot p { margin: 0; }

/* dialogs */
dialog { padding: 0; border: 0; background: transparent; max-width: min(1200px, 100vw - 32px); width: 100%; overflow: visible; }
dialog::backdrop { background: rgba(10, 10, 10, 0.88); }
dialog video, dialog img { width: 100%; max-height: calc(100vh - 100px); object-fit: contain; background: #000; border: 1.5px solid #3b3935; }
dialog .close { position: absolute; top: -44px; right: 0; width: 36px; height: 36px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 18px; cursor: pointer; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .two, .two.reverse, .sides { grid-template-columns: 1fr; }
  .two.reverse .clip-frame { order: 2; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { border-left: 0; }
  .facts > div:nth-child(n + 3) { border-top: 1.5px solid #3b3935; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand span { display: none; }
  .hero { min-height: 88vh; }
  .hero-art { object-position: 60% 20%; }
  .hero::after { background: linear-gradient(to bottom, rgba(27, 26, 25, 0.05) 20%, rgba(27, 26, 25, 0.85) 58%, var(--desk)); }
  .hero-inner { padding-bottom: 40px; }
  .strip::before, .strip::after { display: none; }
  .copy p { font-size: 17px; }
  .case-note, .side { padding: 26px 18px 20px; }
  .gallery { gap: 10px; }
  .btn { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery button { transition: none; }
}
