/* =========================================================
   日本フラスタ協会 公式サイト — style.css
   コンセプト "Night Stage":
   暗転したライブ会場の紺黒を地に、ステージ照明のマゼンタと
   アンバーを差すテック系デザイン。ダークテーマが基本で、
   prefers-color-scheme: light でライトテーマに切り替わる。
   配色・フォントはすべて下記のCSS変数で管理する。
   ========================================================= */

:root {
  color-scheme: dark;

  /* 地色(暗転した客席) */
  --color-bg: #0b0d16;
  --color-bg-deep: #070810;
  --color-surface: #131627;
  --color-surface-2: #1a1e33;
  --color-line: rgba(154, 166, 210, 0.16);
  --color-line-strong: rgba(154, 166, 210, 0.34);

  /* 文字 */
  --color-text: #e9ecf8;
  --color-text-soft: #9aa3c4;

  /* ステージ照明 */
  --color-bloom: #f4548f;   /* マゼンタ(花・スポットライト) */
  --color-amber: #f2a23c;   /* アンバー(電飾・暖色照明) */
  --color-violet: #8f7bff;  /* 第3のアクセント(タイル装飾のみ) */
  --color-bloom-glow: rgba(244, 84, 143, 0.45);
  --color-amber-glow: rgba(242, 162, 60, 0.38);
  --color-violet-glow: rgba(143, 123, 255, 0.32);
  --grad-stage: linear-gradient(115deg, var(--color-bloom), var(--color-amber));

  /* 部品 */
  --color-header-bg: rgba(11, 13, 22, 0.78);
  --color-word-stroke: rgba(154, 166, 210, 0.22);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.42);
  --radius: 16px;

  /* 書体: Plexファミリーで統一(和文=Sans JP / 欧文ラベル・日付=Mono) */
  --font-sans: "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --color-bg: #f4f5fa;
    --color-bg-deep: #e9ebf4;
    --color-surface: #ffffff;
    --color-surface-2: #f0f1f8;
    --color-line: rgba(23, 27, 51, 0.12);
    --color-line-strong: rgba(23, 27, 51, 0.28);
    --color-text: #191c30;
    --color-text-soft: #5b6285;
    --color-bloom: #d9316f;
    --color-amber: #c07714;
    --color-violet: #6553e8;
    --color-bloom-glow: rgba(217, 49, 111, 0.2);
    --color-amber-glow: rgba(192, 119, 20, 0.18);
    --color-violet-glow: rgba(101, 83, 232, 0.16);
    --color-header-bg: rgba(244, 245, 250, 0.82);
    --color-word-stroke: rgba(23, 27, 51, 0.16);
    --shadow-card: 0 16px 40px rgba(25, 28, 48, 0.1);
  }
}

/* ---------- リセット・ベース ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-bloom);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

::selection {
  background: var(--color-bloom);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-bloom);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

section {
  padding: 88px 0;
}

/* ---------- 共通タイポグラフィ ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-amber);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad-stage);
  border-radius: 2px;
  flex: none;
}

.section-head {
  margin-bottom: 48px;
}

.section-head .eyebrow {
  margin-bottom: 14px;
}

.section-head.is-center {
  text-align: center;
}

.section-head.is-center .eyebrow {
  justify-content: center;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 14px;
  color: var(--color-text-soft);
  max-width: 40em;
}

.section-head.is-center .section-lead {
  margin-inline: auto;
}

.grad-text {
  background: var(--grad-stage);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- ランダム線背景(会場に張り巡らされた光の残像のメタファー) ---------- */

.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* ヒーローでは写真パネル(.hero-photos)より手前・コンテンツより奥に線を描く */
  z-index: 1;
  background-image: url("../images/lines-bg.svg");
  background-size: 1400px 900px;
  /* 線ははっきり見せず、気配程度に留める(各線の濃さはSVG側のopacityと二重に効く) */
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 30%, transparent 78%);
}

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-line);
  transition: box-shadow 0.3s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  /* ナビは .main-nav の margin-left: auto で右へ寄せる(言語切替をその右に置くため) */
  justify-content: flex-start;
  gap: 24px;
  padding: 18px 0;
  transition: padding 0.3s ease;
}

.site-header.is-scrolled .container {
  padding: 10px 0;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 6px;
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
  padding: 8px 14px;
  border-radius: 8px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
  text-decoration: none;
}

