// ===========================================
// Front Page トップページ固有スタイル
// 文字中心テイスト + キネティック演出
// ===========================================

/* motion base
/* スクロール発火前の初期状態（JS 準備完了後のみ適用）
----------------------------------------------- */
[data-reveal] {
  will-change: transform, opacity, clip-path;
}
.is-motion-ready [data-reveal="up"]:not(.is-visible) {
  opacity: 0;
}
.is-motion-ready [data-reveal="fade"]:not(.is-visible) {
  opacity: 0;
}
.is-motion-ready [data-reveal="mask"]:not(.is-visible) {
  clip-path: inset(0 0 100% 0);
}
.split-line-wrap {
  display: block;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
  }
}

/* site grain サイト全体のテクスチャ
----------------------------------------------- */
.site-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.85'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
@media (prefers-reduced-motion: reduce) {
  .site-grain { display: none; }
}

/* mvセクション
----------------------------------------------- */
.front-mv {
  // 黒背景ヒーロー
  .bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 120%; // parallax 用に余裕
    object-fit: cover;
    opacity: 0.28;
    z-index: 1;
    filter: grayscale(1) contrast(1.05);
    will-change: transform;
  }
  .inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0;
  }
  .eyebrow {
    color: map-get($colors, text-mute);
  }
  .lead {
    max-width: 32em;
    color: map-get($colors, text-invert);
    opacity: 0.82;
  }
}

.front-mv-title {
  .line {
    display: block;
  }
}

.front-mv-en {
  position: absolute;
  right: clamp(16px, 4vw, 80px);
  bottom: clamp(80px, 10vw, 160px);
  z-index: 1;
  color: map-get($colors, text-invert);
  opacity: 0.08;
  pointer-events: none;
  text-align: right;
  line-height: 0.88;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  @include mq-up('s') {
    opacity: 0.12;
  }
}

.front-mv-scroll {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 16px;
  color: map-get($colors, text-invert);
  .label {
    font-family: $font-family-sofia;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    opacity: 0.7;
  }
  .line {
    width: 1px;
    height: 64px;
    background: currentColor;
    opacity: 0.4;
    animation: front-mv-scroll-line 2.4s ease-in-out infinite;
    transform-origin: top center;
  }
}
@keyframes front-mv-scroll-line {
  0% { transform: scaleY(0); opacity: 0.2; }
  50% { transform: scaleY(1); opacity: 0.7; }
  100% { transform: scaleY(0); transform-origin: bottom center; opacity: 0.2; }
}

/* magnetic button base
----------------------------------------------- */
[data-magnetic] {
  will-change: transform;
}

/* aboutセクション
----------------------------------------------- */
.front-about-panel {
  display: grid;
  gap: 48px;
  align-items: center;
  @include mq-up('m') {
    grid-template-columns: 1fr 1fr;
    gap: 120px;
  }
  .detail {
    order: 2;
    @include mq-up('m') {
      order: 1;
    }
  }
  .visual {
    order: 1;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    @include mq-up('m') {
      order: 2;
      aspect-ratio: 4 / 5;
    }
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
  }
}

/* serviceセクション
----------------------------------------------- */
.front-service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 48px;
  @include mq-up('s') {
    grid-template-columns: repeat(2, 1fr);
    gap: 64px 48px;
  }
  @include mq-up('m') {
    grid-template-columns: repeat(4, 1fr);
    gap: 56px 32px;
  }
}

.front-service-item {
  .link {
    display: grid;
    gap: 20px;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
    &:hover {
      opacity: 1;
      .visual img {
        transform: scale(1.04);
      }
      .more {
        gap: 20px;
      }
    }
  }
  .num {
    font-family: $font-family-sofia;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.24em;
    color: map-get($colors, text-sub);
  }
  .visual {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: map-get($colors, gray);
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.6s ease;
    }
  }
  .detail {
    display: grid;
    gap: 12px;
  }
  .note {
    color: map-get($colors, text-sub);
  }
  .more {
    margin-top: 8px;
    font-size: 13px;
  }
}

.front-service-foot {
  text-align: center;
}

