/* index.css — TOP 固有 */

/* ---- FV(ヒーロー): 全幅写真の上にコピー、CTAは写真右下に分離(設計準拠) ---- */
#fv-area { position: relative; }
.fv-photo { width: 100%; height: clamp(420px, 64vh, 620px); object-fit: cover; }
.fv-photo.sp { display: none; }
/* 写真の上に白の線形グラデーション(設計実測 パス8: 上端 白a0.475 → 縦80%地点で 白a1.0)。
   下寄りのコピー帯を白く起こして黒文字を読みやすくする */
#fv-area::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.7) 80%); }
#fv-area .content-area {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.main-title { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.15; letter-spacing: .04em; color: var(--ink); }
.sub-title { margin-top: 10px; color: var(--ink); }
/* CTA は title/sub の中央縦積みから外し、写真の右下隅へ(設計: PCは右下の片角丸矩形) */
#fv-area .fv-cta { position: absolute; z-index: 2; right: clamp(20px, 5vw, 72px); bottom: clamp(24px, 8vh, 64px); }

/* PC(設計 TOP-pc 実測): コピーは写真の縦≈70%(下寄り中段)に中央、CTAは写真の下端に密着し右余白≈81px。
   SP は下の @media(max-width:768px) が別途上書きするので、ここは PC 専用にする。 */
@media (min-width: 769px) {
  #fv-area .title-area { position: absolute; left: 0; right: 0; top: 70%; transform: translateY(-50%); padding: 0 24px; }
  #fv-area .fv-cta { right: 0; bottom: 0; padding: 1.55em 2em; font-size: 1.05rem; }   /* 設計: CTA右端は内容カラム右端にフラッシュ */
  /* 設計 TOP-pc 実測: 悩みセクションの VIEW MORE だけ大きい(430x97)。他ページ/teaserの標準266x52を上書き */
  #nayami .view-more { padding: 40px 158px; }
}

/* ---- NEWS ------------------------------------------------------------- */
.news-content { max-width: 760px; margin: 0 auto; text-align: center; }
.news-header { color: var(--muted); font-size: .9rem; letter-spacing: .1em; }
.news-text { margin: 14px 0; }

/* ---- 悩み: ベージュ地(#f2eee7)に白カード(角丸・ソフト影・「？」バッジ、PCは2列ジグザグ)、解決コピー、CTA中央 ---- */
#nayami { background: var(--beige); }
#nayami .content-area { text-align: center; }
.nayami-text-area { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 26px; max-width: 920px; margin: 0 auto; align-items: start; }
.nayami-text {
  position: relative; background: #fff; border-radius: 14px;
  padding: 30px 30px 28px; font-size: .98rem; line-height: 1.8; text-align: left;
  box-shadow: 0 14px 30px rgba(120,95,45,.09);
}
/* 各文節は途中で折り返さない。改行は読点/区切りでのみ起きる（幅が足りれば1行） */
.nayami-text span { white-space: nowrap; }
/* 各カードの頭に「？」バッジ(サーモン)。お悩みだと一目で伝える装飾 */
.nayami-text::before {
  content: "?"; position: absolute; left: 24px; top: -17px;
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--salmon); color: #fff;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1;
  box-shadow: 0 6px 14px rgba(189,133,107,.4);
}
.nayami-text:nth-child(even) { margin-top: 100px; }   /* 設計: 右列を約100px下げて互い違い */
/* 設計実測(TOP-pc): 解決コピーは 819x53 の大きな1行 ≒ 見出しと同格の約38px。SPは約22px */
.nayami-solution { font-weight: 500; margin-top: 48px; font-size: clamp(1.4rem, 4vw, 2.35rem); line-height: 1.5; }
#nayami .view-more { margin-top: 28px; }

/* ---- 紹介セクション(コース/校舎/SCENT HUBとは)= 2カラム(.split) -------
   設計(TOP-pc実測)の座標関係を忠実に再現:
   ・テキスト列は「本文が最も左」。見出しは右へインデント、VIEW MORE は中間インデント。
   ・列比は本文:画像 ≒ 35:63(設計は画像側が約2倍幅)。
   ・画像側は相対ボックス内に写真/装飾面を%配置。各セクションで斜めのずれ方が異なる。 */
#course .section-content-area, #school .section-content-area, #about .section-content-area { flex: 0 1 35%; }
#course .section-image-area,   #school .section-image-area,   #about .section-image-area   { flex: 0 1 63%; }

/* テキスト列は全体を左右中央揃え(設計実測: h2/本文/VIEW MORE の中心が一致)。
   本文だけは可読性のため行内は左揃え(=幅を持つブロックとして中央に置く) */
