html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: black;
    color: #FFFFFF;
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "wdth" 75,
        "GRAD" 0,
        "ROND" 0;
    overflow-x: hidden;
}

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

/* --- Background Marquee --- */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #202020 0%, #000000 100%);
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-marquee-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    width: 250vw;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0.6;
}

.bg-marquee-row {
    display: flex;
    white-space: nowrap;
    width: max-content;
    flex-shrink: 0;
}

.bg-marquee-row:nth-child(even) {
    transform: translateX(-15%);
}

.bg-marquee-row:nth-child(3) {
    transform: translateX(-5%);
}

.bg-marquee-row:nth-child(5) {
    transform: translateX(-10%);
}

.bg-marquee-content {
    display: flex;
    animation: marqueeScroll 35s linear infinite;
    transform: translateZ(0);
    backface-visibility: hidden;
    flex-shrink: 0;
    will-change: transform;
}

.bg-marquee-content.is-paused {
    animation-play-state: paused !important;
}

.bg-marquee-row:nth-child(even) .bg-marquee-content {
    animation-duration: 45s;
    animation-direction: reverse;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.bg-marquee-text {
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-size: 25vh;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.08);
    /* -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08); */
    padding-right: 64px;
    flex-shrink: 0;
    font-variation-settings:
        "slnt" 0,
        "wdth" 80,
        "GRAD" 0,
        "ROND" 0;
    transition: font-variation-settings 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease, filter 0.5s ease;
    will-change: font-variation-settings, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.bg-marquee-text.is-compressing {
    font-variation-settings:
        "slnt" 0,
        "wdth" 65,
        "GRAD" 0,
        "ROND" 0;
    opacity: 0;
}

/* ------------------------- */

header {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 0 64px;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("img/header-hero.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    /* スクロールに応じて下部から徐々に透過させるマスク */
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 55%,
            rgba(0, 0, 0, calc(1 - 0.4 * var(--scroll-fade, 0))) 85%,
            rgba(0, 0, 0, calc(1 - var(--scroll-fade, 0))) calc(100% - 24px),
            transparent 100%);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 55%,
            rgba(0, 0, 0, calc(1 - 0.4 * var(--scroll-fade, 0))) 85%,
            rgba(0, 0, 0, calc(1 - var(--scroll-fade, 0))) calc(100% - 24px),
            transparent 100%);
}

/* 下部ぼかしオーバーレイ：スクロールに応じてヘッダー下部を滑らかにぼかす（上限48px） */
.header-blur-overlay {
    position: absolute;
    top: -48px;
    bottom: -48px;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
    --scroll-blur: 0px;
    backdrop-filter: blur(var(--scroll-blur));
    -webkit-backdrop-filter: blur(var(--scroll-blur));
    mask-image: linear-gradient(to bottom, transparent 0%, transparent 35%, black 70%, black calc(100% - 96px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 35%, black 70%, black calc(100% - 96px), transparent 100%);
    will-change: backdrop-filter;
    transform: translateZ(0);
}

/* 下部フェードオーバーレイは廃止し、画像自体の透過に変更しました */

header .site-title {
    position: relative;
    z-index: 3;
    text-align: right;
    font-size: 12vw;
    font-weight: 600;
    line-height: 1.15;
    max-width: 100%;
    word-break: break-word;
    color: #FFFFFF;
    margin: 0;
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: 350;
    font-style: normal;
    font-variation-settings:
        "slnt" -10,
        "wdth" 35,
        "GRAD" 0,
        "ROND" 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    will-change: font-variation-settings, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

header .site-title.is-visible {
    opacity: 1;
    animation: TitleAnimation 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes TitleAnimation {
    0% {
        /* filter: blur(8px); */
        font-weight: 700;
        font-variation-settings:
            "slnt" 0,
            "wdth" 80,
            "GRAD" 0,
            "ROND" 0;
    }

    100% {
        /* filter: blur(0px); */
        font-weight: 350;
        font-variation-settings:
            "slnt" -10,
            "wdth" 35,
            "GRAD" 0,
            "ROND" 0;
    }
}

@keyframes TextAnimation {
    0% {
        /* filter: blur(8px); */
        font-weight: 700;
        transform: scale(1.5);
        font-variation-settings:
            "slnt" 0,
            "wdth" 80,
            "GRAD" 0,
            "ROND" 0;
    }

    100% {
        /* filter: blur(0px); */
        font-weight: 450;
        transform: scale(1);
        font-variation-settings:
            "slnt" 0,
            "wdth" 65,
            "GRAD" 0,
            "ROND" 0;
    }
}

main {
    max-width: 1024px;
    width: calc(100% - 208px);
    margin: 0 auto;
}

img {
    border-radius: 32px;
}

section {
    margin: 256px auto;
    width: 100%;
}

h1.section-title {
    text-align: center;
    line-height: 1;
    font-size: 104px;
    font-weight: 500;
    margin: 48px 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: font-variation-settings, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

h1.section-title.is-visible {
    opacity: 1;
    animation: TextAnimation 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-box {
    max-height: 512px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 16px;
}

#welcome.section-box {
    grid-template-columns: 0.7fr 1.3fr;
}

#gallery.section-box {
    grid-template-columns: 1fr;
}

.welcome-img {
    margin: auto;
    width: 100%;
    height: 720px;
    max-height: 512px;
    object-fit: cover;
}

#welcome .welcome-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 512px;
    object-fit: contain;
}

#map .welcome-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 512px;
    object-fit: contain;
}

#map> :first-child {
    margin-right: 0;
    margin-left: auto;
    justify-self: end;
}

