/* ============================================================
   一般社団法人 CFYP — Corporate Site
   Monotone / Editorial / Minimal
   ============================================================ */

:root {
  --ink: #0F172A;
  --black: #000000;
  --paper: #F8FAFC;
  --mist: #F1F5F9;
  --line: #E2E8F0;
  --muted: #64748B;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  /* 固定ヘッダー分のオフセット。アンカージャンプ時に見出しが隠れないようにする */
  scroll-padding-top: 5.5rem;
}

body {
  font-feature-settings: "palt" 1;
  /*
    重要：overflow-x: hidden は body をスクロールコンテナ化し、
    ページ内アンカーリンク（#mission など）がビューポートを
    スクロールできなくなる原因になる。clip は scroll container を
    作らないため、はみ出し抑制とアンカー移動を両立できる。
    clip 非対応ブラウザ向けに hidden を先に宣言する。
  */
  overflow-x: hidden;
  overflow-x: clip;
}

/* ---------- ヘッダー ---------- */
#site-header {
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

#site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}

#site-header.is-hidden {
  transform: translateY(-100%);
}

/* ---------- ロゴ ----------
   支給ロゴ（images/logo.png / 500×500・背景透過）は、実際の描画が
   画像内 x126-366, y146-328（240×182px）に収まっており、周囲の大部分が
   透明余白になっている。そのまま置くと文字が読めない大きさになるため、
   余白を切り出して表示する（img を絶対配置でオフセットし、枠でマスク）。
   各値の関係： 枠サイズ = 描画サイズ × 倍率 ／ img = 500 × 倍率 ／ 位置 = -126,-146 × 倍率 */
.brand-logo {
  position: relative;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  width: 50px;      /* 240 × 0.2088 */
  height: 38px;     /* 182 × 0.2088 */
}

.brand-logo__img {
  position: absolute;
  display: block;
  width: 104px;     /* 500 × 0.2088 */
  height: 104px;
  max-width: none;
  left: -26.3px;    /* -126 × 0.2088 */
  top: -30.5px;     /* -146 × 0.2088 */
  transition: opacity 0.3s var(--ease);
}

@media (min-width: 768px) {
  .brand-logo {
    width: 63px;    /* 240 × 0.2637 */
    height: 48px;   /* 182 × 0.2637 */
  }

  .brand-logo__img {
    width: 132px;   /* 500 × 0.2637 */
    height: 132px;
    left: -33.2px;  /* -126 × 0.2637 */
    top: -38.5px;   /* -146 × 0.2637 */
  }
}

/* フッターなど、やや大きめに置く場合 */
.brand-logo--lg {
  width: 69px;      /* 240 × 0.2857 */
  height: 52px;     /* 182 × 0.2857 */
}

.brand-logo--lg .brand-logo__img {
  width: 143px;     /* 500 × 0.2857 */
  height: 143px;
  left: -36px;      /* -126 × 0.2857 */
  top: -41.7px;     /* -146 × 0.2857 */
}

/* 黒背景では線画を白抜きに反転して表示する（αは保持される） */
.brand-logo--light .brand-logo__img {
  filter: brightness(0) invert(1);
}

/* 沿革の行に並べる小サイズ（団体ロゴ枠 .org-logo--sm = 40px と同じ箱に揃える）
   沿革の行には「ルピナス品川・八潮のロゴ（40×40 の枠）」と「CFYPロゴ」が並ぶため、
   枠の寸法を 40×40 に統一し、さらに「着色部の高さ」を揃えて光学サイズを合わせる。

   実測（canvas 解析）：
     ルピナス品川 … 300px中 147×155（49.0% / 51.7%）→ 40px枠で 19.6×20.7px
     ルピナス八潮 … 1024px中 505×533（49.3% / 52.1%）→ 40px枠で 19.7×20.8px
     つまり両マークの見えている高さは約 20.7px。
   CFYPロゴの描画領域は 500px 中 x126-366 / y146-327（241×182）なので、
   インク高さを 21px に合わせる： k = 21 / 182 ≒ 0.1154
     img = 500k = 57.7px ／ インク幅 = 241k = 27.8px
     left = -126k + (40 - 27.8) / 2 = -8.4px（横方向も中央に置く）
     top  = -146k + (40 - 21)   / 2 = -7.4px
   以前は 56×42 でインクが枠いっぱい（56×42px）だったため、
   ルピナスのマークより 2 倍以上大きく見えていた。 */
