/* ============================================================
   illustration.css — 全站插畫視覺系統
   簡實制所 Lessary Studio

   說明：
   本檔案定義全站共用的「插畫設計系統」，分兩種用途：
   1) 敘事型插畫（.illust-scene）— 用於 Hero / About / Story 區塊
      舒適插畫風格：柔和有機造型、圓潤線條、局部填色、手繪溫度感
   2) 功能型插畫（.icon-line）— 用於重點說明、步驟流程、圖示標籤
      簡單線條插畫：單色線條、無填色或極簡填色、造型簡化

   兩者共用同一組線條粗細（2.5px）、圓角語彙與品牌色票，
   維持「同一套設計系統」的視覺一致性。
   ============================================================ */

:root {
  /* 插畫系統色票：以品牌主色為主線色，accent 為主要填色，
     illust-warm 是唯一新增的手繪溫度輔助色（少量點綴用） */
  --illust-line:      var(--primary);
  --illust-fill:       var(--accent);
  --illust-fill-soft:  rgba(137,222,124,0.16);
  --illust-fill-dark:  var(--accent-dark);
  --illust-warm:       #ffffff;      /* 手繪溫度感輔助色（點、小配件用，避免大面積使用）*/
  --illust-warm-soft:  rgba(255,177,153,0.18);
  --illust-stroke-w:   2.5px;
}

/* ── 功能型插畫：線條 icon 系統 ── */
.icon-line {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-line svg {
  width: 100%; height: 100%;
  stroke: var(--illust-line);
  stroke-width: var(--illust-stroke-w);
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.icon-line svg .fill-accent   { fill: var(--illust-fill); stroke: none; }
.icon-line svg .fill-soft     { fill: var(--illust-fill-soft); stroke: none; }
.icon-line svg .fill-warm     { fill: var(--illust-warm); stroke: none; }
.icon-line.on-dark svg { stroke: var(--white); }
.icon-line.on-dark svg .fill-accent { fill: var(--accent); }

.icon-line-40 { width: 40px; height: 40px; }
.icon-line-28 { width: 28px; height: 28px; }
.icon-line-22 { width: 22px; height: 22px; }
.icon-line-18 { width: 18px; height: 18px; }

.icon-badge {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--illust-fill-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: background .25s, transform .25s;
}
.icon-badge .icon-line { width: 28px; height: 28px; }
*:hover > .icon-badge,
.icon-badge:hover { background: var(--illust-fill); transform: translateY(-2px) rotate(-2deg); }

/* ── 敘事型插畫：舒適插畫容器（有機造型、局部填色、手繪感） ── */
.illust-scene { position: relative; }
.illust-scene svg { display: block; width: 100%; height: auto; }

/* 有機色塊裝飾（用於背景，柔和不規則造型，取代原本的圓形光暈） */
.illust-blob {
  position: absolute; pointer-events: none; z-index: 0;
  opacity: .9;
}
.illust-blob svg { width: 100%; height: 100%; display: block; }

/* 手繪點狀軌跡（呼應舒適插畫的溫度感細節，取代單調的粒子動畫） */
.dot-trail { position: absolute; pointer-events: none; z-index: 0; }
.dot-trail span {
  position: absolute; border-radius: 50%;
  background: var(--illust-line); opacity: .18;
}

/* 手繪風格漂浮小物件（葉子/星星/圈圈），用於點綴敘事型區塊 */
.float-doodle {
  position: absolute; pointer-events: none; z-index: 1;
  animation: doodleFloat 6s ease-in-out infinite;
}
.float-doodle svg { display: block; }
@keyframes doodleFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-14px) rotate(6deg); }
}

/* ── 插畫版 badge-float（沿用原本浮動卡片位置，改用線條 icon） ── */
.badge-float .icon-line { width: 20px; height: 20px; }

/* ── PORTFOLIO 卡片（敘事型插畫封面 + 功能型線條標籤） ── */
.port-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(42,50,75,0.08);
  transition: transform .3s, box-shadow .3s;
}
.port-card:hover { transform: translateY(-6px); box-shadow: 0 20px 46px rgba(42,50,75,0.14); }
.port-card-cover {
  aspect-ratio: 4/3; overflow: hidden; position: relative;
  background: var(--illust-fill-soft);
}
.port-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.port-card:hover .port-card-cover img { transform: scale(1.06); }
.port-card-cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--white); color: var(--illust-fill-dark);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 5px 12px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px;
}
.port-card-body { padding: 22px 22px 26px; }
.port-card-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--illust-fill-dark);
  margin-bottom: 8px; display: block;
}
.port-card-title { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 6px; line-height: 1.5; }
.port-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.port-card-more {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--primary); opacity: .7;
}
.port-card:hover .port-card-more { opacity: 1; color: var(--illust-fill-dark); }
.port-card-more .icon-line { width: 14px; height: 14px; transition: transform .25s; }
.port-card:hover .port-card-more .icon-line { transform: translateX(3px); }

/* ── PORTFOLIO 篩選 tabs ── */
.port-filter {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; margin: 0 auto 48px;
}
.port-filter-btn {
  font-size: 13.5px; font-weight: 700; letter-spacing: .03em;
  color: var(--primary); background: var(--white);
  border: 1.5px solid rgba(42,50,75,0.14);
  padding: 10px 22px; border-radius: 30px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.port-filter-btn .icon-line { width: 15px; height: 15px; }
.port-filter-btn:hover { border-color: var(--illust-fill-dark); transform: translateY(-1px); }
.port-filter-btn.active {
  background: var(--primary); border-color: var(--primary); color: var(--white);
}
.port-filter-btn.active .icon-line svg { stroke: var(--white); }

/* ── PORTFOLIO grid：桌機 3 欄一排 / 手機 1 欄一排 ── */
.port-cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
@media (max-width: 900px) {
  .port-cards-grid { grid-template-columns: 1fr; gap: 24px; }
  .port-filter { justify-content: flex-start; overflow-x: auto; padding: 4px 0; }
}

/* ── 首頁作品案例 teaser 區塊（深色底，標題/按鈕需切換淺色文字） ── */
.work-teaser { background: var(--primary); position: relative; overflow: hidden; }
.work-teaser-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 44px; flex-wrap: wrap; gap: 16px; }
.work-teaser .section-label { color: var(--accent); }
.work-teaser .section-title { color: var(--white); }
.work-teaser .btn-secondary { color: var(--white); border-color: rgba(255,255,255,0.35); }
.work-teaser .btn-secondary:hover { color: var(--accent); border-color: var(--accent); }

/* ── 服務頁 / 流程 icon（功能型插畫套用示範） ── */
.svc-icon-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

@media (max-width: 900px) {
  .work-teaser-header { flex-direction: column; align-items: flex-start; }
}
