@charset "UTF-8";

/* ============================================
   ホーム（index.html）専用スタイル
   - 共通パーツ（header / drawer / footer / btn-line / banner-full /
     BLOGカルーセル 等）は base.css を継承
============================================ */

/* ============================================
   Section Head (英文タイトル + 和文サブ)
============================================ */
.section-head {
  text-align: center;
}

.section-head__en {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: min(5.3rem, 2.76vw);
  letter-spacing: 0.3em;
  color: var(--color-white);
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.section-head__ja {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.2em;
  color: #b4b4b4;
  line-height: 1;
  margin-top: min(2vw, 40px);
}
.section-head--light .section-head__en {
  color: #000;
}

.section-head--light .section-head__ja {
  color: #b4b4b4;
}

/* ============================================
   Main Visual
============================================ */
.mv {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 1080px;
  overflow: hidden;
  background-color: #000;
}

.mv__slider {
  position: absolute;
  inset: 0;
}

.mv__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.mv__slide.is-active {
  opacity: 1;
}

.mv__slide picture,
.mv__slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.mv__slide img {
  object-fit: cover;
}

/* ----- Top overlay (Figma Rectangle 105 相当) -----
   スライド画像の上に常時重ねる装飾レイヤー */
.mv__top-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mv__top-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Center large logo ----- */
.mv__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(282px, 14.7vw);
  pointer-events: none;
  z-index: 2;
}

.mv__logo img {
  width: 100%;
  height: auto;
}

/* ----- Catch (縦書きキャッチコピー) -----
   CSSの writing-mode で縦書き表現 */
.mv__catch {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(2.4rem, 1.25vw);
  letter-spacing: min(26px, 1.5vw);
  color: var(--color-white);
  line-height: 1;
  z-index: 3;
}

.mv__catch--left {
  left: min(158px, 8.2vw);
}

.mv__catch--right {
  right:min(158px, 8.2vw);
}

/* ----- Slider dots ----- */
.mv__dots {
  position: absolute;
  bottom: min(70px, 3.7vw);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  z-index: 2;
}

.mv__dots button {
  display: block;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.mv__dots button.is-active {
  background-color: var(--color-white);
}

.mv__dots button:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ABOUT US
============================================ */
.about {
  position: relative;
  width: 100%;
  padding: min(4.6vw, 90px) 0 min(5.2vw, 100px);
  overflow: hidden;
}

.about__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.about__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
}

.about__inner {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.about__body {
  /* width: 52.44%;
  max-width: 1010px; */
  margin: min(3.5vw, 86px) auto 0;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.15em;
  line-height: 2.1;
  color: var(--color-white);
  text-align: center;
}

.about__body p + p {
  margin-top: 1.6em;
}

.about__btn {
  display: flex;
  justify-content: center;
  margin-top: min(3vw, 58px);
}

/* ============================================
   OUR SERVICES
============================================ */
.services {
  background-color: #f3f3f3;
  padding: min(4.16vw, 80px) 0 min(5.2vw, 100px);
}

.services__inner {
  width: min(84.97vw, 1574px);
  margin: 0 auto;
}

.services__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: min(1.4vw, 28px);
  margin-top: min(5.7vw, 110px);
}

.service-card a {
  display: block;
}

.service-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 362 / 272;
  overflow: hidden;
  background-color: #1a1a1a;
}

.service-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition-duration: .7s;
  transition-property: -webkit-transform;
  transition-property: transform;
  transition-property: transform, -webkit-transform;
  transition-timing-function: cubic-bezier(.19, 1, .22, 1);
}

.service-card a:hover .service-card__img img {
  transform: scale(1.05);
}

.service-card__title {
  margin: min(1.05vw, 20px) 0 min(0.6vw, 12px);
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.1em;
  color: #000;
  line-height: 1;
}

.service-card__tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #9ea0ad;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: min(1.5rem, 0.78vw);
  letter-spacing: 0.2em;
  color: #9ea0ad;
  text-transform: uppercase;
  line-height: 1;
}

