/* 案件の見た目：株式会社たくみ【案B：力強い】（案A＝参考に忠実 を元に、打ち込む・叩きつけるトーンへ）
 * 値は tokens.css の変数だけを使う（色・大きさを直接書かない）
 * 決まり：1つの部品は1か所にだけ書く。末尾に足して上書きしない。!important を使わない
 * 土台（base.css）の指定は上書きしない
 */

/* ---------- 社名の文字組み（ロゴの支給なし） ---------- */
.wordmark {
  display: block; font-family: var(--font-head); font-weight: 900; font-size: 15px; line-height: 1;
  letter-spacing: 0.12em; white-space: nowrap; color: var(--color-main);
}
.wordmark--rail { font-size: 30px; letter-spacing: 0.14em; }

/* ---------- 写真のページ：全面写真＋黒へ溶かす＋余白を区切る白線の枠 ---------- */
.page--photo { --veil: linear-gradient(to bottom, var(--color-veil) 0%, var(--color-veil-0) 34%, var(--color-veil-0) 46%, var(--color-veil) 78%); }
.page--answer { --veil: linear-gradient(to bottom, var(--color-veil) 0%, var(--color-veil-0) 12%, var(--color-veil-0) 44%, var(--color-veil) 62%); }
.page--work { --veil: linear-gradient(to bottom, var(--color-veil-half) 0%, var(--color-veil-half) 36%, var(--color-band) 56%, var(--color-veil) 70%); }   /* 見出しの後ろを暗く（りょうさん 10/15「見出しの視認性が悪い」） */
.page--photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--veil);
}
/* 白線の枠：上下左右の4本で余白を区切る。真四角にせず、四辺が角を突き抜ける（--frame-over）
 * 文字が出きったあと（--lines-delay）に1本ずつ大きく走る：上（左→右）→ 左右（上→下）→ 下（右→左） */
.page--photo, .page--frame {
  --lines-delay: 1200ms;
  --fv: calc(100% - 2 * var(--frame-y) + 2 * var(--frame-over));   /* 縦線の長さ */
  --fw: calc(100% - 2 * var(--guide-x) + 2 * var(--frame-over));   /* 横線の長さ */
}
.page--photo::after, .page--frame::after {
  content: ""; position: absolute; inset: var(--header-h) 0 0 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(var(--frame-c, var(--color-frame)), var(--frame-c, var(--color-frame))) left var(--guide-x) top calc(var(--frame-y) - var(--frame-over)) no-repeat,
    linear-gradient(var(--frame-c, var(--color-frame)), var(--frame-c, var(--color-frame))) right var(--guide-x) top calc(var(--frame-y) - var(--frame-over)) no-repeat,
    linear-gradient(var(--frame-c, var(--color-frame)), var(--frame-c, var(--color-frame))) left calc(var(--guide-x) - var(--frame-over)) top var(--frame-y) no-repeat,
    linear-gradient(var(--frame-c, var(--color-frame)), var(--frame-c, var(--color-frame))) right calc(var(--guide-x) - var(--frame-over)) bottom var(--frame-y) no-repeat;
  background-size: 1px 0, 1px 0, 0 1px, 0 1px;
}
.page--photo.is-active::after, .page--frame.is-active::after { animation: frame-draw 1000ms var(--lines-delay) both; }
@keyframes frame-draw {
  0% { background-size: 1px 0, 1px 0, 0 1px, 0 1px; animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); }
  30% { background-size: 1px 0, 1px 0, var(--fw) 1px, 0 1px; animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); }
  70% { background-size: 1px var(--fv), 1px var(--fv), var(--fw) 1px, 0 1px; animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); }
  100% { background-size: 1px var(--fv), 1px var(--fv), var(--fw) 1px, var(--fw) 1px; }
}

/* 写真：ページに入るとゆっくり寄りから戻る（参考：5.5秒） */
.ph {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  transform: scale(1.35); transition: transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
}
.page.is-active .ph { transform: none; }
.ph--top { inset: -80px 0 auto 0; height: 75%; object-position: center 92%; }   /* 顔を見出しより上に（ヘッダーの下に隠れる分だけ上へ） */
/* p3：文字は上下中央。写真は切らずに幅いっぱい（作業員の顔は写真の上から約41%）。縦に長い画面ほど上へずらし、文字の上の空きに作業員を見せる
 * 上へのずれ＝（空きの半分 − 約7em）。スマホのように空きが少ない画面は 0（ずらさない）。文字のかたまりは約33.5em（りょうさん 10/15「縦幅が上がると崩れる」） */
