/* ============================================
   ECCジュニア なかしま教室 - style.css
   デザインコンセプト：姫路城（白鷺城）の白壁と、
   夜明けの空をイメージした「信頼感」と「成長」の配色
   ============================================ */

:root {
  /* --- カラー --- */
  --indigo-900: #1E3A5F;   /* 深い藍色：信頼・知性・夜空 */
  --indigo-700: #2C4E7A;
  --amber-500: #E8A33D;    /* 夜明けの陽光：温かさ・エネルギー */
  --amber-100: #FBEBCF;
  --green-600: #3E8F63;    /* 成長・アウトプット・若葉 */
  --green-100: #E3F1E9;
  --paper: #F6F5F1;        /* 白壁のような、わずかに灰色がかった白 */
  --paper-warm: #FBF6EE;
  --ink: #22262B;
  --ink-soft: #565C63;
  --white: #FFFFFF;

  /* --- タイポグラフィ --- */
  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Zen Kaku Gothic New", sans-serif;
  --font-eyebrow: "Fraunces", serif;

  --radius: 14px;
  --shadow-soft: 0 8px 24px rgba(30, 58, 95, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--indigo-900); color: var(--white);
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- ボタン --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }
.btn-primary { background: var(--amber-500); color: var(--indigo-900); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-outline { border-color: var(--indigo-900); color: var(--indigo-900); }
.btn-outline:hover { background: var(--indigo-900); color: var(--white); }
.btn-ghost { color: var(--indigo-900); text-decoration: underline; padding: 12px 8px; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

/* --- ヘッダー --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 245, 241, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(30,58,95,0.08);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-ecc { font-family: var(--font-eyebrow); font-weight: 600; font-size: 0.85rem; color: var(--amber-500); letter-spacing: .04em; }
.logo-ecc em { font-style: normal; color: var(--indigo-900); margin-left: 4px; }
.logo-name { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--indigo-900); }
.main-nav { display: flex; gap: 24px; font-weight: 500; font-size: 0.92rem; }
.main-nav a:hover { color: var(--amber-500); }
.header-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; }

/* --- 共通セクション --- */
.section { padding: 96px 24px; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-inner-narrow { max-width: 760px; margin: 0 auto; }
.section-center { text-align: center; }
.section-warm { background: var(--paper-warm); }
.section-dark { background: var(--indigo-900); color: var(--white); }
.section-dark .eyebrow { color: var(--amber-500); }
.section-dark .btn-outline { border-color: var(--white); color: var(--white); }

.eyebrow {
  font-family: var(--font-eyebrow); font-weight: 600;
  font-size: 0.85rem; letter-spacing: .12em;
  color: var(--amber-500); margin: 0 0 12px;
  text-transform: uppercase;
}

/* --- 理念フレーズ（ヒーロー直下の3行） --- */
.philosophy-strip { background: var(--paper-warm); }
.philosophy-line {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.05rem; color: var(--indigo-900);
  margin-bottom: 14px; line-height: 1.7;
}
.philosophy-line:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .philosophy-line { font-size: 0.95rem; } }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900; color: var(--indigo-900);
  margin-bottom: 24px;
  /* 画面幅が広いPCなどで、行の途中の不自然な位置で折り返されるのを防ぎ、
     各行の長さのバランスを自動で整える（未対応ブラウザでは通常の折返しに
     自動フォールバックするだけなので、安全に追加できる） */
  text-wrap: balance;
}
.section-dark .section-title { color: var(--white); }
.section-lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 760px; text-wrap: pretty; }
.section-dark .section-lead { color: rgba(255,255,255,0.85); }
/* .section-center内では.section-leadの箱自体も中央に来るようにする
   （max-widthだけではテキストが左寄りに見えてしまうため） */
