@charset "UTF-8";
/* ==========================================================================
   RIZON警備株式会社 / TOP デザインA案
   top.css : TOPページ固有（ファーストビュー）
   --------------------------------------------------------------------------
   縦の構成は 1920x1192px 換算の実測値に基づく。
     ヘッダー下端 119px  --- ロゴ領域 --- キャッチ1行目の文字上端 852.5px
   ロゴをこの区間の中央に置くと、実測のロゴ中心 485px と一致する。
   ========================================================================== */

.p-top-fv {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  padding-bottom: var(--fv-pb);

  /* --- FV固有トークン（括弧内は1920px時の設計値） --- */
  --fv-pb:          clamp(24px, 2.240vw, 43px);     /* 43px   下端の余白 */
  --fv-mark-w:      68.43%;                          /* 1314px 画面幅に対する大ロゴ幅 */
  --fv-rail-offset: clamp(8px, 1.273vw, 24.5px);     /* 24.5px 右レールをロゴ中心より上げる量 */
  --fv-copy-w:      61%;                             /* 1171px コピー全体の横幅 */
  --en-mt:          clamp(10px, 1.250vw, 24px);      /* 24px   1行目と英文の間 */
  --en-gap:         clamp(12px, 1.667vw, 32px);      /* 32px   英文と罫線の間 */
  --catch2-mt:      clamp(6px, .940vw, 18px);        /* 18px   英文と2行目の間 */
  --catch2-punct:   -.578em;                         /* 句点の右アキを詰めて英文と右端を揃える */
  --rail-gap:       clamp(20px, 4.380vw, 84.1px);    /* 84.1px レール行間（行送り106.1px） */
  --scroll-gap:     clamp(18px, 2.677vw, 51.4px);    /* 51.4px SCROLL文字と縦線の間 */
  --scroll-line-h:  clamp(60px, 10.833vw, 208px);    /* 208px  縦線の長さ（画面下端まで） */
}

/* --------------------------------------------------------------------------
   1. 大ロゴ
   高さが足りない画面では object-fit: contain で縮み、はみ出さない。
   -------------------------------------------------------------------------- */
.p-top-fv__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* picture を display: contents にして img 自身をフレックスアイテムにする */
.p-top-fv__mark-wrap { display: contents; }

.p-top-fv__mark {
  width: var(--fv-mark-w);
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   2. 右レール（YOKOSUKA / SECURITY / SERVICE）
   -------------------------------------------------------------------------- */
.p-top-fv__rail {
  position: absolute;
  top: 50%;
  right: var(--rail-x);
  transform: translateY(calc(-50% - var(--fv-rail-offset)));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--rail-gap);
  font-size: var(--fz-ui);
  line-height: 1;
  letter-spacing: .045em;
}

.p-top-fv__rail-item {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. キャッチコピー
   -------------------------------------------------------------------------- */
.p-top-fv__copy {
  flex: 0 0 auto;
  margin-left: var(--gutter);
  width: min(var(--fv-copy-w), calc(100% - var(--gutter) * 2));
  font-size: inherit;
  font-weight: inherit;
}

.p-top-fv__catch {
  display: block;
  font-size: var(--fz-catch);
  font-weight: 900;
  line-height: 1;
  letter-spacing: var(--ls-catch);
}

.p-top-fv__catch--2 {
  margin-top: var(--catch2-mt);
  margin-right: var(--catch2-punct);
  text-align: right;
}

.p-top-fv__en {
  display: flex;
  align-items: center;
  gap: var(--en-gap);
  margin-top: var(--en-mt);
  font-size: var(--fz-ui);
  font-weight: 700;
  line-height: 1;
}

.p-top-fv__en-text { white-space: nowrap; }

.p-top-fv__en-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--c-text);
  transform-origin: left center;
}

/* --------------------------------------------------------------------------
   4. SCROLL
   -------------------------------------------------------------------------- */
.p-top-fv__scroll {
  position: absolute;
  right: var(--rail-x);
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--scroll-gap);
}

.p-top-fv__scroll-label {
  writing-mode: vertical-rl;
  font-size: var(--fz-ui);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
}

.p-top-fv__scroll-line {
  position: relative;
  width: 1px;
  height: var(--scroll-line-h);
  background: rgba(255, 255, 255, .55);
  overflow: hidden;
}