.main-nav a.is-current {
  color: var(--color-text);
}

.main-nav a.is-current::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-stage);
}

/* モバイルナビ開閉ボタン */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line-strong);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle span::before {
  left: 0;
  right: 0;
  top: -7px;
}

.nav-toggle span::after {
  left: 0;
  right: 0;
  top: 7px;
}

.nav-toggle.is-open span {
  background: transparent;
}

.nav-toggle.is-open span::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* 言語切替(JA⇔EN)。全ページのヘッダー右端に置くピル型リンク */
.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--color-text-soft);
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-switch:hover {
  color: var(--color-text);
  border-color: var(--color-bloom);
  background: var(--color-surface-2);
  text-decoration: none;
}

/* ---------- ヒーロー(フルビューポート) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  /* sticky ヘッダー(約72px)を差し引いて、マーキーまで含めた全体が初期画面に収まるようにする */
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 60% 52% at 84% 8%, var(--color-bloom-glow), transparent 62%),
    radial-gradient(ellipse 55% 46% at 6% 92%, var(--color-amber-glow), transparent 62%),
    var(--color-bg-deep);
}

/* フラスタ写真パネル: 会場入口に並ぶスタンド花をイメージした3枚のトリプティック。
   写真そのものは鮮やかなまま、::after のオーバーレイ(テーマの地色でミックス)で
   暗転させて "Night Stage" のトーンと文字の可読性を保つ */
.hero-photos {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  pointer-events: none;
}

.hero-photo {
  position: relative;
  overflow: hidden;
}

.hero-photo + .hero-photo {
  border-left: 1px solid var(--color-line);
}

/* 写真本体は ::before に持たせ、ゆっくりズームドリフトさせる(ケンバーンズ) */
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  /* 文字の可読性優先で写真自体もひと段階落とす */
  filter: brightness(0.8) saturate(0.92);
  animation: photo-drift 30s ease-in-out infinite alternate;
}

.hp-1::before { background-image: url("../images/hero-flasta-1.jpg"); }
.hp-2::before { background-image: url("../images/hero-flasta-2.jpg"); animation-duration: 38s; }
.hp-3::before { background-image: url("../images/hero-flasta-3.jpg"); animation-duration: 46s; }

@keyframes photo-drift {
  from { transform: scale(1.03) translateY(-0.8%); }
  to   { transform: scale(1.12) translateY(0.8%); }
}

/* 暗幕オーバーレイ: 地色(--color-bg-deep)とミックスするため両テーマに自動追従する */
.hero-photos::after {
  content: "";
  position: absolute;
  inset: 0;
  /* color-mix非対応環境向けフォールバック */
  background: rgba(7, 8, 16, 0.84);
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--color-bg-deep) 92%, transparent) 0%,
      color-mix(in srgb, var(--color-bg-deep) 68%, transparent) 38%,
      color-mix(in srgb, var(--color-bg-deep) 62%, transparent) 62%,
      color-mix(in srgb, var(--color-bg-deep) 92%, transparent) 100%),
    linear-gradient(105deg,
      color-mix(in srgb, var(--color-bg-deep) 80%, transparent) 0%,
      color-mix(in srgb, var(--color-bg-deep) 46%, transparent) 58%,
      color-mix(in srgb, var(--color-bg-deep) 62%, transparent) 100%);
}

/* 写真背景の上でも見出し・リード文が沈まないよう、地色のにじみで文字を浮かせる */
.hero-title,
.hero-lead {
  text-shadow: 0 2px 30px var(--color-bg-deep), 0 1px 10px var(--color-bg-deep);
}

.petal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* オーロラグロー: ゆっくり漂う2つの発光ブロブ */
.hero-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-aurora::before,
.hero-aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.hero-aurora::before {
  width: 56vw;
  height: 56vw;
  top: -18vw;
  right: -12vw;
  background: radial-gradient(circle, var(--color-bloom-glow), transparent 65%);
  animation: aurora-a 14s ease-in-out infinite alternate;
}

.hero-aurora::after {
  width: 48vw;
  height: 48vw;
  bottom: -20vw;
  left: -10vw;
  background: radial-gradient(circle, var(--color-amber-glow), transparent 65%);
  animation: aurora-b 18s ease-in-out infinite alternate;
}

