/* 
   ==========================================================================
   火腿偵探旅社 (Detective Ham Lodge) - 官方網站專用樣式表
   視覺風格：暗黑黃銅復古火車旅社風 (Dark Brass Vintage Train Lodge)
   ========================================================================== 
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Noto+Serif+TC:wght@400;700;900&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
    /* 視覺聖經調色盤 */
    --color-charcoal: #1a1410;    /* 主背景 */
    --color-dark-brown: #2b2118;  /* 次背景、面板底 */
    --color-brass: #b08d57;       /* 黃銅主色 */
    --color-light-brass: #d9b779; /* 亮黃銅高光 */
    --color-amber: #e8a13a;       /* 暖光、琥珀燈 */
    --color-paper: #efe2c4;       /* 舊紙張 */
    --color-seal-red: #8c3b2e;    /* 暗紅、印章、警告 */
    --color-bone-white: #f3ecd8;  /* 文本、主字色 */
    
    /* 字型定義 */
    --font-header: 'Cinzel', 'Noto Serif TC', serif;
    --font-body: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
}

/* 基礎重設與全域樣式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--color-charcoal);
    color: var(--color-bone-white);
    font-family: var(--font-body);
    line-height: 1.6;
}

body {
    background-color: var(--color-charcoal);
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(232, 161, 58, 0.08) 0%, transparent 60%),
        linear-gradient(rgba(26, 20, 16, 0.97), rgba(26, 20, 16, 0.99));
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 網頁容器 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 標題樣式 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    color: var(--color-light-brass);
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* 經典雙線黃銅邊框 */
.brass-border {
    border: 3px double var(--color-brass);
    outline: 1px solid rgba(217, 183, 121, 0.2);
    outline-offset: -6px;
    padding: 20px;
    background-color: var(--color-dark-brown);
    position: relative;
    border-radius: 4px;
}

/* 轉角黃銅裝飾件 */
.brass-corner::before,
.brass-corner::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-light-brass);
    pointer-events: none;
    z-index: 2;
}
.brass-corner::before {
    top: 2px;
    left: 2px;
    border-right: none;
    border-bottom: none;
}
.brass-corner::after {
    bottom: 2px;
    right: 2px;
    border-left: none;
    border-top: none;
}

/* 羊皮紙面板樣式 (用於法律條款或信號便卡) */
.parchment-panel {
    background-color: var(--color-paper);
    background-image: url('assets/textures/parchment_bg.png');
    color: #3d2f21; /* 深褐色文字 */
    border: 2px solid #b08d57;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.5),
        inset 0 0 40px rgba(139, 107, 72, 0.15);
    border-radius: 4px;
    padding: 30px;
    position: relative;
}

/* 導覽列 */
header {
    background-color: rgba(26, 20, 16, 0.95);
    border-bottom: 2px solid var(--color-brass);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--color-brass);
    background-color: var(--color-dark-brown);
    object-fit: cover;
}

.logo-text h1 {
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--color-light-brass);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--color-amber);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: var(--color-bone-white);
    font-family: var(--font-header);
    font-size: 0.95rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav a:hover, nav a.active {
    color: var(--color-light-brass);
    text-shadow: 0 0 8px rgba(232, 161, 58, 0.5);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--color-amber);
    transition: width 0.3s ease, left 0.3s ease;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
    left: 0;
}

/* 行動版選單切換按鈕 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-light-brass);
    margin: 5px 0;
    transition: 0.3s;
}

/* 英雄展演區 (Hero Section) */
.hero-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-content {
    z-index: 5;
}

.hero-badge {
    display: inline-block;
    border: 1px solid var(--color-brass);
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--color-amber);
    background-color: rgba(176, 141, 87, 0.1);
    letter-spacing: 0.15em;
    margin-bottom: 20px;
    border-radius: 2px;
    font-weight: bold;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--color-light-brass);
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.hero-title span {
    display: block;
    font-size: 1.5rem;
    color: var(--color-bone-white);
    font-family: var(--font-body);
    margin-top: 10px;
    font-weight: normal;
}

.hero-desc {
    font-size: 1.15rem;
    margin-bottom: 35px;
    color: #c7beab;
    max-width: 580px;
}

.hero-quote {
    border-left: 3px solid var(--color-seal-red);
    padding-left: 15px;
    margin: 25px 0;
    font-style: italic;
    color: var(--color-paper);
    background-color: rgba(43, 33, 24, 0.5);
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 0 4px 4px 0;
}

/* 復古黃銅按鈕與火漆章按鈕 */
.cta-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-brass {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-dark-brown), #3d2f21);
    border: 2px solid var(--color-brass);
    color: var(--color-light-brass);
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.btn-brass:hover {
    border-color: var(--color-light-brass);
    color: var(--color-bone-white);
    box-shadow: 
        0 4px 15px rgba(232, 161, 58, 0.3),
        inset 0 0 10px rgba(217, 183, 121, 0.2);
    transform: translateY(-2px);
}

.btn-brass i, .btn-brass svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

