/**
 * layout.css
 * ヘッダー、フッター、セクションレイアウト
 */

/* HUDサイドバー (White Protocol: 高輝度ガラス) */
.header {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 70px;
    /* HUDに合わせた幅 */
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

.header-inner {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.hud-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    opacity: 0.2;
    z-index: -1;
}

.logo {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    margin-bottom: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 4px;
    -webkit-text-stroke: 1px var(--text-main);
    color: transparent;
}

/* HUDナビゲーション */
.nav {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-left: 0;
}

.nav-link {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 12px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.nav-link::after {
    /* 従来の線を小さなドットに変更 */
    display: none;
}

.nav-link::before {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.3s ease;
    box-shadow: 0 0 8px var(--primary-color);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.hud-footer-info {
    margin-top: auto;
    font-size: 0.6rem;
    opacity: 0.4;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    letter-spacing: 2px;
}

.nav-link.active {
    color: var(--primary-color);
}

/* HUDステータスノード */
.hud-status-node {
    position: fixed;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--primary-color);
    opacity: 0.6;
    pointer-events: none;
    z-index: 500;
    line-height: 1.6;
}

.node-top-left {
    top: 30px;
    left: 100px;
}

.node-bottom-right {
    bottom: 30px;
    right: 40px;
    text-align: right;
}

.hud-data-box {
    border: 1px solid var(--glass-border);
    padding: 12px;
    font-size: 0.65rem;
    margin-top: 25px;
    max-width: 200px;
    position: relative;
    background: rgba(0, 242, 255, 0.02);
}

.hud-data-box::after {
    content: 'DATA_STREAM';
    position: absolute;
    top: -8px;
    left: 8px;
    background: #000;
    padding: 0 5px;
    color: var(--primary-color);
    font-size: 0.6rem;
}

/* LINKS 巨大警告スタイル (Step 2033: オリジナル完全復旧) */
.contact-warning {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    width: 100% !important;
    text-align: center !important;
    background: transparent !important;
    /* 背景削除 */
    padding: 0 !important;
    margin: 0 !important;
}

.warning-text {
    font-size: clamp(3rem, 15vw, 12rem) !important;
    font-weight: 900 !important;
    line-height: 0.9 !important;
    color: #ff3b3b !important;
    margin: 0 !important;
    letter-spacing: -0.05em !important;
    font-family: 'Outfit', sans-serif !important;
    text-transform: uppercase !important;
}

.warning-header {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 0.8rem !important;
    color: #ff3b3b !important;
    margin-bottom: 20px !important;
    letter-spacing: 5px !important;
    opacity: 0.6 !important;
}

.warning-subtext {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 1rem !important;
    color: #ff3b3b !important;
    margin-top: 40px !important;
    padding: 5px 20px !important;
    border: 1px solid #ff3b3b !important;
    display: inline-block !important;
    letter-spacing: 2px !important;
}

.access-denied-stamp {
    position: absolute;
    bottom: 50px;
    right: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #ff3b3b;
    opacity: 0.4;
    letter-spacing: 2px;
}

/* 点滅アニメーションは維持 */
.warning-dot {
    width: 10px;
    height: 2px;
    background: #ff3b3b;
    margin-bottom: 15px;
    animation: warning-blink 0.2s infinite;
}

@keyframes warning-blink {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.2;
    }
}

/* レスポンシブ修正 */
@media (max-width: 900px) {
    .warning-text {
        font-size: 20vw;
    }
}

/* 垂直スキャンライン */
.scanning-line-v {
    position: fixed;
    top: 0;
    left: 20%;
    width: 1px;
    height: 100%;
    background: rgba(0, 242, 255, 0.03);
    animation: moveScanV 12s linear infinite;
    z-index: 100;
    pointer-events: none;
}

@keyframes moveScanV {
    0% {
        left: 0%;
    }

    100% {
        left: 100%;
    }
}

/* グリッチ・ホバー効果 */
.glitch-hover:hover {
    animation: glitchStatic 0.2s infinite;
}

@keyframes glitchStatic {
    0% {
        transform: translate(0);
    }

    25% {
        transform: translate(-1px, 1px);
        color: var(--secondary-color);
    }

    50% {
        transform: translate(1px, -1px);
        color: var(--accent-color);
    }

    75% {
        transform: translate(-1px, -1px);
    }

    100% {
        transform: translate(0);
    }
}

/* モバイルメニュー */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* メインコンテンツ */
.main-content {
    position: relative;
    height: 100vh;
    width: 100vw;
}

/* セクション（SPA切り替え型） */
.section {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    padding: 50px 0;
    opacity: 0;
    background: transparent !important;
    /* 親要素での塗りを完全に排除 */
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), transform 0.6s ease;
    z-index: 10;
    overflow-y: auto;
}

.section.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 20;
}

/* Home画面は1画面固定 (スクロール禁止) */
.section.hero,
#work,
#lab,
.contact-section {
    overflow: hidden !important;
    padding: 0 !important;
    /* フルスクリーン表示のためパディングも除去 */
}

.section-tag {
    color: var(--primary-color);
    font-size: 0.8rem;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.1;
}

.section-title-wrap {
    margin-bottom: 20px;
}

.section-title-wrap h2 {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.section-title-bg {
    font-size: 5rem;
    font-family: 'Outfit', sans-serif;
    position: absolute;
    top: 80px;
    left: 0;
    z-index: -1;
    -webkit-text-stroke: 1px rgba(0, 242, 255, 0.1);
    color: transparent;
}

/* フッター */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-tagline {
    font-weight: 700;
}

/* レスポンシブ */
@media (max-width: 900px) {
    .header-inner {
        padding: 0 24px;
        padding-left: 24px;
    }

    .main-content::before {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 40px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .system-status {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}