.brand-logo--history {
  width: 40px;
  height: 40px;
}

.brand-logo--history .brand-logo__img {
  width: 57.7px;    /* 500 × 0.1154 */
  height: 57.7px;
  left: -8.4px;     /* -126k + (40 - 241k) / 2 */
  top: -7.4px;      /* -146k + (40 - 182k) / 2 */
}

.brand-logo:hover .brand-logo__img {
  opacity: 0.7;
}

.nav-link {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
  padding: 6px 0;
  transition: opacity 0.3s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.nav-link:hover::after,
.nav-link.is-active::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ハンバーガー */
.burger {
  display: block;
  width: 18px;
  height: 12px;
  position: relative;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), background 0.3s;
}

.burger span:first-child { top: 0; }
.burger span:last-child { bottom: 0; }

body.menu-open .burger span { background: #fff; }
body.menu-open .burger span:first-child { transform: translateY(5.25px) rotate(45deg); }
body.menu-open .burger span:last-child { transform: translateY(-5.25px) rotate(-45deg); }
body.menu-open #menu-toggle { border-color: rgba(255, 255, 255, 0.35); }

/* モバイルメニュー */
.mobile-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  transition: padding-left 0.4s var(--ease), opacity 0.3s;
}

.mobile-link .num {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
}

.mobile-link:hover { padding-left: 10px; }

#mobile-menu {
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

#mobile-menu.is-open { opacity: 1; }

/* ---------- 汎用タイポグラフィ ---------- */
.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.en-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.flow-step {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.mono-idx {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

/* ---------- 状態リストのマーク（塗りの小丸＋細罫） ----------
   変遷：当初は「A / B / C」の英字を細い四角（.mono-idx）で囲っていた →
   一度漢数字（一・二・三）に変更 → 最終的に記号（塗りの小丸）に落ち着いた。
   理由は、3つの状態は順番を持つ概念ではなく、通し番号に意味がないこと。
   数字や英字をやめ、順序を示さない単純な図形だけを残す。
   記号を小さくしたぶん、細罫と余白でリズムをつくる。 */
.state-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}

.state-mark__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  transition: transform 0.5s var(--ease);
}

.state-mark__bar {
  flex: 1;
  height: 1px;
  background: var(--line);
  transition: background-color 0.45s var(--ease);
}

/* 罫線が墨へ寄り、点がわずかに膨らむ（既存の hover 作法に合わせる） */
article:hover .state-mark__dot { transform: scale(1.3); }
article:hover .state-mark__bar { background-color: var(--ink); }

/* 縦積みのリスト行（アコーディオン内の要約リスト）
   枠を消したぶん、記号の列幅と細罫で構造を見せる。
   記号と本文のあいだに縦罫を1本通すと、単なる箇条書きではなく
   「項目と本文」の関係として読めるようになる。 */
.state-row {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 18px;
  padding: 22px 0;
  align-items: start;
}

.state-row__dot {
  width: 6px;
  height: 6px;
  /* 見出し（15px / 行高高 1.5）の1行目の中心に合わせる */
  margin-top: 8px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.45s var(--ease);
}

.state-row:hover .state-row__dot { transform: scale(1.4); }

.state-row__body {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  transition: border-color 0.45s var(--ease);
}

.state-row:hover .state-row__body { border-left-color: var(--ink); }

.state-row__title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.state-row__desc {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
}

.vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ヒーロー下部のファクト行（ORIGIN / DOMAINS / ESTABLISHED）
   モバイルは1列、デスクトップは3列。項目数が変わっても罫線が崩れないようにする。 */
.fact-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

/* 末尾の項目に下罫線は不要（ブロックの終端を軽く見せる） */
.fact-item:last-child {
  border-bottom: 0;
}

