/* ================================
   「正」小人 - 全局基礎樣式
   ================================ */

:root {
    --burgundy-900: #2D0A0C;
    --burgundy-800: #4A1215;
    --burgundy-700: #5C1A1B;
    --burgundy-600: #722F37;
    --burgundy-500: #8B3A3A;
    --burgundy-400: #A85555;
    --burgundy-300: #C47A7A;
    --burgundy-200: #DDB3B3;
    --burgundy-100: #F0DADA;
    --burgundy-50:  #FDF5F5;

    --gold-600: #8B6914;
    --gold-500: #A67C00;
    --gold-400: #C9A961;
    --gold-300: #D4AF37;
    --gold-200: #E8D5A3;
    --gold-100: #F5ECD6;
    --gold-50:  #FBF7ED;

    --cream: #FDF8F3;
    --cream-dark: #F5EDE4;
    --white: #FFFFFF;
    --gray-900: #1A1A1A;
    --gray-700: #3D3D3D;
    --gray-500: #6B6B6B;
    --gray-300: #B0B0B0;

    --font-serif: 'Noto Serif TC', 'Songti SC', serif;
    --font-sans: 'Noto Sans TC', 'PingFang SC', sans-serif;

    --nav-height: 72px;
    --section-gap: 100px;
    --container-max: 1200px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-900);
    background-color: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================
   導航欄
   ================================ */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(114, 47, 55, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: var(--gold-300);
    color: var(--burgundy-900);
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 900;
    border-radius: 8px;
    line-height: 1;
}

.brand-text {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--gold-300);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 6px;
}

.nav-link {
    display: block;
    padding: 10px 18px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--gold-300);
    background: rgba(212, 175, 55, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--gold-300);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active { opacity: 1; visibility: visible; }

/* ================================
   頁面系統
   ================================ */
.page { display: none; animation: fadeIn 0.5s ease; }
.page.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
   按鈕
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--burgundy-600);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(114,47,55,0.3);
}

.btn-primary:hover {
    background: var(--burgundy-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(114,47,55,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    border-color: var(--gold-300);
    color: var(--gold-300);
    background: rgba(212,175,55,0.08);
}

.btn-gold {
    background: var(--gold-300);
    color: var(--burgundy-900);
    box-shadow: 0 4px 16px rgba(201,169,97,0.3);
}

.btn-gold:hover {
    background: var(--gold-200);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201,169,97,0.4);
}

/* ================================
   通用區塊標題
   ================================ */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--burgundy-50);
    color: var(--burgundy-600);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--burgundy-900);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--gray-500);
    font-weight: 300;
}

/* ================================
   頁尾
   ================================ */
.footer {
    background: var(--burgundy-900);
    padding: 64px 0 32px;
    border-top: 1px solid rgba(212,175,55,0.1);
}

.footer-content { text-align: center; }

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-brand .brand-icon { width: 36px; height: 36px; font-size: 18px; }
.footer-brand .brand-text { font-size: 20px; }

.footer-desc {
    color: rgba(255,255,255,0.45);
    font-size: 14px;
    margin-bottom: 28px;
    font-weight: 300;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--gold-300); }

.footer-copy {
    color: rgba(255,255,255,0.3);
    font-size: 12px;
    letter-spacing: 1px;
}

/* ================================
   回到頂部
   ================================ */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 48px; height: 48px;
    background: var(--burgundy-600);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(114,47,55,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--burgundy-700);
    transform: translateY(-2px);
}