.p-top-fv__scroll-line::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(to bottom, transparent, #fff 45%, transparent);
  animation: fv-scroll-cue 2.6s var(--ease) infinite;
}

@keyframes fv-scroll-cue {
  0%        { transform: translateY(-100%); }
  55%, 100% { transform: translateY(240%); }
}

/* --------------------------------------------------------------------------
   5. Motion : 初回表示（控えめ）
   -------------------------------------------------------------------------- */
.js .p-top-fv__mark {
  opacity: 0;
  transform: scale(1.035);
}

/* 見出しは clip-path のワイプで出す。
   translateY で出すと文字が一時的に下へはみ出し、
   8px 程度の縦スクロールが発生してしまうため。 */
.js .p-top-fv__catch { clip-path: inset(-25% 0 110% 0); }

.js .p-top-fv__en-text { opacity: 0; }

.js .p-top-fv__en-rule  { transform: scaleX(0); }
.js .p-top-fv__rail-item { opacity: 0; transform: translateX(10px); }
.js .p-top-fv__scroll    { opacity: 0; }

.is-ready .p-top-fv__mark {
  opacity: 1;
  transform: none;
  transition: opacity 1.1s var(--ease) .1s, transform 1.4s var(--ease) .1s;
}

.is-ready .p-top-fv__catch {
  clip-path: inset(-25% 0 -25% 0);
  transition: clip-path 1s var(--ease);
}

.is-ready .p-top-fv__en-text {
  opacity: 1;
  transition: opacity .9s var(--ease);
}

.is-ready .p-top-fv__catch--1 { transition-delay: .55s; }
.is-ready .p-top-fv__en-text  { transition-delay: .70s; }
.is-ready .p-top-fv__catch--2 { transition-delay: .78s; }

.is-ready .p-top-fv__en-rule {
  transform: scaleX(1);
  transition: transform 1s var(--ease) .74s;
}

.is-ready .p-top-fv__rail-item {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.is-ready .p-top-fv__rail-item:nth-child(1) { transition-delay: .48s; }
.is-ready .p-top-fv__rail-item:nth-child(2) { transition-delay: .56s; }
.is-ready .p-top-fv__rail-item:nth-child(3) { transition-delay: .64s; }

.is-ready .p-top-fv__scroll {
  opacity: 1;
  transition: opacity .9s var(--ease) .95s;
}

@media (prefers-reduced-motion: reduce) {
  .js .p-top-fv__mark,
  .js .p-top-fv__en-text,
  .js .p-top-fv__rail-item,
  .js .p-top-fv__scroll {
    opacity: 1;
    transform: none;
  }

  .js .p-top-fv__catch { clip-path: none; }

  .js .p-top-fv__en-rule { transform: scaleX(1); }

  .p-top-fv__scroll-line {
    background: rgba(255, 255, 255, .85);
  }

  .p-top-fv__scroll-line::after { display: none; }
}

/* --------------------------------------------------------------------------
   6. Responsive : ~1199px（タブレット）
   この幅から大ロゴの左右に右レールを置く余白がなくなり重なるため、
   レールをロゴ下の横1行へ組み替える（SPデザイン案がないための実装判断）。
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .p-top-fv {
    --fv-mark-w: 86%;   /* レールが横に来ないぶんロゴを大きく使う */
    --fv-copy-w: 76%;
  }

  .p-top-fv__stage {
    flex-direction: column;
    justify-content: center;
    gap: clamp(18px, 3.4vw, 40px);
  }

  .p-top-fv__rail {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.6vw, 20px);
    font-size: clamp(10px, 1.35vw, 16px);
    letter-spacing: .16em;
  }

  .p-top-fv__rail-item + .p-top-fv__rail-item::before {
    content: "";
    width: 3px;
    height: 3px;
    margin-right: clamp(10px, 1.6vw, 20px);
    border-radius: 50%;
    background: currentColor;
  }
}