.ph--work {
  inset: auto 0 auto 0; top: calc(var(--header-h) + 4.5em - 0.574 * min(100vw, var(--col)));   /* 作業員の顔（写真の上から約41%＝幅の0.574倍）をヘッダーの下 4.5em に。写真の上の暗い天井は画面の外へ（りょうさん 10/15「画像上部の余白をなくして人を上に」） */ height: auto; aspect-ratio: 900 / 1260;
  -webkit-mask-image: linear-gradient(to bottom, var(--color-main) 62%, transparent); mask-image: linear-gradient(to bottom, var(--color-main) 62%, transparent);   /* 写真の下端を黒へ溶かす（横一直線の境目を見せない） */
}

/* p1：白い閃光が走ってから写真が出る（案B） */
/* p1 の配置（りょうさん 10/15「参考は被写体を見せているが、文字で人が隠れている」→ 案2「写真を拡大してもう少し右へ」）
 * 写真を 1.3 倍にして右へずらし、人物を右に。見出しは全幅（上の暗い面）、本文は左の列（顔にかけない） */
.page--dawn {
  --t0: var(--delay-type); --lines-delay: 1300ms;
  --veil:
    linear-gradient(to bottom, var(--color-veil) 0%, var(--color-veil-0) 30%),
    linear-gradient(to right, var(--color-band) 0%, var(--color-veil-0) 52%);   /* 左は見出しの後ろだけ薄く（本文は帯の箱で読ませる＝参考の使い方。りょうさん 10/15「写真がダークすぎ」） */
}
.page--dawn .page__inner { max-height: 48em; top: max(0px, calc((100% - 48em) / 2)); }   /* 縦長の画面で見出しと本文の間が空きすぎないよう、かたまりの高さに上限を付けて上下中央に（りょうさん 10/15） */
.page--dawn .bands { max-width: 62%; grid-template-columns: minmax(0, 1fr); font-size: max(var(--fs-min), 0.88em); gap: 0.2em; margin-bottom: 0.6em; }
.page--dawn .band__t { line-height: 1.58; letter-spacing: 0.05em; }
/* 写真の明るさ（filter）は動かさず、上に重ねた黒い面（.shade。site.js が置く）の不透明度を下げる＝スマホでも滑らか */
.page--dawn .ph { inset: 0 auto 0 12%; width: 130%; object-position: center 45%; transform-origin: right center; transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1) var(--delay-dawn); }
.shade {
  position: absolute; inset: 0; z-index: 0; background: var(--color-on-dark); pointer-events: none;
  transition: opacity 380ms cubic-bezier(0.5, 0, 0.75, 0) var(--delay-dawn);
}
.page.is-active .shade { opacity: 0; }
.page--dawn .num { transition-delay: calc(var(--delay-dawn) + var(--dur-dawn) - 400ms); }   /* 番号も写真が明るくなってから */

/* p2・p3：黒い長方形がばらばらに横へ開いて、パズルのように写真ができる（参考の人物ページのテンポ。点滅・光は入れない＝目がチラつかない。りょうさん 10/15）
 * 四角は site.js が並べる。開く向きは四角ごとに左右（.to-left） */
.tiles {
  position: absolute; inset: 0; z-index: 0; display: grid; pointer-events: none;
  grid-template: repeat(var(--rows), 1fr) / repeat(var(--cols), 1fr);
}
.tiles i { margin: -0.5px; background: var(--color-main); transform-origin: right center; }
.tiles i.to-left { transform-origin: left center; }
.page.is-active .tiles i { animation: tile-out 220ms cubic-bezier(0.65, 0, 0.35, 1) var(--d) both; }
@keyframes tile-out {
  from { transform: none; }
  to { transform: scaleX(0); }
}
/* 文字は写真が出きってから（写真 → 文字の順。四角が消え終わる約2秒の後） */
.page--tiles { --t0: 650ms; --lines-delay: 1500ms; }   /* 全体を約半分に（りょうさん 10/15「待ちが発生する」） */
.page--tiles .num, .page--tiles .sheet, .page--tiles .lead, .page--tiles .lead .wipe, .page--tiles .scope, .page--tiles .txt { transition-delay: 600ms; }

/* ---------- 本文の並び ---------- */
.page__inner--split { justify-content: space-between; gap: 1em; }
.page--answer .page__inner--split { justify-content: flex-end; }   /* p2：番号を見出しの上に下ろし、写真の顔にかけない */
.page__inner--work { gap: 0.5em; line-height: 1.6; letter-spacing: 0.06em; }
.page__inner--work .scope, .page__inner--work .txt { font-size: max(var(--fs-min), 0.87em); }   /* 本文だけ小さく（スマホで 13px。見出しは全ページ同じ大きさ。りょうさん 10/15「1画面のまま文字を小さく」） */
.head { display: grid; gap: 1.1em; }
.page__inner--work .num__n { display: none; }   /* p3：見出しを全ページ同じ大きさにした分、大きな番号は外す（白い小見出しは残す） */

