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

:root {
    --bg: #ffffff;
    --surface: #f8f9fa;
    --text: #111111;
    --text-muted: #666666;
    --accent: #000000; 
}

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

body {
    font-family: 'Jost', 'Noto Sans JP', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

.cursor { position: fixed !important; top: 0; left: 0; width: 10px; height: 10px; background-color: #bbbbbb !important; border-radius: 50%; pointer-events: none; z-index: 2147483647 !important; transform: translate(-50%, -50%); mix-blend-mode: difference !important; opacity: 0; }
.cursor-follower { position: fixed !important; top: 0; left: 0; width: 45px; height: 45px; border: 2px solid #bbbbbb !important; background-color: transparent !important; border-radius: 50%; pointer-events: none; z-index: 2147483646 !important; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background-color 0.3s; mix-blend-mode: difference !important; opacity: 0; }
.hover-target { cursor: none; }
.hover-target:hover ~ .cursor-follower, .cursor-follower.expand { width: 60px; height: 60px; background-color: #fff !important; border-color: transparent !important; }

body.modal-open, body.modal-open * { cursor: auto !important; }
body.modal-open .close-btn, body.modal-open a { cursor: pointer !important; }
body.modal-open .cursor, body.modal-open .cursor-follower { display: none !important; }

.top-nav { position: fixed; top: 0; left: 0; width: 100%; height: 90px; display: flex; justify-content: space-between; align-items: center; padding: 0 5vw; z-index: 100; background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); }

.nav-logo { 
    font-size: 24px; font-weight: 900; letter-spacing: 2px; color: #ffffff; white-space: nowrap;
    text-shadow: 1px 0px 0px #111111, -1px 0px 0px #111111, 0px 1px 0px #111111, 0px -1px 0px #111111, 1px 1px 0px #111111, -1px -1px 0px #111111, 1px -1px 0px #111111, -1px 1px 0px #111111, 4px 4px 0px #111111, 0px 0px 15px rgba(255, 255, 255, 0.8);
}

.nav-links { display: flex; gap: 2vw; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 700; font-size: 12px; letter-spacing: 2px; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0%; height: 2px; background: var(--text); transition: 0.3s; }
.nav-links a:hover::after { width: 100%; }
.cta-btn { padding: 12px 30px; background: var(--text); color: #fff; text-decoration: none; font-weight: 900; font-size: 11px; letter-spacing: 2px; clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%); transition: 0.3s; }
.cta-btn:hover { background: var(--accent); }

.desktop-only { display: flex; }
.mobile-only { display: none; }

.hamburger { width: 30px; height: 20px; display: flex; flex-direction: column; justify-content: space-between; z-index: 101; cursor: pointer; }
.hamburger span { display: block; width: 100%; height: 2px; background: var(--text); transition: 0.3s; }

.mini-dropdown-menu { position: fixed; top: 80px; right: 5vw; width: 220px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(0,0,0,0.1); box-shadow: 0 15px 30px rgba(0,0,0,0.1); z-index: 99; padding: 15px 0; display: flex; flex-direction: column; gap: 5px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.mini-dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-link { padding: 10px 25px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 12px; letter-spacing: 1px; transition: 0.2s; }
.dropdown-link:hover { background: var(--text); color: #fff; padding-left: 30px; }
.dropdown-link.cta-color { color: var(--accent); }

.clip-diagonal { clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%); }
.clip-edge { clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px); }

.base-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: #ffffff; z-index: -2; }
.hero-video-wrapper { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; z-index: 0; pointer-events: none; }
#bg-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; }
#scroll-container { position: relative; z-index: 10; width: 100%; }

.hero-section { position: relative; height: 150vh; display: flex; align-items: flex-start; justify-content: center; }
.hero-text-wrap { position: fixed; top: 35vh; text-align: center; z-index: 10; pointer-events: none; }
.hero-subtitle { font-size: 14px; letter-spacing: 10px; font-weight: 900; color: var(--text); margin-bottom: 20px; }

.hero-title { 
    font-size: 8vw; font-weight: 900; line-height: 1.2; letter-spacing: 2px; color: #ffffff;      
    text-shadow: 2px 0px 0px #111111, -2px 0px 0px #111111, 0px 2px 0px #111111, 0px -2px 0px #111111, 2px 2px 0px #111111, -2px -2px 0px #111111, 2px -2px 0px #111111, -2px 2px 0px #111111, 8px 8px 0px #111111, 0px 0px 30px rgba(255, 255, 255, 0.8), 0px 0px 50px rgba(255, 255, 255, 0.4); 
}

.panel { padding: 15vh 5vw; position: relative; z-index: 5; overflow: hidden; }
.content-wrap { position: relative; z-index: 1; max-width: 1300px; margin: 0 auto; }

.section-header { margin-bottom: 60px; display: flex; align-items: baseline; gap: 20px; border-bottom: 3px solid #eee; padding-bottom: 20px; }
.sec-num { font-size: 24px; font-weight: 900; color: var(--accent); transition: color 0.5s; line-height: 1; }

.section-title { 
    font-size: 3.5vw; font-weight: 900; letter-spacing: 2px; color: #ffffff; line-height: 1; 
    text-shadow: 2px 0px 0px #111111, -2px 0px 0px #111111, 0px 2px 0px #111111, 0px -2px 0px #111111, 2px 2px 0px #111111, -2px -2px 0px #111111, 2px -2px 0px #111111, -2px 2px 0px #111111, 6px 6px 0px #111111, 0px 0px 20px rgba(255, 255, 255, 0.8);
}

.guide-text { display: none; }
.accent-text { color: var(--accent); transition: color 0.5s; }

.glass-panel { background: rgba(255,255,255,0.85); backdrop-filter: blur(15px); border: 1px solid rgba(0,0,0,0.05); padding: 50px; box-shadow: 0 20px 50px rgba(0,0,0,0.05); font-size: 1rem; line-height: 1.8; font-weight: 400; }
.glass-panel strong { font-weight: 900; border-bottom: 3px solid var(--accent); transition: border-color 0.5s; }

.split-text-target { line-height: 1.8; position: relative; }
.fly-char { display: inline-block; transition: color 0.3s; will-change: transform; }
.fly-char.flying { pointer-events: none; z-index: 10; }

.interactive-word { display: inline-block; font-weight: 900; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); border-bottom: 2px dashed #ccc; }
.interactive-word.bounce:hover { animation: wordBounce 0.5s infinite alternate cubic-bezier(0.2, 0.6, 0.4, 1); border-bottom-color: transparent; }
@keyframes wordBounce { 0% { transform: translateY(0) scale(1); color: #00d2ff; } 100% { transform: translateY(-12px) scale(1.15); color: #ff4d85; } }

.interactive-word.firework { position: relative; }
.interactive-word.firework::after { content: attr(data-text); position: absolute; left: 0; top: 0; color: transparent; pointer-events: none; }
.interactive-word.firework:hover { color: #f39c12; border-bottom-color: transparent; transform: scale(1.1); }
.interactive-word.firework:hover::after { animation: burst 0.8s infinite ease-out; }
@keyframes burst { 0% { text-shadow: 0 0 0 #ff4d85, 0 0 0 #0055ff, 0 0 0 #00a86b, 0 0 0 #f39c12; opacity: 1; } 100% { text-shadow: -40px -40px 10px #ff4d85, 40px -40px 10px #0055ff, -40px 40px 10px #00a86b, 40px 40px 10px #f39c12; opacity: 0; } }

.interactive-word.squash { transform-origin: bottom center; }
.interactive-word.squash:hover { transform: scaleY(0.4) scaleX(1.4); color: #00a86b; border-bottom-color: transparent; }

.services-grid, .works-grid, .events-grid, .members-grid { display: grid; gap: 40px; grid-template-columns: repeat(3, 1fr); }
.service-card, .work-card, .event-card, .member-card { background: #fff; transition: 0.4s; border: 1px solid #eee; box-shadow: 0 10px 30px rgba(0,0,0,0.03); }
.event-card { display: block; text-decoration: none; color: inherit; }
.service-card { padding: 50px 40px; }
.work-info, .event-info, .member-info { padding: 30px; }
.service-card:hover, .work-card:hover, .event-card:hover, .member-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: var(--accent); }

.cat-tag { font-size: 11px; font-weight: 900; letter-spacing: 2px; color: #888; display: block; margin-bottom: 20px; }
.service-card h3, .work-info h4, .event-info h4, .member-info h3 { font-size: 1.6rem; font-weight: 900; margin-bottom: 15px; }
.work-img-ph, .event-img-ph, .member-silhouette { width: 100%; height: 250px; background: #eee; display: flex; align-items: center; justify-content: center; font-weight: 900; letter-spacing: 2px; color: #aaa; transition: 0.4s; position: relative; overflow: hidden; }
.work-card:hover .work-img-ph, .event-card:hover .event-img-ph { background: var(--accent); color: #fff; }
.member-silhouette::after { display: none !important; }
.click-hint { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 10px; opacity: 0; transition: 0.3s; transform: translateX(-10px); }
.service-card:hover .click-hint, .work-card:hover .click-hint, .event-card:hover .click-hint, .member-card:hover .click-hint { opacity: 1; transform: translateX(0); }

.news-list { display: flex; flex-direction: column; gap: 15px; }
.news-item { display: flex; align-items: center; padding: 25px 30px; background: #fff; border: 1px solid #eee; text-decoration: none; color: var(--text); transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.02); }
.news-item:hover { transform: translateX(10px); border-color: var(--accent); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.news-date { font-weight: 900; color: #888; font-size: 14px; width: 120px; }
.news-cat { display: inline-block; padding: 5px 15px; background: #eee; font-size: 10px; font-weight: 900; letter-spacing: 1px; margin-right: 20px; transition: 0.3s; }
.news-item:hover .news-cat { background: var(--accent); color: #fff; }
.news-title { font-weight: 700; font-size: 1.1rem; }

.note-grid { display: grid; gap: 40px; grid-template-columns: repeat(2, 1fr); }
.note-card { background: #fff; padding: 40px; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: 0.4s; border: 1px solid #eee; border-left: 5px solid #000; }
.note-card:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.note-date { font-weight: 700; font-size: 14px; margin-bottom: 15px; opacity: 0.7; }
.note-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 30px; }
.note-arrow { margin-top: auto; align-self: flex-end; font-size: 24px; font-weight: 900; transition: 0.3s; }
.note-card:hover .note-arrow { transform: translateX(10px); }

.primary-btn { display: inline-block; padding: 20px 45px; background: var(--text); color: #fff; text-decoration: none; font-weight: 900; font-size: 14px; letter-spacing: 2px; transition: 0.3s; border: 2px solid var(--text); }
.primary-btn:hover { background: var(--bg); color: var(--text); }

.game-start-btn { display: inline-flex; align-items: center; gap: 15px; font-size: 1.8rem; font-weight: 900; color: #111111; text-decoration: none; letter-spacing: 6px; animation: game-glow 1.5s infinite ease-in-out; }
.game-start-btn::before { content: '▶'; font-size: 1.2rem; color: #00a86b; }
.game-start-btn::after { content: '◀'; font-size: 1.2rem; color: #00a86b; }
@keyframes game-glow { 0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(0, 168, 107, 0.8), 0 0 20px rgba(0, 168, 107, 0.4); } 50% { opacity: 0.5; text-shadow: 0 0 5px rgba(0, 168, 107, 0.3); } }

.footer { text-align: center; padding: 60px 20px; font-weight: 700; font-size: 12px; color: #888; border-top: 1px solid #eee; background: #fff; position: relative; z-index: 5; }
.company-info-footer { margin-bottom: 40px; font-size: 14px; line-height: 2; color: #111; display: inline-block; text-align: left; }
.company-info-footer p { margin-bottom: 15px; display: flex; align-items: baseline; gap: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.company-info-footer span { font-weight: 900; color: #aaa; font-size: 11px; letter-spacing: 2px; width: 80px; flex-shrink: 0; }
.copyright { letter-spacing: 1px; margin-top: 20px; }

/* ========================================== */
/* ★ ポップアップ（モーダル）のスタイルを大幅改善 ★ */
/* 全体サイズを制限し、テキストのみスクロール可能にする */
/* ========================================== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(255,255,255,0.85); backdrop-filter: blur(5px); z-index: 1000; display: flex; align-items: center; justify-content: center; visibility: hidden; opacity: 0; perspective: 1200px; }
.modal-bg-accent { position: absolute; top: 0; left: -150%; width: 200%; height: 100%; transform: skewX(-15deg); z-index: 1001; opacity: 0.85; }

.modal-content { 
    background: #fff; width: 90%; max-width: 900px; padding: 40px; 
    z-index: 1002; position: relative; box-shadow: 0 40px 100px rgba(0,0,0,0.2); 
    border: 2px solid #111; visibility: hidden; 
    /* 高さを画面内に収め、縦並びにする */
    display: flex; flex-direction: column; 
    max-height: 90vh; 
}

.modal-cat-tag { 
    display: inline-block; padding: 5px 15px; background: #111; color: #fff; font-weight: 900; 
    font-size: 12px; letter-spacing: 2px; margin-bottom: 15px; 
    align-self: flex-start; flex-shrink: 0; /* 縮めない */
}

.close-btn { 
    position: absolute; top: 15px; right: 15px; background: #111; color: #fff; border: none; 
    padding: 10px 20px; font-weight: 900; font-family: 'Jost'; 
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%); z-index: 10; 
}
.close-btn:hover { background: var(--accent); }

.modal-visual-ph { 
    width: 100%; 
    height: 30vh; min-height: 150px; max-height: 300px; /* ★画像を横長に抑える設定★ */
    background: #eee; display: flex; align-items: center; justify-content: center; 
    color: #aaa; font-weight: 900; letter-spacing: 4px; margin-bottom: 20px; 
    border: 1px solid #ddd; overflow: hidden; flex-shrink: 0; 
}

.modal-title { 
    font-size: 2rem; font-weight: 900; margin-bottom: 15px; color: #111; flex-shrink: 0; 
}

/* ★ テキストエリアをスクロール可能に設定 ★ */
.modal-desc { 
    font-size: 1rem; line-height: 1.6; color: #444; font-weight: 400; 
    overflow-y: auto; /* はみ出たらスクロール */
    padding-right: 10px; /* スクロールバーが被らないように余白 */
}

.hero-video { width: 60vw; height: 35vw; object-fit: cover; box-shadow: 0 40px 80px rgba(0,0,0,0.3); }
.work-img-ph img, .event-img-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.work-card:hover .work-img-ph img, .event-card:hover .event-img-ph img { transform: scale(1.05); }


/* ========================================== */
/* ★ レスポンシブ（スマホ・幅縮小時の制御） ★ */
/* ========================================== */
@media (max-width: 900px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    
    .section-title { font-size: 4.5vw; letter-spacing: 1px; }
    
    .glass-panel { padding: 35px 20px; font-size: 14px; line-height: 1.6; }
    .split-text-target { line-height: 1.6; }

    .services-grid, .works-grid, .events-grid, .members-grid, .note-grid { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; align-items: flex-start; gap: 10px; }
    .news-date { width: auto; }

    /* ★ スマホ時のポップアップのさらなる最適化 ★ */
    .modal-content { padding: 30px 20px; max-height: 85vh; }
    .modal-cat-tag { margin-top: 15px; } /* CLOSEボタンとの被り防止 */
    .modal-visual-ph { height: 25vh; margin-bottom: 15px; } /* さらに横長に */
    .modal-title { font-size: 1.5rem; margin-bottom: 10px; }
    .modal-desc { font-size: 0.9rem; line-height: 1.5; } /* 文字を小さく、行間を詰める */
    .close-btn { top: 10px; right: 10px; padding: 8px 15px; font-size: 10px; }
}

@media (max-width: 600px) { 
    .company-info-footer p { flex-direction: column; gap: 5px; } 
    .section-title { font-size: 1.2rem; }
}