:root {
  --accent: #f26c1c;
  --accent-deep: #d15900;
  --text: #efefef;
  --muted: rgba(239, 239, 239, 0.62);
  --bg: #050a09;
  --panel: rgba(8, 16, 16, 0.94);
  --line: rgba(219, 218, 218, 0.22);
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --nav-h: 4.875rem;
  --rail-w: 6.25rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow: hidden;
}

body {
  background:
    radial-gradient(ellipse at 70% 40%, rgba(50, 81, 86, 0.28), transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(14, 25, 29, 0.9), transparent 50%),
    var(--bg);
}

.grid,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid {
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 119px,
    rgba(219, 218, 218, 0.06) 119px,
    rgba(219, 218, 218, 0.06) 120px
  );
}

.grain {
  opacity: 0.07;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.15) 0,
    rgba(255, 255, 255, 0.15) 1px,
    transparent 1px,
    transparent 3px
  );
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem 0 1.75rem;
  background: rgba(5, 10, 9, 0);
  transition: background-color 0.3s var(--ease);
}

body.is-open .topbar {
  background: rgba(5, 10, 9, 0.9);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  z-index: 1;
}

.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 62%, 62% 100%, 0 100%);
  margin-right: 2px;
}

.brand-en {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-zh {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.top-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 10px;
}

.top-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  min-width: 65px;
  padding: 0 8px;
  cursor: pointer;
  position: relative;
}

.top-nav button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 70%;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  opacity: 0;
  transition: width 0.3s var(--ease), opacity 0.3s var(--ease);
}

.top-nav button:hover::after,
.top-nav button.is-active::after {
  width: 100%;
  opacity: 1;
}

.top-nav button.is-active {
  color: var(--accent);
  transition: color 0.3s var(--ease);
}

.top-nav button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.hero {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 8vw 14vh calc(var(--rail-w) + 8vw);
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}

body.is-open .hero {
  opacity: 0.28;
  filter: blur(2px);
}

.slogan {
  font-size: 14px;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(52px, 10.5vw, 160px);
  font-weight: 200;
  line-height: 0.85;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}

.hero h1 span {
  color: var(--accent);
  font-weight: 700;
}

.hero-sub {
  margin-top: 22px;
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.rail {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 0 12px;
}

.rail button {
  appearance: none;
  border: 0;
  height: 72px;
  width: 100%;
  background: #141616;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: skewX(-12deg);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.rail button span {
  display: inline-block;
  transform: skewX(12deg);
}

.rail button:hover {
  background: #325156;
}

.rail button.is-active {
  background: var(--accent);
  color: #fff;
}

.rail button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 2px;
}

.scene {
  position: fixed;
  top: var(--nav-h);
  left: var(--rail-w);
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.48s var(--ease);
}

body.is-open .scene { opacity: 1; }

.scene-shot {
  position: absolute;
  inset: 0;
  background-color: var(--bg);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.48s var(--ease);
}

body.is-open .scene-shot {
  clip-path: inset(0 0 0 0);
}

.scene-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 10, 9, 0.4) 0%, transparent 46%);
  pointer-events: none;
}

.stage {
  position: fixed;
  top: var(--nav-h);
  left: var(--rail-w);
  right: 0;
  bottom: 0;
  z-index: 20;
  pointer-events: none;
}

body.is-open .stage { pointer-events: auto; }

.lead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  left: 0;
  background: var(--accent);
  transform: skewX(-14deg);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}

body.is-open .lead {
  animation: leadMove 0.5s var(--ease) forwards;
}

@keyframes leadMove {
  0% { left: -20px; opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% + 10px); opacity: 0; }
}

.dossier {
  position: relative;
  height: 100%;
  width: min(820px, 100%);
  background: var(--panel);
  border-right: 1px solid var(--line);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.48s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 72px;
}

body.is-open .dossier {
  clip-path: inset(0 0 0 0);
}

.ticks {
  position: absolute;
  inset: 18px 22px;
  pointer-events: none;
}

.ticks span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--line);
  border-style: solid;
}

.ticks .tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.ticks .tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.ticks .bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.ticks .br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

.kicker {
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 16px;
}

.dossier h2 {
  font-size: clamp(56px, 8vw, 92px);
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: #fff;
}

.dossier h3 {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.rule {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 28px 0;
}

.links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 240px;
  height: 44px;
  padding: 0 22px;
  color: #1a1a1a;
  background: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  overflow: hidden;
  isolation: isolate;
}

.links a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition: clip-path 0.3s var(--ease);
  z-index: -1;
}

.links a:hover::before,
.links a:focus-visible::before {
  clip-path: polygon(0 0, 92% 0, 80% 100%, 0 100%);
}

.links a:hover,
.links a:focus-visible {
  color: #fff;
  outline: none;
}

.close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.close::before,
.close::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: currentColor;
  top: 50%;
}

.close::before { transform: rotate(45deg); }
.close::after { transform: rotate(-45deg); }

.close:hover { color: var(--accent); border-color: var(--accent); }
.close:focus-visible { outline: 1px solid var(--accent); }

.cut {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 28vw;
  height: 48px;
  background: #ececec;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 15;
  pointer-events: none;
  opacity: 0.92;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .dossier { clip-path: inset(0 0 0 0); }
  body:not(.is-open) .dossier { clip-path: inset(0 100% 0 0); }
  .scene-shot { clip-path: inset(0 0 0 0); }
  body:not(.is-open) .scene-shot { clip-path: inset(0 100% 0 0); }
}

@media (max-width: 720px) {
  :root { --rail-w: 0px; }
  .topbar { padding: 0 1rem; }
  .top-nav { display: none; }
  .rail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    padding: 8px 10px 10px;
    background: rgba(5, 10, 9, 0.92);
  }
  .rail button {
    height: 100%;
    writing-mode: horizontal-tb;
    font-size: 12px;
  }
  .hero, .stage, .scene { left: 0; }
  .scene { bottom: 64px; }
  .hero { padding: 0 8vw 18vh; }
  .dossier { padding: 48px 28px; width: 100%; }
  .hero h1 { font-size: 48px; }
}


body.page-error {
  overflow: auto;
}

body.page-error .hero {
  padding-left: 8vw;
}

.hero-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: 28px;
  min-width: 200px;
  height: 44px;
  padding: 0 22px;
  color: #1a1a1a;
  background: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  overflow: hidden;
  isolation: isolate;
}

.hero-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition: clip-path 0.3s var(--ease);
  z-index: -1;
}

.hero-link:hover::before,
.hero-link:focus-visible::before {
  clip-path: polygon(0 0, 92% 0, 80% 100%, 0 100%);
}

.hero-link:hover,
.hero-link:focus-visible {
  color: #fff;
  outline: none;
}


.archive-link {
  margin-left: 24px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.archive-link:hover,
.archive-link:focus-visible {
  color: var(--accent);
  outline: none;
}
