/* ==========================================================
   云钥数字科技 · AI室内设计全流程学习平台
   设计语言：浅色 · 简约 · 大气
   ========================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* 主色 - 克制的墨蓝，专业感 */
  --ink: #16191f;
  --ink-2: #3d434e;
  --ink-3: #6b7280;
  --ink-4: #9aa1ad;

  /* 品牌色 - 深靛蓝，稳重不浮夸 */
  --brand: #1f3a5f;
  --brand-hover: #172d4a;
  --brand-soft: #eef2f8;
  --brand-line: #dbe3ef;

  /* 强调色 - 温暖琥珀，用于价格/行动点 */
  --accent: #b8863b;
  --accent-soft: #faf5ec;

  /* 中性 */
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-warm: #fbfaf8;
  --line: #e8eaee;
  --line-strong: #d5d9e0;

  /* 功能色 */
  --success: #2f7a55;
  --success-soft: #edf6f1;
  --danger: #b4453c;
  --danger-soft: #fbf0ef;

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* 阴影 - 极轻，靠留白建立层级 */
  --shadow-sm: 0 1px 2px rgba(22, 25, 31, .04);
  --shadow-md: 0 4px 16px rgba(22, 25, 31, .06);
  --shadow-lg: 0 12px 40px rgba(22, 25, 31, .10);

  --max: 1200px;
  --nav-h: 68px;

  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: "SF Mono", "DIN Alternate", ui-monospace, monospace;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; gap: 44px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand);
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -.5px;
}
.logo-text { line-height: 1.25; }
.logo-text strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.logo-text span { display: block; font-size: 11px; color: var(--ink-3); letter-spacing: .4px; }

.nav-menu { display: flex; gap: 4px; flex: 1; }
.nav-menu a {
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 14.5px; color: var(--ink-2);
  transition: all .18s ease;
}
.nav-menu a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-menu a.active { color: var(--brand); font-weight: 500; }
.nav-menu a.hidden { display: none; }

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 20px;
  border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 500;
  transition: all .18s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-md); }
.btn-ghost { color: var(--ink-2); border-color: var(--line-strong); background: #fff; }
.btn-ghost:hover { border-color: var(--ink-4); color: var(--ink); }
.btn-text { color: var(--ink-2); padding: 0 8px; height: auto; }
.btn-text:hover { color: var(--brand); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #a3762f; }
.btn-lg { height: 48px; padding: 0 30px; font-size: 15.5px; border-radius: var(--r-md); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled {
  background: var(--bg-soft) !important; color: var(--ink-4) !important;
  border-color: var(--line) !important; cursor: not-allowed; box-shadow: none !important;
}

/* ---------- 首屏 Banner ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 104px;
  background:
    radial-gradient(900px 420px at 78% -10%, #eef3fa 0%, rgba(238,243,250,0) 62%),
    radial-gradient(700px 380px at 12% 8%, #faf7f1 0%, rgba(250,247,241,0) 60%),
    var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(31,58,95,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31,58,95,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px 6px 10px; margin-bottom: 26px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px; color: var(--ink-2); letter-spacing: .2px;
  box-shadow: var(--shadow-sm);
}
.hero-tag i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); display: inline-block;
}
.hero h1 {
  font-size: 46px; line-height: 1.32; font-weight: 600;
  letter-spacing: -1px; color: var(--ink);
  margin-bottom: 22px;
}
.hero h1 em { font-style: normal; color: var(--brand); position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 8px;
  background: rgba(184,134,59,.14); border-radius: 2px; z-index: -1;
}
.hero p.sub {
  font-size: 17px; line-height: 1.85; color: var(--ink-3);
  max-width: 660px; margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 52px; display: flex; gap: 40px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.hero-meta div strong {
  display: block; font-size: 24px; font-weight: 600; color: var(--ink);
  font-family: var(--font-num); letter-spacing: -.5px;
}
.hero-meta div span { font-size: 13px; color: var(--ink-3); }

/* ---------- Section ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 700px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: 1.6px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.section-head h2 {
  font-size: 32px; line-height: 1.4; font-weight: 600;
  letter-spacing: -.5px; color: var(--ink); margin-bottom: 14px;
}
.section-head p { font-size: 15.5px; color: var(--ink-3); line-height: 1.8; }

/* ---------- 四大模块卡片 ---------- */
.module-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.module-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px 26px 28px;
  transition: all .22s ease; position: relative; overflow: hidden;
}
.module-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.module-card:hover {
  border-color: var(--brand-line); box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.module-card:hover::before { transform: scaleX(1); }
.module-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 20px;
  font-size: 20px;
}
.module-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; letter-spacing: -.2px; }
.module-card p { font-size: 13.8px; line-height: 1.75; color: var(--ink-3); }
.module-num {
  position: absolute; top: 26px; right: 26px;
  font-family: var(--font-num); font-size: 12px; color: var(--ink-4);
  letter-spacing: 1px;
}

/* ---------- 价值简述 ---------- */
.value-band {
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--brand);
  color: #fff; padding: 64px 60px;
  display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: center;
  position: relative;
}
.value-band::after {
  content: ""; position: absolute; right: -80px; bottom: -120px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,134,59,.22), transparent 68%);
}
.value-band h3 {
  font-size: 27px; line-height: 1.5; font-weight: 500;
  letter-spacing: -.4px; margin-bottom: 20px; position: relative; z-index: 1;
}
.value-band p { font-size: 15px; line-height: 1.85; color: rgba(255,255,255,.72); position: relative; z-index: 1; }
.value-checks { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.value-checks li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,.9);
  padding: 13px 16px; background: rgba(255,255,255,.07);
  border-radius: var(--r-md); border: 1px solid rgba(255,255,255,.1);
}
.value-checks li svg { flex-shrink: 0; margin-top: 3px; }

