/* Custom properties */
:root {
    --kotobuki-accent: #9A8D6C;
}

/* Base Styles */
html {
    font-size: 16px; /* 1rem = 16px */
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 64px; /* スマホ版のスクロールパディング */
}

@media (min-width: 768px) {
    html {
        scroll-padding-top: 80px; /* PC版のスクロールパディング */
    }
}

body {
    font-family: 'Noto Serif JP', serif;
    font-weight: 400;
    color: #454545;
    background-color: #fff;
    overflow-x: hidden;
}

/* 初期読み込み時の制御 */
body.loading {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Fixed CTA Button Styles */
.fixed-cta-button {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.fixed-cta-button:hover {
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.15));
}


/* FAQ Styles */
.faq-question img {
    transition: transform 0.3s ease;
    filter: brightness(0);
}

.faq-question.active {
    background-color: #9A8D6C !important;
    color: white !important;
}

.faq-question.active img {
    transform: rotate(180deg);
    filter: brightness(0) invert(1);
}

.answer-wrapper {
  position: relative;
  overflow: hidden;
  max-height: 85px; /* 表示するテキストの高さに合わせて調整 */
  transition: max-height 0.3s ease-in-out;
}
.answer-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, white, rgba(255, 255, 255, 0));
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}
.answer-wrapper.open {
  max-height: 500px; /* 全文表示に十分な高さを設定 */
}
.answer-wrapper.open::after {
  opacity: 0;
}

.read-more-btn {
  transition: margin-top 0.3s ease-in-out;
  margin-top: -1rem;
}

.read-more-btn.open {
  margin-top: 1rem;
}

.read-more-btn.open img {
  transform: rotate(180deg);
}

/* Typography */
.lead-copy {
    font-size: 1rem; /* 16px */
}

/* Navigation */
.nav-link {
    font-size: 1rem; /* 16px */
    color: #454545;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #9A8D6C;
}

/* Header */
header {
    position: relative;
}

.jobimage {
    position: relative;

    @media (min-width: 768px) {
        background: url(./img/jobimage_pc.png) no-repeat center center;
        background-size: cover;
        height: 486px;
        width: 100%;
    }
}

.point-label {
    display: inline-block;
    background-color: #9A8D6C;
    color: white;
    padding: 1px 10px;
    font-size: 14px;
}

.point-label.white {
    border: 1px solid #9A8D6C;
    background-color: white;
    color: #9A8D6C;
}

