/*
 * 福氣科技公司官網（www.hokiya.com）
 * 品牌語彙取自首頁主視覺：緋紅＋深藍＋白、斜切三角形、紅色短線引導文字。
 * 圓角只給按鈕與圖示圓；版塊一律直角，斜角留給品牌色塊。
 */
:root {
  --crimson: #B0122F;
  --crimson-deep: #8E0D25;
  --rose: #E8455F;
  --navy: #232A3B;
  --navy-deep: #191E2B;
  --blush: #FCECEF;
  --mist: #F3F4F7;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --ink: #232A3B;
  --ink-soft: #4A5163;
  --muted: #7D8396;
  --line: #E3E5EB;
  --accent-text: #B0122F;
  --on-dark: #FFFFFF;
  --on-dark-soft: rgba(255, 255, 255, .72);
  --maxw: 1160px;
  --gutter: 32px;
  --font: "Outfit", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141824; --surface: #1C2130; --mist: #1A1F2C; --blush: #2E1C25;
    --ink: #EEF0F5; --ink-soft: #B5BACA; --muted: #868CA0; --line: #2C3242;
    --accent-text: #F0657B; --navy-deep: #0E111A;
  }
}
:root[data-theme="dark"] {
  --bg: #141824; --surface: #1C2130; --mist: #1A1F2C; --blush: #2E1C25;
  --ink: #EEF0F5; --ink-soft: #B5BACA; --muted: #868CA0; --line: #2C3242;
  --accent-text: #F0657B; --navy-deep: #0E111A;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 24px; height: 24px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 紅色短線：主視覺標語前的那一條，用來帶出段落標題 */
.kicker { display: flex; align-items: center; gap: 14px; color: var(--accent-text); font-weight: 700; font-size: 16px; margin-bottom: 18px; }
.kicker::before { content: ""; width: 44px; height: 4px; background: var(--crimson); border-radius: 2px; flex: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 40px; height: 42px; object-fit: contain; background: #fff; border-radius: 6px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-zh { font-weight: 800; font-size: 19px; letter-spacing: 2px; }
.brand-en { font-size: 10.5px; letter-spacing: 3.2px; color: var(--accent-text); font-weight: 500; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { position: relative; text-decoration: none; font-size: 16px; font-weight: 500; color: var(--ink-soft); padding: 10px 12px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--crimson); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; border-radius: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-deep); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-white { background: #fff; color: var(--crimson); }
.btn-white:hover { background: var(--blush); color: var(--crimson-deep); }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover { background: #05a849; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- section scaffolding ---------- */
.section { padding: 96px 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: 1px; }
.section-head p { margin-top: 14px; color: var(--ink-soft); }

/* 圖示圓：主視覺下方四個服務圖示的樣式 */
.ico-circle { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--accent-text); flex: none; }
.ico-circle .ico { width: 30px; height: 30px; }

/* ---------- home hero ---------- */
.home-hero { padding: 28px 0 0; }
.hero-figure { margin: 0; overflow: hidden; background: #fff; }
.hero-figure img { width: 100%; height: auto; aspect-ratio: 1672 / 941; }
.home-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: end; padding: 56px 0 40px; }
.home-intro h1 { font-size: clamp(32px, 4.6vw, 58px); font-weight: 900; letter-spacing: 2px; line-height: 1.22; }
.home-intro h1 span { display: block; }
.home-intro .lead { color: var(--ink-soft); margin-bottom: 28px; }


/* ---------- 首頁「日照的一天」等角場景 ---------- */
/* 10 個時段各 3 秒（30 秒一輪）；每段視窗 = 10%，各元素以負 delay 錯開到自己的時段（改段數要一起改下方關鍵影格的百分比） */
.day-scene { --day-cycle: 30s; --step-length: 3s; --step-count: 10; --tilt-x: 0deg; --tilt-y: 0deg; margin: 0 0 96px; }
.day-viewport { position: relative; overflow-x: clip; overflow-y: visible; perspective: 1400px; }   /* 只裁左右，上方的雲朵與泡泡可以超出 */
.day-stage { position: relative; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: transform .8s var(--ease-out, ease); }
.day-svg { display: block; width: 100%; height: auto; }
.day-bubble {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px;
  background: #fff; color: #232A3B; border-radius: 999px; font-size: clamp(11px, 1.3vw, 15px); font-weight: 800; white-space: nowrap;
  box-shadow: 0 14px 30px -12px rgba(35, 42, 59, .45); transform: translate(-50%, -100%); opacity: 0; pointer-events: none;
}
.day-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: #fff; transform: rotate(45deg); }
.day-bubble-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--crimson); color: #fff; }
.day-bubble-ico .ico { width: 16px; height: 16px; }

.day-timeline { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); border-top: 2px solid var(--line); }
.day-step { position: relative; padding: 16px 10px 0 0; }
.day-step::before { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--crimson); }
.day-step time { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.day-step b { display: block; font-size: 17px; margin: 2px 0 2px; word-break: keep-all; }

/* 資料流：虛線、資料點、雲端紀錄 */
.day-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.day-flow-line { stroke: var(--crimson); stroke-width: 2; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; opacity: 0; }
.day-packet { position: absolute; z-index: 2; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 3px; background: var(--crimson); box-shadow: 0 0 0 4px rgba(176, 18, 47, .18); opacity: 0; pointer-events: none; }
.day-cloud { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; width: 150px; color: var(--ink); font-size: 13px; text-align: center; pointer-events: none; }
.day-cloud-icon { width: 64px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: #fff; color: var(--crimson); box-shadow: 0 12px 28px -12px rgba(35, 42, 59, .45); }
.day-cloud-icon .ico { width: 30px; height: 30px; }
.day-records { position: relative; list-style: none; margin: 4px 0 0; padding: 0; width: 100%; height: 28px; }
.day-records li { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px; background: #fff; border-radius: 999px; font-weight: 700; font-size: 12.5px; color: #1E7A57; box-shadow: 0 8px 18px -10px rgba(35, 42, 59, .4); opacity: 0; white-space: nowrap; }
.day-records li .ico { width: 14px; height: 14px; }

/* 照顧人員：可點、送愛心 */
.day-staff { cursor: pointer; }
.day-staff:hover { filter: drop-shadow(0 0 6px rgba(232, 69, 95, .65)); }
.cheer-heart { position: absolute; z-index: 4; width: 26px; height: 26px; margin: -13px 0 0 -13px; color: var(--rose); pointer-events: none; animation: cheer-float 1.4s var(--ease-out, ease) forwards; }
.cheer-heart svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
@keyframes cheer-float {
  0% { opacity: 0; transform: translate(0, 6px) scale(.5); }
  15% { opacity: 1; transform: translate(calc(var(--drift) * .3), -10px) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--drift), -80px) scale(.9); }
}
.cheer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 28px; padding: 18px 22px; background: var(--blush); border-left: 4px solid var(--crimson); }
.cheer-text { color: var(--ink); font-weight: 700; }
.cheer-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cheer-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--crimson); color: #fff; font: inherit; font-weight: 800; cursor: pointer; transition: transform .2s var(--ease-out, ease), background .2s; }
.cheer-btn:hover { background: var(--crimson-deep); }
.cheer-btn:active { transform: scale(.94); }
.cheer-btn .ico { width: 18px; height: 18px; fill: currentColor; }
.cheer-count { color: var(--ink-soft); }
.cheer-count b { color: var(--accent-text); font-size: 20px; }