.btn-seal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--color-seal-red), #6c2d23);
    border: 2px solid #b24d3e;
    color: var(--color-bone-white);
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-seal:hover {
    background: linear-gradient(135deg, #a14537, #803429);
    border-color: #d96452;
    box-shadow: 
        0 4px 15px rgba(140, 59, 46, 0.5),
        inset 0 0 10px rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* 蠟封章裝飾圖樣 */
.wax-seal-stamp {
    width: 60px;
    height: 60px;
    background-color: var(--color-seal-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 10px rgba(0,0,0,0.5),
        inset 2px 2px 5px rgba(255,255,255,0.2),
        inset -2px -2px 5px rgba(0,0,0,0.4);
    border: 3px solid rgba(140, 59, 46, 0.8);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wax-seal-stamp::before {
    content: 'HAM';
    font-family: var(--font-header);
    color: rgba(255, 236, 212, 0.7);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.wax-seal-stamp:hover {
    transform: scale(1.05) rotate(5deg);
}

/* 英雄圖像展示盒 */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-box {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    position: relative;
    border-radius: 50%;
    border: 8px solid var(--color-dark-brown);
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.7),
        0 0 40px rgba(232, 161, 58, 0.15),
        inset 0 0 20px rgba(0,0,0,0.6);
    background-color: #120d0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image-box::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px dashed var(--color-brass);
    z-index: 1;
    animation: rotate-dashed 60s linear infinite;
}

.hero-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.8));
    transition: transform 0.5s ease;
}

.hero-image-box:hover .hero-img {
    transform: scale(1.04) translateY(-4px);
}

@keyframes rotate-dashed {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 特色區塊 */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-brass), transparent);
}

.features-section {
    padding: 80px 0;
    background-color: rgba(26, 20, 16, 0.4);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.5),
        0 0 15px rgba(217, 183, 121, 0.1);
}

.feature-icon-box {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-brass);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-charcoal);
    margin-bottom: 20px;
    color: var(--color-amber);
    box-shadow: inset 0 0 8px rgba(232, 161, 58, 0.1);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-light-brass);
}

.feature-card p {
    color: #bfae95;
    font-size: 0.95rem;
}

/* 遊戲玩法大綱/教學區 */
.gameplay-section {
    padding: 80px 0;
}

.gameplay-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.gameplay-preview {
    position: relative;
    width: 100%;
}

.app-frame {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    overflow: hidden;
    position: relative;
}

.app-frame-img {
    width: 100%;
    display: block;
    height: auto;
}

.gameplay-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.step-item {
    display: flex;
    gap: 20px;
    position: relative;
}

.step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--color-brass);
    background-color: var(--color-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    color: var(--color-amber);
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.step-info h4 {
    font-size: 1.15rem;
    margin-bottom: 6px;
    color: var(--color-light-brass);
}

.step-info p {
    color: #c0b39d;
    font-size: 0.95rem;
}

/* 聯絡我們區 (Clue Mailbox) */
.contact-section {
    padding: 80px 0;
    background-image: linear-gradient(180deg, transparent, rgba(26, 20, 16, 0.9));
}

.contact-panel {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-header {
    margin-bottom: 35px;
}

.contact-header p {
    color: #c7beab;
    max-width: 500px;
    margin: 15px auto 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.mailbox-card {
    background-color: #201812;
    border: 1px solid var(--color-brass);
    border-radius: 4px;
    padding: 20px 30px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mailbox-card:hover {
    border-color: var(--color-light-brass);
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(232, 161, 58, 0.2);
}

.mailbox-icon {
    font-size: 1.5rem;
    color: var(--color-amber);
}

.mailbox-info {
    text-align: left;
}

.mailbox-label {
    font-size: 0.75rem;
    color: #928370;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mailbox-address {
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: var(--color-light-brass);
}

/* 法律條款/常規內容頁面 (Privacy / Terms) */
.page-title-section {
    padding: 60px 0 30px;
    text-align: center;
    border-bottom: 1px dashed rgba(176, 141, 87, 0.2);
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.legal-content-wrapper {
    margin-bottom: 80px;
}

.legal-content h3 {
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(176, 141, 87, 0.3);
    padding-bottom: 5px;
}

.legal-content h3:first-of-type {
    margin-top: 0;
}

.legal-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.legal-content ul, .legal-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.legal-content li {
    margin-bottom: 8px;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-amber);
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 0.95rem;
    margin-top: 30px;
    transition: color 0.3s;
}

.back-home-link:hover {
    color: var(--color-light-brass);
}

/* 頁尾 */
footer {
    background-color: #120d0a;
    border-top: 1px solid var(--color-brass);
    padding: 40px 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-about p {
    color: #928370;
    font-size: 0.9rem;
    max-width: 500px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.footer-links-group {
    display: flex;
    gap: 20px;
}

.footer-links-group a {
    color: #928370;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links-group a:hover {
    color: var(--color-light-brass);
}

.footer-copyright {
    color: #6d5f50;
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid rgba(176, 141, 87, 0.1);
    padding-top: 20px;
}

/* RWD 響應式切換點 */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-quote {
        margin: 25px auto;
        max-width: 580px;
        text-align: left;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .gameplay-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-wrapper {
        padding: 15px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-charcoal);
        border-bottom: 2px solid var(--color-brass);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .hero-title {
        font-size: 2.3rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
}