/* 番号（飾り。参考：小さな見出しが上、幾何学的な斜体の輪郭の番号が下） */
.num { display: grid; justify-items: start; gap: 0.6em; }   /* 小見出しの札（若者の逆襲）と番号（#01）の間に余裕を（先方 10/15「数字とタイトルの gap が狭い」） */
/* 小さな見出し「若者の逆襲」：白く塗りつぶして読みやすく（りょうさん 10/15「視認性が低い」。全ページ） */
.num__k { padding: 0.1em 0.5em; font-weight: 700; font-size: var(--fs-ui); letter-spacing: var(--ls-wide); color: var(--color-main); background: var(--color-on-dark); transform: skewX(var(--skew)); }
.num__n {
  font-family: var(--font-en); font-style: italic; font-weight: 300; font-size: 3.4em; line-height: 0.9;
  color: transparent; -webkit-text-stroke: 1px var(--color-on-dark);
}

/* 見出し（参考：太いゴシックの斜体・字間とても広い・文字の中に灰色の斑点＝コンクリートの質感） */
.hd {
  font-family: var(--font-head); font-weight: 900; font-size: var(--fs-hd); line-height: 1.5;   /* 「量」が塊に見えた原因は太さでなく輪郭線（塗り終わりに消す）。太さは 900 のまま（10/15）*/
  letter-spacing: var(--ls-head); -webkit-mask-image: var(--grit); mask-image: var(--grit); -webkit-mask-size: 160px; mask-size: 160px;
}
.type { display: block; }
/* 輪郭の文字が左から描かれるように出て（1行 0.7秒・0.15秒ずつずらす）、全部の行が出たら白く塗られる（0.5秒）
 * 輪郭の線の色は直接指定（color を transparent にして currentColor を使うと線も消えるため） */
.hd .ln {
  transform: skewX(var(--skew)); transform-origin: left bottom;
  color: transparent; -webkit-text-stroke: 1px var(--color-on-dark);
  clip-path: inset(0 100% 0 0);
  transition:
    clip-path 450ms cubic-bezier(0.65, 0, 0.35, 1) calc(var(--t0, 200ms) + var(--k, 0) * 90ms),
    color 350ms ease calc(var(--t0, 200ms) + 600ms),
    -webkit-text-stroke-color 200ms ease calc(var(--t0, 200ms) + 950ms);   /* 塗り終わったら輪郭線を消す（輪郭線が画数の多い字の隙間を塗りつぶし「量」が塊に見えた。りょうさん 10/15） */
}
.hd .ln:nth-child(2) { --k: 1; }
.hd .ln:nth-child(3) { --k: 2; }
.hd.is-on .ln { clip-path: inset(0 -0.5em 0 0); color: var(--color-on-dark); -webkit-text-stroke-color: var(--color-veil-0); }

/* 強調：白い札に黒い字（りょうさん 10/15「強調の白いハイライトは残す」。帯・チップは透かしブラック）。下線では強調しない
 * 出方：外枠の四辺が「シュシュしゅっ」と描かれ（0.45秒）、そのあと白い札と文字がノイズとともに現れる（--gd）
 * 出たら「ビビッ」とノイズが走る：札が小刻みに震え、横に切った帯が白黒反転して左右にずれる。その後は5秒に1回だけ短く走る（りょうさん 10/15）
 * ずれる帯は data-text の写し（::before＝白黒反転、::after＝同じ色で逆へずれる）。文言照合は data-text を数えない
 * 走り出す時刻 --gd：見出しの中は1文字ずつ出し終わった後、本文の中は本文が出た後 */
