/* 陳一德老師官網｜樣式（唯一一份；顏色只在 :root 定義） */
:root {
  --ink: #0F2436;
  --text: #2B3642;
  --muted: #5E6B78;
  --paper: #FBF7F0;
  --sand: #F2E9DA;
  --card: #FFFFFF;
  --line: #E6DBC9;
  --sea: #1B5D72;
  --sea-deep: #0C2233;
  --night: #08192A;
  --gold: #C9974D;
  --gold-soft: #E9C98E;
  --gold-ink: #8A5A1A;
  --on-dark: #F4EFE6;
  --on-dark-muted: #C4CCD3;
  /* 第三方品牌色：一律用它們自己的顏色 */
  --yt: #FF0000;
  --fb: #1877F2;
  --ig-1: #F58529;
  --ig-2: #DD2A7B;
  --ig-3: #8134AF;
  --apple-podcasts: #872EC4;
  --radius: 18px;
  --shadow: 0 18px 50px -24px rgba(12, 34, 51, .35);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .02em;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
.nb { display: inline-block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.35; letter-spacing: .04em; margin: 0; }
p { margin: 0 0 1em; }
section { scroll-margin-top: 64px; }   /* 剛好等於頁首高度：點目錄跳過去時，區塊貼著頁首，不露出上一區的縫 */

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ── 頁首 ── */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 64px; display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease;
}
.hdr.is-solid, .no-js .hdr { background: var(--sea-deep); box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .5); }  /* 完全不透明：半透明會把底下卡片的字透上來 */
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: baseline; gap: 10px; color: var(--on-dark); text-decoration: none; white-space: nowrap; }
.logo b { font-family: var(--serif); font-size: 22px; letter-spacing: .12em; }
.logo span { font-size: 13px; color: var(--gold-soft); letter-spacing: .2em; }
.logo:hover { color: #fff; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--on-dark); text-decoration: none; font-size: 15px; letter-spacing: .12em;
  transition: background .2s ease, color .2s ease;
}
.nav a:hover, .nav a.is-current { background: rgba(233, 201, 142, .16); color: var(--gold-soft); }

/* ── 首屏 ── */
.hero {
  position: relative; color: var(--on-dark);
  min-height: 92vh; display: flex; align-items: center;
  padding: 120px 0 132px;
  background: var(--sea-deep) center right / cover no-repeat;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 24, 38, .93) 0%, rgba(8, 24, 38, .78) 42%, rgba(8, 24, 38, .28) 78%, rgba(8, 24, 38, .12) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 14px; letter-spacing: .18em; color: var(--gold-soft); border: 1px solid rgba(233, 201, 142, .45); padding: 6px 16px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { color: #fff; font-size: clamp(48px, 7vw, 84px); letter-spacing: .16em; font-weight: 700; }
.hero .en { font-size: 15px; letter-spacing: .3em; color: var(--on-dark-muted); margin: 6px 0 22px; text-transform: uppercase; }
.hero .lead { font-size: 19px; max-width: 34em; color: var(--on-dark); }
.motto { margin: 28px 0 32px; padding-left: 20px; border-left: 3px solid var(--gold); }
.motto .q { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.5; color: var(--gold-soft); letter-spacing: .08em; }
.motto small { display: block; font-size: 14px; color: var(--on-dark-muted); margin-top: 4px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 16px; letter-spacing: .1em;
  text-decoration: none; transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold-soft); color: var(--ink); font-weight: 700; }
