/* ============================================================
   WPS Office Landing Pages - Global Styles
   Pure CSS, no frameworks
   ============================================================ */

/* ---------- CSS Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ---------- Design Tokens ---------- */
:root {
  --primary: #D92B2B;
  --primary-dark: #B71C1C;
  --primary-light: #FF5252;
  --accent: #FF6B35;
  --text-main: #1a1a1a;
  --text-body: #4a4a4a;
  --text-muted: #888;
  --text-light: #aaa;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-soft: #f0f2f5;
  --bg-warm: #faf7f5;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --max-width: 1200px;
  --nav-height: 68px;
}

/* ---------- Animations ---------- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.8s ease forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.8s ease forwards;
}

/* ---------- Layout Utilities ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 43, 43, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 43, 43, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--border);
}

/* ---------- Grid ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.nav-brand svg {
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(217, 43, 43, 0.06);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(217, 43, 43, 0.1);
  font-weight: 600;
}

.nav-cta {
  margin-left: 12px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--text-main);
  color: #aaa;
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #999;
  max-width: 280px;
}

.footer-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: #999;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.6;
  max-width: 700px;
}

.footer-legal strong {
  color: #aaa;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile Menu ---------- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: all 0.3s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
