/* ==========================================================
   TOP（index.php）
   ========================================================== */

/* ---------- メインビジュアル ---------- */
.ssg-mv { position: relative; padding: 20px 20px 0; background: linear-gradient(to bottom, #FDFDFA, #E9F1F5); } /* MV下の青はフッター上のCTAと同じ #E9F1F5（作業者指示。デザインは #F1F6F9） */
.ssg-mv__frame {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  height: clamp(440px, 58vw, 660px);
  border-radius: 40px;
  overflow: hidden;
  background: var(--ssg-pale);
}
/* CMSスライダー（cms_id=11。中身は Swiper のフェード）
   出力：#cms-slider-1-1-area > .slider_wrapper > .main_slider__outer > .main_slider > .swiper-wrapper > .swiper-slide > .main_slider__inner > img
   ・高さ：CMS は高さ自動なので、すべて外枠（.ssg-mv__frame）の100%にそろえる
   ・動き：表示中の写真を1.05倍までゆっくり寄せる（CMS の設定は1.1倍からなので、ソース側で抑える）
   ・ページャー：右下に縦並び。表示中は緑の長い楕円、ほかは白い丸（claude-design-output どおり） */
#slideshow, #cms-slider-1-1-area { position: absolute; inset: 0; }
/* CMS の CSS（#slider_xxx …）より強く効くよう、id を2つ重ねて指定する */
#slideshow #cms-slider-1-1-area .slider_wrapper { --swiper-wrapper-height: 100%; position: absolute; inset: 0; height: 100%; margin: 0; }
#slideshow #cms-slider-1-1-area .main_slider__outer, #slideshow #cms-slider-1-1-area .main_slider, #slideshow #cms-slider-1-1-area .swiper-wrapper, #slideshow #cms-slider-1-1-area .swiper-slide, #slideshow #cms-slider-1-1-area .main_slider__inner { height: 100%; }
#slideshow #cms-slider-1-1-area .main_catch__outer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#slideshow #cms-slider-1-1-area .main_slider__inner { overflow: hidden; }
#slideshow #cms-slider-1-1-area img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* ズームは CMS が .main_slider__inner に JS（Web Animations）でかける（設定は1.1倍から）。1.05倍への抑えは js/top.js */
#slideshow #cms-slider-1-1-area .swiper-pagination {
  position: absolute;
  top: auto;
  left: auto;
  right: clamp(20px, 2.2vw, 32px);
  bottom: clamp(32px, 3.6vw, 52px);
  z-index: 3;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: none;
}
#slideshow #cms-slider-1-1-area .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  margin: 0;
  border-radius: 999px;
  background: #fff;
  opacity: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  transition: all .4s ease;
}
#slideshow #cms-slider-1-1-area .swiper-pagination-bullet-active { height: 36px; background: var(--ssg-green); }
@media (max-width: 767px) {
  #slideshow #cms-slider-1-1-area .swiper-pagination { right: 10px; bottom: 12px; gap: 7px; }
  #slideshow #cms-slider-1-1-area .swiper-pagination-bullet { width: 8px; height: 8px; }
  #slideshow #cms-slider-1-1-area .swiper-pagination-bullet-active { height: 24px; }
}

