/* --- 基本設定 & 変数 --- */
:root {
    --main-bg-color: #121212;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --surface-color: #1e1e1e;
    --font-family-jp: 'Noto Sans JP', sans-serif;
    --font-family-en: 'Poppins', sans-serif;
}

/* ▼▼▼ 追加: ボックスサイズの計算方法を統一 ▼▼▼ */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
/* ▲▲▲ 追加 ▲▲▲ */


html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--main-bg-color);
    color: var(--text-color);
    font-family: var(--font-family-jp);
    line-height: 1.8;
    cursor: none;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}


a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: white;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 40px;
    position: relative;
    z-index: 5;
}

.section-title {
    font-family: var(--font-family-en);
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    letter-spacing: 0.1em;
    color: white;
}

/* --- インタラクティブ要素 --- */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    left: 0;
    top: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, opacity 0.3s;
    z-index: 9999;
    opacity: 0;
}
body:hover .cursor {
    opacity: 1;
}
.cursor.hover-effect {
    width: 50px;
    height: 50px;
    background-color: rgba(187, 134, 252, 0.2);
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    transition: transform 0.2s ease-out;
}

/* --- ヘッダー --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
}
.header-logo {
    font-family: var(--font-family-en);
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    position: relative;
    z-index: 1001; /* メニューより手前に */
}

.header-nav-pc {
    display: flex;
    align-items: center;
    gap: 30px;
}
.header-nav-pc a {
    font-family: var(--font-family-en);
    font-weight: 400;
    color: white;
    white-space: nowrap;
}

/* --- ハンバーガーメニューとモバイルメニューのスタイル --- */
.hamburger-menu {
    display: none; /* PCでは非表示 */
    position: relative;
    z-index: 1001; /* メニューより手前に */
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.hamburger-menu span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: white;
    transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { top: 18px; }

/* メニューが開いた時のハンバーガーアイコン（×印に） */
.hamburger-menu.is-active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.hamburger-menu.is-active span:nth-child(2) { opacity: 0; }
.hamburger-menu.is-active span:nth-child(3) { top: 9px; transform: rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-menu.is-active {
    opacity: 1;
    visibility: visible;
}
.mobile-menu-nav a {
    display: block;
    color: white;
    font-family: var(--font-family-en);
    font-size: 2rem;
    padding: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
/* メニューが開いた時にリンクをアニメーション表示 */
.mobile-menu.is-active .mobile-menu-nav a {
    opacity: 1;
    transform: translateY(0);
}
/* リンクのアニメーションを順番にずらす */
.mobile-menu.is-active .mobile-menu-nav a:nth-child(1) { transition-delay: 0.2s; }
.mobile-menu.is-active .mobile-menu-nav a:nth-child(2) { transition-delay: 0.3s; }
.mobile-menu.is-active .mobile-menu-nav a:nth-child(3) { transition-delay: 0.4s; }
.mobile-menu.is-active .mobile-menu-nav a:nth-child(4) { transition-delay: 0.5s; }


/* --- ヒーローセクション --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: -5%; left: -5%;
    width: 110%;
    height: 110%;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    transition: transform 0.2s ease-out;
}
.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    transition: transform 0.2s ease-out;
}
.hero-title {
    font-family: var(--font-family-jp);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    overflow: hidden;
}
.hero-title span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out 0.8s, transform 1s ease-out 0.8s;
}
body.is-loaded .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* --- スクロールアニメーション --- */
.anim-scroll-fade {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.anim-scroll-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- About セクション --- */
.about-section {
    display: flex;
    align-items: center;
    gap: 80px;
}
.about-content {
    flex: 1.5;
}
.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg);
    box-shadow: -10px 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.5s ease;
}
.about-image:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.05);
}

/* --- Video セクション --- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.video-card {
    background-color: var(--surface-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.4);
}
.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.video-card-title {
    padding: 20px;
    font-weight: 700;
    color: var(--text-color);
}

/* --- Gallery セクション --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
}
.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-item:nth-child(3n+1) { grid-row: span 1; }
.gallery-item:nth-child(4n+2) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(5n+3) { grid-row: span 2; }


/* --- Contact セクション --- */
.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.contact-message {
    text-align: center;
    margin-bottom: 40px;
}
.contact-form-wrapper input,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background-color: var(--main-bg-color);
    border: 1px solid #444;
    border-radius: 5px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}
.contact-button {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: black;
    border: none;
    border-radius: 5px;
    font-family: var(--font-family-jp);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.contact-button:hover {
    background-color: white;
    transform: scale(1.02);
}

/* --- フッター --- */
.footer {
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid #333;
}
.footer-social {
    margin-bottom: 20px;
}
.footer-social a {
    margin: 0 15px;
    font-family: var(--font-family-en);
}
.footer-copy {
    font-size: 0.9rem;
    color: #888;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 800px) {
    .header {
        padding: 20px;
        mix-blend-mode: normal;
    }
    .header-nav-pc { 
        display: none;
    }
    .hamburger-menu {
        display: block;
    }

    .section-title {
        font-size: 2.2rem;
    }
    .container {
        padding: 80px 20px;
    }
    .about-section {
        flex-direction: column;
        gap: 40px;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .gallery-item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    /* ▼▼▼ 追加: スマホ表示でContactフォームの余白を調整 ▼▼▼ */
    .contact-form-wrapper {
        padding: 40px 25px;
    }
    /* ▲▲▲ 追加 ▲▲▲ */
}
