/* ============================================================
   课程首页 · 卡密门禁
   纸感编辑：暖白底 + 朱砂主色 + 细线分隔，圆角 8px，移动端单列
   配色与学习站 website-v3/assets/css/brand.css 保持一致（预设 ink）
   ============================================================ */
:root {
  --brand: #8C2F26;
  --brand-dk: #6E251E;
  --brand-sf: #F7EFEC;
  --ink: #1A1815;
  --ink-2: #5C564E;
  --ink-3: #8A837A;
  --line: #E5DFD6;
  --bg: #FBF9F6;
  --bg-2: #F4F1EC;
  --ok: #2C4A3B;
  --err: #9B2C2C;
  --r: 8px;
  --r-sm: 6px;

  /* 字体与动效（与学习站一致） */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-display: var(--font-serif);
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 200ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 var(--font-sans, -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Microsoft YaHei", "Segoe UI", sans-serif);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none;
    transition: color var(--dur) var(--ease); }
a:hover { text-decoration: underline; }

/* 大标题字重下压 + 衬线；小标签加字距 */
h1, .sec-h { font-weight: 500; letter-spacing: -0.02em; font-family: var(--font-display); }
.sec-p { color: var(--ink-2); }
.eyebrow, .badge, .btn, .nav-cta { letter-spacing: .08em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.hd {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,246,.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 18px; color: var(--ink);
}
.logo:hover { text-decoration: none; }
.logo .seal {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 15px;
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink-2); font-size: 14.5px; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.nav a.nav-cta {
  color: var(--brand); font-weight: 600;
  padding: 5px 14px; border: 1px solid var(--brand); border-radius: 8px;
}
.nav a.nav-cta:hover { background: var(--brand); color: #fff; }
.inline-enter { font-weight: 600; }
@media (max-width: 720px) { .nav { display: none; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--brand); cursor: pointer; transition: .18s;
  font-family: inherit;
}
.btn-1 { background: var(--brand); color: #fff; }
.btn-1:hover { background: var(--brand-dk); border-color: var(--brand-dk); text-decoration: none; }
.btn-2 { background: #fff; color: var(--brand); }
.btn-2:hover { background: var(--brand-sf); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 60px; text-align: center; }
.tag {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: var(--brand-sf); color: var(--brand);
  font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 16px; font-size: 40px; line-height: 1.3; font-weight: 800;
  letter-spacing: -.01em;
}
.hero .lead {
  margin: 0 auto 30px; max-width: 620px;
  font-size: 17px; color: var(--ink-2); line-height: 1.85;
}
.hero .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 区块 ---------- */
.sec { padding: 60px 0; }
.sec-2 { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-h { font-size: 26px; margin: 0 0 8px; font-weight: 500; }
.sec-p { color: var(--ink-2); margin: 0 0 32px; font-size: 15.5px; }

/* 亮点卡 */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
}
.card h3 { margin: 12px 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.card .ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-sf); display: grid; place-items: center; font-size: 20px;
}

/* 数字条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat .v { font-size: 30px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.stat .k { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* 路线预览 */
.routes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.route {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; background: #fff;
}
.route .n {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-sf); color: var(--brand);
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.route .t { font-weight: 600; font-size: 15px; }
.route .d { font-size: 13px; color: var(--ink-3); }
.route .lock { margin-left: auto; font-size: 12px; color: var(--ink-3); }

/* 购买引导 */
.buy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { text-align: center; padding: 20px; }
.step .n {
  width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 999px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 15px; font-weight: 600;
}
.step h4 { margin: 0 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.contact {
  margin-top: 26px; text-align: center; padding: 22px;
  border: 1px dashed var(--line); border-radius: var(--r); background: #fff;
}
.contact b { font-size: 16px; }
.contact p { margin: 6px 0 14px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- 卡密登录 ---------- */
.gate-box {
  max-width: 520px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 30px;
  box-shadow: 0 8px 30px rgba(17,24,39,.06);
}
.gate-box h2 { margin: 0 0 6px; font-size: 22px; }
.gate-box .tip { margin: 0 0 20px; color: var(--ink-2); font-size: 14.5px; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1; min-width: 220px; padding: 13px 16px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: .06em; text-transform: uppercase;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-sf); }
.msg { margin-top: 14px; font-size: 14.5px; min-height: 22px; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.hint { margin-top: 16px; font-size: 13px; color: var(--ink-3); line-height: 1.8; }

/* 已登录态 */
.done { text-align: center; }
.done .btn { margin-top: 6px; }

/* ---------- 页脚 ---------- */
.ft { border-top: 1px solid var(--line); padding: 32px 0; text-align: center; }
.ft p { margin: 4px 0; font-size: 13px; color: var(--ink-3); }
.ft p a { color: inherit; text-decoration: none; }
.ft p a:hover { text-decoration: underline; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .buy { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 28px; }
  .hero .lead { font-size: 15.5px; }
  .sec { padding: 40px 0; }
  .sec-h { font-size: 22px; }
  .grid3, .grid4, .routes { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .gate-box { padding: 22px; border-radius: 14px; }
  .field { flex-direction: column; }
  .field .btn { width: 100%; }
}