/* --------------------------------------------------------------------------
   7. Responsive : ~767px（スマートフォン）
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .p-top-fv {
    --fv-mark-w: 84%;
    --fz-catch: clamp(30px, 10vw, 52px);
    --en-gap: clamp(8px, 2.5vw, 14px);
    --en-mt: clamp(12px, 3.4vw, 20px);
    --catch2-mt: clamp(8px, 2.4vw, 14px);
    --catch2-punct: -.3em;   /* SCROLLと近いため補正を浅くする */
  }

  .p-top-fv__stage { gap: clamp(18px, 5vw, 32px); }

  .p-top-fv__rail {
    gap: clamp(10px, 3.4vw, 18px);
    font-size: clamp(10px, 2.6vw, 13px);
  }

  .p-top-fv__rail-item + .p-top-fv__rail-item::before {
    margin-right: clamp(10px, 3.4vw, 18px);
  }

  /* SCROLL と右端で重ならないよう、コピー幅を確保する */
  .p-top-fv__copy {
    width: auto;
    margin-right: calc(var(--rail-x) + 26px);
  }

  .p-top-fv__en { font-size: clamp(10px, 2.7vw, 13px); }

  .p-top-fv__scroll-label {
    font-size: clamp(10px, 2.6vw, 13px);
    letter-spacing: .12em;
  }
}


/* ==========================================================================
   ABOUT（WE ARE RIZON SECURITY SERVICE）
   de_1-02.jpg を 1920px 換算で実測（セクション高さ 864.5px）
   ========================================================================== */

