/* ==========================================================================
   創思路｜全站色彩與動態系統（fx）
   概念：黃色是「光」，不是油漆。沒被看見＝暗；被看見＝亮。
   色彩：品牌黃 #FCCF00（主光）＋同色系琥珀（陰影側）＋補色靛藍（冷色補光／夜色）
   比例：米白 60%・深色 30%・黃 10%
   規則：各頁第一屏＝夜色舞台；表單所在的區塊＝唯一的大面積黃；深色區塊＝暖光＋冷光
   ========================================================================== */
:root {
  --fx-ink: #231815;
  --fx-night: #17110F;
  --fx-yellow: #FCCF00;
  --fx-yellow-hi: #FFE46B;
  --fx-amber: #F2A900;
  --fx-indigo: 84, 92, 214;      /* 黃的補色：冷色補光 */
  --fx-top: 75px;
  --fx-ease: cubic-bezier(.2, .8, .2, 1);
  --fx-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

/* ==================================================================== A. 夜色舞台（各頁第一屏） */
[data-stage="night"] { background: var(--fx-night) !important; isolation: isolate; }
[data-stage="night"] > div:nth-child(2) { z-index: 2; }
[data-stage="night"]::before {                               /* 冷色補光＋琥珀邊光＋顆粒 */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    var(--fx-grain),
    radial-gradient(40% 52% at 0% 0%, rgba(var(--fx-indigo), .26) 0%, rgba(var(--fx-indigo), 0) 72%),
    radial-gradient(50% 46% at 100% 100%, rgba(242, 169, 0, .12) 0%, rgba(242, 169, 0, 0) 70%);
}
/* 內頁原本放在視覺後面的白色光暈 → 改成黃色主光 */
[data-stage="night"]:not([data-lit]) > [data-fx="glow"] {
  background: radial-gradient(circle, rgba(252, 207, 0, .4) 0%, rgba(252, 207, 0, .13) 40%, rgba(252, 207, 0, 0) 66%) !important;
}

/* 手機：視覺排在文字下方，主光跟著移到視覺後面，文字才不會壓在一片黃霧上 */
@container page (max-width: 899px) { [data-stage="night"] > [data-fx="glow"] { top: 34% !important; opacity: .6; } }
/* 置中的第一屏（關於我們）：光在文字正後方，調暗一點，文字對比才夠 */
[data-stage="night"] > [data-fx="glow"][data-pos="center"] { opacity: .6; }

/* 舞台上的文字顏色：行內樣式已改成變數（預設值＝原本的顏色），夜色時換成亮色 */
[data-stage="night"]:not([data-lit]) {
  color: #FFFFFF;
  --fx-t1: #FFFFFF; --fx-t2: #D6CEC5; --fx-t3: #C2B9B0; --fx-cta: var(--fx-yellow); --fx-cta-t: var(--fx-ink);
}
/* 舞台裡的淺色卡片（白卡、手機畫面、黃色標籤…）：裡面的字維持原本的深色 */
[data-stage="night"] [data-c] {
  --fx-t1: #231815; --fx-t2: #3A300C; --fx-t3: #4B3F12; --fx-cta: #231815; --fx-cta-t: #FFFFFF; color: #231815;
}
[data-stage] [stroke="#231815"] { stroke: var(--fx-t1, #231815); }
[data-stage] [fill="#231815"] { fill: var(--fx-t1, #231815); }
[data-stage="night"] nav, [data-stage="night"] h1, [data-stage="night"] h1 span, [data-stage="night"] p, [data-stage="night"] a, [data-stage="night"] strong {
  transition: color .7s ease, background-color .7s ease, box-shadow .7s ease, border-color .7s ease;
}
[data-stage="night"]:not([data-lit]) h1 > span:not(:last-child) { color: #E4DCD3; }
/* 主按鈕：夜色裡發光 */
[data-stage="night"]:not([data-lit]) [data-fx="cta"] { box-shadow: 0 18px 44px -14px rgba(252, 207, 0, .6) !important; }
/* 白色大卡、裝置外框：加上受光的邊緣與光暈 */
[data-stage="night"]:not([data-lit]) [data-fx="bigcard"] {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 50px 90px -40px rgba(0, 0, 0, .9), 0 0 120px -30px rgba(252, 207, 0, .4) !important;
}
[data-stage="night"]:not([data-lit]) [data-fx="device"] {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .24), 0 60px 90px -34px rgba(0, 0, 0, .85), 0 0 90px -16px rgba(252, 207, 0, .42) !important;
}
/* 行銷專欄：分類按鈕 */
[data-stage="night"] [data-cat-btn] { background: transparent !important; color: #FFFFFF !important; border-color: rgba(255, 255, 255, .4) !important; }
[data-stage="night"] [data-cat-btn][aria-pressed="true"] { background: var(--fx-yellow) !important; color: var(--fx-ink) !important; border-color: var(--fx-yellow) !important; }
/* 成功案例：三個大數字用黃色（光） */
[data-stage="night"]:not([data-lit]) [role="listitem"] > span:first-child { color: var(--fx-yellow); }
/* 關於我們：T・S・L 三個字塊改成發光的黃 */
[data-stage="night"]:not([data-lit]) [data-fx="badge"] {
  background: var(--fx-yellow) !important; color: var(--fx-ink) !important; box-shadow: 0 0 60px -10px rgba(252, 207, 0, .6);
}

/* ---- 進場：每頁只做一次，內容依序升起 ---- */
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > * { animation: fx-rise .9s var(--fx-ease) backwards; animation-delay: calc(var(--i, 0) * 110ms + 60ms); }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > :nth-child(2) { --i: 1; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > :nth-child(3) { --i: 2; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > :nth-child(4) { --i: 3; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > :nth-child(5) { --i: 4; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > :nth-child(n+6) { --i: 5; }
/* 兩欄式的第一屏：左欄逐行升起，右邊的視覺晚一點到位 */
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) { animation: none; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) > * { animation: fx-rise .9s var(--fx-ease) backwards; animation-delay: calc(var(--i, 0) * 100ms + 50ms); }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) > :nth-child(2) { --i: 1; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) > :nth-child(3) { --i: 2; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) > :nth-child(4) { --i: 3; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) > :nth-child(n+5) { --i: 4; }
html.fx [data-stage]:not([data-stage="plain"]) > div:nth-child(2) > div:first-child:not(:only-child) ~ * { animation: fx-visual 1.1s var(--fx-ease) .28s backwards; }
html.fx [data-stage="plain"] > div > * { animation: fx-rise .8s var(--fx-ease) backwards; animation-delay: calc(var(--i, 0) * 90ms + 40ms); }
html.fx [data-stage="plain"] > div > :nth-child(2) { --i: 1; }
html.fx [data-stage="plain"] > div > :nth-child(3) { --i: 2; }
html.fx [data-stage="plain"] > div > :nth-child(4) { --i: 3; }
html.fx [data-stage="plain"] > div > :nth-child(n+5) { --i: 4; }
html.fx [data-stage="night"]::before, html.fx [data-stage="night"] > [data-fx="glow"] { animation: fx-glow 1.6s ease .1s backwards; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes fx-visual { from { opacity: 0; transform: translateY(54px) scale(.97); } }
@keyframes fx-glow { from { opacity: 0; } }

/* ==================================================================== B. 首頁第一屏（招牌互動） */
[data-hero="home"] > div:nth-child(1) { z-index: 1; opacity: 0; transition: opacity .9s ease .3s; }      /* 原本的圓點紋：點亮後才出現 */
[data-hero="home"]::before {
  background:
    var(--fx-grain),
    radial-gradient(44% 60% at var(--lx, 73%) var(--ly, 54%), rgba(252, 207, 0, .46) 0%, rgba(252, 207, 0, .17) 40%, rgba(252, 207, 0, 0) 74%),
    radial-gradient(40% 52% at 0% 0%, rgba(var(--fx-indigo), .26) 0%, rgba(var(--fx-indigo), 0) 72%),
    radial-gradient(50% 46% at 100% 100%, rgba(242, 169, 0, .12) 0%, rgba(242, 169, 0, 0) 70%);
}
[data-hero="home"]::after {                                                                              /* 輸入店名後：黃光從手機往外鋪滿 */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--fx-grain), radial-gradient(62% 84% at var(--lx, 73%) 42%, var(--fx-yellow-hi) 0%, var(--fx-yellow) 44%, #F6BC00 100%);
  clip-path: circle(0% at var(--lx, 73%) var(--ly, 54%));
  transition: clip-path 1.25s var(--fx-ease);
}
[data-hero="home"][data-lit]::after { clip-path: circle(160% at var(--lx, 73%) var(--ly, 54%)); }
[data-hero="home"][data-lit] > div:nth-child(1) { opacity: 1; }
@container page (max-width: 899px) { [data-hero="home"] { --lx: 50%; --ly: 66%; } }

/* 小標籤、手機下方的說明：夜色時改成半透明 */
[data-hero="home"] > div:nth-child(2) > div:first-child > p:first-child,
[data-hero="home"] > div:nth-child(2) > div:last-child > div:last-child { transition: background-color .7s ease, box-shadow .7s ease; }
[data-hero="home"]:not([data-lit]) > div:nth-child(2) > div:first-child > p:first-child,
[data-hero="home"]:not([data-lit]) > div:nth-child(2) > div:last-child > div:last-child {
  background: rgba(255, 255, 255, .08) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18) !important;
}
[data-hero="home"]:not([data-lit]) > div:nth-child(2) > div:first-child > p:last-child > span:first-child,
[data-hero="home"]:not([data-lit]) > div:nth-child(2) > div:first-child > p:last-child > strong { color: var(--fx-yellow) !important; }

/* 「別家」字卡：夜色時是唯一的亮點；輸入店名後翻成店名 */
[data-hero="home"] [data-fx="chip"] { transition: background-color .7s ease, color .7s ease, box-shadow .7s ease; transform-origin: 50% 60%; }
[data-hero="home"]:not([data-lit]) [data-fx="chip"] {
  background: var(--fx-yellow) !important; color: var(--fx-ink) !important; box-shadow: 0 12px 44px -6px rgba(252, 207, 0, .55) !important;
}
[data-hero="home"] [data-fx="chip"].fx-flip { animation: fx-flip .7s var(--fx-ease) both; }
@keyframes fx-flip {
  0% { transform: rotate(-2.5deg) rotateX(0); }
  45% { transform: rotate(-2.5deg) rotateX(90deg); }
  55% { transform: rotate(-2.5deg) rotateX(-90deg); }
  100% { transform: rotate(-2.5deg) rotateX(0); }
}

/* 手機後面的光暈、兩張小卡 */
[data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:first-child { transition: opacity .8s ease; }
[data-hero="home"]:not([data-lit]) > div:nth-child(2) > div:last-child > div:first-child > div:first-child {
  background: radial-gradient(circle, rgba(252, 207, 0, .5) 0%, rgba(252, 207, 0, .12) 42%, rgba(252, 207, 0, 0) 68%) !important;
}
[data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(4) > div { transition: box-shadow .8s ease; }
/* 兩張小卡的陰影收在外框的裁切範圍內（外框有 overflow: hidden，陰影太大會被切出一條線） */
[data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(-n+3):not(:first-child) > div {
  box-shadow: 0 16px 26px -16px rgba(35, 24, 21, .5) !important;
}
[data-hero="home"]:not([data-lit]) > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(-n+3):not(:first-child) > div {
  box-shadow: 0 16px 26px -14px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

/* 首頁進場：三張畫面各自到位（覆蓋通用的進場） */
html.fx [data-hero="home"] > div:nth-child(2) > div:first-child:not(:only-child) ~ * { animation: none; }
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(4) { animation: fx-phone 1.1s var(--fx-ease) .2s backwards; }
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(2) { animation: fx-left 1s var(--fx-ease) .55s backwards; }
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(3) { animation: fx-right 1s var(--fx-ease) .68s backwards; }
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:nth-child(n+2) { animation: fx-rise .9s var(--fx-ease) .8s backwards; }
@keyframes fx-phone { from { opacity: 0; transform: translateY(70px) scale(.94); } }
@keyframes fx-left { from { opacity: 0; transform: translate(70px, 30px); } }
@keyframes fx-right { from { opacity: 0; transform: translate(-70px, 30px); } }
/* 滑鼠視差（電腦） */
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(2) { translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -10px); transition: translate .5s ease-out; }
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(3) { translate: calc(var(--px, 0) * 20px) calc(var(--py, 0) * 12px); transition: translate .5s ease-out; }
html.fx [data-hero="home"] > div:nth-child(2) > div:last-child > div:first-child > div:nth-child(4) { translate: calc(var(--px, 0) * 6px) calc(var(--py, 0) * 4px); transition: translate .5s ease-out; }

/* 主按鈕：滑過時一道光 */
[data-stage] [data-fx="cta"], section[data-tone="yellow"] form button { position: relative; overflow: hidden; }
[data-stage] [data-fx="cta"]::after, section[data-tone="yellow"] form button::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  transform: skewX(-18deg); transition: left .7s ease;
}
[data-stage] [data-fx="cta"]:hover::after, section[data-tone="yellow"] form button:hover::after { left: 120%; }

/* ==================================================================== C. 首頁：平台名稱，捲動時一個個亮起來 */
[aria-label="顧客找您的平台"] {
  background: transparent !important; color: var(--fx-ink) !important; border-radius: 0 !important; margin: 0 !important; overflow: visible !important;
}
[aria-label="顧客找您的平台"] > div {
  max-width: 1200px; margin: 0 auto; box-sizing: border-box;
  padding: clamp(56px, 8cqi, 116px) clamp(20px, 5cqi, 80px) clamp(4px, 1cqi, 12px) !important;
  justify-content: flex-start !important; align-items: baseline !important; gap: .12em .48em !important;
  font-family: 'Outfit', 'Noto Sans TC', sans-serif; font-size: clamp(30px, 5.4cqi, 74px) !important; font-weight: 600 !important;
  line-height: 1.22; letter-spacing: -.015em;
}
[aria-label="顧客找您的平台"] > div > span:first-child {
  flex-basis: 100%; font-family: 'Noto Sans TC', sans-serif; font-size: clamp(15px, 1.4cqi, 18px) !important; font-weight: 700 !important;
  letter-spacing: 0; color: #6B625A !important; margin-bottom: .9em;
}
[aria-label="顧客找您的平台"] > div > span:not(:first-child) {
  color: rgba(35, 24, 21, calc(.13 + .87 * var(--lit, 1)));
  background: linear-gradient(transparent 68%, rgba(252, 207, 0, .95) 68%, rgba(252, 207, 0, .95) 90%, transparent 90%) no-repeat 0 0 / calc(var(--lit, 1) * 100%) 100%;
  padding: 0 .06em;
}

/* ==================================================================== D. 首頁：顧客的一天（固定畫面，捲動換場景） */
html.fx-pin .fx-jtrack { width: 100cqi; margin-left: calc(50% - 50cqi); height: calc(var(--n, 3) * 113.34vh); position: relative; margin-top: clamp(20px, 3cqi, 40px); }
html.fx-pin .fx-jstage {
  position: sticky; top: calc(var(--fx-top) + 8px); height: calc(100svh - var(--fx-top) - 18px);
  margin: 0 clamp(10px, 1.4cqi, 20px); border-radius: clamp(24px, 2.8cqi, 40px); overflow: hidden; isolation: isolate;
}
html.fx-pin .fx-jsky { position: absolute; inset: 0; z-index: -1; background: #FFF1C9; }
html.fx-pin .fx-jsky::before {                                   /* 夜空的星點，入夜才出現 */
  content: ""; position: absolute; inset: 0; opacity: var(--night, 0);
  background:
    var(--fx-grain),
    radial-gradient(1.4px 1.4px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 28% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 44% 14%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 61% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 83% 18%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 92% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 7% 78%, #fff 50%, transparent 51%), radial-gradient(1.4px 1.4px at 36% 86%, #fff 50%, transparent 51%),
    radial-gradient(46% 60% at 72% 62%, rgba(252, 207, 0, .22), transparent 70%);
}
html.fx-pin .fx-jgrid { position: absolute !important; inset: 0; display: block !important; overflow: visible !important; padding: 0 !important; max-width: 1200px; margin: 0 auto; }
html.fx-pin .fx-jgrid > article {
  position: absolute; inset: 0; box-sizing: border-box;
  padding: clamp(28px, 5cqi, 72px) clamp(24px, 5cqi, 80px) 0;
  display: flex !important; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0 !important;
  opacity: var(--o, 0); visibility: var(--vis, hidden);
}
html.fx-pin .fx-jgrid > article > * { max-width: min(48%, 520px); transform: translateY(calc(var(--y, 0) * 1px)); }
html.fx-pin .fx-jgrid > article > span:first-child {                                    /* 時間 */
  font-size: clamp(84px, 13cqi, 190px) !important; letter-spacing: -.04em; line-height: .9 !important; font-variant-numeric: tabular-nums;
}
html.fx-pin .fx-jgrid > article > div:nth-child(2) { display: none; }                   /* 原本的時間軸線 */
html.fx-pin .fx-jgrid > article > p { font-size: clamp(17px, 1.7cqi, 22px) !important; margin: clamp(14px, 2cqi, 26px) 0 0 !important; }
html.fx-pin .fx-jgrid > article > div:last-child { margin-top: clamp(22px, 3.4cqi, 48px) !important; padding-top: clamp(18px, 2.4cqi, 30px); border-top: 1.5px solid currentColor; width: 100%; }
html.fx-pin .fx-jgrid > article > div:last-child > h3 { font-size: clamp(26px, 3cqi, 40px) !important; }
html.fx-pin .fx-jgrid > article > [role="img"] {                                         /* 手機：放大，從底部出血 */
  position: absolute; right: clamp(24px, 7cqi, 110px); bottom: 0; top: clamp(40px, 8cqi, 96px); width: 44%; max-width: none;
  height: auto !important; background: transparent !important; border-radius: 0 !important; overflow: visible !important; padding-top: 0 !important;
  transform: translateY(calc(var(--y, 0) * 2.4px));
}
html.fx-pin .fx-jgrid > article > [role="img"] > div { zoom: 1.5; box-shadow: 0 50px 90px -30px rgba(35, 24, 21, .55) !important; }
/* 夜晚那一幕：深色底、亮字 */
html.fx-pin .fx-jgrid > article:last-child { color: #FFFFFF; }
html.fx-pin .fx-jgrid > article:last-child > span:first-child { color: var(--fx-yellow); }
html.fx-pin .fx-jgrid > article:last-child > p [style*="#5F574F"],
html.fx-pin .fx-jgrid > article:last-child > div:last-child [style*="#5F574F"],
html.fx-pin .fx-jgrid > article:last-child > div:last-child [style*="#6B625A"] { color: #C6C3E0 !important; }
html.fx-pin .fx-jgrid > article:last-child > div:last-child a { color: var(--fx-yellow) !important; }
html.fx-pin .fx-jgrid > article:last-child > [role="img"] > div {
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .22), 0 0 110px -10px rgba(252, 207, 0, .5), 0 50px 90px -30px rgba(0, 0, 0, .8) !important;
}
/* 進度：早、午、晚 */
html.fx-pin .fx-jrail {
  position: absolute; left: clamp(24px, 5cqi, 80px); right: clamp(24px, 5cqi, 80px); top: clamp(18px, 2.6cqi, 34px); z-index: 3;
  display: flex; gap: 10px; align-items: center; max-width: 1200px; margin: 0 auto;
  font-family: 'Outfit', 'Noto Sans TC', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--rail, #231815);
}
html.fx-pin .fx-jrail > span { opacity: .38; transition: opacity .4s ease; }
html.fx-pin .fx-jrail > span[data-on] { opacity: 1; }
html.fx-pin .fx-jrail > i { flex: none; width: clamp(18px, 4cqi, 56px); height: 1.5px; background: currentColor; opacity: .35; }
html:not(.fx-pin) .fx-jrail, html:not(.fx-pin) .fx-jsky { display: none; }
@container page (max-width: 899px) {
  html.fx-pin .fx-jgrid > article { justify-content: flex-start; padding-top: 64px; }
  html.fx-pin .fx-jgrid > article > * { max-width: 100%; }
  html.fx-pin .fx-jgrid > article > span:first-child { font-size: clamp(64px, 20cqi, 96px) !important; }
  html.fx-pin .fx-jgrid > article > div:last-child { margin-top: 16px !important; padding-top: 14px; }
  html.fx-pin .fx-jgrid > article > div:last-child > p { display: none; }
  html.fx-pin .fx-jgrid > article > [role="img"] { left: 0; right: 0; width: auto; top: auto; bottom: 0; height: 46% !important; }
  html.fx-pin .fx-jgrid > article > [role="img"] > div { zoom: 1.12; }
}

/* ==================================================================== E. 捲動浮現 */
html.fx .fx-r { will-change: opacity, transform; }

/* ==================================================================== F. 深色區塊：暖光＋冷光＋顆粒 */
section[data-tone="dark"] { background: var(--fx-night) !important; position: relative; isolation: isolate; }
section[data-tone="dark"]::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    var(--fx-grain),
    radial-gradient(46% 58% at 88% 0%, rgba(252, 207, 0, .2) 0%, rgba(252, 207, 0, 0) 70%),
    radial-gradient(44% 56% at 0% 100%, rgba(var(--fx-indigo), .26) 0%, rgba(var(--fx-indigo), 0) 72%);
}
/* 文章封面（專欄精選、文章頁首圖）：同一套夜色與光 */
[data-fx="cover"] {
  background:
    radial-gradient(60% 90% at 92% 0%, rgba(252, 207, 0, .24) 0%, rgba(252, 207, 0, 0) 70%),
    radial-gradient(50% 80% at 0% 100%, rgba(var(--fx-indigo), .3) 0%, rgba(var(--fx-indigo), 0) 72%),
    var(--fx-night) !important;
}
#video img, #works img { transition: transform 1.4s var(--fx-ease); }
#video div:hover > img, #works div:hover > img { transform: scale(1.07); }

/* ==================================================================== G. 黃色區塊（表單、感謝）：做出受光感 */
section[data-tone="yellow"] {
  background: radial-gradient(72% 96% at 16% 0%, var(--fx-yellow-hi) 0%, var(--fx-yellow) 46%, #F4B700 100%) !important; position: relative; isolation: isolate;
}
section[data-tone="yellow"]::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fx-grain); pointer-events: none; }
section[data-tone="yellow"] form { box-shadow: 0 50px 90px -44px rgba(88, 56, 0, .55), 0 2px 0 rgba(255, 255, 255, .6) inset !important; }

@media (prefers-reduced-motion: reduce) {
  [data-hero="home"]::after, [data-stage] *, [data-stage]::before { transition: none !important; animation: none !important; }
}

/* ---------- H. 導覽列：「關於我們」子選單（關於我們、聯絡我們） ---------- */
[data-navpanel] { visibility: hidden; opacity: 0; transform: translateY(-4px); transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
[data-navgroup]:hover [data-navpanel], [data-navgroup][data-open] [data-navpanel], html:not([data-js]) [data-navgroup]:focus-within [data-navpanel] {
  visibility: visible; opacity: 1; transform: none; transition: opacity .16s ease, transform .16s ease, visibility 0s; }
[data-navbtn] svg { transition: transform .16s ease; }
[data-navgroup]:hover [data-navbtn] svg, [data-navgroup][data-open] [data-navbtn] svg { transform: rotate(180deg); }
[data-navpanel] a:hover { background: #FAF8F4; }
[data-navpanel] a[aria-current]:hover { background: #FFF4C2; }
[data-navbtn]:focus-visible, [data-navpanel] a:focus-visible { outline: 2px solid #231815; outline-offset: 3px; border-radius: 8px; }
@container (min-width: 1179.5px) { nav[aria-label="主選單"] { overflow: visible !important; } }   /* the menu row hides itself below this width by clipping */
@media (prefers-reduced-motion: reduce) { [data-navpanel], [data-navbtn] svg { transition: none !important; } }

/* ---------- I. 成功案例（各服務）：依產業篩選、案例細節 ---------- */
/* 篩選用單選鈕（不需要 JavaScript）：選了哪一類，只顯示那一類的案例卡 */
[data-filter] input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
[data-filter] label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #D9D0C4; background: #FFFFFF; color: #231815; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color .16s ease, color .16s ease, border-color .16s ease; }
[data-filter] label span { font-family: 'Outfit', 'Noto Sans TC', sans-serif; font-weight: 600; color: #6B625A; }
[data-filter] label:hover { border-color: #231815; }
[data-filter] input:checked + label { background: #231815; border-color: #231815; color: #FFFFFF; }
[data-filter] input:checked + label span { color: #FCCF00; }
[data-filter] input:focus-visible + label { outline: 2px solid #231815; outline-offset: 3px; }
[data-casewrap]:has(input[value="k1"]:checked) [data-kind]:not([data-kind="k1"]),
[data-casewrap]:has(input[value="k2"]:checked) [data-kind]:not([data-kind="k2"]),
[data-casewrap]:has(input[value="k3"]:checked) [data-kind]:not([data-kind="k3"]) { display: none !important; }
/* 案例細節（展開／收合） */
details[data-case] > summary { list-style: none; }
details[data-case] > summary::-webkit-details-marker { display: none; }
details[data-case] > summary:hover { text-decoration: underline; text-underline-offset: 5px; }
details[data-case] > summary:focus-visible { outline: 2px solid #231815; outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { [data-filter] label { transition: none !important; } }

/* 標題換行時，讓每一行長度接近，不會最後一行只剩一兩個字（Chrome、Safari 都支援；不支援的瀏覽器維持原樣） */
h1, h2, h3 { text-wrap: balance; }
