@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

/* ＝ 共通変数（整理・統合版） ＝ */
:root {
    --bg-color: #FAFAFA; /* ほんの少し温かみのある白 */
    --text-color: #111111; /* 深い黒 */
    --header-bg: rgba(255, 255, 255, 0.8);
    --border-color: #DDDDDD;
    --font-heading: 'Oswald', Impact, 'Arial Black', sans-serif;
    --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Arial, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ＝ リセット & ベース ＝ */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    cursor: none; /* マウスストーカー使用のため標準カーソルを非表示 */
}

a { 
    text-decoration: none; 
    color: inherit; 
}

/* ＝ グローバルヘッダー（PC用） ＝ */
header.global-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1.2rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.4s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--text-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

nav a {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-color);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
    transform: scaleX(0);
    transition: transform 0.3s;
}

nav a:hover::after { 
    transform: scaleX(1); 
}

/* ＝ マウスストーカー（エラー修正版） ＝ */
#mouse-stalker {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-100px, -100px); /* 初期状態で画面外に配置 */
    transition: width 0.2s ease-out, height 0.2s ease-out; /* 座標はJS、サイズのみCSSで遷移 */
    z-index: 9999;
    mix-blend-mode: difference;
}

/* ホバー時のアクティブ状態（ネストを解消し標準CSSで記述） */
#mouse-stalker.is_active {
    width: 80px;
    height: 80px;
}

/* ＝ 左右スプリットヒーローコンテンツ ＝ */
.content {
    display: flex;
    height: calc(100vh - 90px);
    margin-top: 90px; /* ヘッダーに被らないよう余白を追加 */
}

.content_left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50%;
    background: #000;
}

.content_left .link-item {
    display: block;
    padding: 20px;
    margin: 10px 0 0;
    color: #000;
    background: #fff;
    border-radius: 50px;
    text-decoration: none;
}

.content_left p {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.content_right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50%;
    background: #fff;
}

.content_right .link-item {
    display: block;
    padding: 20px;
    margin: 10px 0 0;
    color: #fff;
    background: #000;
    border-radius: 50px;
    text-decoration: none;
}

.content_right p {
    color: #000;
    font-size: 18px;
    font-weight: bold;
}

/* ＝ レイアウト・メインコンテナ ＝ */
.container { max-width: 1400px; margin: 0 auto; padding: 0 4vw 20vh; }
.container-small { max-width: 900px; margin: 0 auto; padding: 0 4vw 20vh; }

/* ＝ タイポグラフィ ＝ */
.giant-logo {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 9vw, 10rem); 
    white-space: nowrap; 
    text-align: center; 
    line-height: 0.85; 
    margin: 15vh 0 35vh; 
    letter-spacing: 0.02em; 
    position: relative; 
    z-index: 10;
}
.giant-logo.white { color: #fff; }
.giant-logo span { display: inline-block; }

.statement-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: -0.03em;
    max-width: 1000px;
    margin: 0 auto 20vh;
}

/* ＝ スプリットセクション（PC用：文字被り完全解消版） ＝ */
.split-section { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    gap: 5vw; 
    margin-bottom: 20vh; 
    width: 100%; 
}

.split-title { 
    font-family: var(--font-heading); 
    font-size: clamp(3rem, 6vw, 5.5rem); 
    width: 40%; 
    line-height: 0.9; 
    word-break: keep-all; 
    overflow-wrap: break-word;
}

.split-content { 
    width: 50%; 
    font-size: 1.1rem; 
    line-height: 2.2; 
    font-weight: 500; 
    padding-top: 0; 
}

.split-content p { margin-bottom: 2rem; }

/* ＝ エディトリアル画像（パララックス対応用） ＝ */
.editorial-image-wrap {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 20vh;
    background-color: #eee;
}

.parallax-img {
    width: 100%;
    height: 120%; 
    object-fit: cover;
    margin-top: -10%; 
    filter: grayscale(20%) contrast(1.1); 
}

/* ＝ カード & リストデザイン ＝ */
.grid-cards { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 2vw; 
    margin-bottom: 30vh; 
}

.tech-card { 
    background: #fff; 
    border: 1px solid var(--border-color); 
    padding: 60px 40px; 
    border-radius: 4px; 
    text-align: center; 
}

.tech-marquee { 
    background: #000; 
    color: #fff; 
    padding: 20px 0; 
    overflow: hidden; 
    white-space: nowrap; 
    font-family: var(--font-mono); 
    font-weight: bold; 
}

.clean-list { 
    border-top: 2px solid var(--text-color); 
    margin-top: 5vh; 
    list-style: none;
}