.p-top-about {
  position: relative;
  padding-top: var(--about-pt);
  padding-bottom: var(--about-pb);

  /* 背景の斜め格子（ひし形）。1辺 423px のタイルを画面幅に合わせて拡縮する */
  background-color: var(--c-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 0L100 50L50 100L0 50Z' fill='none' stroke='%23fff' stroke-opacity='.09' stroke-width='.5'/%3E%3C/svg%3E");
  background-size: var(--about-lattice) var(--about-lattice);
  background-position: calc(var(--about-lattice) * -.2307) calc(var(--about-lattice) * .0449);

  /* --- ABOUT固有トークン（括弧内は1920px時の設計値） --- */
  --about-pt:        clamp(48px, 3.599vw, 69.1px);   /* 69.1px  上余白 */
  --about-pb:        clamp(64px, 6.052vw, 116.2px);  /* 116.2px 下余白 */
  --about-lattice:   clamp(200px, 22.031vw, 423px);  /* 423px   格子の1マス */
  --about-body-mt:   clamp(28px, 3.156vw, 60.6px);   /* 60.6px  見出しと本文の間 */
  --about-gallery-w: 40.27%;                         /* 698.9px 写真エリアの幅（余白を除いた内側 1735.5px に対する比率） */
}

.p-top-about__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(16px, 1.25vw, 24px);
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* --------------------------------------------------------------------------
   1. テキスト
   -------------------------------------------------------------------------- */
.p-top-about__text {
  flex: 1 1 0;      /* 写真エリアを除いた残り幅をすべて使う */
  min-width: 0;
}

/* 大見出しの共通スタイルは common.css の .c-heading */
.p-top-about__title {
  white-space: nowrap;               /* <br> の位置以外では改行させない（SPは下で解除） */
}

.p-top-about__body {
  margin-top: var(--about-body-mt);
  font-size: var(--fz-body);
  font-weight: 700;
  line-height: 2;                    /* 行送り 44.1px / 22px */
}

/* --------------------------------------------------------------------------
   2. 写真（3点のコラージュ）
   各写真の位置は写真エリアに対する % で持ち、エリアごと拡縮させる
   -------------------------------------------------------------------------- */
.p-top-about__gallery {
  position: relative;
  flex: 0 0 var(--about-gallery-w);
  aspect-ratio: 698.9 / 679.2;
}

.p-top-about__photo {
  position: absolute;
  overflow: hidden;
  background: var(--c-placeholder);
}

.p-top-about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-top-about__photo--1 { left: 0;       top: 0;       width: 43.00%; height: 50.46%; }  /* 300.5 x 342.7 */
.p-top-about__photo--2 { left: 61.64%;  top: 17.71%;  width: 38.36%; height: 50.43%; }  /* 268.1 x 342.5 */
.p-top-about__photo--3 { left: 6.35%;   top: 72.16%;  width: 44.47%; height: 27.84%; }  /* 310.8 x 189.1 */

/* 写真ごとの見せる位置。左上は横長の写真を縦長の枠で切るため、顔と上げた手が両方入る位置に寄せる */
.p-top-about__photo--1 img { object-position: 74% 50%; }
.p-top-about__photo--3 img { object-position: 50% 30%; }   /* 帽子が切れないよう少し上寄り */

/* --------------------------------------------------------------------------
   3. Responsive : ~1023px（1カラムへ）
   2カラムのままだと見出しと写真の間が詰まりすぎるため縦積みにする。
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .p-top-about__inner {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(40px, 7vw, 64px);
    padding-right: var(--gutter);
  }

  .p-top-about__gallery {
    flex-basis: auto;
    width: min(100%, 640px);
    margin-left: auto;
  }
}

/* --------------------------------------------------------------------------
   4. Responsive : ~767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .p-top-about__body { line-height: 1.9; }

  .p-top-about__title { white-space: normal; }

  .p-top-about__gallery { width: 100%; }
}


/* ==========================================================================
   SERVICE（OUR SERVICE / 業務紹介）
   de_1-03.jpg を 1920px 換算で実測（セクション高さ 756.7px）
   業務ごとに同じ構造のセクションを並べる想定（de_1-04 雑踏警備も同形）
   ========================================================================== */

.p-top-service {
  padding-top: var(--service-pt);
  padding-bottom: var(--service-pb);

  /* --- SERVICE固有トークン（括弧内は1920px時の設計値） --- */
  --service-pt:        clamp(48px, 4.000vw, 76.8px);   /* 76.8px 上余白（英字ラベルの文字上端まで） */
  --service-pb:        clamp(48px, 3.047vw, 58.5px);   /* 58.5px 下余白 */
  --service-detail-w:  57.9%;                          /* 1004.4px 右カラムの幅（内側 1735.5px に対する比率） */
  --service-detail-mt: clamp(24px, 4.349vw, 83.5px);   /* 83.5px 右カラム上端（罫線）の位置 */
  --service-title-pb:  clamp(4px, .438vw, 8.4px);      /* 8.4px  見出しと下線の間 */
  --service-body-mt:   clamp(28px, 3.323vw, 63.8px);   /* 63.8px 下線と本文の間 */
  --service-cases-pt:  clamp(16px, 1.484vw, 28.5px);   /* 28.5px 上の罫線と写真の間 */
  --case-title-fz:     clamp(13px, 1.042vw, 20px);     /* 20px   CASE見出し */
  --case-text-fz:      clamp(13px, .9375vw, 18px);     /* 18px   CASE本文 */
  --service-more-mt:   clamp(24px, 1.719vw, 33px);     /* 33px   カードとボタンの間 */
}

.p-top-service__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* --------------------------------------------------------------------------
   1. 左カラム（見出し・本文）
   本文はデザインどおり1行26文字の組み。列幅も本文26文字分にする
   -------------------------------------------------------------------------- */
.p-top-service__text {
  flex: 0 0 auto;
  width: calc(var(--fz-body) * 26);
}

.p-top-service__title {
  padding-bottom: var(--service-title-pb);
  border-bottom: 2px solid var(--c-text);
  white-space: nowrap;
}

.p-top-service__body {
  margin-top: var(--service-body-mt);
  font-size: var(--fz-body);
  font-weight: 700;
  line-height: 2;                    /* 行送り 44px / 22px */
  white-space: nowrap;               /* 行末の「、」を列の外にぶら下げる（デザインの組みを再現） */
}

/* --------------------------------------------------------------------------
   2. 右カラム（CASE 3件＋ボタン）
   -------------------------------------------------------------------------- */
.p-top-service__detail {
  flex: 0 0 var(--service-detail-w);
  margin-top: var(--service-detail-mt);
}

.p-top-service__cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 4.32%;                 /* 43.4px */
  row-gap: 40px;
  padding-top: var(--service-cases-pt);
  border-top: 3px solid var(--c-text);   /* 実測 3px */
}

.p-top-service__photo {
  aspect-ratio: 306 / 221.3;
  overflow: hidden;
  background: var(--c-placeholder);
}

.p-top-service__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-top-service__case-title {
  margin-top: clamp(6px, .469vw, 9px);
  font-size: var(--case-title-fz);
  font-weight: 500;
  line-height: 1.5;
}

