/* ==========================================================
   エンキャリ コーポレート（会社概要）専用スタイル
   toc.css の後に読み込み、body.corp 配下だけを上書きする。
   ・カラーは既存のまま（brand #0088c6 / pink #ff3ecd / 黒白）
   ・ToC側との差別化は「黒基調・角丸なし・広い余白・細い罫線・モノクロ写真」で付ける
   ========================================================== */

body.corp {
  --corp-ink: #0b0b0b;
  --corp-line: #e2e2e2;
  --corp-line-d: rgba(255, 255, 255, .16);
  --corp-mute: #6d6d6d;
  --corp-pad: clamp(72px, 8vw, 124px);
  background: #fff;
}

/* ---------- 右レール／SP下部バーはコーポレートでは使わない ---------- */
body.corp .rail, body.corp .brand { display: none; }
body.corp .wrap { margin-right: 0; padding-top: 76px; }
body.corp .inner { width: min(1200px, calc(100% - 96px)); }
body.corp section { padding: var(--corp-pad) 0; }

/* ---------- 上部固定ヘッダー（ToPの右レールに対する差別化） ---------- */
.chead {
  position: fixed; inset: 0 0 auto 0; height: 76px; z-index: 120;
  display: flex; align-items: center; gap: 28px;
  padding-inline: clamp(20px, 3vw, 40px);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--corp-line);
}
.chead-logo img { height: 38px; width: auto; }
.chead-nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); margin-left: auto; }
.chead-nav a { font-size: .82rem; letter-spacing: .04em; position: relative; padding: .4em 0; white-space: nowrap; }
.chead-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--c-lime); transition: width .3s var(--ease); }
.chead-nav a:hover::after, .chead-nav a[aria-current="page"]::after { width: 100%; }
.chead-cta { display: inline-flex; align-items: center; gap: .7em; height: 44px; padding: 0 1.1em; background: var(--corp-ink); color: #fff; font-size: .78rem; letter-spacing: .06em; white-space: nowrap; }
.chead-cta i { font-style: normal; font-family: var(--font-en); }
.chead-menu { display: none; width: 44px; height: 44px; background: var(--c-lime); border: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.chead-menu span { display: block; width: 18px; height: 2px; background: #000; }

/* ---------- 見出し（コーポレートは巨大英字＋細い罫線） ---------- */
.ch { display: grid; gap: 14px; padding-bottom: 26px; border-bottom: 1px solid var(--corp-line); margin-bottom: clamp(34px, 4vw, 56px); overflow: hidden; }
.ch .en { font-family: var(--font-en); font-size: clamp(2.4rem, 6vw, 5rem); line-height: .95; letter-spacing: .005em; display: block; transform: translateY(105%); transition: transform 1s var(--ease); }
.ch.visible .en { transform: none; }
.ch .row { display: flex; align-items: baseline; gap: 1.1em; flex-wrap: wrap; opacity: 0; transform: translateY(14px); transition: opacity .7s ease .18s, transform .8s var(--ease) .18s; }
.ch.visible .row { opacity: 1; transform: none; }
.ch h2, .ch h1 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); letter-spacing: .06em; padding-left: .8em; border-left: 4px solid var(--c-lime); }
.ch .cap { font-size: .82rem; letter-spacing: .04em; color: var(--corp-mute); }
.sec--dark .ch { border-color: var(--corp-line-d); }
.sec--dark .ch .cap { color: rgba(255, 255, 255, .62); }

/* ---------- ダーク／ライト地 ---------- */
.sec--dark { background: var(--corp-ink); color: #fff; }
.sec--dark a { color: #fff; }
.sec--soft2 { background: #f5f5f5; }

/* ---------- コーポレートFV ---------- */
.cfv { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; padding: 0 0 clamp(46px, 6vw, 84px); background: var(--corp-ink); overflow: hidden; }
.cfv-bg { position: absolute; inset: 0; }
.cfv-bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(.52); }
.cfv-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,11,.72) 0%, rgba(11,11,11,.28) 42%, rgba(11,11,11,.92) 100%); }
.cfv .inner { position: relative; z-index: 1; color: #fff; }
.cfv-crumbs { display: flex; align-items: center; gap: .6em; font-size: .72rem; letter-spacing: .12em; color: rgba(255, 255, 255, .74); margin-bottom: 2em; }
.cfv-crumbs a { border-bottom: 1px solid rgba(255, 255, 255, .4); }
.cfv-en { font-family: var(--font-en); font-size: clamp(2.8rem, 8vw, 6.6rem); line-height: .94; display: block; }
.cfv h1 { font-size: clamp(1.1rem, 1.8vw, 1.5rem); letter-spacing: .07em; margin-top: .7em; padding-left: .8em; border-left: 4px solid var(--c-lime); }
.cfv p { margin-top: 1.5em; max-width: 46em; font-size: .92rem; line-height: 2.1; color: rgba(255, 255, 255, .84); word-break: auto-phrase; }
.cfv-scroll { position: absolute; right: clamp(20px, 3vw, 44px); bottom: 0; z-index: 2; display: grid; justify-items: center; gap: 10px; font-family: var(--font-en); font-size: .66rem; letter-spacing: .22em; color: rgba(255, 255, 255, .7); writing-mode: vertical-rl; padding-bottom: 76px; }
.cfv-scroll::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 64px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.cfv-scroll::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 64px; background: var(--c-lime); transform-origin: top; animation: cfvline 2.2s var(--ease) infinite; z-index: 1; }
@keyframes cfvline { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 数字（OVERVIEW） ---------- */
.cnums { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--corp-line); }
.sec--dark .cnums { border-color: var(--corp-line-d); }
.cnum { padding: 30px 24px 26px; border-bottom: 1px solid var(--corp-line); border-right: 1px solid var(--corp-line); }
.cnum:nth-child(4n) { border-right: 0; }
.sec--dark .cnum { border-color: var(--corp-line-d); }
.cnum .lb { font-family: var(--font-en); font-size: .7rem; letter-spacing: .18em; color: var(--c-blue); }
.sec--dark .cnum .lb { color: var(--c-lime); }
.cnum .v { font-family: var(--font-en); font-size: clamp(2rem, 3.4vw, 3.1rem); line-height: 1.1; margin-top: .3em; }
.cnum .v em { font-style: normal; font-size: .44em; margin-left: .18em; }
.cnum .d { font-size: .78rem; margin-top: .5em; color: var(--corp-mute); word-break: auto-phrase; }
.sec--dark .cnum .d { color: rgba(255, 255, 255, .66); }

