/* ============ HERO ============ */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .6; z-index: 0;
  /* 切り抜き位置をページ側から指定できるようにする。
     横長の写真を縦長の画面に cover で収めると左右が切られるため、
     **主役が中央にない写真は、狭い画面で主役ごと消える。**
     /alignment/ のヒーローは測定ヘッドを付けたホイールが右端にあり、
     既定の中央切りだと車体の平らな部分しか残らなかった。 */
  object-position: var(--hero-pos, 50% 50%);
}
@media (max-width: 720px) {
  /* 狭い画面だけ別の位置を指定したいとき用。未指定なら --hero-pos に従う。 */
  .hero__bg { object-position: var(--hero-pos-sm, var(--hero-pos, 50% 50%)); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  /* 中ほどに濃い段を置いてある。文字が乗るのはヒーローの下半分なので、
     そこだけ暗くすれば上半分の建物・看板・空は明るいまま残せる。

     **薄い側の下限（38%地点）は .15 では足りない。** ラベルの縦位置は
     見出しやリード文の行数で上下し、ページによって 44% あたりまで上がる。
     そこは以前の設定だと合成アルファが .24 程度しかなく、白文字との比が
     4.5 を割っていた。2026-09-17 に9ページ×2画面で測り直した結果:

                     1280x900          375x812
       旧 .15@40   /wheel/ 3.60      /insurance/ 4.23
                   /insurance/ 3.85  /roadservice/ 4.48
                   /roadservice/ 3.85
                   /bring-in/ 4.29
                   /wheel-repair/ 4.32
       新 .28@38   最悪 4.83（/insurance/）  最悪 5.20（/insurance/）

     計測は「写真 opacity .6 → このグラデーション → 白文字」を文字要素の
     矩形内の全画素で合成し、**最悪の1画素**で判定している。
     ヒーロー写真を差し替えたら必ず測り直すこと。 */
  background: linear-gradient(180deg,
    rgba(10,10,11,.5) 0%, rgba(10,10,11,.28) 38%, rgba(10,10,11,.62) 60%, var(--bg) 100%);
}
/* ヒーローのラベルは不透明の白にする。
   写真の上に乗る10pxの小文字で、しかもグラデーションが最も薄い高さに座る。
   4枚のヒーロー写真すべてについて、ラベル帯の全画素で
   「写真 opacity .6 → 上のグラデーション → 文字」を合成して比を出したところ、
   .78 では最悪 3.36:1（tire-hero）で AA を割っていた。
   不透明にし、かつ上記のグラデーションを足して最悪 4.85:1 まで戻している。
   ※以前ここに書いてあった 4.55:1 は帯全体の最悪値ではなかった。
     写真を差し替えたら tools/ の計測ではなく必ず全画素で測り直すこと。 */
.hero .label { color: #FFFFFF; }
.hero__inner { position: relative; z-index: 2; padding-bottom: clamp(80px, 12vh, 160px); padding-top: 140px; }
.hero h1 { margin: 18px 0 20px; }
.hero .lead { max-width: 30em; }
.hero__meta { display: grid; gap: 10px; margin-top: 34px; font-size: 13px; }
.hero__meta > div { display: flex; gap: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.hero__meta dt { min-width: 5.5em; color: var(--fg-dim); font-size: 11px; letter-spacing: .1em; }
.hero__meta dd { margin: 0; }
.hero__fig { position: absolute; right: var(--gut); bottom: 18px; z-index: 2; }

.hero--sub { min-height: 68svh; }
.hero--sub .hero__inner { padding-top: 120px; padding-bottom: clamp(48px, 8vh, 92px); }

.price { width: 100%; border-collapse: collapse; margin: 18px 0 clamp(40px, 6vw, 72px); max-width: 720px; }
.price th, .price td { border-top: 1px solid var(--line); padding: 15px 0; text-align: left; font-weight: 400; vertical-align: top; }
.price tr:last-child th, .price tr:last-child td { border-bottom: 1px solid var(--line); }
.price td { text-align: right; font-family: var(--font-en); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price td small { display: block; font-family: var(--font-jp); font-size: 11px; color: var(--fg-dim); }
#price-detail h2 { margin-top: clamp(32px, 5vw, 56px); font-size: clamp(20px, 2.6vw, 28px); }
.price-notes { display: grid; gap: 6px; font-size: 12px; color: var(--fg-dim); max-width: 720px; }
.price-notes li::before { content: "※"; margin-right: 4px; }

/* ============ PROOF（スクラブ） ============ */
.scrub { background: var(--bg); }
/* 広い画面では文章と絵を左右に。狭い画面では絵を上に積む。
   ピン留め中はビューポートの高さしか使えないので、絵の高さは vh で頭打ちにする。 */
.scrub__stick .wrap {
  position: relative; z-index: 2;
  display: grid; gap: clamp(20px, 4vw, 56px); align-items: center;
}
@media (min-width: 860px) { .scrub__stick .wrap { grid-template-columns: 1fr minmax(0, 42%); } }

/* 3枚のキャプションを重ねる器。ここを grid にしないと `.scrub__cap` の
   `grid-area: 1 / 1`（motion.css）が効かず、非表示の2枚がそのまま縦に場所を
   取って、文章と絵のあいだに大きな空白ができる。 */
.scrub__body { display: grid; }

/* 正方形なので、幅を高さ基準で頭打ちにする。`width:100%` + `max-height` だと
   aspect-ratio で決まる高さが max-height を無視して伸び、ピン留めの画面から
   はみ出す。幅そのものを svh で抑えるのが確実。 */
.scrub__media { position: relative; aspect-ratio: 2 / 1; width: min(100%, 76svh); margin-inline: auto; }
@media (min-width: 860px) { .scrub__media { width: min(100%, 124svh); margin-inline: 0 auto; } }
.scrub__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .45s, transform .45s;
}
/* 3枚を重ねているので、非表示の2枚は必ず opacity 0 にする。
   JSが動かない環境では data-active が付かないため、既定は「1枚目だけ見える」。 */
.scrub__media img { opacity: 0; }
.scrub__media img:first-child { opacity: 1; }
.js .scrub__media img[data-active="false"] { opacity: 0; transform: scale(1.02); }
.js .scrub__media img[data-active="true"] { opacity: 1; transform: none; }
.scrub__h {
  display: block; font-weight: 800; letter-spacing: -.01em; line-height: 1.15;
  font-size: clamp(30px, 6vw, 62px); margin: 14px 0 12px;
}
.scrub__cap .lead { max-width: 26em; }
.scrub__bar { margin-top: 44px; max-width: 260px; }
.scrub__wheel {
  position: absolute; right: -8vw; top: 50%; z-index: 1;
  width: min(52vw, 520px); height: auto; translate: 0 -50%;
  will-change: transform, opacity;
}
@media (max-width: 700px) { .scrub__wheel { right: -22vw; opacity: .5; } }

/* ============ THE SHOP ============ */
.shop-grid { display: grid; gap: clamp(16px, 3vw, 32px); margin-top: clamp(32px, 6vw, 64px); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.shop-grid__item { margin: 0; }
.shop-grid__item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.shop-grid figcaption { margin-top: 12px; font-size: 13px; color: var(--fg-dim); }
.shop-grid figcaption .fig { display: block; margin-bottom: 4px; }

/* ============ BRANDS ============ */
/* 仕切りはグリッドの地色ではなくセルの罫線で引く。auto-fit の列数は画面幅で
   変わるので、最終行に端数が出ると地色がそのまま大きな四角として残ってしまう。
   負のマージンで隣り合う罫線を重ねれば、何列になっても破綻しない。 */
.brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: clamp(28px, 5vw, 52px) 0; }
.brands li {
  background: var(--bg); padding: 26px 18px;
  border: 1px solid var(--line); margin: -1px 0 0 -1px;
  display: grid; gap: 10px; align-content: center; justify-items: center; text-align: center;
}
/* ロゴは他社の商標。単色白へ揃えてあるので、色ではなく明度だけで主従をつける。
   セル内の高さは 56px に固定する。ロゴの縦横比がばらつくと行が波打つため。 */
.brands img {
  width: 100%; max-width: 168px; height: auto; aspect-ratio: 3 / 1; object-fit: contain;
  opacity: .82; transition: opacity .35s cubic-bezier(.2, .8, .2, 1);
}
.brands li:hover img { opacity: 1; }
.brands strong {
  font-family: var(--font-en); font-size: clamp(17px, 2vw, 22px); font-weight: 800; letter-spacing: .02em;
  display: grid; place-items: center; min-height: 56px;  /* ロゴ画像の高さに合わせる */
}
.brands span { font-size: 11px; letter-spacing: .1em; color: var(--fg-dim); }

/* ============ SERVICE（スタッキング） ============ */
.svc { min-height: 100svh; display: grid; align-content: center; }
.svc__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.svc__text h2 { margin: 16px 0 18px; }
.svc__text .lead { max-width: 26em; }
.svc__text .btn { margin-top: 26px; }
/* 見出しを挟まずに svc__inner が続く場合の間隔。
   **ブロック間の余白が、ブロック内の余白より広くなければ、
   どこで切れているのか読めない。**

   /maintenance/ で実測したところ、ブロック間 28px に対して
   ブロック内（画像と本文のあいだ）が 24px しかなく、3つのサービスが
   地続きに見えていた。広い画面ではさらに悪く、ブロック間 52px に対して
   段組みの gap が 64px で、**内側のほうが広い**状態だった。

   /wheel/ のように各 svc__inner の前に h2 がある場合は見出しが区切りに
   なるので、隣接しているときだけに効かせる。 */
.svc__inner + .svc__inner { margin-top: clamp(64px, 9vw, 104px); }

.svc__media { margin: 0; }
.svc__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 860px) {
  .svc { min-height: auto; padding-block: clamp(56px, 12vw, 96px); }
  .svc__inner { grid-template-columns: 1fr; }
  .svc__media { order: -1; }
}

/* ============ PRICE ============ */
.price-excerpt { width: 100%; border-collapse: collapse; margin: clamp(24px, 4vw, 40px) 0; max-width: 620px; }
.price-excerpt th, .price-excerpt td { border-top: 1px solid var(--line); padding: 14px 0; text-align: left; font-weight: 400; }
.price-excerpt td { text-align: right; font-family: var(--font-en); font-variant-numeric: tabular-nums; }

/* ============ WORKS ============ */
.works-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: clamp(28px, 5vw, 52px) 0; }
.works-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.works-grid a { position: relative; display: block; }
.works-grid__spec {
  position: absolute; inset-inline: 0; bottom: 0; padding: 8px 10px;
  background: linear-gradient(180deg, transparent, rgba(10, 10, 11, .85));
  font-family: var(--font-en); font-size: 11px; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.ig { border-top: 1px solid var(--line); padding-top: 28px; display: grid; gap: 18px; }
.ig__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ OTHER ============ */
.other-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1px; background: var(--line); margin: clamp(24px, 4vw, 44px) 0; }
.other-list li { background: var(--bg-2); padding: 18px; font-size: 14px; }
.other-list li::before { content: "— "; color: var(--fg-dim); }

/* ============ FAQ ============ */
.faq { margin-top: clamp(24px, 4vw, 44px); max-width: 780px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 18px 0; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-en); color: var(--fg-dim); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 20px; color: var(--fg-dim); font-size: 14px; margin: 0; }

