/* =========================================================
   J4C トップページ専用スタイル
   ========================================================= */

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  z-index: 2;
  min-height: 500px;
  background: #fff;
}
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1440px;
  margin: 0 auto;
  padding: 72px 0 70px 8.8%;
}
.hero-copy { max-width: 700px; }

.hero-title {
  font-family: "M PLUS 1p", var(--f-base);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.01em;
  font-feature-settings: "palt" 1;
}
/* 1行目「J4Cで、」 */
.hero-title-1 {
  display: block;
  white-space: nowrap;
  font-size: clamp(48px, 5.4vw, 80px);
  color: var(--c-black);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .12));
}
/* 「J4C」だけ丸みのある英字フォント */
.hero-en {
  font-family: var(--f-en);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-right: .02em;
}
/* 2行目「もっと、いい毎日を。」：オレンジ→山吹色→オレンジ→赤みのオレンジ */
.hero-title-2 {
  display: inline-block;
  white-space: nowrap;
  margin-top: 2px;
  font-size: clamp(34px, 3.85vw, 58px);
  letter-spacing: 0.01em;
  background: linear-gradient(90deg,
    #ff8a00 0%,
    #ff9600 22%,
    #ffaa00 38%,
    #ffa400 52%,
    #ff8000 64%,
    #ff6200 76%,
    #ff4a00 88%,
    #ff2a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .12));
}

.hero-sub {
  margin-top: 26px;
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.hero-text {
  margin-top: 18px;
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.14em;
  color: #555;
}
.hero-actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.hero-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.hero-link:hover { border-color: currentColor; }

/* 波形に切り抜いた写真 */
.hero-visual {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 0;
  width: 62%;
  height: calc(100% + 44px);
  filter: drop-shadow(-6px 0 26px rgba(255, 214, 0, .55));
  pointer-events: none;
}
.hero-blob {
  position: absolute;
  inset: 0;
  clip-path: url(#heroBlob);
  -webkit-clip-path: url(#heroBlob);
  background: #ffd84a;
}
.hero-blob img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
/* 左側の黄色いにじみ */
.hero-blob::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 45% at 4% 12%, rgba(255, 140, 0, .55), transparent 70%),
    linear-gradient(100deg, rgba(255, 228, 0, .85) 0%, rgba(255, 236, 40, .45) 10%, rgba(255, 240, 120, .1) 22%, transparent 32%),
    linear-gradient(0deg, rgba(255, 220, 60, .35), transparent 40%);
  mix-blend-mode: normal;
}
.hero-hand {
  position: absolute;
  top: 13%;
  right: 13%;
  font-family: var(--f-hand);
  font-size: clamp(18px, 1.9vw, 28px);
  line-height: 1.6;
  letter-spacing: 0.18em;
  color: #222;
  text-shadow: 0 0 4px #fff, 0 0 10px rgba(255, 255, 255, .95), 0 0 18px rgba(255, 255, 255, .85), 0 0 28px rgba(255, 255, 255, .6);
  transform: rotate(-9deg);
  transform-origin: left top;
  z-index: 2;
}
.hero-hand span { display: inline-block; padding-left: 2.2em; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* =========================================================
   ABOUT（スライダー）
   ========================================================= */
.about {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #fff;
  background: #6b6c6c;
}
.about-slides, .about-overlay { position: absolute; inset: 0; }
.about-slide {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(6px) saturate(.6);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s var(--ease), transform 6s linear;
}
.about-slide.is-active { opacity: 1; transform: scale(1); }
.about-overlay {
  background: linear-gradient(90deg, rgba(70, 70, 70, .78) 0%, rgba(80, 80, 80, .62) 45%, rgba(90, 90, 90, .42) 100%);
}

.about-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 96px 8% 60px 15.5%;
  min-height: 480px;
}
.about-en {
  position: relative;
  font-family: var(--f-en);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.about-line {
  position: absolute;
  right: calc(100% + 24px);
  top: 50%;
  width: 6.5vw;
  max-width: 96px;
  height: 1px;
  background: rgba(255, 255, 255, .8);
}
.about-title {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.22em;
}
.about-text {
  margin-top: 22px;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.07em;
  color: #fff;
}
.about-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

.about-hands {
  position: absolute;
  top: 34%;
  right: 10%;
  width: 34%;
  height: 160px;
}
.about-hand {
  position: absolute;
  inset: 0;
  font-family: var(--f-hand);
  font-size: clamp(24px, 2.7vw, 40px);
  line-height: 1.55;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transform: rotate(-8deg);
  opacity: 0;
  transition: opacity 1s var(--ease);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.about-hand.is-active { opacity: 1; }
.about-hand span { display: inline-block; padding-left: 3.2em; }

.about-controls {
  position: absolute;
  right: 10%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.about-count { font-family: var(--f-en); font-size: 12px; letter-spacing: 0.08em; }
.about-prev, .about-next {
  position: relative;
  width: 28px; height: 28px;
}
.about-prev::before, .about-next::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  border-top: 1.8px solid #fff;
  border-right: 1.8px solid #fff;
}
.about-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.about-next::before { transform: translate(-70%, -50%) rotate(45deg); }

/* =========================================================
   SERVICES
   ========================================================= */
.services {
  background: var(--c-bg-soft);
  padding: 46px 0 64px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head .btn-pill { align-self: flex-start; margin-top: 12px; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-m);
  overflow: hidden;
  isolation: isolate;
  background: #e9ece9;
  box-shadow: 0 4px 18px rgba(40, 40, 40, .08);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(40, 40, 40, .12); }

/* 写真はカード全体に敷き、上部の高さは ::before で確保する */
.service-card::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 10;
}
.service-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .6s var(--ease);
}
.service-card:hover .service-photo img { transform: scale(1.04); }

.service-body {
  container-type: inline-size;   /* 説明文の文字の大きさをカードの幅に合わせるため */
  position: relative;
  flex: 1;
  padding: 0 20px 52px;
  /* すりガラス風：白を半透明にして、うしろの写真をぼかして透かす */
  background: rgba(255, 255, 255, .72);
  border-top: 1px solid rgba(255, 255, 255, .6);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  /* 1段目：アイコン＋見出し／2段目：事業所名／3段目：説明文 */
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 14px;
  align-items: start;
}
.service-icon {
  grid-row: 1;
  width: 64px; height: 64px;
  margin-top: -32px;   /* 半分を写真に重ねる */
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  display: grid;
  place-items: center;
}
.service-icon svg { width: 36px; height: 36px; }
.service-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  line-height: 1.4;
  align-self: center;
  padding-top: 4px;
}
.service-office {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 16px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff1df;
  color: #d0650a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.service-text {
  grid-column: 1 / -1;
  margin-top: 10px;
  /* カードの幅に合わせて文字の大きさを調整（最大14px）し、必ず2行に収める */
  font-size: clamp(12px, 5.6cqi, 14px);
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: #333;
}
/* 1行ずつを途中で折り返さない（句点の前で切れないように） */
.service-text span { display: block; white-space: nowrap; }
.service-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: #fff;
}
.service-arrow::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 7px; height: 7px;
  border-top: 1.6px solid var(--c-text);
  border-right: 1.6px solid var(--c-text);
  transform: translate(-70%, -50%) rotate(45deg);
}

