/* ===== CSS Variables ===== */
:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #99f6e4;
  --primary-bg: #f0fdfa;
  --secondary: #1e40af;
  --secondary-light: #dbeafe;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);
  --max-w: 1100px;
  --transition: .25s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Utility ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 48px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }
.btn-lg { padding: 16px 40px; font-size: 1.125rem; }

/* ===== Header / Nav ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.logo span { color: var(--secondary); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--text-light); font-size: .95rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--primary); }

/* ===== Hero ===== */
.hero {
  padding-top: 140px;
  padding-bottom: 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg) 100%);
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -.5px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== Pain Points ===== */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.pain-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}
.pain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.pain-icon { font-size: 2.5rem; margin-bottom: 16px; }
.pain-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.pain-card p { font-size: .92rem; color: var(--text-light); }

/* ===== Features ===== */
.features { background: var(--bg-alt); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { font-size: .92rem; color: var(--text-light); }

/* ===== How It Works ===== */
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.how-steps h3 { font-size: 1.05rem; margin-bottom: 8px; }
.how-steps p { font-size: .9rem; color: var(--text-light); }

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 24px;
  border-radius: 0;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 16px; }
.cta-section p { opacity: .9; margin-bottom: 32px; font-size: 1.1rem; }
.cta-section .btn { background: #fff; color: var(--primary); }
.cta-section .btn:hover { background: var(--primary-light); }

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-light);
  font-size: .85rem;
  border-top: 1px solid var(--border);
}

/* ===== Survey Page ===== */
.survey-page { padding-top: 80px; min-height: 100vh; background: var(--bg-alt); }
.survey-container { max-width: 720px; margin: 0 auto; padding: 24px; }
.survey-header { text-align: center; margin-bottom: 32px; }
.survey-header h1 { font-size: 1.8rem; margin-bottom: 8px; }
.survey-header p { color: var(--text-light); }

/* Progress */
.progress-wrap { margin-bottom: 32px; }
.progress-info { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-light); margin-bottom: 8px; }
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .4s ease; }

/* Steps */
.survey-step { display: none; }
.survey-step.active { display: block; }
.step-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.step-card h2 { font-size: 1.3rem; margin-bottom: 4px; color: var(--primary-dark); }
.step-card .step-desc { color: var(--text-light); font-size: .92rem; margin-bottom: 28px; }

/* Question */
.question { margin-bottom: 28px; }
.question:last-child { margin-bottom: 0; }
.question-label {
  display: block;
  font-weight: 600;
  font-size: .98rem;
  margin-bottom: 10px;
  line-height: 1.5;
}
.question-label .required { color: #ef4444; margin-left: 2px; }
.question-hint { display: block; font-size: .82rem; color: var(--text-light); margin-bottom: 8px; }

/* Radio / Checkbox */
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .93rem;
  line-height: 1.5;
}
.option-item:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.option-item input[type="radio"],
.option-item input[type="checkbox"] { margin-top: 4px; accent-color: var(--primary); flex-shrink: 0; }
.option-item.selected { border-color: var(--primary); background: var(--primary-bg); }
.other-input {
  margin-top: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  display: none;
}
.other-input.visible { display: block; }

/* Text input / Textarea */
.text-input, .text-area {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
.text-input:focus, .text-area:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.text-area { min-height: 100px; resize: vertical; }

/* Matrix */
.matrix-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.matrix-table th, .matrix-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--border); }
.matrix-table th:first-child, .matrix-table td:first-child { text-align: left; min-width: 160px; }
.matrix-table thead th { font-weight: 600; color: var(--text-light); font-size: .82rem; }
.matrix-table input[type="radio"] { accent-color: var(--primary); }

/* Ranking */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: .93rem;
}
.rank-item .rank-num {
  width: 48px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-size: .9rem;
}

/* Navigation */
.step-nav { display: flex; justify-content: space-between; gap: 16px; }
.step-nav .btn { min-width: 120px; justify-content: center; }

/* Validation error */
.question.error .question-label { color: #ef4444; }
.question.error .option-item { border-color: #fecaca; }
.question.error .text-input,
.question.error .text-area { border-color: #ef4444; }
.error-msg { font-size: .82rem; color: #ef4444; margin-top: 4px; display: none; }
.question.error .error-msg { display: block; }

/* Thank you */
.thank-you {
  text-align: center;
  padding: 80px 24px;
}
.thank-you h2 { font-size: 2rem; color: var(--primary-dark); margin-bottom: 12px; }
.thank-you p { color: var(--text-light); font-size: 1.05rem; margin-bottom: 24px; }
.check-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 24px;
}

/* ===== Mobile Menu ===== */
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding-top: 110px; padding-bottom: 60px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; }
  .section { padding: 56px 0; }
  .section-title { font-size: 1.5rem; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 24px; gap: 20px; }
  .menu-toggle { display: block; }
  .step-card { padding: 20px; }
  .matrix-wrap { overflow-x: auto; }
  .matrix-table { min-width: 500px; }
  .hero-cta { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.65rem; }
  .btn-lg { padding: 14px 28px; font-size: 1rem; }
}
