/* common.css — 全ページ共通（リセット / ヘッダ / グローバルナビ / ボタン / セクション / フッタ）
   新デザイン styles.css を「焼き直し」。意味のあるクラス名へ整理し、現行のページ別CSS構成に倣う。
   カラーはブラス系の単一アクセント --accent に集約（旧 --blue/--cyan/--green/--coral/--gold を統合）。 */

:root {
  --ink: #000000;
  --ink-soft: #25343b;
  --muted: #929596;
  --line: #d9d9d9;
  --paper: #ffffff;
  --paper-alt: #f3f4f4;
  --paper-warm: #f8f7f4;
  --night: #001722;
  --night-2: #0a2633;
  --accent: #c0a070;
  --shadow: none;
  --header-height: 76px;
  /* フォントトークン（font-familyスタック統合・2026-07-05）。値は棚卸しの正規スタック。
     和文明朝／英字セリフ見出し（Georgia）／サンス（Inter）／ゴシックの4本。台帳＝docs/refactor/font-stack-inventory.md */
  --font-mincho: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", serif;
  --font-serif-en: Georgia, "Times New Roman", "Yu Mincho", YuMincho, serif;
  --font-sans: Inter, "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-gothic: "游ゴシック体", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic Pro", "メイリオ", sans-serif;
}

/* Inter（欧文/数字・self-host・SIL OFL）。Google Fonts CDN 依存を排除（A-4・2026-07-05）。
   可変 latin woff2 を1本（weight 100–900）で採用＝将来 weight 追加にも安定。latin subset のみ
   （unicode-range で限定）＝和文は --font-sans フォールバック(Hiragino/Meiryo等)に落ち挙動不変。 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* CLS 対策：Inter にメトリクスを合わせた調整済みフォールバック（実体=Arial・cross-platform）。
   Inter 未ロード時にこの寸法で描画 → ロード後に差し替わってもレイアウトがずれない（reflow=0）。
   数値は Inter/Arial の実測から算出：size-adjust = 加重平均字幅比(Inter÷Arial=1.0734)、
   *-override = Inter の sTypo メトリクス(1984/-494/0 ÷2048) ÷ size-adjust。latin のみに適用。 */
@font-face {
  font-family: "Inter Fallback";
  font-style: normal;
  font-weight: 100 900;
  src: local("Arial");
  size-adjust: 107.34%;
  ascent-override: 90.25%;
  descent-override: 22.47%;
  line-gap-override: 0%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* stylelint-disable-next-line selector-max-universal -- reset: box-sizing 基底（グローバル意図・値不変） */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  /* 既定＝和文本文 Mincho（研究側 Figma 実測で確定 2026-07-06）。sans は chrome/機能グリフ等で明示例外 */
  font-family: var(--font-mincho);
  line-height: 1.7;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

/* ---------- ヘッダ / グローバルナビ ---------- */

.c-SiteHeader {
  /* chrome＝sans 据置（base=Mincho の明示例外・ロゴ/ハンバーガー用）。
     ※ nav（.c-GlobalNav）は Figma 指定により Mincho へ個別上書き（本要素は継承しない）。 */
  font-family: var(--font-sans);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 2.6vw, 38px);
  border-bottom: 0;
  background: var(--paper-alt);
  backdrop-filter: blur(18px);
}
body[data-page="home"] .c-SiteHeader {
  background: #FFFFFF;
}
/* IR ページ帯背景（灰）は個別上書き不要＝base で統治：
   .c-SiteHeader / .c-SiteFooter は base が既に paper-alt、タイトル帯は .c-PageHero--alt（inner.css）が paper-alt。
   ボディは base 白（デフォルト）。旧: ここで IR 用に3行上書きしていたが全て base 同値の冗長ゆえ削除。 */

.c-Brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 194px;
  background: transparent;
  padding: 0;
}

.c-Brand__logo {
  display: block;
  width: 209px;
  max-width: 48vw;
  height: auto;
}

