/* ============================================================
   fv.css — ファーストビュー（指示書セクション2「冒頭」）
   ------------------------------------------------------------
   支給カンプ: assets_src/fv/comp.png（941x1672）
   支給レイヤー: assets_src/fv/*.png → build/assets/site/fv/*.webp
   アニメーションは fv.js（GSAP + ScrollTrigger）が担当し、
   ここでは「静止状態＝カンプの再現」だけを持つ。
   （JSが動かなくてもカンプの絵がそのまま出る状態にしておく）

   座標系:
     .pFv__stage = カンプと同じ 941:1672 の箱。パネルを cover するよう
     拡大して中央に置く。イラスト系レイヤーは全部この箱に対する % で置く
     ので、画面比が変わっても背景と人物・クレーンの位置関係がズレない。
     文字要素はパネル基準（vw）で置く。stage は左右が切られるため、
     文字を stage 基準にすると端が欠ける。
   ============================================================ */

/* 🔴 FVパネルはヘッダーの下に潜り込ませる（カンプは空がヘッダーの裏まで
   続いている）。swipe.css がパネル共通で入れている padding-top を外す。 */
html.swipe-b .lMain > .pMv {
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  /* 🔴 ミラー側に .pMv{height:192.31vw} という固定高さが残っている。
     swipe.css は min-height しか指定していないので、画面が低いと
     こちらが勝ってパネルが画面より高くなり、次のパネルが下に覗く。
     実測: 402x663 で 773px（=192.31vw）になっていた。 */
  height: auto;
}

.pFv {
  /* 🔴 文字レイヤーの共通スケール単位。
     幅基準(vw)だけで組むと、画面が低い端末（iOSツールバー表示時 402x663 や
     PC枠 480x900）で文字だけ相対的に大きくなり、縦コピー・人物・クレーンと
     ぶつかる（実測で9件の重なりが出た）。カンプの比率 390:844 を基準に、
     幅と高さの小さい方へ合わせる。 */
  /* 🔴 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;
  overflow: hidden;
  background: #29b3fd;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  color: #14274b;
}

/* ---- ステージ（カンプ941x1672をcoverで敷く）------------------ */
.pFv__stage {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  width: auto;
  aspect-ratio: 941 / 1672;
  transform: translate(-50%, -50%);
  transform-origin: 50% 60%;
}
@media (min-aspect-ratio: 941/1672) {
  .pFv__stage {
    width: 100%;
    height: auto;
  }
}

/* 🔴 ここで width:100% を指定すると、個々のレイヤー（.pFv__crane 等）の
   width 指定より詳細度が高くなって全部が原寸100%で出る。実測で発覚
   （crane が 500px＝ステージ幅いっぱいになった）。幅は各レイヤー側だけで持つ。 */
.pFv__stage img {
  display: block;
  height: auto;
}

/* 空だけを持つ下敷き。指示書の初回表示①「青背景・空 opacity 0→1」用。
   支給素材は空〜地面が1枚絵なので、空の色は bg.png の実測値で作る
   （y=0% #29b3fd → 40% #86d7fd → 48% #a1e2fe）。 */
.pFv__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      #29b3fd 0%, #3bbafd 15%, #54c5fd 25%, #73d0fd 35%,
      #86d7fd 40%, #a1e2fe 48%, #a1e2fe 100%);
}

