/* theme.css — 極簡商務白底主題（1920×1080 畫布） */
:root {
  --ink: #132F48;
  --ink-2: #334155;
  --accent: #1F7A8C;
  --accent-soft: #E6F1F4;
  --accent-deep: #145A68;
  --muted: #6B7280;
  --line: #E5E7EB;
  --line-2: #D1D5DB;
  --bg: #FFFFFF;
  --bg-2: #F8FAFC;
  --ok: #15803D;
  --ok-soft: #DCFCE7;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --bad: #B91C1C;
  --bad-soft: #FEE2E2;
  --coral: #E07A5F;
  --font: "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", "PingFang TC", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
}

/* 倒退進入投影片時做狀態同步：暫時關掉所有過場 */
html.instant *, html.instant *::before, html.instant *::after {
  transition: none !important;
  animation: none !important;
}

html, body { background: var(--bg); }
.reveal-viewport { background: var(--bg); }
.reveal .slides section:where(.aj) {
  font-family: var(--font);
  font-size: 40px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
}
.reveal .slides { text-align: left; }
.reveal .slides section:where(.aj),
.reveal .slides section:where(.aj) > section {
  height: 100%;
  box-sizing: border-box;
  padding: 72px 110px 90px;
}
.reveal .slides section:where(.aj)[data-menu]::after {
  content: attr(data-menu);
  position: absolute;
  right: 110px;
  top: 40px;
  font-size: 28px;
  letter-spacing: .18em;
  color: var(--muted);
}
.reveal :where(section.aj) h1, .reveal :where(section.aj) h2, .reveal :where(section.aj) h3, .reveal :where(section.aj) h4 {
  font-family: inherit;
  text-transform: none;
  letter-spacing: .02em;
  color: var(--ink);
  margin: 0;
  text-shadow: none;
}
.reveal :where(section.aj) h1 { font-size: 96px; font-weight: 700; line-height: 1.2; }
.reveal :where(section.aj) h2 { font-size: 66px; font-weight: 700; line-height: 1.25; }
.reveal :where(section.aj) h3 { font-size: 46px; font-weight: 600; line-height: 1.3; }
.reveal :where(section.aj) h4 { font-size: 36px; font-weight: 600; }
.reveal :where(section.aj) p { margin: 0; line-height: 1.6; }
.reveal :where(section.aj) strong, .reveal :where(section.aj) b { color: var(--accent-deep); font-weight: 700; }
.reveal .progress { color: var(--accent); height: 6px; }
.reveal .slide-number {
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  right: 28px;
  bottom: 18px;
  font-family: var(--font);
}

/* 頁首 */
:where(section.aj) .hdr { margin-bottom: 36px; }
:where(section.aj) .hdr .kicker {
  font-size: 30px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .3em;
  margin-bottom: 6px;
}
:where(section.aj) .hdr h2 { position: relative; padding-left: 30px; }
:where(section.aj) .hdr h2::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 8px; border-radius: 4px;
  background: var(--accent);
}
:where(section.aj) .hdr .sub { color: var(--muted); font-size: 36px; margin-top: 12px; padding-left: 30px; }

/* 底部說明句 */
:where(section.aj) .caption {
  position: absolute;
  left: 110px; right: 110px; bottom: 70px;
  font-size: 46px; font-weight: 700; color: var(--ink);
  display: flex; align-items: baseline; gap: 22px;
}
:where(section.aj) .caption .tag {
  font-size: 28px; font-weight: 700; letter-spacing: .2em;
  color: var(--accent); border: 2px solid var(--accent);
  border-radius: 999px; padding: 4px 16px;
}
:where(section.aj) .muted { color: var(--muted); }
:where(section.aj) .accent { color: var(--accent); }
:where(section.aj) .small { font-size: 32px; }
:where(section.aj) .tiny { font-size: 26px; }
:where(section.aj) .mono { font-family: var(--mono); }
:where(section.aj) .num { text-align: right; font-variant-numeric: tabular-nums; }
:where(section.aj) .center { text-align: center; }
:where(section.aj) .row { display: flex; gap: 40px; align-items: stretch; }
:where(section.aj) .col { flex: 1; min-width: 0; }
:where(section.aj) .abs { position: absolute; }
:where(section.aj) .hidden { display: none !important; }

/* 自訂 fragment 動畫 */
.reveal :where(section.aj) .fragment.rise { opacity: 0; transform: translateY(36px); transition: opacity .55s ease, transform .55s ease; }
.reveal :where(section.aj) .fragment.rise.visible { opacity: 1; transform: none; }
.reveal :where(section.aj) .fragment.pop { opacity: 0; transform: scale(.85); transition: opacity .4s ease, transform .45s cubic-bezier(.2,1.4,.4,1); }
.reveal :where(section.aj) .fragment.pop.visible { opacity: 1; transform: none; }
.reveal :where(section.aj) .fragment.slide-left { opacity: 0; transform: translateX(80px); transition: all .6s ease; }
.reveal :where(section.aj) .fragment.slide-left.visible { opacity: 1; transform: none; }
/* 純控制用 fragment：沒有外觀 */
.reveal :where(section.aj) .fragment.ctl { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; }
.reveal :where(section.aj) .fragment.ctl.visible { opacity: 0; }

/* 假滑鼠游標與點擊漣漪 */
:where(section.aj) .fake-cursor {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px;
  pointer-events: none; z-index: 999; opacity: 0;
  transition: transform .55s cubic-bezier(.3,.8,.3,1), opacity .25s ease;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.35));
}
:where(section.aj) .fake-cursor.show { opacity: 1; }
:where(section.aj) .fake-cursor::before {
  content: ''; position: absolute; left: 0; top: 0; width: 44px; height: 44px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 3l14 9-6.5 1.2L16 20l-2.4 1.1-3.5-6.8L5 19z' fill='%23fff' stroke='%23132F48' stroke-width='1.6' stroke-linejoin='round'/></svg>") no-repeat;
  background-size: contain;
}
:where(section.aj) .fake-cursor .ripple {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px;
  border-radius: 50%; border: 3px solid var(--accent); opacity: 0; transform: scale(.3);
}
:where(section.aj) .fake-cursor.clicking .ripple { animation: ripple .45s ease-out; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
:where(section.aj) .pressed { filter: brightness(.9); transform: scale(.97); }

/* 段落選單（按 M） */
#menu {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(19,47,72,.92); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
}
#menu[hidden] { display: none; }
#menu .box { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 48px; }
#menu button {
  font: inherit; font-size: 36px; color: #fff; background: transparent;
  border: 2px solid rgba(255,255,255,.35); border-radius: 12px;
  padding: 18px 34px; text-align: left; cursor: pointer; min-width: 520px;
}
#menu button:hover, #menu button:focus { border-color: #fff; background: rgba(255,255,255,.1); outline: none; }
#menu button .k { display: inline-block; width: 60px; color: #7FD1E0; font-weight: 700; }
#menu .hint { position: fixed; bottom: 40px; left: 0; right: 0; text-align: center; font-size: 28px; color: rgba(255,255,255,.7); }

/* 單一 slide 內的「跳出說明視窗」 */
:where(section.aj) .overlay {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(19,47,72,.28);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
:where(section.aj) .overlay.on { opacity: 1; pointer-events: auto; }
:where(section.aj) .overlay .dialog {
  background: #fff; border-radius: 18px; padding: 44px 52px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  transform: translateY(24px) scale(.97); transition: transform .35s ease;
  min-width: 720px;
}
:where(section.aj) .overlay.on .dialog { transform: none; }