.em {
  position: relative; display: inline-block; overflow: hidden; margin-inline: 0.08em; padding: 0 0.14em; font-size: 1.3em; line-height: 1.2;
  color: transparent; -webkit-text-stroke: 0;
  background:
    linear-gradient(var(--color-on-dark), var(--color-on-dark)) left top no-repeat,
    linear-gradient(var(--color-on-dark), var(--color-on-dark)) right top no-repeat,
    linear-gradient(var(--color-on-dark), var(--color-on-dark)) right bottom no-repeat,
    linear-gradient(var(--color-on-dark), var(--color-on-dark)) left bottom no-repeat;
  background-size: 0 2px, 2px 0, 0 2px, 2px 0;
}
.hd .em { --gd: calc(var(--t0, 200ms) + 900ms); font-size: 1.18em; }   /* 強調は見出しより一回り大きく（りょうさん 10/15「強調なのに小さく見える」） */
.txt .em { --gd: 1100ms; font-size: 1.12em; }
.em::before, .em::after {
  content: attr(data-text); position: absolute; inset: 0; padding: 0 0.14em; pointer-events: none;
  clip-path: inset(50% 0 50% 0);
}
.em::before { color: var(--color-on-dark); background: var(--color-main); }
.em::after { color: var(--color-main); background: var(--color-on-dark); }
.is-on .em {
  animation:
    em-draw 450ms linear calc(var(--gd, 0ms) - 500ms) both,
    em-fill 1ms linear var(--gd, 0ms) both,
    em-shake 5s steps(1, end) var(--gd, 0ms) infinite;
}
@keyframes em-draw {
  0% { background-size: 0 2px, 2px 0, 0 2px, 2px 0; }
  25% { background-size: 100% 2px, 2px 0, 0 2px, 2px 0; }
  50% { background-size: 100% 2px, 2px 100%, 0 2px, 2px 0; }
  75% { background-size: 100% 2px, 2px 100%, 100% 2px, 2px 0; }
  100% { background-size: 100% 2px, 2px 100%, 100% 2px, 2px 100%; }
}
@keyframes em-fill { to { color: var(--color-main); background-color: var(--color-on-dark); } }
.is-on .em::before { animation: em-slice-a 5s steps(1, end) var(--gd, 0ms) infinite; }
.is-on .em::after { animation: em-slice-b 5s steps(1, end) var(--gd, 0ms) infinite; }
@keyframes em-shake {
  0% { transform: translate(3px, -1px); }
  0.9% { transform: translate(-3px, 1px); }
  1.8% { transform: translate(2px, 0); }
  2.7% { transform: translate(-1px, -1px); }
  3.6%, 100% { transform: none; }
}
@keyframes em-slice-a {
  0% { clip-path: inset(8% 0 70% 0); transform: translateX(-6px); }
  0.9% { clip-path: inset(58% 0 18% 0); transform: translateX(5px); }
  1.8% { clip-path: inset(30% 0 48% 0); transform: translateX(-3px); }
  2.7% { clip-path: inset(80% 0 4% 0); transform: translateX(6px); }
  3.6%, 100% { clip-path: inset(50% 0 50% 0); transform: none; }
}
@keyframes em-slice-b {
  0% { clip-path: inset(62% 0 12% 0); transform: translateX(5px); }
  0.9% { clip-path: inset(14% 0 66% 0); transform: translateX(-6px); }
  1.8% { clip-path: inset(44% 0 34% 0); transform: translateX(4px); }
  2.7% { clip-path: inset(2% 0 84% 0); transform: translateX(-4px); }
  3.6%, 100% { clip-path: inset(50% 0 50% 0); transform: none; }
}
.kw { font-weight: 700; font-size: 1.1em; line-height: 1; }   /* シートの太字＝太く一回り大きく（ハイライトはしない。りょうさん 10/15） */

/* 幕：左から拭き取るように出す（.rv の子。親に .is-on が付くと開く） */
.wipe { display: block; clip-path: inset(0 100% 0 0); transform: translateX(-1.2em); transition: clip-path 420ms cubic-bezier(0.7, 0, 0.2, 1), transform 520ms var(--ease-out); }
.is-on > .wipe { clip-path: inset(0 0 0 0); transform: none; }