@keyframes aurora-a {
  to {
    transform: translate(-8vw, 8vw) scale(1.15);
  }
}

@keyframes aurora-b {
  to {
    transform: translate(9vw, -7vw) scale(1.1);
  }
}

/* ステージスポットライトビーム(上から差す2本の光) */
.hero-beam {
  position: absolute;
  top: -14%;
  width: 30vw;
  height: 135%;
  pointer-events: none;
  filter: blur(22px);
  opacity: 0.7;
  transform-origin: top center;
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
}

.hero-beam-l {
  left: 2%;
  background: linear-gradient(to bottom, var(--color-bloom-glow), transparent 72%);
  transform: rotate(15deg);
  animation: beam-sway-l 9s ease-in-out infinite alternate;
}

.hero-beam-r {
  right: 2%;
  background: linear-gradient(to bottom, var(--color-amber-glow), transparent 72%);
  transform: rotate(-15deg);
  animation: beam-sway-r 11s ease-in-out infinite alternate;
}

@keyframes beam-sway-l {
  from { transform: rotate(19deg); }
  to   { transform: rotate(9deg); }
}

@keyframes beam-sway-r {
  from { transform: rotate(-19deg); }
  to   { transform: rotate(-9deg); }
}

/* 巨大アウトライン文字(背景装飾) */
.hero-bg-word {
  position: absolute;
  right: -0.06em;
  bottom: 0.32em;
  z-index: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(6rem, 19vw, 18rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-word-stroke);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 140px 0 190px;
}

.hero .eyebrow {
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin-bottom: 30px;
}

.hero-title em {
  font-style: normal;
  text-shadow: 0 0 42px var(--color-bloom-glow);
}

/* 行ごとのマスク出現(下から迫り上がる) */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.hero-title .line > span {
  display: inline-block;
  transform: translateY(115%);
  animation: line-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-title .line:nth-child(1) > span { animation-delay: 0.15s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.3s; }

@keyframes line-up {
  to {
    transform: translateY(0);
  }
}

/* h1自体は .load-in の子要素アニメーションから除外(行マスクに任せる) */
.load-in > .hero-title {
  opacity: 1;
  transform: none;
  animation: none;
}

.hero-lead {
  max-width: 36em;
  color: var(--color-text-soft);
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* 最下部のマーキー(流れる英字テープ) */
.hero-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  border-top: 1px solid var(--color-line);
  padding: 15px 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--color-text-soft);
  padding-right: 3.5em;
}

.marquee-track .marquee-accent {
  color: var(--color-amber);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* スクロールキュー */
.scroll-cue {
  position: absolute;
  right: 44px;
  bottom: 78px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--color-text-soft);
  writing-mode: vertical-rl;
}

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--color-bloom), transparent);
  animation: cue-drop 1.8s ease-in-out infinite;
}

@keyframes cue-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* 背景写真のクレジット(CC BY-SA表記。マーキーのすぐ上・左下に小さく置く) */
.hero-credit {
  position: absolute;
  left: 20px;
  bottom: 58px;
  z-index: 2;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  opacity: 0.62;
}

.hero-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-credit a:hover {
  color: var(--color-amber);
}

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 14px 30px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-accent {
  color: #fff;
  background: var(--grad-stage);
  box-shadow: 0 10px 30px var(--color-bloom-glow);
}

.btn-accent:hover {
  box-shadow: 0 16px 40px var(--color-bloom-glow);
}

.btn-outline {
  color: var(--color-text);
  border: 1px solid var(--color-line-strong);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--color-bloom);
  background: var(--color-surface-2);
}

/* ---------- ノードカード(枠線+スポットライト+3Dチルト) ---------- */

.node-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  perspective: 900px;
}

.node-card:hover {
  border-color: var(--color-line-strong);
  box-shadow: var(--shadow-card);
}