.c-GlobalNav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 697px;                 /* Figma manu(324:748) nav幅固定（697×21） */
  /* Figma manu(324:748) メニュー項目: YuMincho / 14px / weight500 / #000 / letter-spacing無し。
     base=Mincho 反転時は nav を sans 例外にしていたが、現行Figmaが nav=Mincho 指定のため反転。
     text-transform:uppercase は維持（HTML は Title case・Figma は大文字表示）。 */
  font-family: var(--font-mincho);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: uppercase;
}

.c-GlobalNav__item {
  position: relative;
}

.c-GlobalNav__link,
.c-GlobalNav__trigger {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.c-GlobalNav__link::after,
.c-GlobalNav__trigger::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

.c-GlobalNav__link:hover::after,
.c-GlobalNav__link.is-active::after,
.c-GlobalNav__trigger:hover::after,
.c-GlobalNav__trigger.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.c-GlobalNav__chevron {
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease, margin 180ms ease;
}

.c-GlobalNav__item:hover .c-GlobalNav__chevron,
.c-GlobalNav__item:focus-within .c-GlobalNav__chevron,
.c-GlobalNav__item.is-open .c-GlobalNav__chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.c-GlobalNav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -18px;
  display: grid;
  min-width: 220px;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 23, 34, 0.12);
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
}

.c-GlobalNav__item:hover .c-GlobalNav__menu,
.c-GlobalNav__item:focus-within .c-GlobalNav__menu,
.c-GlobalNav__item.is-open .c-GlobalNav__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.c-GlobalNav__menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.c-GlobalNav__menu a:hover,
.c-GlobalNav__menu a:focus-visible {
  background: var(--paper-alt);
  color: var(--accent);
  outline: 0;
}

