/* デザイン B案 の共通ヘッダー（トップ・下層とも）。
   左にロゴ、右に文字だけのメニューと三本線。スクロールすると低くなって地が付き、暗い面の上では暗い地に白い文字になる。
   三本線を押すと、画面全体を覆うメニューが上からすべり込む。 */
/* 全ページ共通の改行：本文は文節で切らず、どの幅でも行いっぱいまで詰めて折り返す（2026-12-01・12-03 ユーザー指示）。
   text-wrap: pretty は使わない（Safari では段落全体の行をそろえるために行を短めに切り、右側に余白が残る）。行頭の禁則は厳しくする。約物（、。「」など）の余白を詰める（palt） */
body { word-break: normal; text-wrap: wrap; line-break: strict; }
/* 見出しは文節の途中で切らず（auto-phrase。Safari は未対応で、そのときは通常の折り返し）、1〜2 文字だけ次の行に落ちないよう、行の長さをそろえて折り返す */
h1, h2, h3, h4, h5 { word-break: auto-phrase; text-wrap: balance; }
/* 本文は文の途中で改行を入れず、文節で切らずに行いっぱいまで詰めて折り返す（両端揃えにはしない＝字間を広げない） */
.ab-p, .of-lead, .c-tx, .bio, .lead, .article p, .article li, .art .txt p, .page-head .desc, .bz-lead, .bz-desc { word-break: normal; }
/* スマホの行間は、本文 1.75 倍・見出し 1.4 倍にそろえる（2026-11-11 ユーザー指示。ページごとの指定より優先する） */
@media (max-width: 820px) {
  .ab-p, .of-lead, .c-tx, .bio, .lead, .article p, .article li, .art .txt p, .page-head .desc, .sd-tx, .sd-card, .soon .tx, .co-table dd, .access address, .ai li, .card p, .mvp .k { line-height: 1.75 !important; }
  main h1, main h2, main h3, main h4, main h5, main .ab-p.em { line-height: 1.4 !important; }
}
*, *::before, *::after { font-feature-settings: "palt" !important; }   /* 個別の font 一括指定（font: 700 14px …）で消えないよう、全要素に直接かける */