/* ---------- インデックス（COMPANY内の個ページ一覧） ---------- */
.cindex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--corp-line); border: 1px solid var(--corp-line); }
.cix { background: #fff; padding: 34px 30px 30px; display: grid; align-content: start; gap: 10px; position: relative; transition: background .35s var(--ease), color .35s var(--ease); min-height: 210px; }
.cix .no { font-family: var(--font-en); font-size: .72rem; letter-spacing: .18em; color: var(--c-blue); }
.cix h3 { font-size: 1.08rem; letter-spacing: .04em; }
.cix .en { font-family: var(--font-en); font-size: .74rem; letter-spacing: .16em; color: var(--corp-mute); }
.cix p { font-size: .8rem; line-height: 1.9; color: var(--corp-mute); word-break: auto-phrase; }
.cix .go { margin-top: auto; align-self: end; font-family: var(--font-en); font-size: .74rem; letter-spacing: .14em; display: inline-flex; align-items: center; gap: .6em; }
.cix::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; background: var(--c-lime); transition: width .4s var(--ease); }
.cix:hover { background: var(--corp-ink); color: #fff; }
.cix:hover p, .cix:hover .en { color: rgba(255, 255, 255, .7); }
.cix:hover .no { color: var(--c-lime); }
.cix:hover::after { width: 100%; }

/* ---------- 事業（3列・番号＋モノクロ写真） ---------- */
.cbiz { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 34px); }
.cbz { display: grid; align-content: start; gap: 14px; }
.cbz .ph { aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.cbz .ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .5s var(--ease); }
.cbz:hover .ph img { filter: none; }
.cbz .no { font-family: var(--font-en); font-size: .72rem; letter-spacing: .2em; color: var(--c-blue); }
.cbz h3 { font-size: 1.12rem; letter-spacing: .04em; padding-left: .7em; border-left: 4px solid var(--c-lime); }
.cbz .en { font-family: var(--font-en); font-size: .74rem; letter-spacing: .14em; color: var(--corp-mute); }
.cbz p { font-size: .84rem; line-height: 2; color: var(--corp-mute); word-break: auto-phrase; }
.cbz ul { display: grid; gap: 6px; margin-top: .2em; }
.cbz ul li { font-size: .8rem; padding-left: 1.1em; position: relative; }
.cbz ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; background: var(--c-lime); }
.cbz .go { font-family: var(--font-en); font-size: .74rem; letter-spacing: .14em; display: inline-flex; align-items: center; gap: .6em; border-bottom: 1px solid currentColor; justify-self: start; padding-bottom: .2em; }

