/* 首頁：一份放在桌上的「產品說明書・白話版」
 * 首屏是封面卡（壓在 1929 年證交所外人群的照片上），往下是商品條目、收據、危機年表、
 * 行程單、回覆卡，頁尾是說明書的背面。
 */
.home { --step-small: clamp(.875rem, .85rem + .1vw, .95rem); --step-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + .7vw, 1.625rem); --step-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --step-giant: clamp(5rem, 2rem + 14vw, 15rem); }
.home main { all: unset; display: block; }
.home main::before { content: none; }
.home section { position: relative; }
.home h2 { font-size: var(--step-head); line-height: 1.05; margin: 0 0 .4em; letter-spacing: -.02em; max-width: none; }
.home p { max-width: 40em; }
.wrap { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; margin: 0 auto; }
.numeral { font-family: var(--display); font-weight: 900; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* ---------- 首屏：封面卡壓在照片上 ---------- */
.cover { height: 118svh; }
.cover-photo { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #000; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.55); transform: scale(1.06); animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.14) translate(-1.5%, -1%); } }
.cover-card {
  position: absolute; top: 9svh; left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2 * var(--gutter)), 900px);
  background: var(--paper); color: var(--ink); padding: clamp(24px, 4vw, 44px);
  display: grid; gap: 22px;
}
.cover h1 { font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4.6rem); line-height: 1.08; letter-spacing: -.02em; margin: 0; max-width: none; padding-right: 0; }
.nb { display: inline-block; }
.cover .lede { font-size: var(--step-lead); line-height: 1.55; margin: 0; max-width: 34em; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; }
.facts li { background: var(--paper-2); padding: 12px 16px; font-size: 1rem; line-height: 1.5; max-width: none; }
.facts b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.9rem; line-height: 1; color: var(--seal); }
.cover-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; font-size: var(--step-small); color: var(--ink-soft); }
.cover-bottom .credit { max-width: 22em; }
.action { display: inline-block; background: var(--seal); color: #fff; text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 1.1rem; padding: 14px 26px; transition: background .15s, transform .1s; }
.action:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.action:active { transform: translateY(1px); }

/* 即時拆解器 */
.decoder { background: var(--paper-2); padding: 18px 20px; display: grid; gap: 12px; }
.decoder label { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.decoder input { font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 1; width: 2.6em; padding: 2px 6px; border: 0; border-bottom: 3px solid var(--seal); background: var(--paper); color: var(--seal); text-align: center; }
.decoder input:focus-visible { outline: 3px solid var(--seal); outline-offset: 2px; }
.split { display: flex; height: 44px; }
.split span { display: flex; align-items: center; padding: 0 10px; font-size: .95rem; white-space: nowrap; overflow: hidden; transition: flex-basis .35s ease; min-width: 0; }
.split .p-rate { background: var(--paper-3); color: var(--ink); }
.split .p-risk { background: var(--seal); color: #fff; }
.split .p-fee { background: var(--ink); color: var(--paper); }
.home .decoder-out { margin: 0; font-size: 1.05rem; max-width: 42em; }
.decoder-out b { color: var(--seal); }
.home .decoder-note { margin: 0; font-size: var(--step-small); color: var(--ink-soft); max-width: none; }

/* ---------- 商品：巨字＋可展開條目，右邊是債券樣本 ---------- */
.products { padding: 96px 0 140px; color: var(--on-desk); }
.products .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.products-col { container-type: inline-size; }
.home .giant { font-family: var(--cjk-heavy); font-weight: 900; font-size: 46cqw; line-height: .9; letter-spacing: -.04em; margin: 0 0 24px; color: var(--on-desk); }
.products-col > p { color: var(--on-desk-soft); font-size: var(--step-lead); line-height: 1.5; margin: 0 0 28px; }
.bars { display: grid; gap: 6px; }
.bars details { background: var(--desk-2); color: var(--on-desk); transition: background .15s; }
.bars details[open] { background: var(--paper); color: var(--ink); }
.bars summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; min-height: 60px; font-family: var(--sans); font-weight: 700; font-size: 1.15rem; }
.bars summary::-webkit-details-marker { display: none; }
.bars summary::after { content: "＋"; font-weight: 400; transition: transform .2s; }
.bars details[open] summary::after { transform: rotate(45deg); }
.bars summary:hover { color: var(--on-desk); background: var(--desk); }
.bars details[open] summary:hover { background: var(--paper-2); color: var(--ink); }
.bar-body { padding: 0 20px 20px; display: grid; gap: 10px; }
.bar-body p { margin: 0; font-size: 1.05rem; }
.bar-body dl { margin: 0; display: grid; grid-template-columns: 6.5em 1fr; gap: 6px 14px; font-size: 1rem; }
.bar-body dt { color: var(--seal); font-weight: 700; }
.bar-body dd { margin: 0; }
.bar-body a { font-weight: 700; color: inherit; }
.plate { position: sticky; top: 96px; margin: 0; }
.plate img { display: block; width: 100%; height: auto; }
.plate figcaption { color: var(--on-desk-soft); font-size: var(--step-small); margin-top: 10px; line-height: 1.6; }

/* ---------- 收據：照片＋沿底邊站著的六張收據 ---------- */
.receipts { min-height: 96svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: #000; }
.receipts > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3) brightness(.45); }
.receipts-text { position: relative; padding: 96px max(var(--gutter), calc((100% - 1200px) / 2)) 40px; max-width: none; }
.receipts-text > div { background: rgba(20, 0, 6, .62); padding: 24px 28px; max-width: 760px; color: var(--paper); }
.receipts-text h2 { color: var(--paper); font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.2rem); }
.receipts-text p { color: var(--paper); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); line-height: 1.55; margin: 0 0 .6em; }
.receipts-text p:last-child { margin: 0; }
.slips { position: relative; align-self: end; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 0 max(var(--gutter), calc((100% - 1200px) / 2)); align-items: end; }
.slip { background: var(--paper); color: var(--ink); padding: 18px 16px 40px; font-size: .95rem; line-height: 1.55; transform-origin: bottom center; transition: transform .25s ease; }
.slip:hover { transform: translateY(-10px) rotate(0deg) !important; }
.slip:nth-child(1) { height: 44svh; transform: rotate(-1.5deg); }
.slip:nth-child(2) { height: 34svh; }
.slip:nth-child(3) { height: 40svh; transform: rotate(1deg); }
.slip:nth-child(4) { height: 30svh; }
.slip:nth-child(5) { height: 38svh; transform: rotate(-1deg); }
.slip:nth-child(6) { height: 33svh; }
.slip h3 { font-size: 1.1rem; margin: 0 0 2px; }
.slip .rule { height: 0; border-top: 4px dotted var(--paper-3); margin: 8px 0; }
.slip .row { display: flex; justify-content: space-between; gap: 8px; }
.slip .row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.slip .total { font-weight: 700; }
.slip .worst { color: var(--seal); font-weight: 700; margin-top: 6px; }
.slip a { position: absolute; inset: 0; text-indent: -9999px; overflow: hidden; }
.slip { position: relative; }