.ssg-mv__row {
  position: relative;
  z-index: 2;
  max-width: 1360px;
  margin: -140px auto 0;
  padding: 0 clamp(0px, 4vw, 60px);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
}
.ssg-mv__catch {
  position: relative;
  max-width: 620px;
  background: #fff;
  border-radius: 32px;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3.4vw, 48px);
  box-shadow: var(--ssg-shadow);
}
.ssg-mv__leaf1 { position: absolute; top: -22px; left: 34px; width: 44px; height: 44px; background: var(--ssg-green); border-radius: 0 100% 0 100%; transform: rotate(-12deg); }
.ssg-mv__leaf2 { position: absolute; top: -10px; left: 80px; width: 26px; height: 26px; background: var(--ssg-yellow); border-radius: 100% 0 100% 0; }
.ssg-mv__en { margin: 0 0 6px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; line-height: 1.9; letter-spacing: .18em; color: var(--ssg-green); }
.ssg-mv__ttl { margin: 0; font-family: "Mochiy Pop One", sans-serif; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.55; color: var(--ssg-dark); text-wrap: pretty; }
.ssg-mv__em { color: var(--ssg-deep); }
/* キャッチの文字だけふわっと出す（白い枠はそのまま）。ローダーが消えたら、大きい文字 → 英字の順 */
.is-loading .ssg-mv__ttl, .is-loading .ssg-mv__en { opacity: 0; }
.is-loaded .ssg-mv__ttl { animation: ssgCatchIn 1s ease-out .2s both; }
.is-loaded .ssg-mv__en { animation: ssgCatchIn 1s ease-out .8s both; }
@keyframes ssgCatchIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .is-loaded .ssg-mv__ttl, .is-loaded .ssg-mv__en { animation: none; } }
/* 採用への誘導ボタン（MVの右下） */
.ssg-mv__rec {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ssg-deep);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 28px 12px 12px;
  box-shadow: 0 6px 0 var(--ssg-darker);
  margin-bottom: 6px; /* 下の影（6px）の分を上げて、影の下端をキャッチの箱の下端にそろえる */
}
.ssg-mv__rec:hover { color: #fff; transform: translateY(4px); box-shadow: 0 2px 0 var(--ssg-darker); }
.ssg-mv__rec:active { transform: translateY(6px); box-shadow: 0 0 0 var(--ssg-darker); }
.ssg-mv__rec-ico { width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--ssg-deep); display: flex; align-items: center; justify-content: center; }
.ssg-mv__rec-ico .ssg-ms { font-size: 34px; }
.ssg-mv__rec-body { display: flex; flex-direction: column; line-height: 1.4; }
.ssg-mv__rec-ttl { font-family: "Mochiy Pop One", sans-serif; font-size: 18px; }
.ssg-mv__rec-sub { font-size: 15px; }

@media (max-width: 767px) {
  .ssg-mv { z-index: 2; padding: 16px 16px 0; }
  .ssg-mv__frame {
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 6px 24px rgba(84, 74, 59, .16);
  }
  .ssg-mv__row { display: block; margin: 0; padding: 0; }
  /* 写真と文字で1枚のカードに見せる（影は写真側に落とさない） */
  .ssg-mv__catch { max-width: none; border-radius: 0 0 28px 28px; padding: 22px 22px 26px; box-shadow: none; }
  .ssg-mv__catch::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 6px 24px rgba(84, 74, 59, .16);
    clip-path: inset(0 -40px -40px -40px);
  }
  .ssg-mv__leaf1 { top: -18px; left: 22px; width: 36px; height: 36px; }
  .ssg-mv__leaf2 { top: -8px; left: 60px; width: 22px; height: 22px; }
  .ssg-mv__en { margin: 0 0 4px; font-size: 14px; letter-spacing: .16em; text-align: center; }
  .ssg-mv__ttl { font-size: clamp(20px, 5.6vw, 26px); line-height: 1.6; text-align: center; }
  .ssg-mv__rec { margin-top: 20px; margin-bottom: 0; gap: 12px; padding: 10px 20px 10px 10px; } /* PCの影そろえ用の下余白はスマホでは外す（MVと理念の帯の間にすき間ができるため） */
  .ssg-mv__rec-ico { width: 52px; height: 52px; }
  .ssg-mv__rec-ico .ssg-ms { font-size: 30px; }
  .ssg-mv__rec-ttl { font-size: 16px; }
  .ssg-mv__rec-sub { font-size: 14px; }
}