/* ---------- 会社情報テーブル ---------- */
.ctbl { width: 100%; border-top: 1px solid var(--corp-line); }
.ctbl tr { border-bottom: 1px solid var(--corp-line); }
.ctbl th, .ctbl td { text-align: left; padding: 1.3em 1em 1.3em 0; font-size: .88rem; line-height: 1.9; vertical-align: top; }
.ctbl th { width: 220px; letter-spacing: .06em; }
.ctbl td { color: #222; word-break: auto-phrase; }
.ctbl td a { border-bottom: 1px solid var(--c-lime); }

/* ---------- 沿革（年表） ---------- */
.chist { display: grid; }
.chi { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 26px; padding: 26px 0; border-bottom: 1px solid var(--corp-line); position: relative; }
.chi:first-child { border-top: 1px solid var(--corp-line); }
.chi .yr { font-family: var(--font-en); font-size: 1.42rem; line-height: 1.2; letter-spacing: .02em; position: relative; padding-left: 22px; }
.chi .yr::before { content: ""; position: absolute; left: 0; top: .42em; width: 10px; height: 10px; background: var(--c-lime); }
.chi .bd h3 { font-size: .98rem; letter-spacing: .03em; word-break: auto-phrase; }
.chi .bd p { font-size: .84rem; line-height: 2; color: var(--corp-mute); margin-top: .5em; word-break: auto-phrase; }

/* 一覧型バリエーション（インラインstyleだとSPのメディアクエリに勝ってしまうためクラス化） */
.chi--plain { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px 0; }
.chi--pos { grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; }
.chi--pos .yr { font-size: 1.05rem; }
.chi--pos .yr small { display: block; font-size: .62rem; letter-spacing: .14em; color: var(--corp-mute); font-family: var(--font-en); }
.chi--pos .tags { margin-top: .6em; font-size: .72rem; letter-spacing: .08em; color: var(--corp-mute); }
.chi--pos .cmore { height: 46px; font-size: .76rem; white-space: nowrap; }
.cvals--3 { grid-template-columns: repeat(3, 1fr); }
.cbiz--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 代表メッセージ ---------- */
.cmsg { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: clamp(30px, 4vw, 64px); align-items: start; }
.cmsg .ph { position: sticky; top: 108px; }
.cmsg .ph img { width: 100%; filter: grayscale(1) contrast(1.05); }
.cmsg .ph .cap { display: block; margin-top: 1em; font-size: .78rem; letter-spacing: .06em; }
.cmsg .ph .cap small { display: block; font-size: .72rem; color: var(--corp-mute); letter-spacing: .1em; margin-bottom: .3em; }
.cmsg-body h2 { font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.6; letter-spacing: .03em; word-break: auto-phrase; }
.cmsg-body p { font-size: .92rem; line-height: 2.2; margin-top: 1.6em; word-break: auto-phrase; }
.cmsg-body .sign { margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--corp-line); font-size: .84rem; letter-spacing: .06em; }
.cmsg-body .sign b { font-size: 1.05rem; margin-left: .5em; }