.pFv__bg {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* ---- 雲（5枚・個別レイヤー）---------------------------------- */
.pFv__cloud {
  position: absolute;
  opacity: 0.92;
  will-change: transform;
}
.pFv__cloud[data-cloud="1"] { left: -8%;  top: 6.0%;  width: 52%; }
.pFv__cloud[data-cloud="2"] { left: 46%;  top: 3.0%;  width: 58%; }
.pFv__cloud[data-cloud="3"] { left: 18%;  top: 15.5%; width: 46%; }
.pFv__cloud[data-cloud="4"] { left: 58%;  top: 20.5%; width: 44%; }
.pFv__cloud[data-cloud="5"] { left: -4%;  top: 24.5%; width: 38%; }

/* ---- クレーンと吊り荷（同じリグで一体に動かす）---------------- */
.pFv__craneRig {
  position: absolute;
  inset: 0;
  transform-origin: -10% 84%; /* クローラー接地点 */
  will-change: transform;
}
.pFv__crane {
  position: absolute;
  /* 🔴 ブームの先端が吹き出し3行の下端に被らない高さに置く。
     crane.webp は上端6.5%が不可視のハローなので、実際の先端は
     top + 0.065×高さ。吹き出しを下げた分だけこちらも下げている。 */
  left: -19%;
  top: 38%;
  width: 50%;
}
/* 吊り荷はクレーンのフック位置に合わせる。
   crane.webp 内のフック中心 = 幅の84.9% / 高さの34.6%（実測）。
   left = (-19 + 0.849*50) - 14.8/2 = 16.1% / top = 38 + 0.249*50 = 50.5% */
.pFv__load {
  position: absolute;
  left: 16.1%;
  top: 50.5%;
  width: 14.8%;
}

/* ---- 人物 ---------------------------------------------------- */
.pFv__manager {
  position: absolute;
  left: 35%;
  top: 51.5%;
  width: 39%;
  transform-origin: 50% 100%;
  will-change: transform;
}
/* 主役のタブレット（manager画像内での位置。画像基準の%で重ねる） */
.pFv__tablet {
  position: absolute;
  left: 17.5%;
  top: 20.6%;
  width: 19%;
  height: 11.5%;
  overflow: hidden;
  border-radius: 1.2% / 6%;
  transform: rotate(-19deg);
  pointer-events: none;
}
.pFv__tablet_shine {
  position: absolute;
  top: -20%;
  left: -120%;
  width: 60%;
  height: 140%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.85) 50%, rgba(255, 255, 255, 0) 100%);
  will-change: transform;
}

/* ============================================================
   スキャン演出（2026-09-11 追加指示）
   タブレット発光 → 扇状ビーム → 建物ホログラム＋走査線 → 消える
   既存レイヤーの位置・サイズ・アニメーションには一切触れない。
   ------------------------------------------------------------
   位置の基準:
     ・タブレット発光とビームは #fv-manager-wrap の中（＝人物画像基準の%）。
       人物ごと拡大縮小されるので、画面幅が変わってもタブレットからズレない。
     ・ホログラムはステージ基準。bg.png の鉄骨フレームの実測範囲
       （x 27%〜85% / y 37%〜72%）に合わせてある。
   ============================================================ */
.pFv__scanHolo {
  position: absolute;
  left: 27%;
  top: 37%;
  width: 58%;
  aspect-ratio: 925 / 979;      /* scan-holo.webp の実寸比 */
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(0, 220, 255, 0.7));
}
.pFv__scanHolo img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
.pFv__scanLine {
  position: absolute;
  bottom: 0;
  left: -6%;
  width: 112%;
  height: 3px;
  opacity: 0;
  background: linear-gradient(90deg,
      transparent, rgba(255, 255, 255, 0.9), rgba(0, 220, 255, 0.9), transparent);
  box-shadow: 0 0 8px rgba(0, 220, 255, 0.8), 0 0 16px rgba(0, 220, 255, 0.4);
  will-change: transform;
}

/* タブレットの発光（人物画像は無加工。上に重ねるだけ） */
.pFv__tabletGlow {
  position: absolute;
  left: 16%;
  top: 19%;
  width: 22%;
  height: 14%;
  border-radius: 14% / 22%;
  transform: rotate(-19deg);
  background: radial-gradient(ellipse at center,
      rgba(126, 235, 255, 0.95) 0%, rgba(0, 223, 255, 0.5) 45%, rgba(0, 223, 255, 0) 74%);
  filter: blur(3px);
  opacity: 0.35;
  pointer-events: none;
}

/* スキャンビーム
   🔴 2026-09-11 ユーザー指摘（2回）:
     ①「ビームの方向がちがう」→ 右上(+43°)から左上(-21°)へ。
        支給参考画像の実測（タブレット(465,1140)→到達点(355,855)＝鉛直から左21°）
     ②「広がりすぎ／建物発光と同化／タブレットから出て見えない」
        → 支給の扇形画像(scan-beam.webp)は不使用にし、
          細い三角形の半透明ビームをCSSで作る。
   寸法: 起点（タブレット側）6px / 建物側 50px / 長さ 284px（カンプ941x1672基準）
   起点は要素の下端中央＝タブレット画面の中心に一致させる。 */