/* ============================================
   WORKS
============================================ */
.works {
  background-color: var(--color-base);
  padding: min(4.68vw, 90px) 0 min(5.2vw, 100px);
  color: var(--color-white);
  overflow: hidden;
  --works-side: min(8.3vw, 160px);
  --works-gap: min(2.6vw, 50px);
  /* PC: 5枚弱が見えるように1枚の幅を算出（右端は見切れる） */
  --works-card-w: calc((100vw - var(--works-side) - var(--works-gap) * 4) / 4.5);
}

.works__inner {
  position: relative;
  max-width: 100%;
}

.works__carousel {
  position: relative;
  margin-top: min(5.7vw, 110px);
}

.works__list {
  display: flex;
  gap: var(--works-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--works-side); /* スナップ位置を左余白に合わせる */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  user-select: none; /* ドラッグ中のテキスト選択を抑制 */
}

.works__list::-webkit-scrollbar {
  display: none;
}

/* 先頭カードの左に余白を作る（padding-left だと scroll-snap と相性が悪いため） */
.works__list::before,
.works__list::after {
  content: "";
  flex: 0 0 var(--works-side);
}

.work-card {
  flex: 0 0 var(--works-card-w);
  scroll-snap-align: start;
}

/* マウスドラッグ中の挙動：アニメーション無効化＋カーソル変更 */
.works__list.is-dragging {
  scroll-behavior: auto;
  scroll-snap-type: none;
  cursor: grabbing;
}

.works__list {
  cursor: grab;
}

.works__list.is-dragging a {
  pointer-events: none; /* ドラッグ直後の意図しないクリック遷移を防止 */
}

.work-card a {
  display: block;
  color: var(--color-white);
}

.work-card__img {
  position: relative;
  width: 100%;
  aspect-ratio: 362 / 272;
  overflow: hidden;
  background-color: #1a1a1a;
}

.work-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition-duration: .7s;
  transition-property: -webkit-transform;
  transition-property: transform;
  transition-property: transform, -webkit-transform;
  transition-timing-function: cubic-bezier(.19, 1, .22, 1);
  -webkit-user-drag: none; /* 画像のドラッグゴーストを抑止 */
  user-select: none;
  pointer-events: none; /* クリックは親の<a>が受ける */
}

.work-card a:hover .work-card__img img {
  transform: scale(1.05);
}

.work-card__title {
  margin: min(1.05vw, 20px) 0 min(0.6vw, 12px);
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(1.8rem, 0.94vw);
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: var(--color-white);
  min-height: 2.8em;
}

.work-card__tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #9ea0ad;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: min(1.5rem, 0.78vw);
  letter-spacing: 0.2em;
  color: #9ea0ad;
  text-transform: uppercase;
  line-height: 1;
}

/* ----- Works arrows ----- */
.works__arrow {
  position: absolute;
  top: min(4.37vw, 84px);
  width: min(34px, 1.77vw);
  height: min(114px, 5.94vw);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.works__arrow:hover {
  opacity: 0.6;
}

.works__arrow img {
  width: 100%;
  height: 100%;
}

.works__arrow--prev {
  left: min(75px, 3.9vw);
  transform: scaleX(-1);
}

.works__arrow--next {
  right: min(78px, 4.05vw);
}

/* ----- Works bottom button area with progress bar ----- */
.works__btn {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: min(5.2vw, 100px);
  padding-top: min(5.2vw, 100px);
  --progress: 0;
  --progress-thumb: 18%;
}

/* プログレスバー本体（トラック）。ドラッグ操作可能 */
.works__bar {
  position: absolute;
  top: 0;
  left: var(--works-side, min(5.7vw, 109px));
  right: var(--works-side, min(5.7vw, 109px));
  height: 2px;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  touch-action: none; /* 縦スクロールに奪われず横ドラッグを拾う */
  user-select: none;  /* ドラッグ中のテキスト選択カーソルを抑止 */
}

/* 見た目は2pxのまま、掴みやすいよう当たり判定を上下に拡張 */
.works__bar::before {
  content: "";
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: 0;
  right: 0;
}

.works__bar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(100% * var(--progress-thumb));
  background-color: #fff;
  transform: translateX(calc((100% / var(--progress-thumb) - 100%) * var(--progress)));
  transition: transform 0.25s ease;
  pointer-events: none; /* 当たり判定はトラックに集約 */
}

/* バーのドラッグ中は追従を即時反映 */
.works__bar.is-dragging .works__bar-thumb {
  transition: none;
}