.underline-custom {
    color: var(--kotobuki-accent);
    font-size: 24px;
    text-decoration: none;
    background: linear-gradient(to right, #D4C098, #FBF4D8, #C4B58E);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 100% 3px;
    padding-bottom: 2px;
}

.feature-number {
    position: absolute;
    top: -60px;
    font-size: 40px;
    font-weight: bold;
    color: var(--kotobuki-accent);
    z-index: 0;
    line-height: 1;
    font-family: 'Noto Serif JP', serif;
    text-shadow: 1px 1px 0px #fff;

    @media (min-width: 768px) {
      position: relative;
      top: 0;
      margin-right: 30px;
    }
}

.feature-highlight {
    display: inline-block;
    background-color: var(--kotobuki-accent);
    padding: 4px 6px;
    font-weight: bold;
    color: white;
}

.flow-image {
    border: 1px solid white;
    border-radius: 0.5rem; /* 8px */
    width: 100%;
    box-shadow: 2px 2px 0px var(--kotobuki-accent);
}

.underline-solid {
    border-bottom: 3px solid var(--kotobuki-accent);
    padding-bottom: 1px;
}

.job-list-box {
    background-color: white;
    box-shadow: 2px 2px 0px var(--kotobuki-accent);
}

.underline-white {
    background-image: linear-gradient(white, white);
    background-repeat: no-repeat;
    background-position: 0% 95%;
    background-size: 100% 5px;
}

.text-gradient-gold {
    color: transparent;
    background: linear-gradient(180deg, #D4C098 0%, #FBF4D8 50%, #C4B58E 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 1px 1px 0 var(--kotobuki-accent),
                 -1px -1px 0 var(--kotobuki-accent),
                 1px -1px 0 var(--kotobuki-accent),
                 -1px 1px 0 var(--kotobuki-accent);
}

.benefit-item {
    border-bottom: 1px solid #454545;
}
.benefit-item:nth-child(2n-1) {
    border-right: 1px solid #454545;
}
@media (min-width: 768px) {
  .benefit-item:nth-child(2n-2) {
      border-right: 1px solid #454545;
  }
  .benefit-item:nth-child(5n) {
      border-right: none;
  }
}
.benefit-item:last-child {
    /*border-bottom: none;*/
}

/* Testimonial Slider */
.testimonial-slider {
  overflow: visible;
  padding: 0 35px;
}

.testimonial-slider .splide__track {
  overflow: visible;
  padding: 20px 0;
}

.testimonial-slider .splide__slide {
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .testimonial-slider .splide__slide {
    width: 630px;
  }
}

.testimonial-slider .splide__arrows {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 0 10px;
  height: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.testimonial-slider .splide__arrow {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
  opacity: 1;
  position: static;
  transform: none;
}

.testimonial-slider .splide__arrow svg {
  display: none; /* Hide default Splide arrow */
}

.testimonial-slider .splide__arrow--prev {
  background-image: url('./img/arrow_prev.svg');
  background-size: contain;
  left: 20px;
}

.testimonial-slider .splide__arrow--next {
  background-image: url('./img/arrow_next.svg');
  background-size: contain;
  right: 20px;
}

@media (min-width: 640px) { /* sm breakpoint */
    .testimonial-slider .splide__arrow--prev {
        left: calc(50% - 320px - 46px);
    }
    .testimonial-slider .splide__arrow--next {
        right: calc(50% - 320px - 46px);
    }
}


.splide__pagination__page {
    width: 10px;
    height: 10px;
    background-color: #D9D9D9;
    opacity: 1;
    transition: background-color 0.3s;
    border: none;
    border-radius: 50%;
    margin: 0 5px;
}

.splide__pagination__page.is-active {
    background-color: var(--kotobuki-accent);
    transform: none;
}
.splide__pagination {
  bottom: -1.0rem;
}

/* recruitment Slider */
.flow-slider {
  overflow: visible;
  padding: 0 35px;
}

.flow-slider .splide__track {
  overflow: visible;
  padding: 20px 0;
}

.flow-slider .splide__slide {
  transition: opacity 0.3s ease;
}

.flow-slider .splide__slide > div {
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

@media (min-width: 768px) {
  .flow-slider .splide__slide {
    width: 630px;
  }
}

.flow-slider .splide__arrows {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 0;
  padding: 0 10px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.flow-slider .splide__arrow {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 0;
  opacity: 1;
  position: static;
  transform: none;
  transition: opacity 0.3s ease;
}

.flow-slider .splide__arrow svg {
  display: none; /* Hide default Splide arrow */
}

.flow-slider .splide__arrow--prev {
  background-image: url('./img/arrow_prev.svg');
  background-size: contain;
  left: 20px;
}

.flow-slider .splide__arrow--next {
  background-image: url('./img/arrow_next.svg');
  background-size: contain;
  right: 20px;
}

/* 最初のスライドでは前へボタンを非表示 */
.flow-slider .splide__arrow--prev[disabled] {
  opacity: 0;
  pointer-events: none;
}

/* 最後のスライドでは次へボタンを非表示 */
.flow-slider .splide__arrow--next[disabled] {
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 640px) { /* sm breakpoint */
  .flow-slider .splide__arrow--prev {
    left: calc(50% - 320px - 46px);
  }
  .flow-slider .splide__arrow--next {
    right: calc(50% - 320px - 46px);
  }
}

/* Store List Footer */
.store-list {
  padding: 60px 15px;
  text-align: center;
  background-color: #F5F4F2;
}

.store-list__title {
  margin-bottom: 40px;
}

.store-list__title-ja {
  display: block;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.store-list__title-en {
  display: block;
  font-size: 12px;
  color: #666;
}

.store-list__areas {
  font-size: 16px;
  line-height: 1.8;
  font-weight: 500;
  margin-bottom: 24px;
}

.store-list__future {
  color: #9A8D6C;
  font-size: 20px;
  font-weight: 500;
  line-height: 2.0;
}

/* Main Visual Animation */
.mv-container {
  position: relative;
  background-color: white;
  overflow: hidden;
}

.mv-gradient-bg,
.mv-gradient-bg-first {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #F2EAD8 0%, #FFFEFA 30%, #F2EAD4 100%);
}

.mv-gradient-bg {
  z-index: 1;
}

.mv-gradient-bg-first {
  z-index: 20;
  transition: opacity 2s ease-in-out;
}

.mv-gradient-bg-first.fade-out {
  opacity: 0;
}

/* 参考サイト方式：border-radiusでマスク効果 */
.video-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  width: 53.3333333333vw;
  height: 48.6111111111vw;
  margin: auto;
  border-top-right-radius: 100%;
  border-top-left-radius: 100%;
  overflow: hidden;
  border: 1px solid #D9D9D9;
  border-bottom: none;
  transform: translateX(-50%);
  opacity: 1;
  z-index: 10;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  transition: opacity 2s ease-in-out;
}

@media screen and (min-width: 1441px) {
  .video-container {
    width: 768px;
    height: 700px;
  }
}

@media screen and (max-width: 768px) {
  .video-container {
    width: 85.3333333333vw;
    height: 75%;
  }
}

.mv-container .mv-image {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100dvw;
  height: 100vh;
  object-fit: cover;
  transform: scale(1) translate(-50%);
}

/* 769px以上でclamp()を使用してスムーズに変化 */
@media screen and (min-width: 769px) {
  .mv-container .mv-image {
    height: calc(100vh - 1px);
    --offset: calc((1440px - 100vw) * 0.558);
    height: calc(100vh - clamp(0px, var(--offset), 1px));
  }
}

/* 1440px以上では完全に0px */
@media screen and (min-width: 1440px) {
  .mv-container .mv-image {
    height: 100vh;
  }
}

/* Video and iframe styling */
.mv-container iframe.mv-image,
.mv-container video.mv-image {
  border: none;
  pointer-events: none;
}

/* YouTube iframe specific styling */
.mv-container iframe.mv-image {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100dvw;
  height: 100vh;
  object-fit: cover;
  transform: scale(1) translate(-50%);
  border: none;
  pointer-events: none;
}

/* 769px以上でのYouTube iframe調整 */
@media screen and (min-width: 769px) {
  .mv-container iframe.mv-image {
    height: calc(100vh - 1px);
    --offset: calc((1440px - 100vw) * 0.558);
    height: calc(100vh - clamp(0px, var(--offset), 1px));
  }
}

/* 1440px以上でのYouTube iframe調整 */
@media screen and (min-width: 1440px) {
  .mv-container iframe.mv-image {
    height: 100vh;
  }
}

/* =================================================================
   SCROLL ANIMATIONS
   ================================================================= */

/* アニメーション用の初期状態 */
.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up-fast {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-left {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-right {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* アニメーション実行状態（要素が見えたとき） */
.fade-in.visible {
  opacity: 1;
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-up-fast.visible {
  opacity: 1;
  transform: translateY(0);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* スタガード（時間差）アニメーション */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ヒーローセクション専用のアニメーション */
.hero-text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 30;
  transition: top 2s ease-in-out, transform 2s ease-in-out;
}

.hero-text-container.move-up {
  top: 25px;
  transform: translate(-50%, 0);
}

@media (min-width: 768px) {
  .hero-text-container.move-up {
    top: 50px;
  }
}

.hero-title {
  opacity: 0;
  transition: opacity 1.5s ease-in-out, text-shadow 0.5s ease-in-out;
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
}

.hero-title.fade-in {
  opacity: 1;
}

/* スクロール時のテキストシャドウ */
.hero-title.text-shadow-active {
  text-shadow: 
    2px 2px 4px rgba(255, 255, 255, 0.9),
    -2px -2px 4px rgba(255, 255, 255, 0.9),
    2px -2px 4px rgba(255, 255, 255, 0.9),
    -2px 2px 4px rgba(255, 255, 255, 0.9),
    0px 0px 8px rgba(255, 255, 255, 0.8);
}

/* サブタイトルの初期状態 */
.hero-sub-title {
  opacity: 0;
  transition: opacity 1.5s ease-in-out, text-shadow 0.5s ease-in-out;
  position: relative;
  text-shadow: 0px 0px 0px rgba(255, 255, 255, 0);
}

/* サブタイトルのテキストシャドウ */
.hero-sub-title.text-shadow-active {
  text-shadow: 
    2px 2px 4px rgba(255, 255, 255, 0.9),
    -2px -2px 4px rgba(255, 255, 255, 0.9),
    2px -2px 4px rgba(255, 255, 255, 0.9),
    -2px 2px 4px rgba(255, 255, 255, 0.9),
    0px 0px 8px rgba(255, 255, 255, 0.8);
}

/* サブタイトルのフェードイン */
.hero-sub-title.fade-in-subtitle {
  opacity: 1;
}

/* スクロール時の再表示テキスト */
.hero-text-repeat {
  transition: opacity 1s ease-in-out;
}

.hero-text-repeat.fade-in-scroll {
  opacity: 1;
}

/* CTAボタン用のアニメーション */
.cta-bounce {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.cta-bounce.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 画像用のズームインアニメーション */
.zoom-in {
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.zoom-in.visible {
  opacity: 1;
  transform: scale(1);
}
