/* FormX Service サイト共通スタイル
 * sabisa DesignCanvas から抽出した base スタイル。
 * 各ページの <style> ブロックはすべてこのファイルに集約している。
 */

html, body {
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: #171A20;
  font-family: 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a {
  color: #2E5FE3;
  text-decoration: none;
}

a:hover {
  color: #2249B8;
}

/* ─── ホバー効果 ───────────────────────────────────────────────────
 * 各ページの `<a>` は inline style で色・背景・枠を持つため、
 * :hover 側は !important で inline を上書きする。
 * クラス命名は h- prefix（hover の意）で統一。 */

.h-link:hover { color: #2E5FE3 !important; }
.h-btn-primary:hover { background: #2249B8 !important; }
.h-btn-ghost:hover { border-color: #171A20 !important; }
.h-btn-inverse:hover { background: #E4E9F4 !important; }
.h-btn-inverse-ghost:hover { border-color: #fff !important; }
.h-card:hover { border-color: #2E5FE3 !important; }

/* 有価証券報告書モックアップのコメント吹き出し：
   doc preview をはみ出してツールサイドバーの上に「浮いて」見せる。
   z-index が効くよう position:relative を付与（デフォルトの
   ツールサイドバーは position:static なので、DOM 順に関わらず
   吹き出しが上に描画される）。 */
.hero-doc-callout {
  position: relative;
  z-index: 1;
}

/* ─── 導入企業ロゴ（マーキー） ───────────────────────────────────
 * 8ロゴを1列に並べ、右から左に流れるように無限スクロール。
 * 左右端は mask でフェードアウト。マークアップでは 8ロゴを 2回並べ、
 * トラックを -50% 移動することで継ぎ目のないループを作る。 */

.logos-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.logos-track {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  width: max-content;
  animation: logos-scroll 40s linear infinite;
}
.logos-marquee:hover .logos-track { animation-play-state: paused; }

@keyframes logos-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logos-track { animation: none; }
}

@media (max-width: 1250px) {
  header nav.hdr-nav { font-size: 13px !important; }
}

@media (max-width: 1100px) {
  .hdr-ghost { display: none !important; }
}

/* ─── モバイルメニュー ─────────────────────────────────────────────
 * ヘッダーのハンバーガーで #mobileMenu に .is-open を付けて開閉する。
 * formx-hp と同じ 768px をブレークポイントにする。 */

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  margin-right: -8px;
  cursor: pointer;
  color: #171A20;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  display: none;
  flex-direction: column;
  padding: 8px 24px 32px;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.mobile-menu__head .menu-toggle { display: flex; }
.mobile-menu__list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 28px;
}
.mobile-menu__list a {
  font-size: 18px;
  font-weight: 700;
  color: #171A20;
}
.mobile-menu__cta {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.mobile-menu__cta a {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  padding: 13px 24px;
}

@media (min-width: 769px) {
  .mobile-menu { display: none !important; }
}

/* ─── レスポンシブ上書き ───────────────────────────────────────────
 * ページ本文は inline style 主体のため、構造を変える箇所だけ
 * クラスを付けて !important で上書きする。 */

/* トップの 3 カラム構成は 1024px 未満で 1 カラムに畳む。
   768–1023px の tablet 幅で各カラムが窮屈になるのを避けるため
   通常の mobile ブレークポイントより広めに設定している。 */
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  header nav.hdr-nav { display: none !important; }
  .hdr-cta { display: none !important; }
  .menu-toggle { display: flex; }

  /* 複数カラム grid → 1 カラム */
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-compare { grid-template-columns: 1fr !important; }
  .hero-grid > *,
  .grid-2 > *,
  .grid-3 > *,
  .grid-compare > * { min-width: 0; }
  .grid-5 { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-grid { gap: 48px !important; }

  /* トップのプロダクトモック：目次カラムとフローティングバッジは畳む */
  .mock-toc { display: none !important; }
  .mock-body { grid-template-columns: 1fr !important; }
  .float-badge { display: none !important; }

  /* 図解の矢印（⇄ / →）は縦向きに回転 */
  .diagram-arrow {
    transform: rotate(90deg);
    min-height: 44px;
  }

  /* CTA ボタン群は縦積み */
  .cta-btns { flex-direction: column !important; align-items: stretch !important; }
  .cta-btns a { text-align: center; }

  /* アップデート一覧：日付+タグの下にタイトルを折り返す */
  .updates-item { flex-wrap: wrap !important; row-gap: 4px !important; }
  .updates-title { flex-basis: 100%; }

  /* 導入事例のプロフィールカード */
  .profile-aside { grid-template-columns: 1fr !important; }

  /* トップのヒーロー：タイトルは折返し可、ドキュメントモックの吹き出しは
     右にはみ出さないよう margin-right を打ち消し、ラベル（AI レビュー等）は
     nowrap のまま、説明文は 2 行目に落として折返しを許可する。 */
  .hero-title { white-space: normal !important; }
  .hero-doc-callout {
    margin-right: 0 !important;
    flex-wrap: wrap !important;
  }
  .hero-doc-callout > span:last-child {
    flex-basis: 100%;
    white-space: normal;
  }
}