.btn-primary:hover { background: #F3D9A8; color: var(--ink); }
.btn-ghost { border: 1px solid rgba(244, 239, 230, .6); color: var(--on-dark); }
.btn-ghost:hover { background: rgba(244, 239, 230, .12); color: #fff; }
.portrait {
  justify-self: center; width: 100%; max-width: 330px;
  padding: 10px; border-radius: 999px 999px 26px 26px;
  border: 1px solid rgba(233, 201, 142, .55); background: rgba(255, 255, 255, .06);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.portrait img { width: 100%; border-radius: 999px 999px 18px 18px; }

/* ── 四個年份 ── */
.facts { position: relative; z-index: 2; margin-top: -70px; }
.facts ol {
  list-style: none; margin: 0; padding: 26px 18px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.facts li { padding: 6px 20px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; }
.facts b { display: block; font-family: var(--serif); font-size: 34px; color: var(--sea); letter-spacing: .06em; line-height: 1.3; }
.facts span { font-size: 15px; color: var(--muted); line-height: 1.6; display: block; }

/* ── 共用區塊 ── */
.sec { padding: 104px 0; }
.sec-sand { background: var(--sand); }
.kicker { display: flex; align-items: center; gap: 12px; color: var(--gold-ink); font-size: 14px; letter-spacing: .32em; margin-bottom: 14px; }
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--gold); }
.sec h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 26px; }
.intro { font-size: 18px; max-width: 46em; color: var(--text); }

/* ── 關於 ── */
.about-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; margin-top: 48px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gold), rgba(201, 151, 77, .15)); }
.timeline li { position: relative; padding-bottom: 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--gold); }
.when { display: inline-block; font-size: 13px; letter-spacing: .14em; color: var(--sea); background: rgba(27, 93, 114, .08); padding: 2px 12px; border-radius: 999px; margin-bottom: 6px; }
.timeline h3 { font-size: 21px; margin-bottom: 6px; }
.timeline p { margin: 0; color: var(--text); }
.about-side { position: sticky; top: 92px; display: grid; gap: 22px; }
.photo-card { margin: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo-card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.photo-card figcaption { font-size: 14px; color: var(--muted); padding: 12px 18px 14px; line-height: 1.6; }
.cred { background: var(--card); border-radius: var(--radius); padding: 30px 32px 22px; box-shadow: var(--shadow); margin-top: 56px; }
.cred h3 { font-size: 22px; margin-bottom: 14px; }
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 36px; }
.cred h4 { font-size: 15px; color: var(--gold-ink); letter-spacing: .16em; margin: 6px 0 6px; }
.cred ul { list-style: none; margin: 0; padding: 0; }
.cred li { position: relative; padding: 7px 0 7px 22px; font-size: 15.5px; line-height: 1.65; border-top: 1px dashed var(--line); }
.cred li:first-child { border-top: 0; }
.cred li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* ── 理念 ── */
.motto-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.motto-img { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.motto-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.big-quote { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); color: var(--ink); line-height: 1.45; letter-spacing: .08em; margin: 0 0 20px; }
.big-quote .qm { color: var(--gold); }
.principles { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.principles li { background: var(--card); border-radius: var(--radius); padding: 28px 26px; box-shadow: 0 10px 30px -22px rgba(12, 34, 51, .4); }
.principles .num::before { content: ""; display: block; width: 28px; height: 2px; background: var(--gold); margin-bottom: 12px; }
.principles .num { font-family: var(--serif); color: var(--gold-ink); font-size: 14px; letter-spacing: .2em; }
.principles h4 { font-size: 20px; margin: 6px 0 10px; }
.principles p { margin: 0; font-size: 16px; }
.sub-title { font-size: 24px; margin-top: 72px; }

/* ── 著作 ── */
.book-card { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; background: var(--card); border-radius: 28px; padding: 44px; box-shadow: var(--shadow); }
.book-img { margin: 0; background: #fff; border-radius: 18px; padding: 10px; }
.book-img img { width: 100%; }
.book-card h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 20px; padding: 0; }
.chips li { font-size: 14px; padding: 4px 14px; border-radius: 999px; background: var(--sand); color: var(--text); letter-spacing: .06em; }
.book-card h3 { font-size: 18px; margin: 22px 0 10px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.checks li { position: relative; padding-left: 24px; font-size: 15.5px; line-height: 1.65; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold-ink); font-weight: 700; }
.recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recs li { font-size: 15.5px; line-height: 1.65; }
.recs b { color: var(--ink); margin-right: 8px; }
.recs span { color: var(--muted); }
.buy { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn-line { border: 1px solid var(--sea); color: var(--sea); background: transparent; padding: 10px 22px; }
.btn-line:hover { background: var(--sea); color: #fff; }
.forewords { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.forewords li { background: var(--card); border-radius: 14px; padding: 18px 18px 16px; border: 1px solid var(--line); }
.forewords .yr { font-size: 13px; color: var(--gold-ink); letter-spacing: .14em; }
.forewords b { display: block; font-family: var(--serif); color: var(--ink); font-size: 16.5px; line-height: 1.55; margin: 4px 0 6px; }
.forewords span { font-size: 14px; color: var(--muted); }

/* ── 教學 ── */
.programs { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.programs li { background: var(--card); border-radius: var(--radius); padding: 30px 30px 26px; box-shadow: 0 10px 30px -22px rgba(12, 34, 51, .4); }
.tag { display: inline-block; font-size: 13px; letter-spacing: .14em; color: #fff; background: var(--sea); padding: 2px 12px; border-radius: 999px; margin-bottom: 10px; }
.tag.is-soon { background: var(--gold-ink); }
.programs h3 { font-size: 21px; margin-bottom: 8px; }
.programs p { margin: 0 0 10px; }
.more { font-size: 15px; font-weight: 500; text-decoration: none; }
.more::after { content: " →"; }
.pill-rows { margin-top: 44px; display: grid; gap: 18px; }
.pill-row { display: grid; grid-template-columns: 7em 1fr; gap: 16px; align-items: start; }
.pill-row h3 { font-size: 16px; color: var(--gold-ink); letter-spacing: .16em; padding-top: 6px; }
.pill-row ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pill-row li { background: var(--card); border: 1px solid var(--line); padding: 4px 14px; border-radius: 999px; font-size: 15px; }

/* ── 影音 ── */
.videos { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.videos a { display: flex; flex-direction: column; height: 100%; gap: 10px; background: var(--card); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); box-shadow: 0 10px 30px -22px rgba(12, 34, 51, .4); transition: transform .2s ease; }
.videos a:hover { transform: translateY(-3px); color: var(--text); }
.play { width: 46px; height: 32px; border-radius: 9px; background: var(--yt); display: grid; place-items: center; }
.play svg { width: 16px; height: 16px; fill: #fff; }
.videos .ch { font-size: 13.5px; color: var(--muted); letter-spacing: .06em; }
.videos b { font-family: var(--serif); color: var(--ink); font-size: 17px; line-height: 1.55; flex: 1; }
.videos .meta { font-size: 13.5px; color: var(--muted); }
.media-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; margin-top: 64px; }
.media-cols h3 { font-size: 22px; margin-bottom: 14px; }
.pods { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: 0 10px 30px -22px rgba(12, 34, 51, .4); overflow: hidden; }
.pods a { display: grid; grid-template-columns: 28px 6.2em 1fr; gap: 12px; align-items: center; padding: 12px 20px; text-decoration: none; color: var(--text); border-top: 1px solid var(--line); }
.pods li:first-child a { border-top: 0; }
.pods a:hover { background: var(--paper); color: var(--text); }
.pod-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--apple-podcasts); display: grid; place-items: center; }
.pod-ico svg { width: 16px; height: 16px; fill: #fff; }
.pods time { font-size: 13.5px; color: var(--muted); }
.pods .t { font-size: 15.5px; line-height: 1.55; }
.pods .t small { display: block; color: var(--muted); font-size: 13px; }
.press { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.press a { display: block; background: var(--card); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.press a:hover { border-color: var(--sea); color: var(--text); }
.press small { display: block; color: var(--muted); font-size: 13.5px; }
.press b { font-family: var(--serif); color: var(--ink); font-size: 17px; }

/* ── 聯絡 ── */
.contact { background: var(--sea-deep); color: var(--on-dark); }
.contact h2 { color: #fff; }
.contact .kicker { color: var(--gold-soft); }
.contact .intro { color: var(--on-dark); }
.socials { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.org-link { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 20px 24px; border-radius: 16px; color: #fff; text-decoration: none; transition: transform .2s ease, filter .2s ease; }
.org-link:hover { transform: translateY(-3px); filter: brightness(1.08); color: #fff; }
.org-link svg { width: 30px; height: 30px; fill: #fff; flex: none; }
.org-link span { flex: 1; font-size: 14.5px; line-height: 1.5; opacity: .95; }
.org-link b { display: block; font-size: 17px; }
.org-link i { font-style: normal; font-size: 14px; color: var(--gold-soft); white-space: nowrap; }
.socials a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px; text-decoration: none; color: #fff; transition: transform .2s ease, filter .2s ease; }
.socials a:hover { transform: translateY(-3px); filter: brightness(1.06); color: #fff; }
.socials svg { width: 30px; height: 30px; fill: #fff; flex: none; }
.socials span { display: block; font-size: 13.5px; opacity: .92; line-height: 1.4; }
.socials b { display: block; font-size: 16px; line-height: 1.4; }
.brand-ig { background: linear-gradient(45deg, var(--ig-1), var(--ig-2) 55%, var(--ig-3)); }
.brand-fb { background: var(--fb); }
.brand-yt { background: var(--yt); }
.brand-org { background: var(--sea); box-shadow: inset 0 0 0 1px rgba(233, 201, 142, .45); }
.org { margin-top: 30px; font-size: 14.5px; color: var(--on-dark-muted); }

/* ── 頁尾 ── */
.ftr { background: var(--night); color: var(--on-dark-muted); padding: 44px 0 36px; font-size: 14px; line-height: 1.8; }
.ftr .disc { max-width: 64em; margin-bottom: 18px; }
.ftr .row { margin: 0; border-top: 1px solid rgba(196, 204, 211, .18); padding-top: 18px; letter-spacing: .03em; }
.ftr .sep { margin: 0 .7em; opacity: .55; }
@media (max-width: 760px) {
  .ftr .row { font-size: 12.5px; }
  .ftr .row .credit { display: block; }             /* 手機放不下一行：版權一行、技術支援一行；每一塊都不從字中間斷 */
  .ftr .sep { display: none; }
}

/* ── 進場動畫（只有 JS 在時才藏起來，關掉 JS 內容照樣看得到） ── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .videos a, .socials a { transition: none; }
}

/* ── 平板 ── */
@media (max-width: 1024px) {
  .videos { grid-template-columns: repeat(2, 1fr); }
  .cred-grid { grid-template-columns: 1fr 1fr; }
  .socials { grid-template-columns: repeat(2, 1fr); }
  .forewords { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: repeat(2, 1fr); }
}

/* ── 手機：目錄直接排在頁首同一行，不用點開（Jimmy 2026-09-28）──
   名字是重點、字大一點；「催眠理想國」小字收起來騰位子；目錄用小一點的字塞進同一欄。
   360px 寬的小手機也排得下；更窄的舊手機目錄可以左右滑，不會把版面擠壞。 */
@media (max-width: 640px) {
  .hdr .wrap { gap: 10px; }
  .logo b { font-size: 24px; letter-spacing: .1em; }
  .logo span { display: none; }
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav ul { gap: 0; }
  .nav a { padding: 8px 5px; font-size: 13.5px; letter-spacing: .04em; border-radius: 8px; white-space: nowrap; }
}

/* ── 手機 ── */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { min-height: 0; padding: 96px 0 110px; background-position: 70% center; }
  .hero::before { background: linear-gradient(180deg, rgba(8, 24, 38, .72) 0%, rgba(8, 24, 38, .86) 55%, rgba(8, 24, 38, .94) 100%); }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .portrait { order: -1; max-width: 190px; justify-self: start; }
  .hero .lead { font-size: 17px; }
  .eyebrow { font-size: 12.5px; letter-spacing: .1em; padding: 5px 12px; }
  .facts { margin-top: -60px; }
  .facts ol { grid-template-columns: 1fr 1fr; padding: 14px 6px; row-gap: 10px; }
  .facts li { padding: 6px 12px; border-left: 0; }
  .facts li:nth-child(even) { border-left: 1px solid var(--line); }
  .facts b { font-size: 26px; }
  .facts span { font-size: 14px; }
  .sec { padding: 72px 0; }
  .about-grid, .motto-split, .book-card, .media-cols { grid-template-columns: 1fr; gap: 32px; }
  .cred { padding: 24px 20px 18px; margin-top: 40px; }
  .cred-grid { grid-template-columns: 1fr; }
  .about-side { position: static; }
  .book-card { padding: 22px; border-radius: 22px; }
  .book-img { max-width: 300px; }
  .checks { grid-template-columns: 1fr; }
  .principles, .programs, .videos, .forewords, .socials { grid-template-columns: 1fr; }
  .org-link { flex-wrap: wrap; }
  .org-link i { width: 100%; padding-left: 46px; }
  .pill-row { grid-template-columns: 1fr; gap: 8px; }
  .pill-row h3 { padding-top: 0; }
  .pods a { grid-template-columns: 28px 1fr; }
  .pods time { grid-column: 2; order: 2; }
  .sub-title { margin-top: 56px; }
}

@media print {
  .hdr, .nav, .btns, .socials { display: none !important; }
  .hero { min-height: 0; background: none !important; color: var(--text); padding: 24px 0; }
  .hero::before { display: none; }
  .hero h1, .hero .lead, .motto q { color: var(--ink); }
  .js .reveal { opacity: 1; transform: none; }
}
