/* ============================================================
   sec3.css — 指示書セクション3「フック」
   支給カンプ: assets_src/sec3_comp.png（941x1672）
   支給下地  : assets_src/sec3_bg.png（887x1774）
   トンマナはFV（fv.css）に合わせる。
   静止状態＝カンプの再現。動きは sec3.js（GSAP）。
   ------------------------------------------------------------
   座標系: 下地だけステージ（cover）で敷き、
           文字・カードはパネル基準の%。文字をステージ基準にすると
           SP390で左右が切れる（FVで確認済み）。
   ============================================================ */

html.swipe-b .lMain > section#about {
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  display: block;          /* fv.css 側の flex 中央寄せを打ち消す */
}

.pSec3 {
  /* 🔴 iOSの vh は「ツールバーを隠したときの高さ」を返すため、
     ツールバー表示中（実際の表示領域が低い）は文字だけが大きくなり、
     見出しが本文に被る。実機で発生（2026-09-11）。
     実際の可視高さ（swipe.js が入れる --app-h）を基準にする。 */
  --fvu: min(1vw, calc(var(--app-h, 100dvh) * 0.004621));
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  /* 🔴 2026-09-13 ユーザー指示（構造的な重なり対策）。
     以前はoverflow:hiddenで縦方向も切っていたため、下の.pSec3__compare
     （見出しピル+リスト）が文章量やフォント設定で縦に伸びても
     はみ出た分がそのまま見えなくなる（＝重なって見える／消えるの原因の
     一つ）だけで高さは追随しなかった。横だけ切って縦は伸びを許可する。 */
  overflow-x: hidden;
  overflow-y: visible;
  background: #33bdf5;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  color: #14274b;
}

/* ---- 下地 ---------------------------------------------------- */
.pSec3__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  will-change: transform;
}

/* 🔴 実機で見出しがヘッダーに隠れていた（2026-09-11 指摘）。
   下地はパネル全面のまま、文字・カード類だけを
   ヘッダーの下から始まる内側ボックスに入れて、その中の%で置く。 */
.pSec3__inner {
  /* 🔴 2026-09-13 ユーザー指示（構造的な重なり対策）。
     旧: position:absolute; top:60px; bottom:0; で高さを親(.pSec3)の
     100dvhに強制固定していた。中の.pSec3__compareが通常フローの
     ブロックとして育つように、このコンテナ自体も通常フロー
     （position:relative + padding-topでヘッダー分だけ避ける）に変更。
     hero/title/lead等の既存の絶対配置(top:%)はこのコンテナの高さを
     基準にしたまま変わらない（通常時はcompareの高さがほぼ同じなので
     見た目は変わらず、文章が伸びた場合だけこのコンテナごと伸びる）。 */
  position: relative;
  width: 100%;
  padding-top: var(--swipe-top, 60px);
}

/* ---- 上の人物（カンプ切り出し・仮）---------------------------- */
.pSec3__hero {
  position: absolute;
  top: 7.5%;
  right: -2%;
  width: 58%;
  height: auto;
  will-change: transform;
}

