@charset "UTF-8";
/* ==========================================================================
   おといろ江幡ピアノ教室 ヒーロー（メインビジュアル）
   --------------------------------------------------------------------------
   ・クラス名はすべて「ot-hero」から始まります（他のパーツと衝突しないように）
   ・JSが動かない環境では「完成状態（写真全面＋白い見出し＋説明文）」を表示します
   ・JSが動くと .ot-hero に .is-animated が付き、アニメーション用の表示に切り替わります
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. 調整用のCSS変数
   色・フォント・サイズはここを変えるだけで全体に反映されます
   -------------------------------------------------------------------------- */
.ot-hero {
  /* 色 */
  --ot-hero-bg: #f2f2f2;          /* 初期の背景色 */
  --ot-hero-text: #292d33;        /* 初期の文字色 */
  --ot-hero-text-end: #ffffff;    /* 写真の上に出たときの文字色 */

  /* 写真に重ねる暗いレイヤーの濃さ（0 = 重ねない）
     文字が読みにくい場合のみ 0.05〜0.1 程度のごく薄い値にしてください */
  --ot-hero-overlay-opacity: 0;

  /* フォント */
  --ot-hero-font-title: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --ot-hero-font-en: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", "YuMincho", serif;
  --ot-hero-font-desc: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "YuGothic", sans-serif;

  /* 文字サイズ（PC：見出し48px。画面幅に合わせて自動で縮みます）
     ※英字のサイズは写真の大きさに合わせてJSで自動計算します（PC基準34px） */
  --ot-hero-title-size: clamp(26px, 3.4vw, 48px);
  --ot-hero-desc-size: clamp(13px, 1.12vw, 16px);
  --ot-hero-name-size: 1.2em;     /* 説明文の下の教室名（説明文の文字サイズに対する倍率） */

  /* 説明文の読みやすさ用の、ごく薄い影（写真全体は暗くせず、文字のまわりだけ）
     不要な場合は none にしてください */
  --ot-hero-desc-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);

  /* 画面を固定してアニメーションさせる「スクロールの長さ」（PC） */
  --ot-hero-scroll-length: 250vh;

  /* 見出し・説明文の配置（PC：完成状態での位置） */
  --ot-hero-copy-left: 39vw;      /* 見出しの左端の位置 */
  /* 説明文を見出しより右にずらす量
     見出しの「音楽」2文字分（1文字 = 文字サイズ + 字間0.04em）→ 説明文の左端が「が」の開始位置にそろう */
  --ot-hero-desc-indent: calc(var(--ot-hero-title-size) * 2.08);
}


/* --------------------------------------------------------------------------
   2. 外枠と固定される舞台
   -------------------------------------------------------------------------- */
.ot-hero {
  position: relative;
  height: 100vh;
  height: 100svh;                 /* スマホのアドレスバーの影響を受けない高さ */
  background: var(--ot-hero-bg);
  overflow-x: clip;               /* 横スクロール防止（sticky を壊さない clip を使用） */
}

/* アニメーション時は、固定スクロールの分だけ縦に長くする */
.ot-hero.is-animated {
  height: calc(100vh + var(--ot-hero-scroll-length));
  height: calc(100lvh + var(--ot-hero-scroll-length));
}

/* 画面に貼り付いたまま動く部分
   ・高さは「アドレスバーが縮んだときの、いちばん大きい画面の高さ（lvh）」にする
   ・iPhone でスクロール中にアドレスバーが縮むと画面が広がるため、
     舞台が小さいと、全画面の写真の下に背景色の帯が出たり消えたりして、画面ががたついて見える */
.ot-hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
}

/* 準備ができるまで隠す（完成状態が一瞬見えるのを防ぐ） */
.ot-hero-js .ot-hero:not(.is-animated) .ot-hero__stage {
  visibility: hidden;
}


/* --------------------------------------------------------------------------
   3. 写真（SVG）
   -------------------------------------------------------------------------- */
.ot-hero__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* JSが動かないときは切り抜きを外して、写真を全面に表示 */
.ot-hero:not(.is-animated) .ot-hero__photo {
  clip-path: none;
}

/* 写真に重ねる暗いレイヤー */
.ot-hero__overlay {
  fill: #000;
  opacity: var(--ot-hero-overlay-opacity);
}

/* 英字の通り道は見せない */
.ot-hero__guide {
  fill: none;
  stroke: none;
}


/* --------------------------------------------------------------------------
   4. 輪郭に沿う英字
   -------------------------------------------------------------------------- */