/* カーソル追従スポットライト(JSが --mx / --my を更新する) */
.node-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx) var(--my), var(--color-bloom-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.node-card:hover::after {
  opacity: 0.55;
}

.tilt-layer {
  transform-style: preserve-3d;
  transition: transform 0.25s ease;
  border-radius: inherit;
  height: 100%;
}

/* ---------- パルスライン(セクション区切り) ---------- */

.pulse-divider {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.pulse-divider span {
  position: relative;
  width: min(520px, 70%);
  height: 2px;
  border-radius: 2px;
  background: var(--grad-stage);
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(0.25, 1, 0.4, 1);
}

.pulse-divider.is-visible span {
  transform: scaleX(1);
}

.pulse-divider span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-amber);
  box-shadow: 0 0 12px var(--color-amber-glow), 0 0 0 4px var(--color-amber-glow);
}

/* ---------- グリッドレイアウト ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- トップ: 団体紹介 ---------- */

.intro-plate {
  padding: 46px 50px;
}

.intro-plate .eyebrow {
  margin-bottom: 14px;
}

.intro-plate .section-title {
  margin-bottom: 16px;
}

.intro-lead {
  color: var(--color-text-soft);
  max-width: 46em;
}

/* ---------- トップ: 活動の様子(ベントーグリッド) ----------
   均一な写真グリッドではなく、大小のタイルを組み合わせたモザイク。
   実写真が用意でき次第、各タイルの背景に差し替える。 */

.activities-preview {
  position: relative;
  background: var(--color-bg-deep);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 150px;
  gap: 18px;
}

.bento-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.4, 1), border-color 0.3s ease, box-shadow 0.3s ease,
    opacity 0.7s ease;
}

.bento-tile:hover {
  transform: translateY(-5px);
  border-color: var(--color-line-strong);
  box-shadow: var(--shadow-card);
}

/* タイルごとの色ワッシュ(左上から差す照明) */
.bento-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tile-wash, transparent), transparent 70%);
  pointer-events: none;
}

/* 右下の大きなリング装飾 */
.bento-tile::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -40px;
  bottom: -40px;
  border-radius: 50%;
  border: 1px solid var(--color-line-strong);
  pointer-events: none;
}

.bento-a {
  grid-column: span 2;
  grid-row: span 2;
  --tile-wash: var(--color-bloom-glow);
}

.bento-a::after {
  width: 260px;
  height: 260px;
  right: -70px;
  bottom: -70px;
}

.bento-b {
  grid-column: span 2;
  --tile-wash: var(--color-amber-glow);
}

.bento-c {
  --tile-wash: var(--color-violet-glow);
}

.bento-d {
  --tile-wash: var(--color-bloom-glow);
}

.bento-label {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
}

.bento-note {
  position: relative;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* ---------- トップ: お知らせ(チェンジログ風タイムライン) ---------- */

.news-log {
  max-width: 720px;
  margin-inline: auto;
  border-left: 2px solid var(--color-line-strong);
  padding-left: 34px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.news-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-bloom);
  box-shadow: 0 0 0 4px var(--color-bloom-glow);
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--color-amber);
}

.news-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  margin-right: 10px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  color: var(--color-text-soft);
}

/* ---------- 下層ページ共通ヘッダー ---------- */

.page-header {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  background:
    radial-gradient(ellipse 60% 70% at 82% 0%, var(--color-bloom-glow), transparent 70%),
    var(--color-bg-deep);
  border-bottom: 1px solid var(--color-line);
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header .eyebrow {
  margin-bottom: 14px;
}

.page-header h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.page-header p:not(.eyebrow) {
  color: var(--color-text-soft);
}

/* ---------- 活動内容カード ---------- */

.activity-card {
  padding: 38px 34px;
}

.activity-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border-radius: 14px;
  border: 1px solid var(--color-line-strong);
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bloom);
}

.activity-icon svg {
  width: 30px;
  height: 30px;
}

/* カードごとにアクセント色を交互に変えて単調さを避ける */
.grid-2 > .node-card:nth-child(even) .activity-icon {
  color: var(--color-amber);
}

.activity-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.activity-card p {
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

/* ---------- 団体概要ページ ---------- */

.founding-quote {
  padding: 46px 50px;
}

.founding-quote p {
  max-width: 46em;
  color: var(--color-text-soft);
}

.greeting {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 46px 50px;
  align-items: start;
}

.greeting-photo {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px dashed var(--color-line-strong);
  background: linear-gradient(150deg, var(--color-surface-2), var(--color-surface));
  margin-bottom: 14px;
}

.greeting-name {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.greeting-role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
}

.greeting > div:last-child p {
  color: var(--color-text-soft);
}

.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.info-table th,
.info-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

.info-table th {
  width: 160px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-amber);
  background: var(--color-surface-2);
}

