/* ===============================
   共通レイアウト（home用）
   =============================== */

.home .l-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 見出し共通 */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 36px;
  letter-spacing: 0.1em;
}


/* ===============================
   FV（ヒーロー）
   =============================== */

.fv {
  background-image: url('../../images/home/fv-bg_pc.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  padding: 40px 0 60px;
  position: relative;
}

/* PCだけ height 固定 */
@media (min-width: 768px) {
  .fv {
    height: calc(100vh - 125px);
  }
}

/* FVの下に黒線（PC） */
.fv::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15px;
  background: #000;
}

.fv-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.fv-logo-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.fv-logo-img {
  width: min(800px, 86vw);
  height: auto;
}

/* h1化しても見た目はここで制御 */
.fv-company-name {
  font-size: 100px;
  margin: 8px 0 0;
  line-height: 1;
  color: #000;
  font-weight: 400;
  text-align: center;
  letter-spacing: 0.003em;
}

/* FV内のh1に不要な共通装飾が乗らないよう保険 */
.fv-company-name::before,
.fv-company-name::after {
  content: none;
}

@media (max-width: 767px) {
  .fv {
    background-image: url('../../images/home/fv-bg_sp.jpg');
    min-height: calc(100svh - 80px);
    padding: 80px 0 80px;
  }

  .fv::after {
    height: 12px;
  }

  .fv-company-name {
    font-size: 48px;
  }
}


/* ===============================
   FV アニメーション（TOPのみ想定）
   =============================== */

/* 初期状態（JSでis-anim-readyを付けるまで隠す） */
.fv .fv-logo-img,
.fv .fv-company-name {
  opacity: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity, filter;
}

/* ロゴ：左下→右上 + ふわっと */
.fv.is-anim-ready .fv-logo-img {
  animation: fvLogoIn 5000ms cubic-bezier(.22,1,.36,1) 0ms forwards;
}

/* 会社名：中央からふわっと */
.fv.is-anim-ready .fv-company-name {
  animation: fvTextIn 2800ms cubic-bezier(.22,1,.36,1) 1500ms forwards;
}

@keyframes fvLogoIn {
  0% {
    opacity: 0;
    transform: translate3d(-50px, 36px, 0) rotate(-2deg) scale(.985);
    filter: blur(3px);
  }
  70% {
    opacity: 1;
    transform: translate3d(6px, -4px, 0) rotate(.3deg) scale(1.01);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    filter: blur(0px);
  }
}

@keyframes fvLogoFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25%      { transform: translate3d(6px, -5px, 0); }
  50%      { transform: translate3d(0px, -2px, 0); }
  75%      { transform: translate3d(-6px, -5px, 0); }
}

@keyframes fvTextIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(.98);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fv.is-anim-ready .fv-logo-img,
  .fv.is-anim-ready .fv-company-name {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}


/* ===============================
   VISION セクション（基本：PC）
   =============================== */

.vision {
  background-image: url('../../images/home/vision-bg_pc.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 120px 0 140px;
  border-top: 0;
}

/* 中身を左右2カラムに並べる */
.vision-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 64px;
}

/* 左カラム */
.vision-header {
  flex: 1;
  max-width: 400px;
  text-align: center;
}

/* VISION見出し：h2だが共通h2装飾はここで打ち消す */
.vision-title {
  color: #000;
  font-size: 96px;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 24px;
  text-align: center;
  display: block;
  position: static;
  padding: 0;
  letter-spacing: 0.05em;
}

.vision-title::before,
.vision-title::after {
  content: none;
}

/* 「新しい自分の始まり」 */
.vision-header .heading-lines {
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  font-size: 40px;
  color: #000;
  line-height: 1.4;
}

/* 右カラム（本文） */
.vision-body {
  color: #000;
  flex: 1;
  font-size: 18px;
  line-height: 2;
  text-align: left;
  margin-top: 60px;
}


/* ===============================
   1025〜1199px：PC配置のまま見出し少し縮小
   =============================== */
@media (min-width: 1025px) and (max-width: 1199px) {

  .vision-inner {
    gap: 30px;
    padding: 0 24px;
    width: min(100%, 1025px);
    margin: 0 auto;
  }

  .vision-header {
    max-width: 260px;
  }

  .vision-title {
    font-size: clamp(50px, 5.0vw, 70px);
    line-height: 1.08;
  }

  .vision-header .heading-lines {
    font-size: clamp(20px, 2.0vw, 28px);
    line-height: 1.4;
  }

  .vision-body {
    margin-top: -10px;
    line-height: 1.9;
  }
}


/* ===============================
   〜1024px：縦並び（iPad Pro含む）
   =============================== */