.section-content-area { display: flex; flex-direction: column; align-items: center; }
.section-content-area h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin-bottom: 20px; text-align: center; }
.section-content-area p  { color: #444; margin-bottom: 30px; max-width: 24em; }

/* 画像側の土台: 写真/装飾面は絶対配置(装飾=背面 z0 / 写真=前面 z1〜) */
.section-image-area { position: relative; }
.section-image-area img { position: absolute; z-index: 1; }
.section-image-area .bg-decoration { position: absolute; z-index: 0; }
.deco-beige  { background: #e5d8b6; }
.deco-green  { background: var(--green); }
.deco-salmon { background: var(--accent); }

/* コース案内: 同サイズ写真2枚(384x384)を斜めにずらし、ベージュ面を背後に。box 792x509 */
.course-media { aspect-ratio: 792 / 509; }
.course-media .deco-beige     { left: 30.8%; top: 13.4%; width: 69.2%; height: 86.6%; }
.course-media .course-photo-1 { left: 0;     top: 0;     width: 48.5%; aspect-ratio: 1; z-index: 1; object-fit: cover; }
.course-media .course-photo-2 { right: 8.1%; top: 24.6%; width: 48.5%; aspect-ratio: 1; z-index: 2; object-fit: cover; }

/* 校舎案内(reverse): 緑面が写真の左上背後にはみ出す。box 678x491 */
#school .section-image-area { aspect-ratio: 678 / 491; }
#school .deco-green         { left: 0;     top: 0;   width: 73.6%; height: 90.6%; }
#school .section-image-area img { left: 32.7%; top: 11%; width: 67.3%; aspect-ratio: 456 / 437; object-fit: cover; }

/* SCENT HUBとは: サーモン面が写真の右下背後にはみ出す。box 628x519 */
#about .section-image-area { aspect-ratio: 628 / 519; }
#about .deco-salmon        { left: 20.5%; top: 12.3%; width: 79.5%; height: 87.7%; }
#about .section-image-area img { left: 0; top: 0; width: 72.6%; aspect-ratio: 456 / 437; object-fit: cover; }

/* ---- VOICE: カーキ帯(#e4d8b6)に白枠カード(設計実測) --------------------- */
#voice { background: var(--khaki); }
/* 設計実測: カードは白背景(枠なし)・名前中央・たっぷり余白(card339x523, 本文幅246=左右46px) */
/* 設計実測(TOP-pc): カード339幅/ギャップ≈92、本文左右46・上79・氏名下48 → 内容比でギャップ広め＆上余白大 */
.voice-card-area { display: grid; grid-template-columns: repeat(3, 1fr); gap: 84px; }
.voice-card { background: #fff; padding: 76px 46px 56px; }
.voice-card-name { font-weight: 600; text-align: center; margin-bottom: 46px; font-size: 1.05rem; }
.voice-card-text { font-size: .85rem; color: #444; line-height: 1.95; }

/* ---- STAFF (静的版の名残。実体は staff-carousel) ----------------------- */
.staff-card-area { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.staff-card { border: 1px solid var(--line); padding: 20px; }
.staff-card > img { width: 100%; aspect-ratio: 1/1; object-fit: cover; margin-bottom: 16px; }
.staff-name-row { display: flex; align-items: center; gap: 14px; }
.staff-name-row .name p:first-child { font-size: 1.1rem; }
.staff-name-row .name p:last-child { font-size: .8rem; color: var(--muted); }
.staff-name-row .hyphen { flex: 1; height: 1px; background: var(--ink); }
.staff-name-row .role { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.staff-origin { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.staff-origin .origin { background: var(--line); color: #fff; font-size: .75rem; padding: 3px 10px; }
.staff-origin .country { font-size: .85rem; }

.voice-more { display: none; }   /* PC は本文を全文表示するのでボタン不要 */

/* ====================================================================== */
/*  SP（TOP-sp フレーム実測に合わせる）                                      */
/* ====================================================================== */
@media (max-width: 768px) {
  .fv-photo.pc { display: none; }
  .fv-photo.sp { display: block; }
  .voice-card-area, .staff-card-area { grid-template-columns: 1fr; }
  .voice-card-area { gap: 28px; }                 /* SPは縦積み: PCの広ギャップ(84px)を詰める */
  .voice-card { padding: 44px 28px; }             /* SPは上下余白も詰める */
  .voice-card-name { margin-bottom: 24px; }
  /* SP: 本文は初期3行省略、READ MORE で全文(設計TOP-sp: 枠142x34の READ MORE。ui.js が is-open 付与) */
  .voice-card-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .voice-card.is-open .voice-card-text { display: block; overflow: visible; }
  .voice-more { display: block; width: max-content; margin: 18px auto 0; padding: 9px 28px;
    border: 1px solid var(--line); background: none; color: var(--line); letter-spacing: .12em; font-size: .8rem; cursor: pointer; }
  .voice-card.is-open .voice-more { display: none; }

  /* FV: タイトル/サブは左寄せ。CTAは金色の正円(104x104・2行)で右下隅に密着
     (TOP-sp実測: ELLIPSE 104x104 @left271/top545 → 右端=フレーム端375・下端≒写真下端) */
  /* SP: コピーは写真の縦≈65%(下寄り)に左揃え(TOP-sp実測 title@x79/y391・sub@x62/y474、写真y60-652)。
     PCと同様 title-area を絶対配置で下寄せする。CTAは金円で右下隅。 */
  #fv-area .content-area { display: block; }
  #fv-area .title-area { position: absolute; left: 16%; right: 8%; top: 65%; transform: translateY(-50%); text-align: left; }
  .main-title { max-width: 6.2em; }
  #fv-area .fv-cta {
    right: 0; bottom: 0; left: auto; top: auto;
    display: flex; align-items: center; justify-content: center;
    width: 104px; height: 104px; border-radius: 50%; padding: 0;
    font-size: .72rem; line-height: 1.5; text-align: center;
  }
  .main-title { font-size: clamp(1.7rem, 8vw, 2.2rem); }

  /* 悩み: 1列、左端揃え/右端揃えの交互オフセット。カードはフレーム端まで(設計 card1 左端=0 / card2 右端=375)。
     見出し・解決文は content 余白のまま中央なので、カード帯のみ負マージンで content padding(18px)を打ち消す */
  .nayami-text-area { grid-template-columns: 1fr; gap: 26px; margin-left: -18px; margin-right: -18px; }
  /* SP: カードは一定高さ(≈70px)。本文は「左揃えの塊をカード内で中央寄せ」(設計実測: 各行の左端が一致)。
     flex(justify-center)で塊を中央に、text-align:left で行を左揃えに。br.br-sp の位置で2行(句読点区切り) */
  .nayami-text { width: 86.7%; padding: 16px 22px; font-size: .9rem; text-align: left;
    min-height: 70px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
  .nayami-text::before { left: 18px; top: -15px; width: 32px; height: 32px; font-size: 1.05rem; }
  .nayami-text:nth-child(odd)  { margin-right: auto; margin-top: 0; }   /* 左端 */
  .nayami-text:nth-child(even) { margin-left: auto;  margin-top: 0; }   /* 右端 */

  /* SP: 3セクションとも「画像→テキスト」の順(設計 TOP-sp: 画像/装飾面が上、見出し/本文/VIEW MORE が下)。
     course/about=.split、school=.split--reverse いずれも DOM は text→image のため column-reverse で反転 */
  #course .split, #school .split, #about .split { flex-direction: column-reverse; }
  #course .section-content-area, #school .section-content-area, #about .section-content-area,
  #course .section-image-area,   #school .section-image-area,   #about .section-image-area { flex: 1; width: 100%; }

  /* SP: コース案内/SCENT HUBとは の飾り枠+写真は SP フレーム実測に合わせる(PCとは比率・配置が異なる)。校舎案内は現状維持。 */
  /* コース案内(SP box 375x376): ベージュ枠=左寄せ背面、写真1=左上、写真2=右下 */
  .course-media { aspect-ratio: 375 / 376; }
  .course-media .deco-beige     { left: 0;     top: 10.9%; width: 87.7%; height: 70.2%; }
  .course-media .course-photo-1 { left: 13.3%; top: 0;     width: 60.3%; }
  .course-media .course-photo-2 { left: auto;  right: 0;   top: 39.9%; width: 60.3%; }
  /* SCENT HUBとは(SP box 375x285): サーモン枠=左寄せ背面、写真=右寄せ前面(PCとは左右が逆) */
  #about .section-image-area { aspect-ratio: 375 / 285; }
  #about .deco-salmon        { left: 0; top: 7.4%; width: 87.7%; height: 92.6%; }
  #about .section-image-area img { left: auto; right: 0; top: 0; width: 70.9%; }
}

/* ---- FV コピーの登場＋蛍の光アニメーション -----------------------------
   ページを開くと、メインコピー→サブコピーの順にふわっと下から浮き上がって現れる。
   登場後は、蛍の光のように柔らかな金色の光がゆっくり明滅し続ける。
   文字色そのものは濃いインクのまま変えないので、読みやすさは保たれる。 */
@keyframes she-fv-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 蛍の光: まわりの金色のにじみ(text-shadow)だけをゆっくり灯して消す。
   輪郭がぼやけないよう、文字自体の濃さは常に一定に保つ。 */
@keyframes she-fv-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(221,184,92,.25); }
  50%      { text-shadow: 0 0 20px rgba(255,213,110,1), 0 0 40px rgba(221,184,92,.9), 0 0 70px rgba(221,184,92,.6), 0 0 100px rgba(221,184,92,.4); }
}

.main-title, .sub-title { opacity: 0; }        /* 登場前は透明 */

/* メイン: 登場(rise)のあと、蛍の光(glow)をゆっくり繰り返す */
.main-title { animation: she-fv-rise .9s ease-out .25s forwards, she-fv-glow 4.8s ease-in-out 1.2s infinite; }
/* サブ: 少し遅れて登場し、メインとは違う周期で明滅（自然な蛍らしいゆらぎ） */
.sub-title  { animation: she-fv-rise .9s ease-out .70s forwards, she-fv-glow 6.2s ease-in-out 1.9s infinite; }

/* 動きを減らす設定の端末では、明滅や浮き上がりを止めて静止表示にする（アクセシビリティ配慮） */
@media (prefers-reduced-motion: reduce) {
  .main-title, .sub-title { opacity: 1; animation: none; }
}
