/* 影展節目單：紙、墨、每部「片」（每個人）一個主色。
   投影片全部用 cqw / cqh，同一份 HTML 在投影幕和手機預覽都等比縮放。 */

@font-face {
  font-family: "YR Mincho"; /* 標題：Noto Serif TC Black（OFL） */
  src: url("/fonts/NotoSerifTC-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YR Poster"; /* 數字與拉丁標示：Big Shoulders Display Black（OFL） */
  src: url("/fonts/BigShouldersDisplay-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f4f8; /* 紙：墨色的最淺一階 */
  --bg2: #ffffff;
  --ink: #16131d;
  --ink-2: color-mix(in srgb, var(--ink) 70%, transparent);
  --dim: color-mix(in srgb, var(--ink) 70%, transparent);
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 46%, transparent);
  --sun: #ffcf33; /* 活動本身的顏色 */
  --deep: #1c1030;
  --ok: #0b7f5f;
  --bad: #c8203f;
  --serif: "YR Mincho", "Songti TC", "Noto Serif TC", "Noto Serif CJK TC", "PMingLiU", serif;
  --sans: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif;
  --num: "YR Poster", "Avenir Next Condensed", "HelveticaNeue-CondensedBold", "Arial Narrow", "PingFang TC", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.stage {
  container-type: size;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  --pc: #ffcf33; /* 發表者的主色（色塊） */
  --accent: color-mix(in srgb, var(--pc) 50%, var(--deep)); /* 主色的深色版（紙上的文字） */
}

/* 滿版色塊：上面的次要文字從墨色調出來，不用灰 */
.field {
  background: var(--pc);
  --ink-2: color-mix(in srgb, var(--ink) 84%, transparent);
  --dim: color-mix(in srgb, var(--ink) 84%, transparent);
  --line: color-mix(in srgb, var(--ink) 30%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 60%, transparent);
}

.sl {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 4.6cqh 4.4cqw 4.2cqh;
  background: var(--bg);
  isolation: isolate;
  animation: wipe 0.75s var(--ease) both;
}
.sl.field { background: var(--pc); }
/* 換頁：新的一頁像換片一樣從右邊掃進來 */
@keyframes wipe {
  from { clip-path: inset(0 0 0 100%); }
  to { clip-path: inset(0 0 0 0); }
}
/* 印刷顆粒 */
.sl::after, .scr::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* 分步揭曉：答案從左到右被「擦」出來 */
[data-at] {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s var(--ease), opacity 0.15s linear;
}
[data-at].on { opacity: 1; clip-path: inset(0 0 0 0); }
[data-until] { transition: opacity 0.25s ease, transform 0.4s var(--ease); }
[data-until].off { opacity: 0; transform: translateY(-1.5cqh); }

@keyframes rise {
  from { opacity: 0; transform: translateY(4cqh); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.82); }
}

/* 頁首頁尾：節目單的眉線 */
.rh, .rf {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2cqw;
  font-size: 1.35cqw;
  font-weight: 600;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.rh { padding-bottom: 1.5cqh; border-bottom: 0.16cqw solid var(--ink); }
.rf { padding-top: 1.4cqh; border-top: 0.1cqw solid var(--line-strong); color: var(--ink-2); }
.rh span:last-child, .rf span:last-child { font-family: var(--num); font-weight: 900; font-size: 1.7cqw; letter-spacing: 0.1em; }

/* 相片：白邊的沖印照片 */
.print {
  border: 0.7cqw solid #fff;
  background: #fff;
  box-shadow: 0 1.2cqw 3cqw color-mix(in srgb, var(--ink) 26%, transparent);
}

/* 01 封面：一張電影票 */
.cover-main { flex: 1; min-height: 0; display: flex; align-items: center; gap: 4cqw; position: relative; }
.cover-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2.4cqh; }
.cover-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  animation: rise 1s 0.3s var(--ease) both;
}
.cover-sub { margin: 0; font-size: 2.5cqw; font-weight: 600; color: var(--ink-2); animation: rise 1s 0.42s var(--ease) both; }
.cover-year {
  position: absolute;
  right: -1.2cqw;
  bottom: -6.5cqh;
  z-index: -1;
  font-family: var(--num);
  font-weight: 900;
  font-size: 33cqw;
  line-height: 0.8;
  color: color-mix(in srgb, var(--pc) 89%, var(--ink));
}
.cover-photo { flex: none; width: 29cqw; aspect-ratio: 4 / 5; max-height: 84%; object-fit: cover; transform: rotate(2.5deg); margin-right: 1cqw; }
.ticket { flex: none; display: flex; align-items: stretch; border: 0.16cqw solid var(--ink); border-radius: 0.9cqw; overflow: hidden; background: var(--pc); }
.ticket > div { flex: 1; min-width: 0; padding: 1.3cqh 1.8cqw 1.5cqh; border-right: 0.16cqw dashed var(--ink); display: flex; flex-direction: column; gap: 0.3cqh; }
.ticket small { font-size: 1.1cqw; font-weight: 600; letter-spacing: 0.2em; color: var(--ink-2); }
.ticket b { font-size: 2cqw; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket .stub {
  flex: none;
  border-right: 0;
  justify-content: center;
  padding: 0 2.4cqw;
  background: var(--ink);
  color: var(--pc);
  font-family: var(--num);
  font-weight: 900;
  font-size: 2.6cqw;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 02 年度數據：左邊一整塊顏色放數字，右邊問答 */
.sl-stat { padding: 0; flex-direction: row; }
.st-num { flex: 0 0 57cqw; min-width: 0; display: grid; place-items: center; position: relative; overflow: hidden; padding: 0 3cqw; }
.stat-num {
  font-family: var(--num);
  font-weight: 900;
  line-height: 0.86;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  animation: pop 0.9s 0.2s var(--ease) both;
}
.st-idx { position: absolute; left: 3.2cqw; bottom: 3.6cqh; font-family: var(--num); font-weight: 900; font-size: 3cqw; line-height: 1; }
.st-idx i { font-style: normal; opacity: 0.6; margin-left: 0.12em; }
.st-side { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4.6cqh 3.6cqw 4.2cqh; }
.st-qa { flex: 1; min-height: 0; display: grid; align-items: center; }
.st-qa > * { grid-area: 1 / 1; min-width: 0; }
.stat-q { display: flex; flex-direction: column; align-items: flex-start; gap: 2.6cqh; }
.stat-q strong { font-family: var(--serif); font-weight: 900; font-size: 5.6cqw; line-height: 1.18; }
.stat-q span {
  font-size: 1.5cqw;
  font-weight: 700;
  letter-spacing: 0.2em;
  background: var(--sun);
  padding: 0.5cqw 1.3cqw 0.5cqw 1.5cqw;
  border-radius: 99cqw;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  50% { transform: translateX(0.6cqw); }
}
.stat-a strong { display: block; font-family: var(--serif); font-weight: 900; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }

/* 年度數據總覽：一張明細表 */
.sa-list { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.6cqh; --n: 6.6cqw; --t: 2.5cqw; }
.sa-list[data-n="m"] { gap: 1.5cqh; --n: 4.5cqw; --t: 2cqw; }
.sa-list[data-n="l"] { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqh 5cqw; align-content: center; --n: 3.6cqw; --t: 1.55cqw; }
.sa { display: flex; align-items: baseline; gap: 1.4cqw; min-width: 0; animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i) * 0.08s + 0.3s); }
.sa b { font-family: var(--num); font-weight: 900; font-size: var(--n); line-height: 1; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sa i { flex: 1; min-width: 2cqw; border-bottom: 0.22cqw dotted var(--line-strong); transform: translateY(-0.45cqw); }
.sa span { font-size: var(--t); font-weight: 600; line-height: 1.3; text-align: right; max-width: 62%; }

/* 03 高光時刻：一張裱好的照片 */
.sl-photo { background: color-mix(in srgb, var(--pc) 24%, #fff); }
.shot { flex: 1; min-height: 0; margin: 2.4cqh 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 1.8cqh; }
.shot-img { width: 100%; height: 100%; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.shot-img img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; animation: develop 1s 0.2s var(--ease) both; }
@keyframes develop {
  from { opacity: 0; transform: scale(0.96) rotate(-0.8deg); filter: saturate(0.1) brightness(1.25); }
}
.shot figcaption { font-family: var(--serif); font-weight: 900; font-size: 2.5cqw; line-height: 1.3; text-align: center; max-width: 78cqw; text-wrap: balance; }

/* 04 荒謬大賞 */
.ab-body { flex: 1; min-height: 0; display: flex; gap: 4cqw; align-items: center; padding: 2cqh 0; }
.ab-photo { flex: none; width: 30cqw; max-height: 92%; object-fit: cover; transform: rotate(-2.5deg); margin-left: 1cqw; }
.ab-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3.4cqh; }
.ab-story { margin: 0; max-width: 68cqw; line-height: 1.62; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.ab-lesson { align-self: flex-start; max-width: 100%; background: var(--pc); border-radius: 0.8cqw; padding: 2cqh 2.4cqw 2.4cqh; display: flex; flex-direction: column; gap: 0.8cqh; }
.ab-lesson span { font-size: 1.4cqw; font-weight: 600; letter-spacing: 0.16em; color: color-mix(in srgb, var(--ink) 84%, transparent); }
.ab-lesson strong { font-family: var(--serif); font-weight: 900; line-height: 1.28; text-wrap: balance; }
.seal {
  position: absolute;
  right: 5.4cqw;
  top: 13.5cqh;
  width: 12.5cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0.24cqw solid var(--accent);
  outline: 0.12cqw solid var(--accent);
  outline-offset: 0.5cqw;
  color: var(--accent);
  display: grid;
  place-content: center;
  text-align: center;
  font-family: var(--serif);
  font-weight: 900;
  line-height: 1.12;
  transform: rotate(11deg);
  animation: stamp 0.5s 0.6s var(--ease) both;
}
.seal span { font-size: 1.5cqw; letter-spacing: 0.3em; margin-right: -0.3em; }
.seal b { font-size: 3.3cqw; }
@keyframes stamp {
  from { opacity: 0; transform: rotate(11deg) scale(1.7); }
}
.sl-absurd.has-photo .seal { left: 25.5cqw; right: auto; top: auto; bottom: 12cqh; background: var(--bg); }

/* 05 感謝名單：片尾字幕 */
.th-list { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 3cqh; --who: 4.6cqw; --why: 2cqw; }
.th-list[data-n="l"] { gap: 1.8cqh; --who: 2.9cqw; --why: 1.55cqw; }
.th-list[data-n="xl"] { gap: 1cqh; --who: 2.05cqw; --why: 1.25cqw; }
.th { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6cqw; align-items: baseline; animation: credit 1s var(--ease) both; animation-delay: calc(var(--i) * 0.14s + 0.35s); }
.th span { text-align: right; font-size: var(--why); font-weight: 500; line-height: 1.35; color: var(--ink-2); }
.th b { font-family: var(--serif); font-weight: 900; font-size: var(--who); line-height: 1.15; }
@keyframes credit {
  from { opacity: 0; transform: translateY(6cqh); }
}

/* 06 2027 預告片：上下黑邊 */
.sl-trailer { padding: 0; background: var(--ink); }
.sl-trailer .bar { flex: none; height: 10cqh; display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 0 4.4cqw; color: var(--bg); font-size: 1.35cqw; font-weight: 600; letter-spacing: 0.16em; white-space: nowrap; }
.sl-trailer .bar.top span:first-child { font-family: var(--num); font-weight: 900; font-size: 2.1cqw; letter-spacing: 0.12em; color: var(--pc); }
.sl-trailer .bar span:last-child { font-family: var(--num); font-weight: 900; font-size: 1.7cqw; letter-spacing: 0.1em; }
.tr-body { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; align-content: center; gap: 4.2cqh 4cqw; padding: 0 4.4cqw; }
.tr { flex: 1 1 40%; min-width: 0; display: flex; flex-direction: column; gap: 1cqh; }
.tr small { font-size: 1.4cqw; font-weight: 600; letter-spacing: 0.2em; color: var(--ink-2); }
.tr strong { font-weight: 700; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.tr-keyword { flex-basis: 100%; }
.tr-keyword strong { font-family: var(--serif); font-weight: 900; line-height: 1.05; animation: rise 1s 0.3s var(--ease) both; }

/* 謝幕 */
.end-main { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.4cqh; }
.sl-end h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: 15cqw; line-height: 1; letter-spacing: 0.02em; animation: rise 1.1s 0.3s var(--ease) both; }
.end-by { margin: 0; font-size: 2.4cqw; font-weight: 600; color: var(--ink-2); }
.end-got { flex: none; display: flex; align-items: baseline; gap: 3.4cqw; padding-top: 1.8cqh; border-top: 0.16cqw solid var(--ink); font-size: 1.7cqw; font-weight: 600; }
.end-got b { font-family: var(--num); font-weight: 900; font-size: 5cqw; line-height: 1; margin-right: 0.6cqw; font-variant-numeric: tabular-nums; }
.end-got em { font-style: normal; margin-left: auto; align-self: center; background: var(--ink); color: var(--pc); padding: 0.55cqw 1.6cqw; border-radius: 99cqw; font-size: 1.4cqw; letter-spacing: 0.16em; }

@media (prefers-reduced-motion: reduce) {
  .sl, .sl *, .scr, .scr * { animation: none !important; transition: none !important; }
  [data-at].on { clip-path: none; }
}