/* ---- 手書き文字 ---------------------------------------------- */
@font-face {
  font-family: "FvScript";
  src: url("fonts/caveat-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
.pSec3__hand {
  position: absolute;
  margin: 0;
  z-index: 4;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
  /* 🔴 2026-09-11深夜 ユーザー指摘（赤丸4箇所）: 晴天イラストに直接重ねた
     白文字が空に溶けて読めない。旧: blur6px/opacity0.35の1層のみで弱かった。
     輪郭を作る近接シャドウ＋広がるグロウの2層に強化して視認性を上げる。 */
  text-shadow:
    0 1px 3px rgba(8, 35, 70, 0.95),
    0 2px 7px rgba(8, 35, 70, 0.7),
    0 0 16px rgba(8, 35, 70, 0.5);
  white-space: nowrap;
  will-change: transform;
}
.pSec3__hand.--top {
  top: calc(var(--swipe-top) + 2.2%);
  right: 3.5%;
  font-size: calc(var(--fvu) * 3.5);
  text-align: right;
  transform: rotate(-2deg);
}
.pSec3__hand.--field {
  top: 36.5%;
  right: 2%;
  font-size: calc(var(--fvu) * 3.9);
  text-align: right;
  transform: rotate(-4deg);
}
/* 🔴 2026-09-13 通常フロー化。.pSec3__hand基底のposition:absoluteを
   ここだけ打ち消し、compareの最後の要素として自然に積む。
   display:table+margin-left:autoで右寄せ（絶対座標のtop/rightは廃止）。 */
.pSec3__hand.--like {
  position: relative;
  display: table;
  margin: 0 3% 0 auto;
  font-size: calc(var(--fvu) * 2.6);
  text-align: right;
  transform: rotate(-4deg);
}
/* 黄色いアンダーライン（カンプの手書き下線） */
.pSec3__hand.--field::after,
.pSec3__hand.--like::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 0;
  bottom: -0.18em;
  height: 0.16em;
  border-radius: 999px;
  background: #ffe14d;
}

/* ---- 見出し -------------------------------------------------- */
.pSec3__title {
  position: absolute;
  left: 6%;
  top: 11.1%;
  z-index: 4;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* 帯を文字幅に合わせる */
  gap: 0.1em;
}
.pSec3__title_hand {
  position: relative;
  width: fit-content;
  padding: 0 0.4em 0.12em;
  font-size: calc(var(--fvu) * 4.4);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(20, 60, 110, 0.3);
}
.pSec3__title_hand::after {
  content: "";
  position: absolute;
  left: 0.2em;
  right: 0.2em;
  bottom: -0.06em;
  height: 0.17em;
  border-radius: 999px;
  background: #ffe14d;
}
/* 🔴 2026-09-11 ユーザー指示
   「働き方、にゅーバランスと同じように背景つける」
   → FVの縦コピー(.pFv__vert_panel.--blue)と同じ青帯を敷く。 */
.pSec3__title_main {
  width: fit-content;
  padding: 0.1em 0.34em 0.16em;
  font-size: calc(var(--fvu) * 8.0);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: #ffffff;
  background: #00a0e9;
  box-shadow: 0 3px 14px rgba(0, 87, 145, 0.26);
}
.pSec3__title_main .--y {
  color: #ffe14d;
}
.pSec3__title_sub {
  width: fit-content;
  margin-top: 0.22em;
  padding: 0.16em 0.5em 0.22em;
  font-size: calc(var(--fvu) * 4.4);
  font-weight: 900;
  color: #ffffff;
  background: #00a0e9;
  box-shadow: 0 3px 14px rgba(0, 87, 145, 0.26);
}
.pSec3__title_sub .--y {
  color: #ffe14d;
}

/* ---- 本文 ---------------------------------------------------- */
.pSec3__lead {
  position: absolute;
  left: 6%;
  /* 🔴「それが、施工管理です。」の直下が詰まっていたので間を空ける
     （2026-09-11 実機指摘）。ピル「今の働き方」に届かない範囲で下げる。 */
  top: 31.5%;
  z-index: 4;
  margin: 0;
  /* 🔴 2026-09-13 実機（Safari）指摘「被ってるから大きく離せ」。
     Chromeでの実測ではピルまでの隙間が3pxしか無く、フォント幅の
     わずかなレンダリング差でSafariでは実際に重なっていた。
     行間・フォントサイズを詰めて高さそのものを縮め、余白を作る
     （pillNow側の位置は動かさない＝他の要素との連鎖崩れを避ける）。 */
  font-size: calc(var(--fvu) * 2.5);
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  /* 🔴 2026-09-11深夜 ユーザー指摘（赤丸）: 本文も同じ理由で視認性が悪い。
     .pSec3__hand と同じ2層シャドウに統一。 */
  text-shadow:
    0 1px 3px rgba(8, 35, 70, 0.95),
    0 2px 7px rgba(8, 35, 70, 0.7),
    0 0 16px rgba(8, 35, 70, 0.5);
}

/* ---- 「今の働き方」→「施工管理という働き方」の比較ブロック ------
   🔴 2026-09-13 ユーザー指示（構造的な重なり対策・全面書き換え）。
   旧: ピル/カード/矢印/だからこそ/hand-like/pbt を1つずつ position:absolute
   + top:% で個別に置いていたため、文字数やフォント設定で高さが変わる
   ★どれか1つでも★他の要素の位置とぶつかる（実機Safariで複数回発生）。
   通常のdocument flow（普通に上から積む）に変え、各要素は自分の実際の
   高さぶんだけ次の要素を押し下げる。文章が2行3行に増えても、
   スマホ幅が変わっても、構造的に重ならない。 */
.pSec3__compare {
  position: relative;
  z-index: 5;
  /* 元のピル(--now)の top:43.8% と同じ見え方になるよう、
     ビューポート高さ基準(--app-h、%ではなくpx解決の値)で押し下げる。
     %は「親要素の幅」基準になるCSS仕様があるため、高さ基準の位置決めに
     margin-top:%は使わずvar(--app-h)を使う。 */
  /* 🔴 2026-09-13 実害「レイアウトオーバー・下が写ってない」。
     通常フロー化でcompare全体が1画面(app-h)を60〜70pxオーバーしていた
     （実測：SP390で910px vs 画面844px）。この余白(旧0.438)を削って
     1画面に収める。heading/label/leadはposition:absoluteで
     .pSec3__inner の高さ基準%のため、compareを縮めるとinner総高が
     縮み、結果それらの位置も本来の(見かけ上肥大化する前の)位置へ戻る
     副作用がある＝重なり方向には動かない（実測で確認済み）。 */
  margin-top: calc(var(--app-h, 100dvh) * 0.35);
  margin-left: 5.5%;
  margin-right: 5.5%;
  padding-bottom: 2em;
}

/* ---- ピル見出し ---------------------------------------------- */
.pSec3__pill {
  /* 🔴 2026-09-13 以前はここにposition:absolute+left:50%+transateXで
     中央寄せしていたが、通常フロー化に伴いdisplay:table+margin:autoの
     中央寄せに変更（sec6.cssの.pSec6__tagと同じ実証済みパターン）。
     幅は文字数に応じて自然に伸び縮みし、long textはmax-widthで
     compare幅を超えないようにした上でwrapを許可（今は1行に収まる
     font-sizeに揃えているので通常は折り返さない）。 */
  position: relative;
  display: table;
  margin: 0 auto 0.25em;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.42em 1.5em 0.48em;
  border-radius: 999px;
  font-size: calc(var(--fvu) * 4.1);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-align: center;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(15, 45, 90, 0.22);
  will-change: transform;
}
.pSec3__pill.--now {
  background: #3c4a63;
}
.pSec3__pill.--new {
  background: #00a0e9;
}

/* ---- カード -------------------------------------------------- */
.pSec3__card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 2.5%;
  /* 🔴 2026-09-13 実害「レイアウトオーバー・下が見切れる」。
     通常フロー化でピル分の高さが素直に追加されるようになった結果、
     セクション全体が1画面(100dvh)を185px超えていた（実測）。
     重なりゼロは維持したまま、余白を詰めて1画面に収める。 */
  margin: 0 0 0.6em;
  padding: calc(var(--fvu) * 1.8);
  border-radius: calc(var(--fvu) * 4.2);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(15, 55, 100, 0.16);
  will-change: transform;
}
/* 🔴 2026-09-11深夜 PC1440で2枚のカードが181px重なっていた実害を修正。
   原因: 画像幅を「カード幅の38%」で作っていたため、カードがワイドになる
   PCでは画像そのものが巨大化(実測487x365px)し、カード全高が389pxまで
   膨らんでいた（top:46%/72.4%の間隔を突き破った）。
   画像はカード幅ではなく他要素と同じfvu(=vh基準の単位)で固定し、
   画面が横に広くなっても画像サイズが連動して膨らまないようにする。 */
