@charset "utf-8";
/* ==========================================
1. 円形マスク＆ズームトランジション
   最初のアニメーションをパフォーマンス最適化して統合
========================================== */
/* 外枠（figureタグ）：円から四角へ広がる */
.ink-figure {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9; /* ※画像の比率に合わせて変更（例: 1/1, 4/3 など） */
  margin: 0; /* WordPressの標準マージンリセット */

  /* 初期状態：中央に小さく正円で配置 */
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.2);
  transform-origin: center center;

  /* イージング設定 */
  transition: transform 1.6s cubic-bezier(.075, .82, .165, 1),
              border-radius 1.6s cubic-bezier(.6, .04, .98, .335),
              opacity 1.6s cubic-bezier(.25, .46, .45, .94);
  will-change: transform, border-radius, opacity;
}

/* 中の画像（imgタグ）：拡大から通常サイズへ */
.ink-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  transform: scale(1.5);
  transition: transform 1.6s cubic-bezier(.075, .82, .165, 1);
  will-change: transform;
}

/* ★ 発動時（.active が付いたとき） */
.ink-figure.active {
  border-radius: 0%;
  opacity: 1;
  transform: scale(1);
}

.ink-figure.active img {
  transform: scale(1);
}

/* ==========================================
カバーテキスト（背景色ある場合）
========================================== */

/* 1. 白背景の枠：左から伸びる */
.reveal-item {
  transform: scaleX(0); /* 最初は幅0 */
  transform-origin: left center; /* 左端を軸にして伸びる */
  transition: transform 1.0s ease-out; /* 1.0秒で背景が伸びる */
  will-change: transform;
}

/* 2. 中の文字：左から右へ出現する設定 */
.reveal-text {
  opacity: 0;
  /* 左から右へ切り抜く（最初は幅0で隠す） */
  clip-path: inset(0 100% 0 0);
  /* 白背景が伸びきった【1.0秒後】から、1秒かけて左から右へ表示 */
  transition: clip-path 1.0s ease-out 1.0s, opacity 0.1s ease 1.0s;
  display: inline-block; /* clip-pathをきれいに利かせるため */
}

/* ★ active クラスが付いた時の状態 */

/* 白背景が左から右へ伸びる */
.reveal-item.active {
  transform: scaleX(1);
}

/* テキストが左から右へ表示される */
.reveal-item.active .reveal-text {
  opacity: 1;
  clip-path: inset(0 0 0 0); /* マスクを解除して全部見せる */
}

/* 親要素（cover-sub-title-box）または中の要素の初期状態 */
.cover-sub-title-box.fade-in {
  opacity: 0;
  /* ★ 2.0s 遅れてから、1.5s かけてふわっと表示 */
  transition: opacity 1.5s ease 2.0s;
  will-change: opacity;
}

/* active がついたら表示 */
.cover-sub-title-box.fade-in.active {
  opacity: 1;
}

/* 中のテキスト（.fade-in-slow）も連動させる場合 */
.cover-sub-title-box .cover-sub-title {
  opacity: 0;
  /* ★ 2.0s 遅れてから、2.5s かけてゆっくり表示 */
  transition: opacity 2.5s ease 2.0s;
  will-change: opacity;
}

.cover-sub-title-box.active .cover-sub-title {
  opacity: 1;
}

/* ==========================================
ゆらゆら
========================================== */

.yurayura1, .yurayura2, .yurayura3 {
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}

/* パターン1：標準的な優しいゆらゆら */
.yurayura1 {
    animation-name: yurayura-pattern1;
    animation-duration: 2.5s;
}

@keyframes yurayura-pattern1 {
    0% {
        transform: translateY(0) rotate(-2deg);
    }
    100% {
        transform: translateY(-8px) rotate(3deg);
    }
}

/* パターン2：少し高めに浮いて、逆方向に傾く */
.yurayura2 {
    animation-name: yurayura-pattern2;
    animation-duration: 3.0s;
    animation-delay: -0.8s;
}

@keyframes yurayura-pattern2 {
    0% {
        transform: translateY(0) rotate(4deg);
    }
    100% {
        transform: translateY(-10px) rotate(-3deg);
    }
}

/* パターン3：移動量を小さくして、少し動きを早く */
.yurayura3 {
    animation-name: yurayura-pattern3;
    animation-duration: 2.2s;
    animation-delay: -1.5s;
}

@keyframes yurayura-pattern3 {
    0% {
        transform: translateY(0) rotate(-4deg);
    }
    100% {
        transform: translateY(-6px) rotate(2deg);
    }
}

/* ==========================================
上下ふわふわ（4パターン・バランス版）
========================================== */

.fuwafuwa1, .fuwafuwa2, .fuwafuwa3, .fuwafuwa4 {
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}

/* パターン1：【下からスタート】基準位置から上に大きく浮き上がる（移動量: 20px） */
.fuwafuwa1 {
    animation-name: fuwafuwa-pattern1;
    animation-duration: 2.5s;
}

@keyframes fuwafuwa-pattern1 {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-20px);
    }
}

/* パターン2：【上からスタート】基準位置から下に沈み込む（移動量: 20px） */
.fuwafuwa2 {
    animation-name: fuwafuwa-pattern2;
    animation-duration: 2.8s;
    animation-delay: -0.6s;
}

@keyframes fuwafuwa-pattern2 {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(20px);
    }
}

/* パターン3：【中心から拡大】基準位置を中心に上下へ揺れる（全幅: 24px） */
.fuwafuwa3 {
    animation-name: fuwafuwa-pattern3;
    animation-duration: 2.2s;
    animation-delay: -1.2s;
}

@keyframes fuwafuwa-pattern3 {
    0% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(12px);
    }
}

/* パターン4：【ゆったり高低差】少し大きく、ゆったり上下に揺れる（全幅: 30px） */
.fuwafuwa4 {
    animation-name: fuwafuwa-pattern4;
    animation-duration: 3.2s;
    animation-delay: -1.8s;
}

@keyframes fuwafuwa-pattern4 {
    0% {
        transform: translateY(15px);
    }
    100% {
        transform: translateY(-15px);
    }
}

/* ==========================================
fade系
========================================== */

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
  will-change: opacity;
}

/* activeクラスがついたら表示 */
.fade-in.active {
  opacity: 1;
}

.fade-in-slow {
  opacity: 0;
  transition: opacity 5.0s ease 2.0s;
  will-change: opacity;
}

.fade-in-slow.active {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* 下からフェードイン */

/* --- 単体 (.fadein-bottom) --- */
.fadein-bottom {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fadein-bottom.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- グループ (.fadein-bottom-group) --- */
.fadein-bottom-group > * {
  opacity: 0;
  transform: translateY(30px);
  /* transition-delay もアニメーションの対象に含める */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, transition-delay 0s;
  will-change: opacity, transform;
}

/* 子要素自身に active クラスがついたら表示 */
.fadein-bottom-group > *.active {
  opacity: 1;
  transform: translateY(0);
}