.fact-item dt {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.fact-item dd {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .fact-item {
    padding: 24px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .fact-item:first-child { padding-left: 0; }
  .fact-item:last-child { padding-right: 0; border-right: 0; }
}

/* 背景グリッド */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 65% 25%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 65% 25%, #000 10%, transparent 72%);
}

/* ---------- ボタン ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--black);
  color: #fff;
  padding: 15px 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  border: 1px solid var(--black);
  position: relative;
  overflow: hidden;
  transition: color 0.4s var(--ease);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}

.btn-primary > * { position: relative; z-index: 1; }

.btn-primary:hover { color: var(--black); }
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover span { transform: translateX(4px); }
.btn-primary span { transition: transform 0.4s var(--ease); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 15px 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--paper);
}

/* ---------- マーキー ---------- */
.marquee { width: 100%; overflow: hidden; }

.marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 32s linear infinite;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.marquee__track .dot {
  font-size: 6px;
  color: rgba(255, 255, 255, 0.4);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- プロダクトロゴ（VIZUTOR / TRYSE） ----------
   支給画像は 500×500 の白背景PNGで、実際に色が乗っている領域は中心付近だけ。
   canvas で実測した描画領域は次のとおり。
     VIZUTOR … x150–349 / y155–300（200×146）
     TRYSE   … x157–337 / y183–290（181×108）
   そのまま <img> で置くと余白のぶんだけ小さく見えるため、.brand-logo と
   同じ「枠で切り出す」方式にする（枠で overflow を隠し、img を負のオフセットで配置）。
   枠 = インクの実寸 × k ／ img = 500 × k ／ left・top = -インク左端・上端 × k
   ワードマーク同士なので、インクの「高さ」を揃えて光学サイズを合わせる（k = 48 / インク高）。 */
.product-logo {
  position: relative;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.product-logo__img {
  position: absolute;
  display: block;
  max-width: none;
}

/* VIZUTOR: k = 48 / 146 ≒ 0.3288
   img = 500k = 164.4 ／ インク = 200k × 146k = 66 × 48
   アンチエイリアスの縁が切れないよう、枠はインクの上下左右に 2px の余白を取る。
   オフセットは「インクの左上が枠内 2px に来る」ように決める（外へずらすと切れる）。
     left = 2 - 150k ／ top = 2 - 155k */
.product-logo--vizutor {
  width: 70px;      /* 66 + 2 × 2 */
  height: 52px;     /* 48 + 2 × 2 */
}

.product-logo--vizutor .product-logo__img {
  width: 164.4px;
  height: 164.4px;
  left: -47.3px;    /* 2 - 150k */
  top: -49px;       /* 2 - 155k */
}

/* TRYSE: k = 48 / 108 ≒ 0.4444
   img = 500k = 222.2 ／ インク = 181k × 108k = 80.4 × 48 */
.product-logo--tryse {
  width: 84.4px;    /* 80.4 + 2 × 2 */
  height: 52px;
}

.product-logo--tryse .product-logo__img {
  width: 222.2px;
  height: 222.2px;
  left: -67.8px;    /* 2 - 157k */
  top: -79.3px;     /* 2 - 183k */
}

/* ---------- 写真グリッド（事業ページ） ---------- */
.photo-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.photo-grid figure {
  position: relative;
  margin: 0;
  background: #fff;
  overflow: hidden;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.photo-grid figure:hover img { transform: scale(1.04); }

.photo-grid figcaption {
  padding: 14px 16px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 写真の差し替え枠 ----------
   写真が未設定でもレイアウトが崩れない「写真の入れ物」。
   写真が用意できたら、内側の <p class="photo-frame__ph">…</p> を
     <img src="images/xxx.jpg" alt="…" width="1200" height="900" loading="lazy" decoding="async">
   に置き換えるだけでよい（寸法・切り抜きは枠側で固定される）。 */
.photo-frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* 画像が入ったら枠いっぱいに敷き詰める */
.photo-frame img,
.photo-frame video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 未設定時の表示（控えめな＋記号とラベル） */
.photo-frame__ph {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

/* 補足テキスト（サイズや用途のメモ） */
.photo-frame__ph span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.7;
  opacity: 0.72;
}

.photo-frame__ph::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  color: var(--muted);
}

/* 比率のバリエーション */
.photo-frame--wide { aspect-ratio: 16 / 9; }
.photo-frame--ultrawide { aspect-ratio: 21 / 9; }

/* 黒背景のセクション用 */
.photo-frame--dark {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
}

.photo-frame--dark .photo-frame__ph { color: rgba(255, 255, 255, 0.55); }

.photo-frame--dark .photo-frame__ph::before {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.45);
}

/* 枠＋キャプションの組 */
.photo-figure {
  position: relative;
  margin: 0;
}

/* ---------- 写真枠の通し番号 ----------
   枠の番号がそのまま画像ファイル名になる（01 → images/photo-01.jpg）。
   写真が未設定の枠は、枠の中央に番号入りのプレースホルダーが出るため
   バッジは付けず、写真が入っている枠にだけ控えめな番号を重ねる。 */
.photo-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-block;
  padding: 5px 9px 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  color: var(--ink);
  pointer-events: none;
}

.photo-figure figcaption {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

.photo-figure--dark figcaption { color: rgba(255, 255, 255, 0.55); }

/* ---------- 団体ロゴ枠（活動拠点／沿革／関連傘下団体） ----------
   実ロゴ（images/logo-lupinus-shinagawa.png 等）は「白い円＋青いスプラウト」の
   透過PNGで、白背景では円が溶けてマークだけが見える。枠線や背景を付けず、
   画像をそのまま置くのが一番きれいに出るため、枠は「寸法を揃える箱」として使う。
   ロゴ未支給の団体は .org-logo__mark の文字プレースホルダーで同じ寸法を保つ。 */
.org-logo {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
}

.org-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ロゴ未支給の団体用プレースホルダー（控えめな枠＋頭文字） */
.org-logo__mark {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1;
}

/* 沿革・一覧の中に並べる小さいロゴ */
.org-logo--sm {
  width: 40px;
  height: 40px;
}

/* ---------- 八潮ロゴ（白背景のJPEG）の扱い ----------
   ルピナス八潮のロゴは透過ではなく「白背景のJPEG」だが、実測すると
   マーク（緑のスプラウト）が画像幅に占める割合は 49.8% で、
   品川ロゴ（白円＋青いスプラウト）の 49.0% とほぼ同じだった。
   そのため拡大・縮小はせず、同じ .org-logo 枠に等倍で収めれば見た目の大きさが揃う。
   （以前は scale(1.5) で拡大していたため、八潮だけ約 1.5 倍大きく見えていた）
   黒背景では白い四角が浮くので、.org-logo--disc を併用して白い円として見せる。
   ※ .org-logo--yashio は画像ごとの微調整が必要になったときのフックとして残す。 */
.org-logo--yashio img {
  transform: none;
}

.org-logo--disc {
  background: #fff;
  border-radius: 50%;
}

/* 団体名とロゴを横並びで揃える行 */
.org-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  vertical-align: middle;
}

/* ---------- カード ---------- */
.card-lift {
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.5s var(--ease);
}

.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -28px rgba(15, 23, 42, 0.35);
}

.issue-card {
  position: relative;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease);
}

