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

.th05 .th05_hover {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.th05 .th05_hover:hover .th05_wrap {
  top: 0;
}
.th05 .th05_hover:hover .th05_title {
  top: 20%;
}
@media (max-width: 767px) {
  .th05 .th05_hover .th05_wrap {
    top: 0;
  }
  .th05 .th05_hover .th05_title {
    top: 20%;
  }
}
.th05 .th05_wrap {
  position: absolute;
  top: 80%;
  right: 0;
  left: 0;
  margin: auto;
  background: color-mix(in srgb, color-mix(in srgb, var(--color-primary) 70%, transparent) 70%, transparent);
  height: 100%;
  transition: 0.3s; color: var(--color-on-primary); }
.th05 .th05_title {
  color: var(--color-on-primary);
  position: absolute;
  top: 4%;
  left: 0;
  right: 0;
  margin: auto;
  padding: 0;
  transition: 0.3s;
  line-height: 1;
  font-size: 1.375rem;
}
@media (max-width: 767px) {
  .th05 .th05_title {
    font-size: 1.25rem;
  }
}
.th05 .th05_title:after {
  content: none;
}
.th05 .th05_text {
  color: var(--color-on-primary);
  position: absolute;
  top: 36%;
  left: 0;
  right: 0;
  margin: auto;
  padding: 0 5%;
  line-height: 2;
}
@media (max-width: 767px) {
  .th05 .th05_text {
    line-height: 1.7;
  }
}
.th05 .th05_btn {
  display: block;
  line-height: 1.8;
  position: absolute;
  top: 70%;
  left: 0;
  right: 0;
  margin: auto;
}
.th05 .th05_btn span {
  display: block;
  border: 1px solid var(--color-primary);
  color: var(--color-heading-ink);
  background: var(--color-primary);
  padding: 0.6em;
  margin: 0 auto 1px;
  max-width: 280px;
  width: 100%;
  text-align: center;
  text-decoration: none;
  transition: 0.3s;
  font-size: 0.875rem;
}
@media (min-width: 768px) {
  .th05 .th05_btn span {
    font-size: 1.125rem;
  }
}
.th05 .th05_btn span.inverse {
  border: 1px solid var(--color-primary);
  color: var(--color-heading-ink);
  background: var(--color-primary);
}
.th05 .th05_btn span {
  display: block;
  position: relative;
}
.th05 .th05_btn span:after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  right: 5%;
  margin: auto;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--color-primary);
  border-right: 1px solid var(--color-primary);
  transform: translate(0, -50%) rotate(45deg);
  transition: 0.2s;
}
.th05 .th05_btn span.inverse:after {
  border-top: 1px solid var(--color-primary);
  border-right: 1px solid var(--color-primary);
}
.th05 .th05_btn span.inverse:hover {
  border-color: var(--color-primary);
  color: var(--color-heading-ink);
  background: var(--color-primary);
}
.th05 .th05_btn span.inverse:hover:after {
  border-color: var(--color-primary);
}
.th05 .th05_btn span:hover {
  border: 1px solid var(--color-primary);
  color: var(--color-heading-ink);
  background: var(--color-primary);
}
.th05 .th05_btn span:hover:after {
  right: 4%;
  border-color: var(--color-primary);
}
.th05 .th05_btn span {
  border-color: color-mix(in srgb, var(--color-on-primary) 30%, transparent);
  color: var(--color-on-primary);
  width: calc(100% - 20px);
  font-size: 0.875rem;
  padding: 0.3em 0;
}
@media (max-width: 480px) {
  .th05 .th05_btn span {
    max-width: none;
  }
}
.th05 .th05_btn span:after {
  border-color: var(--color-on-primary);
  right: 8%;
}
.th05 .th05_btn span:hover {
  color: var(--color-text);
}
.th05 .th05_btn span:hover:after {
  border-color: var(--color-text);
}

/* SM-FIX-20260819 */
/* 2026-08-19: 文字が写真に埋もれて読めない。.th05_wrap の帯は color-mix を二重に
   掛けて実効 49% 透過しかなく、その上に --color-on-primary の文字（実サイトの大半で
   #111111）を置いていた。帯を十分に濃くすれば on-primary は本来の
   「ブランド色ベタ面の上の文字色」として正しく効く。 */
.th05 .th05_wrap{ background: color-mix(in srgb, var(--color-primary) 88%, transparent); }