/* ---------- ステートメント（大文字の宣言ブロック） ---------- */
.cstate { padding: clamp(40px, 5vw, 76px) clamp(26px, 4vw, 64px); background: var(--corp-ink); color: #fff; }
.cstate .en { font-family: var(--font-en); font-size: .76rem; letter-spacing: .24em; color: var(--c-lime); }
.cstate h2 { font-size: clamp(1.5rem, 3.4vw, 2.9rem); line-height: 1.5; letter-spacing: .02em; margin-top: .6em; word-break: auto-phrase; }
.cstate p { margin-top: 1.4em; font-size: .9rem; line-height: 2.2; color: rgba(255, 255, 255, .82); max-width: 54em; word-break: auto-phrase; }

/* ---------- バリュー（3つの価値観） ---------- */
.cvals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--corp-line); border: 1px solid var(--corp-line); }
.cval { background: #fff; padding: 34px 30px; display: grid; align-content: start; gap: 12px; }
.cval .no { font-family: var(--font-en); font-size: 2.4rem; line-height: 1; color: var(--c-lime); }
.cval h3 { font-size: 1.05rem; letter-spacing: .04em; }
.cval p { font-size: .82rem; line-height: 2; color: var(--corp-mute); word-break: auto-phrase; }

/* ---------- WE ARE（スクロールで文字が現れ、背景画像がバラバラに流れる） ---------- */
.weare { position: relative; min-height: min(100vh, 860px); background: #0b0b0b; color: #fff; overflow: hidden; display: grid; place-items: center; padding: clamp(80px, 10vw, 140px) 0; }
.wa-collage { position: absolute; inset: -20%; will-change: transform; }
.wa-cell { position: absolute; left: var(--x); top: var(--y); width: var(--w); aspect-ratio: var(--ar, 4 / 3); rotate: var(--r, 0deg); overflow: hidden; will-change: transform; }
.wa-cell img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06) brightness(.98); }
/* 中央に向かって暗くするヴェール＝画像に文字が重なっても必ず読める */
.wa-veil { position: absolute; inset: 0; background:
  radial-gradient(54% 50% at 50% 50%, rgba(11,11,11,.88) 0%, rgba(11,11,11,.56) 46%, rgba(11,11,11,.06) 100%),
  linear-gradient(180deg, rgba(11,11,11,.86) 0%, rgba(11,11,11,.1) 26%, rgba(11,11,11,.1) 74%, rgba(11,11,11,.86) 100%); }
.wa-in { position: relative; z-index: 1; text-align: center; }
.wa-en { font-family: var(--font-en); font-size: clamp(.72rem, 1vw, .84rem); letter-spacing: .32em; color: var(--c-lime); opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .8s var(--ease); }
.wa-ttl { display: block; overflow: hidden; margin-top: .5em; }
.wa-ttl span { display: block; font-family: var(--font-en); font-size: clamp(3rem, 11vw, 9rem); line-height: .92; letter-spacing: .01em; transform: translateY(106%); transition: transform 1.05s var(--ease) .1s; }
.wa-lead { margin: 1.6em auto 0; max-width: 40em; font-size: clamp(.86rem, 1.2vw, 1rem); line-height: 2.1; color: rgba(255, 255, 255, .88); word-break: auto-phrase; opacity: 0; transform: translateY(18px); transition: opacity .8s ease .34s, transform .9s var(--ease) .34s; }
.wa-cta { margin-top: 2.2em; opacity: 0; transform: translateY(18px); transition: opacity .8s ease .5s, transform .9s var(--ease) .5s; }
.weare.visible .wa-en, .weare.visible .wa-lead, .weare.visible .wa-cta { opacity: 1; transform: none; }
.weare.visible .wa-ttl span { transform: none; }
@media (max-width: 767px) {
  .weare { min-height: 88vh; padding: 72px 0; }
  .wa-collage { inset: -14%; }
  /* SPは枚数を絞る代わりに大きく置く（--sx/--sy/--sw があればそちらを使う） */
  .wa-cell { left: var(--sx, var(--x)); top: var(--sy, var(--y)); width: var(--sw, var(--w)); }
  .wa-cell--sp0 { display: none; }
  .wa-lead { font-size: .84rem; line-height: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-en, .wa-ttl span, .wa-lead, .wa-cta { transition: none !important; opacity: 1 !important; transform: none !important; }
  .wa-collage, .wa-cell { transform: none !important; }
}

/* ---------- 横並びCTAバナー ---------- */
.cbnr { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 26px); }
.cbn { position: relative; min-height: 260px; display: flex; align-items: flex-end; padding: 32px; overflow: hidden; color: #fff; }
.cbn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.5); transition: transform .8s var(--ease); }
.cbn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,11,.88) 0%, rgba(11,11,11,.5) 60%, rgba(11,11,11,.28) 100%); }
.cbn:hover img { transform: scale(1.04); }
.cbn .in { position: relative; z-index: 1; }
.cbn .en { font-family: var(--font-en); font-size: .74rem; letter-spacing: .2em; color: var(--c-lime); }
.cbn h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); letter-spacing: .04em; margin-top: .4em; }
.cbn p { font-size: .82rem; line-height: 1.9; margin-top: .7em; color: rgba(255, 255, 255, .8); max-width: 26em; word-break: auto-phrase; }
.cbn .go { display: inline-flex; align-items: center; gap: .6em; margin-top: 1.2em; font-family: var(--font-en); font-size: .74rem; letter-spacing: .14em; border-bottom: 1px solid var(--c-lime); padding-bottom: .25em; }