.pFv__scanBeam {
  position: absolute;
  left: 27%;                 /* = タブレット中心X（人物画像の幅に対する%） */
  top: 26.35%;               /* = タブレット中心Y */
  /* 🔴 2026-09-11「ビームの位置を建物の真ん中くらいに」
     以前は長すぎて先端が建物の上の空へ抜けていた（SP390実測で先端(114,355)）。
     鉄骨フレームは SP390 で x86〜362 / y310〜610。-21°のまま長さを詰めて、
     先端がフレームの中ほど（およそ 140,420）に載るようにする。 */
  width: 15.8%;              /* 58px / 367px（人物画像の幅）＝建物側の太さ */
  aspect-ratio: 58 / 205;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(-21deg);
  pointer-events: none;
}
.pFv__scanBeam_ray {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform-origin: 50% 100%;   /* タブレット側から伸ばす */
  /* 起点の太さ = 幅の18% = SP390実測で約5px（指示は4〜8px）。
     建物側は幅そのままで約29px（指示は30〜60px）。 */
  clip-path: polygon(41% 100%, 59% 100%, 100% 0%, 0% 0%);
  /* 🔴 2026-09-11 ユーザー指摘「ビームの描写が二重で出てるように見える」。
     原因は2つ:
       ① 白い芯の外に濃いシアンの帯を置いていたため、境目が線に見えた
       ② clip-path で三角に切った形に drop-shadow が縁取りを作り、
          もう1本ビームがあるように見えていた
     → 中心から外へなめらかに落ちる単層グラデーションにし、
        drop-shadow は使わず blur だけでにじませる。 */
  background: linear-gradient(90deg,
      rgba(150, 240, 255, 0) 0%,
      rgba(170, 243, 255, 0.42) 28%,
      rgba(255, 255, 255, 0.96) 50%,
      rgba(170, 243, 255, 0.42) 72%,
      rgba(150, 240, 255, 0) 100%);
  filter: blur(3.5px);
  will-change: transform, opacity;
}
/* 建物に当たった点の小さな発光 */
.pFv__scanBeam_hit {
  position: absolute;
  left: 50%;
  top: 0;
  width: 150%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle,
      rgba(255, 255, 255, 0.95) 0%, rgba(120, 235, 255, 0.6) 32%, rgba(0, 223, 255, 0) 70%);
  filter: blur(2px);
  will-change: transform, opacity;
}

.pFv__worker {
  position: absolute;
  transform-origin: 50% 100%;
  will-change: transform;
}
/* SP390ではステージの左右が8.8%ずつ切れる（475px中42px）。
   右の職人はカンプ位置(83.4%)だと右端が欠けるので内側へ寄せる。 */
.pFv__worker.--signal { left: 12.6%; top: 59.6%; width: 11.6%; }
.pFv__worker.--carry  { left: 77%;   top: 60.4%; width: 12.6%; }

/* ---- アイコンからの引き出し線 --------------------------------
   🔴 バッジ（丸アイコン）は「パネル基準」、指し先はイラスト＝
   「ステージ基準」。ステージはSP390では左右が42pxずつ切られるので、
   バッジをステージ基準で置くと画面外にはみ出す（実測で発覚）。
   線は fv.js がパネル座標系で毎回引き直す。 */
.pFv__leads {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.pFv__leads_line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
}
.pFv__leads_dot {
  fill: #ffffff;
}

/* ---- 4つの丸アイコン（工程・安全・品質・職人）----------------- */
.pFv__badge {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: 15.1%;              /* カンプ実測 118/941 ＝ ステージ幅の12.5% */
  aspect-ratio: 1;
  margin-left: -7.55%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2%;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(20, 39, 75, 0.18);
  will-change: transform;
}
.pFv__badge_icon {
  display: block;
  width: 38%;
  height: auto;
}
.pFv__badge_label {
  font-size: 26%;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #14274b;
  white-space: nowrap;
}
/* 位置＝パネル基準。カンプの中心座標(941x1672)を、SP390で見える範囲に
   収まるよう左右を内側へ寄せた値（工程 39.5%→41% / 安全 85%→81.5% /
   品質 89%→84% / 職人 16%→13.5%）。上下はカンプそのまま。 */
