/* ============================================
   WPS Office Landing Page - Global Styles
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --color-bg: #ffffff;
  --color-bg-gray: #f2f2f2;
  --color-text: #333333;
  --color-text-dark: #000000;
  --color-text-secondary: #86868b;
  --color-accent: #c8102e;
  --color-accent-dark: #a00d24;
  --color-border: rgba(0, 0, 0, 0.1);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --section-padding: 120px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ---- Spin Animation (Global) ---- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Layout Utilities ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding {
  padding: var(--section-padding) 0;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text-dark);
  line-height: 1.2;
}

h1 { font-size: clamp(40px, 5vw, 64px); }
h2 { font-size: clamp(32px, 4vw, 48px); }
h3 { font-size: clamp(24px, 3vw, 32px); }

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 16px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.3);
}

.btn-ghost {
  border: 1.5px solid var(--color-text-dark);
  color: var(--color-text-dark);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--color-text-dark);
  color: #fff;
}

.btn-white-ghost {
  border: 1.5px solid #fff;
  color: #fff;
  background: transparent;
}

.btn-white-ghost:hover {
  background: #fff;
  color: var(--color-text-dark);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s ease;
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--color-accent);
}

.navbar-logo svg {
  width: 28px;
  height: 28px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-dark);
  transition: color 0.2s ease;
  position: relative;
}

.navbar-links a:hover {
  color: var(--color-accent);
}

.navbar-links a.active {
  color: var(--color-accent);
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.navbar-cta {
  padding: 8px 20px;
  font-size: 13px;
}

/* ---- Footer ---- */
.footer {
  background: var(--color-bg-gray);
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.footer-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.footer-security svg {
  width: 16px;
  height: 16px;
  color: #34c759;
  flex-shrink: 0;
}

.footer-copyright {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Cards ---- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* ---- Tables ---- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  font-weight: 600;
  color: var(--color-text-dark);
  background: var(--color-bg-gray);
}

.comparison-table .highlight-row {
  background: rgba(200, 16, 46, 0.05);
}

.comparison-table .check-icon {
  color: var(--color-accent);
}

.comparison-table .cross-icon {
  color: var(--color-text-secondary);
}

/* ---- FAQ Accordion ---- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: color 0.2s ease;
  text-align: left;
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--color-text-secondary);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 24px;
}

.faq-answer p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ---- Star Rating ---- */
.star-rating {
  display: flex;
  gap: 3px;
}

.star-rating svg {
  width: 16px;
  height: 16px;
  fill: #ffb800;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }

  .navbar-links {
    display: none;
  }

  .navbar-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .comparison-table {
    font-size: 13px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 12px 16px;
  }
}

/* ---- Mobile Menu Button ---- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 1px;
}

/* ---- Download Overlay ---- */
.download-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.download-overlay.active {
  opacity: 1;
}

/* ---- Scroll Reveal Base ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* ---- Lenis ---- */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}