.issue-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}

.issue-card:hover { transform: translateY(-8px); }
.issue-card:hover::after { transform: scaleX(1); }

/* メンバーカード */
.member-card {
  background: #fff;
  padding: 32px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 148px;
  transition: background 0.5s var(--ease), transform 0.5s var(--ease);
}

.member-card:hover {
  background: var(--paper);
  transform: translateY(-4px);
}

.member-initial {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  background: var(--mist);
  border: 1px solid var(--line);
  font-size: 22px;
  font-weight: 900;
  transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.member-card:hover .member-initial {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- メンバー写真（カード内の小さなポートレート） ----------
   正方形に切り抜き、顔が上寄りに来るよう object-position で調整する。
   hover でわずかにズームして、カード全体の反応と揃える。 */
.member-photo {
  display: block;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
}

.member-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.7s var(--ease);
}

.member-card:hover .member-photo img { transform: scale(1.05); }

/* 顔の位置は写真ごとに違うため、寄っている写真は切り抜き位置を個別に調整する
   （--right / --left はカード用、.obj-right / .obj-left は縦位置の詳細枠用） */
.member-photo--right img { object-position: 62% 18%; }
.member-photo--left img  { object-position: 40% 18%; }

.obj-right { object-position: 62% 14%; }
.obj-left  { object-position: 40% 14%; }

@media (max-width: 767px) {
  .member-photo { width: 72px; height: 72px; }
}

.member-card--join {
  background: var(--paper);
  align-items: flex-start;
}

.member-card--join:hover { background: var(--mist); }

/* ---------- メンバーカード（クリックで詳細を開く） ----------
   カードは <button> にしているため、ブラウザ既定の見た目を打ち消す。
   文字は左揃え、幅はグリッドいっぱい、フォントは継承。 */
button.member-card {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  appearance: none;
}

button.member-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}

.member-meta { display: block; min-width: 0; }

/* 「詳細を見る →」の誘導。hover で下線が引き、矢印が少し進む */
.member-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), gap 0.4s var(--ease);
}

.member-card:hover .member-open,
.member-card:focus-visible .member-open {
  color: var(--ink);
  border-color: var(--ink);
  gap: 14px;
}