.pFv__badge[data-badge="schedule"] { --x: 41%;   --y: 32.6%; }
.pFv__badge[data-badge="safety"]   { --x: 81.5%; --y: 45.5%; }
.pFv__badge[data-badge="quality"]  { --x: 84%;   --y: 54.0%; }
.pFv__badge[data-badge="crew"]     { --x: 13.5%; --y: 52.0%; }

/* ============================================================
   文字レイヤー（パネル基準・vw）
   ============================================================ */

/* ---- メインコピー -------------------------------------------- */
.pFv__copy {
  position: absolute;
  left: 4.6%;
  top: 11.2%;
  z-index: 3;
  /* カンプは941px幅＝実機470px想定で作られている（1行目8文字が幅48%）。
     390pxに合わせて 28px × 390/470 ≒ 23px → 6.05vw。 */
  font-size: calc(var(--fvu) * 6.05);
  font-weight: 800;
  line-height: 1.44;
  letter-spacing: 0.01em;
  color: #16294d;
}
.pFv__copy_line {
  display: block;
  overflow: hidden;          /* せり上がり演出のマスク */
}
.pFv__copy_inner {
  display: block;
  will-change: transform;
}
.pFv__copy_mark {
  display: inline-block;
  padding: 0.04em 0.16em 0.1em;
  margin: 0 0.06em;
  color: #fff;
  background: #16294d;
  will-change: transform;
}

/* ---- 吹き出し3行 --------------------------------------------- */
/* 🔴 2026-09-11 ユーザー指示「（吹き出し3行は）もっと下に」
   メインコピーとの間を 8px → 32px に広げた（実測）。
   下げた分だけクレーンも下げて、ブームとの重なりを避けている。 */