/* ---------- お問い合わせページ ---------- */

.contact-form-frame {
  max-width: 760px;
  margin-inline: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-form-frame iframe {
  width: 100%;
  min-height: 900px;
  border: none;
  display: block;
}

.form-placeholder {
  padding: 90px 32px;
  text-align: center;
  color: var(--color-text-soft);
}

.icon-ring {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 1px solid var(--color-line-strong);
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bloom);
}

.icon-ring svg {
  width: 32px;
  height: 32px;
}

.icon-ring::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--color-bloom);
  animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.contact-alt {
  margin-top: 34px;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

/* 自前フォーム(Cloudflare Pages Functions の /api/contact へ送信) */
.contact-form {
  display: grid;
  gap: 24px;
  padding: 44px 40px;
}

.form-field {
  display: grid;
  gap: 9px;
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
}

.req {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--color-bloom);
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 2px 7px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 15px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-line-strong);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 180px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-bloom);
  box-shadow: 0 0 0 3px var(--color-bloom-glow);
}

/* ハニーポット(スパムボット対策)。人間には見えない位置に飛ばす */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: 0.95rem;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--color-line-strong);
  background: var(--color-surface-2);
}

.form-status.is-success {
  color: var(--color-amber);
  border-color: var(--color-amber);
}

.form-status.is-error {
  color: var(--color-bloom);
  border-color: var(--color-bloom);
}

.contact-form .btn {
  justify-self: start;
}

/* ---------- ガイドラインページ ---------- */

/* 目次 */
.guide-toc {
  max-width: 880px;
  margin: 0 auto 60px;
  padding: 26px 30px 30px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.guide-toc ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 28px;
  margin-top: 16px;
}

.guide-toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--color-text-soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.guide-toc a:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
  text-decoration: none;
}

/* 「01」等のセクション番号(グラデーション文字) */
.guide-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78em;
  letter-spacing: 0.08em;
  background: var(--grad-stage);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}

/* 本文 */
.guide-body {
  max-width: 880px;
  margin-inline: auto;
  display: grid;
  gap: 58px;
}

.guide-section {
  /* 目次アンカーで飛んだときにstickyヘッダーへ隠れないようにする */
  scroll-margin-top: 96px;
}

.guide-section > h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-line);
}

.guide-section > p,
.guide-sub > p {
  color: var(--color-text-soft);
  line-height: 1.95;
}

.guide-section > p + p,
.guide-sub > p + p {
  margin-top: 12px;
}

.guide-sub {
  margin-top: 32px;
}

.guide-sub > h3 {
  position: relative;
  font-size: 1.08rem;
  padding-left: 16px;
  margin-bottom: 14px;
}

.guide-sub > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  bottom: 0.16em;
  width: 3px;
  border-radius: 2px;
  background: var(--grad-stage);
}

/* 番号付きリスト(モノスペースの2桁番号) */
.guide-list {
  list-style: none;
  counter-reset: guide;
  margin-top: 14px;
}

.guide-list > li {
  counter-increment: guide;
  position: relative;
  padding: 8px 0 8px 46px;
  color: var(--color-text-soft);
  line-height: 1.8;
}

.guide-list > li + li {
  border-top: 1px solid var(--color-line);
}

.guide-list > li::before {
  content: counter(guide, decimal-leading-zero);
  position: absolute;
  left: 6px;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-bloom);
}

/* 立場ごとの負担・リスク(3枚カード) */
.guide-parties {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.guide-party {
  padding: 22px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 12px;
}

.guide-party h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.98rem;
  margin-bottom: 10px;
}

.guide-party h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-stage);
  flex-shrink: 0;
}

.guide-party p {
  font-size: 0.92rem;
  color: var(--color-text-soft);
  line-height: 1.8;
}

/* 補足・注意書き */
.guide-note {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--color-line-strong);
  border-radius: 10px;
  background: var(--color-surface-2);
  color: var(--color-text-soft);
  font-size: 0.92rem;
  line-height: 1.8;
}

@media (max-width: 700px) {
  .guide-toc ol {
    grid-template-columns: 1fr;
  }

  .guide-parties {
    grid-template-columns: 1fr;
  }

  .guide-section > h2 {
    font-size: 1.25rem;
  }
}