/* ===== 動態（只在 html.motion）===== */
.motion .day-van { animation: day-van var(--day-cycle) ease-in-out infinite; }
.motion .day-bubble,
.motion .day-step b,
.motion .day-step::before,
.motion .day-room-glow,
.motion .day-flow-line,
.motion .day-packet,
.motion .day-records li { animation-duration: var(--day-cycle); animation-iteration-count: infinite; animation-delay: calc((var(--step) - var(--step-count)) * var(--step-length)); }
.motion .day-bubble { animation-name: day-bubble; animation-timing-function: var(--ease-out, ease); }
.motion .day-step b { animation-name: day-step-title; animation-timing-function: linear; }
.motion .day-step::before { animation-name: day-step-bar; animation-timing-function: linear; }
.motion .day-room-glow { animation-name: day-glow; animation-timing-function: ease-in-out; }
.motion .day-flow-line { animation-name: day-flow-line; animation-timing-function: linear; }
.motion .day-packet { animation-name: day-packet; animation-timing-function: ease-in-out; }
.motion .day-records li { animation-name: day-record; animation-timing-function: ease-out; }
.motion .day-cloud-icon { animation: day-cloud-pulse var(--step-length) ease-out infinite; animation-delay: calc(var(--step-length) * .75); }
.day-scene.is-paused * { animation-play-state: paused !important; }

