/* ---------- Ditto 區：上面大字＋一句，下面「Ditto app 模擬」＋精簡功能 ---------- */
/* 大字多寬，左欄就多寬；說明排在剩下的空間，任何螢幕寬度都不會疊到 */
.d-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.d-head .ditto-word { margin-bottom: 0; font-size: clamp(80px, 11vw, 190px); }
.d-head .lead { justify-self: end; }
.d-head .lead { max-width: 34em; }
.d-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: clamp(48px, 7vh, 80px); }
.d-body .feats { margin: 0; display: grid; grid-template-columns: 1fr; }
.d-body .feats li { grid-template-columns: minmax(0, 1fr); padding: 16px 0; gap: 2px 14px; }
.d-body .feats h3 { font-size: 18px; }
.d-body .feats p { font-size: 15px; line-height: 1.6; }

/* ---------- Ditto app 操作模擬（四幕輪播，site.js 換 data-scene）----------
   深色玻璃視窗：左欄對話一則則冒出來，右邊畫面跟著換；產品照是示意用的生成圖 */
.dapp {
  --g: rgba(255, 255, 255, .08);
  position: relative; height: 520px; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; color: #F2F1EE;
  background: linear-gradient(180deg, #19191C 0%, #121214 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 120px -50px rgba(0, 0, 0, .95), 0 30px 80px -40px rgba(211, 20, 27, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.da-bar { display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 18px; flex: none; }
.da-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.da-bar span { margin-left: 12px; font-family: var(--wide); font-stretch: 125%; font-variation-settings: "wdth" 125; font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.da-bar span::after { content: "."; color: var(--red); }
.da-bar em { margin-left: auto; font: 400 11px/1 var(--mono); font-style: normal; letter-spacing: .1em; color: rgba(242, 241, 238, .5); border: 1px solid var(--g); padding: 4px 8px; border-radius: 6px; }
/* 四段進度 */
.da-prog { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 18px; flex: none; }
.da-prog i { position: relative; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.da-prog i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; }
.dapp[data-scene="0"] .da-prog i:nth-child(1)::after, .dapp[data-scene="1"] .da-prog i:nth-child(2)::after, .dapp[data-scene="2"] .da-prog i:nth-child(3)::after, .dapp[data-scene="3"] .da-prog i:nth-child(4)::after { transform: scaleX(1); transition: transform var(--dur, 3.6s) linear; }
.dapp[data-scene="1"] .da-prog i:nth-child(1)::after, .dapp[data-scene="2"] .da-prog i:nth-child(-n+2)::after, .dapp[data-scene="3"] .da-prog i:nth-child(-n+3)::after { transform: scaleX(1); }
.da-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; padding: 14px; }

/* 左：對話 */
.da-chat { display: flex; flex-direction: column; gap: 10px; padding: 6px 4px 0; min-height: 0; }
.da-m { font-size: 13px; line-height: 1.55; padding: 10px 12px; border-radius: 12px; opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .45s var(--ease); }
.da-m.sys { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(242, 241, 238, .75); background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .14); }
.mini-fold { width: 16px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #F0545A, #C0141C); flex: none; }
.da-m.ai { background: rgba(255, 255, 255, .06); border: 1px solid var(--g); border-top-left-radius: 4px; }
.da-m.ai::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--red); vertical-align: 1px; }
.da-m.me { align-self: flex-end; max-width: 92%; background: #F2F1EE; color: #111; border-top-right-radius: 4px; }
.da-input { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: rgba(242, 241, 238, .4); padding: 10px 10px 10px 12px; border-radius: 12px; border: 1px solid var(--g); background: rgba(0, 0, 0, .25); }
.da-input i { width: 22px; height: 22px; border-radius: 7px; background: var(--red); flex: none; }
/* 對話是累積的：第 0 幕最後出現 m0，之後每一幕多一則 */
.dapp[data-scene="0"] .m0 { opacity: 1; transform: none; transition-delay: 2.6s; }
.dapp[data-scene="1"] .m0, .dapp[data-scene="2"] .m0, .dapp[data-scene="3"] .m0,
.dapp[data-scene="2"] .m1, .dapp[data-scene="3"] .m1,
.dapp[data-scene="3"] .m2 { opacity: 1; transform: none; }
.dapp[data-scene="1"] .m1 { opacity: 1; transform: none; transition-delay: 2.1s; }
.dapp[data-scene="2"] .m2 { opacity: 1; transform: none; transition-delay: .3s; }
.dapp[data-scene="3"] .m3 { opacity: 1; transform: none; transition-delay: 2.4s; }

/* 右：畫面 */
.da-view { position: relative; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 70% 0%, rgba(211, 20, 27, .14), transparent 60%), #0C0C0E; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.da-view::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 18px 18px; pointer-events: none; }
.da-s { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; padding: 22px; opacity: 0; visibility: hidden; transform: scale(.98); transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s .45s; }
.dapp[data-scene="0"] .da-s0, .dapp[data-scene="1"] .da-s1, .dapp[data-scene="2"] .da-s2, .dapp[data-scene="3"] .da-s3 { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease) .1s, transform .6s var(--ease) .1s, visibility 0s; }