/* ============================================
   NEWS
============================================ */
.news {
  background-color: #f3f3f3;
  padding: min(6.3vw, 121px) 0 min(7vw, 135px);
}

.news__list {
  margin: min(4.7vw, 90px) auto 0;
  width: 64.06%;
}

.news-item a {
  position: relative;
  display: grid;
  /* Figma基準(内容1231px)：日付=左から72px(5.85%)、タイトル=304px(24.7%) */
  grid-template-columns: 5.85% 18.85% 1fr;
  align-items: center;
  padding: min(1.25vw, 24px) 0 0;
  color: #000;
}

/* 下線：左スラッシュ＋日付下の線＋中スラッシュ(news-slash.svg) ＋ タイトル下の実線(news-line.svg)。
   いずれも黒(#000)・1px。Figma書き出しSVGをそのまま使用 */
.news-item a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: min(16px, 0.84vw);
  background-image: url("../images/news-slash.svg"), url("../images/news-line.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: left bottom, right bottom;
  /* スラッシュ部=260/1231≒21.12%、線部=981/1231≒79.69% */
  background-size: 21.12% 100%, 79.69% 1px;
  pointer-events: none;
}

.news-item__date {
  grid-column: 2;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.2em;
  line-height: 1;
  align-self: flex-end;
  padding-bottom: 0.2em;
}

.news-item__title {
  grid-column: 3;
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.1em;
  line-height: 1.5;
  margin: 0;
}

.news__btn {
  display: flex;
  justify-content: center;
  margin-top: min(3vw, 60px);
}

/* ============================================
   STEN FLAME（自社商品事業バナー）
============================================ */
.stenflame {
  position: relative;
  width: 100%;
  height: min(600px, 31.3vw);
  overflow: hidden;
}

.stenflame__link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  color: var(--color-white);
}

.stenflame__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.stenflame__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Figmaの表示枠は写真の縦54〜93%（下寄り）。中央が合うよう約90%に */
  object-position: center 90%;
  transition-duration: .7s;
  transition-property: -webkit-transform;
  transition-property: transform;
  transition-property: transform, -webkit-transform;
  transition-timing-function: cubic-bezier(.19, 1, .22, 1);
}

.stenflame__link:hover .stenflame__bg img {
  transform: scale(1.04);
}

.stenflame__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.17);
  z-index: 1;
}

.stenflame__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
}

.stenflame__logo {
  margin: 0;
  width: clamp(180px, 16.4vw, 314px);
  line-height: 0;
}

.stenflame__logo img {
  width: 100%;
  height: auto;
}

.stenflame__caption {
  margin-top: min(1.6vw, 30px);
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
}

/* ============================================
   RECRUIT / MACHINERY バナー (横2分割)
============================================ */
.banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.banner {
  display: block;
  height: min(330px, 17.2vw);
  color: #000;
  transition: opacity 0.3s ease;
}

.banner:hover {
  opacity: 0.5;
}

.banner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
}

.banner--recruit {
  background-color: #ffffff;
}

.banner--machinery {
  background-color: #d9d7e3;
}

.banner__en {
  margin: 0;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: min(5.3rem, 2.76vw);
  letter-spacing: 0.3em;
  color: #000;
  line-height: 1;
}

.banner__ja {
  margin: min(1.6vw, 30px) 0 0;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: min(2rem, 1.04vw);
  letter-spacing: 0.2em;
  color: #b4b4b4;
  line-height: 1;
}