/* 写真の上の帯（参考の透かしブラック：黒80%の箱に白い字・字間広め。左から細い線が外へ伸びる） */
.bands { display: grid; gap: 0.5em; }
.page--dawn .bands .wipe { transition-delay: 450ms; }
.band { position: relative; }
.band::before {
  content: ""; position: absolute; top: 50%; right: 100%; width: var(--gutter); height: 1px; background: var(--color-frame);
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1) 0.1s;
}
.band.is-on::before { transform: none; }
.band__t {
  padding: 0.3em 0.6em; line-height: 2.05; letter-spacing: var(--ls-wide); font-weight: 500;
  background: var(--color-band); -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* 締めの問い「このままで本当にいいのか？」：p2「ここでは〜」と同じ囲み（透かしブラックの箱＋はみ出す白線の枠。りょうさん 10/15「これとそろえよう」）
 * 文字の大きさも p2 と同じ px にそろえる（帯 0.88em の中なので 1.08 × 0.93 / 0.88）。1行で見せ、本文の帯が出終わってから出す */
.band--q { margin-top: 0.7em; font-size: 1.14em; line-height: 2; letter-spacing: 0.1em; white-space: nowrap; transition-delay: 700ms; }
.band--q.is-on::before, .band--q.is-on::after { transform: none; }

/* アンサーの本文：細い縦線に沿わせ、字間・行間を広く */
.sheet {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6em;   /* 列の幅を画面の幅で上限に（iPhone で文字の幅に引っぱられて広がった。10/15） */ padding-left: 0.9em; font-size: max(var(--fs-min), 0.93em); line-height: 2;
  letter-spacing: 0.1em;
}
.sheet::before {
  content: ""; position: absolute; left: 0; top: -0.8em; bottom: -0.8em; width: 1px; background: var(--color-frame);
  transform: scaleY(0); transform-origin: top; transition: transform 700ms cubic-bezier(0.7, 0, 0.3, 1) 800ms;
}
.sheet.is-on::before { transform: none; }
/* 「ここでは〜」：透かしブラックの箱＋白線の枠（上下の線は左右へ、左右の線は上下へはみ出す。参考の言葉の箱。りょうさん 10/15）
 * 文字は内側の span に入れ、枠は外側の p に持たせる（はみ出す線を「文字が箱からはみ出した」と検査が数えないように） */
.sheet__t--close { position: relative; justify-self: start; max-width: 100%; padding: 0.35em 0.6em; font-weight: 700; font-size: 1.08em; background: var(--color-band); }
.sheet__t--close::before, .sheet__t--close::after { content: ""; position: absolute; pointer-events: none; transition: transform 600ms cubic-bezier(0.7, 0, 0.3, 1) 1300ms; }
.sheet__t--close::before {
  inset: 0 -14px; transform: scaleX(0);
  background: linear-gradient(var(--color-frame), var(--color-frame)) top / 100% 1px no-repeat, linear-gradient(var(--color-frame), var(--color-frame)) bottom / 100% 1px no-repeat;
}
.sheet__t--close::after {
  inset: -10px 0; transform: scaleY(0);
  background: linear-gradient(var(--color-frame), var(--color-frame)) left / 1px 100% no-repeat, linear-gradient(var(--color-frame), var(--color-frame)) right / 1px 100% no-repeat;
}
.sheet.is-on .sheet__t--close::before, .sheet.is-on .sheet__t--close::after { transform: none; }

/* 仕事内容（りょうさん 10/15「画像が見えなさすぎる・レイアウトが退屈。図解・アイコン・リストを」「テキストが詰まっている→アイコンの流れに合わせて項目の表示が変わる構図」）
 * 写真は全面に薄い黒で見せ、文字は透かしブラックの箱に。7項目は横一列のアイコンを線でつなぎ、左から順に光って項目名が1つずつ切り替わる（site.js）、 */
.lead { font-family: var(--font-head); font-weight: 900; font-size: var(--fs-hd); line-height: 1.5; letter-spacing: var(--ls-head); -webkit-mask-image: var(--grit); mask-image: var(--grit); -webkit-mask-size: 160px; mask-size: 160px; }
.scope { display: grid; gap: 0.35em; }
.scope__t { justify-self: start; padding: 0 0.4em; background: var(--color-band); }
.works { --p: 0; display: grid; gap: 0.55em; padding-top: 0.2em; }
.works__nav { position: relative; display: flex; justify-content: space-between; }
.works__nav::before, .works__nav::after {
  content: ""; position: absolute; left: 1.1em; right: 1.1em; top: 50%; pointer-events: none;
}
.works__nav::before { height: 1px; background: var(--color-on-dark-line); transform: scaleX(0); transform-origin: left; transition: transform 700ms cubic-bezier(0.7, 0, 0.3, 1) 700ms; }
.scope.is-on .works__nav::before { transform: none; }
.works__nav::after { height: 2px; margin-top: -0.5px; background: var(--color-on-dark); transform: scaleX(var(--p)); transform-origin: left; transition: transform 600ms cubic-bezier(0.65, 0, 0.35, 1); }
.works__btn {
  position: relative; z-index: 1; display: grid; place-items: center; width: 2.2em; height: 2.2em; padding: 0; border-radius: 50%;
  color: var(--color-on-dark); background: var(--color-main); border: 1px solid var(--color-frame); cursor: pointer;
  transition: color 0.3s, background 0.3s, border-color 0.3s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.works__btn .ic { width: 1.15em; height: 1.15em; }
.works__btn.is-done { border-color: var(--color-on-dark); }
.works__btn.is-now { color: var(--color-main); background: var(--color-on-dark); border-color: var(--color-on-dark); transform: scale(1.18); }
.works__list { position: relative; height: 2.2em; margin-bottom: 0.9em; }   /* 項目名（屋根工事など）と本文の間を空ける（りょうさん 10/15） */
.works__item {
  position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; padding: 0 0.6em; font-weight: 700; font-size: 1.3em; letter-spacing: 0.14em;
  background: var(--color-band); border-left: 2px solid var(--color-on-dark);
  opacity: 0; transform: translateX(-0.6em); transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.works__item.is-now { opacity: 1; transform: none; }
.ic {
  flex: none; width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 600ms cubic-bezier(0.65, 0, 0.35, 1) calc(var(--i, 0) * 60ms + 700ms);
}
.is-on .ic { stroke-dashoffset: 0; }
.txt { justify-self: start; padding: 0.15em 0.45em; background: var(--color-band); }
.txt--close { font-weight: 700; }

/* ---------- 強み1・強み2・よくある質問：写真は上（人の顔をヘッダーの下 4em に）、文字は下寄り。縦長の画面はかたまりの高さに上限を付けて中央に ----------
 * 写真は 900×1612（顔は写真の上から約23%＝幅の約0.41倍）。写真の下端は黒へ溶かし、文字の後ろだけ暗くする（2.6 写真を暗くしすぎない） */
.page--strong, .page--faq { --veil: linear-gradient(to bottom, var(--color-veil-0) 0%, var(--color-veil-0) 16%, var(--color-veil-half) 30%, var(--color-band) 48%, var(--color-veil) 70%); }   /* 顔より下は見出しが読める暗さに（強み2 の明るい壁） */
.ph--upper {
  inset: auto 0 auto 0; top: calc(var(--header-h) + 4em - 0.41 * min(100vw, var(--col))); height: auto; aspect-ratio: 900 / 1612;
  -webkit-mask-image: linear-gradient(to bottom, var(--color-main) 70%, transparent); mask-image: linear-gradient(to bottom, var(--color-main) 70%, transparent);
}
.page__inner--low { justify-content: flex-end; gap: 0.9em; max-height: 50em; top: max(0px, calc((100% - 50em) / 2)); }
.hd__x { display: inline-block; margin-inline: 0.15em; font-family: var(--font-en); font-weight: 200; font-style: normal; }

/* 写真の出方（強み1・2）：黒い幕が下から上へ引き上がる（p2・p3 の四角とは別の動き） */
.page--curtain .ph { clip-path: inset(100% 0 0 0); transition: clip-path 700ms cubic-bezier(0.7, 0, 0.2, 1) 80ms, transform 900ms cubic-bezier(0.16, 1, 0.3, 1); }
.page--curtain.is-active .ph { clip-path: inset(0 0 0 0); }
.page--curtain { --t0: 650ms; }
.page--curtain .num, .page--curtain .sheet, .page--curtain .hub, .page--curtain .txt { transition-delay: 500ms; }

/* 動きを強く（りょうさん 10/15「全ページアニメーションがよわい」）：見出しは白く塗られる瞬間に一度弾む */
.hd.is-on { animation: hd-slam 420ms cubic-bezier(0.34, 1.8, 0.64, 1) calc(var(--t0, 200ms) + 560ms) both; }
@keyframes hd-slam { 0% { transform: none; } 45% { transform: scale(1.07) translateX(0.15em); } 100% { transform: none; } }

/* 強み1：「40」が0から数え上がり、着地で弾む（site.js 7.） */
.kw--num { margin-inline: 0.06em; font-family: var(--font-en); font-style: italic; font-weight: 600; font-size: 3em; line-height: 1; vertical-align: -0.12em; }
.count.is-pop { animation: count-pop 520ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes count-pop { 0% { transform: scale(0.6); } 50% { transform: scale(1.4) rotate(-4deg); } 100% { transform: none; } }
.count { display: inline-block; min-width: 1.2em; }

/* 強み2：電気工事から建築・内装・設備へ線が伸び、丸が順に弾む */
.hub { display: grid; gap: 0.7em; }
.hub__lead { font-weight: 700; }
.hub__list { position: relative; display: flex; justify-content: space-between; padding-inline: 0.6em; }
.hub__list::before {
  content: ""; position: absolute; left: 2.2em; right: 2.2em; top: 1.6em; height: 1px; background: var(--color-frame);
  transform: scaleX(0); transform-origin: left; transition: transform 600ms cubic-bezier(0.7, 0, 0.3, 1) 900ms;
}
.hub.is-on .hub__list::before { transform: none; }
/* 線の上を光が左右に行き来し続ける（りょうさん 10/15「常に左から右、右から左に流れる」） */
.hub__list::after {
  content: ""; position: absolute; left: 2.2em; right: 2.2em; top: calc(1.6em - 1px); height: 3px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, var(--color-veil-0), var(--color-on-dark), var(--color-veil-0)) 0 0 / 34% 100% no-repeat;
}
.hub.is-on .hub__list::after { opacity: 1; transition: opacity 300ms ease 1500ms; animation: hub-flow 2.2s cubic-bezier(0.65, 0, 0.35, 1) 1500ms infinite alternate; }
@keyframes hub-flow { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.hub__item {
  position: relative; z-index: 1; display: grid; justify-items: center; gap: 0.35em; font-weight: 700; font-size: 1.12em; letter-spacing: 0.12em;   /* 丸を線と光より手前に（光は丸の後ろを通る。りょうさん 10/15） */
  opacity: 0; transform: translateY(1.2em) scale(0.2); transition: opacity 250ms ease, transform 600ms cubic-bezier(0.34, 1.8, 0.64, 1); transition-delay: calc(var(--i) * 130ms + 1000ms);
}
.hub.is-on .hub__item { opacity: 1; transform: none; }
.hub__item .ic { box-sizing: content-box; width: 1.3em; height: 1.3em; padding: 0.75em; border: 1px solid var(--color-on-dark); border-radius: 50%; background: var(--color-main); }

/* よくある質問：質問は太字、答えは透かしブラックの箱。答えの吹き出しが左上から膨らむ */
.faq { display: grid; gap: 0.8em; }
.page--faq .num__n { display: none; }   /* 文字量が多いページ：飾りの番号を外し、上の札をヘッダーに隠さない */
.faq__item { display: grid; gap: 0.5em; }
.faq__q { display: flex; align-items: baseline; gap: 0.45em; font-weight: 700; font-size: 1.08em; }
.faq__m { flex: none; font-family: var(--font-en); font-style: italic; font-weight: 600; font-size: 1.6em; line-height: 1; }
.faq__a {
  display: flex; align-items: baseline; gap: 0.5em; padding: 0.5em 0.75em; font-size: max(var(--fs-min), 0.9em); line-height: 1.7; letter-spacing: 0.05em;
  background: var(--color-band); border: 1px solid var(--color-frame);
  transform: scale(0.55); transform-origin: left top; opacity: 0; transition: transform 600ms cubic-bezier(0.34, 1.8, 0.64, 1) 350ms, opacity 200ms ease 350ms;
}
.faq__item.is-on .faq__a { transform: none; opacity: 1; }
.faq__a .faq__m { font-size: 1.4em; }

/* 会社概要：写真なし。大きな輪郭の英字と、白線で区切った表 */
.page--company .page__inner { gap: 1.4em; }
.company__en {
  font-family: var(--font-en); font-style: italic; font-weight: 200; font-size: 4.2em; line-height: 1; letter-spacing: 0.06em;
  color: transparent; -webkit-text-stroke: 1px var(--color-on-dark-line);
}
.info { display: grid; border-top: 1px solid var(--color-frame); }
.company__en { transform: translateX(40%); }
.company__en.is-on { transform: none; transition: opacity var(--dur-in) ease, transform 900ms var(--ease-out); }
.info__row { opacity: 0; transform: translateX(-2em); transition: opacity 300ms ease, transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + 300ms); }
.info.is-on .info__row { opacity: 1; transform: none; }
.info__row:nth-child(2) { --i: 1; }
.info__row:nth-child(3) { --i: 2; }
.info__row:nth-child(4) { --i: 3; }
.info__row { display: grid; grid-template-columns: 5.6em 1fr; gap: 1em; padding: 1em 0; border-bottom: 1px solid var(--color-frame); }
.info dt { font-weight: 700; color: var(--color-on-dark-line); letter-spacing: 0.1em; }
.info dd { font-weight: 500; letter-spacing: 0.08em; }
.info__tel { color: inherit; font-family: var(--font-en); font-weight: 600; font-size: 1.3em; letter-spacing: 0.08em; text-decoration: none; border-bottom: 1px solid var(--color-on-dark); }

/* 会社概要・募集要項・エントリーの背景（りょうさん 10/15「輪・帯・流れる英字はない。過去の装飾を参考に」）
 * このサイトの装飾の型だけで作る：会社概要＝暗く敷いた写真（工場の入口）＋白線の枠／募集要項・エントリー＝黒線の枠＋紙にごく薄いコンクリートの質感 */
.page--company { --veil: linear-gradient(to bottom, var(--color-veil-half) 0%, var(--color-band) 40%, var(--color-veil) 85%); }
.page--company .ph { object-position: center 30%; }
.page--frame { --frame-c: var(--color-line); }
/* 募集要項（長いページ）でも右下の NEXT（エントリー）を出す（りょうさん 10/15「08 のとき右下にエントリーが出てない」）
 * 土台は長いページで NEXT を隠す（本文に重なるため）→ 表を最後まで読んで下端に着いたら出す（site.js 8. が .is-end を付ける）。最後のページは従来どおり隠す（キットへ戻す候補） */
.column.is-long.is-end:not(.is-last) .nextbtn { opacity: 1; pointer-events: auto; }
.column.is-last .nextbtn { transition: none; }   /* 最後のページでは即座に消す（行き先名が空になった NEXT をフェードの間に見せない） */
.page--req .page__inner { padding-bottom: calc(var(--next-h) + 2.5em); }
/* 先頭に暗く敷いた写真の帯（りょうさん 10/15「もう少し賑やかに」）。下端は紙の色へ溶かす。札は帯の下の端に重ねる */
.ph-band {
  position: absolute; top: var(--header-h); left: 0; z-index: 0; width: 100%; height: 13em; object-fit: cover; pointer-events: none;
  filter: brightness(0.5) grayscale(0.35) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, var(--color-main) 55%, transparent); mask-image: linear-gradient(to bottom, var(--color-main) 55%, transparent);
  transform: scale(1.15); transition: transform 1100ms cubic-bezier(0.16, 1, 0.3, 1);
}
.page.is-active .ph-band { transform: none; }
.page--frame .num { margin-top: 6.5em; }
.page--frame .num__k { color: var(--color-main); background: var(--color-on-dark); }
.page--frame .num__n { -webkit-text-stroke: 1px var(--color-on-dark); }
.page--frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--color-line); opacity: 0.18;
  -webkit-mask-image: var(--grit); mask-image: var(--grit); -webkit-mask-size: 220px; mask-size: 220px;
}