/* ============================================================================
   SM-FIX-20260821 — 05_banner-cta-th05-bnr（骨格確定型 / CSS のみ）
   受領時の欠陥修復。意匠は1つも足していない（線・三角・斜めマスク・四隅の枠線・
   地の帯・角丸・影・グラデーションを追加しない）。構図＝「等幅3列／文字は写真の上／
   下端からブランド色の面が立ち上がる」は受領時のまま。直したのは
   ①高さの決まり方 ②色とフォントの届き方 の2つだけ。
   実測の根拠: .company/engineering/plans/banner-cta-th05-bnr-plan.md ③
   ============================================================================ */

.th05 {
  /* 変数はルート要素に置く（:root への定義は禁止 / design-principles 1） */
  --th05-veil: 92%;                             /* 帯の不透明度（実測で決定。§③-4） */
  --th05-ratio: 4 / 5;                          /* PC の写真枠（実測で決定。§⑤-2） */
  --th05-ratio-sp: 4 / 3;                       /* SP の写真枠 */
  --th05-pad-b: clamp(0.75rem, 1.6vw, 1.25rem); /* 帯の上下パディング */
  --th05-pad-i: clamp(0.75rem, 2.4vw, 1.5rem);  /* 帯の左右パディング */
  --th05-gap: clamp(0.375rem, 1vw, 0.75rem);    /* 帯の中の行間 */
  --th05-open: 20rem;                           /* 帯が開くときの【上限】。高さの固定ではない（R-5） */
}

/* --- ① 版面: 1000px の島をやめ、common.css の .container と同値にそろえる -------
   受領時は土台の .lgx .container が max-width:1000px で、1920px では左右に 460px ずつ
   余る孤島になり、写真1枚が 320px しかなかった（＝「写真の見栄えで押す」部品の
   存在理由に反する）。★独自の幅は発明せず、サイトの他セクションと左右が
   1px もズレない値にそろえる。 */
.th05 .container {
  max-width: 1440px;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* --- ② 写真枠に比率を与える（R-5） ---------------------------------------------
   受領時は img が height:auto で、写真の実比率がそのままカードの高さになっていた。
   案件ごとに縦長・パノラマが来るので器の高さが暴れる。
   ★縦長にしているのは意匠の好みではない。帯の高さは中身の量（PC で 149〜227px）で
   決まるので、受領時の 1.833:1（枠の高さ 127〜242px）では帯が写真を丸ごと覆う。
   受領時は SP で写真の階調が 12.7% しか残っていなかった（実測）。 */
.th05 .th05_hover > figure {
  margin: 0;
  aspect-ratio: var(--th05-ratio);
  overflow: hidden;
}
.th05 .th05_hover > figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* common.css の img{max-height:800px} は「高さが intrinsic な内容画像」向けの上限。
     器と比率で高さが決まる cover の画像は、同 CSS の方針どおり上限を外す。 */
  max-height: none;
}

/* --- ③ 帯: 高さを「中身の量」で決める -------------------------------------------
   受領時は top:80% + height:100% の固定で、次の2つが同時に起きていた。
   ・rest で覗く量が器の 20% しかなく、タイトルの行箱（土台の .lgx .col p{line-height:1.8}
     が効くため 39.6px）が入りきらず【全PC幅で切れていた】
     （実測 240/576 パターン・最大 58.3px。配色4種×フォント4種で数値が1つも動かない
     ＝意匠ではなく構造欠陥）
   ・hover では中身が top:4% / 36% / 70% の絶対配置で逃げ場が無く、
     短文が切れ（96 パターン・最大 95.7px）、短文と MORE が重なっていた（112 パターン）
   → 帯を器の下端に貼り、高さは中身に任せる。カードの高さは figure（比率）だけで
     決まるので、ホバーでカードの矩形は 1px も動かない。 */
.th05 .th05_hover .th05_wrap,
.th05 .th05_hover:hover .th05_wrap {
  position: absolute;
  inset: auto 0 0 0;   /* top:auto。受領時の top:80% と :hover{top:0} を無効化する */
  height: auto;
  display: flex;
  flex-direction: column;
  padding: var(--th05-pad-b) var(--th05-pad-i);
  background: color-mix(in srgb, var(--color-primary) var(--th05-veil), transparent);
  color: var(--color-on-primary);
  /* 土台の .lgx a{text-decoration:underline}(0,1,1) を止める。受領時は中身が
     position:absolute だったため下線が伝播せず、実描画では下線が無かった
     （text-decoration は絶対配置の子孫へ伝播しない）。中身を通常フローへ戻すと
     下線が出てしまうので、受領時の見た目に合わせて明示的に消す。 */
  text-decoration: none;
}

