/* =====================================================================
   rebuild.css — 車種セクション再構築用スタイル
   ・車両は背景除去した透過PNG（img/*-car.png）
   ・車名/グレード/料金/注記はすべてHTMLテキスト
   ・背景色は画像から分離し、CSS の nth-child が「位置」で自動決定
     → 並べ替えても「グレー/黒」が崩れない
   ・アクセント色はページ単位で切替（.page-current=金 / .page-previous=青）
   ===================================================================== */

:root {
    --gray-1: #535353;
    --gray-2: #353535;
    --black-1: #202020;
    --black-2: #030303;
    --table-bg: #333333;
    --table-head: #3b3b3b;
    --table-line: #6b6b6b;
    --txt-sub: #cfcfcf;
}

/* ページ別アクセント色 */
.page-current {
    --accent: #c9a227;
}

/* CURRENT = ゴールド */
.page-previous {
    --accent: #8fb3c0;
}

/* PREVIOUS = スチールブルー */

* {
    box-sizing: border-box;
}

body.rebuild {
    margin: 0 auto;
    padding: 30px;
    max-width: 1028px;
    background: #000;
    color: #fff;
    line-height: 1.4;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
    text-align: center;
}

body.rebuild img {
    max-width: 100%;
    height: auto;
    vertical-align: top;
}

.rebuild .head {
    margin: 0;
}

/* ===== マストヘッド（旧ヘッダー画像 pre-head/cu-head を HTML化） =====
   背景はメタリックな暗色グラデ。下端を「1台目＝グレー(nth-child奇数)」の
   セクション色へフェードさせ、車体セクションへ継ぎ目なくつなげる。 */
.masthead {
    position: relative;
    container-type: inline-size;
    padding: 4cqw 5cqw 5.5cqw;
    text-align: center;
    overflow: hidden;
    background:
        /* 斜めのメタリックな光沢 */
        linear-gradient(120deg, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, .09) 44%, rgba(255, 255, 255, .02) 53%, rgba(255, 255, 255, 0) 70%),
        /* 縦：上は黒 → 下端は1台目セクションのグレー(--gray-2)へ溶け込ませる */
        linear-gradient(180deg, #0b0b0c 0%, #1c1c1d 40%, #2b2b2b 74%, #353535 100%);
}

/* タイトル「PREMIUM CLASS LINEUP」＋左右の金罫線 */
.mh-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.2cqw;
}

.mh-title .ln {
    flex: 0 0 5.5cqw;
    /* 元の罫線長 ≒ ヘッダ幅5% を固定確保（タイトル拡大で潰れないように） */
    height: 1px;
}

