/* ==========================================
   1. Typography & Base
========================================== */
:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #888888;
    --font-serif: 'Noto Serif JP', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    position: relative;
    cursor: none; 
    overflow: hidden;
}

/* ==========================================
   2. Background Image Layer & Trigger
========================================== */
/* 背景検知レイヤー */
#bg-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* コンテンツより後ろ */
    cursor: none;
    -webkit-tap-highlight-color: transparent;
}

/* 背景画像レイヤー */
#bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ⚠️ここで画像が読み込めていないと真っ黒なままになるので拡張子(jpgかJPGか)を確認すること */
    background-image: url('image/background.jpg'); 
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 0; 
    pointer-events: none;
}

/* 【修正】PCホバー時、またはスマホで触れている間だけ画像を表示 */
#bg-trigger:hover + #bg-image,
#bg-trigger:active + #bg-image {
    opacity: 0.35;
}

/* ==========================================
   3. Custom Cursor
========================================== */
@media (pointer: fine) {
    .cursor, .cursor-follower {
        position: fixed; top: 0; left: 0;
        pointer-events: none; border-radius: 50%;
        transform: translate(-50%, -50%); z-index: 9999;
    }
    .cursor {
        width: 6px; height: 6px; background-color: #ffffff;
        transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
    }
    .cursor-follower {
        width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, 0.5);
        transition: transform 0.2s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    }
    .cursor.is-active { opacity: 0; }
    .cursor-follower.is-active {
        width: 60px; height: 60px; background-color: #ffffff;
        mix-blend-mode: difference; border: none;
    }
}
a { cursor: none; }

/* ==========================================
   4. ノイズ＆レイアウト
========================================== */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 2; 
}

.wrapper { max-width: 760px; width: 100%; margin: 0 auto; text-align: center; position: relative; z-index: 10; }

.reveal-target {
    opacity: 0; transform: translateY(20px);
    animation: revealUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

/* ==========================================
   5. Typography (Header & Text)
========================================== */
.album-header { margin-bottom: 2.5rem; }

.logo {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    margin: 0 0 10px 0;
}

.subtitle {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin: 0;
}

.instruction {
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    line-height: 1.8; 
}

/* ==========================================
   6. Square Interface (5つの枠の入り口)
========================================== */
.square-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    position: relative; z-index: 20; 
}

.square-btn {
    display: block;
    width: 80px;
    height: 80px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
}

@media (hover: hover) {
    .square-btn:hover {
        background: #ffffff;
        border-color: #ffffff;
        transform: scale(1.05);
    }
}

.square-btn:active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
}
