@charset "UTF-8";
/* =========================================
   トップ：サービス紹介（.home-services）
   見出し・説明文は MESSAGE と同じクラス（.message-section__title / __lead）で文字サイズを共通化
   背景：左右の流線形（services-bg-left / right.webp）が画面に入ると左→右の順にスライド
========================================= */

.home-services {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
  padding: clamp(64px, 6vw, 110px) 0 clamp(72px, 7vw, 120px);
}

/* ---------- 背景の流線形 ---------- */
.home-services__bg {
  position: absolute;
  top: 0;
  z-index: -1;
  height: 100%;
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  opacity: .5; /* 背景の濃さ（1＝元画像のまま） */
}
.home-services__bg--left { left: 0; }
.home-services__bg--right { right: 0; }

/* ---------- 見出し・説明文 ---------- */
.home-services__inner {
  position: relative;
  max-width: 1240px; /* 中身の最大幅 1200px ＋ 左右の余白 */
  margin: 0 auto;
  padding: 0 20px;
}

.home-services__eyebrow {
  justify-content: flex-start;
  white-space: nowrap;
}

/* 1200px以上：MESSAGEと同じ位置（1200px幅の左から32%＝本文列の頭）に揃える */
@media screen and (min-width: 1200px) {
  /* 横幅：1920px画面で1600px（画面幅の83.33%）、1200px画面で1000pxまで同じ比率で縮む */
  .home-services__inner {
    max-width: min(1600px, 83.333vw);
    padding: 0;
  }
  .home-services .home-services__grid {
    max-width: none;
  }
  .home-services__eyebrow {
    margin-left: calc(50% - 216px); /* 画面上で MESSAGE の英字と同じ横位置（1200px幅の左から384px） */
  }
}

/* 見出しは2行固定。どの幅でも行の途中で改行させない。
   文字サイズはMESSAGEと同じ（.message-section__title）。狭い画面で入りきらない時だけ縮める */
.home-services .home-services__title .home-services__title-line {
  display: block;
  white-space: nowrap;
  color: var(--color-text-strong);
  font-size: min(1em, calc((100vw - 40px) / 16));
}

.home-services .home-services__title,
.home-services .home-services__lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.home-services__lead-line {
  display: block;
}

.home-services .home-services__lead {
  max-width: 900px;
  margin-bottom: clamp(48px, 5vw, 80px); /* 説明文とカードの間 */
}

/* ---------- カード ---------- */
.home-services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.home-services__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(var(--color-gold-rgb), 0.25);
  color: inherit;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.home-services__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(60, 42, 0, 0.14);
}
.home-services__card:focus-visible {
  outline: 3px solid rgba(var(--color-gold-rgb), 0.45);
  outline-offset: 3px;
}

.home-services__img {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f2f4f8;
}
.home-services__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.home-services__card:hover .home-services__img img {
  transform: scale(1.04);
}

.home-services__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 24px;
}

/* キャッチ（明朝・金の線の下） */
.home-services__catch {
  position: relative;
  margin: 16px 0 0;
  padding-top: 16px;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--color-text-strong);
}
.home-services__catch::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 32px;
  height: 2px;
  background: var(--color-gold);
  transform: translateX(-50%);
}

/* 説明文：通常の太さ・行間広め */
.home-services__text {
  margin: 14px 0 0;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--color-base);
}

/* 対応できる例 */
.home-services__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.home-services__tags li {
  padding: 3px 10px;
  border: 1px solid rgba(var(--color-gold-rgb), 0.45);
  border-radius: 999px;
  background: rgba(var(--color-gold-rgb), 0.06);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: #5c4a1f;
}

/* 詳しく見る＋矢印（カード下端にそろえる） */
.home-services__more {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text-strong);
}
.home-services__arrow {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  color: var(--color-gold);
  font-size: 0.8125rem;
  transition: background-color .25s ease, color .25s ease;
}
.home-services__arrow i {
  transition: transform .25s ease;
}
.home-services__card:hover .home-services__arrow {
  background: var(--color-gold);
  color: #fff;
}
.home-services__card:hover .home-services__arrow i {
  transform: translateX(3px);
}

