/* ========== 1. 核心變數與重置 (Base Reset & Tokens) ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { 
    margin: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji"; 
    color: var(--ink); 
    background: var(--mainbg); 
    line-height: 1.6; 
    font-size: 1.125rem;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

:root {
  color-scheme: light;
  --mainbg: #FFFFFF;       /* 純淨潔白 */
  --bg: #FFF7E6;           /* 溫暖淺杏 */
  --ink: #1f2937;          /* 沉穩墨藍灰 */
  --muted: #6b7280;        /* 次要文字 */
  --brand: #EA580C;        /* 橘色主色 */
  --accent: #F59E0B;       /* 琥珀強調色 */
  --ring: rgba(234, 88, 12, .28);
  --surface: #FFFBEB;      /* 柔和卡片底 */
  --border: #FDE68A;       /* 柔黃邊框 */
  --container: 1200px;     /* 內容寬度 */
  --radius: 16px;          /* 圓角 */
  --shadow: 0 10px 25px rgba(2,6,23,.06), 0 2px 6px rgba(2,6,23,.04);
}

/* ========== 2. 版面與排版 (Layout & Typography) ========== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-sm { padding: 40px 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 768px) { .grid-2 { grid-template-columns: 1.1fr 0.9fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

h1, h2, h3 { line-height: 1.25; margin: 0 0 16px; }
h1 { font-size: clamp(28px, 4vw, 48px); letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
p { margin: 0 0 14px; color: var(--ink); opacity: .92; }
.muted { color: var(--muted); }
.center { text-align:center; }
.mt-8 { margin-top: 32px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

/* ========== 3. 通用元件 (Components) ========== */
/* 卡片 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }

/* 按鈕 (統一為膠囊狀) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-weight: 600; border: 1px solid transparent; transition: transform .06s ease, box-shadow .2s ease, background .2s ease; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(109,40,217,.35); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }

/* 標籤 */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.chip { display:inline-flex; align-items:center; padding:8px 12px; border:1px solid var(--border); border-radius:999px; background:#fff; margin:6px; font-size:14px; }

/* 圖片佔位符 */
.media { width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px dashed var(--border); display:flex; align-items:center; justify-content:center; background: #FFF1C9; color:#b45309; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02); }
.media .label { font-size: 14px; opacity: .9; padding: 12px; text-align: center; }
.ph-21x9 { aspect-ratio: 21/9; }
.ph-16x9 { aspect-ratio: 16/9; }
.ph-4x3 { aspect-ratio: 4/3; }
.ph-1x1  { aspect-ratio: 1/1; }

/* ========== 4. 導覽列與頁尾 (Header & Footer) ========== */
header.sticky { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(8px); background: color-mix(in oklab, var(--bg) 86%, transparent); border-bottom: 1px solid var(--border); }
.nav { display:flex; align-items:center; justify-content:space-between; height:64px; }
.nav a.brand { font-weight: 800; letter-spacing: .2px; display: flex; align-items: center; gap: 12px; font-size: 22px; }
.nav .menu { display:none; gap:18px; }

        div h1 {
            font-size: clamp(28px, 4vw, 48px); 
            font-weight: 700;
            letter-spacing: -0.02em;
            line-height: 1.25;
            margin-bottom: 12px; 
            color: var(--ink);
        }

        div h1 strong { color: var(--brand); }

        div p {
            font-size: clamp(16px, 2vw, 18px); 
            color: var(--muted);
            opacity: .92;
            margin: 0;
        }

@media (min-width: 900px){ .nav .menu { display:flex; } }

/* 2026-10-14：logo 尺寸從 header.html 的 inline style 搬過來（inline style
   的優先權比樣式表高，留在那邊的話下面手機版的縮小規則會完全沒作用）。 */
.nav .brand-logo { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.nav .brand-text { white-space: nowrap; }
/* 2026-10-14：品牌區可以被壓縮，但絕不壓到右邊的按鈕。
   字放不下時先用省略號頂著，header.html 的小腳本量到會截斷，
   就加上 .brand-collapsed 只留 logo（不留「一日A…」這種半截字）。 */
.nav { gap: 12px; }
.nav a.brand { min-width: 0; flex: 0 1 auto; }
.nav .brand-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#main-header.brand-collapsed .brand-text { display: none; }

/* 2026-10-14：手機／平板的頁首快速連結（Demo／故事／登入）。
   跟上面的 .menu 互補：.menu 在 ≥900px 顯示，這組在 <900px 顯示，
   任何寬度都恰好只有一組導覽，不會兩組同時出現。
   配色走網站本身的暖色系（白底＋柔黃邊框＋橘色主按鈕），跟頁首的
   淺杏色毛玻璃背景是一套的——刻意不沿用小鴨面板那套深色玻璃按鈕，
   深色鈕放在淺色頁首上會很突兀。 */
.nav .nav-actions { display: flex; align-items: center; gap: 6px; flex: none; }
@media (min-width: 900px){ .nav .nav-actions { display: none; } }
.nav-act {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 13px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .2px; line-height: 1;
  color: var(--ink); background: rgba(255,255,255,.85);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(2,6,23,.05);
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.nav-act:active { transform: scale(.96); }
.nav-act-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #f59e0b, var(--brand));
  box-shadow: 0 4px 12px rgba(234,88,12,.28);
}

/* 手機寬度：品牌只留「一日AI技師」，副標收起來，騰出右側給快速連結。
   以前在 390px 寬的手機上，完整標題會斷成「一日AI技師｜AI客製化私教服」
   ＋「務」兩行，本來就塞不下。 */
@media (max-width: 768px){
  .nav { height: 58px; gap: 10px; }
  .nav a.brand { font-size: 18px; gap: 9px; min-width: 0; }
  .nav .brand-logo { width: 36px; height: 36px; border-radius: 9px; }
  .nav .brand-tagline { display: none; }
  /* 頁首左右留白收窄一點，讓 360px 手機也放得下「一日AI技師」 */
  #main-header .nav.container { padding-left: 14px; padding-right: 14px; }
}
/* 極窄螢幕（iPhone SE 一代 320px 這種）：連「一日AI技師」都放不下的時候，
   只留 logo，讓三顆連結維持完整、好按。logo 本身就是品牌。 */
@media (max-width: 359px){
  .nav .brand-text { display: none; }
  .nav-act { padding: 0 11px; font-size: 13px; }
}

footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); }


#shared-header header,#shared-footer footer { border-style: none;}

/* ========== 5. 特定區塊樣式 (首頁特有但可共用) ========== */

/* 步驟與特色 */
.list { padding-left: 18px; }
.list li { margin: 8px 0; }
.steps { display:grid; gap:16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr);} }
.step { position:relative; padding:18px; border:1px solid var(--border); border-radius: var(--radius); background: #fff; }
.step .n { position:absolute; top:-12px; left:-12px; background: var(--brand); color:#fff; width:36px; height:36px; border-radius:999px; display:grid; place-items:center; font-weight:700; box-shadow: 0 6px 14px rgba(109,40,217,.25); }
.features { display:grid; grid-template-columns: 1fr; gap:16px; }
@media (min-width: 900px){ .features { grid-template-columns: repeat(3, 1fr);} }

/* 見證與 FAQ */
.quotes { display:grid; grid-template-columns: 1fr; gap:20px; }
@media (min-width: 900px){ .quotes { grid-template-columns: repeat(3, 1fr);} }
.quote { display:flex; flex-direction:column; gap:14px; background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding:20px; box-shadow: var(--shadow); }
.quote-head { display:flex; align-items:center; gap:12px; }
.quote .avatar-img { width: 88px; height: 88px; border-radius: 50%; border: 2px solid var(--border); flex: none; object-fit: cover; }
.quote .bubble { background: var(--bg); border:1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.quote .bubble p { margin: 0; }
.quote .meta { font-size: 15px; font-weight: 700; color: var(--ink); }

details { border:1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background:#fff; }
summary { cursor:pointer; font-weight:600; }
details + details { margin-top: 10px; }

/* 主題卡片 (Topic Cards) */
.topic-cards { display:grid; gap:18px; grid-template-columns: 1fr; }
@media (min-width: 700px){ .topic-cards { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1040px){ .topic-cards { grid-template-columns: repeat(3,1fr); } }
.topic-card { position:relative; padding:22px; border:1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.topic-card h3 { margin-bottom: 8px; letter-spacing: .3px; }
.topic-card p { margin-bottom: 10px; }
.topic-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top: 6px; }
.topic-badge { padding:6px 10px; border-radius:999px; border:1px solid var(--border); background:#fff; font-size:12px; }

/* 表單 */
form { display:grid; gap: 14px; }
.field { display:grid; gap:6px; }
label { font-size: 14px; color: var(--muted); }
input, textarea, select { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: #ffffff; color: var(--ink); font: inherit; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }