/* 加納研究室サイト共通スタイル（日英共通）
   レイアウトは現行サイト（Google Sites）のデザインを踏襲し、
   配色は制作マニュアルの指定（柿渋色・墨色・深緑・白）を優先する。 */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #f7efe9;        /* 柿渋の淡い地色 */
  --ink: #26221f;         /* 墨色 */
  --ink-soft: #5c544d;
  --accent: #9a4a2f;      /* 柿渋色の赤褐色 */
  --accent-dark: #7a3720;
  --on-accent: #ffffff;
  --accent-line: #d9b3a3; /* 区切り線用の淡い柿渋 */
  --green: #2f5d4a;       /* 深緑（少量） */
  --line: #e6ded6;
  --todo-bg: #fff1b8;
  --todo-ink: #5a4300;
  color-scheme: light;
  --radius: 2px;
  --max-width: 1080px;
  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-display: "Oswald", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  --font-body: "Open Sans", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ヘッダー・ナビゲーション */
.site-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  padding-top: 0.6rem;
  padding-bottom: 0;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  order: 1;
}
.site-brand img { height: 32px; width: auto; display: block; }
.site-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}
.lang-switch { order: 2; margin-left: auto; }
.site-nav { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.35rem;
  white-space: nowrap;
}
.site-nav a {
  display: block;
  padding: 0.65rem 0 0.55rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.lang-switch {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch:hover { border-color: var(--accent); background: transparent; color: var(--accent); }

/* ヒーロー：本文幅を最優先し、マスコットは装飾として扱う */
.hero {
  background: linear-gradient(180deg, var(--tint) 0%, var(--bg) 100%);
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
}
.hero-inner { position: relative; }
.hero-mascot { display: none; }
@media (min-width: 62rem) {
  /* 広い画面のみ右余白に置く（文章の折り返し幅には影響しない） */
  .hero-mascot {
    display: block;
    position: absolute;
    right: 1.25rem;
    bottom: -0.5rem;
    width: 120px;
    pointer-events: none;
  }
}
.brand-display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 11vw, 6rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0;
  max-width: 44rem;
  text-wrap: balance;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4.2vw, 2.4rem);
  line-height: 1.6;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.bar {
  width: 3rem;
  height: 2px;
  background: var(--accent);
  margin: 1.25rem 0;
}
.hero .lead {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(1rem, 2vw, 1.08rem);
  color: var(--ink-soft);
}
.hero .lead + .lead { margin-top: 0.75rem; }
.hero-actions { margin-top: 1.75rem; }
.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
}
.subtitle { margin: 0; color: var(--ink-soft); letter-spacing: 0.04em; }

/* トップページ：タイトルは短いので、マスコットは小さく横に添える */
.brand-row {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.75rem, 3vw, 1.5rem);
}
.brand-mascot { width: clamp(56px, 10vw, 96px); height: auto; flex: none; }

/* セクション：広い画面では見出しを左列、本文を右列に置く */
.section { padding: clamp(2.25rem, 5vw, 4rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
}
.section h3 { margin: 1.75rem 0 0.5rem; font-size: 1.05rem; line-height: 1.6; }
.section p { margin: 0 0 1rem; max-width: 44rem; text-wrap: pretty; }
.section ul { margin: 0 0 1rem; padding-left: 1.3rem; max-width: 44rem; }
.section li { margin: 0.3rem 0; }
.section li::marker { color: var(--accent); }

@media (min-width: 62rem) {
  .section .container:has(> h2:first-child) {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: 3rem;
  }
  .section .container:has(> h2:first-child) > h2 {
    grid-column: 1;
    grid-row: 1 / span 40;
    align-self: start;
    position: sticky;
    top: 6rem;
    margin: 0;
    font-size: 1.2rem;
    border-top: 2px solid var(--accent);
    padding-top: 0.9rem;
  }
  .section .container:has(> h2:first-child) > :not(h2) { grid-column: 2; min-width: 0; }
}

.overview { background: transparent; padding: 0; }
.overview h2 { margin-top: 0; }
.overview p { font-size: 1.05rem; }
.overview p:last-child { margin-bottom: 0; }

/* カード：枠線のない罫線区切り。リンクは矢印付きのテキスト */
.card-grid {
  display: grid;
  gap: 0 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.card h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
}
.card p { margin: 0 0 1rem; font-size: 0.93rem; color: var(--ink-soft); }
.card ul { padding-left: 1.2rem; font-size: 0.93rem; color: var(--ink-soft); }
.card .btn-row { margin-top: auto; padding-top: 0.5rem; }
.card .btn,
.card .btn.secondary {
  margin-top: auto;
  align-self: flex-start;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--accent-line);
  border-radius: 0;
  color: var(--accent);
  font-weight: 600;
}
.card .btn::after { content: " →"; }
.card .btn:hover { background: transparent; border-bottom-color: var(--accent); color: var(--accent-dark); }
.card .btn.disabled { border: 0; color: var(--ink-soft); font-weight: 400; }
.card .btn.disabled::after { content: none; }

/* 画像・動画 */
figure.media {
  margin: 0 0 1rem;
  max-width: 52rem;
}
figure.media img {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
figure.media.small img { max-width: 14rem; }
figure.media figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
/* メンバーページの顔写真：広い画面では本文の右に回り込み、狭い画面では見出しの下に置く */
figure.media.portrait { max-width: 14rem; }
figure.media.portrait img { width: 100%; }
@media (min-width: 40rem) {
  figure.media.portrait { float: right; width: 15rem; max-width: 40%; margin: 0.4rem 0 1rem 1.75rem; }
}
.has-portrait::after { content: ""; display: block; clear: both; }
.media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.media-row figure.media { margin: 0; flex: 0 1 11rem; }
.media-row figure.media img { width: 100%; }
.gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.gallery figure.media { margin: 0; }
.gallery figure.media img { width: 100%; }
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 40rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map {
  aspect-ratio: 16 / 9;
  max-width: 40rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map iframe { width: 100%; height: 100%; border: 0; }

/* ボタン */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: var(--accent); color: var(--on-accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.section .btn-row { margin: 1rem 0 0; }

/* 準備中のボタン */
.btn.disabled {
  background: transparent;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-soft);
  cursor: not-allowed;
}

.sns-list { list-style: none; padding: 0; margin: 0; }
.sns-list li { margin: 0.35rem 0; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* パンくず */
.breadcrumb {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 0.4rem 0;
}
.breadcrumb a { color: var(--ink-soft); }

/* 公開前に確定が必要な箇所（プレースホルダー） */
mark.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  padding: 0 0.2em;
  border-radius: 3px;
}

/* 長い URL・語句のはみ出し防止 */
.section p, .section li, .card, .site-footer { overflow-wrap: anywhere; }

/* イベント情報などの項目リスト */
dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 1rem;
  max-width: 52rem;
}
dl.facts > div { display: contents; }
dl.facts dt { font-weight: 700; }
dl.facts dd { margin: 0; }

/* フッター */
.site-footer {
  background: var(--tint);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
}
.page-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--accent-line);
  font-size: 0.85rem;
}

@media (max-width: 40rem) {
  .site-nav ul { gap: 1.1rem; }
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dt { margin-top: 0.4rem; }
  .site-brand img { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Alumni table */
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
table.alumni { border-collapse: collapse; width: 100%; max-width: 52rem; font-size: .95rem; }
table.alumni caption { position: absolute; left: -9999px; }
table.alumni th, table.alumni td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--line, #ddd); vertical-align: top; }
table.alumni th { font-weight: 700; border-bottom-width: 2px; }