/* 0 連接資料夾 */
.da-dlg { width: min(100%, 290px); padding: 26px 22px 18px; border-radius: 16px; text-align: center; background: #242428; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -20px rgba(0, 0, 0, .9); }
.da-fold { position: relative; display: block; width: 70px; height: 52px; margin: 6px auto 16px; border-radius: 7px; background: linear-gradient(180deg, #F25A60 0%, #C3141C 100%); box-shadow: 0 10px 24px -8px rgba(211, 20, 27, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
.da-fold::before { content: ""; position: absolute; left: 0; top: -7px; width: 28px; height: 10px; border-radius: 5px 5px 0 0; background: #D93A40; }
.da-dlg p { font-size: 14px; line-height: 1.6; color: rgba(242, 241, 238, .78); }
.da-dlg strong { color: #fff; }
.da-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.da-btns em { font-style: normal; font-size: 13px; font-weight: 700; padding: 9px 0; border-radius: 9px; background: rgba(255, 255, 255, .08); }
.da-btns .ok { background: #D3141B; }
.da-cur { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 22px solid #fff; transform: rotate(-28deg); opacity: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.dapp[data-scene="0"] .da-cur { animation: da-cur 3.6s cubic-bezier(.5, 0, .2, 1) both; }
@keyframes da-cur { 0% { opacity: 0; translate: 110px 110px; } 18% { opacity: 1; } 58% { translate: 62px 66px; } 64% { scale: .82; } 70% { scale: 1; } 100% { opacity: 1; translate: 62px 66px; } }
.dapp[data-scene="0"] .da-btns .ok { animation: da-press 3.6s linear both; }
@keyframes da-press { 0%, 62% { background: #D3141B; } 64% { background: #A30F15; box-shadow: 0 0 0 4px rgba(237, 28, 36, .3); } 78%, 100% { background: #D3141B; box-shadow: none; } }

/* 1 整理素材：素材一個個進來、打勾 */
.da-files { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 330px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.da-files li { position: relative; display: grid; gap: 7px; justify-items: center; font-size: 11.5px; color: rgba(242, 241, 238, .65); opacity: 0; transform: translateY(16px) scale(.9); transition: opacity .4s var(--ease), transform .55s cubic-bezier(.2, .9, .3, 1.15); }
.da-files img, .da-files b { display: grid; place-items: center; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 24px -12px rgba(0, 0, 0, .8); font: 700 12px/1 var(--mono); }
.f-logo b { background: #F2F1EE; }
.f-logo b::before { content: ""; width: 42%; height: 42%; border-radius: 50%; border: 5px solid #26282E; box-shadow: inset 0 0 0 5px #F2F1EE, inset 0 0 0 40px #26282E; }
.f-doc b { background: linear-gradient(180deg, #26262B, #1C1C20); color: rgba(242, 241, 238, .75); }
.f-doc.pdf b { color: #FF6A6E; }
.da-files li::after { content: "✓"; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #D3141B; color: #fff; font: 700 11px/20px var(--zh); text-align: center; box-shadow: 0 0 0 3px #0C0C0E; opacity: 0; transform: scale(.4); transition: opacity .3s var(--ease), transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.dapp[data-scene="1"] .da-files li, .dapp[data-scene="1"] .da-files li::after { opacity: 1; transform: none; }
.dapp[data-scene="1"] .da-files li:nth-child(2) { transition-delay: .18s; } .dapp[data-scene="1"] .da-files li:nth-child(3) { transition-delay: .36s; } .dapp[data-scene="1"] .da-files li:nth-child(4) { transition-delay: .54s; } .dapp[data-scene="1"] .da-files li:nth-child(5) { transition-delay: .72s; } .dapp[data-scene="1"] .da-files li:nth-child(6) { transition-delay: .9s; }
.dapp[data-scene="1"] .da-files li:nth-child(1)::after { transition-delay: 1.2s; } .dapp[data-scene="1"] .da-files li:nth-child(2)::after { transition-delay: 1.35s; } .dapp[data-scene="1"] .da-files li:nth-child(3)::after { transition-delay: 1.5s; } .dapp[data-scene="1"] .da-files li:nth-child(4)::after { transition-delay: 1.65s; } .dapp[data-scene="1"] .da-files li:nth-child(5)::after { transition-delay: 1.8s; } .dapp[data-scene="1"] .da-files li:nth-child(6)::after { transition-delay: 1.95s; }

/* 2 說出喜好：配色、字體、風格標籤定下來 */
.da-style { display: grid; justify-items: center; gap: 18px; }
.da-style .sw { display: flex; gap: 12px; }
.da-style .sw i { width: 54px; height: 54px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); opacity: 0; transform: translateY(10px) scale(.8); transition: opacity .4s var(--ease), transform .5s cubic-bezier(.2, .9, .3, 1.3); }
.da-style .k { background: #111113; } .da-style .w { background: #F2F1EE; } .da-style .r { background: #D3141B; }
.da-style .aa { font-family: var(--wide); font-stretch: 125%; font-variation-settings: "wdth" 125; font-weight: 800; font-size: 76px; line-height: 1; letter-spacing: -.04em; opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.da-style .tags { display: flex; gap: 8px; }
.da-style .tags span { font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 90, 94, .45); background: rgba(211, 20, 27, .12); opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .4s var(--ease); }
.dapp[data-scene="2"] .da-style .sw i, .dapp[data-scene="2"] .da-style .aa, .dapp[data-scene="2"] .da-style .tags span { opacity: 1; transform: none; }
.dapp[data-scene="2"] .da-style .sw i:nth-child(1) { transition-delay: 1s; } .dapp[data-scene="2"] .da-style .sw i:nth-child(2) { transition-delay: 1.15s; } .dapp[data-scene="2"] .da-style .sw i:nth-child(3) { transition-delay: 1.3s; }
.dapp[data-scene="2"] .da-style .aa { transition-delay: 1.6s; }
.dapp[data-scene="2"] .da-style .tags span:nth-child(1) { transition-delay: 2s; } .dapp[data-scene="2"] .da-style .tags span:nth-child(2) { transition-delay: 2.15s; } .dapp[data-scene="2"] .da-style .tags span:nth-child(3) { transition-delay: 2.3s; }

/* 3 完成上架：網站一塊塊組起來，產品照填進產品頁 */
.da-s3 { gap: 14px; }
.da-site { width: 100%; max-width: 360px; border-radius: 12px; overflow: hidden; background: #F5F5F7; padding: 10px; display: grid; gap: 8px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .9); }
.ds-nav { display: flex; align-items: center; gap: 7px; padding: 2px 4px; }
.ds-nav b { width: 44px; height: 9px; border-radius: 3px; background: #111; margin-right: auto; }
.ds-nav i { width: 22px; height: 5px; border-radius: 3px; background: #C9CBD1; }
.ds-hero { display: grid; grid-template-columns: 1fr 92px; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 9px; background: #111113; }
.ds-hero > div { display: grid; gap: 6px; }
.ds-hero .t1 { width: 92%; height: 10px; border-radius: 3px; background: #F2F1EE; }
.ds-hero .t2 { width: 60%; height: 10px; border-radius: 3px; background: #D3141B; }
.ds-hero .cta { width: 56px; height: 15px; margin-top: 6px; border-radius: 4px; background: #D3141B; }
.ds-hero img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; }
.ds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.ds-grid span { display: grid; gap: 5px; padding: 5px; border-radius: 8px; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .04); }
.ds-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.ds-grid i { height: 5px; width: 70%; border-radius: 3px; background: #D5D7DD; }
.da-site > *, .ds-grid span { opacity: 0; transform: translateY(12px); transition: opacity .45s var(--ease), transform .55s var(--ease); }
.dapp[data-scene="3"] .da-site > *, .dapp[data-scene="3"] .ds-grid span { opacity: 1; transform: none; }
.dapp[data-scene="3"] .ds-hero { transition-delay: .3s; } .dapp[data-scene="3"] .ds-grid { transition-delay: .6s; }
.dapp[data-scene="3"] .ds-grid span:nth-child(1) { transition-delay: .9s; } .dapp[data-scene="3"] .ds-grid span:nth-child(2) { transition-delay: 1.1s; } .dapp[data-scene="3"] .ds-grid span:nth-child(3) { transition-delay: 1.3s; }
.da-done { font-size: 13px; font-weight: 700; padding: 7px 14px 7px 12px; border-radius: 999px; background: rgba(211, 20, 27, .16); border: 1px solid rgba(255, 90, 94, .45); opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.da-done::before { content: "✓"; color: #FF6A6E; margin-right: 8px; }
.dapp[data-scene="3"] .da-done { opacity: 1; transform: none; transition-delay: 1.9s; }

@media (max-width: 1080px) {
  .d-head, .d-body { grid-template-columns: minmax(0, 1fr); }
  .d-head { gap: 20px; }
}
@media (max-width: 640px) {
  .dapp { height: 500px; }
  .da-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .da-chat { flex-direction: row; overflow: hidden; gap: 0; padding: 0; min-height: 52px; position: relative; }
  .da-chat .da-m { position: absolute; inset: 0 0 auto 0; }
  .da-input { display: none; }
  .dapp[data-scene="1"] .m0, .dapp[data-scene="2"] .m0, .dapp[data-scene="3"] .m0, .dapp[data-scene="2"] .m1, .dapp[data-scene="3"] .m1, .dapp[data-scene="3"] .m2 { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .dapp *, .dapp *::before, .dapp *::after { transition: none !important; animation: none !important; } }
