:root {
    --primary-color: #A8E6E6;
    --secondary-color: #003F5C;
    --background-color: #FFFFFF;
    --text-color: #1A1A1A;
    --spacing-unit: 4rem;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    padding: 1rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.05rem;  /* 0.1remからさらに縮小 */
    margin-right: auto;
}

.header-logo img {
    height: 40px;
    width: auto;
    margin-right: -0.1rem;  /* 負のマージンで微調整 */
}

.header-logo h1 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;  /* 文字間隔も微調整 */
}

.header-nav {
    display: none;
}

.main-title:not(.active) {
    display: none;
}

.subtitle:not(.active) {
    opacity: 0.5;
}

.container {
    display: grid;
    grid-template-columns: 240px 200px 1fr;
    gap: var(--spacing-unit);
    padding-top: calc(var(--spacing-unit) * 2);  /* 上部パディングを調整 */
    padding-right: 2rem;
    padding-bottom: var(--spacing-unit);
    padding-left: 2rem;
    min-height: 100vh;
    position: relative;
}

.content {
    width: 100%;
    padding-bottom: var(--spacing-unit);
}

.column {
    position: relative;
}

.main-titles, .subtitles {
    position: sticky;
    top: calc(var(--spacing-unit) * 3);  /* 全ての要素の固定位置を揃える */
    height: fit-content;
}

.main-title {
    position: relative;  /* absoluteからrelativeに変更 */
    width: 100%;
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 1rem;  /* マージンを最小限に */
    opacity: 0;
    transform: translateY(calc(-20px + var(--parallax-offset, 0px)));
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: var(--spacing-unit);
    position: absolute;
    width: 100%;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.subtitle.active {
    color: var(--secondary-color);
}

.subtitle:not(.active) {
    opacity: 0.5;
}

.visible.main-title.active {
    color: var(--secondary-color);
}

.content-section {
    margin-top: 0;
    margin-bottom: 4rem;
    opacity: 1; /* 通常は完全に表示 */
        transform: translateY(0); /* 通常時の位置 */
        transition: opacity 0.6s ease-out, transform 0.6s ease-out; /* トランジション効果 */
    }

    .content-section.fade-out {
        opacity: 1; /* フェードアウト時の透明度 */
        transform: translateY(-10px); /* 上部に少し移動するような演出 */
    }

.content-section:first-child {
    margin-top: 2rem;  /* 最初のセクションのマージン */
}

.content-section p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    padding: 0 4rem 0 2rem;
    margin-bottom: 2rem;
}

.visible {
    opacity: calc(var(--progress, 1) * var(--title-progress, 1));
    transform: 
        translateY(calc((1 - var(--progress, 1)) * 20px))
        perspective(1000px)
        rotateX(calc((1 - var(--progress, 1)) * 5deg));
}

.content-section.visible {
    opacity: 1;
}

.visible.main-title {
    transform: 
        translateY(calc(-20px * (1 - var(--progress, 1)) + var(--parallax-offset, 0px)))
}

.visible.subtitle {
    transform: 
        translateX(calc(20px * var(--subtitle-progress, 0)))
        translateY(calc(20px * (1 - var(--progress, 1))));
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--spacing-unit);
}

.initial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 999;
    animation: fadeOutOverlay 6s forwards;  /* 6秒 */
}

.brand-message {
    opacity: 0;
    animation: fadeInOut 4.5s forwards;  /* 4.5秒 */
}

@keyframes fadeOutOverlay {
    0% { opacity: 1; }
    25% { opacity: 1; }  /* 1秒間表示 */
    50% { opacity: 0; }  /* 1秒かけて消失 */
    100% { opacity: 0; display: none; }  /* 余韻を2秒 */
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    12.5% { opacity: 1; }  /* 0.5秒で表示 */
    25% { opacity: 1; }    /* 0.5秒維持 */
    50% { opacity: 0; }    /* 1秒かけて消失 */
    100% { opacity: 0; display: none; }  /* 余韻を2秒 */
}
.brand-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    text-align: center;
    background: white;
    padding: 2rem;
    color: #003F5C;
    font-size: 2rem;
    font-weight: 600;
.content-fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;  /* グラデーションの高さ */
    background: linear-gradient(to bottom, 
        rgba(255,255,255,1) 0%,
        rgba(255,255,255,0.8) 50%,
        rgba(255,255,255,0) 100%);
    pointer-events: none;  /* 下のコンテンツをクリック可能に */
    z-index: 50;  /* コンテンツの上、ヘッダーの下 */
}
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 250px 200px 1fr;
        padding: calc(var(--spacing-unit) + 60px) 1rem var(--spacing-unit);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 1rem;
        border-bottom: none;  /* ボーダーを削除 */
    }

    .header-logo h1 {
        font-size: 1.25rem;
    }

    .header-logo img {
        height: 32px;
    }

    .subtitles {
        display: none;  /* 小見出しを非表示 */
    }

    .main-titles {
        position: sticky;
        top: 48px;  /* ヘッダーの高さに合わせる */
        background: var(--background-color);
        padding: 0.5rem 1rem;
        height: 48px;
        margin: 0;
        z-index: 100;
        border-top: none;  /* 上の線を削除 */
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);  /* 下に線を追加 */
        display: flex;
        align-items: center;
    }

    .main-title {
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1rem;
        line-height: 1.5;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 96px 1rem 1rem;  /* 上部パディングはヘッダー + 固定タイトルの高さ分 */
        margin: 0 1rem;  /* 左右マージンを追加 */
        max-width: none;  /* 最大幅の制限を削除 */
    }

    .content {
        padding-top: 1rem;
        grid-column: span 1;
    }

    .content-section {
        margin-bottom: calc(var(--spacing-unit) * 1.5);  /* セクション間の余白を3行分確保 */
    }

    .content-section p {
        padding: 0;
        margin-bottom: 1.5rem;  /* 段落間の余白を調整 */
    }

    .brand-message {
        font-size: 1.5rem;
        padding: 1.5rem;
    }
}

/* 画面上下にホワイトでグラデーション */
body::before,
body::after {
    content: ''; /* 疑似要素を生成 */
    position: fixed;
    left: 0;
    width: 100%;
    height: 10%; /* グラデーションの高さ */
    pointer-events: none; /* 操作を無効化 */
    z-index: 9999; /* 他の要素の上に配置 */
}

body::before {
    top: calc(var(--header-height, 60px)); /* ヘッダーの高さを除外 */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* 上から透明に */
}

body::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)); /* 下から透明に */
}

/* モバイル用のスタイル */
@media (max-width: 768px) {
    body::before {
        height: 0%; /* モバイル時はグラデーションオフ */
    }

    body::after {
        height: 0%; /* モバイル時はグラデーションオフ */
    }
}