@import url('https://fonts.googleapis.com/css2?family=Sacramento&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@400;700&display=swap');
/* =========================
   Font Face Definitions
   ========================= */
@font-face {
    font-family: 'TheScientist';
    src: url('./font/TheScientist-L3EyW.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'EB';
    src: url('./font/EBGaramond/EBGaramond-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('./font/Inter/Inter_18pt-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.sacramento {
    font-family: 'Sacramento', cursive, sans-serif;
    font-size: 36px;
    letter-spacing: 2px;
    margin: 0 16px;
}

/* =========================
   Base Styles
   ========================= */
body {
    color: white;
    background-color: #111;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    line-height: 2.0em;
    letter-spacing: 0.1em;
    animation: fadeIn 2s forwards;
}

a {
    text-decoration: none;
    color: black;
}

/* =========================
   Header & Navigation
   ========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* ロゴとメニューを端に配置 */
    padding: 48px 24px;
    height: 60px;
    z-index: 100;
    background: transparent;
    box-sizing: border-box;
    /* pointer-events: auto; 削除: これがあるとheader全体がクリック可能になり、子要素のaタグの挙動を阻害する場合がある */
}

header * {
    /* pointer-events: auto; 削除: これがあるとaタグ以外の要素もクリック可能になり、aタグの挙動を阻害する場合がある */
}

header a {
    pointer-events: auto !important; /* ヘッダー内のリンクは必ずクリック可能に */
    color: inherit;
}

menu svg {
    color: white;
    margin: 0 4px;
    position: relative;
    top: 6px;
    text-shadow: 0 0 16px #fff;
}

/* =========================
   Typography
   ========================= */

.thescientist {
    font-family: 'TheScientist', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    /* pointer-events: none; 削除: これがあるとロゴ等がaタグでラップされている場合にクリックできなくなる */
    z-index: 1;
    /* Removed fixed positioning for normal flow */
}

.sec2 {
    background-color: #111;
    margin-bottom: 0;
    padding: 24px 0px;

    h2 {
        color: white;
        font-family: "EB", sans-serif;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

.works {
    margin-top: 0;
    padding-top: 0;
    background-color: rgb(10, 10, 10);
    text-align: left;
}

.works-img {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.colorful-1 {
    background-image: linear-gradient(90deg, rgb(255, 145, 0), rgb(255, 255, 0));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

footer {
    align-items: center;
    background-color: black;
    padding: 24px 24px;

    p {
        color: white;
    }
}

main {
    margin-top: 96px;
}

@media (min-width: 980px) {
    .works-img {
    width: 40%;
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    }
    .works {
        font-size: 0; /* 画像間の隙間を消す */
    }
    
    .works {
        text-align: center;
    }

    main {
        width: 980px;
        padding: 0px 24px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .sec1 {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100vh;
        
        h1 {
            position: absolute;
            top: 60%;
            left: 50%;
            transform: translate(-50%, -65%);
            margin: 0;
            width: 100%;
            text-align: center;
        }
        p {
            position: absolute;
            top: calc(50% + 70px);
            left: 50%;
            transform: translate(-50%, 0);
            margin: 0;
            width: 100%;
            text-align: center;
        }
    }

}

@media (max-width: 979px) {
    .works-img {
        width: 100%;
        display: block;
    }

    main {
        padding: 0px 24px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .sec1 {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: calc(100vh - 108px);
        
        h1 {
            position: absolute;
            top: 60%;
            left: 50%;
            transform: translate(-50%, -60%);
            margin: 0;
            width: 100%;
            text-align: center;
        }
        p {
            position: absolute;
            top: calc(60% + 70px);
            left: 50%;
            transform: translate(-50%, 0);
            margin: 0;
            width: 100%;
            text-align: center;
        }
    }
}

/* フェードイン・アウト用のオーバーレイ */
.fade-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #111;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.7s cubic-bezier(.4,0,.2,1);
}
.fade-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
.fade-overlay.fade-in {
    opacity: 1;
    pointer-events: all;
}
