:root {
  --paper: #f6f3ec;
  --paper-2: #ece7db;
  --card: #fffdf8;
  --ink: #0a1f3d;
  --text: #23262d;
  --muted: #565b66;
  --line: #d9d2c2;
  --mark: #f2cf73;

  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "PingFang TC", "Microsoft JhengHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 14px; z-index: 10; }
.skip:focus { left: 8px; }

.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.3;
  color: var(--ink);
}

section { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head p { margin: 0; max-width: 26em; color: var(--muted); font-size: 16px; }

/* ---------- 按鈕 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #1d3a63; }
.btn .arr { font-family: var(--mono); transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- 導覽 ---------- */

.top { border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; flex-direction: column; line-height: 1.2; text-decoration: none; margin-right: auto; }
.brand b { font-family: var(--serif); font-weight: 900; font-size: 20px; color: var(--ink); }
.brand span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav ul a { font-size: 15px; text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; }
.nav ul a:hover { border-color: var(--ink); }
.nav .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- 主視覺 ---------- */

.hero { padding-block: clamp(48px, 7vw, 96px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: end; }
.hero h1 { margin: 0; font-weight: 400; }
.hero .lead { display: block; font-size: clamp(20px, 2.4vw, 28px); color: var(--muted); margin-bottom: 12px; }
.hero .big {
  display: block;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(46px, 7.6vw, 104px);
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hero mark {
  color: inherit;
  background: linear-gradient(transparent 56%, var(--mark) 56%, var(--mark) 94%, transparent 94%);
  padding-inline: .04em;
}
.hero .keep { white-space: nowrap; }
.hero .stop { font-feature-settings: "halt"; margin-left: -.12em; }
.hero-sub { margin: 28px 0 32px; font-size: clamp(17px, 1.6vw, 20px); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.who { border-left: 1px solid var(--line); padding-left: 28px; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.who h2 { margin: 16px 0 2px; font-family: var(--serif); font-size: 24px; color: var(--ink); }
.who p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }

.stats {
  list-style: none;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats li { padding: 22px 0 22px 24px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.2; color: var(--ink); }
.stats span { font-size: 14px; color: var(--muted); }

/* ---------- 教材作品 ---------- */

.work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.deck { margin: 0; }
.deck img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(10, 31, 61, .08), 0 18px 40px -24px rgba(10, 31, 61, .45);
  transition: transform .4s var(--ease);
}
.deck:hover img { transform: translateY(-4px); }
.deck figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; }
.deck b { font-size: 17px; color: var(--ink); }
.deck span { font-size: 14px; color: var(--muted); }

.sub-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: clamp(56px, 7vw, 88px) 0 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.sub-head h3 { margin: 0; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.sub-head p { margin: 0; font-size: 15px; color: var(--muted); }
.handouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.page { margin: 0; }
.page .bar { display: flex; gap: 5px; padding: 8px 10px; background: var(--paper-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.page .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.page img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.page figcaption { padding-top: 10px; font-size: 15px; color: var(--ink); font-weight: 500; }

/* ---------- 服務 ---------- */

.band { background: var(--paper-2); }
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.services li {
  display: grid;
  grid-template-columns: 64px minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.services .no { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 6px; }
.services h3 { margin: 0; font-family: var(--serif); font-size: clamp(21px, 2vw, 26px); line-height: 1.4; color: var(--ink); }
.services p { margin: 0; color: var(--muted); }

/* ---------- 課程地圖 ---------- */

.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 0; }
.step { position: relative; padding: 22px 22px 26px; border-top: 3px solid var(--ink); background: var(--card); min-height: 180px; }
.step + .step { border-left: 1px solid var(--line); }
.step:nth-child(1) { margin-top: 120px; }
.step:nth-child(2) { margin-top: 80px; }
.step:nth-child(3) { margin-top: 40px; }
.step .lv { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.step h3 { margin: 4px 0 8px; font-family: var(--serif); font-size: 24px; color: var(--ink); }
.step p { margin: 0; font-size: 15px; line-height: 1.7; }
.step:nth-child(4) { background: var(--ink); color: var(--paper); }
.step:nth-child(4) h3 { color: var(--paper); }
.step:nth-child(4) .lv { color: #b9c3d3; }
.path-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

.dirs { list-style: none; margin: clamp(48px, 6vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.dirs li { padding: 18px 0; border-top: 1px solid var(--line); }
.dirs b { display: block; font-size: 17px; color: var(--ink); line-height: 1.5; }
.dirs span { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- 合作流程 ---------- */

.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: s; }
.process li { counter-increment: s; }
.process li::before {
  content: counter(s, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  color: var(--ink);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.process h3 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.process p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.7; }

/* ---------- 合作單位 ---------- */

.partners-band { background: var(--ink); color: var(--paper); }
.partners-band .label { color: #b9c3d3; }
.partners-band .h2 { color: var(--paper); }
.partners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.partners li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid rgba(246, 243, 236, .18); }
.partners .type { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: #b9c3d3; padding-top: 4px; }
.partners .names { font-family: var(--serif); font-size: 18px; line-height: 1.7; }

/* ---------- 講師 ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.about h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.certs { list-style: none; margin: 0; padding: 0; }
.certs li { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.certs .k { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.kit { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.kit li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.kit li:first-child { border-top: 0; }
.kit .st { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.kit a { font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.kit-h { margin-top: 40px !important; }
.bio p { margin: 0 0 16px; }
.bio p:last-child { margin-bottom: 0; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; }
.foot-brand img { width: 32px; height: 32px; border-radius: 6px; }
.kit-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- 聯絡 ---------- */

.contact { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.contact-main h2 { margin: 8px 0 16px; font-family: var(--serif); font-weight: 900; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.2; color: var(--ink); }
.contact-main p { margin: 0 0 28px; color: var(--muted); max-width: 28em; }
.mail { font-family: var(--mono); font-size: 14px; color: var(--muted); margin-top: 14px; }
.line-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.line-card h3 { margin: 0; font-size: 20px; color: var(--ink); }
.line-card p { margin: 0; font-size: 15px; color: var(--muted); }
.line-card img { width: 150px; height: 150px; border-radius: 10px; border: 1px solid var(--line); }

.foot { border-top: 1px solid var(--line); padding-block: 28px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }

.on-mobile { display: none; }

/* ---------- 平板 720–1079 ---------- */

@media (max-width: 1079px) {
  .nav ul { gap: 16px; }
  .sec-head { flex-direction: column; align-items: start; gap: 12px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .who { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; align-items: center; }
  .who h2 { margin-top: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .services li { grid-template-columns: 48px minmax(0, 1fr); }
  .services p { grid-column: 2; }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .step:nth-child(n) { margin-top: 0; }
  .step:nth-child(3) { border-left: 0; }
  .dirs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .partners { grid-template-columns: minmax(0, 1fr); }
  .contact { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 手機 < 720 ---------- */

@media (max-width: 719px) {
  body { font-size: 16px; }
  .nav { flex-wrap: wrap; gap: 8px 16px; padding-block: 12px; }
  .nav ul { order: 3; width: 100%; overflow-x: auto; gap: 18px; padding-bottom: 4px; }
  .nav ul a { white-space: nowrap; }
  .who { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .work { grid-template-columns: minmax(0, 1fr); }
  .handouts { grid-template-columns: minmax(0, 1fr); }
  .sub-head { flex-direction: column; gap: 4px; }
  .path, .dirs, .process, .about { grid-template-columns: minmax(0, 1fr); }
  .step + .step { border-left: 0; }
  .partners li, .certs li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .line-card img { display: none; }
  .on-desktop { display: none; }
  .on-mobile { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
