:root {
  --blue-900: #0d2b5e;
  --blue-700: #1565c0;
  --blue-500: #2196f3;
  --blue-100: #e3f2fd;
  --orange: #ff6d00;
  --green: #00a86b;
  --text: #1a1a2e;
  --muted: #5a6270;
  --bg: #f5f8fc;
  --white: #ffffff;
  --border: #dde4ee;
  --shadow: 0 8px 32px rgba(13, 43, 94, 0.08);
  --radius: 12px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a {
  color: var(--blue-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--blue-900);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: grid;
  place-items: center;
  color: white;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--blue-700);
  text-decoration: none;
}

.nav-cta {
  background: var(--blue-700);
  color: white !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--blue-900);
  text-decoration: none !important;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, var(--blue-900) 0%, #1a4a8a 45%, var(--blue-500) 100%);
  color: white;
  padding: 72px 0 80px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.hero-slogan {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffd54f;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: white;
  color: var(--blue-900);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.hero-img {
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 100%;
  display: block;
}

/* ---- Sections ---- */
section {
  padding: 72px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.85rem;
  margin-bottom: 12px;
  color: var(--blue-900);
}

.section-desc {
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 40px;
}

/* ---- Feature cards ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature-icon.blue { background: var(--blue-100); }
.feature-icon.orange { background: #fff3e0; }
.feature-icon.green { background: #e8f5e9; }

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---- Modes ---- */
.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mode-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.mode-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
}

.mode-header h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.mode-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 8px;
}

.mode-tag.default { background: var(--blue-100); color: var(--blue-700); }
.mode-tag.english { background: #fff3e0; color: var(--orange); }

.mode-body {
  padding: 20px 28px 28px;
}

.mode-body ul {
  list-style: none;
  margin-top: 12px;
}

.mode-body li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
}

.mode-body li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

code {
  background: #f0f4f8;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  color: var(--blue-900);
}

/* ---- Open source ---- */
.opensource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.os-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.os-card:hover {
  border-color: var(--blue-500);
}

.os-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-100);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.os-card h4 {
  margin-bottom: 4px;
}

.os-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.os-link {
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-all;
}

.license-badge {
  display: inline-block;
  background: var(--green);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- BOM table ---- */
.bom-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.bom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.bom-table th {
  background: var(--blue-900);
  color: white;
  text-align: left;
  padding: 14px 20px;
  font-weight: 600;
}

.bom-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.bom-table tr:last-child td {
  border-bottom: none;
}

.bom-table tr:hover td {
  background: var(--blue-100);
}

.qty {
  font-weight: 700;
  color: var(--blue-700);
  white-space: nowrap;
}

.buy-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--blue-100);
  color: var(--blue-700);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.buy-link:hover {
  background: var(--blue-700);
  color: white;
  text-decoration: none;
}

.kit-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}

.kit-banner img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.kit-highlight {
  background: linear-gradient(135deg, var(--blue-100), white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.kit-highlight h3 {
  margin-bottom: 12px;
  color: var(--blue-900);
}

.kit-highlight ul {
  list-style: none;
}

.kit-highlight li {
  padding: 5px 0;
  color: var(--muted);
}

.kit-highlight li strong {
  color: var(--text);
}

/* ---- Steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-700);
  color: white;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}

.step h4 {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.step p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--blue-900);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a:hover {
  color: white;
}

.footer-col h5 {
  color: white;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-beian {
  margin-top: 10px;
  font-size: 0.82rem;
  opacity: 0.9;
}

.footer-beian a {
  color: inherit;
  text-decoration: none;
}

.footer-beian a:hover {
  text-decoration: underline;
}

.open-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 168, 107, 0.15);
  border: 1px solid rgba(0, 168, 107, 0.4);
  color: #69f0ae;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---- SpeakPal 家长向介绍 ---- */
.speakpal-section {
  background: linear-gradient(180deg, #f8faf5 0%, var(--bg) 100%);
}

.speakpal-hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.speakpal-tagline {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 12px;
}

.speakpal-hero-text p {
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 52em;
}

.speakpal-hero-text strong {
  color: var(--text);
}

.speakpal-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.speakpal-pill {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: #eef5f0;
  border: 1px solid #c8ddd2;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3d5c50;
  white-space: nowrap;
}

.speakpal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.speakpal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.speakpal-card-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
  line-height: 1;
}

.speakpal-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--blue-900);
}

.speakpal-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.speakpal-compare {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: center;
}

.speakpal-compare h3 {
  font-size: 1.2rem;
  color: var(--blue-900);
  margin-bottom: 24px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
  margin-bottom: 24px;
}

.compare-col {
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.compare-other {
  background: #fafafa;
}

.compare-us {
  background: #eef5f0;
  border-color: #b8d4c4;
}

.compare-col h4 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--blue-900);
}

.compare-col ul {
  list-style: none;
}

.compare-col li {
  padding: 8px 0;
  padding-left: 18px;
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.compare-col li::before {
  content: "·";
  position: absolute;
  left: 4px;
  font-weight: 700;
  color: var(--muted);
}

.compare-us li::before {
  content: "✓";
  color: var(--green);
}

.speakpal-footer-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.speakpal-cta {
  display: inline-flex;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid,
  .features-grid,
  .modes-grid,
  .opensource-grid,
  .kit-banner,
  .steps,
  .footer-grid,
  .speakpal-grid,
  .speakpal-hero-card,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .speakpal-pills {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 48px 0 56px;
  }
}
