/* ============================================================================
   WPS Office - Global Styles
   Theme: Earth Tones & Natural Texture
   ========================================================================== */

/* --- Design Variables --- */
:root {
  --color-bg: #f7f5f0;
  --color-surface: #ffffff;
  --color-text-main: #36302a;
  --color-text-sub: #6b635a;
  --color-accent: #b07d5f; /* Warm Earth Tone */
  --color-accent-dark: #8c5e42;
  --color-border: #e6e2da;
  
  --font-base: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(54, 48, 42, 0.06);
  --shadow-hover: 0 8px 30px rgba(54, 48, 42, 0.12);
  
  --space-unit: 8px;
  --max-width: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 600;
  color: var(--color-text-main);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--color-text-sub); font-size: 1.05rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--space-unit) * 4);
}

.section-padding {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section-title {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

/* --- Header & Footer --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  padding: calc(var(--space-unit) * 2) 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-sub);
  position: relative;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-accent);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
}

@media (max-width: 768px) {
  .nav-links { display: none; } /* Simplified mobile handling */
}

.site-footer {
  background-color: #eae7e1;
  padding: 3rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-accent-dark);
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-sub);
}

.footer-col a:hover {
  color: var(--color-text-main);
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--color-text-sub);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(176, 125, 95, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(176, 125, 95, 0.4);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background-color: rgba(176, 125, 95, 0.05);
}

/* --- Layout Utilities --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-6 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

.flex-row { display: flex; flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-lg { gap: 3rem; }

/* Staggered layout helper */
.asymmetric-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .asymmetric-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .asymmetric-grid { gap: 2rem; }
  .hero-content { order: 2; }
  .hero-visual { order: 1; }
}

/* --- Components --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  fill: var(--color-accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: #eceae5;
  font-weight: 600;
  color: var(--color-text-main);
}

tr:last-child th, tr:last-child td { border-bottom: none; }

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

summary {
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: transform 0.2s;
}

details[open] summary::after {
  content: '−';
}

details p {
  padding-top: 0.5rem;
  margin-bottom: 1.5rem;
}

/* --- SVG Animations --- */
.svg-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawPath 3s linear forwards;
}

@keyframes drawPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.grid-node {
  fill: var(--color-border);
  transition: fill 0.5s ease;
}

.node-active {
  fill: var(--color-accent);
  animation: nodePulse 4s infinite alternate ease-in-out;
}

@keyframes nodePulse {
  0% { fill: var(--color-border); r: 2; opacity: 0.3; }
  50% { fill: var(--color-accent); r: 3.5; opacity: 1; }
  100% { fill: var(--color-border); r: 2; opacity: 0.3; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .svg-draw { stroke-dashoffset: 0; }
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}
