// ===========================================
// Recruit 採用トップページ固有スタイル
// 文字中心テイスト
// ===========================================

/* mv メインビジュアル
----------------------------------------------- */
.recruit-mv {
  // 背景画像
  > .bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.25;
    pointer-events: none;
    user-select: none;
    filter: grayscale(20%);
  }

  .inner {
    display: grid;
    gap: 40px;
    position: relative;
    @include mq-up('s') {
      gap: 56px;
    }
  }

  .meta {
    display: grid;
    gap: 16px;

    .crumb {
      @include font(12);
      font-family: $font-family-sofia;
      letter-spacing: 0.24em;
      color: map-get($colors, text-mute);
      margin: 0;
    }
  }

  .en {
    display: block;
    line-height: 0.9;
    color: map-get($colors, text-invert);

    .year {
      font-size: 0.35em;
      font-weight: 300;
      letter-spacing: 0.05em;
      vertical-align: top;
      color: map-get($colors, accent);
    }
  }

  .ja {
    color: map-get($colors, text-invert);
    font-weight: 200;
    max-width: 20ch;
  }

  .lead {
    max-width: 640px;
    color: map-get($colors, text-mute);
  }

  // 縦書きの飾り
  .side {
    display: none;
    @include mq-up('m') {
      display: block;
      position: absolute;
      right: 0;
      top: 0;
      bottom: 0;
      margin-block: auto;
      height: fit-content;

      span {
        writing-mode: vertical-rl;
        font-family: $font-family-sofia;
        font-size: 13px;
        letter-spacing: 0.4em;
        color: map-get($colors, text-mute);
        text-transform: uppercase;
      }
    }
  }

  // スクロール誘導
  .scroll {
    position: absolute;
    left: 0;
    bottom: -40px;
    display: grid;
    gap: 12px;
    justify-items: center;
    color: map-get($colors, text-mute);

    span {
      font-family: $font-family-sofia;
      font-size: 11px;
      letter-spacing: 0.3em;
      text-transform: uppercase;
    }
    .line {
      display: block;
      width: 1px;
      height: 64px;
      background: currentColor;
      position: relative;
      overflow: hidden;
      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 40%;
        background: map-get($colors, text-invert);
        animation: recruitScroll 2.4s ease-in-out infinite;
      }
    }
  }
}

@keyframes recruitScroll {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(260%);
  }
}

/* message 採用メッセージ
----------------------------------------------- */
.recruit-message {
  .recruit-message-panel {
    margin: 0;
    position: relative;
    padding-inline: 0;

    .quote-mark {
      font-family: $font-family-sofia;
      font-weight: 200;
      font-size: clamp(120px, 20vw, 260px);
      line-height: 0.6;
      letter-spacing: -0.05em;
      color: map-get($colors, accent);
      margin: 0 0 -0.1em;
      opacity: 0.5;
    }

    .tit {
      font-weight: 300;
      max-width: 22ch;
    }

    .detail {
      max-width: 52ch;
      color: map-get($colors, text-mute);
    }

    .sign {
      display: flex;
      align-items: baseline;
      gap: 18px;
      font-family: $font-family-base;

      .role {
        @include font(12);
        letter-spacing: 0.24em;
        color: map-get($colors, text-mute);
        text-transform: uppercase;
      }
      .name {
        @include font(18);
        font-weight: 400;
        letter-spacing: 0.1em;
        color: map-get($colors, text-invert);
      }
    }
  }
}

