/* 引導式設計顧問 (Design Advisor - Guided) 優化實作 */

:root {
    /* 核心色彩系統 - 優雅深藍 (#1A3263) */
    --primary: #1A3263;         /* 主色：深藍色，展現專業與深度 */
    --primary-light: #F0F4FA;    /* 淺色版：用於背景、Hover 狀態 */
    --primary-dark: #0C1830;     /* 深色版：用於文字核心、Active 狀態 */
    
    /* 輔助與語意色彩 */
    --secondary: #94A3B8;        /* 次要色：優雅灰藍，用於次要按鈕 */
    --accent: #D97706;           /* 強調色：溫暖琥珀，導引視覺焦點 */
    --success: #059669;          /* 成功色：森林綠 */
    --error: #DC2626;            /* 錯誤色：警示紅 */
    --warning: #D97706;          /* 警告色：暖黃 */
    
    /* 中性色彩 */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --text-main: #1F2937;
    --text-muted: #4B5563;
    
    /* 視覺規範 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Klee One', 'Noto Sans TC', cursive, sans-serif;
    background-color: var(--gray-50);
    color: var(--text-main);
    line-height: 1.7; /* 選用 1.7 以獲得最佳閱讀體驗 */
    letter-spacing: 0.02em; /* 字間距微調，增加透氣感 */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

code, pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* 導覽列容器 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    transition: var(--transition-normal);
    border-bottom: 1px solid var(--gray-100);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

nav ul {
    display: none; /* 手機端預設隱藏，平板以上顯示 */
    list-style: none;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

/* 英雄看板區塊 (Hero) */
.hero {
    min-height: 100vh;
    padding: 120px 5% 60px; /* 手機端間距 */
    display: flex;
    align-items: center;
    justify-content: center;
    /* 背景改為品牌色的優雅漸層 */
    background: 
        radial-gradient(circle at 10% 10%, rgba(26, 50, 99, 0.03), transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(217, 119, 6, 0.05), transparent 40%),
        var(--white);
}

.hero-container {
    max-width: 1200px;
    display: flex;
    flex-direction: column; /* 手機端垂直排列 */
    align-items: center;
    gap: 3rem;
    text-align: center;
}

.hero-image-wrapper {
    flex: 1;
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInSlideRight 1.2s forwards 0.1s;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 移除白邊，改為多層次裝飾設計 */
.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    z-index: 0;
    opacity: 0.5;
}

.hero-profile-img {
    width: 100%;
    max-width: 380px; /* 手機端寬度 */
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    background: transparent;
}

.hero-text {
    flex: 1.2;
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInSlideLeft 1.2s forwards 0.3s;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 500px;
}

/* 左右進場動畫 */
@keyframes fadeInSlideRight {
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInSlideLeft {
    to { opacity: 1; transform: translateX(0); }
}

/* --- 原本的動畫定義移除 --- */

.section-title {
    font-size: 2.2rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
}

/* 通用區塊樣式 (Mobile First) */
.section {
    padding: 60px 5%; /* 手機端間距 */
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-normal);
}

.section.reveal {
    opacity: 1; /* 揭露時變為可見 */
    transform: translateY(0);
}

.cta-button {
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards 0.6s;
    border: none;
}

.cta-button i {
    margin-right: 0.5rem;
}

.secondary-btn {
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.secondary-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.intro-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.intro-grid {
    display: flex;
    flex-direction: column; /* 手機端垂直排列 */
    gap: 3rem;
    align-items: center;
}

.intro-image {
    width: 100%;
    max-width: 320px; /* 控制圖片在手機端的寬度，避免過大 */
    aspect-ratio: 4/5; /* 調整為長幅比例 */
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    background: var(--white);
}

.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--gray-100);
    transition: var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 卡片亮點點綴 */
.card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.05), transparent 70%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.card ul {
    list-style: none;
    text-align: left;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
}

.card ul li::before {
    content: '→'; /* 簡單優雅的箭頭 */
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.card-footer-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(202, 138, 4, 0.1);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 視圖切換邏輯 */
.page-view {
    display: none;
}

.page-view.active {
    display: block;
    animation: fadeIn 0.8s ease forwards;
}

/* 關於菀倩 - 長文容器樣式 */
.article-container {
    padding: 120px 5% 60px; /* 手機端間距 */
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
}

.article-header {
    text-align: center;
    margin-bottom: 5rem;
}

.article-header h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 500;
}

.article-content {
    color: var(--text-dark);
    font-size: 1.15rem;
    line-height: 2;
}

.article-content h2 {
    color: var(--primary);
    margin: 4rem 0 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--accent);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-list {
    list-style: none;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
}

.article-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-list li::before {
    content: '•'; /* 使用標準圓點 */
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-weight: bold;
}

.question-box {
    margin: 3rem 0;
    padding: 2.5rem;
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.question-box strong {
    color: var(--primary);
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Logo 連結樣式移除下劃線 */
.logo a {
    text-decoration: none;
    color: inherit;
}

/* 動畫定義 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 頁尾 */
footer {
    background: var(--primary);
    color: white;
    padding: 5rem 10% 2rem;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.copyright {
    margin-top: 4rem;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* 動畫定義 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 手機響應式調整 */
/* 響應式佈局調整 (Responsive Design) - 手機優先原則 */

/* 平板斷點 (768px) */
@media (min-width: 768px) {
    header {
        padding: 1.5rem 8%;
    }
    
    nav ul {
        display: flex;
    }
    
    .hero {
        padding: 160px 10% 120px;
    }
    
    .hero-container {
        flex-direction: row;
        text-align: left;
    }
    
    .section {
        padding: 100px 10%;
    }
    
    .intro-grid {
        display: grid; /* 切換回 Grid 佈局 */
        grid-template-columns: 1fr 0.8fr; /* 讓圖片寬度稍微縮小，文字佔比增加 */
        gap: 5rem;
        align-items: center;
    }
    
    .intro-image {
        max-width: 100%; /* 桌面端跟隨 Grid 寬度 */
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }
    
    .article-container {
        padding: 200px 15% 100px;
    }
}

/* 桌面斷點 (1200px) */
@media (min-width: 1200px) {
    header {
        padding: 1.5rem 10%;
    }
    
    .hero-container {
        gap: 6rem;
    }
    
    .hero-profile-img {
        max-width: 480px; /* 桌面端放大尺寸 */
        border-radius: var(--radius-lg);
    }
    
    .hero-image-wrapper::before {
        top: 30px;
        left: 30px;
        border-radius: var(--radius-lg);
    }
    
    .section-title {
        font-size: 2.8rem;
    }
}
