/* 
git add .
git commit -m "update"
git push

git pull
*/

/* ============================
   全体の基本設定
============================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  padding-top: 110px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: #faf7f0;  /* ← こちらに寄せる */
  color: #333;
}




/* ===== 背景グロー全体 ===== */
.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -10;
}


/* ぼんやり発光する丸 */
.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(110px);     /* ← 発光をなめらかに */
  opacity: 0.;           /* ← 少し強めでも透明感 */
}

/* 左上の光 */
.glow-1 {
  width: 420px;
  height: 420px;
  background: rgba(255, 210, 120, 0.45);  /* ← サイトカラーに合わせて暖色 */
  top: -120px;
  left: -60px;
}

/* 右下の光 */
.glow-2 {
  width: 480px;
  height: 480px;
  background: rgba(120, 170, 255, 0.35); /* ← やや青系で調和する */
  bottom: -120px;
  right: -60px;
}



/* =======================================
   固定ヘッダー（Glow 対応・重複排除済み）
======================================= */

header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 0;
    background: transparent; /* ← 透明ヘッダー */
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;        /* ← glow を切る */
    z-index: 1000;

    text-align: center;
    box-shadow: 0 4px 16px rgba(100,140,200,0.12);

    transition: padding 0.3s ease,
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* タイトル */
.site-header h1 {
    font-family: "Cinzel", serif;
    font-weight: bold;
    font-size: 36px;
    transition: font-size 0.3s ease, padding 0.3s ease;
}

/* ナビゲーション */
.site-header nav {
    font-family: "Playfair Display", serif;
    text-align: right;
    margin-top: 8px;
    padding-right: 40px;
    transition: opacity 0.3s ease;
}

.site-header nav a {
    color: #3b2e07;
    text-decoration: none;
    margin-left: 16px;
}

.site-header nav a:hover {
    text-decoration: underline;
}

/* =======================================
   縮小モード（スクロール時）
======================================= */

.site-header.shrink {
    padding: 2px 0; /* ← ヘッダー自体を薄くする */
    background-color: transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.site-header.shrink h1 {
    font-size: 22px;
    line-height: 1.0;
    padding-top: 10px;
}

.site-header.shrink nav {
    opacity: 0;
    pointer-events: none;
}

/* =======================================
   Glow 専用コンテナ（overflow が効く）
======================================= */

.header-glow-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* Glow 本体 */
.header-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.45;
    pointer-events: none;
}

/* 左の青光 */
.glow-left {
    width: 260px;
    height: 260px;
    background: rgba(255, 210, 120, 0.45);
    left: -60px;
    top: -60px;
}

/* 右の青光 */
.glow-right {
    width: 260px; 
    height: 260px;
    background: rgba(40,110,220,0.5);
    right: -70px;
    top: -50px;
}

/* 中央の白光（タイトル後方） */
.glow-center {
    width: 200px;
    height: 50px;
    background: rgba(255,255,255,0.75);
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    filter: blur(100px);
    opacity: 0.8;
}



/* ============================
   section（メイン）
============================ */

.section {
  max-width: 1200px;
  margin: 32px auto;
  padding: 42px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  box-shadow: 0 4px 16px rgba(100,140,200,0.12);
  border-radius: 24px; 
}

.section-wide {
  max-width: 1800px;
}



/* ============================
   Mapページ（島アイコン）
============================ */