.clean-list a { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 3rem 0; 
    border-bottom: 1px solid #ddd; 
    text-decoration: none; 
    color: inherit; 
    transition: 0.3s; 
}

.clean-list a:hover { 
    padding-left: 2rem; 
    opacity: 0.6; 
}

.list-title {
    font-size: 1.5rem;
    font-weight: 800;
}

.list-meta {
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: #888;
}

/* ＝ お問い合わせフォーム ＝ */
.split-content input,
.split-content select,
.split-content textarea {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--text-color);
    padding: 0.8rem 0;
    font-size: 1.1rem;
    background: transparent;
    outline: none;
    border-radius: 0;
    color: var(--text-color);
}

.split-content textarea {
    resize: vertical;
    min-height: 120px;
}

.split-content input:focus,
.split-content select:focus,
.split-content textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
}

/* ＝ グローバルフッター ＝ */
.global-footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 4vw;
    margin-top: 10vh;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}
.footer-links a { margin-right: 2rem; text-decoration: none; color: inherit; transition: 0.3s; }
.footer-links a:hover { color: var(--text-color); }


/* =========================================
    MOBILE RESPONSIVE (スマホ特化版レイアウト)
========================================= */
.mobile-menu-btn, .mobile-overlay-nav { display: none; }

@media (max-width: 900px) {
    /* 1. アプリライクなヘッダー */
    .desktop-nav { display: none; }
    
    header.global-header {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 15px 5vw;
        background: rgba(250, 250, 250, 0.9);
        backdrop-filter: blur(20px);
    }

    /* 2. ハンバーガーボタン */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        z-index: 1001; 
        cursor: pointer;
    }
    .mobile-menu-btn span {
        display: block;
        width: 30px;
        height: 2px;
        background-color: var(--text-color);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        margin-left: auto;
    }
    .mobile-menu-btn.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
    .mobile-menu-btn.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); width: 30px; }

    /* 3. フルスクリーン・オーバーレイメニュー */
    .mobile-overlay-nav {
        display: flex;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100dvh; 
        background-color: var(--bg-color);
        z-index: 1000;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }
    .mobile-overlay-nav.active {
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-overlay-nav nav {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    .mobile-overlay-nav a {
        font-family: var(--font-heading);
        font-size: 3.5rem; 
        line-height: 1;
        text-decoration: none;
        color: var(--text-color);
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
    }
    .mobile-overlay-nav.active a {
        transform: translateY(0);
        opacity: 1;
    }
    .mobile-overlay-nav.active a:nth-child(1) { transition-delay: 0.1s; }
    .mobile-overlay-nav.active a:nth-child(2) { transition-delay: 0.15s; }
    .mobile-overlay-nav.active a:nth-child(3) { transition-delay: 0.2s; }
    .mobile-overlay-nav.active a:nth-child(4) { transition-delay: 0.25s; }
    .mobile-overlay-nav.active a:nth-child(5) { transition-delay: 0.3s; }

    .mobile-overlay-footer {
        position: absolute;
        bottom: 5vh;
        font-family: var(--font-mono);
        font-size: 0.8rem;
        color: #888;
    }

    /* 4. カードの縦積み対応 */
    .grid-cards {
        display: flex; 
        flex-direction: column; 
        gap: 5vw; 
        padding-bottom: 0; 
        margin-right: 0; 
        padding-right: 0; 
        overflow-x: visible; 
        scroll-snap-type: none; 
    }
    
    .tech-card {
        width: 100%; 
        min-width: 0; 
        flex-shrink: 1; 
        scroll-snap-align: none; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.04); 
    }

    /* 5. 全体のレスポンシブ微調整 */
    .content {
        flex-direction: column;
        height: auto;
    }
    .content_left, .content_right {
        width: 100%;
        padding: 60px 20px;
    }
    .container, .container-small { padding: 100px 5vw 10vh; }
    .giant-logo { font-size: clamp(2rem, 13vw, 5rem); margin: 5vh 0 10vh; }
    .split-section { flex-direction: column; gap: 1.5rem; margin-bottom: 15vh; }
    .split-title { width: 100%; font-size: clamp(2.5rem, 12vw, 4rem); }
    .split-content { width: 100%; font-size: 1.05rem; padding-top: 0; }
    .clean-list a { flex-direction: column; align-items: flex-start; padding: 1.5rem 0; gap: 1rem; }
    
    /* マウスストーカー非表示（ID名をターゲットに正しく修正） */
    #mouse-stalker { display: none !important; }
}

/* ＝ モーション軽減設定 ＝ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}