@charset "UTF-8";

/* ベースリセット */
/*body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}*/

/* スライダー全体のコンテナ */
.hero-slider {
  animation: fadeIn 1s ease 0s 1 normal;
    position: relative;
    width: 100%;
    /*height: 100vh;*/
  aspect-ratio: 3840 / 1500;
  margin-top: 178px;
    overflow: hidden;
    background-color: #fff;
}
@keyframes fadeIn {
    0% {opacity: 0}
    100% {opacity: 1}
}
@-webkit-keyframes fadeIn {
    0% {opacity: 0}
    100% {opacity: 1}
}

/* 個々のスライド */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    z-index: 1;
}

.slide.active {
    visibility: visible;
    z-index: 2;
}

/* --- 画像切り替え（マスク）アニメーション --- */
.slide.next {
    visibility: visible;
    z-index: 3;
    /* 右から左へ表示させるためのマスク初期位置 */
    clip-path: inset(0 0 0 100%);
    animation: slideMaskRightToLeft 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes slideMaskRightToLeft {
    0% { clip-path: inset(0 0 0 100%); }
    100% { clip-path: inset(0 0 0 0); }
}

/* --- 画像自体の設定と動き --- */
.slide-bg {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* 動いた時に端が見切れないよう、常時少し拡大しておく */
    transform: scale(1.1); 
}

/* 次のスライド画像のアニメーション（右から左へスライドイン） */
.slide.next .slide-bg img {
    animation: imgSlideIn 1.4s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* アクティブになった後も位置を維持 */
.slide.active .slide-bg img {
    transform: scale(1.1) translateX(0);
}

@keyframes imgSlideIn {
    0% {
        /* 右に5%ずれた位置からスタート */
        transform: scale(1.1) translateX(5%);
    }
    100% {
        /* 定位置（中央）へ */
        transform: scale(1.1) translateX(0);
    }
}

/* --- コンテンツエリア設定 --- */
.slide-content {
    position: absolute;
    bottom: 15%;
    left: 10%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* 行ごとのラッパー */
.line-block {
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    overflow: hidden;
}

/* 行間の隙間 */
.line-block:not(:last-child) {
    margin-bottom: 10px;
}

/* 黒帯の設定 */
.line-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: -1;
}

/* 黒帯アニメーション */
.slide.active .line-bg {
    animation: barExtend 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 1.2s; 
}

@keyframes barExtend {
    0% { width: 0; }
    100% { width: 100%; }
}

/* テキスト設定 */
.line-text {
  font-family: "Noto Sans JP", sans-serif;
    margin: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    position: relative;
    z-index: 2;
  letter-spacing: 6px;
}

/* テキストの1文字ごとのスタイル */
.line-text span {
    display: inline-block;
    opacity: 0;
    transform: translateX(10px);
    white-space: pre; 
}

/* 文字アニメーション */
.slide.active .line-text span {
    animation: textFadeIn 0.5s ease forwards;
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .hero-slider {
    /*height: 50vh;*/
    height: auto;
    margin-top: 60px;
  }
    .line-text {
        font-size: 0.6rem;
      letter-spacing: 3px;
    }
    .slide-content {
        left: 5%;
        bottom: 10%;
        max-width: 90%;
    }
    .line-block {
        padding: 8px 15px;
    }
  .line-block:not(:last-child) {
    margin-bottom: 5px;
  }
}