.c-SiteHeader__menuButton {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.c-SiteHeader__menuButton span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

/* ---------- ボタン ---------- */

.c-Button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.c-Button::after,
.c-FeatureCard a::after,
.u-textLink::after,
.l-JobGrid a::after,
.l-ContactGrid a::after,
.l-Section__titleRow a::after {
  content: "→";
}

.c-Button:hover {
  transform: translateY(-2px);
}

.c-Button:hover,
.c-FeatureCard a:hover,
.u-textLink:hover,
.l-JobGrid a:hover,
.l-ContactGrid a:hover,
.l-Section__titleRow a:hover {
  color: var(--accent);
}

.c-Button--primary {
  background: var(--night);
  color: #fff;
}

.c-Button--secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.c-Button--light {
  background: #fff;
  color: var(--night);
}

/* ---------- セクション共通 ---------- */

.l-Section {
  /* 縦リズムは現行 Figma 準拠＝上下80px（実測：M&A 27:546 の全セクション帯が内側80/80で統一）。
     旧 clamp(84,10vw,148)=1440で144px≒Figmaの1.8倍だったため80基準に是正（2026-06-23）。 */
  padding: clamp(48px, 6vw, 80px) 0;
}

.l-Section__inner {
  /* Figma 全ページ＝1440フレーム。max-width:1280px + margin:0 auto で 1440px時に
     auto-margin=80pxとなりコンテンツ左端が80pxに揃う（padding不要）。
     1280px以下は @media で padding-inline:24px を追加してエッジ衝突を防ぐ。 */
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

.l-Section--light {
  background: var(--paper-alt);
}

.l-Section--muted {
  background: var(--paper-warm);
}

.l-Section--dark {
  background: var(--night);
  color: #fff;
}

.u-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  fill: currentColor;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.c-SectionHeading {
  max-width: 760px;
  margin-bottom: clamp(42px, 5vw, 70px);
}

.c-SectionHeading.split {
  display: grid;
  max-width: none;
  align-items: end;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 32px;
}

.c-SectionHeading h2 {
  margin: 0;
  font-family: var(--font-serif-en);
  font-size: clamp(38px, 5.6vw, 82px);
  font-weight: 300;
  line-height: 1.02;
}

.c-SectionHeading p:not(.u-eyebrow) {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.c-SectionHeading.light p:not(.u-eyebrow) {
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- カード / グリッド共通（feature / team / product / job / contact / news / faq） ---------- */

.l-FeatureGrid,
.l-TeamGrid,
.l-ProductGrid,
.l-JobGrid,
.l-ContactGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.c-FeatureCard,
.c-PersonCard,
.l-ProductGrid article,
.l-JobGrid article,
.l-ContactGrid article,
.c-NewsCard,
.c-TableCard,
.c-FaqCard {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.c-FeatureCard {
  min-height: 280px;
  padding: clamp(24px, 4vw, 44px);
}

.c-Card__kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.c-FeatureCard h3,
.c-PersonCard h3,
.l-ProductGrid h3,
.l-JobGrid h3,
.l-ContactGrid h3,
.c-NewsCard h3,
.c-FaqCard h3 {
  margin: 10px 0 0;
  font-family: var(--font-serif-en);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.35;
}

.c-FeatureCard p,
.c-PersonCard p,
.l-ProductGrid p,
.l-JobGrid p,
.c-FaqCard p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.c-FeatureCard a,
.l-JobGrid a,
.l-ContactGrid a,
.u-textLink,
.l-Section__titleRow a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- フッタ（Figma準拠：グループ列） ---------- */

.c-SiteFooter {
  border-top: 0;
  background: var(--paper-alt);
  color: var(--ink);
}

/* フッタ（Figma 153:710）：ロゴ＋住所のみ。padding水平0でFigmaのpl-80に合わせる（centering=80px+0padding=80px）。 */
.c-SiteFooter__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 0;
}

/* footer-brandをblockにしてmax-width%がinline-flex循環参照を起こさないよう修正 */
.c-SiteFooter__brand { display: block; }

.c-SiteFooter__brandBlock .c-Brand__logo {
  width: 410px;
  height: auto;
  object-fit: contain;
}

/* 住所（和文）＝Figma Current 実測 YuMincho 16/500（lh28px）。base-font(chrome=sans)の意図的 footer 例外 */
.c-SiteFooter__brandBlock p {
  max-width: 420px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-mincho);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
}

.c-SiteFooter__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: clamp(32px, 4vw, 47px);
  justify-content: start;
}

.c-SiteFooter__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.c-SiteFooter__group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.c-SiteFooter__heading {
  margin: 0;
  font-family: var(--font-serif-en);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.c-SiteFooter__headingLink a:hover,
.c-SiteFooter__group li a:hover {
  color: var(--accent);
}

.c-SiteFooter__group ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0;
  padding: 0 0 0 10px;
  list-style: none;
}

.c-SiteFooter__group li a {
  font-family: var(--font-mincho);
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

/* 最下部の濃紺バー（Figma 125:1197）：Privacy/Security ＋ Copyright */
.c-SiteFooter__bottombar {
  background: #32447f;
  color: #fff;
  padding: 5px 40px;
}
/* legal（Privacy/Security/©）＝Figma Current 実測 YuMincho 16/500。欧文もセリフ＝意図的 footer 例外 */
.c-SiteFooter__bottombarInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-mincho);
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
}
.c-SiteFooter__policy {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  width: 250px;
  max-width: 100%;
}
.c-SiteFooter__policy a {
  color: #fff;
  text-decoration: none;
}
.c-SiteFooter__policy a:hover { text-decoration: underline; }
.c-SiteFooter__bottombar .c-SiteFooter__copyright {
  margin: 0;
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .c-SiteFooter__bottombar { padding: 8px 18px; }
  .c-SiteFooter__bottombarInner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .c-SiteFooter__policy { width: auto; gap: 24px; }
}

/* ---------- レスポンシブ（共通部） ---------- */

@media (max-width: 980px) {
  :root {
    --header-height: 70px;
  }

  .c-SiteHeader__menuButton {
    display: inline-flex;
  }

  .c-GlobalNav {
    position: fixed;
    top: var(--header-height);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: auto;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    max-height: calc(100svh - var(--header-height) - 24px);
    overflow: auto;
    padding: 8px;
  }

  .c-GlobalNav.is-open {
    display: flex;
  }

  .c-GlobalNav__item {
    width: 100%;
  }

  .c-GlobalNav__link,
  .c-GlobalNav__trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px;
  }

  .c-GlobalNav__link::after,
  .c-GlobalNav__trigger::after {
    display: none;
  }

  .c-GlobalNav__menu {
    position: static;
    display: none;
    min-width: 0;
    gap: 0;
    padding: 4px 0 6px;
    border: 0;
    border-top: 1px solid var(--line);
    background: var(--paper-alt);
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: none;
    visibility: visible;
  }

  .c-GlobalNav__item.is-open .c-GlobalNav__menu {
    display: grid;
  }

  .c-GlobalNav__item:hover .c-GlobalNav__menu,
  .c-GlobalNav__item:focus-within .c-GlobalNav__menu {
    transform: none;
  }

  .c-GlobalNav__menu a {
    min-height: 40px;
    padding: 9px 14px 9px 24px;
    white-space: normal;
  }

  .c-SectionHeading.split,
  .c-SiteFooter__inner {
    grid-template-columns: 1fr;
  }

  .l-FeatureGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .c-SiteFooter__inner { padding-inline: 24px; }
  .l-Section__inner { padding-inline: 24px; } /* 1280px以下: auto-margin消えるため最小側余白を確保 */
}