.p-top-service__case-num { margin-right: 1.1em; }

.p-top-service__case-text {
  margin-top: clamp(4px, .354vw, 6.8px);
  font-size: var(--case-text-fz);
  font-weight: 700;
  line-height: 1.76;                 /* 行送り 31.7px / 18px */
}

.p-top-service__more {
  width: 69.9%;                      /* 702.2px */
  margin-top: var(--service-more-mt);
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   3. Responsive : ~1279px（1カラムへ）
   これより狭いとCASEの幅が足りず「CASE 03 水道・電気・通信工事」が折り返すため縦積みにする。
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .p-top-service {
    --service-detail-mt: clamp(40px, 6vw, 64px);
  }

  .p-top-service__inner {
    flex-direction: column;
    align-items: stretch;
    padding-right: var(--gutter);
  }

  .p-top-service__detail { flex-basis: auto; }
}

/* --------------------------------------------------------------------------
   4. Responsive : ~767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .p-top-service {
    --case-title-fz: 15px;
    --case-text-fz:  14px;
  }

  .p-top-service__text { width: auto; }

  .p-top-service__title { white-space: normal; }

  .p-top-service__body {
    line-height: 1.9;
    white-space: normal;
  }

  .p-top-service__cases { grid-template-columns: 1fr; }

  .p-top-service__more { width: 100%; }
}


/* ==========================================================================
   RECRUIT（採用情報）
   de_1-05.jpg を 1920px 換算で実測（セクション高さ 1212.5px）
   えんじ色のパネルは背景写真の仮置き。写真の上に縦書きコピー・本文・ボタンを重ねる
   ========================================================================== */

.p-top-recruit {
  padding-top: var(--recruit-pt);
  padding-bottom: var(--recruit-pb);

  /* このセクションだけ英字ラベルと見出しの間が狭い（実測 39.9px。他は約71px） */
  --heading-mt: clamp(8px, 1.052vw, 20.2px);

  /* --- RECRUIT固有トークン（括弧内は1920px時の設計値） --- */
  --recruit-pt:        clamp(56px, 5.490vw, 105.4px);  /* 105.4px 上余白（英字ラベルの文字上端まで） */
  --recruit-pb:        clamp(32px, 2.688vw, 51.6px);   /* 51.6px  パネル下の余白 */
  --recruit-panel-mt:  clamp(20px, 1.870vw, 35.9px);   /* 35.9px  見出しとパネルの間 */
  --recruit-panel-h:   clamp(400px, 45.29vw, 869.5px); /* 869.5px パネルの高さ */
  --recruit-panel-pb:  clamp(12px, 1.000vw, 19.2px);   /* 19.2px  パネル下端と本文・ボタンの間 */
  --recruit-catch-r:   clamp(16px, 4.297vw, 82.5px);   /* 82.5px  パネル右端から縦書きコピーまで */
  --recruit-catch-gap: clamp(10px, 1.823vw, 35px);     /* 35px    縦書きの2列の間 */
}

.p-top-recruit__head { padding-inline: var(--gutter); }

/* --------------------------------------------------------------------------
   1. パネル（背景写真の上に本文とボタンを下揃えで置く）
   左右はヘッダーロゴと同じ位置（--frame-x）まで広げる
   -------------------------------------------------------------------------- */
.p-top-recruit__panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--recruit-panel-h);
  margin: var(--recruit-panel-mt) var(--frame-x) 0;
  padding: 0 calc(var(--gutter-r) - var(--frame-x)) var(--recruit-panel-pb) calc(var(--gutter) - var(--frame-x));
}

.p-top-recruit__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--c-placeholder);
}

.p-top-recruit__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 写真の上の本文（左下）とボタン（右下）を読みやすくするため、下側と左側だけ暗くする。
   人物の顔がある上側は暗くしない */
.p-top-recruit__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 32%, rgba(0, 0, 0, 0) 58%),
    linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 42%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. 縦書きのキャッチ（白い箱に黒文字）
   -------------------------------------------------------------------------- */
.p-top-recruit__catch {
  position: absolute;
  top: 0;
  right: var(--recruit-catch-r);
  display: flex;
  flex-direction: row-reverse;       /* 1列目（警備を、）を右に置く */
  align-items: flex-start;
  gap: var(--recruit-catch-gap);
  font-size: var(--fz-heading);
  font-weight: 900;
  line-height: 1;
  letter-spacing: var(--ls-catch);
}

