/* ============================================================
   wp-bridge.css  (WordPress 上で新 LP を出すための最小 CSS)
   - トップの NEWS 帯([denari_news_latest] の出力)を新 LP のトーンに寄せる
   - ログイン中に出る管理バー(#wpadminbar)とページ内リンクの位置を合わせる
   NEWS 帯の HTML は functions.php の denari_news_latest_shortcode() が出す。
   中身は Tailwind のクラス名だが、トップでは Tailwind を読み込まないので、
   タグ構造(section#news > div > a > span/time)でセレクタを書いている。
   ============================================================ */

/* html の背景色(2026-10-31 白い点滅の追加対策)。描画やページ切り替えの隙間に何か見えても、
   白ではなく FV 背景の最上部と同じ淡い水色になるようにする。style-1.css の body { background: #fff } は変えない */
html {
  background-color: #f3f9ff;
}

/* NEWS 帯の外枠(記事が無いときは空になるので非表示) */
.lp-news {
  background: #f5faff;                      /* 新 LP の淡い水色に寄せた帯 */
  border-bottom: 1px solid #d6eaf8;
}
.lp-news:empty { display: none; }

.lp-news #news {
  margin: 0;
  background: transparent !important;
  border: 0 !important;
}
/* 幅はヘッダー(.landing-header_inner__pkt_4)と同じ */
.lp-news #news > div {
  width: min(1440px, 83.5%);
  margin-inline: auto;
  padding-block: 12px;
}
.lp-news #news a {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--navy, #081e4d);
  text-decoration: none;
}
.lp-news #news a > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
/* ラベル「NEWS」: 新 LP のバッジと同じ丸いピル・青地に白(ショートコード側の style="background:#0b1d30" を上書き。2026-10-31 変更) */
.lp-news #news a > span:first-child > span {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue, #1157c9) !important;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .14em;
}
.lp-news #news time {
  color: #6b7f9e;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
.lp-news #news a > span:last-child {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--navy, #081e4d);
}
.lp-news #news a > span:last-child::after {
  content: "→";
  margin-left: 10px;
  color: var(--blue, #1157c9);
  font-weight: 700;
  transition: margin-left .3s ease;
}
.lp-news #news a:hover > span:last-child::after { margin-left: 16px; }
/* ホバーは色が青に変わる+「→」が少し動くだけ。下線は出さない(通常時・ホバー時とも。2026-10-31 変更) */
.lp-news #news a:hover > span:last-child {
  color: var(--blue, #1157c9);
  text-decoration: none;
}
.lp-news #news a:focus-visible {
  outline: 2px solid var(--blue, #1157c9);
  outline-offset: 4px;
}
/* 2 件を 1 件ぶんの高さで見せる(2026-11-25 夜 変更)
   帯の高さは 1 件のときと同じ。2 件を同じ場所に重ねておき、マウスを載せて少しすると、
   横長の四角柱が 1/4 回転するように前のお知らせへ切り替わる。マウスを外すと最新の 1 件に戻る。
   回転と右端の切り替えボタン(点)は lp/assets/js/news-band.js が受け持つ(#news に .is-prism を付ける)。
   JS が動かない環境では、マウスを載せると 2 件目にふわっと入れ替わるだけの簡易表示になる。
   1 件しか無いときは今までどおり(重ねる相手がいないだけ)。 */
.lp-news #news > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  padding-block: 0;                         /* 上下の余白は a 側に移す(面を帯の高さいっぱいにして、柱に厚みを出す) */
  perspective: 900px;
}
.lp-news #news a {
  grid-area: 1 / 1;                         /* 全件を同じマスに重ねる(高さは一番長いタイトルに揃う) */
  position: relative;
  padding-block: 12px;
  background: #f5faff;                      /* 帯と同じ色で面を塗る(回転中に裏の面が透けないように) */
}
.lp-news #news a:focus-visible { outline-offset: -3px; }
.lp-news #news a + a { opacity: 0; visibility: hidden; }

/* JS なしの簡易表示: 0.6 秒載せたままにすると 2 件目に入れ替わる */
.lp-news #news:not(.is-prism) a { transition: opacity .4s ease, visibility 0s; }
.lp-news #news:not(.is-prism) a + a { transition: opacity .4s ease, visibility 0s linear .4s; }
.lp-news #news:not(.is-prism):hover a:not(:last-of-type) {
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease .6s, visibility 0s linear 1s;
}
.lp-news #news:not(.is-prism):hover a + a {
  opacity: 1;
  visibility: visible;
  transition: opacity .4s ease .6s, visibility 0s linear .6s;
}

/* 四角柱の回転(news-band.js が data-face を付け替える)
   どの面も「面の奥、高さの半分の位置」を軸に回す = 柱の中心軸。手前の面が 0 度、下の面が -90 度、上の面が 90 度。
   --news-h(面の高さ)は JS が実測して入れる。 */
