@charset "UTF-8";

html {
    overflow-y: scroll;
}

:root {
    --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
    --font-english: "Poppins", var(--font-jp);
}

/* 全体 */
body {
    margin: 0;
    background-color: #f2f2f2;
    font-family: var(--font-jp);
}

img {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* ヘッダー */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 0 clamp(16px, 5vw, 80px);
    display: flex;
    align-items: center;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ナビ */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* メニュー */
.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    font-family: var(--font-english);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: #555;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background-color: #555;
    transition: width 0.3s ease;
}

.nav-list a:hover {
    color: #000;
}

.nav-list a:hover::after {
    width: 100%;
}

.nav-list a.active {
    color: #000;
}

.nav-list a.active::after {
    width: 100%;
}

.nav-icon-link {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.nav-icon-link::after {
    display: none;
}

.nav-icon-link:hover,
.nav-icon-link.active {
    transform: translateY(-2px);
}

.nav-panda-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

/* メイン */
.main {
    padding: 64px clamp(16px, 5vw, 80px) 40px;
}

.main:not(.sub-page) {
    padding: 64px 0 0;
}

/* トップ画像 */
.frame {
    position: relative;
    --panda-edge: clamp(10px, 2.5vw, 32px);
    --panda-width: 72px;
    width: 100%;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.top-visual {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.top-floating-panda {
    position: absolute;
    top: 58%;
    left: var(--panda-edge);
    z-index: 1;
    width: var(--panda-width);
    height: auto;
    display: block;
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    filter: drop-shadow(0 18px 24px rgba(12, 28, 72, 0.22));
    transform-origin: 50% 55%;
    transform: rotate(-8deg);
    will-change: top, left, transform;
}

.top-floating-panda.is-dragging {
    cursor: grabbing;
    filter: drop-shadow(0 22px 28px rgba(12, 28, 72, 0.28));
}

/* 共通見出し */
.page-title {
    font-family: var(--font-english);
    font-size: 40px;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

/* サイトタイトル */
#site-title {
    width: clamp(180px, 21vw, 260px);
    height: 50px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.back-to-top {
    position: fixed;
    right: clamp(16px, 4vw, 44px);
    bottom: clamp(18px, 4vw, 42px);
    z-index: 20;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(63, 54, 59, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: #4f464b;
    cursor: pointer;
    font-family: var(--font-english);
    font-size: 18px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
    backdrop-filter: blur(6px);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background: rgba(255, 255, 255, 0.95);
}

body.modal-open .back-to-top {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

@media (max-width: 720px) {
    .site-header {
        height: auto;
        min-height: 64px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .site-nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .nav-list {
        width: 100%;
        gap: 18px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .nav-list a {
        white-space: nowrap;
    }

    #site-title {
        width: clamp(160px, 54vw, 220px);
        height: 42px;
    }

    .back-to-top {
        right: 16px;
        bottom: 30px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .main {
        padding: 112px 16px 32px;
    }

    .main:not(.sub-page) {
        padding: 112px 0 0;
    }

    .frame {
        --panda-edge: 10px;
        height: calc(100vh - 112px);
    }
}
