/* 日本中性色調首頁樣式 */

/* 色彩變數 */
:root {
    --gofun: #F0EAD6;          /* 胡粉 - 主背景色 */
    --shironeri: #F2EDE4;      /* 白練 - 次要背景色 */
    --shironezumi: #B4B4B4;    /* 白鼠 - 中性灰 */
    --rikyunezumi: #9B9B7F;    /* 利休鼠 - 溫暖灰褐 */
    --ginnezumi: #A5A5A5;      /* 銀鼠 - 銀灰色 */
    --sunezumi: #BDBDBD;       /* 素鼠 - 淺中性灰 */
    --nibi: #7D7D7D;           /* 鈍 - 柔和鴿灰 */
    --sumi: #1C1C1C;           /* 墨 - 深黑色文字 */
}

/* 全域設定 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--gofun);
    color: var(--sumi);
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 英雄區域 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gofun) 0%, var(--shironeri) 50%, var(--shironezumi) 100%);
    overflow: hidden;
}

/* 神秘大門樣式 */
.mystical-gate {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: visible;
}

.mystical-gate:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.gate-svg {
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(125, 125, 125, 0.3));
    transition: all 0.5s ease;
}

.gate-svg:hover {
    filter: drop-shadow(0 15px 40px rgba(155, 155, 127, 0.4));
}

/* 大門門板動畫 */
.gate-door {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* 封印元素 */
.seal-element {
    transition: all 0.6s ease;
}

.seal-text {
    font-family: 'Noto Sans TC', serif;
    letter-spacing: 0.1em;
}

.rune-text {
    font-family: 'Noto Sans TC', serif;
    font-weight: bold;
    letter-spacing: 0.05em;
}

/* 點擊提示 */
.gate-hint {
    margin-top: 2rem;
    text-align: center;
    color: var(--rikyunezumi);
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

.hint-arrow {
    font-size: 2rem;
    color: var(--nibi);
    animation: bounce 1.5s infinite;
    margin-top: 0.5rem;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 大門打開狀態 */
.gate-opening #gate-left {
    transform: rotateY(-120deg) translateX(-50px);
    opacity: 0.3;
}

.gate-opening #gate-right {
    transform: rotateY(120deg) translateX(50px);
    opacity: 0.3;
}

.gate-opening .seal-element {
    opacity: 0;
    transform: scale(0.5) rotate(180deg);
}

.gate-opening .gate-svg {
    filter: drop-shadow(0 0 50px rgba(240, 234, 214, 0.8)) 
            drop-shadow(0 0 100px rgba(155, 155, 127, 0.6));
}

/* 大門完全開啟後隱藏 */
.gate-opened {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* 門後內容 */
.hero-content.gate-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.8) !important;
    z-index: 5;
    text-align: center;
    width: 90vw !important;
    max-width: 800px !important;
    padding: 2rem;
    background: rgba(240, 234, 214, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 25px;
    box-shadow: 0 25px 80px rgba(157, 155, 127, 0.3);
    border: 2px solid rgba(189, 189, 189, 0.4);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

/* Three.js 3D 背景容器 */
#three-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3;
}

/* 粒子動畫 */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--rikyunezumi);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite linear;
}

.particle:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.particle:nth-child(3) {
    top: 80%;
    left: 40%;
    animation-delay: -10s;
    animation-duration: 25s;
}

.particle:nth-child(4) {
    top: 30%;
    left: 70%;
    animation-delay: -15s;
    animation-duration: 18s;
}

.particle:nth-child(5) {
    top: 50%;
    left: 10%;
    animation-delay: -8s;
    animation-duration: 22s;
}

@keyframes float {
    0% { 
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-100px) translateX(50px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-200px) translateX(-30px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-150px) translateX(80px) rotate(270deg);
        opacity: 0.6;
    }
    100% { 
        transform: translateY(-300px) translateX(0) rotate(360deg);
        opacity: 0.2;
    }
}

/* 英雄內容 */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    background: rgba(240, 234, 214, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(157, 155, 127, 0.2);
    border: 1px solid rgba(189, 189, 189, 0.3);
}