@media (max-width: 1024px) {

  .vision {
    padding: 70px 0;
    background-image: url("../../images/home/vision-bg_sp.jpg");
  }

  .vision-inner {
    flex-direction: column;
    gap: 8px;
    padding: 0 32px;
    align-items: center;
  }

  .vision-header {
    width: 100%;
    max-width: none;
    text-align: center;
    margin-top: 0;
  }

  .vision-title {
    font-size: clamp(44px, 6vw, 56px);
    line-height: 1.1;
    margin-bottom: 12px;
  }

  .vision-header .heading-lines {
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.4;
  }

  .vision-body {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
  }
}


/* ===============================
   〜767px：SP
   =============================== */
@media (max-width: 767px) {

  .vision {
    padding: 60px 0;
    background-image: url("../../images/home/vision-bg_sp.jpg");
  }

  .vision-inner {
    flex-direction: column;
    gap: 32px;
    padding: 0 24px;
    align-items: center;
  }

  .vision-header {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .vision-title {
    font-size: 40px;
  }

  .vision-header .heading-lines {
    margin-left: auto;
    margin-right: auto;
    font-size: 24px;
  }

  .vision-body {
    width: 100%;
    margin: -50px auto 0;
    line-height: 1.7;
    font-size: 16px;
  }
}


/* ===============================
   1200〜1399px：1199境界の誤差対策
   =============================== */
@media (min-width: 1200px) and (max-width: 1399px) {
  .vision-inner {
    gap: 56px;
    padding: 0 24px;
  }

  .vision-body {
    font-size: 17.6px;
    line-height: 1.95;
  }
}


/* ===============================
   1025〜1060px：1024境界の誤差対策
   =============================== */
@media (min-width: 1025px) and (max-width: 1060px) {
  .vision-inner {
    gap: 26px;
  }

  .vision-body {
    font-size: 17.6px;
    line-height: 1.85;
  }
}


/* ===============================
   事業内容 セクション
   =============================== */
.service {
  width: 100%;
  padding: 70px 0 0px;
  background-image: url('../../images/home/business-bg-gray_pc.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 内側レイアウト */
.service-inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* 事業内容セクションだけ、幅を広げる用 */
.service-inner--wide {
  max-width: 1600px;   /* ノートＰＣ画面いっぱいの設計 */
  margin: 0 auto;      /* 中央寄せ */
}

.service .section-header {
  text-align: center;
  margin-bottom: 10px;
}

.service .section-header h2 {
  font-size: 40px;
}


/* ===============================
   カード グリッド
   =============================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* ===============================
   カード共通
   =============================== */
.service-card {
  width: 100%;
  height: 780px;              /* ← 760 + 20 */
  padding: 48px 48px 60px;    /* ← bottom 40 + 30 */
  text-align: center;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* カード本文を縦方向flexにして、下に余白を作れるようにする */
.service-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ボタンを一番下に押し下げる */
.service-card__btn {
  margin-top: auto;
}

/* 白背景カード */
.service-card--sales,
.service-card--ship {
  background-image: url('../../images/home/business-card-bg-white_pc.jpg');
}

/* グレー背景カード */
.service-card--career,
.service-card--produce {
  background-image: url('../../images/home/business-card-bg-gray_pc.jpg');
}


/* ===============================
   カード内の画像
   =============================== */
.service-card__image {
  margin-bottom: 32px;
}

.service-card__image img {
  width: 440px;
  height: 280px;
  border-radius: 20px;
  display: block;
  margin: 0 auto;
}


/* ===============================
   テキスト
   =============================== */
.service-card__title {
  font-size: 32px;
  margin-bottom: 16px;
}

.service-card__lead {
  font-size: 16px;
  margin: 4px auto;    /* ← auto で中央寄せ */
  line-height: 1.5;
  text-align: left;    /* ← 左揃え */
  max-width: 550px;    /* ← リストと同じ幅にする（必要に応じて調整） */
}

.service-card__list {
  list-style: none;
  padding-left: 0;
  font-size: 20px;
  text-align: left;     /* テキストは左揃え */
  line-height: 1.5;
  margin: 16px auto 32px; /* ブロックを中央揃え */
}

/* 営業代行カード用（左側） */
.service-card--sales .service-card__list {
  max-width: 410px;
}

/* キャリアサポート事業カード用（右側） */
.service-card--career .service-card__list {
  max-width: 530px;
}


/* ===============================
   1025〜1399px：2カラムのまま“崩れ始め”を吸収（自動縮小）
   =============================== */
@media (min-width: 1025px) and (max-width: 1399px) {

  /* カード内の左右paddingを少し可変にして実効幅を増やす */
  .service-card {
    height: 760px; /* 高さ統一は維持 */
    padding: 40px clamp(20px, 2.6vw, 48px) 70px; /* 下はボタン下余白増やした版に合わせるなら 70px */
  }

  /* 画像を少しだけ縮めて横幅を確保 */
  .service-card__image img {
    width: min(380px, 100%);
    height: auto;
  }

  /* タイトル：32→下限26まで、段階的に縮小 */
  .service-card__title {
    font-size: clamp(26px, 2.2vw, 32px);
  }

  /* リード：16→下限14まで */
  .service-card__lead {
    font-size: clamp(12px, 1.25vw, 16px);
    max-width: min(600px, 100%);
    line-height: 1.55;
  }

  /* 箇条書き：20→下限16まで（ここが崩れの主因になりがち） */
  .service-card__list {
    font-size: clamp(16px, 1.55vw, 20px);
    max-width: min(520px, 92%);
    margin: 16px auto 28px;
    line-height: 1.5;
  }

  /* “カード別の固定max-width”が狭い幅で悪さしやすいので、この帯域では無効化して統一 */
  .service-card--sales .service-card__list,
  .service-card--career .service-card__list {
    max-width: min(520px, 92%);
  }
}


/* ===============================
   タブレット（768〜1024）：縦並び + 高さ統一 + 隙間ゼロ
   =============================== */
@media (min-width: 768px) and (max-width: 1024px) {

  .service-grid{
    grid-template-columns: 1fr;
    gap: 0;                 /* ←カード間の余白を消す */
  }

  .service-card{
    height: 780px;          /* ← 760 + 20 */
    padding: 32px 28px 48px;/* ← bottom 28 + 20 */
  }

  .service-card__image img{
    width: min(520px, 100%);
    height: auto;
  }

  .service-card__title{
    font-size: 28px;
  }

  .service-card__lead{
    font-size: 16px;
    max-width: 620px;
  }

  .service-card__list{
    font-size: 18px;
    max-width: 620px;
    margin: 16px auto 28px;
  }

  /* 背景の白/グレー入れ替え（必要なら維持） */
  .service-card:nth-of-type(3) {
    background-image: url('../../images/home/business-card-bg-white_pc.jpg');
  }
  .service-card:nth-of-type(4) {
    background-image: url('../../images/home/business-card-bg-gray_pc.jpg');
  }
}

@media (max-width: 767px) {
  .service {
    padding: 60px 0 0;
    background-image: url('../../images/home/business-bg-gray_sp.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  .service .section-header h2 {
    font-size: 24px;
  }

  .service-grid {
    grid-template-columns: 1fr;
    gap: 0px;
  }

  .service-card {
    height: 650px;          /* ← 630 + 20 */
    padding: 24px 20px 44px;/* ← bottom 24 + 20 */
  }
  
  .service-card__title {
    font-size: 24px; /* SP */
  }
  
  .service-card__lead {
    font-size: 15px; /* SP */
  }
  
  .service-card__list {
    font-size: 14px; /* SP */
  }
  
  /* ===============================
     SPのみ、事業内容カードの背景切り替え
     =============================== */
  .service-card:nth-of-type(3) {
    background-image: url('../../images/home/business-card-bg-white_pc.jpg');
  }

  .service-card:nth-of-type(4) {
    background-image: url('../../images/home/business-card-bg-gray_pc.jpg');
  }
  
  .service-card__image img {
    width: 300px;
    height: 180px;
    border-radius: 20px;
    display: block;
    margin: 0 auto;
  }
  
    /* ③ プロデュース事業 → グレー */
  .service-card:nth-of-type(3) .btn--pill-sm {
    background-color: #D9D9D9;
    color: #000000;
  }

  /* ④ 船舶事業 → 白 */
  .service-card:nth-of-type(4) .btn--pill-sm {
    background-color: #FFFFFF;
    color: #000000;
  }
}


/* ===============================
   会社情報 セクション
   =============================== */

.company {
  background-image: url('../../images/home/company-bg_pc.jpg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  padding: 40px 0 70px;
}

.company-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.company-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 180px;          /* 左右の間隔。好みで調整 */
}

.company-title {
  font-size: 32px;
  margin-top: 60px;
  margin-bottom: 24px;
}

.company-text {
  font-size: 24px;
  line-height: 1.5;
  margin-bottom: 50px;
}

.company-btn-wrapper {
  text-align: center;
}

.company-btn-wrapper .btn--pill-sm {
  width: 270px;
  height: 50px;
}

/* ===============================
   会社情報：タブレット（768〜1024）
   =============================== */
@media (min-width: 768px) and (max-width: 1024px) {

  /* h2 だけ右へ（既存） */
  .section-header--company h2{
    transform: translateX(18px);
  }

  /* レイアウトの余裕確保 */
  .company-layout{
    gap: clamp(60px, 10vw, 100px); 
    /* 1024付近＝100px / 768付近＝60px */
  }

  /* ===== タイトル：32px → 26px ===== */
  .company-title{
    font-size: clamp(26px, 3vw, 32px);
    margin-top: clamp(32px, 6vw, 60px);
    margin-bottom: 20px;
  }

  /* ===== 本文：24px → 18px ===== */
  .company-text{
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1.5;
    margin-bottom: 40px;
    max-width: 520px;   /* ← 改行暴発防止の“保険” */
  }
}

@media (max-width: 767px) {

  .company {
    background-image: url('../../images/home/company-bg_sp.jpg');
    background-size: cover;
    background-position: center top;
    padding: 60px 0 60px; /* ← 60px → 縦を締める */
  }

  .company .section-header h2{
    font-size: 24px;
  }

  .company-layout {
    flex-direction: column;
    gap: 20px; /* ← 32px → 詰める */
  }

  .section-header--company {
    margin-bottom: 4px; /* ← 見出し下の余白を抑制 */
    text-align: center;
  }

  .company-body {
    text-align: center;
  }

  .company-title {
    font-size: 20px;
    margin-top: -10px;     /* ← 上を詰める */
    margin-bottom: 12px;
  }

  .company-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px; /* ← ボタンまでの余白を整理 */
  }

  .company-btn-wrapper {
    margin-top: 0; /* 念のため */
  }
}


/* ===============================
   求人情報 セクション
   =============================== */

.recruit{
  padding: 100px 0 20px;
}

.recruit-inner{
  max-width: 1280px;
  margin: 0 auto;
}

/* ===============================
   PC/タブレット：2カラム（テキスト / 画像）
   =============================== */
.recruit-layout{
  display: grid;
  align-items: center;
  justify-content: center;
  column-gap: 60px;
  grid-template-columns: 360px 440px;
  grid-template-areas: "text image";
}

.recruit-text{
  grid-area: text;
  text-align: center;
  margin-top: 10px;
  transform: translateY(-40px);
}

.recruit-text .section-header{
  font-size: 40px;
  margin-bottom: 12px; /* デフォルトより少し小さく */
}

.recruit-lead{
  font-size: 28px;
  margin-top: -10px;
  margin-bottom: 10px;
}

/* 画像：これ以上大きくしない */
.recruit-image{
  grid-area: image;
  width: 440px;        /* ★ gridの右カラムと揃える */
  max-width: 440px;
}

.recruit-image picture,
.recruit-image img{
  width: 100%;
  height: auto;
  display: block;
}

/* ボタン */
.recruit-btn{
  text-align: center;
  margin-top: -80px;
}

.recruit-btn .btn--pill-sm{
  width: 270px;
  height: 50px;
}

/* ===============================
   タブレット（768〜1024px）
   =============================== */
@media (min-width: 768px) and (max-width: 900px){

  .recruit-layout{
    column-gap: 24px;
    grid-template-columns:
      minmax(280px, 320px)
      minmax(300px, 360px);
  }
  
  .recruit-lead{
    font-size: 26px;
    margin-top: -20px;
}

  .recruit-image{
    max-width: 360px;
  }
}


/* ===============================
   SP（〜767px）：縦並び＆中央寄せ
   並び：見出し→リード → 画像 → ボタン
   =============================== */
@media (max-width: 767px){

  .recruit{
    padding: 100px 0 50px;
  }

  /* ★SPはgridで順番固定 */
  .recruit-layout{
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "image"
      "btn";
    row-gap: 10px;       /* ★ 14→10（余白を狭める） */
    column-gap: 0;
    text-align: center;
  }

  /* ★赤枠の主因になりやすい：section-header / h2 の余白をSPで明示的に潰す */
  .recruit .section-header{
    margin: 0;           /* ★ここ重要 */
  }
  .recruit .section-header h2{
    font-size: 24px;
    margin: 0;           /* テーマ側のh2余白を打ち消す */
  }

  .recruit-text{
    width: 100%;
    margin-top: 0;
  }

  .recruit-lead{
    font-size: 18px;
    margin-top: 15px;     /* ★ 12→6（余白を狭める） */
    margin-bottom: -20px;
  }

  .recruit-image{
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .recruit-btn{
    grid-area: btn;
    width: 100%;
    margin-top: 15px;     /* ★ ボタン前後の詰め */
  }
}


/* ===============================
   お問い合わせ セクション
   =============================== */

.contact {
  padding: 100px 0 120px;
}

.contact-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  font-size: 32px;
  margin-bottom: 10px;
}

.contact-btn {
  margin-top: -50px;
  text-align: center;
}

.contact-btn .btn--chevron {
  padding-left: 48px;
}

/* hover */
.contact-btn:hover {
  opacity: 0.9;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .contact {
    padding: 90px 0 90px;
  }

  .contact-btn {
    margin-top: -40px;
  }
}

@media (max-width: 767px) {
  .contact {
    padding: 40px 0 80px;
  }
  
  .contact .section-header h2{
    font-size: 24px;
  }
  
  .contact-btn .btn {
    font-size: 20px;
  }
}