.section-center .section-lead { margin-left: auto; margin-right: auto; margin-bottom: 28px; }
.note { margin-top: 18px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* --- ヒーロー --- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #F6F5F1 0%, #FBEBCF 140%);
  padding: 120px 24px 0;
}
.hero-inner { max-width: 780px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.hero-title {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 900; color: var(--indigo-900);
  margin-bottom: 22px; letter-spacing: -.01em;
  text-wrap: balance;
}
.hero-lead { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 34px; text-wrap: pretty; }

.hero-parallax-wrap { will-change: transform; }

.hero-scroll-cue {
  margin-top: 30px; text-align: center; font-size: 1.5rem;
  color: rgba(30,58,95,0.35); line-height: 1;
}
.hero-scroll-cue-chevron {
  display: inline-block;
  animation: hero-scroll-cue-bob 2s ease-in-out infinite;
}
@keyframes hero-scroll-cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue-chevron { animation: none; }
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-skyline { width: 100%; height: 180px; display: block; opacity: 0.9; }

/* --- コンセプトカード --- */
.concept-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px;
}
.concept-card {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--amber-500);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
@media (hover: hover) and (pointer: fine) {
  .concept-card:hover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(30,58,95,0.14); }
}
.concept-card h3 { font-size: 1.15rem; color: var(--indigo-900); margin-bottom: 10px; }
.concept-card p { color: var(--ink-soft); font-size: 0.95rem; }

/* --- セクション内の写真枠（管理画面から差し込み可能） --- */
.content-image-slot {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin: 28px 0;
}
.content-image-slot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.content-image-ratio-wide { aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .content-image-ratio-wide { aspect-ratio: 4 / 3; } }
@media (hover: hover) and (pointer: fine) {
  .content-image-slot:hover img { transform: scale(1.035); }
}

