/*
Theme Name: Kikusato Lab
Theme URI: https://kikusato.w.waseda.jp/
Author: Kikusato Lab.
Description: 喜久里研究室(エネルギーネットワーク研究室)公式サイトテーマ。2026年リニューアル版。
Version: 1.0.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: kikusato
*/
/* ==========================================================
   喜久里研究室サイト モックアップ
   配色はアイコン(送電鉄塔)の2色をベースに展開:
     グリーン #007E4F / ライトグレー #D9D9D9
   ========================================================== */

:root {
  --green:       #007E4F;   /* ブランドカラー(アイコンの緑) */
  --green-dark:  #00603C;   /* ホバー・強調 */
  --green-deep:  #0A2E1F;   /* ヒーローオーバーレイ・フッター */
  --green-tint:  #EDF6F1;   /* 淡い背景 */
  --gray:        #D9D9D9;   /* アイコンのグレー(罫線・区切り) */
  --ink:         #1C2B24;   /* 本文(緑がかった黒) */
  --muted:       #5F6F67;   /* 補足テキスト */
  --bg:          #FFFFFF;

  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", sans-serif;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.9;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--green); }

/* ---------- SVGライブラリ(assets/svg/sprite.svg)共通 ----------
   メイン色 = color / サブ色 = --svg-accent で使う側から制御する */
.svg-icon,
.svg-illust {
  display: block;
  color: var(--green);
  --svg-accent: var(--gray);
}
.svg-icon { width: 24px; height: 24px; }
.svg-illust { width: 180px; height: 180px; }  /* 縦横比は使う側で上書き(鉄塔は 180×240) */

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 40px; width: auto; }
.brand .brand-ja { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; }
.brand .brand-en { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; display: block; line-height: 1.3; }

.global-nav { display: flex; gap: clamp(0.8rem, 2vw, 1.6rem); }
.global-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.global-nav a:hover { color: var(--green); border-bottom-color: var(--green); }

/* ---------- 期間限定バナー(告知用・不要になったらHTMLごと削除) ---------- */
.notice-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem clamp(1rem, 4vw, 2rem);
  font-size: 0.9rem;
  transition: background 0.2s;
}
.notice-banner:hover { background: var(--green-dark); }
.nb-tag {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 0.1rem 0.75rem;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.nb-text { font-weight: 600; }
.notice-banner .svg-icon { width: 18px; height: 18px; color: #fff; flex-shrink: 0; }
@media (max-width: 640px) {
  .notice-banner { gap: 0.5rem; padding: 0.55rem 1rem; font-size: 0.82rem; }
  .notice-banner .svg-icon { display: none; }
}

/* ---------- ヒーロー(インタラクティブ電力ネットワーク) ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  background: #FBFDFC;
  color: var(--ink);
  overflow: hidden;
  cursor: crosshair;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.2rem, 5vw, 2.5rem);
  width: 100%;
  pointer-events: none;   /* クリックはキャンバス(系統)へ通す */
}

.hero-lab-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--green);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}

.hero .hero-en {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 2.2rem;
}

.hero-buttons a { pointer-events: auto; }

.hero-hint {
  position: absolute;
  bottom: 0.9rem;
  right: 1.3rem;
  z-index: 2;
  font-size: 0.72rem;
  color: var(--muted);
  pointer-events: none;
}

@media (max-width: 820px) {
  /* スマホ: グラフが上部にあるので、テキストは下寄せ */
  .hero { align-items: flex-end; }
  .hero-inner { padding-bottom: 3.5rem; }
  .hero-hint { right: auto; left: 1.2rem; }
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.8rem 2.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--green); color: #fff; border: 2px solid var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }

