/* =========================================================
   NexusAI Lab — 色調主題（Theme presets）
   ---------------------------------------------------------
   用法（擇一）：
   1) private/config.php 設定：
        'theme' => 'ocean',   // default | ocean | violet | emerald | sunset | light
   2) 自訂檔：
        'theme_css' => 'assets/css/theme-custom.css'
      並複製 theme-custom.example.css 後改色碼
   3) 本機預覽：網址加 ?theme=violet（僅 debug 模式）
   ---------------------------------------------------------
   改色時主要動這些變數即可，全站會跟著變：
   --bg --bg-elevated --bg-soft --panel
   --text --text-muted --heading
   --primary --primary-2 --accent --primary-ink
   --border --border-strong
   ========================================================= */

/* —— Ocean：偏深藍商務（預設感加強） —— */
body[data-theme="ocean"] {
  --bg: #061018;
  --bg-elevated: #0a1824;
  --bg-soft: #0f2436;
  --panel: rgba(15, 36, 54, 0.78);
  --border: rgba(125, 211, 252, 0.14);
  --border-strong: rgba(125, 211, 252, 0.28);
  --text: #e6f4ff;
  --text-muted: #8fb4cc;
  --heading: #f5fbff;
  --primary: #38bdf8;
  --primary-2: #22d3ee;
  --primary-ink: #04202c;
  --accent: #60a5fa;
}

/* —— Violet：紫霓虹科技 —— */
body[data-theme="violet"] {
  --bg: #0a0714;
  --bg-elevated: #120b22;
  --bg-soft: #1a1230;
  --panel: rgba(26, 18, 48, 0.78);
  --border: rgba(196, 181, 253, 0.16);
  --border-strong: rgba(196, 181, 253, 0.3);
  --text: #f0e9ff;
  --text-muted: #b7a8d9;
  --heading: #faf7ff;
  --primary: #8b5cf6;
  --primary-2: #c084fc;
  --primary-ink: #1a0b2e;
  --accent: #f472b6;
}

/* —— Emerald：綠意成長 / 永續感 —— */
body[data-theme="emerald"] {
  --bg: #06140f;
  --bg-elevated: #0c1f18;
  --bg-soft: #122a20;
  --panel: rgba(18, 42, 32, 0.78);
  --border: rgba(110, 231, 183, 0.14);
  --border-strong: rgba(110, 231, 183, 0.28);
  --text: #e7faf2;
  --text-muted: #8fbfa9;
  --heading: #f4fff9;
  --primary: #10b981;
  --primary-2: #34d399;
  --primary-ink: #042016;
  --accent: #2dd4bf;
}

/* —— Sunset：暖琥珀高端顧問 —— */
body[data-theme="sunset"] {
  --bg: #120c08;
  --bg-elevated: #1c140e;
  --bg-soft: #281a12;
  --panel: rgba(40, 26, 18, 0.8);
  --border: rgba(251, 191, 36, 0.14);
  --border-strong: rgba(251, 191, 36, 0.28);
  --text: #fff4e8;
  --text-muted: #c4a88a;
  --heading: #fffaf3;
  --primary: #f59e0b;
  --primary-2: #fb923c;
  --primary-ink: #1c1006;
  --accent: #f472b6;
}

/* —— Light：淺色商務（簡報 / 白天閱讀） —— */
body[data-theme="light"] {
  --bg: #f4f7fc;
  --bg-elevated: #ffffff;
  --bg-soft: #e8eef8;
  --panel: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --text: #1e293b;
  --text-muted: #64748b;
  --heading: #0f172a;
  --primary: #2563eb;
  --primary-2: #0891b2;
  --primary-ink: #ffffff;
  --accent: #7c3aed;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] {
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(37, 99, 235, 0.1), transparent 60%),
    radial-gradient(800px 400px at 90% 0%, rgba(8, 145, 178, 0.08), transparent 55%),
    var(--bg);
}

body[data-theme="light"] .site-header {
  background: rgba(244, 247, 252, 0.88);
}

body[data-theme="light"] .text-gradient {
  background: linear-gradient(120deg, #0f172a 10%, #2563eb 45%, #7c3aed 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-theme="light"] .btn-primary {
  color: #fff;
}

body[data-theme="light"] .hero-bg {
  opacity: 0.22;
}

/* 標題漸層跟隨主題強調色 */
body[data-theme="ocean"] .text-gradient,
body[data-theme="violet"] .text-gradient,
body[data-theme="emerald"] .text-gradient,
body[data-theme="sunset"] .text-gradient {
  background: linear-gradient(
    120deg,
    #fff 8%,
    var(--primary-2) 42%,
    var(--accent) 78%,
    #fff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 示範頁流程卡（取代程式碼區塊） */
.flow-panel {
  padding: 1.25rem 1.35rem;
  height: 100%;
}
.flow-title {
  margin: 0 0 1rem;
  font-size: 1rem;
}
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: flow;
  display: grid;
  gap: 0.85rem;
}
.flow-steps li {
  counter-increment: flow;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
body[data-theme="light"] .flow-steps li {
  background: rgba(15, 23, 42, 0.03);
}
.flow-steps li::before {
  content: counter(flow);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--primary-ink);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.flow-steps li strong {
  display: block;
  color: var(--heading);
  margin-bottom: 0.15rem;
}
.flow-steps li span {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