.mh-title .ln:first-child {
    background: linear-gradient(90deg, transparent, #c9a227);
}

.mh-title .ln:last-child {
    background: linear-gradient(90deg, #c9a227, transparent);
}

.mh-en {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
    font-size: clamp(18px, 4.8cqw, 52px);
    /* 元: 文字幅 ≒ ヘッダ幅64% に収め、両脇に罫線を残す */
    font-weight: 600;
    letter-spacing: .06em;
    /* メタリックゴールド */
    background: linear-gradient(180deg, #faf0b8 0%, #d9b441 42%, #9c7a24 54%, #f0d97e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.mh-jp {
    margin: 1.6cqw 0 0;
    color: #e8e8e8;
    font-size: clamp(11px, 1.85cqw, 21px);
    letter-spacing: .28em;
}

/* カテゴリ（PREVIOUS / CURRENT）＋説明 */
.mh-cat {
    margin-top: 3.4cqw;
}

.mh-cat .cat-line {
    margin: 0;
}

.mh-cat .cat-en {
    color: var(--accent);
    font-size: clamp(22px, 5.5cqw, 56px);
    /* 元 PREVIOUS/CURRENT ≒ ヘッダ幅4.0%(字面) */
    letter-spacing: .06em;
}

.mh-cat .cat-ja {
    margin-left: .5em;
    color: var(--accent);
    font-size: clamp(11px, 2.2cqw, 22px);
    letter-spacing: .1em;
    vertical-align: .18em;
}

.mh-cat .cat-sub {
    margin: 1.6cqw 0 0;
    color: #e8e8e8;
    font-size: clamp(11px, 1.5cqw, 16px);
    letter-spacing: .08em;
}

.mh-lead {
    max-width: 88%;
    margin: 2.6cqw auto 0;
    color: #e8e8e8;
    font-size: clamp(11px, 1.7cqw, 18px);
    line-height: 1.9;
}

/* ===== 車種リスト（並べ替えの単位） ===== */
.cars {
    display: flex;
    flex-direction: column;
}

.car-sec {
    position: relative;
    container-type: inline-size;
    /* cqw を効かせる基準 */
    padding: 4cqw 5cqw 6cqw;
    overflow: hidden;
}

/* ★背景色は位置で自動決定（奇数=グレー / 偶数=黒）★
   明部を中央上に置き、車（右側）も均等に照らす。コントラストは控えめに。 */
.cars>.car-sec:nth-child(odd) {
    background: radial-gradient(150% 160% at 50% 26%, var(--gray-1) 0%, var(--gray-2) 78%);
}

.cars>.car-sec:nth-child(even) {
    background: radial-gradient(150% 160% at 50% 26%, var(--black-1) 0%, var(--black-2) 80%);
}

/* 四隅の飾り */
.car-sec::before,
.car-sec::after {
    content: "";
    position: absolute;
    width: 6.5cqw;
    height: 6.5cqw;
    pointer-events: none;
}

.car-sec::before {
    top: 2.2cqw;
    left: 2.2cqw;
    border-top: 2px solid rgba(255, 255, 255, .22);
    border-left: 2px solid rgba(255, 255, 255, .22);
}

.car-sec::after {
    bottom: 2.2cqw;
    right: 2.2cqw;
    border-bottom: 2px solid rgba(255, 255, 255, .22);
    border-right: 2px solid rgba(255, 255, 255, .22);
}

/* ===== ヒーロー（車写真＋車名テキスト） ===== */
.hero {
    position: relative;
    container-type: inline-size;
    /* バッジ文字を「車画像の幅」基準(cqw)でスケール＝焼き込み文字と同比率 */
}

.hero .car-img {
    display: block;
    width: 90%;
    /* 写真を90%に縮小。右寄せのまま、余白は左(文字側)へ */
    margin-left: auto;
}

/* 車名テキスト（旧・焼き込み文字を再現） */
.badge {
    position: absolute;
    left: 2cqw;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 1.8cqw;
    border-left: 3px solid var(--accent);
    text-align: left;
    line-height: 1.12;
}

.badge .lead {
    margin: 0 0 .4cqw;
    color: var(--accent);
    font-size: 3.42cqw;
    /* 元字面の90% */
    font-weight: 700;
    letter-spacing: .08em;
}

.badge .cls {
    margin: 0 0 .8cqw;
    color: var(--accent);
    /* クラス名はカテゴリ(CURRENT/PREVIOUS)と同色 */
    font-size: 2.57cqw;
    letter-spacing: .03em;
}

.badge .model {
    margin: 0;
    color: #fff;
    font-size: 9cqw;
    font-weight: 400;
    letter-spacing: .03em;
    line-height: 1;
}

.badge .grade {
    display: inline-block;
    margin: 1.2cqw 0 0;
    padding-top: 1cqw;
    border-top: 1px solid rgba(255, 255, 255, .45);
    color: #fff;
    font-size: 2.25cqw;
    letter-spacing: .02em;
    line-height: 1.35;
}

/* ===== 料金表（旧・料金画像をHTMLテーブル化） ===== */
.ryo {
    width: 90%;
    margin: 3cqw auto 0;
    border-collapse: collapse;
    background: var(--table-bg);
    color: #fff;
    font-size: clamp(8px, 1.85cqw, 19px);
    /* 元字面の90%（価格は .price の em で連動） */
}

.ryo th,
.ryo td {
    border: 1px solid var(--table-line);
    padding: 1.1cqw 0.5cqw;
    text-align: center;
    font-weight: 400;
    line-height: 1.25;
}

.ryo .vhead {
    width: 2.6em;
    background: var(--table-head);
    text-align: center;
    vertical-align: middle;
    padding-left: 0;
    padding-right: 0;
}

.ryo .vhead span {
    display: inline-block;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: .18em;
    line-height: 1;
    white-space: nowrap;
}

.ryo .rowhead {
    background: var(--table-head);
    white-space: nowrap;
}

.ryo .colhead small,
.ryo .price small {
    display: block;
    font-weight: 400;
}

.ryo .colhead small {
    font-size: .82em;
    color: var(--txt-sub);
}

.ryo .price {
    font-size: 1.45em;
    white-space: nowrap;
    line-height: 1.15;
}

.ryo .price small {
    font-size: .62em;
    color: var(--txt-sub);
}

/* ===== 注記（旧・注記画像をHTML化） ===== */
.info {
    width: 90%;
    margin: 1.6cqw auto 0;
    text-align: left;
    color: #e8e8e8;
    font-size: clamp(10px, 1.53cqw, 14px);
    line-height: 1.65;
}

.info p {
    margin: 0;
}

/* ===== 予約ボタン ===== */
.yoyaku {
    width: 90%;
    margin: 2.4cqw auto 0;
    text-align: right;
}

/* 元デザイン（btn-res-*.jpg）= シルバーの光沢立体ボタン「ご予約 / Reservation」を再現 */
.btn-res {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 15cqw;
    min-width: 98px;
    max-width: 150px;
    aspect-ratio: 10 / 9;
    border: 1px solid #9a9a9a;
    border-radius: 9px;
    background: linear-gradient(180deg, #ffffff 0%, #ededed 46%, #cdcdcd 50%, #d8d8d8 54%, #f0f0f0 100%);
    box-shadow:
        0 3px 7px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .95),
        inset 0 -2px 4px rgba(0, 0, 0, .2);
    color: #3a3a3a;
    text-decoration: none;
    text-align: center;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.btn-res .j {
    font-size: clamp(15px, 3cqw, 31px);
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.1;
}

.btn-res .e {
    margin-top: .4em;
    font-size: clamp(9px, 1.3cqw, 14px);
    color: #6b6b6b;
    letter-spacing: .04em;
    line-height: 1;
}

.btn-res:hover {
    filter: brightness(1.04);
    transform: translateY(1px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .95),
        inset 0 -2px 4px rgba(0, 0, 0, .25);
}

.btn-res:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .5),
        inset 0 2px 5px rgba(0, 0, 0, .3);
}

/* ===== フッター ===== */
.rebuild .foot,
.rebuild .c-foot {
    margin-top: 0;
}

.rebuild .foot-p {
    margin: 0;
    padding: 18px 12px;
    background: #363433;
    color: #eef4f7;
    text-align: right;
    font-size: 13px;
    line-height: 1.5;
}

.rebuild .c-foot .info {
    width: auto;
    margin: 10px 0 0;
    padding: 0 4px;
    text-align: right;
    color: #eef4f7;
    font-size: 13px;
}

.rebuild .c-foot .logo {
    margin-top: 24px;
}

/* スマホは viewport を固定幅(1028px)にして PC レイアウトをそのまま縮小表示する方針のため、
   旧レスポンシブ用の @media(max-width:480px) は撤去（回り込み・改行崩れを防ぐ）。 */
