/* =========================================
   WPS CG - Shared Design System
   ========================================= */

:root {
  --brand: #2563EB;
  --brand-hover: #1D4ED8;
  --brand-light: #EFF6FF;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --text-secondary: #475569;
  --mono: 'SF Mono', Consolas, 'Courier New', monospace;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--header-height);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus-visible { color: var(--brand-hover); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; color: var(--text); }
p { margin-bottom: 1rem; color: var(--text-secondary); }
ul, ol { padding-left: 1.25rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; color: var(--text-secondary); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-header h2 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* Typography Scale */
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); text-wrap: balance; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }
.subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; text-wrap: balance; }

/* Header & Navigation */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); height: var(--header-height); }
nav { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.logo img { height: 32px; width: auto; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; position: relative; padding: 0.25rem 0; }
.nav-links a:hover, .nav-links [aria-current="page"] { color: var(--brand); }
.nav-links [aria-current="page"]::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--brand); border-radius: 2px; }

/* Footer */
footer { background: #0B1120; color: #94A3B8; padding: 4.5rem 0 2rem; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-col h4 { color: #F1F5F9; margin-bottom: 1.25rem; font-size: 1rem; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { color: #94A3B8; transition: color var(--transition); }
.footer-col a:hover { color: #F8FAFC; }
.copyright { text-align: center; padding-top: 2rem; border-top: 1px solid #1E293B; color: #64748B; font-size: 0.85rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.75rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; cursor: pointer; transition: all var(--transition); border: none; text-decoration: none; line-height: 1; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.25); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* Cards & Grids */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.75rem; transition: all var(--transition); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #CBD5E1; }
.card-icon { width: 48px; height: 48px; background: var(--brand-light); color: var(--brand); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.card-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.6rem; color: var(--text); }
.card-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }

/* Tables */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin: 1.5rem 0; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #F1F5F9; font-weight: 600; color: var(--text); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td { color: var(--text-secondary); }

/* FAQ */
.faq-list { max-width: 800px; margin: 2rem auto 0; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.75rem; overflow: hidden; transition: border-color var(--transition); }
details:hover { border-color: #CBD5E1; }
summary { padding: 1.1rem 1.25rem; cursor: pointer; font-weight: 500; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; transition: background var(--transition); user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; color: var(--brand); font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
summary:hover { background: #F8FAFC; }
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); line-height: 1.65; }

/* Tags */
.tag-mono { font-family: var(--mono); font-size: 0.8rem; color: var(--brand); background: var(--brand-light); padding: 0.25rem 0.6rem; border-radius: 4px; display: inline-block; margin-bottom: 0.75rem; letter-spacing: 0.02em; }

/* SVG Animation Utilities */
@media (prefers-reduced-motion: reduce) {
  .animate-draw, .animate-progress, .fade-up { animation: none !important; opacity: 1 !important; transform: none !important; }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes progressDash {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0.3; }
  100% { stroke-dashoffset: 1; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.svg-draw path { animation: drawLine 4s ease-in-out infinite alternate; }
.svg-progress circle { animation: progressDash 7s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.svg-spin { animation: spinSlow 15s linear infinite; transform-origin: center; transform-box: fill-box; }

/* Layout Helpers */
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 1rem; }
.text-muted { color: var(--text-secondary); }
.divider { height: 1px; background: var(--border); margin: 3rem 0; }

/* Responsive Adjustments */
@media (max-width: 768px) {
  :root { --header-height: 64px; }
  section { padding: 3.5rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
  .nav-links span { display: none; } /* Hide text on very small screens if needed, or rely on CSS hiding */
  .hero-svg { max-width: 320px; }
}
