@charset "UTF-8";
/* ==========================================================================
   おといろ江幡ピアノ教室 ラベル（● Message）
   --------------------------------------------------------------------------
   ・画面に入ったら、丸が浮き上がる → 文字が左から1文字ずつ流れて出る
   ・全部出た後は、文字の動きだけをくり返します（丸はそのまま）
   ・クラス名はすべて「ot-label」から始まります（他のパーツと衝突しないように）
   ・JSが動かない環境や「視差効果を減らす」設定の端末では、最初から表示された状態になります
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. 調整用のCSS変数（ラベルごとに style 属性で上書きできます）
   -------------------------------------------------------------------------- */
.ot-label {
  --ot-label-color: #b46b64;            /* 文字と丸の色（コンタクトカラー。2026-11-27 に #292d33 から変更） */
  --ot-label-font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --ot-label-font-size: 18px;           /* 文字サイズ */
  --ot-label-dot-size: 18px;            /* 丸の大きさ */
  --ot-label-gap: 10px;                 /* 丸と文字の間隔 */

  --ot-label-dot-duration: 0.6s;        /* 丸が浮き上がる時間 */
  --ot-label-stagger: 0.08s;            /* 1文字ごとにずらす時間 */
  --ot-label-loop: 4s;                  /* 文字の動き1回分の長さ（出る → 表示 → 消える） */
}


/* --------------------------------------------------------------------------
   2. 見た目（WordPress テーマのスタイルに左右されないよう、必要な値をすべて指定）
   -------------------------------------------------------------------------- */
.ot-label {
  display: flex;
  align-items: center;
  gap: var(--ot-label-gap);
  margin: 0;
  padding: 0;
  font-family: var(--ot-label-font-family);
  font-size: var(--ot-label-font-size);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ot-label-color);
  text-transform: none;
}

/* 丸 */
.ot-label__dot {
  flex-shrink: 0;
  width: var(--ot-label-dot-size);
  height: var(--ot-label-dot-size);
  border-radius: 50%;
  background: var(--ot-label-color);
}

/* 1文字ずつの箱（JSで作ります） */
.ot-label__char {
  display: inline-block;
  white-space: pre;
}

/* 読み上げソフト用（画面には表示しない） */
.ot-label__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* --------------------------------------------------------------------------
   3. アニメーション
   JSが .is-ready を付けると「隠れた状態」になり、画面に入って .is-inview が付くと動き出します
   -------------------------------------------------------------------------- */

/* 隠れた状態 */
.ot-label.is-ready .ot-label__dot {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--ot-label-dot-duration) ease,
    transform var(--ot-label-dot-duration) cubic-bezier(0.22, 1, 0.36, 1);
}

.ot-label.is-ready .ot-label__char {
  opacity: 0;
}

/* 1. 丸が下からふわっと浮き上がる */
.ot-label.is-inview .ot-label__dot {
  opacity: 1;
  transform: none;
}

/* 2. 丸が出た後、文字が左から1文字ずつ流れて出る → くり返す
   （--i は文字の順番。JSが1文字ずつ付けます） */
.ot-label.is-inview .ot-label__char {
  animation: ot-label-flow var(--ot-label-loop) ease infinite both;
  animation-delay: calc(var(--ot-label-dot-duration) + var(--i) * var(--ot-label-stagger));
}

/* 文字の動き1回分：左から出る → しばらく表示 → 右へ消える */
@keyframes ot-label-flow {
  0% {
    opacity: 0;
    transform: translateX(-0.4em);
  }
  12%,
  78% {
    opacity: 1;
    transform: none;
  }
  90%,
  100% {
    opacity: 0;
    transform: translateX(0.2em);
  }
}


/* --------------------------------------------------------------------------
   中央寄せのバージョン（ot-label--center）（2026-11-29 追加）
   使い方：<p class="ot-label ot-label--center"> … </p>
   ・丸と文字のまとまりを、置かれた場所の中央に置く（動きは同じ）
   -------------------------------------------------------------------------- */
.ot-label--center {
  justify-content: center;
}


/* --------------------------------------------------------------------------
   4. 「視差効果を減らす」設定の端末では、動かさずに表示
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ot-label .ot-label__dot,
  .ot-label .ot-label__char {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