/* =========================================================
   NEWS
   ========================================================= */
.news { background: #fff; padding: 56px 0 48px; }
.news-inner {
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 40px;
}
.news-lead {
  margin: 10px 0 24px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--c-sub);
}
.news-head .btn-pill { padding-right: 34px; }

.news-list li { border-bottom: 1px solid var(--c-line); }
.news-item {
  display: grid;
  grid-template-columns: 96px 76px 1fr 20px;
  align-items: center;
  gap: 24px;
  padding: 15px 4px;
  font-size: 14px;
  transition: background-color .25s;
}
a.news-item:not([aria-disabled]):hover { background: #fafafa; }
a.news-item:not([aria-disabled]):hover .news-title { color: var(--c-orange); }
.news-item time {
  font-family: var(--f-en);
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: 0.04em;
}
.news-tag {
  display: inline-block;
  text-align: center;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 0;
  border-radius: 3px;
  letter-spacing: 0.08em;
}
.tag-info { background: #fdf0c4; color: #a8822a; }
.tag-event { background: #e2f1fb; color: #4a83ab; }
.tag-recruit { background: #fbd8d8; color: #c0474a; }
.tag-media { background: #e8e3fa; color: #7766bd; }
.tag-service { background: #e6f3d6; color: #4f8a1c; }
.news-title { letter-spacing: 0.06em; transition: color .25s; }
.news-arrow { width: 16px; height: 12px; color: var(--c-text); }

/* =========================================================
   採用情報 / お問い合わせ バナー
   ========================================================= */
.banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 4.5% 22px;
  background: #fff;
}
.banner {
  position: relative;
  display: block;
  min-width: 0;
  height: clamp(230px, 19vw, 280px);
  border-radius: 12px;
  background-size: cover;
  background-position: right center;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 18px rgba(40, 40, 40, .06);
}
/* 左側をほんのり明るくして手書き文字を読みやすくする */
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .1) 40%, transparent 60%);
}
.banner-hand {
  position: absolute;
  top: 22px;
  left: 8%;
  font-family: var(--f-hand);
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.55;
  letter-spacing: 0.14em;
  color: #222;
  text-shadow: 0 0 4px #fff, 0 0 10px rgba(255, 255, 255, .95), 0 0 18px rgba(255, 255, 255, .85), 0 0 28px rgba(255, 255, 255, .6);
  transform: rotate(-8deg);
  transform-origin: left top;
}
.banner-hand span { display: inline-block; padding-left: 2.2em; }
.banner-card {
  position: absolute;
  left: 4%;
  bottom: 16px;
  width: max-content;
  max-width: 54%;
  padding: 16px 62px 16px 22px;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease);
}
.banner:hover .banner-card { transform: translateY(-3px); }
.banner-title { font-size: 19px; font-weight: 700; letter-spacing: 0.12em; }
.banner-text { margin-top: 6px; font-size: 13px; line-height: 1.8; letter-spacing: 0.02em; color: var(--c-sub); white-space: nowrap; }
.banner-card .btn-round { position: absolute; right: 16px; bottom: 18px; width: 36px; height: 36px; }

/* =========================================================
   レスポンシブ
   ========================================================= */
@media (max-width: 1180px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

/* バナー：2枚並べると狭くなる幅では縦に並べる */
@media (max-width: 1100px) {
  .banners { grid-template-columns: 1fr; }
  .banner { height: 260px; }
}

@media (max-width: 960px) {
  /* HERO */
  .hero { min-height: 0; display: flex; flex-direction: column-reverse; }
  .hero-inner { padding: 28px 22px 48px; }
  .hero-visual {
    position: relative;
    top: 0;
    width: 100%;
    height: 72vw;
    max-height: 460px;
    margin-bottom: -20px;
  }
  .hero-hand { top: 7%; right: 5%; font-size: 15px; }
  .hero-title-1 { font-size: 13vw; }
  .hero-title-2 { font-size: 8.4vw; }
  .hero-text { letter-spacing: 0.08em; }
  .hero-text br { display: none; }
  .hero-actions { gap: 24px; }
  .btn-black { min-width: 0; }

  /* ABOUT */
  .about-inner { padding: 64px 22px 110px 22px; min-height: 0; }
  .about-line { display: none; }
  .about-text br { display: none; }
  .about-hands { position: relative; inset: auto; width: 100%; height: 110px; margin-top: 30px; }
  .about-controls { right: 22px; bottom: 26px; }
  .btn-white, .btn-ghost { min-width: 0; width: 100%; }

  /* SERVICES */
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-title { font-size: 26px; }

  /* NEWS */
  .news-inner { grid-template-columns: 1fr; gap: 28px; }
  .news-head { display: flex; flex-direction: column; align-items: flex-start; }
  .news-head .btn-pill { order: 9; margin-top: 4px; }
  .news-item { grid-template-columns: auto 1fr 16px; gap: 6px 14px; }
  .news-item time { grid-column: 1; }
  .news-tag { grid-column: 2; justify-self: start; padding: 2px 10px; }
  .news-title { grid-column: 1 / 3; grid-row: 2; }
  .news-arrow { grid-column: 3; grid-row: 1 / 3; }

  /* BANNERS */
  .banners { grid-template-columns: 1fr; padding: 4px 22px 22px; }
  .banner { height: 300px; background-position: 85% center; }
  .banner-card { left: 5%; max-width: 90%; }
}

@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
  .banner-hand { left: 7%; }
}