/* environmentセクション
----------------------------------------------- */
.front-env-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: rgba(#fff, 0.14);
  border-top: 1px solid rgba(#fff, 0.14);
  border-bottom: 1px solid rgba(#fff, 0.14);
  @include mq-up('s') {
    grid-template-columns: repeat(2, 1fr);
  }
  @include mq-up('m') {
    grid-template-columns: repeat(3, 1fr);
  }
}

.front-env-item {
  padding: 40px 24px;
  background: map-get($colors, black);
  display: grid;
  gap: 16px;
  align-content: start;
  @include mq-up('s') {
    padding: 48px 32px;
  }
  @include mq-up('m') {
    padding: 56px 40px;
    min-height: 280px;
  }
  .num {
    font-family: $font-family-sofia;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.28em;
    color: map-get($colors, text-mute);
  }
  .tit {
    color: map-get($colors, text-invert);
  }
  .note {
    color: map-get($colors, text-mute);
    line-height: 1.9;
  }
}

.front-env-foot {
  text-align: center;
}

/* voiceセクション
----------------------------------------------- */
.front-voice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 48px;
  @include mq-up('m') {
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
  }
}

.front-voice-item {
  display: grid;
  gap: 28px;
  padding: 48px 0 0;
  border-top: 1px solid map-get($colors, gray-border);
  position: relative;
  &::before {
    content: '“';
    position: absolute;
    top: -8px;
    left: -8px;
    font-family: $font-family-sofia;
    font-size: 80px;
    line-height: 1;
    color: map-get($colors, text);
    opacity: 0.18;
  }
  .note {
    font-weight: 300;
    color: map-get($colors, text);
  }
  .meta {
    display: grid;
    gap: 6px;
  }
  .name {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
  }
  .role {
    font-family: $font-family-sofia;
    font-size: 12px;
    letter-spacing: 0.2em;
    color: map-get($colors, text-sub);
    text-transform: uppercase;
  }
}

/* recruitセクション
----------------------------------------------- */
.front-recruit-inner {
  text-align: center;
  display: grid;
  justify-items: center;
  max-width: 800px;
  margin-inline: auto;
  .en {
    color: map-get($colors, text-invert);
    opacity: 0.9;
    line-height: 0.92;
  }
  .note {
    color: map-get($colors, text-invert);
    opacity: 0.82;
    max-width: 28em;
  }
}

.front-recruit-btns {
  display: grid;
  gap: 24px;
  justify-items: center;
}

/* informationセクション
----------------------------------------------- */
.front-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid map-get($colors, gray-border);
}

.front-info-item {
  border-bottom: 1px solid map-get($colors, gray-border);
  .link {
    display: grid;
    gap: 8px 32px;
    grid-template-columns: auto auto;
    grid-template-areas:
      "date cat"
      "tit tit";
    padding: 28px 0;
    color: inherit;
    text-decoration: none;
    align-items: center;
    transition: opacity 0.3s ease;
    @include mq-up('s') {
      grid-template-columns: 140px 140px 1fr;
      grid-template-areas: "date cat tit";
      padding: 32px 0;
    }
    &:hover {
      opacity: 1;
      .tit {
        color: map-get($colors, text-sub);
      }
    }
  }
  .date {
    grid-area: date;
    font-family: $font-family-sofia;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: map-get($colors, text-sub);
  }
  .cat {
    grid-area: cat;
    justify-self: start;
    font-size: 11px;
    letter-spacing: 0.2em;
    padding: 6px 14px;
    border: 1px solid map-get($colors, gray-border);
  }
  .tit {
    grid-area: tit;
    font-size: clamp(15px, 1.4vw, 17px);
    font-weight: 400;
    line-height: 1.7;
    transition: color 0.3s ease;
  }
}

.front-info-foot {
  text-align: center;
}

/* snsセクション
----------------------------------------------- */
.front-sns-btns {
  display: grid;
  gap: 20px;
  justify-content: center;
  justify-items: center;
  @include mq-up('s') {
    grid-auto-flow: column;
    gap: 32px;
  }
}