.hero-title {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--sumi);
    letter-spacing: 0.1em;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--rikyunezumi), var(--ginnezumi));
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--nibi);
    opacity: 0;
    transform: translateY(30px);
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--rikyunezumi);
    opacity: 0;
    transform: translateY(30px);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
}

.btn-primary, .btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--rikyunezumi), var(--nibi));
    color: var(--gofun);
    box-shadow: 0 8px 25px rgba(155, 155, 127, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(155, 155, 127, 0.4);
}

.btn-secondary {
    background: rgba(189, 189, 189, 0.1);
    color: var(--sumi);
    border: 2px solid var(--sunezumi);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(189, 189, 189, 0.2);
    border-color: var(--rikyunezumi);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(189, 189, 189, 0.3);
}

/* 區段容器 */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 300;
    text-align: center;
    color: var(--sumi);
    margin-bottom: 4rem;
    position: relative;
    letter-spacing: 0.05em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--rikyunezumi), var(--ginnezumi));
    border-radius: 2px;
}

/* 功能特色區域 */
.features-section {
    padding: 6rem 0;
    background: var(--shironeri);
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, var(--gofun) 0%, var(--shironeri) 100%);
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.4);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(189, 189, 189, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rikyunezumi), var(--ginnezumi));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(155, 155, 127, 0.15);
    background: rgba(255, 255, 255, 0.6);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: grayscale(30%);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--sumi);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.feature-card p {
    color: var(--rikyunezumi);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* 時間軸展示區域 */
.timeline-showcase {
    padding: 6rem 0;
    background: var(--gofun);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
}

/* 時間軸卡片 */
.timeline-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(189, 189, 189, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.timeline-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 70px rgba(155, 155, 127, 0.2);
}

.timeline-card.featured {
    grid-column: span 2;
    border: 2px solid var(--rikyunezumi);
}

.timeline-card.upcoming {
    opacity: 0.7;
}

.card-header {
    padding: 1rem 2rem;
    background: rgba(155, 155, 127, 0.1);
    border-bottom: 1px solid rgba(189, 189, 189, 0.2);
    display: flex;
    justify-content: flex-end;
}

.card-status {
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-status.available {
    background: linear-gradient(135deg, var(--rikyunezumi), var(--nibi));
    color: var(--gofun);
}

.card-status.upcoming {
    background: var(--sunezumi);
    color: var(--sumi);
}

.card-content {
    padding: 2.5rem;
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--sumi);
    margin-bottom: 1.2rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.card-description {
    color: var(--rikyunezumi);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(240, 234, 214, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(189, 189, 189, 0.2);
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: var(--nibi);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.meta-value {
    display: block;
    font-size: 1.1rem;
    color: var(--sumi);
    font-weight: 600;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--rikyunezumi), var(--nibi));
    color: var(--gofun);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-link::after {
    content: '→';
    transition: transform 0.3s;
}

.card-link:hover::after {
    transform: translateX(5px);
}

.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(155, 155, 127, 0.3);
}

/* CTA 區域 */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--shironeri) 0%, var(--shironezumi) 100%);
    text-align: center;
    position: relative;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--sumi);
    letter-spacing: 0.02em;
}

.cta-content p {
    font-size: 1.3rem;
    color: var(--rikyunezumi);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.btn-primary.large {
    padding: 1.5rem 3rem;
    font-size: 1.2rem;
}

/* 頁腳 */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: var(--nibi);
}

.footer-section h3,
.footer-section h4 {
    color: var(--gofun);
    font-weight: 500;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section ul {
    color: var(--sunezumi);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.7rem;
}

.footer-section ul li a {
    color: var(--sunezumi);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--gofun);
}

.footer-section ul li a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.footer-bottom {
    border-top: 1px solid rgba(189, 189, 189, 0.2);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: var(--sunezumi);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem;
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .section-container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .timeline-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-card.featured {
        grid-column: span 1;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .card-meta {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content.gate-content {
        width: 95vw !important;
        max-width: none !important;
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
}