/* rest で覗くのはタイトルの行数ぶんちょうど（覗き量にマジックナンバーを置かない） */
.th05 .th05_wrap .th05_title {
  position: static;
  margin: 0;
  padding: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-mod-title);
  /* 土台の .lgx .col p{line-height:1.8}(0,2,1) に (0,3,0) で勝つ。
     受領時の .th05 .th05_title{line-height:1}(0,2,0) は一度も効いていなかった。 */
  line-height: 1.35;
  color: var(--color-on-primary);
}
.th05 .th05_wrap .th05_text,
.th05 .th05_wrap .th05_btn {
  position: static;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: 0.3s;
}
.th05 .th05_wrap .th05_text {
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--color-on-primary);
}

/* hover / キーボードフォーカス で帯が中身のぶんだけ立ち上がる（受領時と同じ動き・同じ 0.3s） */
.th05 .th05_hover:hover .th05_text,
.th05 .th05_hover:hover .th05_btn,
.th05 .th05_hover:focus-within .th05_text,
.th05 .th05_hover:focus-within .th05_btn {
  max-height: var(--th05-open);
  margin-top: var(--th05-gap);
}

/* --- ④ 土台の a:hover{opacity:.8} を打ち消す ------------------------------------
   common.css:106 の a:hover{opacity:.8} は、カード全体が <a> の部品では帯も文字も
   まとめて背後の写真とブレンドする。受領時は 252 判定中 39 件が 4.5 未満、
   最悪 3.39（既定 × 黒い写真 × hover）だった。
   ホバーの合図は「帯が立ち上がる」「矢印が右へ寄る」の幾何で足りているので減光は要らない。
   詳細度: a:hover (0,1,1) < .th05 .th05_hover .th05_wrap:hover (0,4,0) */
.th05 .th05_hover .th05_wrap:hover,
.th05 .th05_hover .th05_wrap:focus-visible,
.th05 .th05_hover:hover .th05_wrap {
  opacity: 1;
}

/* --- ⑤ MORE ------------------------------------------------------------------ */
.th05 .th05_wrap .th05_btn span {
  font-family: var(--font-body);
  font-size: var(--fs-small);
}
/* 受領時の .th05 .th05_btn span:hover{ color: var(--color-text) } は、ブランド色の帯の上に
   本文色を置くため 4配色 × 写真3種の【12通りすべて】で 4.5 を割っていた
   （濃色ネイビーで 1.06 / 1.11 / 1.33 ＝ 紺地に紺文字で MORE が消える）。
   rest と同じトークンの組（面 = primary / 文字 = on-primary）に戻し、
   ホバーの合図は受領時からある矢印の右寄せ（right:8% → 4%）だけで取る。 */
.th05 .th05_wrap .th05_btn span:hover,
.th05 .th05_wrap .th05_btn span:focus-visible {
  color: var(--color-on-primary);
  border-color: color-mix(in srgb, var(--color-on-primary) 30%, transparent);
  background: var(--color-primary);
}
.th05 .th05_wrap .th05_btn span:hover:after {
  border-color: var(--color-on-primary);
}

/* --- ⑥ SP -----------------------------------------------------------------------
   境界を規約 R-6 の 768 ではなく 767 にしているのは、土台 module-base.css の
   @media(min-width:768px){ .lgx .col{float:left} } と【同じ境界】に合わせるため。
   768 にすると「3列のまま帯が開きっぱなし」という最悪の状態が 768px ちょうど
   （検収幅の1つ）で出る。lint の R6-bp は ⚠ 止まりなので理由をここに残す。 */
@media (max-width: 767px) {
  .th05 .th05_hover > figure {
    aspect-ratio: var(--th05-ratio-sp);
  }
  /* SP はタッチ端末にホバーが無いので常時展開（受領時と同じ挙動）。
     ただし帯は中身のぶんだけなので、写真は帯の上に素のまま残る。 */
  .th05 .th05_hover .th05_text,
  .th05 .th05_hover .th05_btn {
    max-height: none;
    margin-top: var(--th05-gap);
  }
}

/* --- ⑦ prefers-reduced-motion ---------------------------------------------------
   common.css が *{transition-duration:.01ms !important} で既に止めている（対照実験で確認）が、
   元の transition と【同じ深さ】で明示しておく（浅く書いた停止指定が後から詳細度負け
   する罠の予防。R-9 / lint R9-motion）。 */
@media (prefers-reduced-motion: reduce) {
  .th05 .th05_hover .th05_wrap,
  .th05 .th05_wrap .th05_title,
  .th05 .th05_wrap .th05_text,
  .th05 .th05_wrap .th05_btn,
  .th05 .th05_wrap .th05_btn span,
  .th05 .th05_wrap .th05_btn span:after {
    transition: none;
  }
}