.p-top-recruit__catch-line {
  writing-mode: vertical-rl;
  white-space: nowrap;               /* 行末のマイナス余白で改行されないようにする */
  padding: .46em .1645em 0;          /* 上39.4px / 左右14.2px（箱の幅114.3px） */
  background: #fff;
  color: #000;
}

/* 行末の句読点は字面が上に寄っているため、箱の下端をその分詰める */
.p-top-recruit__catch-punct { margin-inline-end: -.25em; }

/* --------------------------------------------------------------------------
   3. 本文・ボタン
   -------------------------------------------------------------------------- */
.p-top-recruit__body {
  position: relative;
  font-size: var(--fz-body);
  font-weight: 700;
  line-height: 2;                    /* 行送り 44px / 22px */
  white-space: nowrap;               /* 行末の「、」を列の外にぶら下げる（デザインの組みを再現） */
}

.p-top-recruit__more {
  position: relative;
  flex: 0 0 40.48%;                  /* 702.2px（パネル内側 1734.8px に対する比率） */
}

/* --------------------------------------------------------------------------
   4. Responsive : ~1023px（本文の下にボタンを置く）
   本文とボタンを横に並べると重なるため縦に積む。
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .p-top-recruit {
    --recruit-panel-h: clamp(480px, 78vw, 800px);
  }

  .p-top-recruit__panel {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: clamp(24px, 4vw, 32px);
    padding-right: calc(var(--gutter) - var(--frame-x));
  }

  .p-top-recruit__more {
    flex: none;
    width: min(100%, 520px);
  }
}

/* --------------------------------------------------------------------------
   5. Responsive : ~767px
   写真の上は縦書きコピーだけにし、本文とボタンは写真の下に出す
   （小さい画面で写真の上に長文を載せると読みにくくなるため）
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .p-top-recruit {
    --recruit-sp-visual-h: max(300px, 84vw);   /* 縦書きの箱と人物の顔が重ならない高さ */
  }

  .p-top-recruit__panel {
    display: block;
    min-height: 0;
    padding: var(--recruit-sp-visual-h) calc(var(--gutter) - var(--frame-x)) 0;
  }

  .p-top-recruit__bg {
    inset: 0 0 auto;
    height: var(--recruit-sp-visual-h);
  }

  /* SPは本文とボタンが写真の下に出るため、写真を暗くしない */
  .p-top-recruit__bg::after { display: none; }

  /* 右上の縦書きの箱に顔がかからないよう、人物を左寄りに見せる */
  .p-top-recruit__bg img { object-position: 90% 20%; }

  .p-top-recruit__body {
    margin-top: 28px;
    line-height: 1.9;
    white-space: normal;
  }

  .p-top-recruit__more {
    width: 100%;
    margin-top: 28px;
  }
}


/* ==========================================================================
   INTERVIEW（社員インタビュー）
   de_1-06.jpg を 1920px 換算で実測（セクション高さ 1169.8px）
   写真3枚を右に行くほど100pxずつ下げて並べる
   ========================================================================== */

.p-top-interview {
  padding-top: var(--interview-pt);
  padding-bottom: var(--interview-pb);

  /* --- INTERVIEW固有トークン（括弧内は1920px時の設計値） --- */
  --interview-pt:      clamp(56px, 5.510vw, 105.8px);  /* 105.8px 上余白（見出しの文字上端まで） */
  --interview-pb:      clamp(48px, 4.438vw, 85.2px);   /* 85.2px  下余白 */
  --interview-list-mt: clamp(48px, 6.214vw, 119.3px);  /* 119.3px 見出しと1枚目の写真の間 */
  --interview-list-pl: clamp(36px, 7.224vw, 138.7px);  /* 138.7px 1枚目の写真の左端 */
  --interview-num-fz:  clamp(56px, 8.698vw, 167px);    /* 番号（数字の高さ 121.9px） */
  --interview-cap-fz:  clamp(14px, 1.458vw, 28px);     /* 28px    キャプション */
}

