/* ============================================================
   MAR5AUX — home.css
   トップページ固有（Hero / Categories）
============================================================ */

/* ============================================================
   HERO SECTION
============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  background-color: #111111;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 背景画像 */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: rgb(0,0,0);
}

.hero__bg-img {
  width: 100%;
  /* height: 110%; */
  object-fit: cover;
  /* transform: translateY(-10vh); */
}

/* ブランドタイトル */
.hero__title-wrap {
  position: relative;
  z-index: 10;
  padding: 80px 20px 0;
  text-align: center;
}

.hero__title-wrap img {
  width: 289px;
  display: inline-block;
}

/* 背景スクロールテキスト */
.hero__marquee {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  overflow: hidden;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

.hero__marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: hero-marquee 200s linear infinite;
}

.hero__marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 5vw, 100px);
  flex-shrink: 0;
  padding-right: clamp(20px, 5vw, 100px);
}

.hero__marquee-track img {
  height: 80%;
  width: auto;
  flex-shrink: 0;
}

@keyframes hero-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.scene {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: pan-y;
  user-select: none;
  position: relative;
  z-index: 3;
}

.carousel {
  width: 320px;
  height: 480px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 0.6s cubic-bezier(.77,0,.175,1);
}

.carousel__cell {
  position: absolute;
  -webkit-user-drag: none;
}

.carousel__cell img {
  pointer-events: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
}

.carousel__cell:not(.is-active)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
}

/* スクロールアイコン */
.hero__scroll-icon {
  position: absolute;
  top: calc(29% + 130px);
  right: 24px;
  z-index: 50;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateY(-100%);
}

@media (max-height: 700px) {
  .hero__scroll-icon {
    top: calc(26% + 130px);
  }
}

.hero__scroll-icon img {
  width: 45px;
  height: 45px;
  animation: scroll-spin 8s linear infinite;
}

@keyframes scroll-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.hero--expanded .hero__scroll-icon {
  position: absolute;
  top: 88vh;
  bottom: auto;
  transform: translateY(-100%);
}

.hero__scroll-label {
  font-family: 'Roboto', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #ffffff;
  top: 46px;
  position: absolute;
}

/* キャッチコピー */
.hero__catch {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px 20px 40px;
  flex-shrink: 0;
  margin-top: 6px;
}

.hero__catch-main {
  font-family: 'Roboto', sans-serif;
  color: rgba(255, 255, 255, 1);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.hero__catch-sav {
  font-family: 'Noto Sans JP', 'Roboto', sans-serif;
  color: #8A8A8A;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 300;
}

/* ============================================================
   CATEGORIES SECTION（Gallery / Service / Company / Recruit）
============================================================ */
.categories {
  padding: 0 0 60px;
  background-color: #ffffff;
}

.categories__inner {
  margin: 0 auto;
  padding: 0 3vw;
}

/* スマホ：縦1列 */
.categories__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}

.categories__card {
  position: relative;
  overflow: hidden;
  margin: 0 1vw;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.categories__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* SP縦画面: sticky スタックアニメーション */
@media (max-width: 794px) and (orientation: portrait) {
  html, body {
    overflow-x: visible;
  }

  .categories__grid {
    gap: 0;
  }

  .categories__card {
    position: sticky;
    top: 60px;
    transition: none;
    transform-origin: center 30%;
  }

  .categories__card.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (max-height: 574px) and (orientation: portrait) {
  .hero {
    height: 110svh;
  }

  .hero__scroll-icon {
    bottom:66svh;
  }
}

/* SP横画面: タブレット版と同じ2列レイアウト */
@media (max-width: 794px) and (orientation: landscape) {
  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }
}

.categories__card-link {
  display: block;
  position: relative;
  justify-content: center;
  align-items: center;
}

.categories__card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.categories__card-img {
  width: 101%;
  height: 101%;
  background-color: #FFFFFF;
  transition: transform 0.5s ease, filter 0.3s;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.categories__card-link:hover .categories__card-img {
  transform: scale(1.2);
  filter: brightness(1.1) contrast(1.05);
}

.categories__card-link:hover .categories__card-label {
  color: #9F353A;
  font-weight: bold;
}

.categories__card-label {
  padding: 12px 0 20px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #111111;
  text-align: center;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  -webkit-text-decoration-thickness: 1px;
  text-underline-offset: 8px;
}

/* ============================================================
   TABLET BREAKPOINT (795px〜)（Home関連）
============================================================ */
@media (min-width: 795px) {
  /* Hero */
  .hero {
    height: 200svh;
  }

  .hero__title-wrap img {
    margin-top: 10vh;
    width: 632px;
  }

  .hero__bg-img {
    transform: translateY(0vh);
  }

  .hero__marquee {
    opacity: 1;
  }

  .hero__scroll-icon {
    right: 40px;
    top: 78vh;
  }

  .hero__scroll-icon img {
    width: 60px;
    height: 60px;
  }

  .hero__scroll-label {
    font-size: 14px;
    top: 0;
    position: static;
  }

  .hero__catch-main {
    font-size: 36px;
  }

  .hero__catch-sav {
    font-size: 16px;
  }

  /* Categories：2列 */
  .categories__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .categories__card-label {
    font-size: 18px;
  }
}

/* ============================================================
   PC BREAKPOINT (1200px〜)（Home関連）
============================================================ */
@media (min-width: 1200px) {
  .hero {
    height: 200svh;
  }

  .hero__title-wrap {
    padding-top: 10vh;
  }

  .hero__scroll-icon {
    right: 70px;
    top: 80vh;
  }

  .hero__scroll-icon img {
    width: 120px;
    height: 120px;
  }

  .hero__scroll-label {
    font-size: 14px;
  }

  /* Categories：4列横並び */
  .categories {
    padding: 0 0 80px;
  }

  .categories__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
  }

  .categories__card-img-wrap {
    aspect-ratio: 4 / 3;
  }

  .categories__card-label {
    font-size: 18px;
    padding: 14px 0 24px;
  }
  
  .categories__inner {
    padding: 0;
    gap: 15px;
  }
  
  .categories__card {
    margin: 0;
  }
}

