/* 基本設定與設計系統 */
:root {
    /* 主要色彩 (水藍) */
    --primary: #90b3c3;
    --primary-light: #e7eff2;
    --primary-dark: #4a6e7f;

    /* 次要色彩 (蜂蜜黃) */
    --secondary: #d8c65d;
    --secondary-light: #fdf9e1;
    --secondary-dark: #a99a48;

    /* 語意色彩 */
    --success: #10b981;
    /* 綠 */
    --error: #ef4444;
    /* 紅 */
    --warning: #f59e0b;
    /* 黃 */
    --info: #3b82f6;
    /* 藍 */

    /* 中性色彩 */
    --bg-light: #fdfdfa;
    /* 帶點暖色的白 */
    --text-main: #374151;
    --text-muted: #6b7280;
    --text-dark: #111827;
    --border-color: #e5e7eb;

    /* 字體設定 */
    --font-main: 'Noto Sans TC', sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;

    /* 圓角與間距規格 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* 動畫過渡 */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基礎重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.7;
    /* 優化內文行高 */
    font-size: 16px;
    overflow-x: hidden;
}

/* 字體階層 */
h1,
h2,
h3,
h4 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: 1.5rem;
}

/* 導航列 (玻璃擬態) */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

nav.scrolled {
    padding: 0.8rem 5%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    margin-left: 2rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

/* 英雄區 (Hero Section) */
.hero {
    padding: 160px 10% 100px;
    display: flex;
    flex-direction: column;
    /* 手機優先 */
    align-items: center;
    text-align: center;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #f1f7f9, #fdfdf0);
    gap: var(--spacing-md);
}

.hero-content {
    max-width: 800px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: var(--spacing-md);
}

.price-tag span {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 12px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(144, 179, 195, 0.4);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(144, 179, 195, 0.5);
}

.hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: 85%;
    max-width: 450px;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* 特色區塊 (Features) */
.section-title {
    text-align: center;
    margin: 120px 5% 60px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* 手機單欄 */
    gap: var(--spacing-md);
    padding: 0 5%;
    margin-bottom: 120px;
}

.feature-card {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(144, 179, 195, 0.15);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* 作者介紹區塊 */
.author-section {
    padding: 120px 5%;
    background: white;
}

.author-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.author-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 8px solid var(--bg-light);
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.author-bio {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.author-info p:last-child {
    color: var(--text-muted);
}

/* 頁尾 */
footer {
    background: var(--text-dark);
    color: white;
    padding: 80px 5% 40px;
    text-align: center;
}

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

footer p {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* 響應式佈局 (Media Queries) */

/* 平板斷點 (768px 以上) */
@media (min-width: 768px) {
    .hero {
        padding: 180px 10% 120px;
        flex-direction: row;
        text-align: left;
        align-items: center;
    }

    .hero-content {
        flex: 1;
    }

    .hero-image {
        flex: 1;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 10%;
    }

    .author-container {
        flex-direction: row;
        text-align: left;
        gap: var(--spacing-lg);
    }
}

/* 桌面斷點 (1200px 以上) */
@media (min-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero {
        padding: 150px 10%;
        gap: var(--spacing-lg);
    }
}