/* ---------- 课程卡片 ---------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.course-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: all .22s ease; display: flex; flex-direction: column;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--brand-line); }
.course-cover {
  aspect-ratio: 16 / 10; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #eef2f8 0%, #f7f4ef 100%);
}
.course-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.course-card:hover .course-cover img { transform: scale(1.04); }
.course-cover .badge {
  position: absolute; top: 14px; left: 14px;
  padding: 4px 10px; border-radius: 5px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 500; color: var(--brand);
  letter-spacing: .2px;
}
.course-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 16.5px; font-weight: 600; line-height: 1.5; margin-bottom: 9px; letter-spacing: -.2px; }
.course-body .desc {
  font-size: 13.5px; line-height: 1.72; color: var(--ink-3);
  margin-bottom: 18px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.course-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.price { font-family: var(--font-num); font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -.5px; }
.price small { font-size: 13px; font-weight: 500; margin-right: 1px; }
.price .unit { font-size: 12px; color: var(--ink-4); font-weight: 400; margin-left: 4px; font-family: var(--font); }
.course-foot .btns { display: flex; gap: 8px; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line); background: var(--bg-warm);
  padding: 56px 0 36px;
}
.footer-inner { display: flex; justify-content: space-between; gap: 60px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p { font-size: 13px; line-height: 1.85; color: var(--ink-3); }
.footer-links { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 14px; letter-spacing: .3px; }
.footer-col a { display: block; font-size: 13px; color: var(--ink-3); padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-4);
}
.footer-bottom .links { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--ink-2); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 24px 0; font-size: 13.5px; color: var(--ink-4);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-3); transition: color .15s; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--line-strong); }
.breadcrumb .cur { color: var(--ink-2); font-weight: 500; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 0 0 40px;
}
.chip {
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 13.8px; color: var(--ink-2); transition: all .18s ease;
}
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(22, 25, 31, .42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .2s ease;
}
.modal-mask.open { display: flex; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px) scale(.985) } to { opacity: 1; transform: none } }
.modal {
  background: #fff; border-radius: var(--r-lg);
  width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .26s cubic-bezier(.22,.8,.3,1);
}
.modal-lg { max-width: 720px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0;
}
.modal-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.modal-close {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--ink-3);
  transition: all .15s;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
.modal-body { padding: 22px 28px; }
.modal-foot {
  padding: 20px 28px 26px; display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid var(--line); margin-top: 4px;
}
.modal-foot .btn { flex: 0 0 auto; }
.modal-foot .btn-block { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: #fff; font-size: 14.5px; transition: all .16s ease;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,58,95,.08);
}
.field input::placeholder { color: var(--ink-4); }
.field .hint { font-size: 12.5px; color: var(--ink-4); margin-top: 6px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 84px; left: 50%; transform: translate(-50%, -12px);
  z-index: 2000; padding: 13px 22px;
  background: var(--ink); color: #fff; border-radius: var(--r-md);
  font-size: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .26s ease;
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------- 通用小件 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 5px;
  font-size: 12px; font-weight: 500;
  background: var(--brand-soft); color: var(--brand);
}
.tag.free { background: var(--success-soft); color: var(--success); }
.tag.lock { background: #f4f4f6; color: var(--ink-3); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.empty-state {
  padding: 72px 20px; text-align: center; color: var(--ink-4);
}
.empty-state .ico { font-size: 34px; margin-bottom: 14px; opacity: .5; }
.empty-state p { font-size: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .value-band { grid-template-columns: 1fr; gap: 36px; padding: 48px 40px; }
}
@media (max-width: 860px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .nav-inner { padding: 0 20px; gap: 20px; }
  .nav-menu { display: none; }
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 30px; letter-spacing: -.5px; }
  .hero p.sub { font-size: 15px; }
  .hero-meta { gap: 24px; }
  .hero-meta div strong { font-size: 20px; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 24px; }
  .module-grid, .course-grid { grid-template-columns: 1fr; }
  .value-band { padding: 36px 26px; }
  .value-band h3 { font-size: 21px; }
  .footer-links { gap: 40px; }
  .footer-inner { gap: 40px; }
}

/* ---------- 手机端导航压缩 ---------- */
@media (max-width: 640px) {
  .nav { padding: 0 14px; }
  .logo-text span { display: none; }              /* 隐藏副标题 */
  .logo-text strong { font-size: 15px; }
  #userBtn { padding: 0 7px !important; gap: 5px !important; }
  #userBtn .btn, #navRight .btn { margin-right: 0; }
  #navRight { gap: 6px; }
}

/* ---------- 支付渠道选项 ---------- */
.pay-opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  margin-bottom: 10px; cursor: pointer; transition: all .15s ease;
}
.pay-opt.active { border-color: var(--brand); background: var(--brand-soft); }
.pay-opt input { accent-color: var(--brand); }
.tag-gray { background: var(--bg-soft); color: var(--ink-4); }
