﻿@font-face {
  font-family: "WenKai";
  src: url("fonts/lxgw-wenkai-light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "WenKai";
  src: url("fonts/lxgw-wenkai-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #040404;
  --paper: #ede6d6;
  --dim: rgba(237, 230, 214, 0.5);
  --dim-2: rgba(237, 230, 214, 0.28);
  --line: rgba(237, 230, 214, 0.13);
  --red: #a6402e;
  --sans: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --mono: "JetBrains Mono", "Consolas", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--paper);
  font-family: "WenKai", "Songti SC", "SimSun", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.stage {
  position: fixed;
  inset: 0;
  isolation: isolate;
}

.aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 42% at 50% 45%, rgba(54, 116, 98, 0.22) 0%, rgba(54, 116, 98, 0) 70%),
    radial-gradient(38% 36% at 58% 38%, rgba(160, 96, 92, 0.14) 0%, rgba(160, 96, 92, 0) 70%);
}

#canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4, 4, 4, 0.9), rgba(4, 4, 4, 0));
}

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px;
  pointer-events: none;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  pointer-events: auto;
}

.back {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 6px 0;
  margin: -6px 0;
  color: var(--dim-2);
  transition: color 0.3s var(--ease);
}

.back:hover {
  color: var(--paper);
}

.sep {
  color: var(--dim-2);
}

.brand .name {
  color: var(--paper);
  font-family: "WenKai", serif;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.14em;
}

.meta {
  color: var(--dim);
}

.label {
  position: absolute;
  left: 36px;
  bottom: 34px;
  z-index: 3;
  max-width: min(540px, calc(100vw - 72px));
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 1.4s var(--ease),
    transform 1.4s var(--ease);
}

body.is-ready .label {
  opacity: 1;
  transform: none;
}

.kicker {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--dim-2);
}

h1 {
  margin: 0;
  font-size: clamp(30px, 2.4vw, 36px);
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.35;
  color: var(--paper);
}

.credit {
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.8;
  color: var(--dim);
  text-wrap: balance;
}

.license {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--dim-2);
}

.controls {
  position: absolute;
  right: 36px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.hint {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dim-2);
}

.hand {
  margin: 0;
  min-height: 24px;
  padding: 6px 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(237, 230, 214, 0.22);
  background: none;
  color: rgba(237, 230, 214, 0.5);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.hand:hover {
  color: var(--paper);
  border-color: rgba(237, 230, 214, 0.55);
}

.hand.is-on {
  color: var(--paper);
  border-color: rgba(237, 230, 214, 0.55);
}

.camera {
  position: absolute;
  right: 36px;
  bottom: 96px;
  z-index: 3;
  width: 116px;
  height: 82px;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(237, 230, 214, 0.16);
  background: #000;
}

.camera.is-on {
  display: block;
}

.camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: grayscale(1) contrast(1.1) brightness(0.8);
  opacity: 0.7;
}

.camera span {
  position: absolute;
  left: 6px;
  bottom: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(237, 230, 214, 0.6);
}

@media (max-width: 760px) {
  .top {
    padding: 20px 20px;
  }

  .label {
    left: 20px;
    bottom: 26px;
    max-width: calc(100vw - 128px);
  }

  h1 {
    font-size: 26px;
    letter-spacing: 0.12em;
  }

  .credit {
    font-size: 12px;
  }

  .license {
    font-size: 12px;
  }

  .controls {
    right: 20px;
    bottom: 26px;
    gap: 10px;
  }

  .hint {
    display: none;
  }

  .camera {
    right: 20px;
    bottom: 88px;
    width: 96px;
    height: 68px;
  }

  .meta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .label {
    transition-duration: 0.001ms;
  }
}