.hd { position: sticky; top: 0; z-index: 1001; display: flex; align-items: center; gap: 32px; height: 100px; padding: 0 var(--gutter, 4.5vw);
  color: var(--ink, #26333D); font-family: var(--ja); transition: height .3s cubic-bezier(.215,.61,.355,1), background-color .3s, color .3s, box-shadow .3s; }
.hd.small { height: 72px; }
@media (min-width: 961px) { .hd { padding: 0 calc(var(--gutter, 4.5vw) * .6); } }   /* PC のヘッダーは本文より左右の余白を狭くする */
.hd.solid { background: rgba(242,243,245,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hd.is-dark { background: rgba(38,51,61,.94); color: #fff; box-shadow: none; }
.hd.menu-open { background: #F2F3F5; color: var(--ink, #26333D); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }   /* メニューと同じ地を敷き、メニューより上（z-index 1001 > 1000）に重ねる。透明だとスクロールしたメニューの文字がヘッダーに透ける */

/* ホバーの共通の決まり（全ページ。ページごとに倍率を直書きしない）：
   文字のあるボタンは --hv-scale でふくらみ、白いボタンは文字が --hv-color（WUUZY ブルー）に。矢印は --hv-arrow だけ進む。丸だけのボタンは --hv-scale-round */
:root { --hv-scale: 1.06; --hv-scale-round: 1.1; --hv-arrow: 4px; --hv-color: #0080C8; }

/* ロゴ（正式なロゴのデータ。暗い地の上では白抜きにする） */
.hd-logo { display: block; flex: none; line-height: 0; }
.hd-logo img { display: block; width: 118px; height: auto; transition: filter .3s, opacity .3s; }
@media (hover: hover) { .hd-logo:hover img { opacity: .6; } }
.hd-logo:focus-visible img { opacity: .6; }
.hd.is-dark:not(.menu-open) .hd-logo img { filter: brightness(0) invert(1); }
@media (max-width: 960px) { .hd-logo img { width: 100px; } }

/* メニュー */
.hd-nav { display: flex; align-items: center; gap: 40px; margin-left: auto; font-size: 16.5px; font-weight: 700; letter-spacing: .04em; }
.hd-nav a[aria-current="page"] { color: var(--wuuzy-blue, #0080C8); }
.hd.is-dark:not(.menu-open) .hd-nav a[aria-current="page"] { color: #9FD3F2; }

/* カーソルを乗せると、文字が1文字ずつ上へ抜け、下から青い同じ文字がせり上がる（header.js が文字を分ける） */
.roll { position: relative; display: inline-flex; overflow: hidden; line-height: 1.35; vertical-align: top; }
.roll .r { display: block; white-space: nowrap; }
.roll .r2 { position: absolute; left: 0; top: 100%; color: var(--wuuzy-blue, #0080C8); }
.hd.is-dark:not(.menu-open) .roll .r2 { color: #9FD3F2; }
/* 英字と日本語の 2 段（ヘッダーの文字のメニュー）：同じ枠に重ね、幅は長いほうに合わせて中央にそろえる */
.roll.bi { display: inline-grid; padding: 0 1.5em; margin: 0 -1.5em; pointer-events: none; }   /* 項目の幅は英字で決める（左右の余白と負の余白を打ち消し、日本語は見切りの内側で横にはみ出して見せる。乗せた判定はリンクの英字の幅だけ）。overflow: clip は Safari 15 以前で効かないので使わない */
.roll.bi .r { grid-area: 1 / 1; justify-self: center; }
.roll.bi .r1 { align-self: center; font-family: var(--latin); font-size: .9em; font-weight: 600; letter-spacing: .08em; }
.roll.bi .r2 { position: relative; left: auto; top: 0; transform: translateY(100%); width: 0; display: flex; justify-content: center; }
.roll.bi .r2 .ch { flex: none; }   /* 幅 0 の行でも 1 文字ずつ縮めない */
.roll-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.roll .ch { display: inline-block; min-width: .2em; transition: transform .5s cubic-bezier(.19,1,.22,1); transition-delay: calc(var(--i) * 18ms); }
a:hover .roll .ch, a:focus-visible .roll .ch { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .roll .ch { transition: none; } a:hover .roll .ch, a:focus-visible .roll .ch { transform: none; } a:hover .roll .r1 { color: var(--wuuzy-blue, #0080C8); } }
/* スマホ・タブレット（マウスが無い端末）では、文字が回って入れ替わる動きを出さない（2026-10-23 依頼者の指示）。押したときに一瞬回って残るのも防ぐ */
@media (hover: none) { .roll .ch { transition: none; } a:hover .roll .ch, a:focus-visible .roll .ch { transform: none; } }

/* 外部サイト（採用サイト）へのリンクに付ける右上向きの矢印。文字の「↗」は端末によって絵文字になるので、線の矢印を CSS で描く */
.hd-nav a[target="_blank"]::after, .hd-drawer a[target="_blank"] .en::after, .ft-nav a[target="_blank"]::after {
  content: ""; display: inline-block; flex: none; width: .62em; height: .62em; margin-left: .35em; vertical-align: .08em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4.5 3H9v4.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9L9 3M4.5 3H9v4.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* 三本線：細い線 3 本。押すと全画面メニューが開く */
.hd-burger { position: relative; flex: none; width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; color: inherit; cursor: pointer; }
.hd-burger .bars { position: absolute; inset: 0; }
.hd-burger i { position: absolute; left: 9px; right: 9px; height: 1.5px; background: currentColor; transition: transform .7s cubic-bezier(.19,1,.22,1), opacity .3s; }
.hd-burger i:nth-child(1) { top: 15px; }
.hd-burger i:nth-child(2) { top: 21px; }
.hd-burger i:nth-child(3) { top: 27px; }
.hd-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(25deg); }
.hd-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.hd-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-25deg); }
/* 乗せると線が WUUZY ブルーになる（三本線・開いたときのばつのどちらも） */
.hd-burger { transition: color .25s; }
@media (hover: hover) { .hd-burger:hover { color: var(--wuuzy-blue, #0080C8); } }
.hd-burger:focus-visible { color: var(--wuuzy-blue, #0080C8); }

/* 画面全体のメニュー */
.hd-drawer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 130px var(--gutter, 4.5vw) 48px;
  background: #F2F3F5; color: var(--ink, #26333D); overflow-y: auto; transform: translateY(-100%); visibility: hidden;
  transition: transform .8s cubic-bezier(.77,0,.18,1), visibility 0s .8s; }
.hd-drawer.open { transform: none; visibility: visible; transition: transform .8s cubic-bezier(.77,0,.18,1), visibility 0s; }
.hd-drawer ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6vw; border-top: 1px dashed rgba(38,51,61,.35); }
.hd-drawer li { border-bottom: 1px dashed rgba(38,51,61,.35); opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .8s cubic-bezier(.19,1,.22,1); }
.hd-drawer.open li { opacity: 1; transform: none; transition-delay: calc(.25s + var(--i) * 50ms); }
.hd-drawer li a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 22px 0; }
.hd-drawer li .en { font-family: var(--latin); font-size: clamp(24px, 3vw, 44px); font-weight: 700; letter-spacing: .02em; line-height: 1.1; }
.hd-drawer li .ja { font-size: 13px; font-weight: 700; color: var(--ink-soft, #5B6873); }
.hd-drawer li a[aria-current="page"] .en { color: var(--wuuzy-blue, #0080C8); }
.hd-drawer li .en .roll { line-height: 1.15; }
.hd-drawer .sub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--ink-soft, #5B6873); }
.hd-drawer .sub a { text-decoration: underline; text-underline-offset: 3px; }
/* 会社名の次の行に住所を書く */
.hd-drawer .sub .co { display: grid; gap: 4px; }
.hd-drawer .sub a:hover { color: var(--wuuzy-blue, #0080C8); }
/* 下の右側：プライバシーポリシーと2つのハラスメントの基本方針（フッターの下段と同じ並び） */
.hd-drawer .sub .links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 8px 28px; }
.hd-drawer .sub a[aria-current="page"] { color: #0068A3; }
/* 三本線のメニューになる幅（1100px 以下）：会社名と住所を上に、規約のリンクを点線の下にまとめ、別の情報だと分かるようにする */
@media (max-width: 1100px) {
  .hd-drawer .sub { flex-direction: column; flex-wrap: nowrap; gap: 16px; }
  .hd-drawer .sub .co-name { font-size: 13px; font-weight: 700; color: var(--ink, #26333D); }
  .hd-drawer .sub .links { flex-direction: column; justify-content: flex-start; gap: 10px; padding-top: 16px; border-top: 1px dashed rgba(38,51,61,.35); }
}
@media (prefers-reduced-motion: reduce) { .hd-drawer, .hd-drawer li { transition: none !important; } }
/* 右下に置くお問い合わせのボタン（参考：elec-inc.com）。ロゴの青の丸に CONTACT と封筒。
   fab3d.js が描けたら、丸はトップの W と同じ青い立体（同じ材質・光）になり、乗せるとカーソルのほうへ傾く。描けないときは平らな青い丸のまま。
   お問い合わせのページ（送信完了を含む）には置かない。全画面メニューを開いている間は隠す */
.fab-contact { position: fixed; right: 28px; bottom: 28px; z-index: 950; display: block; width: 104px; height: 104px; color: #fff; transition: opacity .3s, visibility 0s; }   /* ページの中身（TOP の段は 7〜10）より上・メニュー（1000）とヘッダー（1001）より下。TOP で段の下に隠れることがあった（2026-11-17） */
.fab-in { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border-radius: 50%;
  background: var(--wuuzy-blue, #0080C8); color: #fff; transition: transform .5s cubic-bezier(.34,1.3,.64,1), background .25s; }
.fab-contact.is-3d .fab-in { background: transparent; transition: none; }
.fab-tx { font: 700 14px/1 var(--latin); letter-spacing: .04em; transition: letter-spacing .5s cubic-bezier(.34,1.1,.64,1.2); }
.fab-mail { width: 16px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.fab-contact:not(.is-3d):hover .fab-in, .fab-contact:not(.is-3d):focus-visible .fab-in { transform: scale(var(--hv-scale-round)); background: #0068A3; }
.fab-contact:hover .fab-tx, .fab-contact:focus-visible .fab-tx { letter-spacing: .12em; }
html.menu-lock .fab-contact { opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
@media (prefers-reduced-motion: reduce) { .fab-in, .fab-tx { transition: none; } }
@media (max-width: 960px) { .fab-contact { right: 14px; bottom: 14px; width: 84px; height: 84px; } .fab-in { gap: 5px; } .fab-tx { font-size: 11px; } }

/* html を止めると body の overflow-x: hidden が画面へ伝わらなくなり、body がスクロールの箱になって
   sticky のヘッダーが画面外へ外れる。開いている間は body を visible に戻す（横のはみ出しは html が隠す） */
html.menu-lock { overflow: hidden; }
html.menu-lock body { overflow: visible; }


/* ナビが 6 項目（MEMBERS を足した）になったので、狭めの画面では間を詰め、さらに狭いと三本線のメニューだけにする */
@media (max-width: 1280px) { .hd-nav { gap: 28px; font-size: 15.5px; } }
@media (max-width: 1100px) { .hd-nav { display: none; } .hd-burger { margin-left: auto; } }

@media (max-width: 960px) {
  .hd-nav { display: none; }
  .hd-burger { margin-left: auto; }
  .hd { height: 72px; gap: 16px; }
  .hd.small { height: 60px; }
  .hd-drawer { padding-top: 100px; }
  .hd-drawer ul { grid-template-columns: 1fr; }
  .hd-drawer li a { padding: 16px 0; }
}

/* 三本線にカーソルを乗せると、上の線が右から縮み、下の線が左から縮む（開いているとき・マウスの無い端末では動かさない） */
@media (hover: hover) { .hd-burger:not([aria-expanded="true"]):hover i:nth-child(1) { transform: scaleX(.55); transform-origin: right center; } .hd-burger:not([aria-expanded="true"]):hover i:nth-child(3) { transform: scaleX(.55); transform-origin: left center; } }
@media (prefers-reduced-motion: reduce) { .hd-burger i { transition: none; } }