/* 募集要項・エントリー（明るい面の長いページ）：小見出しの札は白黒を反転、給与の数字を大きく */
.page[data-tone="light"] .num__k { color: var(--color-on-dark); background: var(--color-main); }
.page[data-tone="light"] .num__n { -webkit-text-stroke: 1px var(--color-main); }
.req__pay { font-family: var(--font-en); font-weight: 600; font-size: 1.3em; letter-spacing: 0.04em; }

/* ---------- PC：左右の帯に案内線と、コンセプトの英字（輪郭）を控えめに（単調にしない） ---------- */
@media (min-width: 960px) {
  .rail::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
      linear-gradient(var(--color-line), var(--color-line)) left 40px top 0 / 1px 100% no-repeat,
      linear-gradient(var(--color-line), var(--color-line)) right 40px top 0 / 1px 100% no-repeat;
    opacity: 0.6;
  }
  /* PC の背景を賑やかに（りょうさん 10/15）：帯を横切って流れる輪郭の英字（上下で逆向き）と、右の帯の大きなページ番号。会社名・ボタンには重ねない
   * 流れる英字・番号は site.js が置く（aria-hidden）。スクロールには連動せず、一定の速さで流れ続ける */
  .rail { overflow: hidden; }
  .rail-ticker {
    position: absolute; left: 0; display: flex; white-space: nowrap; pointer-events: none;
    font-family: var(--font-en); font-style: italic; font-weight: 300; font-size: min(84px, 8.5dvh); line-height: 1; letter-spacing: 0.08em;
    color: transparent; -webkit-text-stroke: 1px var(--color-line);
    animation: rail-tick 48s linear infinite;
  }
  .rail-ticker::before, .rail-ticker::after { content: attr(data-t); white-space: pre; }
  .rail-ticker--top { top: 28px; }
  .rail-ticker--bottom { bottom: 24px; animation-direction: reverse; }
  @keyframes rail-tick { to { transform: translateX(-50%); } }
  .rail-big {
    position: absolute; top: 20px; right: 28px; pointer-events: none;
    font-family: var(--font-en); font-style: italic; font-weight: 200; font-size: min(280px, 27dvh); line-height: 1; letter-spacing: -0.02em;
    color: transparent; -webkit-text-stroke: 1px var(--color-main-2);
  }
  .rail-big.is-change { animation: rail-big-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes rail-big-in {
    0% { opacity: 0; transform: translateX(24px); clip-path: inset(0 0 0 100%); }
    12% { opacity: 1; transform: translateX(-6px); clip-path: inset(30% 0 40% 0); }
    24% { transform: translateX(4px); clip-path: inset(0 0 0 0); }
    100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
  }
}

