/* Top page only: shared header/footer/CTA/animations are defined in common.css. */

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--color-white);
}

.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 2732 / 1537;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.15s ease-in-out;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-slide picture { display: block; width: 100%; }
.hero-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: opacity .4s ease;
  }
}

.hero-recruit-banner {
  position: absolute;
  z-index: 5;
  right: 3.5%;
  bottom: 6.4%;
  width: clamp(270px, 29vw, 430px);
  box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
  transition: transform .2s ease;
}
.hero-recruit-banner:hover { transform: translateY(-2px); }

/* News ----------------------------------------------------------------- */
.news-section {
  padding: 96px 40px 104px;
  background: var(--color-white);
}

.news-section__inner {
  width: min(100%, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 100px;
  align-items: start;
}

.news-section__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 42px;
}

/* 共通 .section-link に対するトップページ固有のサイズ調整 ---------------- */
.section-link {
  width: 250px;
  padding: 0 10px 10px;
  gap: 16px;
  border-bottom: 1px solid var(--color-primary);
}

.section-link:hover i {
  transform: translateX(6px);
}

.news-section__more {
  margin-top: 0;
}

.news-list {
  border-top: 0;
}

.news-item {
  border-bottom: 1px solid #dcdcdc;
}

.news-item__row {
  min-height: 60px;
  padding: 12px 0;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  transition: opacity .2s ease;
}

.news-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-item__date {
  flex: 0 0 auto;
  font-size: .875rem;
  font-weight: 400;
  letter-spacing: .03em;
}

.news-item__category {
  min-width: 88px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  color: var(--color-primary);
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  transition: opacity .2s ease;
}

.news-item__category:hover,
.news-item__category:focus-visible {
  opacity: .68;
}

.news-item__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}

.news-item__title-link {
  transition: opacity .2s ease;
}

.news-item__title-link:hover,
.news-item__title-link:focus-visible {
  opacity: .68;
}

/* About Us ------------------------------------------------------------- */
.about-section {
  padding: 24px 40px 112px 0;
  background: var(--color-white);
  overflow: hidden;
}

.about-section__inner {
  width: 100%;
  max-width: calc((100vw - 1100px) / 2 + 1100px);
  margin-left: 0;
  margin-right: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(430px, .96fr);
  gap: 58px;
  align-items: center;
}

.about-section__visual {
  min-width: 0;
}

.about-section__visual img {
  width: 100%;
  height: auto;
  border-radius: 0 36px 36px 0;
}

.about-section__content {
  position: relative;
  min-height: 380px;
  padding: 24px 0 24px;
  display: flex;
  align-items: center;
}

.about-section__copy {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
}

.about-section__text {
  margin: 34px 0 30px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 2;
}

.about-section__desktop-break {
  display: inline;
}

.about-section__link {
  width: 220px;
}

.about-section__illust {
  position: absolute;
  right: -80px;
  bottom: -100px;
  z-index: 1;
  width: 300px;
  pointer-events: none;
}

.about-section__illust img {
  width: 100%;
  height: auto;
}

/* Narrow Desktop ------------------------------------------------------- */

/* 1280pxを超えるワイド画面では、左側の白余白を画面幅に応じて広げる */
@media (min-width: 1281px) {
  .works-section__panel {
    width: calc(100% - ((100vw - 1200px) / 2));
  }
}

@media (max-width: 1199px) and (min-width: 1024px) {
  .about-section__illust {
    right: -100px;
    bottom: -120px;
    width: 280px;
  }
}

/* Tablet --------------------------------------------------------------- */
@media (max-width: 1023px) and (min-width: 768px) {

  .news-section__inner {
    gap: 60px;
  }

  .about-section {
    padding-right: 28px;
    padding-bottom: 88px;
  }

  .about-section__inner {
    grid-template-columns: minmax(0, 1fr) minmax(350px, .9fr);
    gap: 38px;
  }

  .about-section__content {
    min-height: 330px;
  }

  .about-section__text {
    margin: 26px 0 26px;
    line-height: 1.9;
  }

  .about-section__illust {
    right: -90px;
    bottom: -110px;
    width: 220px;
  }
}