@media (max-width: 640px) {
  .c-SiteHeader {
    padding-inline: 14px;
  }

  .c-Brand {
    min-width: 0;
  }

  .l-Section {
    padding: 64px 0;
  }

  .l-Section__inner {
    padding: 0 18px;
  }

  .c-SiteFooter__links {
    grid-template-columns: 1fr;
  }

  .l-FeatureGrid {
    grid-template-columns: 1fr;
  }
}

/* ========== XJ Storage 描画コンテンツ 共通ラッパ（命名統一 c-Xj・フォント一本化 2026-07-04） ==========
   XJ Storage が描画する News帯(.c-Xj--news) / IR資料一覧(.c-Xj--list) / 財務グラフ(.xj-graph_cont に .c-Xj)
   の自前ラッパを c-Xj ファミリーへ統一。明朝フォント宣言はこの基底 .c-Xj の1か所に集約し、配下の
   XJ 描画テキスト(日付/カテゴリ/タイトル/Newバッジ/表セル)は継承で明朝化する（ユーザー指定 2026-07-04）。
   ※ #xj-mainlist 等の id と XJ 出力クラス（.xj-graph_系・dl・dt・dd・.date・.txt 等）は外部契約＝改名不可。 */
.c-Xj {
  font-family: var(--font-mincho);
}

/* News帯 行デザイン（home/news TOP News と IR News teaser で共有）。
   XJ ローダーが <dl><dt>.date .label (+.c-Xj__new)</dt><dd>.txt a[pdf]</dd></dl> を描画→整形。
   日付+カテゴリを上段(dt: flex)、タイトルを下段(dd)、最新は New バッジ(右寄せ・--accent)。 */
.c-Xj--news { min-width: 0; }
.c-Xj--news dl {
  margin: 0;
  padding: 30px 0;            /* Figma 行高 123px 相当 */
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
/* 最終デザイン変更 2026-06-30 (H)(I)(J): 最下行の下罫線を非表示（TOP News / News / IR News で共通） */
.c-Xj--news dl:last-of-type { border-bottom: none; }
.c-Xj--news dt { display: flex; gap: 24px; align-items: center; margin: 0 0 7px; }
.c-Xj__new {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 2px 20px;
  border-radius: 100px;
}
.c-Xj--news .date { margin: 0; color: rgba(0, 0, 0, 0.5); font-size: 14px; line-height: 28px; }
.c-Xj--news .label { margin: 0; color: var(--ink); font-size: 14px; line-height: 28px; }
.c-Xj--news dd { margin: 0; }
.c-Xj--news .txt { margin: 0; }
.c-Xj--news .txt a { color: var(--ink); font-size: 14px; line-height: 1.7; text-decoration: none; }
.c-Xj--news .txt a:hover { color: var(--accent); }
.c-Xj--news .txt img { vertical-align: middle; margin-left: 4px; }