/* ---------- 理念の一文 ---------- */
.ssg-phil { position: relative; overflow: hidden; background: #E9F1F5; padding: 96px 20px 24px; text-align: center; }
.ssg-phil__cloud {
  position: absolute;
  left: 0;
  right: 0;
  top: 40px; /* 作業者指示で少し下げた（デザインは10px） */
  height: 150px;
  z-index: 0;
  background: url(https://ros-cdn.s3.ap-northeast-1.amazonaws.com/hp/img/ros_keiyaku/28828/cloud.png) repeat-x 0 0 / auto 100%;
  animation: ssgCloud 60s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .ssg-phil__cloud { animation: none; } }
.ssg-phil__txt {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  font-family: "Mochiy Pop One", sans-serif;
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.9;
  color: var(--ssg-txt);
  word-break: auto-phrase;
  text-wrap: pretty;
}
.ssg-phil__em { color: var(--ssg-deep); }
.ssg-phil__inl { display: inline-block; }
@media (max-width: 896px) {
  .ssg-phil { padding-top: 56px; }
  .ssg-phil__cloud { top: 20px; height: 84px; }
}
@media (max-width: 767px) {
  .ssg-phil__cloud { top: 32px; }
  .ssg-phil__txt { font-size: 21px; line-height: 1.8; }
  .ssg-phil__inl { display: inline; }
}

/* ---------- ごあいさつ ---------- */
.ssg-greet { position: relative; overflow: hidden; background: #E9F1F5; padding: 24px 20px 170px; }
.ssg-greet::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: url(https://ros-cdn.s3.ap-northeast-1.amazonaws.com/hp/img/ros_keiyaku/28828/shiba.png) repeat-x center bottom / auto 100%;
  pointer-events: none;
}
.ssg-greet__tree { position: absolute; left: 0; bottom: 40px; width: clamp(220px, 19vw, 340px); height: auto; z-index: 0; pointer-events: none; user-select: none; }
.ssg-greet__inner {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 56px;
  align-items: center;
}
.ssg-greet__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ssg-greet__photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 28px; display: block; }
.ssg-greet__photos img:nth-child(1) { border-radius: 28px 28px 28px 4px; }
.ssg-greet__photos img:nth-child(2) { transform: translateY(28px); }
.ssg-greet__photos img:nth-child(4) { border-radius: 28px 4px 28px 28px; transform: translateY(28px); }
.ssg-greet__body p { margin: 0 0 18px; }
.ssg-greet__body p:last-child { margin-bottom: 0; }
.ssg-greet__body .ssg-head__en { margin: 0; }
@media (max-width: 1279px) {
  .ssg-greet { padding-bottom: 150px; }
  .ssg-greet__tree { width: 26%; bottom: 30px; }
}
@media (max-width: 896px) {
  .ssg-greet::after { height: 40px; }
}
@media (max-width: 767px) {
  .ssg-greet { padding-bottom: 180px; }
  .ssg-greet__tree { width: 22%; bottom: 16px; }
}

/* ---------- お知らせ ---------- */
.ssg-news { background: #459E3E; padding: 64px 20px 40px; margin-top: -1px; }
.ssg-news__grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px clamp(40px, 5.5vw, 80px);
}
.ssg-news__head { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; align-self: center; gap: 28px; text-align: left; /* 見出しとイラストの間は作業者指示で広げた（デザインは16px）*/ /* 作業者指示でPCも左合わせ（デザインは中央） */ }
.ssg-news__en { margin: 0; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 18px; letter-spacing: .16em; line-height: 1.4; color: var(--ssg-yellow); }
.ssg-news__ttl { margin: 4px 0 0; font-family: "Mochiy Pop One", sans-serif; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.4; color: #fff; }
.ssg-news__car { display: block; width: 150px; height: auto; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.ssg-news__box {
  position: relative;
  min-width: 0;
  background: #fff;
  border-radius: 28px;
  padding: clamp(16px, 2.4vw, 28px) clamp(14px, 1.8vw, 22px) clamp(16px, 2.4vw, 28px) clamp(24px, 3.4vw, 44px);
}
.ssg-news__tail {
  position: absolute;
  left: -22px;
  top: 66%; /* 作業者指示で少し下げて、車のイラストの方へ（デザインは50%） */
  width: 0;
  height: 0;
  margin-top: -14px;
  border-style: solid;
  border-width: 14px 24px 14px 0;
  border-color: transparent #fff transparent transparent;
  pointer-events: none;
}
.ssg-news__list {
  margin: 0;
  padding: 0 20px 0 0;
  max-height: 200px; /* 作業者指示で小さく（デザインは280px） */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9CCB6E var(--ssg-pale);
}
.ssg-news__list::-webkit-scrollbar { width: 6px; }
.ssg-news__list::-webkit-scrollbar-track { background: var(--ssg-pale); border-radius: 3px; }
.ssg-news__list::-webkit-scrollbar-thumb { background: #9CCB6E; border-radius: 3px; }
@media (max-width: 767px) {
  .ssg-news__grid { grid-template-columns: minmax(0, 1fr); }
  .ssg-news__head { flex-direction: row; gap: 20px; text-align: left; order: 2; margin-top: 16px; }
  .ssg-news__tail {
    left: 62%;
    top: auto;
    bottom: -20px;
    margin: 0 0 0 -14px;
    border-width: 22px 14px 0 14px;
    border-color: #fff transparent transparent transparent;
  }
}

/* 緑から下のカードへつなぐ波 */
.ssg-news__wave {
  display: block;
  width: 100%;
  height: clamp(90px, 12.5vw, 240px);
  transform: rotate(180deg);
  margin-top: -2px;
  background: linear-gradient(#FDFDFA calc(100% - 4px), #459E3E 0);
}
.ssg-news__wave path { fill: #459E3E; }

/* ---------- 各ページへのご案内 ---------- */
.ssg-links {
  position: relative;
  z-index: 1;
  background: linear-gradient(transparent clamp(60px, 8.5vw, 165px), #FDFDFA 0);
  padding: 0 20px 104px;
  margin-top: calc(-1 * clamp(60px, 8.5vw, 165px));
}
.ssg-links__grid { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.ssg-lcard { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ssg-txt); }
.ssg-lcard:hover { color: var(--ssg-txt); transform: translateY(-4px); }
.ssg-lcard__img { width: 100%; aspect-ratio: 18 / 13; border-radius: 20px; object-fit: cover; display: block; flex-shrink: 0; }
.ssg-lcard__body {
  position: absolute;
  left: 0;
  bottom: 0;
  width: auto; /* 作業者指示で小さく（デザインは56%・上18px）。最低50%、文字が長い幅では文字に合わせて広がる */
  min-width: 50%;
  padding: 16px 20px 6px; /* 箱の大きさはそのまま、文字を下げて上に余白を取る */
  background: var(--ssg-bg);
  border-radius: 0 16px 0 0; /* 左下は直角にして写真の角を覆う（同じ丸みで重ねると、ふちに写真がにじんで見えるため） */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ssg-lcard__en { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; letter-spacing: .12em; color: var(--ssg-green); line-height: 1.5; } /* 英語と日本語を近づける */
.ssg-lcard__ja { display: block; font-family: "Mochiy Pop One", sans-serif; font-size: 22px; line-height: 1.5; white-space: nowrap; color: var(--ssg-dark); }
.ssg-lcard__arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ssg-yellow);
  color: var(--ssg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ssg-lcard__arrow .ssg-ms { font-size: 26px; }
@media (max-width: 767px) {
  .ssg-lcard { flex-direction: row; border-radius: 24px; box-shadow: var(--ssg-shadow); }
  .ssg-lcard__img { width: 50%; aspect-ratio: 4 / 3; border-radius: 24px 0 0 24px; } /* 作業者指示で横長に（デザインは1:1） */
  .ssg-lcard__body { position: static; flex: 1; width: auto; min-width: 0; padding: 14px 16px 62px; background: #fff; border-radius: 0 24px 24px 0; }
  .ssg-lcard__arrow { right: 16px; bottom: 16px; width: 38px; height: 38px; }
  .ssg-lcard__arrow .ssg-ms { font-size: 21px; }
}

/* ---------- 採用情報 ---------- */
.ssg-trec { position: relative; overflow: hidden; background: var(--ssg-deep); padding: 96px 20px; }
.ssg-trec__leaf1 { position: absolute; left: -50px; top: -80px; width: 180px; height: 180px; background: var(--ssg-green); border-radius: 0 100% 0 100%; opacity: .5; }
.ssg-trec__leaf2 { position: absolute; right: 6%; top: 56px; width: 40px; height: 40px; background: var(--ssg-yellow); border-radius: 100% 0 100% 0; }
.ssg-trec__inner { position: relative; max-width: 1140px; margin: 0 auto; }
.ssg-trec__head { text-align: center; color: #fff; margin-bottom: 44px; }
.ssg-trec__en { margin: 0; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 20px; line-height: 1.9; letter-spacing: .16em; color: var(--ssg-yellow); }
.ssg-trec__ttl { margin: 8px 0 0; font-family: "Mochiy Pop One", sans-serif; font-size: clamp(28px, 4vw, 44px); line-height: 1.45; }
.ssg-trec__card { display: grid; grid-template-columns: 1fr; background: #fff; border-radius: 40px; overflow: hidden; }
.ssg-trec__photo { position: relative; min-height: clamp(240px, 40vw, 380px); }
.ssg-trec__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ssg-trec__body { padding: clamp(28px, 4vw, 52px); }
.ssg-trec__txt { margin: 0 0 24px; }
.ssg-trec__feats { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ssg-trec__feats li { background: var(--ssg-pale); border-radius: 18px; padding: 14px 18px; display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ssg-darker); line-height: 1.5; }
.ssg-trec__feats img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; display: block; }
@media (min-width: 1100px) {
  .ssg-trec__card { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
}