/* Mobile --------------------------------------------------------------- */
@media (max-width: 767px) {

  .hero-slider {
    aspect-ratio: 750 / 1474;
  }

  .hero-recruit-banner {
    display: none;
  }

  .news-section {
    padding: 48px 20px 56px;
  }

  .news-section__inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .news-section__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
  }

  .news-section__title {
    line-height: 1.1;
  }

  .news-section__subtitle {
    margin-top: 5px;
    line-height: 1.4;
  }

  .section-link {
    width: 160px;
    padding: 0 6px 7px;
    gap: 10px;
  }

  .news-section__more {
    width: 160px;
    margin-bottom: 0;
    white-space: nowrap;
  }

  .news-item__row {
    min-height: 54px;
    padding: 10px 0;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .news-item__meta {
    gap: 10px;
  }

  .news-item__category {
    min-width: 72px;
    padding: 3px 8px;
  }

  .news-item__title {
    line-height: 1.55;
  }

  .about-section {
    padding: 12px 20px 64px 0;
  }

  .about-section__inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-section__visual {
    width: calc(100% - 28px);
  }

  .about-section__visual img {
    border-radius: 0 24px 24px 0;
  }

  .about-section__content {
    min-height: 0;
    padding: 0 0 132px 20px;
    align-items: flex-start;
  }

  .about-section__copy {
    width: 100%;
  }

  .about-section__text {
    margin: 24px 0 24px;
    padding-right: 0;
    line-height: 1.85;
  }

  .about-section__desktop-break {
    display: none;
  }

  .about-section__link {
    width: 160px;
  }

  .about-section__illust {
    right: -12px;
    bottom: 0;
    width: 176px;
  }
}

/* Works ---------------------------------------------------------------- */
.works-section {
  padding: 20px 0 112px;
  background: var(--color-white);
  overflow: hidden;
}

/*
 * 1100pxコンテンツの左端を基準に、背景だけ左へ60px広げる。
 * 右端は画面端まで使うため、ワイド画面でも背景幅を無理に固定しない。
 */
.works-section__panel {
  margin-left: max(20px, calc((100vw - 1100px) / 2 - 60px));
  padding: 82px 0 88px 60px;
  overflow: hidden;
  border-radius: 36px 0 0 36px;
  background: linear-gradient(135deg, #8dc21f 0%, var(--color-secondary) 100%);
}

.works-section__inner {
  width: 100%;
  margin: 0;
}

.works-section__head {
  margin-bottom: 44px;
}

.section-link--white {
  border-bottom-color: var(--color-white);
}

/* カルーセルはコンテンツ左端から画面右端まで使用 */
.works-carousel {
  width: 100%;
  overflow: hidden;
}

.works-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  cursor: grab;
}

.works-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.works-carousel__viewport.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}

/* ループ位置の補正時はアニメーションさせず、見た目上連続させる */
.works-carousel__viewport.is-loop-jump {
  scroll-behavior: auto !important;
  scroll-snap-type: none;
}

.works-carousel__track {
  display: flex;
  gap: 24px;
  width: max-content;
}

.works-card {
  flex: 0 0 400px;
  color: var(--color-white);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.works-card__title {
  min-height: 30px;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
}

.works-card__title-mark {
  flex: 0 0 2px;
  width: 2px;
  height: 30px;
  background: var(--color-white);
}

.works-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgb(255 255 255 / 12%);
}

.works-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.works-card:hover .works-card__image img {
  transform: scale(1.035);
}

/* SCROLLと一覧リンクを同じ行の左右端に配置 */
.works-section__footer {
  margin-top: 50px;
  padding-right: 60px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.works-carousel__scroll {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-white);
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
}

.works-carousel__scroll span {
  display: inline-block;
  margin-left: 6px;
}

.works-carousel__scroll .works-carousel__scroll-label--mobile {
  display: none;
}