.image-stack {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.image-stack img.BaseImage {
  width: 100%;
  display: block;
}

.BaseImage {
  position: relative;
  z-index: 1;
}

/* 共通アイコン設定 */
.Islands img {
  position: absolute;
  z-index: 2;
  opacity: 0.9;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Glow hover */
.Islands img:hover {
  transform: scale(1.2);
  filter:
    drop-shadow(0 0 30px rgba(255,255,215,1))
    drop-shadow(0 0 50px rgba(255,255,255,0.8));
}

/* 各島アイコン位置 */
.Fukue     { width:20%; bottom:5%;   left:1.5%; }
.Hisaka    { width:5%;  bottom:24%;  left:17.5%; }
.Naru      { width:6%;  bottom:28.5%; left:20%; }
.Momiji    { width:4%;  bottom:21%;  left:25%; }
.Wakamatsu { width:6%;  bottom:32.5%; left:24%; }
.Nakadoori { width:16.8%; bottom:31%; left:27.5%; }
.Ojika     { width:5%;  bottom:66%;  left:29%; }
.Uku       { width:6.5%; bottom:72%; left:32%; }

/* ============================
   ボタン
============================ */

button {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

#contactButton {
  background-color: #007bff;
  color: #fff;
}

/* ============================
   Footer
============================ */

.site-footer {
  text-align: center;
  padding: 16px;
  background-color: #333;
  color: #fff;
  margin-top: 32px;
}

/* ============================
   About ページ
============================ */

.about-text {
  text-align: center;
}

.section p {
  margin-bottom: 16px;
  padding: 0 40px;
}

.copy-email {
  color: #0099ff;
  text-decoration: underline;
  font-weight: bold;
  cursor: pointer;
}

.copy-email:hover {
  color: #0077cc;
}

/* 通知トースト */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 9999;
}


/* ============================
   Timeline（History）
============================ */

/* タイムライン全体のコンテナ */
.timeline {
  position: relative;
  padding: 60px 0 80px;
}

/* 中央の縦の柱 */
.timeline::before {
  content: "";
  position: absolute;
  left: 25%;
  top: 0;
  bottom: 0;
  width: 100px;  /* ★ 太めに */
  border-radius: 6px;
  background: linear-gradient(
      rgba(180, 180, 180, 0.6),
      rgba(200, 220, 240, 0.1),
      rgba(0, 70, 140, 0.35)
  );
  transform: translateX(-50%);
}


/* 1つの年（＋出来事）の塊 */
.timeline-block {
  position: absolute;
  left: 0;
  right: 0;
}



.year-label-outside {
  position: absolute;
  left: 25%;          /* 柱の中心 */
  top: 0;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  font-family: "Cinzel", serif;
  font-size: 14px;
  color: #333;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.96),
    rgba(220, 235, 255, 0.85)
  );
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
  z-index: 10;

  /* ★ 追加：フェードイン／アウト */
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ★ 追加：IntersectionObserver で付くクラス */
.year-label-outside.visible {
  opacity: 1;
}




/* 出来事カード共通（フェードアニメ付き） */
/* 出来事カード共通（フェード＋伸縮） */
/* 初期状態：少し下から、透明 */
.event-card {
  position: absolute;
  max-width: 320px;
  padding: 8px 14px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  font-family: "Noto Serif", serif;
  font-size: 14px;
  line-height: 1.5;

  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    max-height 0.4s ease;

  max-height: 60px;
  overflow: hidden;
}

/* カードラッパ：位置だけを持つ「観測用の箱」 */
.event-card-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 8;   
}

.event-card-wrapper:hover {
  z-index: 20;             /* 追加：開いたカードを一番手前に */
}


/* 画面内に入ったとき：上にスッと上がりながら表示 */
/* 入ってきたとき */
.event-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 画面外に出たとき：位置はそのまま、透明になるだけ */
/* 上に抜けていくとき */
.event-card.fade-up {
  opacity: 0;
  transform: translateY(40px);
}
/* 下に抜けていくとき */
.event-card.fade-down {
  opacity: 0;
  transform: translateY(-40px);
}

/* 説明文（詳細）はデフォルトでは閉じておく */
.event-remark {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease,
    margin-top 0.3s ease;
}

/* ホバー or .open クラスが付いたときに展開 */
.event-card:hover,
.event-card.open {
  max-height: 220px;  /* 説明文が全部収まるくらいに調整 */
}

.event-card:hover .event-remark,
.event-card.open .event-remark {
  max-height: 160px;  /* 説明文の最大高さ（必要に応じて調整） */
  opacity: 1;
  margin-top: 4px;
}


/* 左側：World（柱まで 40px） */
.event-card.world {
  right: calc(75% + 40px);
  --to-pillar: 40px;
  text-align: right;
}

/* Japan（柱から 80px 右にカードを置いている） */
.event-card.japan {
  left:  calc(25% + 80px);
  --to-pillar: 80px;
}

/* Nagasaki（柱から 260px 右） */
.event-card.nagasaki {
  left:  calc(25% + 260px);
  --to-pillar: 260px;
}

/* Goto（柱から 460px 右） */
.event-card.goto {
  left:  calc(25% + 460px);
  --to-pillar: 460px;
}