.ot-hero__en {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  font-family: var(--ot-hero-font-en);
  font-size: 26px;                /* 実際のサイズはJSで上書き（見出しサイズ × 0.54） */
  font-weight: 400;
  line-height: 1;
  color: var(--ot-hero-text);
  white-space: pre;
  pointer-events: none;
}

/* 1文字ずつの箱（位置と角度はJSで指定） */
.ot-hero__char {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  opacity: 0;
  will-change: transform, opacity;
}

/* 弾けるときに動かす内側の箱 */
.ot-hero__char-inner {
  display: inline-block;
}

/* 最初に現れて、英字の出てくる位置まではねていく音符（♪）
   ・JS が舞台に追加します（HTML の変更は不要）
   ・大きさと位置は JS で指定。色は見出しと同じ */
.ot-hero__note {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  color: var(--ot-hero-text);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.ot-hero__note svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

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

/* JSが動かないとき：英字は完成状態に出ないので、見た目からは隠す */
.ot-hero:not(.is-animated) .ot-hero__en {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}


/* --------------------------------------------------------------------------
   5. 見出しと説明文
   CSSでは「完成状態の位置」を指定しています。
   アニメーション中の位置と色は、JSがここからのずれとして動かします。
   -------------------------------------------------------------------------- */
/* 見出し・説明文の範囲は「アドレスバーが出ていても必ず見える高さ（svh）」にして、
   その中で縦の中央に置く（文字がアドレスバーに隠れないように） */
.ot-hero__copy {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100svh;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;        /* 縦方向は中央寄せ */
  padding: 0 4vw 0 var(--ot-hero-copy-left);
  color: var(--ot-hero-text-end);
}

/* メイン見出し（和文） */
.ot-hero__title {
  align-self: flex-start;         /* 文字幅ぴったりの箱にする（位置計算のため） */
  margin: 0;
  font-family: var(--ot-hero-font-title);
  font-size: var(--ot-hero-title-size);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.04em;
}

.ot-hero__title-line {
  display: block;
  white-space: nowrap;            /* 1行が途中で折り返さないように */
}

/* 説明文と教室名をまとめる箱
   ・箱を文字の幅ぴったりにする（下の教室名を「説明文のいちばん長い行の右端」にそろえるため）
   ・この箱ごと、ふわっと表示されます（hero.js） */
.ot-hero__body {
  align-self: flex-start;
  margin: 1.2em 0 0 var(--ot-hero-desc-indent);  /* 上の数値で見出しとの間隔を調整 */
  font-size: var(--ot-hero-desc-size);           /* 上の 1.2em と、教室名の大きさの基準 */
}

/* 説明文 */
.ot-hero__desc {
  margin: 0;
  font-family: var(--ot-hero-font-desc);
  font-size: var(--ot-hero-desc-size);
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.08em;
  text-shadow: var(--ot-hero-desc-shadow);
}

.ot-hero__desc-line {
  display: block;
}

/* 説明文の下の教室名（右寄せ・少し大きく）
   ・このページの h1（いちばん大きな見出し）です。見た目は説明文と同じゴシックの細い文字
   ・Flatsome の h1 の指定（太字・灰色など）は hero-flatsome.css で打ち消しています */
.ot-hero__name {
  display: block;
  margin: 0.6em 0 0;              /* 説明文との間隔 */
  font-family: var(--ot-hero-font-desc);
  font-size: var(--ot-hero-name-size);
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.12em;
  text-align: right;
  text-shadow: var(--ot-hero-desc-shadow);
}

/* 改行してよい位置で区切るためのまとまり（このまとまりの途中では改行しない） */
.ot-hero__phrase {
  display: inline-block;
}


/* --------------------------------------------------------------------------
   6. スマホ・タブレット縦向き（縦並びレイアウト）
   ※この条件はJS（hero.js の STACKED_QUERY）と同じにしてください
   -------------------------------------------------------------------------- */
@media (max-width: 767px), (orientation: portrait) {
  .ot-hero {
    --ot-hero-title-size: clamp(22px, 6.6vw, 44px);
    --ot-hero-desc-size: clamp(13px, 3.5vw, 16px);
    --ot-hero-scroll-length: 150vh;  /* スマホは固定スクロールを短めに */
  }

  .ot-hero__copy {
    padding: 0 20px;
  }

  .ot-hero__body {
    margin: 0.8em 0 0;
  }

  .ot-hero__desc {
    line-height: 2;
    letter-spacing: 0.04em;
  }
}