.works-section__more {
  width: 220px;
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 1199px) and (min-width: 1024px) {
  .works-section__panel {
    margin-left: max(24px, calc((100vw - 1100px) / 2 - 48px));
    padding-left: 48px;
  }

  .works-carousel__track {
    gap: 22px;
  }

  .works-card {
    flex-basis: 360px;
  }

  .works-section__footer {
    padding-right: 48px;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .works-section {
    padding: 12px 0 88px;
  }

  .works-section__panel {
    margin-left: 24px;
    padding: 68px 0 72px 36px;
    border-radius: 30px 0 0 30px;
  }

  .works-section__head {
    margin-bottom: 36px;
  }

  .works-carousel__track {
    gap: 20px;
  }

  .works-card {
    flex-basis: 320px;
  }

  .works-card__title {
    min-height: 28px;
    margin-bottom: 12px;
    font-size: 0.96rem;
  }

  .works-card__title-mark {
    height: 28px;
  }

  .works-section__footer {
    margin-top: 42px;
    padding-right: 36px;
    gap: 24px;
  }

  .works-section__more {
    width: 200px;
  }
}

@media (max-width: 767px) {
  .works-section {
    padding: 8px 0 64px;
  }

  .works-section__panel {
    margin-left: 16px;
    padding: 48px 0 54px 20px;
    border-radius: 24px 0 0 24px;
  }

  .works-section__head {
    margin-bottom: 28px;
  }

  .works-carousel__track {
    gap: 14px;
  }

  .works-card {
    flex-basis: min(78vw, 300px);
  }

  .works-card__title {
    min-height: 24px;
    margin-bottom: 9px;
    gap: 8px;
    font-size: 0.96rem;
  }

  .works-card__title-mark {
    height: 24px;
  }

  .works-section__footer {
    margin-top: 34px;
    padding-right: 20px;
    gap: 18px;
  }

  .works-carousel__scroll .works-carousel__scroll-label--desktop {
    display: none;
  }

  .works-carousel__scroll .works-carousel__scroll-label--mobile {
    display: inline-block;
  }

  .works-section__more {
    width: 160px;
    white-space: nowrap;
  }
}

/* Recruit -------------------------------------------------------------- */
.recruit-section {
  padding: 24px 0 112px;
  background: var(--color-white);
}

.recruit-section__visual {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.recruit-section__bg {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.22);
  transform-origin: center center;
  transition: transform 2.2s cubic-bezier(.16,.84,.24,1);
  will-change: transform;
}

.recruit-section__visual.is-visible .recruit-section__bg {
  transform: scale(1);
}

.recruit-section__copy-image {
  position: absolute;
  z-index: 2;
  top: 7%;
  left: 50%;
  width: 95%;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
}

.recruit-section__title-image {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: -1.5%;
  width: min(54vw, 760px);
  height: auto;
  pointer-events: none;
}

.recruit-section__body {
  width: min(calc(100% - 40px), 1100px);
  margin: 0 auto;
  padding-top: 42px;
  text-align: center;
}

.recruit-section__text {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.8;
}

.recruit-section__links {
  margin-top: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 50px;
}

.recruit-section__link {
  width: 250px;
}

@media (max-width: 1023px) and (min-width: 768px) {
  .recruit-section {
    padding: 16px 0 88px;
  }

  .recruit-section__copy-image {
    top: 8%;
  }

  .recruit-section__title-image {
    width: 58vw;
  }

  .recruit-section__body {
    padding-top: 34px;
  }

  .recruit-section__link {
    width: 220px;
  }
}

@media (max-width: 767px) {
  .recruit-section {
    padding: 8px 0 64px;
  }

  .recruit-section__copy-image {
    top: 8%;
  }

  .recruit-section__title-image {
    bottom: -1%;
    width: 72vw;
  }

  .recruit-section__body {
    padding-top: 28px;
  }

  .recruit-section__text {
    line-height: 1.75;
    text-align: left;
  }

  .recruit-section__links {
    margin-top: 36px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
  }

  .recruit-section__link {
    width: 100%;
    min-width: 0;
  }
}