/* category 採用カテゴリ導線
----------------------------------------------- */
.recruit-category {
  .recruit-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .item {
    list-style: none;
  }

  .panel {
    display: block;
    position: relative;
    overflow: hidden;
    background: map-get($colors, black);
    color: map-get($colors, text-invert);
    text-decoration: none;
    aspect-ratio: 4 / 5;
    isolation: isolate;

    @include mq-up('s') {
      aspect-ratio: 4 / 5;
    }

    .bg {
      position: absolute;
      inset: 0;
      z-index: 0;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.5;
        transition: transform 0.8s ease, opacity 0.4s ease;
      }

      &::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(
          180deg,
          rgba(0, 0, 0, 0.2) 0%,
          rgba(0, 0, 0, 0.7) 100%
        );
      }
    }

    .body {
      position: relative;
      z-index: 2;
      height: 100%;
      padding: 40px 28px;
      display: grid;
      align-content: space-between;
      gap: 24px;

      @include mq-up('s') {
        padding: 56px 48px;
      }
    }

    .num {
      font-family: $font-family-sofia;
      font-size: clamp(14px, 1.2vw, 16px);
      letter-spacing: 0.3em;
      color: map-get($colors, accent);
    }

    .tit {
      font-weight: 200;
      font-size: clamp(40px, 6vw, 88px);
      line-height: 1.05;
      color: map-get($colors, text-invert);
    }

    .en {
      font-family: $font-family-sofia;
      font-size: clamp(14px, 1.4vw, 18px);
      letter-spacing: 0.3em;
      text-transform: uppercase;
      margin: 0;
      color: map-get($colors, text-mute);
    }

    .detail {
      color: map-get($colors, text-mute);
      max-width: 32ch;
    }

    .more {
      display: inline-flex;
      align-items: center;
      gap: 14px;
      padding-bottom: 6px;
      border-bottom: 1px solid currentColor;
      width: fit-content;
      justify-self: start;
    }

    &:hover {
      opacity: 1;
      .bg img {
        transform: scale(1.05);
        opacity: 0.65;
      }
      .more {
        gap: 20px;
      }
    }
  }
}

/* environment-highlight 働く環境ハイライト
----------------------------------------------- */
.recruit-environment {
  .recruit-environment-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .item {
    list-style: none;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: grid;
    gap: 16px;

    @include mq-up('s') {
      padding: 56px 32px;
      border-right: 1px solid rgba(255, 255, 255, 0.15);

      &:nth-child(2n) {
        border-right: none;
      }
    }

    @include mq-up('m') {
      padding: 64px 40px;
      border-right: 1px solid rgba(255, 255, 255, 0.15);

      &:nth-child(2n) {
        border-right: 1px solid rgba(255, 255, 255, 0.15);
      }
      &:nth-child(3n) {
        border-right: none;
      }
    }

    .num {
      font-family: $font-family-sofia;
      font-size: clamp(48px, 6vw, 80px);
      font-weight: 200;
      line-height: 1;
      letter-spacing: -0.03em;
      color: map-get($colors, accent);
    }
    .tit {
      color: map-get($colors, text-invert);
      font-weight: 400;
    }
    .detail {
      color: map-get($colors, text-mute);
    }
  }

  .more {
    text-align: center;
  }
}

