/* ==========================================================================
   KAREGGI MUZIK | Global & Layout Styles
   ========================================================================== */

body { 
    margin: 0; 
    background: #000; 
    overflow: hidden; 
    font-family: 'Space Mono', monospace; 
}

canvas { 
    display: block; 
    width: 100vw; 
    height: 100vh; 
    position: absolute; 
    top: 0; 
    left: 0; 
    z-index: 10;
    transition: opacity 2s ease-in-out; 
}

/* ① 背景画像：ルネサンスサロン背景 & トーン調整 */
#renaissance-bg {
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100vw; 
    height: 100vh;
    background: url('picture/Kareggi_salon.png') no-repeat center center;
    background-size: cover;
    opacity: 0; 
    transition: opacity 3s ease-in-out; 
    z-index: 1;
    filter: brightness(0.65) contrast(1.1); 
}

/* UI全体のメインコンテナ */
#link-tree {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    opacity: 0; 
    transition: opacity 2s ease 1s; 
    color: #fff; 
    z-index: 20; 
    pointer-events: none;
}

#link-tree.is-revealed { 
    opacity: 1; 
    pointer-events: auto;
}

.center-content {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    width: 90%; 
    max-width: 640px;
}

/* ==========================================================================
   ② マニフェスト & ロゴエリア（右寄せレイアウト）
   ========================================================================== */

.manifesto-container {
    width: 100%; 
    margin-bottom: 28px; 
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 右側に寄せる */
    gap: 20px;
}

.manifesto-text {
    flex: 1;
}

.manifesto-text {
    flex: 0 0 auto;               /* 幅をコンテンツにジャストフィット */
}

.manifesto-en {
    text-align: left; 
    font-size: 1.05rem; 
    font-weight: bold; 
    letter-spacing: 1px;
    color: #fff; 
    line-height: 1.6; 
    margin-bottom: 10px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* 固定ピクセルによる美しく安定した階段レイアウト */
.step-1 { padding-left: 0; }
.step-2 { padding-left: 20px; }
.step-3 { padding-left: 40px; }

/* 日本語マニフェスト：ホバー時出現 */
.manifesto-ja {
    text-align: left; 
    font-size: 0.8rem; 
    color: #e0c097; 
    letter-spacing: 1.2px;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.5s ease, transform 0.5s ease, text-shadow 0.3s ease;
}

.manifesto-container:hover .manifesto-ja {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 12px rgba(224, 192, 151, 0.6);
}

.manifesto-container:hover .manifesto-en {
    color: #e0c097;
    text-shadow: 0 0 10px rgba(224, 192, 151, 0.4);
}

/* --- ✨ ロゴ専用エフェクト --- */
.manifesto-logo-wrapper {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.manifesto-logo {
    width: 100px;
    height: auto;
    object-fit: contain;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    /* 浮遊 ＆ 黄金オーラの明滅アニメーション */
    animation: logoFloat 4s ease-in-out infinite, logoGlowPulse 3s ease-in-out infinite alternate;
}

/* ロゴホバー時の強調 */
.manifesto-container:hover .manifesto-logo {
    transform: scale(1.08) rotate(1deg);
    filter: drop-shadow(0 0 15px rgba(224, 192, 151, 0.95)) drop-shadow(0 0 30px rgba(255, 255, 255, 0.6));
}

/* アニメーション定義 */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes logoGlowPulse {
    0% {
        filter: drop-shadow(0 0 4px rgba(224, 192, 151, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(224, 192, 151, 0.75)) drop-shadow(0 0 20px rgba(224, 192, 151, 0.2));
    }
}

/* スマホ表示時のレスポンシブ最適化 */
@media (max-width: 600px) {
    .manifesto-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin-bottom: 20px;
    }
    .manifesto-text {
        width: 100%;
    }
    .manifesto-en { 
        text-align: center; 
        font-size: 0.95rem;
    }
    .manifesto-ja { 
        text-align: center; 
    }
    .step-1, .step-2, .step-3 { 
        padding-left: 0; 
    }
    .manifesto-logo { 
        width: 80px; 
    }
}

/* ==========================================================================
   ③ メニューリンク
   ========================================================================== */

.links-container {
    display: flex; 
    flex-direction: column; 
    gap: 14px; 
    width: 100%;
}

.link-item {
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    background: rgba(0, 0, 0, 0.75); 
    border: 1px solid #e0c097;
    padding: 14px 20px; 
    text-decoration: none; 
    color: #e0c097;
    text-transform: uppercase; 
    letter-spacing: 2px; 
    cursor: pointer;
    transition: all 0.3s ease; 
    backdrop-filter: blur(4px);
}

.main-title { 
    font-size: 1.15rem; 
    font-weight: bold; 
}

/* サブ情報コンテナ */
.sub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(6px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sub-title { 
    font-size: 0.75rem; 
    color: #e0c097;
    margin-top: 6px; 
    letter-spacing: 1.5px;
}

.sub-ja {
    font-size: 0.8rem;
    color: #fff;
    letter-spacing: 1px;
    font-family: sans-serif;
}

/* カードホバー時の展開 ＆ 発光 */
.link-item:hover {
    background: rgba(224, 192, 151, 0.15);
    box-shadow: 0 0 20px rgba(224, 192, 151, 0.4);
    color: #fff; 
    border-color: #fff;
}

.link-item:hover .sub-container {
    max-height: 60px;
    opacity: 1;
    transform: translateY(0);
}

.link-item:hover .sub-title {
    color: #e0c097;
}

.link-item:hover .sub-ja {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   ④ フッター
   ========================================================================== */

.footer-copy {
    position: absolute; 
    bottom: 20px; 
    font-size: 0.75rem; 
    color: rgba(255, 255, 255, 0.4); 
    letter-spacing: 1px; 
    text-align: center;
}