.p-top-interview__title {
  margin-top: -.228em;               /* 文字の上端（キャップハイト）を上余白に揃える */
  padding-inline: var(--gutter);
  font-size: clamp(32px, 4.063vw, 78px);   /* 78px 大文字の高さ 55.9px */
  font-weight: 900;
  line-height: 1;
  letter-spacing: .017em;            /* デザインの文字幅 402.5px に合わせる */
}

/* --------------------------------------------------------------------------
   1. 並び（3列・階段状）
   グリッドアイテムの % マージンは列幅基準なので、段差も写真と一緒に拡縮する
   -------------------------------------------------------------------------- */
.p-top-interview__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 6.1%;                  /* 101.7px */
  align-items: start;
  margin-top: var(--interview-list-mt);
  padding-left: var(--interview-list-pl);
  padding-right: var(--gutter-r);
}

.p-top-interview__item:nth-child(2) { margin-top: 20.52%; }  /* 100px 下げる */
.p-top-interview__item:nth-child(3) { margin-top: 40.97%; }  /* 200px 下げる */

/* --------------------------------------------------------------------------
   2. カード（写真・番号・キャプション）
   -------------------------------------------------------------------------- */
.p-top-interview__card {
  position: relative;
  display: block;
  cursor: pointer;
}

.p-top-interview__photo {
  aspect-ratio: 487.9 / 600;
  overflow: hidden;
  background: var(--c-placeholder);
}

.p-top-interview__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.p-top-interview__card:hover .p-top-interview__photo img,
.p-top-interview__card:focus-visible .p-top-interview__photo img { transform: scale(1.04); }

/* 写真の右上に重なる大きな番号 */
.p-top-interview__num {
  position: absolute;
  top: -.595em;                      /* 数字の上端が写真の上端から62.4px上（02・03に合わせる） */
  right: -.145em;
  font-size: var(--interview-num-fz);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 .18em rgba(0, 0, 0, .35);   /* 明るい写真の上でも白い数字が溶けないように */
}

/* 写真の左下に重なる白い箱のキャプション（1行目は写真の左外へはみ出す） */
.p-top-interview__catch {
  position: absolute;
  left: -1.42em;                     /* 39.8px */
  right: 0;
  bottom: 1em;                       /* 28px */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .43em;                        /* 12px */
  font-size: var(--interview-cap-fz);
  font-weight: 700;
  line-height: 1;
}

.p-top-interview__catch-line {
  padding: .575em .5em;              /* 箱の高さ 60.2px */
  background: #fff;
  color: #000;
  white-space: nowrap;
}

.p-top-interview__catch-line:last-child { align-self: flex-end; }

/* --------------------------------------------------------------------------
   3. Responsive : ~1023px（1列にして左右交互に置く）
   3列のままだと写真が細くなり、キャプションの箱が収まらないため
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .p-top-interview {
    --interview-num-fz: clamp(64px, 17vw, 120px);   /* 写真幅に対する番号の比率をPCに近づける */
  }

  .p-top-interview__list {
    grid-template-columns: 1fr;
    row-gap: clamp(64px, 11vw, 96px);
    padding-left: calc(var(--gutter) + var(--interview-cap-fz) * 1.42);   /* キャプションのはみ出し分 */
    padding-right: var(--gutter);
  }

  .p-top-interview__item:nth-child(n) {
    width: min(78%, 440px);
    margin-top: 0;
  }

  .p-top-interview__item:nth-child(even) { justify-self: end; }

  .p-top-interview__item:first-child { margin-top: calc(var(--interview-num-fz) * .595); }  /* 番号のはみ出し分 */
}


/* ==========================================================================
   CONTACT CTA（挑戦が、未来を創る。RIZE ON）
   de_1-07.jpg を 1920px 換算で実測（セクション高さ 966px）
   えんじ色の帯は背景写真の仮置き。帯は画面の左右端いっぱいに広げる
   ========================================================================== */

