/* ═══ 17FIT Business 子頁共用基礎 — 直接複製到 css/main.css 最前面，不要改色值 ═══ */
:root{
  /* 品牌色（原站實測值） */
  --navy:#0b1220; --navy-2:#14235c; --indigo:#2b4bd8; --blue:#3b5bdb;
  --cyan:#38b0e3; --mint:#4fd1c5; --amber:#fdbb57; --coral:#fd6358;
  --warm:linear-gradient(90deg,#fdbb57 13.54%,#fd6358 100%);
  --cool:linear-gradient(135deg,#38b0e3,#3b5bdb);
  /* 暖漸層上的文字色。白字實測只有 1.40:1（漸層最亮端 #ffd479），
     即使整條壓到最深的 #fd6358 也只有 2.99:1，連大字 3:1 都不過。
     深棕在整條漸層上都有 6–10:1。品牌漸層不動，只換文字色。 */
  --warm-ink:#4d1a06;
  /* 亮色面 */
  --bg:#ffffff; --tint:#f2f7ff; --card:#ffffff; --line:#e6ecf5;
  --ink:#16202e; --text:#5c6672; --muted:#6b7688;
  --link:#1878a6;                 /* 白底 4.97:1；品牌青當文字只有 2.47:1，不可用 */
  --panel:linear-gradient(150deg,#eaf5ff,#e4ecff);
  --svg-paper:#e8f1ff; --svg-line:#b9d3f2; --svg-line2:#c3d9f5;
  --glass:rgba(255,255,255,.72); --glass-line:rgba(17,42,88,.12);
  --shadow-sm:0 2px 10px rgba(17,42,88,.06);
  --shadow:0 10px 34px rgba(17,42,88,.09);
  --shadow-lg:0 26px 70px rgba(9,26,62,.18);
  --ease:cubic-bezier(.22,.68,.32,1);
}
/* 深色 token 走三段式（theme-toggle.md）：
   (1) 系統偏好深色、且使用者沒手動選過亮色 → 跟隨系統
   (2) 使用者手動選了深色 → 任何系統設定都要聽他的
   兩段內容完全相同，缺一不可。 */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#080e1c; --tint:#0c1428; --card:#111c33; --line:#22304c;
    --ink:#eaf1fb; --text:#9fb0c6; --muted:#8494ab; --link:#52c4f0;
    --panel:linear-gradient(150deg,#16233f,#121b31);
    --svg-paper:#1b2a47; --svg-line:#3a5379; --svg-line2:#44608b;
    --glass:rgba(19,31,56,.72); --glass-line:rgba(255,255,255,.14);
    --shadow-sm:0 2px 10px rgba(0,0,0,.34);
    --shadow:0 10px 34px rgba(0,0,0,.46);
    --shadow-lg:0 26px 70px rgba(0,0,0,.58);
  }
}
:root[data-theme="dark"]{
  --bg:#080e1c; --tint:#0c1428; --card:#111c33; --line:#22304c;
  --ink:#eaf1fb; --text:#9fb0c6; --muted:#8494ab; --link:#52c4f0;
  --panel:linear-gradient(150deg,#16233f,#121b31);
  --svg-paper:#1b2a47; --svg-line:#3a5379; --svg-line2:#44608b;
  --glass:rgba(19,31,56,.72); --glass-line:rgba(255,255,255,.14);
  --shadow-sm:0 2px 10px rgba(0,0,0,.34);
  --shadow:0 10px 34px rgba(0,0,0,.46);
  --shadow-lg:0 26px 70px rgba(0,0,0,.58);
}
/* inline SVG 的紙面色：CSS 規則優先於 presentation attribute，深色模式自動跟著變 */
[fill="#e8f1ff"],[fill="#eaf1ff"],[fill="#e9f5ff"],[fill="#e8f3ff"]{fill:var(--svg-paper)}
[fill="#b9d3f2"]{fill:var(--svg-line)}
[fill="#c3d9f5"]{fill:var(--svg-line2)}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",system-ui,-apple-system,sans-serif;
  font-size:16.5px; line-height:1.85; -webkit-font-smoothing:antialiased;
}
img{max-width:100%; height:auto}
a{color:var(--link); text-decoration:none}
a:hover{text-decoration:underline}
:focus-visible{outline:2px solid var(--link); outline-offset:3px}
/* 用 --link 不用 --cyan：品牌青當外框在白底只有 2.47:1、tint 2.30:1，
   不過 WCAG 1.4.11／2.4.11 的 3:1。--link 亮色 4.91:1、深色 8.49:1。
   本頁 hero 內沒有任何可聚焦元素（實測 .hero a,.hero button = 0 個），
   唯一浮在不確定底色上的是 fixed 的主題切換鈕，那顆單獨用雙環（見 index.html 內嵌樣式）。 */

.wrap{max-width:1120px; margin-inline:auto; padding-inline:20px}
.sec{padding:clamp(64px,8vw,112px) 0}
.sec__title{margin:0; color:var(--ink); font-size:clamp(26px,3.4vw,42px); font-weight:800; line-height:1.3; text-align:center}
.sec__lead{margin:18px auto 0; max-width:640px; text-align:center; color:var(--text)}
.card{background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow)}

/* 捲動揭示：隱藏規則掛在 html.js 之下，沒有 JS 就完整顯示，絕不白頁 */
html.js .reveal{opacity:0; transform:translateY(18px)}
html.js .reveal.in{opacity:1; transform:none;
  transition:opacity .7s var(--ease) calc(var(--i,0)*55ms), transform .7s var(--ease) calc(var(--i,0)*55ms)}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important; animation-iteration-count:1!important; transition-duration:.001ms!important}
  html.js .reveal{opacity:1; transform:none}
}