.home-services__name {
  margin: 0;
  color: var(--color-text-strong);
  font-size: clamp(1.25rem, 0.9rem + 0.45vw, 1.4rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
}

/* ---------- 表示アニメーション（JSが .js-services-anim → .is-inview を付与。開始時間はJSが --hs-d で指定） ----------
   背景（左上→右下／右上→左下のワイプ）と同時に SERVICES → 見出し：1文字ずつ
   → 説明文：1行ずつ左→右にワイプ → カード：1枚ずつズームイン（少しずつ重ねてテンポよく） */
.home-services__char { display: inline; } /* inlineのままにして日本語の禁則（句読点の改行位置）を保つ */
.home-services .home-services__title .home-services__char { color: inherit; } /* 赤字はラッパーのspanだけ */

.js-services-anim:not(.is-inview) :is(.home-services__bg, .home-services__eyebrow span, .home-services__char, .home-services__lead-line, .home-services__item) {
  opacity: 0;
}

.js-services-anim.is-inview .home-services__bg--left {
  animation: hs-wipe-tl .9s var(--hs-d, 0s) cubic-bezier(.45, 0, .25, 1) both;
}
.js-services-anim.is-inview .home-services__bg--right {
  animation: hs-wipe-tr .9s var(--hs-d, 0s) cubic-bezier(.45, 0, .25, 1) both;
}
/* SERVICES：MESSAGEと同じ動き（文字がフェードイン → 赤い横線が左から伸びる） */
.js-services-anim .home-services__eyebrow::after {
  transform: scaleX(0);
  transform-origin: left center;
}
.js-services-anim.is-inview .home-services__eyebrow span {
  animation: hs-fade .5s var(--hs-d, 0s) ease both;
}
.js-services-anim.is-inview .home-services__eyebrow::after {
  animation: hs-line .5s calc(var(--hs-d, 0s) + .1s) cubic-bezier(.25, .8, .25, 1) both;
}
.js-services-anim.is-inview .home-services__char {
  animation: hs-char .35s var(--hs-d, 0s) ease-out both;
}
.js-services-anim.is-inview .home-services__lead-line {
  animation: hs-wipe-x .6s var(--hs-d, 0s) ease-out both;
}
.js-services-anim.is-inview .home-services__item {
  animation: hs-zoom .6s var(--hs-d, 0s) cubic-bezier(.2, .9, .3, 1.1) both;
}

@keyframes hs-wipe-tl {
  from { clip-path: polygon(0 0, 0 0, 0 0); }
  to   { clip-path: polygon(0 0, 200% 0, 0 200%); }
}
@keyframes hs-wipe-tr {
  from { clip-path: polygon(100% 0, 100% 0, 100% 0); }
  to   { clip-path: polygon(100% 0, -100% 0, 100% 200%); }
}
@keyframes hs-wipe-x {
  from { opacity: 1; clip-path: inset(0 100% 0 0); }
  to   { opacity: 1; clip-path: inset(0 -1em 0 0); }
}
@keyframes hs-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hs-line {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes hs-char {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hs-zoom {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: none; }
}

/* ---------- レスポンシブ ---------- */
@media screen and (max-width: 1199px) {
  .home-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  /* 1199px以下：見出し・説明文は左揃え（MESSAGEと同じ） */
  .home-services .home-services__title,
  .home-services .home-services__lead {
    text-align: left;
    margin-left: 0;
  }
  .home-services__card { min-height: 0; }
  /* 文章と重なる幅では背景を控えめに */
  .home-services__bg { height: 75%; opacity: .45; }
  .home-services__bg--right { top: auto; bottom: 0; }
}

@media screen and (max-width: 700px) {
  .home-services__bg { height: 55%; opacity: .3; }
  .home-services__bg--right { top: auto; bottom: 0; }
  .home-services__grid { grid-template-columns: 1fr; gap: 16px; } /* 700px以下：カードは1枚ずつ縦に */
  .home-services__body { padding: 14px 8px 16px; }
  .home-services__name { font-size: 1.25rem; letter-spacing: .04em; }
}

/* OUR SERVICES：MESSAGEと同じスマホ指定（components.css の .message-section .section__eyebrow） */
@media screen and (max-width: 480px) and (min-width: 351px) {
  .home-services__inner { padding: 0 16px; } /* MESSAGEと同じ左右余白 */
  .home-services__eyebrow { gap: 12px; margin-bottom: 18px; }
  .home-services__eyebrow::after { width: 64px; }
}
@media screen and (max-width: 350px) {
  .home-services__inner { padding: 0 10px; }
  .home-services__eyebrow { gap: 10px; margin-bottom: 14px; }
  .home-services__eyebrow::after { width: 48px; }
  .home-services__eyebrow span { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .home-services__card,
  .home-services__img img { transition: none; }
  .home-services__card:hover,
  .home-services__card:hover .home-services__img img { transform: none; }
}