.pFv__notes {
  position: absolute;
  left: 4.4%;
  top: 27.5%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: calc(var(--fvu) * 1.5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pFv__notes_item {
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  padding: 0.42em 0.8em 0.42em 0.64em;
  border-left: 0.28em solid #00a0e9;
  border-radius: 0 0.5em 0.5em 0;
  background: rgba(255, 255, 255, 0.72);
  /* 個別指示：3行とも改行させず、収まる範囲で視認性をもう一段上げる。 */
  font-size: calc(var(--fvu) * 2.6);
  font-weight: 700;
  line-height: 1.35;
  color: #1d3663;
  white-space: nowrap;
  will-change: transform;
}
@media (max-width: 767px) {
  /* iPhone Safariの低い可視領域でも、PC枠より極端に小さく見せない。 */
  .pFv__notes_item {
    font-size: max(calc(var(--fvu) * 2.6), min(10px, 2.667vw));
  }
}

/* ---- 縦コピー ------------------------------------------------ */
.pFv__vert {
  position: absolute;
  top: 8.4%;
  right: 4.2%;
  z-index: 4;
  display: flex;
  flex-direction: row-reverse;   /* 縦書きは右から左へ */
  align-items: flex-start;
  gap: calc(var(--fvu) * 2.4);
}
.pFv__vert_panel {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: calc(var(--fvu) * 9.2);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: 0.02em;
  padding: 0.36em 0.1em 0.42em;
  will-change: transform;
}
.pFv__vert_panel.--white {
  color: #16294d;
  background: #fff;
  box-shadow: 0 3px 16px rgba(20, 39, 75, 0.16);
}
.pFv__vert_panel.--blue {
  margin-top: 2.4%;
  color: #fff;
  background: #00a0e9;
  box-shadow: 0 3px 16px rgba(0, 87, 145, 0.24);
}

/* ---- People Build Tomorrow ----------------------------------- */
@font-face {
  font-family: "FvScript";
  src: url("fonts/caveat-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
/* 🔴 2026-09-11 ユーザー指示「people build tomorrow もっと大きく下に」
   縦コピーの青帯の下端（42.6%）より下へ出すと横幅の制約が外れるので、
   そこまで下げて文字を大きくしている。 */
.pFv__tagline {
  position: absolute;
  /* 青帯の下端 = 縦コピーの上端(8.4%) + 帯の高さ(7文字 × 9.2vw × 行間) 。
     画面比で帯の長さが変わるので、%とvwを足して常にその下に置く。
     PC1440(枠480x900)で帯に被っていたため実測して calc 化した。 */
  top: calc(8.4% + var(--fvu) * 75.5 + 16px);
  right: 2%;
  width: 30%;
  z-index: 3;
  font-family: "FvScript", "Segoe Script", cursive;
  font-size: calc(var(--fvu) * 5.6);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(20, 39, 75, 0.18);
}
.pFv__tagline span {
  display: block;
}
.pFv__tagline span:nth-child(2) { margin-left: 0.35em; }
.pFv__tagline span:nth-child(3) { margin-left: 0.7em; }

/* ---- ENTRYカード --------------------------------------------- */
.pFv__entry {
  position: absolute;
  left: 4.2%;
  right: 4.2%;
  bottom: 3.4%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2%;
  padding: 4.6% 4.6% 4.6% 5.4%;
  background: #fff;
  border-radius: calc(var(--fvu) * 8);
  box-shadow: 0 6px 22px rgba(20, 39, 75, 0.14);
  will-change: transform;
}
.pFv__entry_body {
  flex: 1 1 auto;
  min-width: 0;
}
.pFv__entry_title {
  margin: 0 0 0.5em;
  padding-bottom: 0.42em;
  border-bottom: 2px dotted #9fb4cf;
  font-size: calc(var(--fvu) * 4.4);
  font-weight: 800;
  line-height: 1.1;
  color: #00a0e9;
  white-space: nowrap;
}
.pFv__entry_title small {
  font-size: 68%;
  font-weight: 800;
}
.pFv__entry_text {
  margin: 0;
  font-size: calc(var(--fvu) * 3.05);
  font-weight: 600;
  line-height: 1.6;
  color: #1d3663;
  white-space: nowrap;
}

/* ---- Contact us の円 ----------------------------------------- */
.pFv__contact {
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--fvu) * 27);
  aspect-ratio: 1;
  text-decoration: none;
}
.pFv__contact_ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.pFv__contact_ring text {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  fill: #00a0e9;
}
.pFv__contact_body {
  position: absolute;
  inset: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6%;
  text-align: center;
}
.pFv__contact_text {
  font-size: calc(var(--fvu) * 2.5);
  font-weight: 700;
  line-height: 1.35;
  color: #16294d;
  white-space: nowrap;
}
.pFv__contact_arrow {
  width: calc(var(--fvu) * 3.1);
  height: calc(var(--fvu) * 3.1);
  margin-top: 2%;
  border-top: calc(var(--fvu) * 0.42) solid #00a0e9;
  border-right: calc(var(--fvu) * 0.42) solid #00a0e9;
  transform: rotate(45deg);
}

/* ---- ENTRYボタンの波紋（指示書「3〜5秒に一度」）--------------
   ヘッダーのENTRYと、FV下部のお問い合わせ円の両方に出す。 */
.pHeaderV2__btn--entry,
.pFv__contact {
  position: relative;
}
.pHeaderV2__btn--entry::before,
.pFv__contact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  animation: fvEntryRipple 4.5s ease-out infinite;
}
@keyframes fvEntryRipple {
  0%   { box-shadow: 0 0 0 0 rgba(23, 133, 208, 0.55); }
  26%  { box-shadow: 0 0 0 12px rgba(23, 133, 208, 0); }
  100% { box-shadow: 0 0 0 12px rgba(23, 133, 208, 0); }
}
.pHeaderV2__btn--entry:hover {
  transform: translateY(-3px) scale(1.07);
}
.pHeaderV2__btn--entry:hover::after {
  transform: translateX(5px) rotate(45deg);
}
.pFv__contact:hover {
  transform: translateY(-3px) scale(1.05);
}
.pFv__contact {
  transition: transform 0.2s ease;
}

/* ---- 動きを減らす設定の尊重 ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .pHeaderV2__btn--entry::before,
  .pFv__contact::before,
  .pFv__cloud,
  .pFv__crane,
  .pFv__load,
  .pFv__manager,
  .pFv__worker,
  .pFv__badge,
  .pFv__contact_ring,
  .pFv__tablet_shine {
    animation: none !important;
  }
}

/* セクション番号ラベル（共通スタイルは sec3.css）。FVはコピーの上に置く。 */
.pFv__label {
  left: 4.8%;
  top: 8.2%;
}