/* recruitment 募集要項抜粋
----------------------------------------------- */
.recruit-recruitment {
  .recruit-recruitment-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .item {
    list-style: none;
  }

  .panel {
    display: grid;
    gap: 28px;
    height: 100%;
    padding: 48px 32px;
    background: map-get($colors, white);
    color: map-get($colors, text);
    text-decoration: none;
    border: 1px solid map-get($colors, gray-border);
    transition: border-color 0.3s ease, transform 0.3s ease;

    @include mq-up('s') {
      padding: 64px 56px;
    }

    .head {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag {
      display: inline-flex;
      align-items: center;
      padding: 6px 14px;
      font-family: $font-family-sofia;
      font-size: 11px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      background: map-get($colors, black);
      color: map-get($colors, text-invert);

      &.ghost {
        background: transparent;
        color: map-get($colors, text);
        border: 1px solid map-get($colors, text);
      }
    }

    .tit {
      font-weight: 400;
    }

    .meta {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 8px 24px;
      margin: 0;
      padding: 24px 0 0;
      border-top: 1px solid map-get($colors, gray-border);

      dt {
        font-family: $font-family-sofia;
        font-size: 11px;
        letter-spacing: 0.24em;
        text-transform: uppercase;
        color: map-get($colors, text-sub);
        align-self: center;
      }
      dd {
        margin: 0;
        @include font(14);
        line-height: 1.7;
      }
    }

    .more {
      justify-self: start;
      display: inline-flex;
      align-items: center;
      gap: 14px;
      padding-bottom: 6px;
      border-bottom: 1px solid currentColor;
      font-family: $font-family-base;
      font-size: 14px;
      letter-spacing: 0.08em;

      &::after {
        content: '→';
        font-family: $font-family-sofia;
        transition: transform 0.3s ease;
      }
    }

    &:hover {
      opacity: 1;
      border-color: map-get($colors, black);
      transform: translateY(-4px);
      .more::after {
        transform: translateX(6px);
      }
    }
  }

  .more {
    text-align: center;
  }
}

/* flow 応募の流れ
----------------------------------------------- */
.recruit-flow {
  .recruit-flow-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: flow;
    border-top: 1px solid map-get($colors, gray-border);
  }

  .item {
    list-style: none;
    padding: 40px 0;
    display: grid;
    gap: 14px;
    border-bottom: 1px solid map-get($colors, gray-border);
    position: relative;

    @include mq-up('s') {
      padding: 48px 24px;
      border-right: 1px solid map-get($colors, gray-border);
      &:nth-child(2n) {
        border-right: none;
      }
    }

    @include mq-up('m') {
      padding: 64px 32px;
      border-right: 1px solid map-get($colors, gray-border);
      &:last-child {
        border-right: none;
      }
      &:nth-child(2n) {
        border-right: 1px solid map-get($colors, gray-border);
      }
    }

    .num {
      font-family: $font-family-sofia;
      font-size: clamp(48px, 6vw, 80px);
      font-weight: 200;
      line-height: 1;
      letter-spacing: -0.03em;
      color: map-get($colors, text);
      display: inline-flex;
      align-items: center;
      gap: 16px;

      &::after {
        content: '';
        display: block;
        width: 32px;
        height: 1px;
        background: currentColor;
      }
    }

    .tit {
      font-weight: 500;
    }

    .detail {
      color: map-get($colors, text-sub);
    }
  }
}

/* faq よくある質問
----------------------------------------------- */
.recruit-faq {
  .recruit-faq-list {
    margin: 0;
    padding: 0;
    border-top: 1px solid map-get($colors, gray-border);
  }

  .item {
    border-bottom: 1px solid map-get($colors, gray-border);
  }

  dt {
    margin: 0;
  }

  details {
    summary {
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 28px 48px 28px 0;
      cursor: pointer;
      list-style: none;
      position: relative;

      &::-webkit-details-marker {
        display: none;
      }

      &::after {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        width: 16px;
        height: 1px;
        background: currentColor;
        transition: transform 0.3s ease;
      }
      &::before {
        content: '';
        position: absolute;
        right: 8px;
        top: 50%;
        width: 16px;
        height: 1px;
        background: currentColor;
        transform: rotate(90deg);
        transition: transform 0.3s ease;
      }

      @include mq-up('s') {
        padding: 36px 56px 36px 0;
        gap: 28px;
      }
    }

    &[open] summary {
      &::before {
        transform: rotate(0deg);
      }
    }
  }

  .q,
  .a {
    font-family: $font-family-sofia;
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 300;
    line-height: 1;
    color: map-get($colors, accent);
    flex-shrink: 0;
  }

  .tit {
    font-family: $font-family-base;
    font-weight: 400;
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.6;
    letter-spacing: 0.04em;
  }

  .ans {
    display: flex;
    gap: 20px;
    padding: 0 48px 32px 0;

    @include mq-up('s') {
      gap: 28px;
      padding: 0 56px 40px 0;
    }

    .a {
      color: map-get($colors, text-sub);
    }
    .detail {
      color: map-get($colors, text-sub);
      margin: 0;
      padding-top: 4px;
    }
  }
}

/* entry-cta エントリーCTA
----------------------------------------------- */
.recruit-entry {
  text-align: center;

  .com-eyebrow {
    justify-self: center;
    margin-inline: auto;
  }

  .en {
    display: block;
    color: map-get($colors, text-invert);
    margin-top: 24px;

    @include mq-up('s') {
      margin-top: 40px;
    }
  }

  .ja {
    color: map-get($colors, text-invert);
    font-weight: 200;
  }

  .com-text-lead {
    color: map-get($colors, text-mute);
    max-width: 640px;
    margin-inline: auto;
  }

  .more {
    display: flex;
    justify-content: center;
  }
}