/* ---------- 危機年表：一張斜放、被下緣裁掉的卡 ---------- */
.crises { background: var(--on-desk); color: var(--desk); padding: 140px var(--gutter) 0; overflow: hidden; }
.crises-card { width: min(100%, 760px); margin: 0 auto -56px; background: var(--paper); color: var(--ink); padding: clamp(28px, 5vw, 56px); transform: rotate(-1.5deg); text-align: center; }
.crises-card h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); margin: 0 0 18px; }
.crises-card figure { margin: 24px 0 18px; }
.crises-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; filter: grayscale(.2); }
.crises-card figcaption { font-size: var(--step-small); color: var(--ink-soft); margin-top: 8px; }
.timeline { list-style: none; margin: 0 auto 24px; padding: 0; display: grid; gap: 4px; max-width: 560px; }
.timeline li { display: grid; grid-template-columns: 4.2em 1fr auto; gap: 14px; align-items: baseline; text-align: left; padding: 10px 14px; background: var(--paper-2); max-width: none; }
.timeline li:nth-child(even) { background: var(--paper-3); }
.timeline .yr { font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.timeline .mv { font-family: var(--display); font-weight: 900; font-size: 1.5rem; line-height: 1.1; color: var(--seal); }
.crises-card .more { font-size: 1.1rem; }
.crises-card .note { font-size: var(--step-small); color: var(--ink-soft); margin: 10px auto 0; }

/* ---------- 去銀行之前：行程單 ---------- */
.itinerary { padding: 180px 0 160px; color: var(--on-desk); }
.itinerary .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.itinerary h2 { color: var(--on-desk); }
.itinerary .wrap > div > p { color: var(--on-desk-soft); font-size: var(--step-lead); line-height: 1.55; max-width: 30ch; }
.ticket {
  background: var(--paper); color: var(--ink); padding: 32px 30px 64px; max-width: 520px; justify-self: end; width: 100%;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95% 100%, 90% calc(100% - 14px), 85% 100%, 80% calc(100% - 14px), 75% 100%, 70% calc(100% - 14px), 65% 100%, 60% calc(100% - 14px), 55% 100%, 50% calc(100% - 14px), 45% 100%, 40% calc(100% - 14px), 35% 100%, 30% calc(100% - 14px), 25% 100%, 20% calc(100% - 14px), 15% 100%, 10% calc(100% - 14px), 5% 100%, 0 calc(100% - 14px));
}
.ticket h3 { margin: 26px 0 8px; font-size: 1.15rem; }
.ticket h3:first-child { margin-top: 0; }
.leg { display: flex; align-items: baseline; gap: 10px; margin: 6px 0; font-size: 1.05rem; }
.leg a { color: var(--ink); }
.leg .dots { flex: 1; border-bottom: 4px dotted var(--paper-3); transform: translateY(-4px); min-width: 24px; }
.leg .t { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-soft); }
.ticket .result { margin: 28px -30px 0; background: var(--ink); color: var(--paper); padding: 12px 30px; display: flex; justify-content: space-between; gap: 10px; font-family: var(--sans); font-weight: 700; }

