/* ============================================================
   智伴 · 儿童AI陪伴机器人 — 全站设计系统
   域名：www.zhiyanagent.com
   品牌：暖橙(活力/温暖) + 信任蓝(科技/可信) + 米白(柔和)
   ============================================================ */

:root {
  --primary: #FF7A3D;
  --primary-dark: #E8632B;
  --primary-soft: #FFF0E6;
  --accent: #3D6BF2;
  --accent-soft: #EDF2FF;
  --bg: #FBF8F4;
  --card: #FFFFFF;
  --ink: #2B2B33;
  --muted: #7A7A85;
  --border: #ECE7E0;
  --green: #34A853;
  --green-soft: #E7F6EC;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(60, 50, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(60, 50, 40, 0.12);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand-logo { font-size: 28px; }
.brand-text { font-size: 19px; line-height: 1.1; }
.brand-text small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }

.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted);
  font-weight: 500; font-size: 15px; transition: all .2s;
}
.main-nav a:hover { color: var(--ink); background: var(--primary-soft); }
.main-nav a.active { color: var(--primary-dark); background: var(--primary-soft); font-weight: 600; }

.nav-cta { margin-left: 4px; }
.nav-toggle {
  display: none; border: none; background: none; font-size: 24px;
  cursor: pointer; color: var(--ink); line-height: 1;
}

/* ============ 页脚 ============ */
.site-footer {
  margin-top: 72px; padding: 48px 0 36px;
  background: #2E2A25; color: #D8D3CC;
}
.footer-inner { display: flex; flex-direction: column; gap: 18px; }
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #D8D3CC; }
.footer-links a:hover { color: #FFB98A; }
.footer-note { font-size: 12px; color: #8f8a82; max-width: 640px; }

/* ============ Hero 首页大标题 ============ */
.hero { padding: 72px 0 48px; text-align: center; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.25; letter-spacing: -0.5px; }
.hero h1 .hl { color: var(--primary); }
.hero .sub { max-width: 720px; margin: 20px auto 30px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-size: 16px;
  font-weight: 600; cursor: pointer; border: 1px solid transparent;
  transition: all .2s; line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(255, 122, 61, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #2f58cc; }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ============ 区块标题 ============ */
.section { padding: 56px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: 30px; margin-bottom: 12px; }
.section-head p { color: var(--muted); }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 8px;
}

/* ============ 卡片与栅格 ============ */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .card-icon { font-size: 34px; margin-bottom: 12px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* 特性（带图标 + 标题 + 说明） */
.feature { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.feature .ico {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--primary-soft);
}
.feature h4 { font-size: 17px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ============ 标签 / 徽章 ============ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
}
.tag-primary { background: var(--primary-soft); color: var(--primary-dark); }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-green { background: var(--green-soft); color: var(--green); }

/* ============ 表格 (产品对比/价格) ============ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #FAF6F1; font-weight: 700; color: var(--ink); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td .price { color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
tr:hover td { background: #FFFDFB; }

/* ============ Hero 内部页标题 ============ */
.page-hero { padding: 48px 0 8px; text-align: center; }
.page-hero h1 { font-size: 36px; }
.page-hero p { color: var(--muted); margin-top: 12px; font-size: 17px; }

/* ============ 课程卡 ============ */
.course-card .course-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.course-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ============ 家长后台演示面板 ============ */
.dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--primary); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-top: 22px;
}
.panel h3 { margin-bottom: 14px; font-size: 18px; }
.panel + .panel { margin-top: 22px; }

/* 开关 */
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: none; }
.switch-row .st-l { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.switch-row .st-d { color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { display: none; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: #D9D4CE; cursor: pointer; transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: .2s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ============ 提示框 ============ */
.note {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  padding: 14px 18px; border-radius: 8px; color: #33415c; font-size: 14.5px;
}
.note.warm { background: var(--primary-soft); border-left-color: var(--primary); color: #7a4522; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dashboard { grid-template-columns: 1fr 1fr; }
  /* 手机上保留「家长入口」按钮：家长最常用的就是它，藏进汉堡里等于没有 */
  .nav-cta {
    display: inline-flex; padding: 7px 12px; font-size: 13px;
    margin-left: auto; margin-right: 8px; white-space: nowrap;
  }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 12px 24px 20px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; }
  .nav-toggle { display: block; margin-left: 0; }
  .header-inner { position: relative; }
  .hero h1 { font-size: 30px; }
  .page-hero h1 { font-size: 28px; }
}