@keyframes day-van {
  0%, 5% { transform: translate(0, 0); }
  9.5%, 92.5% { transform: translate(var(--van-dx), var(--van-dy)); }
  97.5%, 100% { transform: translate(0, 0); }
}
@keyframes day-bubble {
  0% { opacity: 0; transform: translate(-50%, -70%) scale(.85); }
  2%, 8.6% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
  10%, 100% { opacity: 0; transform: translate(-50%, -110%) scale(.95); }
}
@keyframes day-step-title { 0%, 9.5% { color: var(--accent-text); } 10%, 100% { color: var(--ink); } }
@keyframes day-step-bar { 0% { width: 0; } 10% { width: 100%; } 10.01%, 100% { width: 0; } }
@keyframes day-glow { 0% { opacity: 0; } 2.2%, 8.6% { opacity: 1; } 10%, 100% { opacity: 0; } }
@keyframes day-flow-line { 0%, 2% { opacity: 0; stroke-dashoffset: 0; } 3%, 8% { opacity: .75; } 9.5%, 100% { opacity: 0; stroke-dashoffset: -60; } }
@keyframes day-packet {
  0%, 3% { opacity: 0; left: var(--fx); top: var(--fy); }
  4% { opacity: 1; left: var(--fx); top: var(--fy); }
  7.8% { opacity: 1; left: var(--tx); top: var(--ty); }
  8.6%, 100% { opacity: 0; left: var(--tx); top: var(--ty); }
}
@keyframes day-record { 0%, 7.5% { opacity: 0; transform: translateY(6px); } 8.3%, 16.8% { opacity: 1; transform: none; } 17.8%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes day-cloud-pulse { 0%, 70% { transform: scale(1); } 80% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* 房間亮起與房內人物的小動作 */
.day-room-glow { opacity: 0; }
.day-svg .arm, .day-svg .leg { transform-box: fill-box; transform-origin: 50% 8%; }
.motion .arm-wave { animation: arm-wave 2.4s ease-in-out infinite; }
.motion .arm-wave--late { animation-delay: -.6s; }
/* 背影：手往兩側斜上舉（V 字），才不會被後腦勺擋住 */
.motion .arm-back.arm-wave { animation-name: arm-wave-back; }
@keyframes arm-wave-back { 0%, 100% { transform: rotate(calc(var(--side) * -15deg)); } 50% { transform: rotate(calc(var(--side) * -125deg)); } }
.motion .arm-sway { animation: arm-sway 1.8s ease-in-out infinite; }
.day-svg .arm-sing { transform: rotate(calc(var(--side) * 35deg)); }   /* 雙手在胸前握麥克風，不轉動 */
/* 唱歌區：拿麥克風的人左右踏步、擺動並輕跳；聽歌的人只輕輕跟著點 */
.day-sway { transform-box: fill-box; transform-origin: 50% 100%; }
.motion .day-sway { animation: day-sway 1.8s ease-in-out infinite; }
.motion .day-sway--late { animation-delay: -.9s; }
.motion .day-sway--sing { animation: day-sing 1.6s ease-in-out infinite; }
@keyframes day-sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@keyframes day-sing {
  0%, 100% { transform: translate(-1.5px, 0) rotate(-3deg); }
  25% { transform: translate(0, -1.5px) rotate(0deg); }
  50% { transform: translate(1.5px, 0) rotate(3deg); }
  75% { transform: translate(0, -1.5px) rotate(0deg); }
}
.motion .arm-scrub { animation: arm-scrub 1s ease-in-out infinite; }
.motion .arm-measure { transform: rotate(calc(var(--side) * 30deg)); }
.motion .arm-give[style*="--side:1"] { animation: arm-give 2.4s ease-in-out infinite; }
.motion .arm-take[style*="--side:-1"] { animation: arm-take 2.4s ease-in-out infinite; }
.motion .arm-help { transform: rotate(calc(var(--side) * 50deg)); }
.motion .arm-hold[style*="--side:1"] { transform: rotate(-40deg); }
.motion .day-traveler { animation: day-traveler var(--day-cycle) linear infinite; }
.day-traveler-seat { opacity: 0; }
/* 如廁、沐浴：人物只在該時段走入走出 */
.day-toilet-curtain { transform-box: fill-box; transform-origin: 0% 50%; transform: scaleX(0); }
.motion .day-toilet-pair { animation: day-toilet-pair var(--day-cycle) linear infinite; }
.motion .day-diner { animation: day-diner var(--day-cycle) linear infinite; }
/* 走來走去：推助行器散步、跳舞；會走路的人腳步交替 */
.motion .day-stroll { animation: day-stroll 16s ease-in-out infinite; }
.motion .day-stroll .leg, .motion .day-toilet-pair .leg, .motion .day-escort .leg { animation: leg-step .55s ease-in-out infinite alternate; }
.day-dance { transform-box: fill-box; transform-origin: 50% 100%; }
.motion .day-dance { animation: day-dance 1.2s ease-in-out infinite; }
.motion .day-dance--late { animation-delay: -.6s; }
@keyframes day-stroll { 0%, 6% { transform: translate(0, 0); } 46%, 54% { transform: translate(var(--stroll-dx), var(--stroll-dy)); } 94%, 100% { transform: translate(0, 0); } }
@keyframes day-dance { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
.motion .day-toilet-curtain { animation: day-toilet-curtain var(--day-cycle) ease-in-out infinite; }
.motion .day-escort { animation: day-escort var(--day-cycle) linear infinite; }
.day-escort { opacity: 0; }
.motion .day-dancer-away { animation: day-dancer-away var(--day-cycle) linear infinite; }
.motion .day-bath-elder { animation: day-bath-elder var(--day-cycle) ease-out infinite; }
.motion .day-steam, .motion .day-bath-bubbles { animation: day-bath-on var(--day-cycle) linear infinite; }
.motion .day-bath-bubbles circle { animation: bubble-rise 1.6s ease-out infinite; animation-delay: calc(var(--k) * -.27s); transform-box: fill-box; transform-origin: center; }
@keyframes bubble-rise { 0% { opacity: 0; transform: translateY(0) scale(.6); } 25% { opacity: .95; } 100% { opacity: 0; transform: translateY(-28px) scale(1.1); } }
.motion .day-traveler-seat { animation: day-traveler-seat var(--day-cycle) linear infinite; }
.motion .day-traveler .leg { animation: leg-step .45s ease-in-out infinite alternate; }
.motion .arm-serve { transform: rotate(calc(var(--side) * 75deg)); }
.motion .arm-eat[style*="--side:1"] { animation: arm-eat 1.4s ease-in-out infinite; }
.motion .arm-tap[style*="--side:1"] { animation: arm-tap 1s ease-in-out infinite; }
.motion .arm-walk { animation: arm-walk .5s ease-in-out infinite alternate; }
.motion .day-staff { animation: staff-bob 2.6s ease-in-out infinite; }
.day-staff.is-cheered { animation: staff-cheer .5s var(--ease-out, ease) !important; }
@keyframes arm-wave { 0%, 100% { transform: rotate(calc(var(--side) * 15deg)); } 50% { transform: rotate(calc(var(--side) * 165deg)); } }
@keyframes arm-sway { 0%, 100% { transform: rotate(calc(var(--side) * 10deg)); } 50% { transform: rotate(calc(var(--side) * 55deg)); } }
@keyframes arm-scrub { 0%, 100% { transform: rotate(calc(var(--side) * 35deg)); } 50% { transform: rotate(calc(var(--side) * 70deg)); } }
@keyframes arm-give { 0%, 100% { transform: rotate(40deg); } 45%, 60% { transform: rotate(85deg); } }
@keyframes arm-take { 0%, 100% { transform: rotate(-20deg); } 50%, 65% { transform: rotate(-80deg); } }
@keyframes arm-eat { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(140deg); } }
@keyframes arm-tap { 0%, 100% { transform: rotate(60deg); } 50% { transform: rotate(85deg); } }
@keyframes arm-walk { from { transform: rotate(calc(var(--side) * 18deg)); } to { transform: rotate(calc(var(--side) * -18deg)); } }
@keyframes leg-step { from { transform: rotate(calc(var(--leg) * 14deg)); } to { transform: rotate(calc(var(--leg) * -14deg)); } }
@keyframes staff-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes staff-cheer { 0% { transform: translateY(0); } 40% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
.day-pulse { transform-box: fill-box; transform-origin: center; }
.motion .day-pulse { animation: day-pulse 1.2s ease-in-out infinite; }
@keyframes day-pulse { 0%, 100% { transform: scale(.9); } 15% { transform: scale(1.18); } 30% { transform: scale(.95); } 45% { transform: scale(1.1); } }
.motion .day-steam path { animation: day-steam 2.4s ease-out infinite; animation-delay: calc(var(--k) * -.8s); }
@keyframes day-steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-16px); } }
.motion .day-notes text, .motion .day-zzz text { animation: day-note 2.8s ease-out infinite; }
.motion .day-notes text:nth-child(2), .motion .day-zzz text:nth-child(2) { animation-delay: -.9s; }
.motion .day-notes text:nth-child(3) { animation-delay: -1.8s; }
@keyframes day-note { 0% { opacity: 0; transform: translateY(8px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
/* 簽到成功的綠勾：只在「抵達中心」那一段（第 2 段）亮起 */
.day-checkin { opacity: 0; }
.motion .day-checkin { animation: day-glow var(--day-cycle) ease-in-out infinite; animation-delay: calc((1 - var(--step-count)) * var(--step-length)); }

/* ---------- 首頁 3D 工作情境 ---------- */
.scene { --scene-scale: 1; --tilt-x: 0deg; --tilt-y: 0deg; position: relative; z-index: 0; overflow-x: clip; height: calc(600px * var(--scene-scale)); margin: -24px 0 56px; }
.home-intro { position: relative; z-index: 1; }
.scene-stage { position: absolute; left: 50%; top: calc(40px * var(--scene-scale)); width: 1000px; height: 560px; transform: translateX(-50%) scale(var(--scene-scale)); transform-origin: top center; perspective: 1600px; perspective-origin: 50% 30%; }
.scene-world {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(calc(14deg + var(--tilt-x))) rotateY(calc(-14deg + var(--tilt-y)));
  transition: transform .8s var(--ease-out, ease);
}
.scene-world > * { position: absolute; transform-style: preserve-3d; }
.sc-floor { left: 140px; top: 470px; width: 720px; height: 120px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(35, 42, 59, .22), transparent 70%); transform: translateZ(-60px) rotateX(80deg); }
.sc-tri { width: 0; height: 0; }
.sc-tri--crimson { left: 520px; top: -10px; border-left: 420px solid transparent; border-bottom: 420px solid var(--crimson); transform: translateZ(-160px); opacity: .95; }
.sc-tri--rose { left: 690px; top: 260px; border-left: 260px solid transparent; border-bottom: 260px solid var(--rose); transform: translateZ(-120px); opacity: .85; }
.sc-tri--navy { left: 120px; top: 300px; border-right: 200px solid transparent; border-bottom: 200px solid var(--navy); transform: translateZ(-200px); opacity: .9; }

/* 浮動：各元素以不同起點上下漂浮（只在 motion 時） */
.sc-dash { --z: 0px; }
.sc-phone--family { --z: 110px; }
.sc-phone--punch { --z: 90px; }
.sc-chip { --z: 170px; }
.sc-float { transform: translateZ(var(--z)); }
@keyframes sc-float { 0%, 100% { transform: translateZ(var(--z)) translateY(0); } 50% { transform: translateZ(var(--z)) translateY(-10px); } }
@keyframes sc-sway { 0%, 100% { rotate: y -3deg; } 50% { rotate: y 3deg; } }
.motion .sc-float { animation: sc-float 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.motion .scene-world { animation: sc-sway 14s ease-in-out infinite; }

.sc-dash { left: 175px; top: 55px; width: 620px; height: 400px; background: #F1F4F8; border: 1px solid #E3E5EB; box-shadow: 0 40px 80px -30px rgba(35, 42, 59, .45); color: #232A3B; overflow: hidden; }
.sc-dash-top { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: #fff; border-bottom: 1px solid #E3E5EB; font-size: 13px; }
.sc-logo { width: 22px; height: 22px; display: grid; place-items: center; background: var(--crimson); color: #fff; font-size: 12px; font-weight: 800; border-radius: 4px; }
.sc-top-icons { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.sc-top-icons i { width: 14px; height: 14px; border-radius: 4px; background: #DDE1E8; }
.sc-top-icons .sc-avatar-dot { width: 22px; height: 22px; border-radius: 50%; background: #C9CDD8; }
.sc-dash-main { display: grid; grid-template-columns: 112px 1fr; height: calc(100% - 40px); }
.sc-side { list-style: none; margin: 0; padding: 12px 10px; display: grid; align-content: start; gap: 6px; border-right: 1px solid #E3E5EB; }
.sc-side li { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 8px; border-radius: 6px; }
.sc-side li i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid #A9AFBD; flex: none; }
.sc-side li b { height: 7px; width: var(--w); border-radius: 4px; background: #D5D9E1; }
.sc-side li.is-active { background: #fff; box-shadow: 0 1px 3px rgba(35, 42, 59, .08); }
.sc-side li.is-active i { border-color: var(--crimson); background: var(--blush); }
.sc-side li.is-active b { background: var(--rose); opacity: .7; }
.sc-content { padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.sc-title-bar { display: flex; align-items: center; gap: 8px; }
.sc-title-bar b { width: 150px; height: 13px; border-radius: 7px; background: #232A3B; opacity: .85; }
.sc-title-bar span { width: 54px; height: 16px; border-radius: 999px; background: #EDE9FE; }
.sc-title-bar span + span { width: 40px; background: #FEE2E2; }
.sc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sc-stat { height: 62px; padding: 9px 10px; border-radius: 10px; display: grid; align-content: start; gap: 6px; box-shadow: 0 8px 16px -10px rgba(35, 42, 59, .5); }
.sc-stat i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.sc-stat b { height: 6px; width: var(--w); border-radius: 3px; background: rgba(255, 255, 255, .85); }
.sc-stat b:first-of-type { height: 9px; }
.sc-stat--grass { background: linear-gradient(135deg, #84CC16, #14B8A6); }
.sc-stat--flame { background: linear-gradient(135deg, #FB7185, #EF4444 60%, #DC2626); }
.sc-stat--aqua { background: linear-gradient(135deg, #22D3EE, #3B82F6); }
.sc-stat--dusk { background: linear-gradient(135deg, #A78BFA, #7C3AED 60%, #6366F1); }
.sc-card { background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(35, 42, 59, .06); }
.sc-card-cap { display: block; width: 70px; height: 7px; border-radius: 4px; background: #D5D9E1; margin-bottom: 8px; }
.sc-charts { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.sc-bars { display: flex; align-items: flex-end; gap: 7px; height: 96px; padding-bottom: 2px; border-bottom: 2px solid #E3E5EB; }
.sc-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #6366F1, #3B82F6); }
.sc-bars i:nth-child(3n) { background: linear-gradient(180deg, #FB7185, #EF4444); }
.sc-bars i:last-child { background: linear-gradient(180deg, #84CC16, #14B8A6); }
.sc-pie { display: flex; align-items: center; gap: 10px; height: 98px; }
.sc-pie svg { width: 92px; height: 92px; transform: rotate(-90deg); flex: none; }
.sc-pie circle { fill: none; stroke-width: 7; }
.sc-pie-bg { stroke: #EEF0F4; }
.sc-pie-seg { stroke: var(--c); stroke-dasharray: var(--len) 100; stroke-dashoffset: var(--off); }
.sc-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.sc-legend li { display: flex; align-items: center; gap: 6px; }
.sc-legend li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.sc-legend b { height: 6px; width: var(--w); border-radius: 3px; background: #D5D9E1; }
.sc-card--progress { display: grid; gap: 8px; }
.sc-progress { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 10px; }
.sc-progress i { height: 7px; border-radius: 4px; background: #D5D9E1; }
.sc-progress b { position: relative; height: 8px; border-radius: 4px; background: #EEF0F4; overflow: hidden; }
.sc-progress b::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 4px; background: var(--c); }
/* 捲到這一區時：色塊依序浮現、長條長高、圓餅一段段畫出、進度條往右填滿 */
.motion .sc-stat { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease-out, ease), transform .6s var(--ease-out, ease); }
.motion .is-in .sc-stat { opacity: 1; transform: none; }
.motion .is-in .sc-stat:nth-child(2) { transition-delay: .1s; }
.motion .is-in .sc-stat:nth-child(3) { transition-delay: .2s; }
.motion .is-in .sc-stat:nth-child(4) { transition-delay: .3s; }
.motion .sc-bars i { transform: scaleY(0); transform-origin: bottom; transition: transform .9s var(--ease-out, ease); }
.motion .is-in .sc-bars i { transform: none; }
.motion .is-in .sc-bars i:nth-child(n) { transition-delay: calc(.35s + var(--i, 0) * 1s); }
.motion .sc-pie-seg { stroke-dasharray: 0 100; transition: stroke-dasharray 1.2s var(--ease-out, ease) .5s; }
.motion .is-in .sc-pie-seg { stroke-dasharray: var(--len) 100; }
.motion .sc-progress b::after { width: 0; transition: width 1.2s var(--ease-out, ease) .6s; }
.motion .is-in .sc-progress b::after { width: var(--p); }

.sc-phone { width: 200px; height: 360px; padding: 34px 12px 14px; background: #fff; border: 8px solid #1C1F27; border-radius: 30px; box-shadow: 0 40px 70px -30px rgba(35, 42, 59, .55); color: #232A3B; font-size: 12.5px; }
.sc-notch { position: absolute; top: 8px; left: 50%; width: 64px; height: 14px; margin-left: -32px; background: #1C1F27; border-radius: 10px; }
.sc-phone--family { left: 30px; top: 170px; }
.sc-phone--punch { left: 800px; top: 200px; height: 300px; }
.sc-line-head { margin: -6px -4px 8px; padding: 8px 10px; background: #06C755; color: #fff; font-weight: 700; border-radius: 10px; }
.sc-day { font-size: 11.5px; font-weight: 800; margin-bottom: 6px; }
.sc-log { display: flex; justify-content: space-between; padding: 5px 8px; margin-bottom: 5px; background: #F3F4F7; border-radius: 8px; font-size: 11.5px; }
.sc-log span { color: #7D8396; }
.sc-msg { background: #F3F4F7; padding: 7px 9px; border-radius: 12px 12px 12px 4px; margin-bottom: 6px; line-height: 1.5; font-size: 11.5px; }
.sc-msg--note { background: #DDF6E6; }
.sc-photo { padding: 5px; }
.sc-photo span { display: block; height: 46px; background: linear-gradient(135deg, var(--blush), #F9D3DB 60%, #F3B5C2); border-radius: 8px; }
.sc-app-head { margin: -6px -4px 10px; padding: 9px 10px; background: var(--navy); color: #fff; font-weight: 800; border-radius: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.sc-app-head small { font-weight: 500; opacity: .8; }
.sc-shift { padding: 8px 9px; border: 1px solid #E3E5EB; border-radius: 10px; margin-bottom: 8px; display: grid; gap: 2px; }
.sc-shift b { font-size: 13px; }
.sc-shift span { font-size: 11px; color: #7D8396; }
.sc-shift.is-now { border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(176, 18, 47, .1); }
.sc-punch-ok { display: flex; align-items: center; justify-content: center; gap: 6px; margin: -2px 0 10px; padding: 9px 10px; border-radius: 10px; background: #1E9268; color: #fff; font-weight: 800; font-size: 12.5px; }
.sc-punch-ok .ico { width: 15px; height: 15px; }
.motion .sc-punch-ok { animation: sc-punch 3.2s ease-in-out infinite; }
@keyframes sc-punch { 0%, 100% { box-shadow: 0 0 0 0 rgba(30, 146, 104, .4); } 50% { box-shadow: 0 0 0 7px rgba(30, 146, 104, 0); } }

.sc-chip { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; background: #fff; border-radius: 999px; box-shadow: 0 18px 36px -16px rgba(35, 42, 59, .45); color: #232A3B; font-size: 13px; line-height: 1.3; white-space: nowrap; }
.sc-chip b { display: block; font-size: 14px; }
.sc-chip small { color: #7D8396; }
.sc-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--crimson); color: #fff; }
.sc-avatar--navy { background: var(--navy); }
.sc-avatar--rose { background: var(--rose); }
.sc-avatar .ico { width: 18px; height: 18px; }

/* ---------- 深藍服務帶 ---------- */
.band-navy { position: relative; background: var(--navy); color: var(--on-dark); overflow: hidden; }
.band-navy::before {
  content: ""; position: absolute; top: 0; right: 0; width: min(38vw, 460px); height: 260px;
  background: var(--crimson); clip-path: polygon(30% 0, 100% 0, 100% 100%);
}
.band-navy::after {
  content: ""; position: absolute; top: 0; right: 0; width: min(20vw, 240px); height: 380px;
  background: var(--rose); opacity: .85; clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.band-navy .wrap { position: relative; z-index: 1; }
.band-navy .section-head p { color: var(--on-dark-soft); }
.band-navy .kicker { color: #fff; }
.band-navy .kicker::before { background: var(--rose); }

.service-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.service-row a {
  display: grid; grid-template-columns: 64px minmax(200px, 1fr) 1.4fr 28px; gap: 28px; align-items: center;
  padding: 28px 8px; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .16);
  transition: background .2s;
}
.service-row a:hover { background: rgba(255, 255, 255, .05); }
.service-row .ico-circle { background: rgba(255, 255, 255, .08); color: #fff; }
.service-row a:hover .ico-circle { background: var(--crimson); }
.service-name { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.service-name-en { display: block; font-size: 14px; font-weight: 400; color: var(--on-dark-soft); letter-spacing: .5px; margin-top: 2px; }
.service-desc { color: var(--on-dark-soft); font-size: 16px; }
.service-row .go { color: var(--rose); transition: transform .2s; }
.service-row a:hover .go { transform: translateX(4px); }

/* ---------- 特點（無外框的圖示＋文字） ---------- */
.point-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 64px; }
.point { display: grid; grid-template-columns: 64px 1fr; gap: 22px; align-items: start; }
.point h3 { font-size: 21px; font-weight: 800; margin: 4px 0 8px; }
.point p { color: var(--ink-soft); }
.point .text-link { display: inline-block; margin-top: 10px; }

/* ---------- CTA：緋紅色塊＋右側三角 ---------- */
.cta { position: relative; background: var(--crimson); color: #fff; overflow: hidden; }
.cta::before { content: ""; position: absolute; right: 0; bottom: 0; width: 46%; height: 100%; background: var(--rose); clip-path: polygon(100% 0, 100% 100%, 0 100%); opacity: .9; }
.cta::after { content: ""; position: absolute; right: 0; bottom: 0; width: 16%; height: 58%; background: var(--navy); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.cta .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.cta h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 900; letter-spacing: 1px; }
.cta p { margin-top: 14px; color: rgba(255, 255, 255, .86); max-width: 34em; }

/* ---------- service page hero ---------- */
.svc-hero { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 560px; border-bottom: 1px solid var(--line); }
.svc-hero > * { min-width: 0; }
.svc-hero-copy { padding: 80px 56px 80px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); display: flex; flex-direction: column; justify-content: center; }
.svc-hero h1 { font-size: clamp(26px, 3vw, 40px); font-weight: 900; letter-spacing: 1.5px; word-break: keep-all; margin-bottom: 22px; }
.svc-hero h1 span { display: block; }
.svc-hero .lead { color: var(--ink-soft); margin-bottom: 30px; max-width: 32em; }
.svc-audience { margin-top: 28px; font-size: 15px; color: var(--muted); }
.svc-audience strong { color: var(--ink); font-weight: 700; margin-right: 6px; }

.svc-steps {
  position: relative; background: var(--crimson); color: #fff;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  padding: 80px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))) 80px 22%;
  display: flex; flex-direction: column; justify-content: center;
}
.svc-steps::after { content: ""; position: absolute; right: 0; bottom: 0; width: 34%; height: 40%; background: var(--navy); clip-path: polygon(100% 0, 100% 100%, 0 100%); opacity: .9; }
.svc-steps-title { font-weight: 700; color: rgba(255, 255, 255, .8); margin-bottom: 28px; position: relative; z-index: 1; }
.svc-step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; position: relative; z-index: 1; }
.svc-step + .svc-step { margin-top: 26px; }
.svc-step-num { font-size: 44px; font-weight: 800; line-height: 1; color: rgba(255, 255, 255, .45); }
.svc-step h3 { font-size: 21px; font-weight: 800; }
.svc-step p { color: rgba(255, 255, 255, .86); font-size: 16px; margin-top: 4px; word-break: keep-all; overflow-wrap: anywhere; }

/* 重點：左欄標題固定，右欄兩欄條列 */
.feature-layout { display: grid; grid-template-columns: 1fr 2.2fr; gap: 64px; align-items: start; }
.feature-layout .section-head { position: sticky; top: 116px; margin-bottom: 0; }
.feature-layout .section-head h2 { font-size: clamp(24px, 2.6vw, 32px); }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin: 0; padding: 0; list-style: none; }
.feature-item { padding: 26px 0; border-top: 1px solid var(--line); }
.feature-item h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.feature-item p { color: var(--ink-soft); font-size: 16px; }

.other-services { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.other-services a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.other-services a:hover { border-bottom-color: var(--crimson); }
.other-services .ico { color: var(--accent-text); }

/* 範例官網：瀏覽器外框＋縮小的即時預覽 */
.example-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.example h3 { font-size: 22px; font-weight: 800; margin: 22px 0 6px; }
.example p { color: var(--ink-soft); margin-bottom: 12px; }
.example-frame { display: block; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 48px -28px rgba(35, 42, 59, .45); text-decoration: none; transition: transform .5s var(--ease-out, ease), box-shadow .5s; }
.example-frame:hover { transform: translateY(-4px); box-shadow: 0 32px 56px -28px rgba(35, 42, 59, .55); }
.example-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #EEF0F4; border-bottom: 1px solid #E3E5EB; color: #7D8396; font-size: 12px; }
.example-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D4D7DF; }
.example-bar i:first-child { background: var(--rose); }
.example-bar span { margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.example-viewport { --scale: .45; display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.example-viewport iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform: scale(var(--scale)); transform-origin: 0 0; pointer-events: none; }

/* ---------- 內頁標題（資安、聯絡） ---------- */
.page-hero { position: relative; padding: 88px 0 72px; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; top: 0; right: 0; width: min(30vw, 360px); height: 100%; background: var(--crimson); clip-path: polygon(100% 0, 100% 100%, 0 0); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 900; letter-spacing: 1.5px; max-width: 15em; margin-bottom: 18px; }
.page-hero .lead { color: var(--ink-soft); max-width: 36em; }
.badge-list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.badge-list li { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.badge-list .ico { width: 20px; height: 20px; color: var(--accent-text); }

.backup-list { margin: 0; border-top: 2px solid var(--ink); }
.backup-row { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.backup-row dt { font-weight: 800; }
.backup-row dd { margin: 0; color: var(--ink-soft); }
.backup-note { margin-top: 24px; padding-left: 18px; border-left: 4px solid var(--crimson); color: var(--ink-soft); }

.faq-list { border-top: 2px solid var(--ink); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2.5px solid var(--crimson); border-bottom: 2.5px solid var(--crimson); transform: rotate(45deg); transition: transform .2s;
}
.faq[open] summary::after { transform: rotate(225deg); margin-top: -3px; }
.faq p { padding: 0 44px 24px 0; color: var(--ink-soft); }

.info-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 28px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 700; }
.page-footnote { margin-top: 40px; font-size: 14px; color: var(--muted); }

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact-layout h2 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.contact-layout p { color: var(--ink-soft); margin-bottom: 24px; }
.qr-frame { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--line); margin-bottom: 20px; }
.qr-frame img { width: 176px; height: 176px; }
.qr-hint { font-size: 15px; color: var(--muted); margin-top: 12px; }

.text-link { color: var(--accent-text); font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; }

/* ---------- 預約系統導覽表單 ---------- */
.demo-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.demo-form { display: grid; gap: 26px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 16px; padding: 0; }
.field .req { font-weight: 500; font-size: 13px; color: var(--accent-text); margin-left: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 0; padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 3px var(--blush); }
.field [aria-invalid="true"] { border-color: var(--crimson); }
.field-error { color: var(--accent-text); font-size: 14px; }
.form-alert { padding: 14px 18px; border-left: 4px solid var(--crimson); background: var(--blush); font-weight: 700; }
.system-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.system-option { position: relative; cursor: pointer; }
.system-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.system-option span {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--line);
  border-radius: 999px; font-weight: 500; font-size: 15px; background: var(--surface); transition: border-color .2s, background .2s, color .2s;
}
.system-option span .ico { width: 18px; height: 18px; color: var(--accent-text); }
.system-option input:checked + span { border-color: var(--crimson); background: var(--crimson); color: #fff; }
.system-option input:checked + span .ico { color: #fff; }
.system-option input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.demo-form .btn { justify-self: start; min-width: 200px; }
.demo-aside { padding: 32px; background: var(--mist); border-top: 4px solid var(--crimson); }
.demo-aside h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.demo-aside p { color: var(--ink-soft); margin-bottom: 20px; }
.form-title { font-size: 26px; font-weight: 800; margin-bottom: 24px; }
.demo-form-anchor { scroll-margin-top: 100px; }
.aside-subtitle { margin-top: 36px; }
.demo-done { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding: 32px; background: var(--mist); border-top: 4px solid var(--crimson); }
.demo-done h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.demo-done p { color: var(--ink-soft); margin-bottom: 14px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark); padding: 64px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { margin: 0 0 14px; font-size: 15px; color: var(--on-dark-soft); font-weight: 500; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: #fff; }
.foot-grid a:hover { color: var(--rose); }
.site-footer .brand-en { color: var(--rose); }
.foot-company { margin-top: 18px; color: var(--on-dark-soft); font-size: 15px; }
.foot-copy { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: var(--on-dark-soft); }

/* =========================================================
 * 動態：只在 html.motion（JS 確認未要求減少動態）時啟用，
 * 沒有 JS 或減少動態時內容直接完整顯示。
 * 載入：主視覺斜向揭幕 → 標題逐行浮現；捲動：三角色塊滑入、紅線畫出、清單依序淡入。
 * ========================================================= */
:root { --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-wipe: cubic-bezier(.7, 0, .2, 1); }
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }

@keyframes hero-wipe {
  from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: scale(1.06); }
  to { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); transform: scale(1); }
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes steps-in-desktop {
  from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
  to { clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
}
@keyframes steps-in-mobile {
  from { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }
  to { clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%); }
}

.motion .hero-figure img { animation: hero-wipe 1.3s var(--ease-wipe) both; transform-origin: right center; }
.motion .home-intro h1 span,
.motion .home-intro .lead,
.motion .home-intro .actions { animation: rise .9s var(--ease-out) both; }
.motion .home-intro h1 span:nth-child(1) { animation-delay: .75s; }
.motion .home-intro h1 span:nth-child(2) { animation-delay: .87s; }
.motion .home-intro .lead { animation-delay: 1s; }
.motion .home-intro .actions { animation-delay: 1.1s; }

.motion .svc-steps { animation: steps-in-desktop 1.1s var(--ease-wipe) .1s backwards; }
.motion .svc-hero-copy > * { animation: rise .9s var(--ease-out) backwards; }
.motion .svc-hero-copy > :nth-child(2) { animation-delay: .1s; }
.motion .svc-hero-copy > :nth-child(3) { animation-delay: .2s; }
.motion .svc-hero-copy > :nth-child(4) { animation-delay: .3s; }
.motion .svc-hero-copy > :nth-child(5) { animation-delay: .4s; }
.motion .svc-step { animation: rise .8s var(--ease-out) backwards; }
.motion .svc-step:nth-of-type(1) { animation-delay: .7s; }
.motion .svc-step:nth-of-type(2) { animation-delay: .85s; }
.motion .svc-step:nth-of-type(3) { animation-delay: 1s; }

.motion .page-hero .wrap > * { animation: rise .9s var(--ease-out) backwards; }
.motion .page-hero .wrap > :nth-child(2) { animation-delay: .1s; }
.motion .page-hero .wrap > :nth-child(3) { animation-delay: .2s; }
.motion .page-hero .wrap > :nth-child(4) { animation-delay: .3s; }

/* 捲動進場：依 --i 錯開 */
.motion [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* 紅色短線畫出 */
.motion .kicker::before { width: 0; transition: width .8s var(--ease-out) .2s; }
.motion .is-in .kicker::before, .motion .page-hero .kicker::before, .motion .svc-hero .kicker::before { width: 44px; }
.motion .page-hero .kicker::before, .motion .svc-hero .kicker::before { animation: draw-line .8s var(--ease-out) .35s backwards; }
@keyframes draw-line { from { width: 0; } }

/* 三角色塊從角落滑入 */
.motion [data-shapes]::before, .motion [data-shapes]::after { transition: transform 1.4s var(--ease-out); }
.motion .band-navy[data-shapes]::before { transform: translate(35%, -100%); }
.motion .band-navy[data-shapes]::after { transform: translate(100%, -30%); transition-delay: .15s; }
.motion .cta[data-shapes]::before { transform: translate(60%, 0); }
.motion .cta[data-shapes]::after { transform: translate(100%, 40%); transition-delay: .2s; }
.motion .page-hero[data-shapes]::after { transform: translate(100%, 0); transition-delay: .2s; }
.motion [data-shapes].is-in::before, .motion [data-shapes].is-in::after { transform: none; }

/* 滑過：紅線由左掃過條目上緣 */
.feature-item, .backup-row {
  background: linear-gradient(var(--crimson), var(--crimson)) left top / 0 2px no-repeat;
  transition: background-size .6s var(--ease-out);
}
.feature-item:hover, .backup-row:hover { background-size: 100% 2px; }
.point .ico-circle, .service-row .ico-circle { transition: transform .5s var(--ease-out), background .2s; }
.point:hover .ico-circle { transform: rotate(-8deg) scale(1.06); }
.btn { transition: background .2s, color .2s, border-color .2s, transform .3s var(--ease-out), box-shadow .3s; }
.btn-primary:hover, .btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(176, 18, 47, .55); }

/* 常見問題：平順展開（不支援的瀏覽器直接開合） */
.faq::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete; }
.faq[open]::details-content { block-size: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .home-intro, .cta .wrap, .contact-layout, .demo-layout { grid-template-columns: 1fr; gap: 32px; }
  .svc-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .svc-hero-copy { padding: 64px var(--gutter) 48px; }
  .svc-steps { clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%); padding: 80px var(--gutter) 64px; }
  .motion .svc-steps { animation-name: steps-in-mobile; }
  .feature-layout { grid-template-columns: 1fr; gap: 32px; }
  .feature-layout .section-head { position: static; }
  .day-timeline { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 20px; }
  .day-cloud { width: 120px; font-size: 11px; }
  .service-row a { grid-template-columns: 56px 1fr 24px; gap: 8px 20px; }
  .service-row .ico-circle { grid-row: span 2; width: 56px; height: 56px; }
  .service-desc { grid-column: 2; }
  .service-row .go { grid-column: 3; grid-row: 1 / span 2; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { left: 0; right: auto; width: 32px; bottom: -1px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .home-hero { padding-top: 0; }
  .home-hero .wrap { padding: 0; }
  .home-intro { padding: 36px var(--gutter) 40px; }
  .scene { margin: -8px 0 32px; }
  .day-scene { margin-bottom: 64px; }
  /* 首頁介紹區的 .wrap 在手機上沒有左右留白：時間軸、送愛心自己留邊距，不可用負 margin 撐出螢幕 */
  .day-timeline { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 0 var(--gutter) 6px; margin: 8px 0 0; }
  .cheer { margin: 24px var(--gutter) 0; }
  .day-cloud { width: 96px; font-size: 10px; }
  .day-cloud-icon { width: 44px; height: 30px; border-radius: 15px; }
  .day-cloud-icon .ico { width: 20px; height: 20px; }
  .day-records li { font-size: 10px; padding: 0 4px; }
  .day-step { flex: 0 0 132px; scroll-snap-align: start; }
  .point-grid, .feature-list, .example-grid { grid-template-columns: 1fr; }
  .backup-row { grid-template-columns: 1fr; gap: 4px; }
  .field-row { grid-template-columns: 1fr; }
  .demo-form .btn { justify-self: stretch; }
  .demo-aside, .demo-done { padding: 24px 20px; }
  .actions .btn { flex: 1 1 100%; }
  .band-navy::before { width: 55vw; height: 140px; }
  .band-navy::after { width: 28vw; height: 200px; }
  .page-hero::after { width: 22vw; }
  .page-hero h1 { padding-right: 18vw; }
  .cta::before { width: 70%; height: 46%; }
  .cta::after { width: 26%; height: 28%; }
  .brand-en { letter-spacing: 2px; }
}
