/* 
   ==========================================================================
   火腿偵探旅社 (Detective Ham Lodge) - 官方網站專用樣式表
   視覺風格：明亮多汁火腿風 (Bright Juicy Ham Theme) — 100% 契合 App「火腿」佈景配色
   ========================================================================== 
*/

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

:root {
    /* 契合火腿 App 佈景配色的 Palette */
    --color-charcoal: #FFF8F2;    /* 主頁面最底層背景 (柔和溫暖蜜乳白) */
    --color-dark-brown: #FFF1E0;  /* 網頁主區塊背景 (蜜橘奶油底) */
    --color-brass: #E8792C;       /* 線條與邊框主色 (火腿橘金) */
    --color-light-brass: #7A3B12; /* 大標題與重度強調色 (焦糖深棕) */
    --color-amber: #B5652E;       /* 次要標題、文字與亮面 (火腿肉棕橘) */
    --color-paper: #FFE0BD;       /* 羊皮紙/卡片面板底色 (淺火腿橘) */
    --color-seal-red: #D44527;    /* 蠟封章與點睛色 (鮮美火腿肉紅) */
    --color-bone-white: #4E250A;  /* 一般內文的主字色 (濃郁焦糖黑褐，在淺色底上有極高對比) */
    --color-highlight: #FFD8A8;   /* 懸停高亮色 (焦糖高光橘) */
    --color-nav-bg: #FFC98A;      /* 導覽列底色 (暖陽焦糖亮橘) */
    
    /* 字型定義 */
    --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(255, 201, 138, 0.25) 0%, transparent 60%),
        linear-gradient(rgba(255, 248, 242, 0.98), rgba(255, 241, 224, 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.03em;
    font-weight: 700;
}

/* 經典雙線火腿橘金邊框 */
.brass-border {
    border: 3px double var(--color-brass);
    outline: 1px solid rgba(232, 121, 44, 0.2);
    outline-offset: -6px;
    padding: 25px;
    background-color: var(--color-dark-brown);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(122, 59, 18, 0.06);
}

/* 轉角裝飾件 */
.brass-corner::before,
.brass-corner::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-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');
    background-blend-mode: multiply;
    color: #4E250A; /* 深焦糖褐文字 */
    border: 2px solid var(--color-brass);
    box-shadow: 
        0 6px 20px rgba(122, 59, 18, 0.08),
        inset 0 0 30px rgba(232, 121, 44, 0.05);
    border-radius: 6px;
    padding: 35px;
    position: relative;
}

/* 導覽列 */
header {
    background-color: rgba(255, 248, 242, 0.96);
    border-bottom: 2px solid var(--color-brass);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 15px rgba(122, 59, 18, 0.05);
}

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

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

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

.logo-text h1 {
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--color-light-brass);
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--color-amber);
    letter-spacing: 0.08em;
    font-weight: bold;
}

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;
    font-weight: 700;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav a:hover, nav a.active {
    color: var(--color-brass);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-brass);
    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: 70px 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 14px;
    font-size: 0.8rem;
    color: var(--color-light-brass);
    background-color: rgba(232, 121, 44, 0.08);
    letter-spacing: 0.12em;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--color-light-brass);
}

.hero-title span {
    display: block;
    font-size: 1.45rem;
    color: var(--color-amber);
    font-family: var(--font-body);
    margin-top: 10px;
    font-weight: 700;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 35px;
    color: var(--color-bone-white);
    max-width: 580px;
}

.hero-quote {
    border-left: 4px solid var(--color-seal-red);
    padding-left: 15px;
    margin: 25px 0;
    font-style: normal;
    color: var(--color-light-brass);
    background-color: rgba(255, 224, 189, 0.4);
    padding-top: 12px;
    padding-bottom: 12px;
    border-radius: 0 6px 6px 0;
    font-weight: 500;
}

/* 蜜橘奶油按鈕與鮮美火腿紅按鈕 */
.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), var(--color-paper));
    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: 6px;
    box-shadow: 0 3px 8px rgba(122, 59, 18, 0.08);
    transition: all 0.25s ease;
}

.btn-brass:hover {
    background: var(--color-paper);
    border-color: var(--color-brass);
    color: var(--color-light-brass);
    box-shadow: 0 5px 12px rgba(232, 121, 44, 0.15);
    transform: translateY(-1px);
}

.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), #b9371c);
    border: 2px solid #e15537;
    color: #FFF8F2;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(212, 69, 39, 0.15);
    transition: all 0.25s ease;
}

.btn-seal:hover {
    background: linear-gradient(135deg, #e15537, var(--color-seal-red));
    box-shadow: 0 6px 15px rgba(212, 69, 39, 0.25);
    transform: translateY(-1px);
}

/* 蠟封章裝飾圖樣 */
.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 12px rgba(212, 69, 39, 0.15),
        inset 2px 2px 5px rgba(255,255,255,0.25),
        inset -2px -2px 5px rgba(0,0,0,0.15);
    border: 3px solid rgba(255, 255, 255, 0.15);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wax-seal-stamp::before {
    content: 'HAM';
    font-family: var(--font-header);
    color: rgba(255, 248, 242, 0.9);
    font-size: 0.85rem;
    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: 350px;
    position: relative;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 列車出發：長方形外框，純貼圖無圓形 */
.app-frame {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(122, 59, 18, 0.08);
    background-color: var(--color-dark-brown);
}

.hero-img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(122, 59, 18, 0.1));
    transition: transform 0.4s ease;
}

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

