html {
    scroll-behavior: smooth;
}

/* ============================
   PC：body に背景画像（パララックス）
   ============================ */
body {
    font-family: 'Noto Serif JP', serif;
    background-image: url('/assets/img/hero.jpg');
    background-size: 150%;
    background-position: center;
    background-attachment: fixed;
    padding: 0;
}

/* body の暗いオーバーレイ（PC用） */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
    pointer-events: none;
}

/* 背景ぼかしレイヤー */
.bg-blur {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    backdrop-filter: blur(0px);
}

/* コンテンツを前面に出す */
header,
nav,
.hero,
.container,
footer {
    position: relative;
    z-index: 1;
}

/* ============================
   hero（スマホで画像を表示）
   ============================ */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

/* hero の暗いオーバーレイ（スマホ用） */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #f5f5f5;
}

/* ============================
   PC：hero の背景画像を消す
   ============================ */
@media (min-width: 769px) {
    .hero {
        background-image: none !important;
    }

    .hero::before {
        background: none !important;
    }
}

/* ============================
   スマホ：body の背景を消し、
   hero の背景を表示する
   ============================ */
@media (max-width: 768px) {
    body {
        background-image: none !important;
        background-attachment: scroll !important;
    }

    body::before {
        background: none !important;
    }

    .hero {
        background-image: url('/assets/img/hero.jpg') !important;
        height: 60vh;
        background-size: 200%;
        /* ← 拡大率を自由に調整 */
        background-position: center;
        background-repeat: no-repeat;
        padding-top: 5rem;
    }

    /* タイトルを小さくする */
    .hero-content h1 {
        font-size: 1.5rem;
        /* display-5 より少し小さめ */
    }

    /* サブテキストも少し小さくする */
    .hero-content p.lead {
        font-size: 1rem;
    }
}

/* ============================
   その他の既存スタイル
   ============================ */
.card img {
    height: auto;
    object-fit: cover;
    background: #f5f5f5;
    scroll-margin-top: 80px;
}

.card {
    transform: translateY(0);
    opacity: 0;
    transition: transform 1.2s ease, opacity 1.2s ease;
}

.card.show {
    transform: translateY(-5%);
    opacity: 1;
}

.fade-item {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(20px);
    animation: fadeUp 2s ease forwards;
}

.icon-link {
    text-decoration: none;
    color: #333;
    transition: transform 0.2s ease;
}

.icon-link:hover {
    transform: scale(1.2);
}

.text-link {
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.text-link:hover {
    text-decoration: underline;
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        filter: blur(6px);
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        filter: blur(0px);
        transform: translateY(0);
    }
}

.object-fit-cover {
    object-fit: cover;
}

[id^="contents-"] {
    scroll-margin-top: 90px;
}