/* ============ ACCESS ============ */
.access { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); margin-top: clamp(28px, 5vw, 52px); align-items: start; }
.access__map iframe { width: 100%; aspect-ratio: 4 / 3; height: auto; border: 0; display: block; }
.map-load {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3;
  padding: 0; border: 1px solid var(--line); overflow: hidden; text-align: left;
}
.map-load__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-load__label {
  position: absolute; inset-inline: 0; bottom: 0; display: grid; gap: 2px;
  padding: 14px 16px; background: linear-gradient(180deg, transparent, rgba(10, 10, 11, .9));
  font-size: 13px; font-weight: 700;
}
.map-load__label small { font-size: 11px; font-weight: 400; color: var(--fg-dim); }
.map-load:hover, .map-load:focus-visible { border-color: var(--line-strong); }
.map-load__alt { margin-top: 10px; font-size: 12px; color: var(--fg-dim); }
dl.access__info > div, dl.company > div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; border-top: 1px solid var(--line); padding: 14px 0; font-size: 14px; }
dl.access__info dt, dl.company dt { color: var(--fg-dim); font-size: 11px; letter-spacing: .1em; }
dl.access__info dd, dl.company dd { margin: 0; }
dl.company { margin-top: clamp(24px, 4vw, 40px); }

/* ============ CONTACT ============ */
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 4vw, 40px); }
@media (max-width: 860px) {
  .access { grid-template-columns: 1fr; }
  dl.access__info > div, dl.company > div { grid-template-columns: 1fr; gap: 4px; }
}

