:root {
  --bg: #090d16;
  --bg-elevated: #101725;
  --bg-panel: #151e2e;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(226, 176, 85, 0.42);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #e2b055;
  --accent-hover: #ecc273;
  --accent-ink: #0b0f17;
  --ice: #38bdf8;

  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;

  /* Strictly 3 font-size steps below the hero */
  --text-heading: clamp(1.625rem, 2.7vw, 2.25rem);
  --text-body: 1rem;
  --text-sm: 0.875rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container-max: 1180px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.68;
  font-variant-numeric: tabular-nums;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.container {
  width: min(var(--container-max), calc(100% - 48px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out);
}

.site-header.is-scrolled,
.site-header.is-drawer-open {
  background-color: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: var(--text-body);
  font-weight: 500;
  color: rgba(241, 245, 249, 0.86);
  white-space: nowrap;
  transition: color 180ms var(--ease-out);
}

.nav-link:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background-color: rgba(16, 23, 37, 0.78);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
}

.lang-btn {
  border: 0;
  border-radius: 4px;
  background-color: transparent;
  color: var(--text-muted);
  padding: 5px 11px;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  background-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background-color: var(--accent);
  color: var(--accent-ink);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: rgba(16, 23, 37, 0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.nav-toggle:hover {
  border-color: var(--accent);
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background-color: var(--text);
  border-radius: 1px;
  transition: transform 200ms var(--ease-out), opacity 160ms var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-drawer {
  background-color: rgba(9, 13, 22, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-nav-link {
  font-size: var(--text-body);
  color: var(--text);
  padding-block: 6px;
  border-bottom: 1px solid var(--border);
}

.mobile-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.mobile-lang-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-top: 96px;
  padding-bottom: clamp(56px, 10vh, 108px);
  background:
    radial-gradient(ellipse 80% 55% at 50% 24%, rgba(56, 189, 248, 0.14), transparent 65%),
    radial-gradient(ellipse 65% 45% at 50% 60%, rgba(226, 176, 85, 0.12), transparent 68%),
    #090d16;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(9, 13, 22, 0.44) 0%,
    rgba(9, 13, 22, 0.16) 38%,
    rgba(9, 13, 22, 0.72) 72%,
    rgba(9, 13, 22, 0.94) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-phrase {
  display: inline-block;
}

.hero-subtitle {
  margin: 0 auto 30px;
  max-width: 44ch;
  font-size: var(--text-body);
  line-height: 1.65;
  color: rgba(241, 245, 249, 0.92);
}

.hero-cta {
  padding: 13px 30px;
}

/* Content Sections */
.section {
  padding-block: clamp(72px, 9vw, 112px);
  border-top: 1px solid var(--border);
  scroll-margin-top: 74px;
}

.section-controller,
.section-faq {
  background-color: var(--bg);
}

.section-gameplay,
.section-pricing {
  background-color: var(--bg-elevated);
}

.section-gameplay {
  background-color: var(--bg-panel);
}

.section-heading {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-intro {
  margin: 0 0 36px;
  max-width: 65ch;
  font-size: var(--text-body);
  color: var(--text-muted);
}

/* Connected Segmented Controls */
.segmented-bar {
  display: inline-flex;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  background-color: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 28px;
}

.segmented-bar::-webkit-scrollbar {
  display: none;
}

.segmented-item {
  border: 0;
  border-radius: 5px;
  background-color: transparent;
  color: var(--text-muted);
  padding: 9px 18px;
  font-size: var(--text-body);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}

.segmented-item:hover {
  color: var(--text);
}

.segmented-item.is-active {
  background-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* Controller Stage */
.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.screenshot-frame {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
}

.screenshot-frame img {
  width: 100%;
  height: auto;
}

.stage-detail {
  min-width: 0;
}

.detail-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--accent);
}

.detail-copy {
  margin: 0 0 18px;
  max-width: 65ch;
  font-size: var(--text-body);
  color: var(--text);
}

.detail-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--text-body);
  color: var(--text-muted);
  max-width: 65ch;
}

.detail-list li::marker {
  color: var(--accent);
}

/* In-Game Visual Gallery (Asymmetric 1.75fr / 1fr / 1fr matches natural aspect ratios) */
.game-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.gallery-figure {
  margin: 0;
  min-width: 0;
}

.gallery-frame {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.gallery-frame img {
  width: 100%;
  height: auto;
  transition: transform 240ms var(--ease-out);
}

.gallery-figure:hover .gallery-frame img {
  transform: scale(1.02);
}

.gallery-caption {
  padding-top: 14px;
}

.gallery-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--accent);
}

.gallery-copy {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-muted);
}

/* Asymmetric / Hairline Editorial Grid for Core Gameplay */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.editorial-item {
  padding: 32px 32px 32px 0;
  border-bottom: 1px solid var(--border);
}

.editorial-item:nth-child(even) {
  padding: 32px 0 32px 36px;
  border-left: 1px solid var(--border);
}

.item-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--text);
}

.item-copy {
  margin: 0;
  max-width: 65ch;
  font-size: var(--text-body);
  color: var(--text-muted);
}

/* Pricing Comparison (3 Tiers, Tonal Surface Contrast) */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pricing-column {
  background-color: var(--bg);
  border-top: 2px solid var(--border);
  padding: 30px 26px;
  border-radius: 0 0 8px 8px;
}

.pricing-column-updated {
  background-color: #0d1421;
  border-top-color: var(--ice);
}

.pricing-column-featured {
  background-color: var(--bg-panel);
  border-top-color: var(--accent);
}

.pricing-name {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--text);
}

.pricing-price {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 700;
  color: var(--accent);
}

.pricing-column-updated .pricing-price {
  color: var(--ice);
}

.pricing-desc {
  margin: 0 0 22px;
  max-width: 65ch;
  font-size: var(--text-body);
  color: var(--text-muted);
}

/* FAQ Accordion (<details>/<summary>) */
.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-answer {
  padding: 0 0 22px;
  max-width: 65ch;
}

.faq-answer p {
  margin: 0;
  font-size: var(--text-body);
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--bg);
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-top {
  font-size: var(--text-sm);
  color: var(--accent);
  transition: color 180ms var(--ease-out);
}

.footer-top:hover {
  color: var(--accent-hover);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .site-nav,
  .header-actions .lang-switch {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .stage-grid {
    grid-template-columns: 1fr;
  }

  .game-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-figure-wide {
    grid-column: 1 / -1;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .editorial-item,
  .editorial-item:nth-child(even) {
    padding: 24px 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .segmented-bar {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    overflow-x: visible;
    gap: 4px;
  }

  .segmented-item {
    padding: 8px 12px;
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(var(--container-max), calc(100% - 32px));
  }

  .hero {
    padding-bottom: 56px;
  }

  .hero-subtitle {
    max-width: 18em;
  }

  .game-gallery {
    grid-template-columns: 1fr;
  }

  .pricing-column {
    padding: 24px 20px;
  }
}

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

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