/* ---------- メンバー詳細ダイアログ ----------
   ネイティブ <dialog> を使うことで、ESC 閉じ・背面のフォーカス封じ・
   開いた要素へのフォーカス復帰をブラウザに任せられる。 */
.member-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  overflow: hidden;
}

.member-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.member-dialog__panel {
  display: flex;
  flex-direction: column;
  max-height: min(86vh, 900px);
}

.member-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.member-dialog__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.member-dialog__close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.member-dialog__body {
  overflow-y: auto;
  padding: 28px 24px 32px;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  .member-dialog__body { padding: 40px 44px 46px; }
}

/* 本文レイアウト：写真（縦位置）＋プロフィール */
.member-detail__grid {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

@media (min-width: 640px) {
  .member-detail__grid {
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
  }
}

.member-detail__note {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}

/* 顔写真用の縦位置（3:4）枠 */
.photo-frame--portrait { aspect-ratio: 3 / 4; }

/* ---------- タグ ---------- */
.tag {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* 注意を引くタグ（例：採用条件の「無給（現段階）」）
   募集条件は誤解を招かないよう、黒地＋白字で明確に目立たせる。 */
.tag--note {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 700;
}

/* ---------- アコーディオン ---------- */
.accordion-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr 32px;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}

.accordion-trigger:hover {
  background: var(--paper);
  padding-left: 12px;
  padding-right: 12px;
}

.acc-num {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.acc-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-en {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.acc-jp {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.acc-icon {
  position: relative;
  width: 22px;
  height: 22px;
  justify-self: end;
}

.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.45s var(--ease), opacity 0.35s var(--ease);
}

.acc-icon::before {
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  margin-top: -0.5px;
}

.acc-icon::after {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  margin-left: -0.5px;
}

.accordion-item.is-open .acc-icon::after { transform: scaleY(0); }
.accordion-item.is-open .acc-icon::before { transform: rotate(180deg); }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease);
}

.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }

.accordion-body {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  /* 開いたとき、見出し下の区切り線（.accordion-trigger の border-bottom）に
     本文が密着して見えていたため、上側にも余白を取る。
     0fr → 1fr のアニメーション中に高さが跳ねないよう、padding も併せて遷移させる。 */
  padding-top: 0;
  transition: opacity 0.5s var(--ease) 0.1s, padding-top 0.6s var(--ease);
}

.accordion-item.is-open .accordion-body { opacity: 1; }

.accordion-panel > .accordion-body { padding-bottom: 0; }
.accordion-item.is-open .accordion-body { padding-bottom: 44px; }

/* 区切り線と本文のあいだの余白（スマホは詰まって見えやすいので広めに取る） */
.accordion-item.is-open .accordion-body {
  padding-top: 32px;
}

@media (min-width: 768px) {
  .accordion-item.is-open .accordion-body {
    padding-top: 36px;
  }
}

/* 本文冒頭の要素が独自の margin-top を持っていても、
   二重に空きすぎないよう先頭の余白は打ち消す */
.accordion-item.is-open .accordion-body > *:first-child {
  margin-top: 0;
}

/* ---------- 会社概要テーブル ---------- */
.info-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .info-row {
    grid-template-columns: 160px 1fr;
    gap: 24px;
    align-items: baseline;
  }
}

.info-row dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.info-row dd {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 問い合わせチャネル ---------- */
.channel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  background: #fff;
  padding: 20px 24px;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}