.hero--emergency { min-height: auto; }
.hero--emergency .hero__inner { padding-top: 110px; padding-bottom: clamp(40px, 7vh, 76px); }
.hero--emergency h1 { font-size: clamp(28px, 5vw, 48px); margin: 14px 0 24px; }
.hero--emergency .lead { max-width: 34em; margin-top: 24px; }

.tel-huge {
  display: inline-grid; gap: 6px; padding: 20px 30px;
  border: 1px solid var(--line-strong); background: rgba(10, 10, 11, .55);
}
.tel-huge__num {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(30px, 6.5vw, 60px); letter-spacing: .01em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tel-huge__sub { font-size: 12px; letter-spacing: .1em; color: var(--fg-dim); }
/* タッチ端末では :hover が発信後に張り付くことがあるため hover 可能な環境に限る。
   キーボード操作向けの :focus-visible は無条件に効かせる。 */
@media (hover: hover) {
  .tel-huge:hover { background: var(--fg); color: var(--bg); }
  .tel-huge:hover .tel-huge__sub { color: rgba(0, 0, 0, .6); }
}
.tel-huge:focus-visible { background: var(--fg); color: var(--bg); }
.tel-huge:focus-visible .tel-huge__sub { color: rgba(0, 0, 0, .6); }
.lead__note { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.road-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); margin: clamp(28px, 5vw, 52px) 0; }
.road-grid > div { background: var(--bg); padding: 26px 22px; }
.road-grid h3 { font-size: 17px; margin-bottom: 10px; }
.road-grid p { font-size: 13.5px; color: var(--fg-dim); }
.notes { font-size: 12px; color: var(--fg-dim); display: grid; gap: 6px; }
.notes li::before { content: "※"; margin-right: 4px; }

