/* features-th15.css — ベースライン(自動読込・module-base.css前提)。編集せず上書きで調整。 */
@charset "UTF-8";

/* ============================================================================
   features-th15 / 番号付き50/50ブロック
   骨格確定型。class 名と DOM 構造は受領時のまま（HTML は img の width/height 属性のみ追加）。
   構図と意匠材料 ── 淡色の面・面から突き出す特大の連番・見出しから右へ走る2px線・
   横長のボタン ── は1つも変えていない。直したのは実測で出た欠陥だけ。
   ============================================================================ */

.th15_module {
  /* 連番が面の上端から飛び出す量。受領時は top:-12.5% と面の高さに依存していて
     41.1〜45.8px に振れていた。SP では写真が面の真上に接するので、
     同じ量の余白を写真の下にも取って連番が写真に載らないようにする。
     2箇所から参照するため固定量にする（42px は受領時の実測値のほぼ中央）。 */
  --th15-num-rise: 42px;
}

.th15_module .th15_module_wrap :is(h2:where(:not([data-sm-h])),:where([data-sm-h="h2"])) {
  font-weight: bold;
  /* 受領時は 2rem 直値で、375px でも 32px のままだった（R-4 / R-6）。
     fallback を受領時と同値にしてあるので、トークンが未定義の案件でも見た目は変わらない。 */
  font-size: var(--fs-h2, 2rem);
  /* 保険。common.css の素の見出しへの指定が既に当たっているので既定では冗長だが、
     生成サイト側にその指定が無い場合に土台の Arial へ落ちるのを防ぐ。 */
  font-family: var(--font-heading);
  margin: 0 0 1em;
  position: relative;
  padding-top: 45px;
  text-align: left;
  /* ★1200px の線を切る器。受領時はテキスト列の器（text_wrap）が切っていたが、
     そこで切るとボタンのフォーカスリングまで一緒に刈られる。
     線の包含ブロックはこの h2 なので、ここで切れば線だけを切れる。
     中身は文字だけなので、他に切られて困るものは無い。
     hidden を先に書いてあるのは clip 非対応の環境向けの素のフォールバック
     （hidden でも線は同じ位置で切れる。clip はスクロール領域を作らないぶんだけ上等）。 */
  overflow: hidden;
  overflow: clip;
}
.th15_module .th15_module_wrap :is(h2:where(:not([data-sm-h])),:where([data-sm-h="h2"])):after {
  content: "";
  width: 1200px;
  position: absolute;
  height: 2px;
  margin-left: 10px;
  background: var(--color-primary);
  /* ★受領時は top を 58px の固定値で置いていた。
     left が auto なので横の起点は「最後の行の末尾」になるのに、縦は常に1行目。
     見出しが2行になった瞬間に基準がずれ、線が1行目の文字を 316〜754px 貫通していた。
     縦も最終行に合わせる。top を auto にするとブロックの静的位置＝最終行の【下】へ落ちるので、
     bottom で最終行の視覚中心を指す。
     0.5em ＝ 土台が h2 に与える padding-bottom ／ 0.65em ＝ line-height 1.3 の半分。 */
  top: auto;
  bottom: calc(0.5em + 0.65em - 1px);
  /* lh が使える環境では line-height の実値に追従する。非対応なら宣言ごと落ちて上の行が残る。 */
  bottom: calc(0.5em + 0.5lh - 1px);
  /* ★display:inline は消さない。絶対配置で display はブロック化されるが、
     この宣言があると left の静的位置が【インライン＝テキストの末尾】になる。
     消すと線が見出しの頭から走る（実測で確認）。 */
  display: inline;
  transform: none;
  left: auto;
  color: var(--color-on-primary);
}
.th15_module .th15_module_wrap :is(h2:where(:not([data-sm-h])),:where([data-sm-h="h2"])):before {
  content: none;
}

/* ---- ボタン --------------------------------------------------------------
   受領時は padding の 5em が土台の max-width:280px を食い尽くし、
   PC ではコンテンツ幅が 0px になっていた。日本語ラベルは文字間で改行できるので
   「詳しく見る」が5行・「お問い合わせはこちら」が10行（高さ 364.8px）に割れていた。
   ★ボタンの見た目の幅は max-width が決めているので、padding を詰めても幅は変わらない。
   セレクタを (0,4,1) にして土台の (0,2,1) に勝たせ、受領時の !important を外した。 */
