/* --- 矩藤内装：最終統合スタイル（WORKS修正版） --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    background-color: #fff;
    color: #1d1d1f;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ヘッダー共通 */
header {
    position: fixed; top: 0; width: 100%; height: 52px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ヘッダー内枠 {
    max-width: 1024px; margin: 0 auto; height: 100%;
    display: flex; justify-content: space-between; align-items: center; padding: 0 22px;
}
.ロゴ { font-size: 1.1rem; font-weight: 700; color: #1d1d1f; text-decoration: none; display: flex; align-items: center; }
.ロゴアイコン { margin-right: 8px; }
nav ul { display: flex; list-style: none; gap: 25px; }
nav a { text-decoration: none; color: #1d1d1f; font-size: 12px; opacity: 0.6; transition: 0.3s; }
nav a:hover { opacity: 1; }

/* 共通レイアウト */
.内容枠 { padding: 120px 22px 100px; max-width: 1024px; margin: 0 auto; }
.巨大見出し { font-size: clamp(32px, 6vw, 48px); font-weight: 600; margin-bottom: 20px; }
.項目文章 { font-size: 18px; line-height: 1.8; color: #1d1d1f; }

/* --- index.html（トップページ） --- */
.メインビジュアル {
    min-height: 100vh; width: 100%; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding-top: 52px; background-color: #fbfbfb;
}
.主役見出し { font-size: clamp(32px, 8vw, 56px); font-weight: 600; line-height: 1.2; margin-bottom: 20px; }
.主役副題 { font-size: clamp(18px, 3vw, 24px); color: #86868b; }
.トップ格子枠 {
    max-width: 1024px; margin: 60px auto 100px; display: grid;
    grid-template-columns: 1fr 1fr; gap: 20px; padding: 0 22px;
}
.タイルボタン {
    display: block; text-decoration: none; color: #1d1d1f; background-color: #f5f5f7;
    padding: 80px 40px; border-radius: 24px; text-align: center; transition: 0.4s;
}

/* --- works.html（施工実績）修正ポイント --- */
.実績見出しエリア { margin-bottom: 80px; }
.実績セクション {
    display: flex; align-items: center; gap: 60px; margin-bottom: 120px;
}
.実績セクション.逆配置 { flex-direction: row-reverse; }
.実績画像枠 {
    flex: 1.2; border-radius: 20px; overflow: hidden;
    aspect-ratio: 3/2; background: #f5f5f7;
}
.実績画像枠 img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.実績画像枠:hover img { transform: scale(1.05); }
.実績解説 { flex: 1; }
.実績番号 { font-size: 14px; font-weight: 600; color: #86868b; display: block; margin-bottom: 10px; }

/* --- contact.html（お問い合わせ） --- */
.コンタクト・メイン {
    display: block; text-decoration: none; color: #1d1d1f;
    background-color: #f5f5f7; border-radius: 28px; padding: 60px 20px; text-align: center; margin-bottom: 20px;
}
.青ボタン { display: inline-block; margin-top: 20px; background-color: #0071e3; color: #fff; padding: 10px 24px; border-radius: 20px; font-weight: 600; }
.コンタクト・グリッド { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.コンタクト・小カード {
    display: block; text-decoration: none; color: #1d1d1f; background-color: #fff;
    padding: 40px 20px; border-radius: 24px; border: 1px solid #d2d2d7; text-align: center;
}

footer { padding: 60px 0; text-align: center; font-size: 10px; color: #86868b; }

@media (max-width: 734px) {
    .トップ格子枠, .コンタクト・グリッド, .実績セクション, .実績セクション.逆配置 {
        grid-template-columns: 1fr; flex-direction: column; gap: 30px;
    }
    .実績画像枠 { width: 100%; }
}

/* --- ABOUT (about.html) 専用スタイル --- */
.見出しエリア {
    text-align: center;
    margin-bottom: 100px;
}

.こだわりセクション {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 150px;
}

.こだわりセクション.逆配置 {
    flex-direction: row-reverse;
}

.こだわり画像 {
    flex: 1.2;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4 / 3; /* 実績より少し落ち着いた比率に */
    background-color: #f5f5f7;
}

.こだわり画像 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.こだわりテキスト {
    flex: 1;
}

.番号 {
    font-size: 14px;
    font-weight: 700;
    color: #86868b;
    display: block;
    margin-bottom: 15px;
}

/* スマホ対応 */
@media (max-width: 734px) {
    .こだわりセクション, .こだわりセクション.逆配置 {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 80px;
    }
    .こだわり画像 { width: 100%; }
}

/* --- 矩藤内装：スマホ表示・完全修正スタイル --- */

/* 全体共通：スクロール時にヘッダーがずれないように調整 */
header {
    height: auto; /* 高さを自動に */
    min-height: 52px;
}

.ヘッダー内枠 {
    max-width: 1024px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 22px; /* 上下の余白を少し増やす */
}

.ロゴ {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1d1d1f;
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* ロゴが潰れないように */
}

/* スマホ対応（メディアクエリ）：画面幅が734px以下の時 */
@media (max-width: 734px) {
    .ヘッダー内枠 {
        flex-direction: column; /* ロゴとメニューを縦並びに */
        align-items: flex-start; /* 左寄せ */
        padding: 10px 15px; /* スマホ用の余白 */
    }

    .ロゴタグライン {
        display: none; /* スマホではタグライン（意地〜）を非表示にしてスッキリ */
    }

    nav {
        width: 100%; /* メニューを横いっぱいに */
        margin-top: 10px; /* ロゴとの間隔 */
    }

    nav ul {
        display: flex;
        justify-content: space-between; /* メニューを横一列に均等配置 */
        gap: 0; /* gapをなくす */
        padding: 0;
    }

    nav li {
        flex: 1; /* 各メニューを均等な幅に */
        text-align: center; /* 文字を中央に */
    }

    nav a {
        font-size: 11px; /* スマホ用に少し文字を小さく */
        display: block; /* クリックエリアを広く */
        padding: 5px 0;
    }
}

/* --- WORKS (works.html) 施工実績ページの見出しエリア修正 --- */

/* 見出しと文章を囲んでいるエリア全体を真ん中寄せに */
.実績見出しエリア {
    text-align: center; /* これで中の文字が真ん中になります */
    padding-top: 100px; /* 上のヘッダーとの余白 */
    padding-bottom: 80px; /* 下の実績リストとの余白 */
}

/* 「施工実績」の巨大見出し */
.巨大見出し {
    font-size: 3rem; /* 48px相当。Apple風の大きさ */
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.015em; /* 文字間を少し詰めて格好よく */
    margin-bottom: 20px; /* 下の文章との間隔 */
}

/* 「見えなくなる下地に〜」の項目文章 */
.項目文章 {
    font-size: 1.2rem; /* 19px相当。少し大きめに */
    font-weight: 400;
    color: #86868b; /* Apple風の薄いグレー */
    max-width: 600px; /* 文章が横に広がりすぎないように幅を制限 */
    margin: 0 auto; /* max-widthを真ん中に寄せるためのおまじない */
    line-height: 1.6; /* 行間を空けて読みやすく */
}

/* スマホ対応（メディアクエリ） */
@media (max-width: 734px) {
    .実績見出しエリア {
        padding-top: 60px; /* スマホでは上の余白を少し狭く */
        padding-bottom: 40px;
    }
    .巨大見出し {
        font-size: 2.2rem; /* スマホでは見出しを少し小さく */
    }
    .項目文章 {
        font-size: 1.1rem; /* スマホの文章サイズ */
        padding: 0 20px; /* スマホでの左右の余白 */
    }
}