.lp-news #news.is-prism a {
  opacity: 1;
  visibility: hidden;                       /* 隠れている面はクリックも受けない。回転中は 2 面とも見えていて、マウスの下に見えている面がクリック先になる */
  transform-origin: 50% 50% calc(var(--news-h, 72px) / -2);
  transform: rotateX(-90deg);               /* 既定 = 下の面(次に手前へ出てくる側) */
  /* 回転は 2.1 秒かけてゆっくり(2026-11-25 本人指定。試作の 0.7 秒の 3 倍)。news-band.js はこの値を読んで合わせる */
  transition: transform 2.1s cubic-bezier(.6, .04, .22, 1), visibility 0s linear 2.1s;
  backface-visibility: hidden;
}
.lp-news #news.is-prism a[data-face="above"] { transform: rotateX(90deg); }
.lp-news #news.is-prism a[data-face="cur"] {
  visibility: visible;
  transform: rotateX(0deg);
  transition-delay: 0s, 0s;
}
/* 面の陰影: 下の面は暗く、上の面は明るく、手前の面は素のまま。回転に合わせて変わり、立体に見える */
.lp-news #news.is-prism a::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 30, 77, .22), rgba(8, 30, 77, .08));
  opacity: 1;
  transition: opacity 2.1s cubic-bezier(.6, .04, .22, 1);
}
.lp-news #news.is-prism a[data-face="above"]::before { background: #fff; opacity: .75; }
.lp-news #news.is-prism a[data-face="cur"]::before { opacity: 0; }
.lp-news #news a.lp-news-noanim,
.lp-news #news a.lp-news-noanim::before { transition: none !important; }

/* 右端の切り替えボタン(縦に並ぶ点。今見えている件が青い縦長) */
.lp-news-dots {
  grid-area: 1 / 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.lp-news-dots button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 14px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.lp-news-dots button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #b7cdea;
  transition: height .3s ease, background-color .3s ease;
}
.lp-news-dots button:hover::before { background: var(--blue, #1157c9); }
.lp-news-dots button[aria-current="true"]::before { height: 12px; background: var(--blue, #1157c9); }
.lp-news-dots button:focus-visible {
  outline: 2px solid var(--blue, #1157c9);
  outline-offset: 1px;
  border-radius: 4px;
}
/* 「視差効果を減らす」設定では回転させず、すぐ入れ替える */
@media (prefers-reduced-motion: reduce) {
  .lp-news #news a,
  .lp-news #news a::before { transition: none !important; }
}
@media (max-width: 1100px) {
  .lp-news #news > div { width: calc(100% - 64px); }
}
@media (max-width: 650px) {
  .lp-news { display: none; }               /* スマホでは NEWS 帯を出さない(2026-10-31) */
  .lp-news #news > div { width: calc(100% - 32px); padding-block: 10px; }
  .lp-news #news a { flex-direction: column; align-items: flex-start; gap: 4px; }
  .lp-news #news a > span:last-child { font-size: 14px; }
}

/* ログイン中(管理バーあり)は、ページ内リンクの着地位置を管理バーの高さぶん下げる */
html:has(#wpadminbar) { scroll-padding-top: 62px; }
@media (max-width: 782px) {
  html:has(#wpadminbar) { scroll-padding-top: 76px; }
}

/* PC ナビの詰め(2026-10-31 追加): ナビに「経営シミュレーション」を足して 6 項目になったため、ロゴ・ナビ・資料ボタンが
   1 行に収まらない幅だけ、ナビの文字と間隔を 1 段小さくする(style-2.css は触らずここで上書き)。
   実測(Chromium・Windows のスクロールバー 17px 込み)で、元の値のままだと 1101〜1250px(12px / 15px)で最大約 45px、
   1251〜1440px(14px / 25〜29px)で最大約 120px はみ出していた。1441px 以上は元の値のままで収まる。 */
@media (max-width:1250px) and (min-width:1101px) {
  .landing-header_navigation__2r1gV {
    font-size: 11px;
    gap: 12px;
  }
}
@media (max-width:1440px) and (min-width:1251px) {
  .landing-header_navigation__2r1gV {
    font-size: 12px;
    gap: 14px;
  }
}

/* ボタンの白点滅対策(2026-10-31 白点滅対策: グラデーション→単色の hover 遷移中に background-color が transparent から始まって背後が透けるのを防ぐ)
   style-2.css の次の要素は、基本状態が「background: linear-gradient(...)」(= background-color は transparent)、
   hover が単色、transition に background を含む。hover した瞬間に画像(グラデーション)は補間できず即座に消え、
   色だけが transparent → 単色へ 0.16〜0.18 秒かけて変わるため、その間ボタンの背後(白)が透けて見える。
   基本状態の下にグラデーションの終端色を敷き、遷移を「青 → 濃い青」にする。グラデーションの見た目は変わらない。
   セレクタは html を前に付けて元の規則より 1 段強くしている(:hover 側は 1 クラス分強いので、hover の色は今までどおり効く)。
   どれもトップだけに出る要素なので、wp-sub.css には書かない。style-2.css は触らない。 */
html .hero-section_primary__E_9_0 {                 /* FV の「資料ダウンロード」(元: linear-gradient(120deg,#075bdb,#0052cc)) */
  background-color: #0052cc;
}
html .benefits-support_downloadButton__eZslY,       /* 補助金セクションの資料ボタン(元: linear-gradient(110deg,#175bc9,#1252bd)) */
html .closing-sections_downloadButton__Qvlrg {      /* 末尾 CONTACT の資料ボタン(同上) */
  background-color: #1252bd;
}
html .technology-case-study_playMark__Ptwnk {       /* 導入事例の動画サムネイル中央の再生マーク(元: linear-gradient(135deg,#0754ce,#163c9c)。サムネイル hover で #1048ab) */
  background-color: #163c9c;
}