.channel-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.channel-sub {
  grid-column: 1 / 2;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.channel-arrow {
  grid-row: 1 / 3;
  grid-column: 2 / 3;
  font-size: 16px;
  transition: transform 0.45s var(--ease);
}

.channel-row:hover { background: var(--paper); padding-left: 32px; }
.channel-row:hover .channel-arrow { transform: translateX(6px); }

/* ---------- フォーム ----------
   2026-11-17 にお問い合わせを Google フォームの埋め込みへ移行したため、
   自前フォーム用のスタイル（`.field` の入力欄・`.req` の必須バッジ・
   エラー表示 `.is-invalid`）とトースト（`#cf-toast`）は削除した。
   Google フォームの見た目はフォーム側が描画するので、こちらでは
   埋め込み枠（`.contact-gform`）の幅と高さだけを指定している。 */

/* ---------- フッター ---------- */
.footer-link {
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.3s var(--ease);
  position: relative;
}

.footer-link:hover { color: #fff; }

/* ---------- 下層ページ ---------- */

/* ページヒーロー（各下層ページ共通の見出し帯） */
.page-hero {
  position: relative;
  padding: 7.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
}

@media (min-width: 768px) {
  .page-hero { padding: 10rem 0 4.5rem; }
}

.page-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 100% at 80% 0%, #000 5%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 80% 0%, #000 5%, transparent 70%);
  pointer-events: none;
}

.page-hero__num {
  position: absolute;
  right: -0.06em;
  bottom: -0.32em;
  font-size: clamp(7rem, 22vw, 18rem);
  font-weight: 900;
  line-height: 1;
  color: var(--mist);
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 1024px) {
  .page-hero__num { right: 0.02em; bottom: -0.28em; }
}

/* パンくず */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.breadcrumb a {
  transition: color 0.3s var(--ease);
}

.breadcrumb a:hover { color: var(--ink); }

.breadcrumb .sep { color: var(--line); }

/* ページネーション（前後ページへの送り） */
.page-nav-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 0;
}

/* ラベルだけを横にずらす（親の padding を触らないので、
   左右どちらの列でもレイアウトが崩れない） */
.page-nav-link .dir,
.page-nav-link .label {
  transition: transform 0.45s var(--ease);
}

.page-nav-link:hover .dir,
.page-nav-link:hover .label {
  transform: translateX(12px);
}