/* --- 活動実績 --- */
.experience-list { margin-top: 48px; display: flex; flex-direction: column; gap: 0; }
.experience-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 28px;
  padding: 32px 0; border-top: 1px solid rgba(30,58,95,0.12);
}
.experience-item:last-child { border-bottom: 1px solid rgba(30,58,95,0.12); }
.experience-num {
  font-family: var(--font-eyebrow); font-weight: 600;
  font-size: 2.2rem; color: var(--amber-500); line-height: 1;
}
.experience-tag {
  font-size: 0.82rem; color: var(--green-600); font-weight: 700;
  background: var(--green-100); display: inline-block;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.experience-body h3 { font-size: 1.25rem; color: var(--indigo-900); margin-bottom: 10px; }
.experience-body p { color: var(--ink-soft); }
.experience-detail { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(30,58,95,0.1); display: flex; flex-direction: column; gap: 8px; }
.experience-detail p { margin: 0; font-size: 0.92rem; }
.experience-detail-label { color: var(--amber-500); font-weight: 700; }

/* --- 活動実績リスト全体 --- */
.experience-list-story { position: relative; }

.experience-story-line {
  position: absolute; left: 44px; top: 8px; bottom: 8px; width: 2px;
  background: rgba(30,58,95,0.12);
}
.experience-story-line-fill {
  position: absolute; left: 44px; top: 8px; width: 2px; height: 0%;
  background: var(--amber-500);
  transition: height 0.7s cubic-bezier(0.22,1,0.36,1);
}

.experience-item {
  opacity: 1;
  transform: none;
}
html.js-reveal-ready .experience-item {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
html.js-reveal-ready .experience-item.is-visible { opacity: 1; transform: translateY(0); }

.experience-num {
  position: relative; z-index: 2; text-align: center;
  transition: color 0.5s ease, transform 0.5s ease;
}
.experience-item.is-visible .experience-num {
  color: var(--amber-500);
  transform: scale(1.08);
}

/* --- ミニストーリー導線（例：地元 → 世界 → 英語でコミュニケーション） --- */
.experience-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.experience-flow-chip {
  font-size: 0.72rem; font-weight: 700; color: var(--indigo-900);
  background: var(--paper-warm); border-radius: 999px; padding: 4px 12px;
  white-space: nowrap;
}
.experience-flow-arrow { color: var(--amber-500); font-weight: 900; font-size: 0.85rem; }

@media (max-width: 720px) {
  .experience-story-line, .experience-story-line-fill { left: 20px; }
}

/* 既存のresponsive.cssが420px以下で.experience-numを非表示にするため、
   番号と連動する進捗ラインも合わせて非表示にする
   （番号のない場所に線だけ残るのを防ぐ） */
@media (max-width: 420px) {
  .experience-story-line, .experience-story-line-fill { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .experience-item { transition: none; }
  .experience-num { transition: none; }
  .experience-story-line-fill { transition: none; }
}

/* ============================================
   LINEフィードバック ストーリーセクション
   ============================================ */
.line-section { background: var(--paper); }

.line-story { position: relative; margin: 48px 0 40px; padding-left: 78px; }
.line-story-line {
  position: absolute; left: 27px; top: 8px; bottom: 8px; width: 2px;
  background: rgba(30,58,95,0.12);
}
.line-story-line-fill {
  position: absolute; left: 27px; top: 8px; width: 2px; height: 0%;
  background: var(--amber-500);
  transition: height 0.7s cubic-bezier(0.22,1,0.36,1);
}

.line-story-step {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  margin-bottom: 56px;
  opacity: 1; transform: none;
}
html.js-reveal-ready .line-story-step {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.line-story-step:last-child { margin-bottom: 0; }
html.js-reveal-ready .line-story-step.is-visible { opacity: 1; transform: translateY(0); }

.line-story-num {
  position: absolute; left: -78px; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--white); border: 2px solid rgba(30,58,95,0.15);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: var(--indigo-900); font-size: 0.95rem;
  flex-shrink: 0; z-index: 2;
  transition: background 0.5s ease, border-color 0.5s ease, color 0.5s ease;
}
.line-story-step.is-visible .line-story-num {
  background: var(--amber-500); border-color: var(--amber-500);
}

.line-story-visual {
  flex-shrink: 0; width: 150px; min-height: 110px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 14px;
}
.line-story-text h3 { color: var(--indigo-900); font-size: 1.1rem; margin-bottom: 8px; }
.line-story-text p { color: var(--ink-soft); font-size: 0.92rem; }

/* --- ステップ01：教室（activityチップ） --- */
.line-classroom-mock { flex-direction: column; gap: 6px; }
.line-chip {
  font-size: 0.72rem; font-weight: 700; color: var(--indigo-900);
  background: var(--paper-warm); border-radius: 999px; padding: 5px 12px;
  white-space: nowrap;
}

/* --- ステップ02：ハイライトカード --- */
.line-highlight-mock { background: var(--indigo-900); }
.line-highlight-card { text-align: center; }
.line-highlight-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  background: var(--amber-500); color: var(--indigo-900);
  border-radius: 999px; padding: 4px 10px; margin-bottom: 8px;
}
.line-highlight-card p { color: var(--white); font-size: 0.82rem; font-weight: 700; }

/* --- ステップ03：LINE風の吹き出し --- */
.line-phone-mock { background: #EAF7EC; }
.line-phone-frame { width: 100%; }
.line-phone-notch { width: 32px; height: 4px; border-radius: 999px; background: rgba(30,58,95,0.15); margin: 0 auto 10px; }
.line-phone-bubble {
  background: var(--white); border-radius: 14px 14px 14px 4px;
  padding: 10px 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.line-phone-bubble-title { font-size: 0.78rem; font-weight: 900; color: var(--green-600); margin-bottom: 4px; }
.line-phone-bubble p { font-size: 0.76rem; color: var(--ink); line-height: 1.5; }

/* --- ステップ04：通知バナー --- */
.line-notif-mock { background: var(--paper-warm); }
.line-notif-banner {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--white); border-radius: 10px; padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); font-size: 0.72rem; color: var(--ink);
}
.line-notif-icon {
  width: 26px; height: 26px; border-radius: 50%; background: var(--green-600);
  color: var(--white); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.8rem;
}
.line-notif-banner strong { color: var(--indigo-900); font-size: 0.76rem; }

/* --- ステップ05：家庭での会話 --- */
.line-chat-mock { flex-direction: column; align-items: stretch; gap: 8px; }
.line-chat-bubble {
  font-size: 0.78rem; font-weight: 700; padding: 8px 12px;
  border-radius: 14px; margin: 0; line-height: 1.5;
}
.line-chat-bubble.parent {
  background: var(--paper-warm); color: var(--indigo-900);
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.line-chat-bubble.child {
  background: var(--amber-500); color: var(--indigo-900);
  border-bottom-right-radius: 4px; align-self: flex-end;
}

/* --- 追加の演出：各ステップが表示された時だけ動く細かい仕掛け --- */

/* STEP1：活動チップがふわふわと浮く */
@keyframes line-chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.line-story-step.is-visible .line-classroom-mock .line-chip:nth-child(1) { animation: line-chip-float 3.2s ease-in-out infinite; }
.line-story-step.is-visible .line-classroom-mock .line-chip:nth-child(2) { animation: line-chip-float 3.2s ease-in-out infinite 0.4s; }
.line-story-step.is-visible .line-classroom-mock .line-chip:nth-child(3) { animation: line-chip-float 3.2s ease-in-out infinite 0.8s; }

/* STEP2：「Great!」バッジがポップイン */
@keyframes line-badge-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.line-highlight-badge { display: inline-block; }
.line-story-step.is-visible .line-highlight-badge {
  animation: line-badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s backwards;
}

/* STEP4：通知アイコンから波紋が広がる */
.line-notif-icon { position: relative; }
.line-notif-icon::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--green-600); opacity: 0;
}
.line-story-step.is-visible .line-notif-icon::after {
  animation: line-notif-pulse 1.5s ease-out 0.35s 2;
}
@keyframes line-notif-pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* STEP5：親子の吹き出しが時間差でポンポンと現れる */
.line-story-step.is-visible .line-chat-bubble.parent {
  animation: line-bubble-in 0.4s ease 0.2s backwards;
}
.line-story-step.is-visible .line-chat-bubble.child {
  animation: line-bubble-in 0.4s ease 0.55s backwards;
}
@keyframes line-bubble-in {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .line-story-step.is-visible .line-classroom-mock .line-chip,
  .line-story-step.is-visible .line-highlight-badge,
  .line-story-step.is-visible .line-notif-icon::after,
  .line-story-step.is-visible .line-chat-bubble.parent,
  .line-story-step.is-visible .line-chat-bubble.child {
    animation: none;
  }
}

.line-story-closing {
  text-align: center; font-size: 1.3rem; font-weight: 900;
  color: var(--indigo-900); margin-top: 8px;
}

@media (max-width: 720px) {
  .line-story { padding-left: 58px; }
  .line-story-line, .line-story-line-fill { left: 19px; }
  .line-story-num { left: -58px; width: 40px; height: 40px; font-size: 0.8rem; }
  .line-story-step { flex-direction: column; align-items: flex-start; gap: 14px; }
  .line-story-visual { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .line-story-step { transition: none; }
  .line-story-line-fill { transition: none; }
}

/* --- FAQ --- */
.faq-list { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--white); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
@media (hover: hover) and (pointer: fine) {
  .faq-list .faq-item:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(30,58,95,0.12); }
}
.faq-item summary { font-weight: 700; color: var(--indigo-900); cursor: pointer; }
.faq-item p { margin-top: 12px; color: var(--ink-soft); }

/* --- お問い合わせフォーム --- */
.contact-section {
  display: none;
}
.contact-section.is-open {
  display: block;
}
.form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.contact-form-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-soft);
}
.contact-form-card .form-field { margin-bottom: 18px; }
.contact-form-card label {
  display: block; font-size: 0.9rem; font-weight: 700;
  color: var(--indigo-900); margin-bottom: 6px;
}
.contact-form-card .required {
  color: var(--amber-500); font-size: 0.75rem; font-weight: 700;
  margin-left: 4px;
}
.contact-form-card input, .contact-form-card select, .contact-form-card textarea {
  width: 100%; padding: 12px; border-radius: 8px;
  border: 1px solid rgba(30,58,95,0.2);
  font-family: var(--font-body); font-size: 1rem;
}
.contact-form-card input[readonly] { background: var(--paper-warm); color: var(--ink-soft); }
.contact-form-card textarea { resize: vertical; }
.contact-form-msg { margin-top: 14px; font-size: 0.9rem; color: #C0392B; text-align: center; }
.contact-form-msg.success { color: var(--green-600); }

/* --- 教室情報 --- */
.access-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  margin-top: 40px; align-items: start;
}
.access-info dl { display: grid; grid-template-columns: 100px 1fr; row-gap: 14px; }
.access-info dt { color: var(--ink-soft); font-weight: 500; }
.access-info dd { margin: 0; font-weight: 700; color: var(--indigo-900); }
.access-cta {
  background: var(--white); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-soft);
}
.access-cta h3 { color: var(--indigo-900); font-size: 1.2rem; margin-bottom: 10px; }
.access-cta p { color: var(--ink-soft); margin-bottom: 20px; }
.access-cta .btn { display: flex; margin-bottom: 12px; }

/* --- フッター --- */
.site-footer { background: var(--indigo-900); color: rgba(255,255,255,0.85); padding: 56px 24px 28px; }
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-brand { margin-bottom: 24px; }
.footer-brand .logo-name { color: var(--white); }
.footer-nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; font-size: 0.9rem; }
.footer-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.footer-cta .btn-ghost { color: var(--white); }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.5); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}