.event-title {
  position: relative;
  display: inline-block;
  font-weight: 700;
  margin-bottom: 0;
  padding-bottom: 3px;   /* 下線との間 */
}



/* 説明文（初期状態では隠す） */


/* タイトルの下線を柱まで左へ伸ばす */
.event-card.japan .event-title::before,
.event-card.nagasaki .event-title::before,
.event-card.goto .event-title::before {
  content: "";
  position: absolute;
  height: 1.6px;
  background: #2a6f9b;
  bottom: -4px;

  /* カードの左端からさらに「柱までの距離」ぶん左に伸ばす */
  left: calc(-1 * var(--to-pillar));

  /* タイトルの幅 ＋ 柱までの距離ぶん線を引く */
  width: calc(100% + var(--to-pillar));
}



/* World 側：タイトルから右に伸びて柱へ届く下線 */
.event-card.world .event-title::before {
  content: "";
  position: absolute;
  height: 1.6px;
  background: #2a6f9b;
  bottom: -4px;

  /* カード右端からさらに「柱までの距離」ぶん右へ伸ばす */
  right: calc(-1 * var(--to-pillar));

  /* タイトルの幅 ＋ 柱までの距離ぶん線を引く */
  width: calc(100% + var(--to-pillar));
}

/* タイトルから年号までの斜め線 */
/* タイトルから年号までの斜め線 */
.connector-line {
  position: absolute;
  height: 2px;
  background: #1a7da5;
  transform-origin: 0 50%;   /* 左端を基準に回転＆伸縮 */
  z-index: 5;

  /* ★ 追加：フェードイン／アウト */
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ★ 追加 */
.connector-line.visible {
  opacity: 1;
}


/* Mapを将来用に残しつつ、いまは非表示 */
.map-hidden {
  display: none;
}

.mission h3 {
  margin-top: 10px;
}

.mission p {
  padding: 0;          /* .section p の padding: 0 40px; を打ち消す */
  margin-top: 14px;
}

/* Mission Statement をヘッダー（h1）と同じフォントに */
.mission,
.mission h3,
.mission p {
  font-family: "Cinzel", serif;
}

/* Missionセクションだけ、カード感を外して余白中心に */
.section-plain {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 80px 0;
  max-width: 1100px;
}

.mission {
  margin: 0 auto;
  padding: 0 24px;
  max-width: 70ch;   /* 1行の長さ制限：読みやすさが一気に上がる */
  text-align: left;
}

.mission-title {
  font-family: "Cinzel", serif;  /* ヘッダーと揃える */
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.15;
  margin-bottom: 10px;
}

.mission-sub {
  font-family: "Cinzel", serif;
  font-size: clamp(1.05rem, 1.2vw, 1.25rem);
  opacity: 0.85;
  margin-bottom: 28px;
}

/* いちばん伝えたい1文（ここを大きく） */
.mission-lead {
  font-family: "Cinzel", serif;
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  line-height: 1.45;
  margin-bottom: 36px;
}

/* あなたのCSSは .section p に padding: 0 40px が入ってるので、Mission内は打ち消す :contentReference[oaicite:4]{index=4} */
.mission p {
  padding: 0;
}

.mission-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
}

.mission-points li {
  position: relative;
  padding-left: 56px; /* 左に番号スペース */
}

.mission-points li::before {
  content: "0" counter(item);
  counter-increment: item;
  position: absolute;
  left: 0;
  top: 0;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  opacity: 0.7;
}
.mission-points { counter-reset: item; }

.mission-points p {
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.75;
  margin: 0;
}

/* JSが有効な時だけ intro を表示（JS無効でもサイトが見えるように） */
.intro-overlay {
  display: none;
}

html.js .intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;

  background: #faf7f0; /* あなたの背景色に合わせる */
  opacity: 0;
  pointer-events: none;

  transition: opacity 0.6s ease;
}

html.js .intro-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

html.js .intro-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

body.intro-active {
  overflow: hidden; /* intro中はスクロールさせない */
}

.intro-inner {
  max-width: 900px;
  padding: 0 24px;
  text-align: center;
}

.intro-brand {
  font-family: "Cinzel", serif; /* ヘッダーと同じ */
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-bottom: 14px;
}

.intro-mission {
  font-family: "Cinzel", serif; /* ヘッダーと同じ */
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1.15;
}

.intro-sub {
  margin-top: 18px;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  opacity: 0.75;
}