/* ---------- 低い画面（高さ620px以下）：間隔と行間から詰める（文字は --fs-min 未満にしない） ---------- */
@media (max-height: 620px) {
  .page__inner--work { gap: 0.35em; line-height: 1.5; }
  .works__btn { width: 1.9em; height: 1.9em; }   /* 図（アイコンの丸と項目名）を低く */
  .works__list { height: 1.9em; margin-bottom: 0.4em; }
  .band__t { line-height: 1.8; }
  .page--dawn .band__t { line-height: 1.55; }
  .page--dawn .bands { gap: 0.2em; }
  .page--dawn .num, .page__inner--work .num { display: none; }   /* 低い画面の p1・p3：飾りの札・番号を外して本文の場所を空ける */
  .sheet { line-height: 1.75; }
}

/* ---------- 幅の狭い画面（370px以下）：文字の多い仕事内容は字間から詰める ---------- */
@media (max-width: 370px) {
  .page__inner--work { letter-spacing: 0.03em; }
  .works__btn { width: 2em; height: 2em; }
  .works__list { height: 2em; margin-bottom: 0.4em; }   /* 行が増える分、項目名の下の空きを控えめに（上の札をヘッダーに隠さない） */
  .page__inner--work .num { display: none; }   /* p3：文字が折れて行が増える分、飾りの札を外す（低い画面と同じ扱い） */
  .page--dawn .num__n { display: none; }   /* 文字が折れて行が増える分、飾りの番号を外す（低い画面と同じ扱い） */
}