.p-top-cta {
  padding-top: var(--cta-pt);
  padding-bottom: var(--cta-pb);

  /* --- CTA固有トークン（括弧内は1920px時の設計値） --- */
  --cta-pt:       clamp(40px, 3.974vw, 76.3px);    /* 76.3px  帯の上の余白 */
  --cta-pb:       clamp(40px, 3.990vw, 76.6px);    /* 76.6px  帯の下の余白 */
  --cta-panel-h:  clamp(480px, 42.35vw, 813.1px);  /* 813.1px 帯の高さ */
  --cta-panel-pb: clamp(12px, 1.036vw, 19.9px);    /* 19.9px  帯の下端と本文の間 */
  --cta-lead-fz:  clamp(20px, 2.667vw, 51.2px);    /* 51.2px  「挑戦が、未来を創る。」字送り48.1px */
  --cta-word-fz:  clamp(64px, 9.531vw, 183px);     /* 183px   「RIZE ON」大文字の高さ131.3px */
  --cta-foot-mt:  clamp(28px, 2.849vw, 54.7px);    /* 54.7px  RIZE ON と本文の間 */
}

/* --------------------------------------------------------------------------
   1. 帯（背景写真の上に文字を左下寄せで置く）
   -------------------------------------------------------------------------- */
.p-top-cta__panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: var(--cta-panel-h);
  padding: 0 var(--gutter-r) var(--cta-panel-pb) var(--gutter);
}

.p-top-cta__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--c-placeholder);
}

.p-top-cta__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;           /* 横長の帯で切り取っても人物のヘルメットが切れないよう上端を基準にする */
}

/* 明るい写真の上の白い文字とボタンを読みやすくするため、文字のある下側を暗くする */
.p-top-cta__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .15) 80%, rgba(0, 0, 0, .1) 100%);
  pointer-events: none;
}

.p-top-cta__inner {
  position: relative;
  width: 100%;
}

/* --------------------------------------------------------------------------
   2. 見出し（リード＋RIZE ON）
   -------------------------------------------------------------------------- */
.p-top-cta__title { font-weight: 700; }

.p-top-cta__lead {
  display: block;
  margin-left: .24em;                /* 字面の左端を RIZE ON の R に揃える */
  font-size: var(--cta-lead-fz);
  line-height: 1;
  letter-spacing: var(--ls-catch);
}

.p-top-cta__word {
  display: block;
  margin-top: -.036em;               /* リードの字面下端から大文字の上端まで33.4px */
  font-size: var(--cta-word-fz);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .0175em;           /* デザインの文字幅 686px に合わせる */
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   3. 本文・ボタン（ボタンの上端を本文1行目の文字の上端に揃える）
   -------------------------------------------------------------------------- */
.p-top-cta__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: var(--cta-foot-mt);
}

.p-top-cta__body {
  font-size: var(--fz-body);
  font-weight: 700;
  line-height: 2;                    /* 行送り 44px / 22px */
  white-space: nowrap;
}

.p-top-cta__more {
  flex: 0 0 40.48%;                  /* 702.2px（RECRUITのボタンと同じ） */
  margin-top: calc(var(--fz-body) * .5);   /* 本文の行間の半分＝1行目の文字の上端 */
}

/* --------------------------------------------------------------------------
   4. Responsive : ~1023px（本文の下にボタンを置く）
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .p-top-cta {
    --cta-panel-h: clamp(440px, 72vw, 720px);
    --cta-lead-fz: clamp(20px, 4vw, 36px);
    --cta-word-fz: clamp(64px, 18vw, 160px);   /* 画面幅に対する存在感をPCに近づける */
  }

  .p-top-cta__panel { padding-right: var(--gutter); }

  .p-top-cta__foot {
    flex-direction: column;
    gap: clamp(24px, 4vw, 32px);
  }

  .p-top-cta__more {
    flex: none;
    width: min(100%, 520px);
    margin-top: 0;
  }
}

/* --------------------------------------------------------------------------
   5. Responsive : ~767px
   写真の上は見出しだけにし、本文とボタンは写真の下に出す（RECRUITと同じ考え方）
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .p-top-cta {
    --cta-visual-h: max(260px, 72vw);
  }

  .p-top-cta__panel {
    display: block;
    min-height: 0;
    padding-bottom: 0;
  }

  .p-top-cta__bg {
    inset: 0 0 auto;
    height: var(--cta-visual-h);
  }

  .p-top-cta__title {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: var(--cta-visual-h);
    padding-bottom: 20px;
  }

  .p-top-cta__foot { margin-top: 28px; }

  .p-top-cta__body {
    line-height: 1.9;
    white-space: normal;
  }

  .p-top-cta__more { width: 100%; }
}