/* ============================================
   Responsive (SP: ~768px)
============================================ */
@media print, screen and (max-width: 768px) {
  .header {
    background-color: transparent;
  }

  /* ----- Section Head ----- */
  .section-head__en {
    font-size: 6.66vw; /* 25/375 */
    letter-spacing: 0.3em;
  }

  .section-head__ja {
    font-size: 3.7333vw; /* 14 */
    margin-top: 0.7em;
  }

  /* ----- Main Visual ----- */
  .mv {
    height: 100svh;
  }

  .mv__logo {
    width: 36.808vw; /* 138.03/375 */
    transform: translate(-50%, -50%);
  }

  .mv__catch {
    display: none;
  }

  .mv__dots {
    bottom: 8vw; /* 30 */
    gap: 4vw;
  }

  .mv__dots li {
    width: 1.86vw;
    height: 1.86vw;
  }

  /* ----- ABOUT ----- */
  .about {
    min-height: 0;
    padding: 16vw 0 18.6vw;
  }

  .about__inner {
    padding: 0 8vw; /* 30 */
  }

  .about__body {
    width: 100%;
    max-width: 100%;
    margin-top: 13.6vw;
    font-size: 4.26vw; /* 16 */
    line-height: 2.06;
    letter-spacing: 0;
    font-weight: 400;
    text-align: justify; /* 両端揃え */
    text-justify: inter-ideograph;/* 両端揃えの種類 */
  }

  .about__body p + p {
    margin-top: 1.4em;
  }

  .about__btn {
    margin-top: 13.33vw; /* 50 */
  }

  /* ----- OUR SERVICES ----- */
  .services {
    padding: 15.46vw 0 17.33vw;
  }

  .services__inner {
    width: 84.2vw;
    max-width: 84.2vw;
  }

  .services__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 9.3vw 4.08vw;
    margin-top: 12.5vw;
  }

  .service-card__title {
    font-size: 4.26vw; /* 16 */
    margin: 3.2vw 0 0;
    line-height: 1.25;
    letter-spacing: 0.2em;
  }

  .service-card__tag {
    font-size: 2.6667vw; /* 10 */
    padding: 0.53vw 1.6vw;
    letter-spacing: 0.1em;
  }

  /* ----- WORKS ----- */
  .works {
    padding: 16vw 0;
    --works-side: 14.33vw;
    --works-gap: 5.93vw;
    --works-card-w: 72vw; /* 270/375 */
  }

  .works__carousel {
    margin-top: 12.8vw ;
  }

  .work-card__title {
    font-size: 4.26vw; /* 16 */
    min-height: 0;
    margin: 4vw 0 0;
  }

  .work-card__tag {
    font-size: 2.6667vw; /* 10 */
    padding: 0.53vw 1.6vw;
    letter-spacing: 0.1em;
  }

  .works__arrow {
    top: 18.93vw;
    width: 4.53vw;
    height: 15.4vw;
  }

  .works__btn {
    margin-top: 8vw; /* 30 */
    padding-top: 13.3vw; /* 50 */
  }

  /* ----- NEWS ----- */
  .news {
    padding: 15.46vw 0 16.26vw;
  }

  .news__inner {
    padding: 0 var(--side-padding-sp);
  }

  .news__list {
    width: 100%;
    margin-top: 9.6vw;
  }

  .news-item + .news-item {
    margin-top: 4vw;
  }

  .news-item a {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 4vw;
    row-gap: 3.46vw;
    padding: 2.13vw 0 0;
  }

  /* SP：スラッシュは省き、全幅の黒い実線のみ */
  .news-item a::after {
    display: none;
  }

  .news-item__date {
    font-size: 3.73vw; /* 14 */
    grid-column: 1 / 3;
    padding-left: 1.85em;
    padding-bottom: 0.625em;
    background-image: url(../sp-images/home/news-line.svg);
    background-repeat:  no-repeat;
    background-position: left bottom;
    background-size: 100%;
  }

  .news-item__title {
    grid-column: 1 / -1;
    font-size: 4.26vw; /* 16*/
    line-height: 1.25;
  }

  .news__btn {
    margin-top: 10.66vw;
  }

  /* ----- STEN FLAME ----- */
  .stenflame {
    height: 76.53vw; /* 287 */
  }

  .stenflame__content {
    align-items: center;
  }
  .stenflame__logo {
    width: 45.36vw; /* 170.11 */
  }

  .stenflame__caption {
    font-size: 3.7vw; /* 14 */
    margin-top: 2.4vw; /* 9 */
  }

  /* ----- RECRUIT / MACHINERY ----- */
  .banner-row {
    grid-template-columns: 1fr;
  }

  .banner {
    height: 44vw; /* 165 */
  }

  .banner__en {
    font-size: 8vw; /* 30 */
    letter-spacing: 0.3em;
  }

  .banner__ja {
    font-size: 3.7vw; /* 14*/
    margin-top: 2.6vw;
  }
}
