:root {
  color-scheme: dark;
  --bg: #101116;
  --bg-soft: #171922;
  --panel: #202431;
  --panel-strong: #2a2f3f;
  --text: #f6f2eb;
  --muted: #b7bac4;
  --line: rgba(255, 255, 255, 0.14);
  --rose: #ff8fb3;
  --amber: #ffb86b;
  --cyan: #86d7ee;
  --green: #90d39c;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #11131a 0%, var(--bg) 38%, #0d0f13 100%);
  color: var(--text);
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", "Noto Sans SC", "PingFang SC",
    Arial, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  transform: translateY(-140%);
  padding: 0.65rem 0.85rem;
  border-radius: 0.4rem;
  background: var(--text);
  color: #11131a;
  font-weight: 700;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  min-height: 4.5rem;
  margin: 0 auto;
  padding: 0.75rem 0;
  backdrop-filter: blur(18px);
}

.site-header::before {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4.5rem;
  content: "";
  pointer-events: none;
  background: rgba(16, 17, 22, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease, background 160ms ease;
  z-index: -1;
}

.site-header.is-scrolled::before {
  background: rgba(16, 17, 22, 0.92);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--rose), var(--cyan));
  color: #11131a;
  font-size: 1.2rem;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.52rem 0.72rem;
  border-radius: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

.site-nav .nav-play {
  margin-left: 0.25rem;
  background: rgba(255, 143, 179, 0.16);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.05rem;
  height: 2px;
  margin: 0.22rem auto;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 4.5rem);
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(16, 17, 22, 0.88) 0%, rgba(16, 17, 22, 0.58) 45%, rgba(16, 17, 22, 0.42) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(16, 17, 22, 0) 46%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) 0 clamp(2.25rem, 6vh, 4.5rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 8ch;
  margin: 0;
  font-size: clamp(4.5rem, 13vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 45rem;
  margin: 1.4rem 0 0;
  color: #eee8df;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  background: var(--text);
  color: #11131a;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 9.5rem));
  gap: 0.75rem;
  max-width: 36rem;
  margin: clamp(2rem, 4vh, 3rem) 0 0;
}

.hero-stats div {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(16, 17, 22, 0.52);
}

.hero-stats dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.hero-stats dd {
  margin: 0.18rem 0 0;
  font-weight: 800;
}

.section {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 1.6rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.story-grid,
.feature-list,
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.story-panel,
.feature-list article,
.download-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
}

.story-panel {
  min-height: 15rem;
  padding: 1.25rem;
}

.story-panel.highlight {
  background: linear-gradient(180deg, rgba(255, 143, 179, 0.16), rgba(255, 255, 255, 0.06));
}

.story-panel h3,
.feature-list h3,
.download-card h3,
.character-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.story-panel p,
.feature-list p,
.download-card p,
.character-card p {
  color: var(--muted);
}

.story-panel p,
.feature-list p {
  margin-bottom: 0;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.character-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--panel);
}

.character-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.character-card div {
  padding: 1.1rem;
}

.route-label,
.platform {
  margin: 0 0 0.5rem;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
}

.feature-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-list article {
  min-height: 15.5rem;
  padding: 1.1rem;
}

.feature-number {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--rose);
  font-size: 0.8rem;
  font-weight: 900;
}

.screenshots {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100% - var(--max)) / 2));
  padding-left: max(1rem, calc((100% - var(--max)) / 2));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.screenshot-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 1rem;
  align-items: stretch;
}

.screenshot-frame {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #11131a;
}

.screenshot-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.screenshot-frame figcaption {
  padding: 0.85rem 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.screenshot-tabs {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.screenshot-tabs button {
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.screenshot-tabs button:hover,
.screenshot-tabs button:focus-visible,
.screenshot-tabs button.is-active {
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--panel-strong);
  color: var(--text);
  outline: none;
}

.download-card {
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.2rem;
}

.download-card p:not(.platform) {
  margin-bottom: 1.3rem;
}

.download-card .button,
.status-pill {
  margin-top: auto;
}

code {
  padding: 0.1rem 0.32rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.status-pill {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 184, 107, 0.42);
  border-radius: 999px;
  color: var(--amber);
  font-weight: 900;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 4.2rem;
    right: 0;
    display: none;
    width: min(20rem, calc(100vw - 2rem));
    padding: 0.55rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    background: rgba(23, 25, 34, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 0.8rem;
  }

  .site-nav .nav-play {
    margin-left: 0;
  }

  .story-grid,
  .character-grid,
  .download-grid,
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }

  .screenshot-viewer {
    grid-template-columns: 1fr;
  }

  .screenshot-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screenshot-tabs button {
    text-align: center;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 5.25rem;
  }

  .hero-stats,
  .story-grid,
  .character-grid,
  .feature-list,
  .download-grid,
  .screenshot-tabs {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-stats {
    max-width: none;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
