/* WPS Director - Root Set #1: Classic Corporate */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --wps-red: #C8161D;
  --wps-red-dark: #A01218;
  --slate: #1F2937;
  --slate-light: #374151;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-600: #4B5563;
  --white: #FFFFFF;
  --max-width: 1120px;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(31, 41, 55, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate);
  background: var(--white);
  line-height: 1.75;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--wps-red); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--wps-red-dark); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--slate);
  text-decoration: none;
}

.logo:hover { color: var(--wps-red); }

.logo svg { flex-shrink: 0; }

.main-nav {
  display: flex;
  gap: 8px;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 8px 18px;
  border-radius: var(--radius);
  color: var(--slate-light);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  background: var(--gray-100);
  color: var(--wps-red);
}

.page-index .nav-home,
.page-download .nav-download,
.page-zhcn .nav-zhcn {
  background: var(--wps-red);
  color: var(--white) !important;
}

.page-index .nav-home:hover,
.page-download .nav-download:hover,
.page-zhcn .nav-zhcn:hover {
  background: var(--wps-red-dark);
  color: var(--white) !important;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--slate) 0%, #2D3748 45%, var(--wps-red-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 24px 72px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-lead {
  font-size: 1.125rem;
  max-width: 720px;
  margin: 0 auto 32px;
  opacity: 0.92;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--wps-red);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--wps-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 22, 29, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--slate);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-200);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9375rem;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--gray-100);
}

.section-title {
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--slate);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* Feature Grid (3-col, cards for download areas) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  box-shadow: 0 8px 32px rgba(31, 41, 55, 0.12);
  border-color: rgba(200, 22, 29, 0.25);
}

.feature-card .card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  color: var(--wps-red);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
  color: var(--slate);
}

.feature-card p {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

/* Open content sections */
.content-block {
  max-width: 880px;
  margin: 0 auto;
}

.content-block h2 {
  font-size: 1.625rem;
  margin-bottom: 20px;
  color: var(--slate);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--wps-red);
  display: inline-block;
}

.content-block h3 {
  font-size: 1.2rem;
  margin: 28px 0 12px;
  color: var(--slate-light);
}

.content-block p {
  margin-bottom: 16px;
  color: var(--gray-600);
  text-align: justify;
}

.content-block ul {
  margin: 16px 0 20px 24px;
  color: var(--gray-600);
}

.content-block li { margin-bottom: 8px; }

/* Platform download cards */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.platform-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.platform-card .platform-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: var(--slate);
}

.platform-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.platform-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 16px;
}

/* Reviews */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-item {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  border-left: 4px solid var(--wps-red);
  box-shadow: var(--shadow);
}

.review-item blockquote {
  font-style: normal;
  color: var(--gray-600);
  margin-bottom: 16px;
  font-size: 0.9375rem;
}

.review-author {
  font-weight: 600;
  color: var(--slate);
  font-size: 0.875rem;
}

.review-role {
  color: var(--gray-600);
  font-size: 0.8125rem;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 32px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--wps-red);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin-top: 8px;
}

/* Compare table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.compare-table th {
  background: var(--slate);
  color: var(--white);
  font-weight: 600;
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table td:first-child { font-weight: 600; color: var(--slate); }

/* FAQ */
.faq-list {
  max-width: 880px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}

.faq-item h3 {
  font-size: 1.05rem;
  color: var(--slate);
  margin-bottom: 12px;
}

.faq-item p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

.section-alt .faq-item { background: var(--white); }

/* Install steps */
.steps-list {
  counter-reset: step;
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
}

.steps-list li {
  position: relative;
  padding: 24px 24px 24px 72px;
  margin-bottom: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  counter-increment: step;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 24px;
  width: 36px;
  height: 36px;
  background: var(--wps-red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.steps-list li strong {
  display: block;
  margin-bottom: 8px;
  color: var(--slate);
}

.steps-list li p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

/* Changelog */
.changelog-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.changelog-box h3 {
  color: var(--wps-red);
  margin-bottom: 16px;
  font-size: 1.125rem;
}

.changelog-box ul {
  margin-left: 20px;
  color: var(--gray-600);
}

.changelog-box li { margin-bottom: 10px; }

/* Article layout (zh-cn) */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

.article-toc {
  position: sticky;
  top: 88px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 24px 20px;
  border-left: 4px solid var(--wps-red);
}

.article-toc h2 {
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.article-toc ol {
  list-style: none;
  counter-reset: toc;
}

.article-toc li {
  counter-increment: toc;
  margin-bottom: 10px;
}

.article-toc a {
  color: var(--slate-light);
  font-size: 0.875rem;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--wps-red);
  font-weight: 700;
  font-size: 0.8125rem;
  min-width: 22px;
}

.article-toc a:hover { color: var(--wps-red); }

.article-body h2 {
  font-size: 1.5rem;
  margin: 48px 0 20px;
  color: var(--slate);
  scroll-margin-top: 88px;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.15rem;
  margin: 28px 0 14px;
  color: var(--slate-light);
}

.article-body p {
  margin-bottom: 18px;
  color: var(--gray-600);
  text-align: justify;
  line-height: 1.85;
}

.article-cta {
  background: linear-gradient(135deg, var(--wps-red) 0%, var(--wps-red-dark) 100%);
  color: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  text-align: center;
  margin: 48px 0;
}

.article-cta h3 {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 1.375rem;
}

.article-cta p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  background: var(--slate);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 32px;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
}

.footer-nav a:hover { color: var(--white); }

.footer-security {
  background: rgba(255, 255, 255, 0.08);
  padding: 16px 24px;
  border-radius: var(--radius);
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* Spinner animation (used by download.js) */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 960px) {
  .feature-grid,
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 1.75rem; }
  .feature-grid,
  .review-grid,
  .platform-grid,
  .stats-row { grid-template-columns: 1fr; }
  .main-nav a { padding: 8px 12px; font-size: 0.875rem; }
  .compare-table { font-size: 0.875rem; }
  .compare-table th,
  .compare-table td { padding: 12px; }
}