/* ---------- 本文まわり ---------- */
.clead { font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 2.1; letter-spacing: .02em; max-width: 46em; word-break: auto-phrase; }
.cbody p { font-size: .9rem; line-height: 2.15; margin-top: 1.4em; word-break: auto-phrase; }
.cnote { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--corp-line); font-size: .76rem; line-height: 1.9; color: var(--corp-mute); word-break: auto-phrase; }
.ctwo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); align-items: start; }
.cmore { display: inline-flex; align-items: center; gap: .8em; height: 54px; padding: 0 1.5em; background: var(--corp-ink); color: #fff; font-size: .82rem; letter-spacing: .08em; }
.cmore i { font-style: normal; font-family: var(--font-en); }
.cmore--lime { background: var(--c-lime); color: #fff; }
.cmore--ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.center { text-align: center; }

/* ---------- タブレット ---------- */
@media (max-width: 1099px) {
  .chead-nav { display: none; }
  .chead-menu { display: flex; }
  body.corp .inner { width: min(1200px, calc(100% - 48px)); }
  .cindex, .cbiz, .cvals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cnums { grid-template-columns: repeat(2, 1fr); }
  .cnum:nth-child(2n) { border-right: 0; }
  .cvals--3, .cbiz--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chi--pos { grid-template-columns: 150px minmax(0, 1fr); }
  .chi--pos .cmore { grid-column: 1 / -1; justify-self: start; }
  .cmsg { grid-template-columns: minmax(0, 1fr); }
  .cmsg .ph { position: static; max-width: 380px; }
}

/* ---------- スマートフォン ---------- */
@media (max-width: 767px) {
  body.corp .wrap { padding-top: 64px; }
  body.corp .inner { width: calc(100% - 32px); }
  body.corp section { padding: 56px 0; }
  .chead { height: 64px; padding-inline: 16px; }
  .chead-logo img { height: 30px; }
  .chead-cta { height: 38px; padding: 0 .9em; font-size: .72rem; }
  .chead-menu { width: 38px; height: 38px; }
  .cfv { min-height: 62vh; padding-bottom: 40px; }
  .cfv-crumbs { margin-bottom: 1.4em; font-size: .66rem; }
  .cfv-scroll { display: none; }
  .cfv p { font-size: .85rem; line-height: 2; }
  .ch { padding-bottom: 18px; margin-bottom: 26px; }
  .cindex, .cbiz, .cvals, .ctwo, .cbnr { grid-template-columns: minmax(0, 1fr); }
  .cindex, .cvals { gap: 1px; }
  .cix { min-height: 0; padding: 24px 20px; }
  .cix .go { margin-top: 6px; }
  .cnums { grid-template-columns: repeat(2, 1fr); }
  .cnum { padding: 20px 14px 18px; }
  .ctbl th, .ctbl td { display: block; width: auto; padding: 0; }
  .ctbl th { padding-top: 1.2em; font-size: .78rem; color: var(--c-blue); letter-spacing: .1em; }
  .ctbl td { padding: .4em 0 1.2em; }
  .chi { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 20px 0; }
  .chi--pos, .cvals--3, .cbiz--4 { grid-template-columns: minmax(0, 1fr); }
  .chi--pos .cmore { width: 100%; justify-content: space-between; }
  .chi .yr { font-size: 1.15rem; }
  .cstate { padding: 32px 20px; }
  .cstate h2 { font-size: 1.3rem; line-height: 1.65; }
  .cbn { min-height: 210px; padding: 22px 20px; }
  .cbn::before { background: linear-gradient(180deg, rgba(11,11,11,.55) 0%, rgba(11,11,11,.9) 100%); }
  .cmore { width: 100%; justify-content: space-between; height: 50px; }
}

/* 黒背景の上の青い小見出しは明るい青に（site.css の --c-on-dark と同じ） */
.sec--dark .cnum .lb { color: var(--c-on-dark, #5bc8f5); }
