:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-soft: #111418;
  --panel: rgba(18, 22, 27, 0.84);
  --panel-solid: #151a20;
  --text: #f4efe8;
  --muted: #b8b1a5;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --red: #df392d;
  --red-dark: #8b1e1b;
  --gold: #d8ac59;
  --cyan: #55c2d1;
  --green: #49a06b;
  --shadow: rgba(0, 0, 0, 0.36);
  --max: 1180px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(8, 9, 11, 0.62), #08090b 720px),
    radial-gradient(circle at 78% 12%, rgba(223, 57, 45, 0.16), transparent 34rem),
    linear-gradient(135deg, #08090b 0%, #111418 46%, #0b0d0f 100%);
  font-size: 16px;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 76%);
  opacity: 0.34;
  z-index: 0;
}

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

button,
audio {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 66px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  background: rgba(8, 9, 11, 0.36);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(8, 9, 11, 0.88);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(216, 172, 89, 0.9);
  background:
    linear-gradient(135deg, rgba(223, 57, 45, 0.95), rgba(216, 172, 89, 0.88)),
    #2b0d0b;
  transform: rotate(45deg);
  box-shadow: 0 0 24px rgba(223, 57, 45, 0.42);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  padding: 8px 12px;
  color: rgba(244, 239, 232, 0.82);
  font-size: 14px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 78svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 118px clamp(18px, 5vw, 70px) 58px;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("./hero-red-oath.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 7, 9, 0.94) 0%, rgba(5, 7, 9, 0.76) 33%, rgba(5, 7, 9, 0.2) 72%),
    linear-gradient(0deg, rgba(8, 9, 11, 0.96), transparent 32%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.66), transparent 26%);
}

.hero-content {
  width: min(720px, 100%);
  position: relative;
}

.eyebrow,
.section-kicker,
.role {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 14px 36px var(--shadow);
}

.hero-copy {
  margin: 24px 0 0;
  max-width: 660px;
  color: rgba(244, 239, 232, 0.9);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.copy-link {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  padding: 10px 18px;
  color: var(--text);
  background: rgba(17, 20, 24, 0.76);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.primary-action {
  border-color: rgba(216, 172, 89, 0.72);
  background: linear-gradient(135deg, #c82f25, #8f201c 54%, #2a1210);
}

.secondary-action:hover,
.primary-action:hover,
.copy-link:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
}

.hero-facts div {
  min-width: 136px;
  padding: 14px 16px;
  border-left: 2px solid var(--red);
  background: rgba(8, 9, 11, 0.46);
}

.hero-facts dt {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.hero-facts dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.signal-band {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(139, 30, 27, 0.4), rgba(20, 44, 48, 0.36), rgba(73, 160, 107, 0.22));
}

.signal-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0;
}

.signal-inner p {
  margin: 0;
  color: rgba(244, 239, 232, 0.92);
}

.section {
  position: relative;
  z-index: 1;
  padding: 88px 0;
}

.section-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.section h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p,
.prose p,
.muted,
.trailer-copy p {
  color: var(--muted);
}

.section-heading p {
  margin: 16px 0 0;
  font-size: 17px;
}

.prose p:first-child,
.trailer-copy p:first-child {
  margin-top: 0;
}

.world-section {
  background:
    linear-gradient(180deg, rgba(8, 9, 11, 0.96), rgba(17, 20, 24, 0.82)),
    linear-gradient(90deg, rgba(223, 57, 45, 0.08), transparent);
}

.heroes-section,
.trailer-section {
  background: #0b0d0f;
}

.systems-section,
.controls-section {
  background: linear-gradient(180deg, #111418, #090b0d);
}

.hero-grid,
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hero-card,
.system-card,
.control-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.hero-card,
.system-card {
  min-height: 258px;
  padding: 24px;
}

.hero-card {
  display: flex;
  flex-direction: column;
}

.hero-card h3,
.system-card h3,
.control-card h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.hero-card p:not(.role),
.system-card p {
  margin: 16px 0 0;
  color: var(--muted);
}

.hero-card span {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  color: var(--cyan);
  font-size: 14px;
}

.map-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.map-strip div {
  min-height: 118px;
  padding: 18px;
  background: rgba(8, 9, 11, 0.74);
}

.map-strip strong,
.map-strip span {
  display: block;
}

.map-strip strong {
  color: var(--gold);
}

.map-strip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.trailer-player {
  width: 100%;
  margin-top: 18px;
  accent-color: var(--red);
}

.trailer-copy {
  padding: 28px;
  border-left: 2px solid var(--gold);
  background: rgba(17, 20, 24, 0.6);
}

.control-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.control-card {
  padding: 24px;
}

.full-span {
  grid-column: 1 / -1;
}

.control-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.control-list p {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.control-list p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.control-list strong,
.key-grid span {
  color: var(--gold);
}

.control-list span,
.key-grid p {
  color: var(--muted);
}

.key-grid {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 0;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.key-grid span,
.key-grid p {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.46);
}

.key-grid span {
  font-weight: 700;
  border-right: 1px solid var(--line);
  background: rgba(139, 30, 27, 0.16);
}

.key-grid span:nth-last-child(2),
.key-grid p:last-child {
  border-bottom: 0;
}

.key-grid.compact {
  grid-template-columns: 180px minmax(0, 1fr);
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: #08090b;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  color: var(--muted);
}

.copy-link {
  min-height: 34px;
  padding: 4px 10px;
  color: var(--text);
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: calc(100% - 36px);
  padding: 10px 16px;
  border: 1px solid rgba(216, 172, 89, 0.55);
  border-radius: 8px;
  color: var(--text);
  background: rgba(8, 9, 11, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 92px;
    gap: 8px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: 78svh;
    padding-top: 142px;
  }

  .two-column,
  .hero-grid,
  .system-grid,
  .control-layout,
  .map-strip {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .system-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    padding: 12px 16px;
  }

  .nav-links a {
    padding: 6px 8px;
    font-size: 13px;
  }

  .hero {
    min-height: 76svh;
    padding: 138px 18px 42px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    text-align: center;
  }

  .section {
    padding: 62px 0;
  }

  .section h2 {
    font-size: 32px;
  }

  .control-list p,
  .key-grid,
  .key-grid.compact {
    grid-template-columns: 1fr;
  }

  .key-grid span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .key-grid p {
    border-bottom: 1px solid var(--line);
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