/* ---------- 回覆卡 ---------- */
.reply { background: var(--seal); color: #fff; overflow: hidden; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); padding: 120px max(var(--gutter), calc((100% - 1200px) / 2)) 0; align-items: end; }
.reply-text { padding-bottom: 64px; }
.reply-text h3 { font-size: 1.5rem; margin: 0 0 10px; color: #fff; }
.reply-text p { font-size: clamp(1.15rem, 1.05rem + .4vw, 1.4rem); line-height: 1.6; color: #fff; margin: 0 0 .8em; }
.reply-card { background: var(--paper); color: var(--ink); padding: 48px; text-align: center; transform: rotate(2deg) translateY(60px); aspect-ratio: 7 / 5; display: flex; flex-direction: column; justify-content: center; gap: 14px; max-width: 760px; width: 100%; justify-self: end; }
.reply-card h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); margin: 0; }
.reply-card p { margin: 0 auto; font-size: 1.15rem; }
.reply-card .bar-action { display: block; background: var(--ink); color: var(--paper); text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: 1.2rem; padding: 16px; margin-top: 10px; transition: background .15s; }
.reply-card .bar-action:hover { background: var(--seal); color: #fff; }

/* ---------- 頁尾：說明書的背面 ---------- */
.back { padding: 120px var(--gutter) 64px; }
.back-panel { position: relative; max-width: 1040px; margin: 0 auto; background: var(--paper); color: var(--ink); padding: 72px clamp(24px, 5vw, 64px) 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; }
.scallops { position: absolute; left: 0; right: 0; top: -40px; height: 41px; width: 100%; display: block; fill: var(--paper); }
.back-panel h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); margin: 0 0 14px; }
.back-panel p { font-size: 1.05rem; margin: 0 0 12px; }
.addr { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 1.15rem; align-content: start; }
.addr a { color: var(--ink); }
.stamp { position: absolute; top: 28px; right: 28px; width: 88px; background: var(--paper); padding: 6px; transform: rotate(6deg); outline: 2px dashed var(--seal); outline-offset: -2px; }
.stamp img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.imprint { grid-column: 1 / -1; text-align: center; font-size: var(--step-small); color: var(--ink-soft); margin: 12px auto 0; max-width: 46em; }
.imprint a { color: var(--ink-soft); }

/* ---------- 進場動畫 ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- 手機 ---------- */
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr; }
  .facts li { display: flex; align-items: baseline; gap: 12px; }
  .facts b { font-size: 1.8rem; min-width: 2.2em; }
  .products .wrap, .itinerary .wrap { grid-template-columns: 1fr; }
  .plate { position: static; max-width: 420px; }
  .ticket { justify-self: stretch; }
  .reply { grid-template-columns: 1fr; padding-top: 96px; }
  .reply-text { padding-bottom: 0; }
  .reply-card { transform: rotate(1deg) translateY(40px); aspect-ratio: auto; padding: 32px 22px 72px; justify-self: stretch; width: auto; }
  .back-panel { grid-template-columns: 1fr; padding-top: 104px; }
  .stamp { width: 64px; top: 22px; }
  .slips { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .slip:nth-child(n) { height: auto; }
}
@media (max-width: 560px) {
  .cover { height: auto; }
  .cover-photo { position: absolute; inset: 0; height: 100%; }
  .cover-card { position: relative; top: auto; left: auto; transform: none; margin: 16px auto 0; }
  .cover { padding-bottom: 48px; }
  .slips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slip { padding: 14px 12px 20px; font-size: .9rem; }
  .split span { font-size: .85rem; padding: 0 6px; }
  .timeline li { grid-template-columns: 3.2em 1fr auto; gap: 10px; }
  .crises-card { margin-bottom: -32px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-photo img { animation: none; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
