@charset "UTF-8";

/* =========================================================
   style.css - 施工事例詳細（works/detail）専用
   ページタイトル帯 / お問い合わせ帯 / フッターは base.css 側にある

   施工事例一覧（works/）とは別ファイル。一覧側の .works / .work は使わない。
   ========================================================= */

/* =========================================================
   事例の概要 + 写真
   ========================================================= */

.case {
    padding-top: 148px;
}

/* 概要も写真も同じ 1068px の幅で揃える（Figma: 186px 〜 1254px） */
.case__inner {
    width: 90%;
    max-width: 1068px;
    margin-inline: auto;
}

.case__head {
    display: flex;
    align-items: flex-start;
}

.case__visual {
    flex: 0 0 499px;
    aspect-ratio: 499 / 426;
    object-fit: cover;
}

/* 写真の上端より 34px 下げた位置から始める（Figma のとおり） */
.case__body {
    flex: 1;
    margin-top: 34px;
    margin-left: 77px;
}

.case__title {
    color: #3b2a1a;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    font-size: 26px;
    line-height: 1.45;
}

.case__client {
    margin-top: 20px;
    color: #3b2a1a;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.45;
}

/* 幅は Figma の 327px。広げると改行位置がデザインとずれる */
.case__lead {
    max-width: 327px;
    margin-top: 87px;
    color: #3b2a1a;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.45;
}

/* --- 写真 2 枚 --- */

.case__gallery {
    display: flex;
    gap: 72px;
    margin-top: 118px;
}

.case__photo {
    width: 100%;
    aspect-ratio: 498 / 349;
    object-fit: cover;
}

.case__gallery li {
    flex: 1;
}

/* =========================================================
   施工概要
   ========================================================= */

.spec {
    margin-top: 175px;
}

/*
    見出しと表そのものは base.css の .spec__*（会社概要ページと共通）。
    Figma では表が画面中央より 60px ほど右に寄っているが、
    見出しが中央揃えなので base.css 側で素直に中央へ置いている。
*/
.spec__list {
    margin-top: 88px;
}

/* =========================================================
   担当者・お客様のコメント
   ========================================================= */

.comment {
    margin-top: 159px;
}

.comment__list {
    display: flex;
    gap: 76px;
    width: 90%;
    max-width: 1068px;
    margin-inline: auto;
}

/*
    Figma のボックスは 494 x 368px。
    ★ 見出しの上の 170px は「あとからアイコンを入れる」ための余白。
      空きに見えても詰めないこと（SP 側も同じ理由で余白を残してある）。
    文章量で高さが変わっても崩れないよう、高さは固定値ではなく min-height で持たせる。
*/
.comment__item {
    flex: 1;
    min-height: 368px;
    padding: 170px 44px 24px;
    background-color: #fff2e0;
}

.comment__heading {
    color: #3b2a1a;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    font-size: 30px;
    line-height: 1.45;
    text-align: center;
}

.comment__text {
    margin-top: 20px;
    color: #3b2a1a;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.45;
}

/* =========================================================
   施工事例一覧へ戻るボタン
   ========================================================= */

/*
    共通の .button（216x57・右端に「>」）とは別物。
    こだわりページの .quality__staff と同じ形（角丸 10px・矢印なし）で幅だけ広い。
*/
.case-back {
    display: flex;
    justify-content: center;
    margin-top: 133px;
}

.case-back__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 413px;
    height: 81px;
    border-radius: 10px;
    background-color: #5a6b4a;
    color: #fffcf6;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.5;
    text-align: center;
}

@media (any-hover: hover) {
    .case-back__link:hover {
        opacity: 1;
        background-color: #6d7f5b;
    }
}

/* =========================================================
   お問い合わせ帯
   本体は base.css の .contact-cta。ここは上の余白だけ。
   ========================================================= */

/*
    Figma ではボタンからお問い合わせ帯まで 497px 空いているが、
    画面 1 枚ぶんの空白になってしまうため、他の下層ページと同じ 267px に揃えた。
*/
.contact-cta {
    margin-top: 267px;
}

/* =========================================================
   スクロールで浮かび上がる演出
   ========================================================= */

.js-fadeIn {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.js-fadeIn.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================================
   SP（768px 以下）
   ========================================================= */

@media (max-width: 768px) {

    .case {
        padding-top: 56px;
    }

    .case__inner {
        width: 88%;
    }

    /* SP は写真を上、文章を下に積む */
    .case__head {
        flex-direction: column;
    }

    .case__visual {
        flex: 0 0 auto;
        width: 100%;
    }

    .case__body {
        margin: 20px 0 0;
    }

    .case__title {
        font-size: 20px;
    }

    .case__client {
        margin-top: 12px;
        font-size: 16px;
    }

    .case__lead {
        max-width: none;
        margin-top: 20px;
        font-size: 16px;
        line-height: 1.8;
    }

    .case__gallery {
        flex-direction: column;
        gap: 24px;
        margin-top: 40px;
    }

    /* --- 施工概要 --- */

    .spec {
        margin-top: 72px;
    }

    .spec__list {
        margin-top: 40px;
    }

    /* --- コメント --- */

    .comment {
        margin-top: 72px;
    }

    .comment__list {
        flex-direction: column;
        gap: 24px;
        width: 88%;
    }

    /*
        SP でもアイコン用の余白は残す。170px のままだと間延びするので
        画面幅に合わせて 110px に縮めてある（アイコンの実寸が決まったら要調整）。
    */
    .comment__item {
        min-height: 0;
        padding: 110px 24px 32px;
    }

    .comment__heading {
        font-size: 20px;
    }

    .comment__text {
        margin-top: 16px;
        font-size: 16px;
        line-height: 1.8;
    }

    /* --- 一覧へ戻るボタン --- */

    /* 他のブロックと左右の余白を揃える */
    .case-back {
        width: 88%;
        margin: 56px auto 0;
    }

    .case-back__link {
        width: 100%;
        max-width: 413px;
        height: 64px;
        font-size: 17px;
    }

    .contact-cta {
        margin-top: 90px;
    }
}

/* =========================================================
   小さめのスマホ（480px 以下）
   デザインどおりの改行位置だと 1 行が画面幅を超えるので、
   このサイズからは <br> を無効にして自然折り返しに任せる。
   ========================================================= */

@media (max-width: 480px) {

    .comment__text br,
    .contact-cta__text br {
        display: none;
    }
}

/* =========================================================
   アニメーション抑制
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .js-fadeIn {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