.pSec3__card_fig {
  flex: 0 0 auto;
  width: calc(var(--fvu) * 34);
  height: auto;
  border-radius: calc(var(--fvu) * 2.6);
}
.pSec3__list {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pSec3__list_item {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  padding: 0.25em 0;
  font-size: calc(var(--fvu) * 2.85);
  font-weight: 700;
  /* 🔴 2026-09-13 通常フロー化でセクションが1画面を185pxオーバーしたため
     再度詰める。1.3でも文字がくっつくほどではないことを実測確認して採用。 */
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #1d3663;
}
.pSec3__list_item + .pSec3__list_item {
  border-top: 1px dotted #b9c9dd;
}
.pSec3__check {
  flex: 0 0 auto;
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.12em;
  border: 2px solid #00a0e9;
  border-radius: 0.2em;
  position: relative;
}
.pSec3__check::after {
  content: "";
  position: absolute;
  left: 0.24em;
  top: 0.02em;
  width: 0.32em;
  height: 0.6em;
  border-right: 2.4px solid #00a0e9;
  border-bottom: 2.4px solid #00a0e9;
  transform: rotate(42deg);
}
.pSec3__card.--now .pSec3__check,
.pSec3__card.--now .pSec3__check::after {
  border-color: #3c4a63;
}

/* ---- だからこそ＋矢印 ----------------------------------------
   🔴 2026-09-13 通常フロー化。arrow→becauseの順で縦に積み、中央寄せ。
   厳密な元の座標(becauseがleft:16%/arrowがcenter)は再現しないが、
   色・文字サイズ・矢印の形はそのまま。 */
.pSec3__divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  margin: 0 auto 0.5em;
}
.pSec3__because {
  position: relative;
  margin: 0;
  font-size: calc(var(--fvu) * 3.6);
  font-weight: 700;
  color: #143a63;
  transform: rotate(-4deg);
}
.pSec3__because::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2em;
  height: 0.16em;
  border-radius: 999px;
  background: #ffe14d;
}
.pSec3__arrow {
  position: relative;
  width: calc(var(--fvu) * 9);
  height: calc(var(--fvu) * 9);
  will-change: transform;
}
.pSec3__arrow::before {
  content: "";
  position: absolute;
  left: 30%;
  top: 0;
  width: 40%;
  height: 55%;
  background: linear-gradient(180deg, #33b7f0, #00a0e9);
}
.pSec3__arrow::after {
  content: "";
  position: absolute;
  left: 0;
  top: 45%;
  width: 100%;
  height: 55%;
  background: linear-gradient(180deg, #1aabec, #0089c7);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ---- People Build Tomorrow ----------------------------------- */
/* 🔴 2026-09-13 通常フロー化。hand--likeの下に自然に積む（絶対座標は廃止）。 */
.pSec3__pbt {
  position: relative;
  margin: 0.4em 0 0;
  text-align: center;
  font-family: "FvScript", "Segoe Script", cursive;
  font-size: calc(var(--fvu) * 4.0);
  font-weight: 600;
  letter-spacing: 0.14em;
  /* 下端は下地が白いビル群なので、白のままだと消える。影を強くする。 */
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 6px rgba(20, 60, 110, 0.85), 0 0 18px rgba(20, 60, 110, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .pSec3__arrow,
  .pSec3__hero {
    animation: none !important;
  }
}

/* 🔴 2026-09-11 ユーザー指示「このカメラも消す」。
   次セクション(#setup)のミラー装飾（カメラ・閃光・人物）が
   上のパネルの下端にはみ出して見えていたので隠す。
   #setup は次の「会社の特徴」で作り直すので、ここで消して問題ない。 */
#setup-camera,
#setup-flash,
#setup-light,
.pSetup__bg_man,
.pSetup__bg_woman {
  display: none !important;
}

/* 画面が低いとき（iOSのツールバー表示時 402x663 など）は
   カードを少し詰めて、手書き「好きな仕事で〜」と重ならないようにする。
   実測: 詰める前は 8px 重なっていた。 */
@media (max-height: 700px) {
  /* 🔴 2026-09-13 通常フロー化により、hand--like/pbtの位置(top:%)上書きは
     不要になった（重なりは構造的に起きない）。低い画面での文字サイズ
     縮小・カード余白の調整はそのまま維持する。 */
  .pSec3__hand.--like {
    font-size: calc(var(--fvu) * 2.3);
  }
  .pSec3__pbt {
    font-size: calc(var(--fvu) * 3.6);
  }
  .pSec3__card {
    padding: calc(var(--fvu) * 1.5) calc(var(--fvu) * 2.2);
  }
  .pSec3__list_item {
    padding: 0.3em 0;
    font-size: calc(var(--fvu) * 2.7);
  }
}

/* ============================================================
   共通: セクション番号ラベル（2026-09-11 ユーザー指示）
   参考: 八王子容器の採用サイト「04 / WHY」形式
   番号＝黄、スラッシュと英字＝白。各セクションの見出しの上に置く。
   ============================================================ */
.pSecLabel {
  position: absolute;
  z-index: 6;
  margin: 0;
  font-family: "Barlow", "Zen Kaku Gothic New", sans-serif;
  font-size: calc(var(--fvu) * 3.1);
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 6px rgba(20, 60, 110, 0.45);
  white-space: nowrap;
}
.pSecLabel__num {
  color: #ffe14d;
}
.pSecLabel__slash {
  margin: 0 0.5em;
  opacity: 0.7;
}

.pSec3__label {
  left: 6%;
  /* 🔴 上に詰まりすぎ（2026-09-11 指摘）。ラベルと見出しの間も空ける。 */
  top: 2.2%;
}