/* ══════════════════════════════════════════════════════════════════
   以下為「員工」子頁專屬樣式
   ══════════════════════════════════════════════════════════════════ */

/* ── 頂部 fixed header 的預留空間（policies: desktop 64 / mobile 56，斷點 768） ── */
body{padding-top:64px}
@media (max-width:767.98px){body{padding-top:56px}}

.sprite{position:absolute; width:0; height:0; overflow:hidden}

/* SVG 線條色：CSS 屬性選擇器只能覆寫 fill，stroke 要用 class 綁 token，深色模式才會跟著變 */
.s-line{stroke:var(--svg-line)}
.s-line2{stroke:var(--svg-line2)}
/* SVG 元素套 CSS transform 時，用 fill-box 才能以自身邊界為原點。
   ⚠ 只給「沒有 transform 屬性」的元素用：fill-box 會把座標系移到邊界框原點，
   元素若同時帶 transform="rotate(a cx cy)" 屬性，cx/cy 會被當成邊界框座標解讀，
   圖形會被甩出圖示之外。本頁所有旋轉一律用 CSS transform + transform-origin，
   沒有任何元素帶 transform 屬性。 */
.payrow,.prow,.cell,.star,.spin-slow,.shackle,.form__check{transform-box:fill-box}

/* ── 主視覺 ───────────────────────────────────────────────────── */
.hero{
  position:relative; isolation:isolate; overflow:hidden;
  padding:clamp(64px,9vw,116px) 0 clamp(84px,11vw,140px);
  background:linear-gradient(165deg,#0b1220 0%,#14235c 40%,#1f3ba8 74%,#2547c4 100%);
  text-align:center;
}
.hero__aurora{position:absolute; inset:0; z-index:-2; pointer-events:none}
.blob{position:absolute; border-radius:50%; filter:blur(72px); opacity:.5; will-change:transform}
.blob--1{width:46vw; height:46vw; left:-10vw; top:-14vw; background:#2b4bd8; animation:drift 22s var(--ease) infinite alternate}
.blob--2{width:36vw; height:36vw; right:-8vw; top:2vw;   background:#38b0e3; animation:drift 27s var(--ease) infinite alternate-reverse}
.blob--3{width:30vw; height:30vw; left:34vw;  bottom:-12vw; background:#4fd1c5; opacity:.3; animation:drift 31s var(--ease) infinite alternate}
@keyframes drift{from{transform:translate3d(0,0,0) scale(1)} to{transform:translate3d(4vw,3vw,0) scale(1.16)}}

.hero__stars{position:absolute; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none}
.tw{animation:tw 3.8s ease-in-out infinite; animation-delay:var(--d,0s); transform-origin:center}
@keyframes tw{0%,100%{opacity:.22} 50%{opacity:1}}

.hero__orbit{
  position:absolute; right:5%; top:12%;
  width:clamp(150px,17vw,236px); height:clamp(150px,17vw,236px);
  z-index:-1; opacity:.9; pointer-events:none;
}
.orbit__spin{animation:spin 28s linear infinite; transform-origin:60px 60px}
.orbit__spin--rev{animation:spin 40s linear infinite reverse; transform-origin:60px 60px}
@keyframes spin{to{transform:rotate(360deg)}}

.hero__inner{position:relative; z-index:1}
.hero__mark{width:64px; height:64px; margin:0 auto 26px; display:block}
.hero__title{
  margin:0; color:#ffffff; font-weight:800; line-height:1.18;
  font-size:clamp(40px,6.4vw,74px); letter-spacing:.06em;
  text-shadow:0 6px 30px rgba(5,16,50,.42);
}
.hero__rule{
  width:76px; height:4px; margin:26px auto 0; border-radius:999px;
  background:linear-gradient(90deg,#fdbb57,#fd6358);
}
.hero__lead{
  margin:26px auto 0; max-width:760px;
  color:#dce9fc; font-size:clamp(16px,1.55vw,19.5px); line-height:1.9;
  /* 導言 45 個全形字。沒有 balance 時實測 1280px 會斷成 38／7，把「員工」
     這個本頁主詞拆到兩行；加上 balance 後量到 1280px 為 23／22、375px 為
     16／15／14（第二行剛好收在逗號），1024／768px 則整句收成一行。
     不支援的瀏覽器直接忽略，退回與其他子頁相同的行為，是純粹的加分項。 */
  text-wrap:balance;
}
/* 進場動畫掛在 html.js 之下：animation-fill-mode:both 的起點是 opacity 0，
   一旦動畫沒被啟動（無 JS／被節流的不可見框架）內容就會停在看不見的狀態。
   沒有 .js 就完全不套動畫，hero 常駐可見。 */
html.js .hero__mark {animation:rise .9s var(--ease) both}
html.js .hero__title{animation:rise .9s var(--ease) .08s both}
html.js .hero__rule {animation:rise .9s var(--ease) .16s both}
html.js .hero__lead {animation:rise .9s var(--ease) .24s both}
html.js .hero__board{animation:rise .9s var(--ease) .34s both}
@keyframes rise{from{opacity:0; transform:translateY(24px)} to{opacity:1; transform:none}}

/* 排班看板：純裝飾（aria-hidden），呼應「將全體行事曆整合在一起」 */
.hero__board{
  display:block; width:min(560px,86%); height:auto;
  margin:clamp(30px,4vw,44px) auto 0;
  filter:drop-shadow(0 18px 40px rgba(3,10,34,.45));
}
.shift{transform-origin:center; transform-box:fill-box}
html.js .shift{animation:shiftin .8s var(--ease) both; animation-delay:calc(.5s + var(--si,0)*70ms)}
@keyframes shiftin{from{opacity:0; transform:translateY(10px) scaleY(.4)} to{opacity:1; transform:none}}
.playhead{animation:sweep 9s linear infinite}
@keyframes sweep{0%{transform:translateX(0); opacity:0} 6%{opacity:1} 94%{opacity:1} 100%{transform:translateX(414px); opacity:0}}

/* 窄螢幕：軌道裝飾縮小並外推，避免蓋住標題 */
@media (max-width:767.98px){
  .hero__orbit{width:128px; height:128px; right:-26px; top:3%; opacity:.5}
}
/* 波浪銜接：填色跟著頁面底色，深色模式自動變 */
.hero__wave{position:absolute; left:0; right:0; bottom:-1px; display:block; width:100%; height:auto; z-index:1}
.hero__wave path{fill:var(--bg)}

/* ── 內容區塊：四個特點 + 原站產品圖 ───────────────────────────── */
.feat{background:var(--bg)}
.feat__grid{
  display:grid; gap:clamp(30px,4vw,56px);
  grid-template-columns:1fr;
  align-items:start;
}
@media (min-width:920px){
  .feat__grid{grid-template-columns:minmax(0,1fr) minmax(0,.9fr)}
}

.feat__list{display:grid; gap:18px; margin:0}

.item{
  position:relative; overflow:hidden;
  display:grid; grid-template-columns:auto minmax(0,1fr);
  gap:clamp(14px,2vw,22px); align-items:start;
  padding:clamp(20px,2.6vw,28px);
  transition:transform .38s var(--ease), box-shadow .38s var(--ease), border-color .38s var(--ease);
}
.item::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:4px;
  background:var(--accent,var(--cool));
  transform:scaleY(0); transform-origin:top;
  transition:transform .5s var(--ease);
}
.item:hover{transform:translateY(-5px); box-shadow:var(--shadow-lg); border-color:transparent}
.item:hover::before,.item:focus-within::before{transform:scaleY(1)}
.item--1{--accent:linear-gradient(180deg,#38b0e3,#3b5bdb)}
.item--2{--accent:linear-gradient(180deg,#4fd1c5,#38b0e3)}
.item--3{--accent:linear-gradient(180deg,#fdbb57,#fd6358)}
.item--4{--accent:linear-gradient(180deg,#3b5bdb,#2b4bd8)}

.item__art{width:clamp(68px,8.4vw,88px); height:clamp(68px,8.4vw,88px); flex:none; overflow:visible}
.item__title{margin:0 0 6px; color:var(--ink); font-size:19px; font-weight:700; line-height:1.5}
.item__text{margin:0; color:var(--text); font-size:16.5px; line-height:1.85}

@media (max-width:560px){
  .item{grid-template-columns:1fr; gap:14px}
  .item__art{width:68px; height:68px}
}

/* ── 產品圖（原站唯一內容圖，沿用不換；PNG 本身已含機身與透明背景，不再加外框） ── */
.shot{position:relative; margin:0; padding:clamp(8px,1.6vw,18px) 0}
@media (min-width:920px){.shot{position:sticky; top:104px}}
.shot__glow{
  position:absolute; inset:10% 2% 6%; z-index:0; border-radius:50%;
  background:radial-gradient(52% 52% at 50% 50%,rgba(56,176,227,.42),transparent 72%);
  filter:blur(46px);
}
.shot__stage{position:relative; z-index:1; animation:float 7.5s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)}}
.shot__img{display:block; width:100%; height:auto}
.shot__ring{
  position:absolute; z-index:2; right:-6px; top:-4px;
  width:88px; height:88px; pointer-events:none; opacity:.95;
}
.shot__ring .ring-spin{animation:spin 34s linear infinite; transform-origin:44px 44px}
.shot__dots{position:absolute; z-index:0; left:-14px; bottom:6px; width:96px; height:96px; opacity:.7; pointer-events:none}

/* ── 插圖內的動畫（只在捲入後觸發，無 JS／reduce-motion 時維持完整靜態畫面） ── */
.item__art .lift{transition:transform .4s var(--ease)}
.item:hover .item__art .lift{transform:translateY(-4px)}
.item:hover .item__art .spinner{animation:spin 5.5s linear infinite; transform-origin:60px 60px}

/* 描邊繪製。基準狀態（沒有 .in）不設 dasharray，所以無 JS 時直接是完成後的線條。 */
.item.in .draw{stroke-dasharray:var(--len,160); stroke-dashoffset:var(--len,160); animation:draw 1.6s var(--ease) .25s forwards}
@keyframes draw{to{stroke-dashoffset:0}}

.item.in .bob{animation:bob 4.6s ease-in-out infinite; animation-delay:var(--pd,0s)}
@keyframes bob{0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)}}

.spin-slow{transform-origin:center}
.item.in .spin-slow{animation:spin 6s linear infinite}

/* (1) 薪資單：每一列由左往右結算出來 */
.payrow{transform-origin:left center}
.item.in .payrow{animation:payin .8s var(--ease) both; animation-delay:calc(var(--ri,0)*140ms + .2s)}
@keyframes payin{from{transform:scaleX(.04)} to{transform:scaleX(1)}}

/* (2) 行事曆格：捲入後依序長出來，呼應「員工掌握自己的行事曆」 */
.cell{transform-origin:center}
.item.in .cell{animation:cellpop .5s var(--ease) both; animation-delay:calc(var(--ci,0)*55ms + .15s)}
@keyframes cellpop{from{opacity:0; transform:scale(.35)} to{opacity:1; transform:none}}
/* 「今天」那格持續呼吸，指出正在進行的班 */
.item.in .cell--now{animation:cellpop .5s var(--ease) both, beat 2.6s ease-in-out .8s infinite}

/* (3) 權限列：由上而下逐層授權；鎖扣最後扣上 */
.prow{transform-origin:left center}
.item.in .prow{animation:payin .7s var(--ease) both; animation-delay:calc(var(--ri,0)*170ms + .5s)}
.shackle{transform-origin:center bottom}
.item.in .shackle{animation:lockup .7s var(--ease) 1.15s both}
@keyframes lockup{from{transform:translateY(-3.4px) scaleY(1.35)} to{transform:none}}

/* (4) 星等：一顆一顆亮起來。基準狀態不設 opacity，沒有 JS 時五顆星就是完整亮著的。 */
.star{transform-origin:center}
.item.in .star{animation:starpop .55s var(--ease) both; animation-delay:calc(var(--si,0)*130ms + .3s)}
@keyframes starpop{from{opacity:0; transform:scale(.2) rotate(-40deg)} to{opacity:1; transform:none}}

@keyframes beat{0%,100%{opacity:1} 50%{opacity:.42}}

/* ── Zoho 名單表單區塊 ──────────────────────────────────────────── */
.formsec{background:var(--tint); padding-bottom:clamp(48px,6vw,72px)}
.form__box{
  max-width:880px; margin-inline:auto; overflow:hidden;
  padding:clamp(22px,3.2vw,42px);
}
.form__head{
  display:flex; align-items:center; justify-content:center;
  gap:14px; margin:0 0 clamp(20px,2.8vw,32px);
}
.form__icon{width:clamp(38px,4.6vw,52px); height:clamp(38px,4.6vw,52px); flex:none}
.form__check{transform-origin:center}
.form__box.in .form__check{animation:pop .6s var(--ease) .35s both}
@keyframes pop{from{transform:scale(.4); opacity:0} to{transform:scale(1); opacity:1}}
.form__title{
  margin:0; color:var(--ink); text-align:center; line-height:1.35;
  font-size:clamp(21px,2.5vw,29px); font-weight:800;
}

.form__slot{
  position:relative; border-radius:14px; overflow:hidden;
  border:1px solid var(--line); background:#ffffff; min-height:405px;
}
/* iframe 高度由 Zoho 經 postMessage 回報，只能改 height；
   這是全頁唯一動 height 的地方，屬內容驅動的尺寸同步，不是裝飾動畫。 */
.form__frame{
  display:block; width:100%; border:0; min-height:405px;
  transition:height .35s var(--ease);
}
.form__frame--nojs{height:1200px}

/* 骨架佔位：iframe 就緒後淡出 */
.form__ph{position:absolute; inset:0; padding:18px 0; transition:opacity .45s var(--ease)}
.form__slot.is-loaded .form__ph{opacity:0; visibility:hidden}
.form__phsvg{display:block; width:100%; height:100%}
.form__shimmer{animation:shimmer 1.9s var(--ease) infinite}
@keyframes shimmer{from{transform:translateX(0)} to{transform:translateX(880px)}}
.form__steps circle:nth-of-type(1){animation:beat 2.4s ease-in-out infinite}

@media (max-width:560px){
  .form__head{flex-direction:column; gap:10px}
  .form__box{padding:20px 14px}
}

/* ── 表單載入後：外框標題改為視覺隱藏 ──────────────────────────────
   Zoho iframe 內部有自己的「立即預約諮詢」標題，載入後畫面上會重複。
   外框 h2 保留在 DOM（語意階層、iframe 失敗時的脈絡、文案比對基準穩定），
   只做視覺隱藏——不是 display:none 也不是 visibility:hidden，
   螢幕閱讀器與 accessibility tree 仍讀得到。
   class 掛在 .form__box 上：h2 與 .form__slot 是兄弟，掛在 slot 上選不到它。 */
.form__box.is-loaded .form__head{margin:0}
.form__box.is-loaded .form__icon{display:none}   /* 純裝飾，aria-hidden，標題隱藏後不留孤兒圖示 */
.form__box.is-loaded .form__title{
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
}

/* 列印：捲動揭示尚未觸發的區塊在 print 版面裡不會「捲進視窗」，
   沒有這條就會印出空白頁。強制揭示，與無 JS 時的行為一致。 */
@media print{
  html.js .reveal{opacity:1!important; transform:none!important}
  html.js .hero__mark,html.js .hero__title,html.js .hero__rule,
  html.js .hero__lead,html.js .hero__board,html.js .shift{animation:none!important; opacity:1!important; transform:none!important}
  .hero{background:none; color:#000}
  .hero__aurora,.hero__stars,.hero__orbit,.hero__wave,.hero__board,
  .shot__glow,.shot__dots,.shot__ring{display:none}
  .hero__title{color:#16202e; text-shadow:none}
  .hero__lead{color:#3a4553}
  .themetoggle{display:none!important}
}