/* ---------- セクション共通 ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.2rem, 5vw, 2.5rem); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section.tinted { background: var(--green-tint); }

.section-heading { margin-bottom: 2.2rem; }
.section-heading .en {
  display: block;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1.3;
}
.section-heading .ja {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.14em;
  border-left: 4px solid var(--green);
  padding-left: 0.6rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.about-text p { margin-bottom: 1.2rem; }
.about-text .en { color: var(--muted); font-size: 0.92rem; line-height: 1.8; }
.about-note {
  font-size: 0.9rem;
  background: var(--green-tint);
  border-left: 4px solid var(--green);
  padding: 0.8rem 1.1rem;
  border-radius: 0 8px 8px 0;
}
.about-photo img {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(10, 46, 31, 0.18);
}
.about-photo figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; text-align: right; }

/* ---------- Research topics ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.8rem);
  margin-bottom: 2.2rem;
}

/* 画像カード型: 研究図版サムネイル+アイコンバッジ */
.topic-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(10, 46, 31, 0.08);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.2s, transform 0.2s;
}
.topic-card:hover { box-shadow: 0 12px 30px rgba(10, 46, 31, 0.16); transform: translateY(-3px); }
.topic-thumb { position: relative; height: 150px; }
.topic-thumb img { width: 100%; height: 100%; object-fit: cover; }
.topic-badge {
  position: absolute;
  left: 1.1rem;
  bottom: -22px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(10, 46, 31, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.topic-badge .svg-icon { width: 26px; height: 26px; }
.topic-body { padding: 2rem 1.3rem 1.4rem; }
.topic-body .en { font-size: 0.75rem; color: var(--green); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.topic-body h3 { font-size: 1.02rem; margin: 0.25rem 0 0.5rem; letter-spacing: 0.04em; }
.topic-body p { font-size: 0.85rem; color: var(--muted); }

.section-cta { text-align: center; }

/* ---------- News ---------- */
.news-list { list-style: none; border-top: 1px solid var(--gray); }
.news-list li { border-bottom: 1px solid var(--gray); }
.news-list a {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.1rem 0.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s;
}
.news-list a:hover { background: var(--green-tint); }
.news-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.news-title { font-size: 0.98rem; }
.news-more { margin-top: 1.8rem; text-align: center; }

/* ---------- Access ---------- */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.access-info address { font-style: normal; margin-bottom: 1rem; }
.access-info .en { color: var(--muted); font-size: 0.9rem; }
.access-map iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(10, 46, 31, 0.12);
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem clamp(1.2rem, 5vw, 2.5rem);
  text-align: center;
}
.site-footer .footer-logo {
  display: block;
  width: 36px;
  height: 48px;
  margin: 0 auto 0.8rem;
  color: #fff;                              /* メイン色: 白 */
  --svg-accent: rgba(255, 255, 255, 0.45);  /* サブ色: 半透明白 */
}
.site-footer .footer-name { font-weight: 700; letter-spacing: 0.08em; }
.site-footer .copyright { font-size: 0.78rem; color: rgba(255, 255, 255, 0.55); margin-top: 0.6rem; }

/* ---------- 下層ページ共通 ---------- */
.global-nav a.active { color: var(--green); border-bottom-color: var(--green); }

.page-hero {
  background:
    linear-gradient(100deg, rgba(10, 46, 31, 0.92) 0%, rgba(0, 126, 79, 0.75) 100%);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.2rem, 5vw, 2.5rem);
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: 0.06em; line-height: 1.3; }
.page-hero .ja {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #B5D8C8;
  border-left: 4px solid #B5D8C8;
  padding-left: 0.6rem;
}

/* Research 詳細 */
.topic-detail {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.topic-detail + .topic-detail { border-top: 1px solid var(--gray); }
.topic-detail.reverse .topic-text { order: 2; }
.topic-detail.reverse .topic-figure { order: 1; }
.topic-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.topic-head .svg-icon { width: 44px; height: 44px; flex-shrink: 0; }
.topic-head h2 { font-size: 1.35rem; line-height: 1.4; }
.topic-head .ja { display: block; font-size: 0.85rem; color: var(--green); font-weight: 600; letter-spacing: 0.1em; }
.topic-text p { margin-bottom: 1rem; }
.topic-text .en { color: var(--muted); font-size: 0.9rem; }
.topic-figure img { border-radius: 12px; box-shadow: 0 6px 22px rgba(10, 46, 31, 0.12); }
.keywords { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.3rem; }
.keywords .kw {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-tint);
  border: 1px solid rgba(0, 126, 79, 0.25);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  letter-spacing: 0.03em;
}

/* Member */
.pi-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  background: #fff;
  border: 1px solid var(--gray);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 3rem;
}
.pi-card img { border-radius: 12px; }
.pi-card .pi-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.2rem; }
.pi-card .pi-name-en { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.member-group { margin-bottom: 2.5rem; }
.member-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8rem; }
.member-list li {
  display: flex; align-items: center; gap: 0.8rem;
  background: #fff; border: 1px solid var(--gray); border-radius: 10px;
  padding: 0.8rem 1.1rem;
}
.member-list .svg-icon { width: 28px; height: 28px; flex-shrink: 0; }
.member-list .name { font-weight: 700; }
.member-list .name-en { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 400; }

/* Activity: 年間スケジュール */
.schedule { list-style: none; max-width: 640px; }
.schedule li { display: flex; gap: 1.2rem; position: relative; padding-bottom: 1.4rem; }
.schedule li::before {
  content: "";
  position: absolute; left: 29px; top: 10px; bottom: -6px;
  width: 2px; background: var(--gray);
}
.schedule li:last-child::before { display: none; }
.schedule .month {
  flex-shrink: 0; width: 60px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #fff;
  border-radius: 8px; font-weight: 700; font-size: 0.9rem;
  position: relative; z-index: 1;
}
.schedule .events-body { padding-top: 0.25rem; }
.stage-block { border-left: 4px solid var(--green); padding: 0.2rem 0 0.2rem 1.2rem; margin-bottom: 1.8rem; }
.stage-block h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }

/* News ページ */
.news-page-list { max-width: 760px; }

@media (max-width: 860px) {
  .topic-detail { grid-template-columns: 1fr; }
  .topic-detail.reverse .topic-text { order: 0; }
  .topic-detail.reverse .topic-figure { order: 0; }
  .topic-figure { order: -1; }
  .pi-card { grid-template-columns: 1fr; }
  .pi-card img { max-width: 260px; }
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .about-grid, .access-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; }
}

@media (max-width: 640px) {
  .site-header { flex-direction: column; height: auto; padding: 0.6rem 1rem; gap: 0.4rem; }
  :root { --header-h: 96px; }
  .global-nav { flex-wrap: wrap; justify-content: center; }
  .news-list a { flex-direction: column; gap: 0.1rem; }
}

/* ---------- WordPress 投稿本文 ---------- */
.entry-content p { margin-bottom: 1.2rem; }
.entry-content h2, .entry-content h3 { margin: 2rem 0 0.8rem; }
.entry-content img { border-radius: 10px; height: auto; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2rem 1.5rem; }
.entry-content a { color: var(--green); }
.entry-content .wp-block-image figcaption { font-size: 0.8rem; color: var(--muted); }