.th15_module .th15_module_wrap .more a.button {
  border-radius: 0;
  padding: 1.3em 2em;
  margin: 1em 0 0 0;
  /* 受領時は土台の 1.4rem / 1.8rem がそのまま出て、PC で 28.8px（本文より大きい）だった。 */
  font-size: var(--fs-body, 1rem);
  font-family: var(--font-body);
  /* ★土台は line-height:1。14全角字を超えるラベルは 280px の中で2行になるので、
     そのとき行間ゼロで字が接触する。折れても読める行間にしておく。 */
  line-height: 1.4;
  /* 土台の transition は省略形の .3s ＝ all。幅が 768px を跨ぐと
     font-size と padding が 0.3 秒かけて補間され、ボタンが伸び縮みしていた。 */
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, filter 0.3s;
}
.th15_module .button.add_arrow {
  display: inline-block;
}
.th15_module .button.add_arrow:after {
  /* ★fallback を付ける。ショートハンドの値が1つでも無効だと border ごと IACVT になり、
     border-style が none に落ちて矢印が消える。土台側の同名指定は詳細度で負けるので救済にならない。 */
  border-top: 1px solid var(--color-on-primary, #fff);
  border-right: 1px solid var(--color-on-primary, #fff);
  transition: right 0.2s, border-color 0.2s;
}
/* ★ホバーの可読性。土台の2つの後追い修正が噛み合っておらず、
   面は var(--color-primary) のまま・文字だけ color-mix で 68% 暗くなるので、
   実画素の比が 4配色すべてで 1.15〜1.71 まで落ちていた（AA は 4.5）。
   さらに common.css の a:hover ｛opacity:.8｝ が面と文字を同時に地の白へ寄せるため、
   正しいインクを当てても 3.73 までしか戻らない。この部品の中でだけ不透明に戻す。
   ホバーの合図は面の明度（filter）と矢印の移動が担う。 */
.th15_module .th15_module_wrap .more a.button.add_arrow:hover {
  background: var(--color-primary);
  color: var(--color-on-primary, #fff);
  border-color: var(--color-primary);
  opacity: 1;
  filter: brightness(0.9);
}
.th15_module .th15_module_wrap .more a.button.add_arrow:hover:after {
  border-top-color: var(--color-on-primary, #fff);
  border-right-color: var(--color-on-primary, #fff);
}
/* ★キーボードのフォーカスリング。common.css は outline-offset:2px で border box の
   外側に描くが、土台の .lgx .more が overflow:hidden なので、
   ボタンと左端を共有する左辺と、1px はみ出す下辺が刈られていた（実測で上と右の2辺だけ）。
   この器は inline-block を1つ抱えるだけで float を含まないため、刈る必要が無い。 */
.th15_module .th15_module_wrap .more {
  overflow: visible;
}
/* ★リングの色。common.css はリングを currentColor で描くので、色は
   ボタンのインク（on-primary）になる。だがリングは outline-offset:2px で
   ボタンの外＝淡色の面の上に描かれるため、on-primary が #fff になる案件
   （濃色ネイビー・高彩度レッド）では面と同化して実画素で 1.09〜1.10 しかない。
   面の上で読める濃色インクを渡す。 */
.th15_module .th15_module_wrap .more a.button:focus-visible {
  outline-color: var(--color-heading-ink, var(--color-text));
}

.th15_module .th15_module_wrap .th15_module_img_box figure .th15_module_sp {
  display: none;
}
/* ★HTML に足した width / height 属性は、レイアウトシフト防止のために器の寸法を
   先に確保させるためのもの（実測: 属性なしだと読み込み前の予約が 0x0、属性ありで 640x349.1）。
   ただし属性は width の presentational hint も生むため、幅が auto でなくなる。
   すると common.css の max-height:800px に当たったときに幅を比率で計算し直せず、
   縦長・正方の写真が横に伸びていた（実測 1920px で 1000x1000 の素材が 960x800）。
   幅を明示したうえで object-fit に比率を守らせる。scale-down は
   「器より大きければ収める・小さければ原寸のまま」なので、
   cover のようなクロップも、contain のような小さい素材の引き伸ばしも起こさない
   ＝ README の「クロップも寄せも無い」を保てる。
   実測（素材比5種 × 幅4種）: 同梱 1408x768 は全幅で受領時と同値、
   縦長 900x1200 は 1920px で 600x800（受領時と同値）、
   正方 1000x1000 は 800x800（受領時は 960x800 と横に伸びていた）、
   300x200 の小さい素材は全幅で原寸のまま（受領時と同値）。 */
.th15_module .th15_module_wrap .th15_module_img_box figure img {
  width: 100%;
  height: auto;
  max-height: 800px;
  object-fit: scale-down;
}
.th15_module .th15_module_wrap .th15_module_text_box {
  position: relative;
  background: var(--color-surface);
}
.th15_module .th15_module_wrap .th15_module_text_box .th15_module_num {
  position: absolute;
  /* 受領時は -12.5%（面の高さ依存）。固定量にして SP の余白と一致させる。 */
  top: calc(-1 * var(--th15-num-rise, 42px));
}
.th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap {
  /* ★受領時はここが overflow:hidden だった。目的は「1200px の線をはみ出させて切る」ことだが、
     それは線の包含ブロックである h2 自身で切れば足りる（上の h2 の overflow:clip）。
     この器で切ると、ボタンの outline-offset:2px のフォーカスリングまで一緒に刈られる
     （実測: 受領時は上と右の2辺しか描かれていなかった。ボタンの左端がこの器の左端と同じ x、
     下端がこの器の下端と同じ y なので、左辺と下辺が消える）。
     切る役目を h2 へ移したので、ここは逃がす。
     ★overflow-clip-margin に頼らないのは、対応していないブラウザでリングが再び刈られるため。 */
  overflow: visible;
}
.th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap .th15_module_num {
  /* ★連番の書体・字寸・行送りは README が意匠として指定している値なので受領時のまま。 */
  font-family: arial, sans-serif;
  font-weight: bold;
  font-size: 70px;
  color: var(--color-heading-ink);
  line-height: 70px;
}
/* ★セレクタを (0,5,1) まで上げてある。受領時の (0,2,1) のままだと、
   common.css の .section p:not(...) が (0,4,1) で勝ち、本文が 22.4px に戻る
   （生成ページでモジュールの祖先に .section が付く経路がありうる。実測で再現した）。 */
.th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap p:not(.th15_module_num) {
  line-height: 2em;
  /* 受領時は土台の .lgx が 1.4em を渡すので本文が 22.4px だった。 */
  font-size: var(--fs-body, 1rem);
  /* ★土台の .lgx が Arial を渡すので、フォントプリセットが本文に1つも届いていなかった。
     これで ゴシック / 明朝 / 丸ゴシック の3プリセットは届くようになる。
     ただし【既定プリセットは依然 Arial のまま】＝ common.css の --font-body が
     末尾カンマで終端していて、置換後の値がパース不能になり宣言ごと落ちるため。
     モジュール側では直せない（先方指摘）。 */
  font-family: var(--font-body);
}

@media (min-width: 768px) {
  .th15_module .th15_module_wrap {
    position: relative;
    margin-top: 70px;
    width: 100%;
  }
  .th15_module .th15_module_wrap .th15_module_img_box {
    float: right;
    width: 50%;
    padding-top: 50px;
  }
  .th15_module .th15_module_wrap .th15_module_text_box {
    width: 50%;
    float: right;
    margin: 0;
    padding: 0 30px 30px;
  }
  /* ★受領時は 570px 固定で、器がそれより狭い帯域（768〜1220px）では
     別ブロックが width:auto に切り替えていた。auto は float の shrink-to-fit なので
     ボタンの max-width:280px に引きずられ、内寸 540px の器で 280px しか使わず右へ寄っていた。
     上限だけ 570px に残して器に合わせる。1280px 以上の実寸は受領時と同値。 */
  .th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap {
    width: -webkit-calc((1200px / 2) - 30px);
    width: min(calc(1200px / 2 - 30px), 100%);
    float: right;
  }
  .th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap:after {
    content: "";
    clear: both;
    height: 0;
    display: block;
    visibility: hidden;
  }
  .th15_module .th15_module_wrap .th15_module_text_box:after {
    content: "";
    clear: both;
    height: 0;
    display: block;
    visibility: hidden;
  }
  .th15_module .th15_module_wrap:after {
    content: "";
    clear: both;
    height: 0;
    display: block;
    visibility: hidden;
  }
}

/* ★受領時にあった @media (max-width:1220px) and (min-width:768px) のブロックは削除した。
   写真の器とテキストの器を両方 calc(1200px / 2) ＝ 600px の固定幅にし、
   写真の器だけ position:absolute で右端に貼る作りだったため、
   ビューポートが 1200px 未満だと 600 + 600 が必ず重なり、
   不透明な var(--color-surface) の面が写真を覆っていた。
   実測の写真の可視率は 768px で 0.28・900px で 0.50・1024px で 0.71。
   上の width:50% の float だけで全幅が成立するので、特殊扱いそのものが不要。
   ぶら下がっていた min-height の calc(334px + 50px) も絶対配置のつっかえ棒なので外した。 */

@media (max-width: 767px) {
  .th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap {
    padding: 0 0 1em;
    width: 92%;
    margin-left: auto;
    margin-right: auto;
  }
  /* ★SP は写真が面の真上に接するので、連番の飛び出しぶんがそのまま写真に載っていた
     （実測 375px でグリフ 1177 画素・最悪コントラスト 1.35）。
     写真は案件ごとに差し替わるので、明暗に可読性を預けない。 */
  .th15_module .th15_module_wrap .th15_module_img_box {
    margin-bottom: var(--th15-num-rise, 42px);
  }
}

/* ★受領時の @media (max-width:480px) のブロックは削除した。
   写真に max-width:480px を当てていたため、375px の画面で 105px はみ出し、
   写真の右 22% が無言で切れていた（土台の overflow-x が刈るので横スクロールは出ない）。
   土台の img の max-width:100% に任せれば器に収まる。 */

/* ---- 本番の2カラムページ（body.two_column） --------------------------------
   プレビュー単体には body.two_column が付かないので lint も triage も見ていない経路。
   受領時は figure 内の img に max-width:none を当てていたため、器が 600px 固定なのに
   画像が自然幅（同梱サンプルで 1408px）のまま描かれ、実測で右へ 808px 抜けていた
   （土台の overflow-x:clip が刈るので画面は割れないが、写真の右 57% が常に消える）。
   1カラムと同じ 50/50 の float に揃え、本文カラムが狭い 1200px 以下では縦積みにする。 */
@media (min-width: 768px) and (max-width: 1200px) {
  body.two_column .th15_module .th15_module_wrap .th15_module_img_box {
    position: static;
    float: none;
    width: 100%;
    padding-top: 0;
    /* ★ここも縦積みなので、1カラムの SP と同じく連番のぶんの余白が要る。
       これが無いと 768〜1200px の2カラムページで連番が写真の上に 42px 載る（実測）。 */
    margin-bottom: var(--th15-num-rise, 42px);
  }
  body.two_column .th15_module .th15_module_wrap .th15_module_text_box {
    float: none;
    width: 100%;
  }
  body.two_column .th15_module .th15_module_wrap .th15_module_text_box .th15_module_text_wrap {
    width: auto;
    float: none;
  }
}
@media (max-width: 767px) {
  body.two_column .th15_module .th15_module_wrap .th15_module_text_box {
    padding: 1em;
  }
}

/* ★動きを減らす設定。この部品は transform も keyframes も1つも持たず、
   ホバーで変わるのは面の明度・文字色・矢印の位置だけなので、補間を止めれば動きは残らない。
   ホバーの終状態は変えない（可読性の修正を reduce 側で失わないため）。 */
@media (prefers-reduced-motion: reduce) {
  .th15_module .th15_module_wrap .more a.button,
  .th15_module .button.add_arrow:after {
    transition: none;
  }
}