/* ---------- フッター(バックステージ: 両テーマとも暗色で固定) ---------- */

.site-footer {
  background: #0b0d16;
  color: #e9ecf8;
  border-top: 2px solid transparent;
  border-image: linear-gradient(115deg, #f4548f, #f2a23c) 1;
  padding: 56px 0 36px;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 36px;
}

.site-footer .brand {
  color: #e9ecf8;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #9aa3c4;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #6b7394;
  text-align: center;
}

/* ---------- ページ間遷移(対応ブラウザのみクロスフェード) ---------- */

@view-transition {
  navigation: auto;
}

/* ---------- スクロールリビール ---------- */

.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.25, 1, 0.4, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* グリッド内のカード・タイルは1枚ずつ時間差で現れる */
.grid > .reveal:nth-child(2),
.bento > .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid > .reveal:nth-child(3),
.bento > .reveal:nth-child(3) { transition-delay: 0.2s; }
.grid > .reveal:nth-child(4),
.bento > .reveal:nth-child(4) { transition-delay: 0.3s; }
.grid > .reveal:nth-child(5),
.bento > .reveal:nth-child(5) { transition-delay: 0.4s; }

/* ---------- ページ読み込み時の順次出現(ヒーローのみ) ---------- */

.load-in > * {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.9s cubic-bezier(0.25, 1, 0.4, 1) forwards;
}

.load-in > *:nth-child(1) { animation-delay: 0.05s; }
.load-in > *:nth-child(2) { animation-delay: 0.18s; }
.load-in > *:nth-child(3) { animation-delay: 0.32s; }
.load-in > *:nth-child(4) { animation-delay: 0.46s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 860px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }

  .greeting {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .greeting-photo {
    max-width: 220px;
  }

  .nav-toggle {
    display: block;
  }

  /* モバイルではナビがドロップダウン化して通常フローから抜けるため、
     言語切替を右へ寄せてハンバーガーの隣に置く */
  .lang-switch {
    margin-left: auto;
  }

  .main-nav {
    margin-left: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-header-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-line);
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 12px 24px 20px;
  }

  .main-nav a {
    display: block;
    padding: 13px 12px;
    font-size: 0.95rem;
  }

  .main-nav a.is-current::after {
    left: 12px;
    right: auto;
    width: 30px;
    bottom: 6px;
  }
}

@media (max-width: 640px) {
  section {
    padding: 64px 0;
  }

  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-tile {
    min-height: 140px;
    gap: 24px;
  }

  .bento-a,
  .bento-b {
    grid-column: span 1;
  }

  .bento-a {
    grid-row: span 1;
    min-height: 200px;
  }

  .hero-inner {
    padding: 110px 0 150px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.3rem);
  }

  .scroll-cue {
    display: none;
  }

  .hero-bg-word {
    bottom: 0.6em;
  }

  .contact-form {
    padding: 32px 22px;
  }

  .intro-plate,
  .founding-quote,
  .greeting {
    padding: 32px 26px;
  }

  .info-table th {
    width: 110px;
    padding: 14px 16px;
  }

  .info-table td {
    padding: 14px 16px;
  }

  .news-log {
    padding-left: 24px;
  }

  .news-item::before {
    left: -30px;
  }
}

/* ---------- prefers-reduced-motion: 動きをすべて無効化 ---------- */

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .load-in > * {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
    transition-delay: 0s;
  }

  .bento-tile,
  .bento-tile:hover {
    transform: none;
    transition: none;
  }

  .pulse-divider span {
    transform: scaleX(1);
    transition: none;
  }

  .tilt-layer {
    transform: none !important;
    transition: none;
  }

  .node-card::after {
    display: none;
  }

  .icon-ring::before {
    animation: none;
    opacity: 0;
  }

  .petal-canvas {
    display: none;
  }

  .hero-aurora::before,
  .hero-aurora::after,
  .hero-beam-l,
  .hero-beam-r {
    animation: none;
  }

  .hero-photo::before {
    animation: none;
    transform: none;
  }

  .hero-title .line > span {
    transform: none;
    animation: none;
  }

  .marquee-track {
    animation: none;
  }

  .scroll-cue {
    display: none;
  }

  .btn,
  .btn:hover {
    transform: none;
  }
}
