/* =========================================================
   unit-hero.css｜ui08、ui09 的單元開頭（和 ui01–07、ui11 的 uu-hero 統一）
   外觀沿用 ui-unit.css 的 .uu-hero／.uu-btn（變數只在 .uu-page 下生效，所以外層包 .uu-page.uh-scope）
   右側介面：.uh-ba 線框稿↔精稿 拖曳對照（ui08）、.uh-proto 自動播放的原型示範（ui09）
   ========================================================= */
.uu-page.uh-scope { background: transparent; overflow: visible; margin: 8px 0 36px; }
.uh-scope .uu-hero { margin-bottom: 0; }
.uh-scope .uu-hero h1 { font-family: var(--f-display); }
.uh-scope .uu-hero p.lead { color: #BFC6CE; margin: 0; font-size: 15px; line-height: 1.8; }
.uh-scope .uu-hero .cta a { text-decoration: none; }
.uh-art { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* 手機外框（共用） */
.uh-phone { position: relative; width: min(250px, 100%); aspect-ratio: 390 / 844; border-radius: 34px; padding: 8px; background: #0E0F11; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 30px 60px -20px rgba(0,0,0,.7), 0 0 80px -20px rgba(10,186,181,.45); }
.uh-phone .scr { position: relative; width: 100%; height: 100%; border-radius: 27px; overflow: hidden; background: #F3EEE4; }
.uh-phone .scr img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }

/* ---------- ui08：線框稿 ↔ 精稿 ---------- */
.uh-ba { --p: 50%; }
.uh-ba .wire { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.uh-ba .bar { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #3DEBD3; box-shadow: 0 0 12px rgba(61,235,211,.8); pointer-events: none; }
.uh-ba .bar i { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #0ABAB5; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.35); display: grid; place-items: center; }
.uh-ba .bar i::before { content: "‹ ›"; color: #fff; font: 800 13px/1 var(--f-mono); letter-spacing: -1px; }
.uh-ba .tag { position: absolute; top: 14px; font: 800 11px/1 var(--f-mono); letter-spacing: .08em; padding: 6px 9px; border-radius: 20px; pointer-events: none; transition: opacity .2s; }
.uh-ba .tag.l { left: 12px; background: #E3E3E3; color: #333; }
.uh-ba .tag.r { right: 12px; background: #17423A; color: #fff; }
.uh-ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.uh-ba input[type=range]:focus-visible + .bar i { outline: 3px solid #fff; outline-offset: 3px; }
.uh-five { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.uh-five li { font-size: 12px; font-weight: 700; color: #DDE2E7; padding: 5px 10px; border-radius: 20px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }
.uh-five li b { color: #7FE6E2; font-family: var(--f-mono); margin-right: 4px; }
.uh-cap { margin: 0 !important; font-size: 12px !important; color: #9AA3AC !important; text-align: center; }

/* ---------- ui09：自動播放的原型（點卡片 → 推進詳情頁 → 點返回） ---------- */
.uh-proto .scr .s1 { animation: uhS1 8s var(--ease) infinite; }
.uh-proto .scr .s2 { transform: translateX(100%); animation: uhS2 8s var(--ease) infinite; box-shadow: -12px 0 30px rgba(0,0,0,.25); }
.uh-proto .tap { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid #0ABAB5; background: rgba(10,186,181,.25); opacity: 0; pointer-events: none; z-index: 3; }
.uh-proto .tap.t1 { left: 24%; top: 61%; animation: uhTap1 8s infinite; }
.uh-proto .tap.t2 { left: 8%; top: 8.5%; animation: uhTap2 8s infinite; }
.uh-proto .hot { position: absolute; left: 4%; top: 49%; width: 42%; height: 24%; border: 2px dashed #3B82F6; border-radius: 10px; z-index: 2; animation: uhHot 8s infinite; }
@keyframes uhS1 { 0%, 22% { transform: none; filter: none; } 32%, 62% { transform: translateX(-30%); filter: brightness(.75); } 72%, 100% { transform: none; filter: none; } }
@keyframes uhS2 { 0%, 22% { transform: translateX(100%); } 32%, 62% { transform: translateX(0); } 72%, 100% { transform: translateX(100%); } }
@keyframes uhTap1 { 0%, 14% { opacity: 0; transform: scale(.4); } 17% { opacity: 1; transform: scale(1); } 22%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes uhTap2 { 0%, 54% { opacity: 0; transform: scale(.4); } 57% { opacity: 1; transform: scale(1); } 62%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes uhHot { 0%, 4% { opacity: 0; } 8%, 18% { opacity: 1; } 22%, 100% { opacity: 0; } }
.uh-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: min(330px, 100%); margin: 0; padding: 0; list-style: none; }
.uh-flow li { text-align: center; padding: 7px 4px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #BFC6CE; font-size: 11.5px; line-height: 1.35; }
.uh-flow li b { display: block; font-size: 13px; color: #fff; }
.uh-flow li.f1 { animation: uhF1 8s infinite; } .uh-flow li.f2 { animation: uhF2 8s infinite; } .uh-flow li.f3 { animation: uhF3 8s infinite; }
@keyframes uhF1 { 0%, 10% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 14%, 22% { background: rgba(10,186,181,.3); border-color: #3DEBD3; } 26%, 52% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 55%, 62% { background: rgba(10,186,181,.3); border-color: #3DEBD3; } 66%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } }
@keyframes uhF2 { 0%, 19% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 22%, 28% { background: rgba(99,80,196,.45); border-color: #B6A8FF; } 32%, 59% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 62%, 68% { background: rgba(99,80,196,.45); border-color: #B6A8FF; } 72%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } }
@keyframes uhF3 { 0%, 22% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 24%, 34% { background: rgba(238,74,133,.35); border-color: #FF9FC2; } 38%, 62% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 64%, 74% { background: rgba(238,74,133,.35); border-color: #FF9FC2; } 78%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } }
.uh-proto:hover .scr *, .uh-proto:hover .uh-flow li { animation-play-state: paused; }

@media (max-width: 991px) {
	.uh-scope .uu-hero { grid-template-columns: 1fr; }
	.uh-phone { width: min(230px, 70vw); }
}
@media (prefers-reduced-motion: reduce) {
	.uh-proto .scr *, .uh-flow li { animation: none !important; }
}

/* ---------- ui10：Figma Make 視窗（提示詞 → 生成中 → 出現畫面 → 發布網址），9 秒循環 ---------- */
.uh-make { width: min(400px, 100%); border-radius: 16px; overflow: hidden; background: #2C2E33; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 30px 60px -20px rgba(0,0,0,.7), 0 0 80px -20px rgba(99,80,196,.5); }
.uh-make .top { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1E1F22; border-bottom: 1px solid #3A3D44; font: 700 11px/1 var(--f-mono); color: #DDE2E7; }
.uh-make .top i { width: 9px; height: 9px; border-radius: 50%; background: #555; } .uh-make .top i:nth-child(1) { background: #FF5F57; } .uh-make .top i:nth-child(2) { background: #FEBC2E; } .uh-make .top i:nth-child(3) { background: #28C840; }
.uh-make .top b { margin-left: 6px; flex: 1; } .uh-make .top b em { font-style: normal; color: #B6A8FF; }
.uh-make .pub { padding: 5px 9px; border-radius: 6px; background: #0ABAB5; color: #fff; font-size: 10.5px; animation: uhPub 9s infinite; }
.uh-make .body { display: grid; grid-template-columns: 46% 54%; height: 300px; }
.uh-make .chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 10px; border-right: 1px solid #3A3D44; font-size: 11.5px; line-height: 1.55; }
.uh-make .msg { padding: 8px 10px; border-radius: 10px; opacity: 0; }
.uh-make .msg.u { align-self: flex-end; background: #6350C4; color: #fff; border-bottom-right-radius: 3px; animation: uhMsgU 9s infinite; }
.uh-make .msg.a { background: #3A3D44; color: #DDE2E7; border-bottom-left-radius: 3px; animation: uhMsgA 9s infinite; }
.uh-make .msg.a .dots::after { content: "生成中…"; color: #B6A8FF; animation: uhDots 9s infinite; }
.uh-make .msg.a .done { display: block; color: #7FE6E2; font-weight: 700; animation: uhDone 9s infinite; }
.uh-make .prev { position: relative; display: grid; place-items: center; background: #F5F5F5 radial-gradient(circle, #ddd 1px, transparent 1.2px) 0 0 / 14px 14px; overflow: hidden; }
.uh-make .prev .ph { position: relative; width: 58%; aspect-ratio: 540 / 1170; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.uh-make .prev .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; animation: uhGen 9s infinite; }
.uh-make .prev .ph .sk { position: absolute; inset: 0; background: linear-gradient(110deg, #ececec 30%, #f8f8f8 45%, #ececec 60%) 0 0 / 300% 100%; animation: uhSk 9s infinite; }
.uh-make .url { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap; font: 700 10.5px/1 var(--f-mono); color: #fff; background: #16191C; padding: 6px 10px; border-radius: 20px; opacity: 0; animation: uhUrl 9s infinite; }
.uh-make .url::before { content: "● "; color: #3DEBD3; }
@keyframes uhMsgU { 0%, 4% { opacity: 0; transform: translateY(6px); } 9%, 100% { opacity: 1; transform: none; } }
@keyframes uhMsgA { 0%, 16% { opacity: 0; transform: translateY(6px); } 21%, 100% { opacity: 1; transform: none; } }
@keyframes uhDots { 0%, 52% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes uhDone { 0%, 54% { opacity: 0; } 58%, 100% { opacity: 1; } }
@keyframes uhSk { 0%, 20% { opacity: 1; background-position: 100% 0; } 52% { opacity: 1; background-position: 0 0; } 56%, 100% { opacity: 0; } }
@keyframes uhGen { 0%, 52% { opacity: 0; transform: scale(.96); } 58%, 100% { opacity: 1; transform: none; } }
@keyframes uhPub { 0%, 68% { box-shadow: none; } 72% { box-shadow: 0 0 0 4px rgba(10,186,181,.45); } 78%, 100% { box-shadow: none; } }
@keyframes uhUrl { 0%, 72% { opacity: 0; transform: translate(-50%, 6px); } 78%, 100% { opacity: 1; transform: translate(-50%, 0); } }
.uh-steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: min(400px, 100%); margin: 0; padding: 0; list-style: none; }
.uh-steps4 li { text-align: center; padding: 7px 4px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #BFC6CE; font-size: 11.5px; line-height: 1.35; }
.uh-steps4 li b { display: block; font-size: 13px; color: #fff; }
.uh-steps4 li:nth-child(1) { animation: uhK1 9s infinite; } .uh-steps4 li:nth-child(2) { animation: uhK2 9s infinite; } .uh-steps4 li:nth-child(3) { animation: uhK3 9s infinite; } .uh-steps4 li:nth-child(4) { animation: uhK4 9s infinite; }
@keyframes uhK1 { 0%, 8% { background: rgba(10,186,181,.3); border-color: #3DEBD3; } 12%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } }
@keyframes uhK2 { 0%, 6% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 9%, 20% { background: rgba(99,80,196,.45); border-color: #B6A8FF; } 24%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } }
@keyframes uhK3 { 0%, 20% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 23%, 60% { background: rgba(238,74,133,.35); border-color: #FF9FC2; } 64%, 100% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } }
@keyframes uhK4 { 0%, 68% { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); } 72%, 100% { background: rgba(10,186,181,.3); border-color: #3DEBD3; } }
.uh-make:hover *, .uh-make:hover ~ .uh-steps4 li { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
	.uh-make *, .uh-steps4 li { animation: none !important; opacity: 1 !important; }
	.uh-make .prev .ph .sk, .uh-make .msg.a .dots::after { display: none; }
}
@media (max-width: 575px) { .uh-make .body { height: 260px; } .uh-make .chat { font-size: 10.5px; } }