#map> :last-child {
    margin-left: 0;
    margin-right: auto;
    justify-self: start;
}

.welcome-text {
    font-size: 20px;
}

.section-text {
    font-size: 20px;
    text-align: center;
    margin: 48px 0;
}


.section-subbox {
    height: 100%;
    max-height: 512px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    gap: 16px;
}

.section-subbox .welcome-img {
    height: 100%;
    max-height: 248px;
    object-fit: cover;
}

.logo-img {
    margin: auto;
    width: 104px;
    height: auto;
    margin-bottom: 24px;
}

button,
.section-btn {
    display: grid;
    width: fit-content;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    margin: 32px auto;
    padding: 24px 48px;
    font-size: 28px;
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "wdth" 80,
        "GRAD" 0,
        "ROND" 0;
    color: #FFFFFF;
    border: none;
    outline: solid #92929266 2px;
    border-radius: 9999px;
    cursor: pointer;
    background: linear-gradient(180deg, #252525, #000000);
    transition: padding 0.2s ease;
}


button:active,
.section-btn:active {
    transform: scale(0.98);
    background: linear-gradient(0deg, #252525, #000000);
}

.notification-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
    margin: 64px auto;
    width: 100%;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 38px 48px;
    font-size: 28px;
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "wdth" 80,
        "GRAD" 0,
        "ROND" 0;
    color: #FFFFFF;
    border-radius: 9999px;
    background: linear-gradient(180deg, #252525, #00000000);
    outline: solid #92929266 2px;
    box-sizing: border-box;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
    transition: background 0.2s ease, outline-color 0.2s ease;
}

.notification-label {
    font-size: 32px;
    font-weight: 400;
    color: #FFFFFF;
}

.ask-navi-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ask-navi-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.ask-navi-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ask-navi-sub {
    font-size: 14px;
    color: #FFFFFF;
    opacity: 0.8;
    line-height: 1.2;
}

.ask-navi-title {
    font-size: 32px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 1.1;
}

.external-link-icon {
    width: 28px;
    height: 28px;
    color: #FFFFFF;
    flex-shrink: 0;
}

.notification-item nk-checkbox {
    --nk-checkbox-size: 32px;
    --nk-checkbox-radius: 8px;
    flex-shrink: 0;
}

.credit-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 64px auto;
    width: 100%;
}

.credit-card {
    display: flex;
    align-items: center;
    padding: 24px;
    background: linear-gradient(180deg, #252525, #000000);
    /* outline: solid #92929266 2px; */
    border-radius: 64px;
    box-sizing: border-box;
    gap: 16px;
}

.credit-avatar {
    width: 320px;
    height: 320px;
    border-radius: 48px;
    object-fit: cover;
    flex-shrink: 0;
}

.credit-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.credit-name {
    text-align: center;
    font-size: 104px;
    font-weight: 500;
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    color: #FFFFFF;
    margin: 0;
    line-height: 1;
}

.credit-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.credit-tag {
    background-color: #FFFFFF;
    color: #1B1B1B;
    font-size: 18px;
    font-optical-sizing: auto;
    font-weight: 550;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "wdth" 80,
        "GRAD" 0,
        "ROND" 0;
    padding: 8px 16px;
    border-radius: 9999px;
    white-space: nowrap;
    line-height: 1.4;
}

footer {
    width: 100%;
    background: transparent;
    height: 100vh;
    /* padding: 272px 24px 96px; */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, transparent, #272727 100%);
}

.footer-container {
    position: relative;
    top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1152px;
    width: 100%;
}

.footer-message {
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-size: 104px;
    font-weight: 500;
    font-optical-sizing: auto;
    font-variation-settings:
        "slnt" 0,
        "wdth" 75,
        "GRAD" 0,
        "ROND" 0;
    color: transparent;
    background-image: linear-gradient(to right, #AFC54A 0%, #DBFAB8 50%, #AFC54A 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 2s linear infinite;
    margin: 0 0 48px 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.footer-copyright {
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #CACACA;
    margin: 0 0 40px 0;
    line-height: 1.5;
}

.footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.footer-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.footer-icon:hover {
    opacity: 1;
}

#green {
    color: transparent;
    background-image: linear-gradient(to right, #AFC54A 0%, #DBFAB8 50%, #AFC54A 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}

#green.is-visible {
    animation: TextAnimation 1s cubic-bezier(0.16, 1, 0.3, 1) forwards, shine 2s linear infinite;
}

@media (max-width: 800px) {
    .credit-card {
        flex-direction: column;
        padding: 24px;
        text-align: center;
        gap: 24px;
    }

    .credit-avatar {
        width: 120px;
        height: 120px;
    }

    .credit-name {
        font-size: 40px;
    }
}


@media (max-width: 1200px) {

    .section-box,
    #welcome.section-box {
        grid-template-columns: 1fr;
        max-height: none;
        gap: 16px;
    }

    .section-subbox {
        max-height: none;
        gap: 16px;
    }

    .welcome-img,
    #welcome .welcome-img,
    #map .welcome-img,
    .section-subbox .welcome-img {
        height: auto;
        max-height: none;
        /* aspect-ratio: 1 / 1; */
        max-width: 500px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 512px) {
    .br-mobile-hide {
        display: none;
    }

    header {
        flex-direction: column;
        justify-content: end;
        padding: 0 16px;
    }

    header::before {
        background-position: 22% top;
    }

    header .site-title {
        width: 100%;
        font-size: 64px;
        line-height: 1.25;
        padding-bottom: 64px;
        text-align: center;
    }

    @keyframes TitleAnimation {
        0% {
            /* filter: blur(8px); */
            font-weight: 100;
            font-variation-settings:
                "slnt" 0,
                "wdth" 10,
                "GRAD" 0,
                "ROND" 0;
        }

        100% {
            /* filter: blur(0px); */
            font-weight: 350;
            font-variation-settings:
                "slnt" -10,
                "wdth" 35,
                "GRAD" 0,
                "ROND" 0;
        }
    }

    main {
        width: calc(100% - 32px);
    }

    section {
        margin: 168px auto;
    }

    h1.section-title {
        font-size: 64px;
        margin: 24px 0;
    }

    .credit-card {
        flex-direction: column;
        padding: 24px;
        border-radius: 32px;
        text-align: center;
        gap: 24px;
    }

    .credit-avatar {
        width: 200px;
        height: 200px;
        border-radius: 50%;
    }

    .credit-name {
        font-size: 40px;
    }

    .footer-message {
        font-size: 40px;
    }

    .section-text {
        font-size: 20px;
        text-align: center;
        margin: 48px 0;
    }

    .welcome-text {
        text-align: center;
    }
}

/* =========================================================
   Splash Screen & Global Modifiers
   ========================================================= */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    touch-action: none;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#splash-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-text {
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
    font-family: "Google Sans Flex", "Noto Sans JP", sans-serif;
    font-size: 80px;
    font-weight: 500;
    background-image: linear-gradient(to right, #AFC54A 0%, #DBFAB8 50%, #AFC54A 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 2s linear infinite;
    font-variation-settings:
        "slnt" 0,
        "wdth" 80,
        "GRAD" 0,
        "ROND" 0;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}