.page-nav-link .dir {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.page-nav-link .label {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* 本文レイアウト（下層ページ） */
.prose-block p {
  font-size: 15px;
  line-height: 2.15;
  color: rgba(15, 23, 42, 0.9);
}

/* 黒背景上の本文
   .prose-block p の色は詳細度 0,1,1 のため、Tailwind の text-white/80
   （0,1,0）では上書きできない。黒背景のセクションにはこの修飾クラスを使う。 */
.prose-block--light p {
  color: rgba(255, 255, 255, 0.78);
}

.prose-block p + p { margin-top: 1.5rem; }

@media (min-width: 768px) {
  .prose-block p { font-size: 16px; }
}

/* 本文中の強調（下線）
   Mission の「挑戦を選択することができる状態」など、支給テキストで下線が
   引かれている箇所に使う。黒背景上でも currentColor で追従する。 */
.uline {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

/* 見出し（下層ページのセクション内） */
.sub-heading {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.h3-block {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* リスト（番号付き） */
.num-list > li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.num-list > li > .n {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 3px;
}

/* 情報カード（汎用） */
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px 24px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -30px rgba(15, 23, 42, 0.32);
}

/* 引用・注記ボックス */
.note-box {
  border-left: 2px solid var(--ink);
  background: var(--paper);
  padding: 20px 24px;
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
}

/* ---------- 理念セクション（可読性優先のタイポグラフィ） ---------- */
/* 参考：ACES（acesinc.co.jp）の、細罫線＋大きな文字＋ゆとりある余白の作法を踏襲 */

/* 英字ラベル＋右へ伸びる細罫線 */
.label-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.label-rule::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.label-rule--light::after {
  background: rgba(255, 255, 255, 0.22);
}

/* 画面幅いっぱいに広げる黒帯。内側は通常のコンテンツ幅に揃える。
   body に overflow-x: clip があるため横スクロールバーは出ない。 */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* 理念の声明文：大きく、行間をゆったり取る */
.statement {
  font-size: clamp(1.5rem, 3.6vw, 2.75rem);
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: var(--ink);
}

/* 読みやすい本文：サイズとコントラストを上げる（薄いグレーを避ける） */
.body-lg {
  font-size: 15px;
  line-height: 2.15;
  color: #334155;
  letter-spacing: 0.01em;
}

@media (min-width: 768px) {
  .body-lg {
    font-size: 16px;
    line-height: 2.2;
  }
}

/* 反転（黒背景）上の本文 */
.body-lg--light {
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- スクロール演出 ---------- */
/* 参考：CARTA HOLDINGS（cartaholdings.co.jp）
   ・要素ごとの「ふわっと」ではなく、文字が下から順に立ち上がる／
     画像がカーテンのように現れる、という編集的な動きを基調にしている。
   ・イージングは expo-out 系の長い減速（--ease-out）で、止まり際を静かに見せる。 */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.76, 0, 0.24, 1);
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.05s var(--ease-out), transform 1.05s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 見出し：1字ずつマスクから下より立ち上がる ---
   JS（js/main.js §8）が h1 / h2 のテキストを 1字ずつ分割する。
   外側 .anim-ch がマスク、内側 .anim-ch__i が動く本体。
   ディレイは --base-delay（見出しの data-delay）＋ --i × --step で決まるため、
   行をまたいでも読み上げの流れが途切れない。 */
.anim-ch {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* 下に少し余白を取り、g / y / p などの下降部が切れないようにする */
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  line-height: inherit;
}

.anim-ch__i {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.95s var(--ease-out);
  transition-delay: calc(var(--base-delay, 0ms) + var(--i, 0) * var(--step, 16ms));
  will-change: transform;
  /* 空白を1字として保持する */
  white-space: pre;
}

.is-visible .anim-ch__i { transform: translateY(0); }

/* 分割した要素は、自身のフェード/移動を持たない（文字側だけで動かす）。
   親の opacity は 1 のままなので、未発火でも文字以外はレイアウトとして残る。 */
.reveal--split {
  opacity: 1;
  transform: none;
  transition: none;
}

/* 分割後も読み上げ・コピーは元の文のままにするための退避テキスト。
   見た目の分割文字は aria-hidden にし、元テキストをこのクラスで保持する。 */
.u-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- 画像：マスクが開いて、わずかにズームが戻る ---
   JS（js/main.js §6.2）が対象に .curtain を付ける。
   ::after の覆いを使わず clip-path で切り抜くため、
   figure 内の figcaption（キャプション）は巻き込まない。 */
.curtain img,
.curtain video {
  clip-path: inset(12% 0 12% 0);
  transform: scale(1.06);
  transition: clip-path 1.25s var(--ease-inout), transform 1.5s var(--ease-out);
  will-change: clip-path, transform;
}

.curtain.is-visible img,
.curtain.is-visible video {
  clip-path: inset(0 0 0 0);
  transform: scale(1);
}

/* カーテン中でも img の hover 拡大は維持する（詳細度で上書き） */
.photo-grid figure.curtain.is-visible:hover img { transform: scale(1.04); }

/* --- ナビゲーション：1文字ずつ上へ入れ替わるホバー ---
   JS がラベルを .rch（1文字ぶんのマスク）に分割する。
   英語ラベルのみを対象にしているため、分割しても折り返しは崩れない。 */
.rch {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: inherit;
}

.rch__a,
.rch__b {
  display: block;
  transition: transform 0.5s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 18ms);
  white-space: pre;
  will-change: transform;
}

.rch__b {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(105%);
}

.nav-link:hover .rch__a,
.nav-link:focus-visible .rch__a { transform: translateY(-105%); }

.nav-link:hover .rch__b,
.nav-link:focus-visible .rch__b { transform: translateY(0); }


/* ---------- Google フォームの埋め込み ----------
   お問い合わせは Google フォームを iframe で埋め込んでいる（2026-11-17 に移行）。
   ・フォーム側の余白や背景は Google が描画するため、こちらでは幅と高さだけを決める
   ・高さは固定値。デスクトップ（枠幅580px）では設問5問＋送信ボタン＋Googleの
     フッターまで含めて約1560pxあったため、余裕をみて 1600px にした。
     設問が増えて縦に伸びる場合はこの高さを上げる（iframe 内もスクロールできるが、
     途中で切れて見えるのを避けるため、実際の高さに合わせるのが望ましい）
   ・スマホは幅が狭くフォームが縦に伸びるため、より高い値にする */
.contact-gform {
  display: block;
  width: 100%;
  height: 1600px;
  border: 0;
  background: #fff;
}

@media (max-width: 639px) {
  .contact-gform { height: 1950px; }
}

/* ---------- アクセシビリティ ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* 文字スタッガー・画像マスクも無効化（読み込み直後に全部見せる） */
  .anim-ch__i { transform: none !important; }
  .curtain img,
  .curtain video { clip-path: none !important; transform: none !important; }
  .rch__b { display: none; }
  .nav-link .rch__a { transform: none !important; }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- レスポンシブ微調整 ---------- */
@media (max-width: 767px) {
  .accordion-trigger { grid-template-columns: 34px 1fr 26px; gap: 12px; padding: 22px 0; }
  .acc-en { font-size: 13px; }
  .acc-jp { font-size: 11px; }
  .marquee__track { animation-duration: 22s; }
  .member-card { padding: 26px 22px; min-height: 0; }
}
