/* ============================================================
   wzhroy.com — 单页个人项目站（HAF 体系质量保证课程）
   依赖：无。系统字体，零网络请求。
   ============================================================ */

:root {
  --bg: #faf9f6;
  --ink: #14110f;
  --muted: #6f6a63;
  --line: #e6e2da;
  --accent: #d9480f;
  --card: #ffffff;
  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- 顶部进度条 ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 40;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transform-origin: 0 50%;
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 249, 246, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 15px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}
.nav nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 30px);
}
.nav nav a {
  position: relative;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.25s var(--ease);
  white-space: nowrap;
}
.nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s var(--ease);
}
.nav nav a:hover,
.nav nav a.active {
  color: var(--ink);
}
.nav nav a:hover::after,
.nav nav a.active::after {
  transform: scaleX(1);
}

/* ---------- 首屏 ---------- */
.hero {
  min-height: 88vh;
  min-height: clamp(520px, 78svh, 780px);
  display: flex;
  align-items: center;
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.eyebrow {
  margin: 0 0 clamp(20px, 3vw, 28px);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.042em;
  font-weight: 660;
}
.hero h1 span {
  display: block;
}
.hero h1 em {
  font-style: normal;
  color: var(--muted);
}
.hero-foot {
  margin-top: clamp(26px, 4vw, 40px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.hero-foot p {
  margin: 0;
  max-width: 32em;
  text-wrap: balance;
  color: var(--muted);
  font-size: clamp(14.5px, 1.2vw, 16px);
  line-height: 1.85;
}
.scroll-hint {
  flex: none;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  transition: color 0.25s var(--ease);
}
.scroll-hint::after {
  content: "";
  display: block;
  width: 1px;
  height: 42px;
  margin: 12px auto 0;
  background: var(--line);
}
.scroll-hint:hover {
  color: var(--accent);
}

/* ---------- 通用区块 ---------- */
.section {
  padding: clamp(60px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
}
.label {
  margin: 0 0 clamp(24px, 3.4vw, 40px);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.label b {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 关于 ---------- */
.about {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about h2 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.26;
  letter-spacing: -0.028em;
  font-weight: 640;
}
.body p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.9;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin: 30px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}
.facts dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- 课程卡片 ---------- */
.course {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3.6vw, 52px);
}
.course-head {
  padding-bottom: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}
.kicker {
  margin: 0 0 14px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.course-head h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 640;
}
.lead {
  margin: 0 0 20px;
  max-width: 46em;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.85;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.chips li {
  font-size: 12px;
  color: #55524d;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 11px;
}

.modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(24px, 3vw, 48px);
}
.module {
  padding: clamp(20px, 2.6vw, 30px) 0;
  border-top: 1px solid var(--line);
}
.module:nth-child(-n + 2) {
  border-top: 0;
}
.module span {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.module h3 {
  margin: 8px 0 6px;
  font-size: clamp(17px, 1.7vw, 20px);
  letter-spacing: -0.018em;
  font-weight: 620;
}
.module p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.78;
}

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--line);
}
.audience .mini {
  margin: 0 0 6px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.audience .who {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 42em;
}
.btn {
  flex: none;
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 99px;
  font-size: 14px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

/* ---------- 联系 ---------- */
.contact h2 {
  margin: 0 0 22px;
  font-size: clamp(32px, 4.6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 660;
}
.mail {
  display: inline-block;
  font-size: clamp(19px, 2.4vw, 30px);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.25s var(--ease);
}
.mail:hover {
  opacity: 0.75;
}
.note {
  margin: clamp(26px, 3.6vw, 38px) 0 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line);
}
.foot .wrap {
  padding-top: 22px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 滚动进场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
html.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .about {
    grid-template-columns: 1fr;
  }
  .modules {
    grid-template-columns: 1fr;
  }
  .module:nth-child(-n + 2) {
    border-top: 1px solid var(--line);
  }
  .module:first-child {
    border-top: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-top: 52px;
    padding-bottom: 44px;
  }
  .hero h1 {
    font-size: clamp(34px, 9.6vw, 48px);
  }
  .hero-foot {
    margin-top: 24px;
  }
  .scroll-hint {
    display: none;
  }
  .brand {
    font-size: 14px;
  }
  .nav-inner {
    padding-block: 13px;
  }
  .facts {
    gap: 16px;
  }
  .course-foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
  .foot .wrap {
    flex-direction: column;
    gap: 6px;
  }
}

/* ---------- 无障碍：尊重减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