/* 長方形虛線會跑 (marching ants) */
.dashed-frame {
    animation: march-dash 0.9s linear infinite;
}

@keyframes march-dash {
    to { stroke-dashoffset: -20; }
}

/* 特色區塊 */
.section-title {
    text-align: center;
    font-size: 2.1rem;
    margin-bottom: 45px;
    position: relative;
    padding-bottom: 18px;
    color: var(--color-light-brass);
}

.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: 75px 0;
    background-color: rgba(255, 241, 224, 0.5);
}

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

.feature-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 2px solid var(--color-brass);
    background-color: var(--color-dark-brown);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 20px rgba(122, 59, 18, 0.08),
        0 0 10px rgba(232, 121, 44, 0.05);
}

.feature-icon-box {
    width: 54px;
    height: 54px;
    border: 2px solid var(--color-brass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-paper);
    margin-bottom: 20px;
    color: var(--color-brass);
}

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

.feature-card p {
    color: var(--color-bone-white);
    font-size: 0.95rem;
}

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

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

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

.app-frame {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(122, 59, 18, 0.08);
    overflow: hidden;
    position: relative;
    border: 3px solid var(--color-brass);
}

.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: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--color-brass);
    background-color: var(--color-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    color: var(--color-light-brass);
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(122, 59, 18, 0.05);
}

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

.step-info p {
    color: var(--color-bone-white);
    font-size: 0.95rem;
}

/* 聯絡我們區 (Clue Mailbox) */
.contact-section {
    padding: 75px 0;
}

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

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

.contact-header p {
    color: var(--color-bone-white);
    max-width: 520px;
    margin: 15px auto 0;
}

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

.mailbox-card {
    background-color: var(--color-dark-brown);
    border: 2px solid var(--color-brass);
    border-radius: 6px;
    padding: 18px 28px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(122, 59, 18, 0.04);
    text-decoration: none;
    transition: all 0.25s ease;
}

.mailbox-card:hover {
    background-color: var(--color-paper);
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(232, 121, 44, 0.1);
}

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

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

.mailbox-label {
    font-size: 0.75rem;
    color: var(--color-amber);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold;
}

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

/* 法律條款/常規內容頁面 (Privacy / Terms) */
.page-title-section {
    padding: 50px 0 25px;
    text-align: center;
    border-bottom: 1px dashed rgba(232, 121, 44, 0.2);
    margin-bottom: 35px;
}

.page-title {
    font-size: 2.6rem;
    margin-bottom: 12px;
}

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

.legal-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(232, 121, 44, 0.25);
    padding-bottom: 6px;
    color: var(--color-light-brass);
}

.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-brass);
    text-decoration: none;
    font-family: var(--font-header);
    font-size: 0.95rem;
    margin-top: 30px;
    transition: color 0.3s;
    font-weight: bold;
}

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

/* 頁尾 */
footer {
    background-color: var(--color-paper);
    border-top: 2px solid var(--color-brass);
    padding: 35px 0;
    margin-top: auto;
}

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

.footer-about h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--color-light-brass);
}

.footer-about p {
    color: var(--color-bone-white);
    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: var(--color-bone-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    font-weight: 500;
}

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

.footer-copyright {
    color: var(--color-amber);
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid rgba(232, 121, 44, 0.15);
    padding-top: 20px;
    font-weight: 500;
}

/* ==========================================================================
   LINE 專屬偵探助手區塊樣式
   ========================================================================== */
.line-section {
    padding: 50px 0 30px;
    position: relative;
}

.line-panel {
    max-width: 600px;
    margin: 0 auto;
    padding: 35px;
    text-align: center;
}

.line-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

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

.line-badge {
    display: inline-block;
    border: 1px solid var(--color-brass);
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--color-light-brass);
    background-color: rgba(232, 121, 44, 0.08);
    letter-spacing: 0.12em;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: bold;
}

.line-title {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--color-light-brass);
}

.line-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--color-bone-white);
    line-height: 1.6;
}

.line-cta {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #1f9e4f, #147a3a) !important;
    border: 2px solid #2db35e !important;
    color: #FFF8F2 !important;
    font-family: var(--font-header) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(20, 122, 58, 0.15);
    transition: all 0.25s ease;
}

.btn-line:hover {
    background: linear-gradient(135deg, #2db35e, #1f9e4f) !important;
    box-shadow: 0 6px 15px rgba(20, 122, 58, 0.25);
    transform: translateY(-1px);
}

.line-icon-svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
}

.line-qrcode-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.line-qrcode-wrapper {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--color-brass);
    box-shadow: 0 4px 12px rgba(122, 59, 18, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    transition: transform 0.3s ease;
}

.line-qrcode-wrapper:hover {
    transform: scale(1.05);
}

.line-qrcode-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 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) {
    .line-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .line-content {
        text-align: center;
    }
    
    .line-cta {
        justify-content: center;
    }

    .nav-wrapper {
        padding: 12px 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(122, 59, 18, 0.05);
    }
    
    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;
    }
}