/* --- 料金の実例（/tire/）--------------------------------------------------
   料金表は「項目ごとの単価」しか答えない。来店前に知りたいのは合計なので、
   代表車種1台ぶんの内訳図を並べる。元画像が白地なので余白も白で続ける。 */
.price-example { margin: clamp(28px, 5vw, 48px) 0 0; }
.price-example img { width: 100%; max-width: 640px; height: auto; background: #fff; }
.price-example figcaption { margin-top: 12px; font-size: 13px; color: var(--fg-dim); }
/* 測定結果のように**画面の中の文字を読ませる**図版は 640px では潰れる。
   本文幅いっぱいまで使う。写真ではなくデータを見せる図版にだけ付けること。 */
.price-example--wide img { max-width: 100%; }

/* --- フッターのワードマーク ------------------------------------------------ */
.site-footer__mark { width: 100%; max-width: 260px; height: auto; margin-bottom: 18px; opacity: .9; }

/* --- 自社製品（トップの PRODUCTS）------------------------------------------ */
.product-grid {
  display: grid; gap: clamp(16px, 3vw, 32px); margin: clamp(28px, 5vw, 52px) 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.product-grid__item { margin: 0; }
.product-grid__item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-grid figcaption { margin-top: 12px; font-size: 13px; color: var(--fg-dim); }
.product-grid figcaption .fig { display: block; margin-bottom: 4px; }

/* --- 動画（フローティングセンターキャップの実演）--------------------------
   縦位置の素材なので、枠もスマホの形にする。横位置の写真と同じ 3:2 に
   押し込むと上下が切れて、肝心のキャップと回転が見えなくなる。 */
.demo { margin: clamp(28px, 5vw, 52px) 0 0; }
.demo__frame {
  display: block; width: 100%; max-width: 320px; height: auto;
  aspect-ratio: 9 / 16; object-fit: cover; background: var(--bg-2);
  border: 1px solid var(--line);
}
.demo figcaption { margin-top: 12px; font-size: 13px; color: var(--fg-dim); max-width: 34em; }

/* SERVICE の中に置くときは、テキスト列の隣に収める */
.svc__media .demo__frame { max-width: min(100%, 300px); margin-inline: auto; }

/* --- Service 04 は写真が2枚（部品と車両）------------------------------------
   本文が「部品類の買取から、愛車のお乗り換えまで」と2つのことを言っているので、
   絵も2つ要る。横に割ると1枚が小さくなりすぎるため縦に積む。 */
.svc__media--two { display: grid; gap: 10px; }

/* --- 規約系ページ（プライバシーポリシー・404）------------------------------
   読ませる文章が主なので、行長を詰めて見出しの間隔を広げる。
   ヘッダーが固定なので上に余白を足さないと h1 が隠れる。 */
.sec--legal { padding-top: clamp(120px, 18vh, 200px); }
.sec--legal p,
.sec--legal ul { max-width: 38em; }
.sec--legal h2 {
  font-size: clamp(18px, 2.2vw, 24px);
  margin: clamp(32px, 5vw, 56px) 0 12px;
}
.sec--legal .company { margin-top: 20px; }
