@font-face {
  font-family: "harenosora";
  /* フォント名を指定 */
  src: url("../fonts/harenosora.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "SourceHanSerif";
  /* フォント名を指定 */
  src: url("../fonts/SourceHanSerif-VF.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-color: #fcfcfc;
  --bg-color-card: #f4f9fc;
  --bg-color-voice: #f0f8ff;
  --text-color: #2b3a42;
  --text-color-voice: #2b3a42;
  --text-color-profile-hover: #e7e7e7;

  --main-color: #1d4a9c;
  --sub-color: #1e5ca3;
  --heading-font: "harenosora";
  --sub-heading-font: "SourceHanSerif";
}

[data-theme="high-contrast"] {
  --bg-color: #000000;
  --bg-color-card: #000000;
  --bg-color-voice: #ffffff;
  --text-color: #ffffff;
  --text-color-voice: #000000;
  --text-color-profile-hover: #000000;

  --main-color: #ffffff;
  --sub-color: #ffffff;
}

[data-theme="dark"] {
  --bg-color: #030303;
  --bg-color-card: #0b0603;
  --bg-color-voice: #0f0700;
  --text-color: #d4c5bd;
  --text-color-voice: #d4c5bd;
  --text-color-profile-hover: #181818;

  --main-color: #1d4a9c;
  --sub-color: #1e5ca3;
  --heading-font: "harenosora";
  --sub-heading-font: "SourceHanSerif";
}

/* 全体設定 */
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
}

h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
  position: relative;
  color: var(--sub-color);
  font-family: var(--sub-heading-font), "Playfair Display", serif;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--sub-color);
  margin-top: 8px;
}

img {
  height: auto;
  width: 100%;
  display: block;
}

/* 共通クラス設定 */
.u-visually-hidden {
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.mt20 {
  margin-top: 20px;
}

/*******************************
 * ヘッダー
 *******************************/
.header {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 1;
}

/* トグルスイッチの全体スタイル */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  width: 150px;
  height: 50px;
  background-color: #f4f4f4;
  border-radius: 25px;
  padding: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ラジオボタン（非表示） */
.theme-toggle__radio {
  display: none;
}

/* 各ラベルのスタイル */
.theme-toggle__label {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

/* アイコンのスタイル */
.theme-toggle__icon {
  width: 20px;
  height: 20px;
  opacity: 0.5;
  /* 非選択状態の透明度 */
  transition: opacity 0.3s ease, -webkit-filter 0.3s ease;
  transition: opacity 0.3s ease, filter 0.3s ease;
  transition: opacity 0.3s ease, filter 0.3s ease, -webkit-filter 0.3s ease;
  -webkit-filter: brightness(0);
  filter: brightness(0);
  /* 非選択状態の黒系アイコン */
  position: absolute;
  /* アイコンを固定位置にする */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 正確に中央揃え */
}

/* スライダー */
.theme-toggle__slider {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 40px;
  height: 40px;
  background-color: #ffcc80;
  /* 初期スライダー色（オレンジ） */
  border-radius: 50%;
  transition: transform 0.3s ease, background-color 0.3s ease;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 選択状態のスタイル */
#theme-default:checked ~ .theme-toggle__slider {
  transform: translateX(3px);
  background-color: #e89862;
}

#theme-dark:checked ~ .theme-toggle__slider {
  transform: translateX(50px);
  background-color: #b92abe;
}

#theme-high-contrast:checked ~ .theme-toggle__slider {
  transform: translateX(97px);
  background-color: #000000;
}

/* 選択中のアイコンを強調（白に） */
#theme-default:checked + .theme-toggle__label .theme-toggle__icon,
#theme-dark:checked + .theme-toggle__label .theme-toggle__icon,
#theme-high-contrast:checked + .theme-toggle__label .theme-toggle__icon {
  opacity: 1;
  -webkit-filter: brightness(1);
  filter: brightness(1);
  /* 選択状態の白アイコン */
}

/*******************************
 * KV
 *******************************/
.kv {
  position: relative;
  background-color: #1a2930;
  padding: 6rem 1rem;
  text-align: center;

  background-image: url("../images/kv.webp");
  background-repeat: no-repeat;
  background-size: cover;
}

.kv__heading-box {
  max-width: 500px;
  margin-inline: auto;
  padding-left: 80px;
}

.kv__heading {
  font-size: 2.5rem;
  font-family: var(--heading-font), "Playfair Display", serif;
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;

  color: #fff;
  text-shadow: 0 0 5px #1d4a9c, /* 中心色 */ 0 0 10px #1d4a9c,
    /* 少し広がる */ 0 0 20px #1d4a9c, /* 広がり強調 */ 0 0 30px #356bb7,
    /* 少し明るめのブルー */ 0 0 40px #356bb7,
    /* 光の層を追加 */ 0 0 50px #5089d2, /* さらに広がる層 */ 0 0 60px #6ca7ed;
  /* 最外層に薄めの青 */
}

[data-theme="high-contrast"] .kv__heading {
  text-shadow: 0 0 5px #00bfff, /* 明るいスカイブルー */ 0 0 10px #1e90ff,
    /* 少し暗いディープスカイブルー */ 0 0 20px #4169e1,
    /* ロイヤルブルー */ 0 0 30px #4682b4, /* スチールブルー */ 0 0 40px #5f9ea0,
    /* キャデットブルー */ 0 0 50px #87ceeb;
  /* 明るめのスカイブルー */
}

.kv__sub-heading {
  font-family: var(--sub-heading-font), "Playfair Display", serif;
  font-size: 1.2rem;
  color: #fff;
  margin: 0;
  text-shadow: 0 0 5px #1d4a9c, /* 青の中心色 */ 0 0 10px #356bb7,
    /* 少し明るい青 */ 0 0 20px #5089d2, /* 広がる青 */ 0 0 30px #6ca7ed,
    /* 外側の薄い青 */ 0 0 15px #ffd700, /* 黄色の中心層 */ 0 0 25px #ffd700,
    /* ゴールドが広がる層 */ 0 0 35px #ffeb3b,
    /* 明るい黄色の層 */ 0 0 45px #ffc107,
    /* 最外層に黄色寄りのゴールド */ 0 0 55px #fff176;
  /* 淡い黄色の輝き */
}

[data-theme="high-contrast"] .kv__sub-heading {
  text-shadow: 0 0 5px #ffff00, /* 強い黄色 */ 0 0 10px #ffd700,
    /* ゴールド */ 0 0 20px #ffffff;
  /* 白を最外層に追加 */
}

.kv__logo {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -60%);
  display: block;
  width: 450px;
  margin-inline: auto;
}

/*******************************
 * 教育BARとは？
 *******************************/
.about {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.about__description {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-color);
}

.about__cards {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr 1fr;
  /* PC表示で3列 */
  margin-top: 2rem;
}

.about__card {
  list-style: none;
  border: 2px solid var(--main-color);
  border-radius: 12px;
  background: var(--bg-color-card);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: translate 0.3s ease, box-shadow 0.3s ease;
  will-change: translate;
  translate: 0 0 0;
  display: grid;
  gap: 10px;
  place-items: center;
}

@media (any-hover: hover) {
  .about__card:hover {
    translate: 0 -4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }
}

.about__card:focus-visible {
  translate: 0 -4px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.about__card-heading {
  text-align: center;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--main-color);
}

.about__icon {
  max-width: 60px;
  margin-bottom: 20px;
}

/* 通常・ダークモード時の画像 */
.about__icon01 {
  content: url(../images/about_icon01.webp);
}

.about__icon02 {
  content: url(../images/about_icon02.webp);
}

.about__icon03 {
  content: url(../images/about_icon03.webp);
}

/* 高アクセントモード時の画像 */
[data-theme="high-contrast"] .about__icon01 {
  content: url(../images/about_icon01-high.webp);
}

[data-theme="high-contrast"] .about__icon02 {
  content: url(../images/about_icon02-high.webp);
}

[data-theme="high-contrast"] .about__icon03 {
  content: url(../images/about_icon03-high.webp);
}

/*******************************
 * 教育BARの始まり
 *******************************/
.origin {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.origin__voice {
  text-align: left;
  margin: 1rem 0;
  padding: 1rem;
  background-color: var(--bg-color-voice);
  font-style: italic;
  color: var(--text-color-voice);
}

.origin__text + .origin__text {
  margin-top: 1.5rem;
}

.origin__human {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.origin__human-img {
  width: 50px;
  border-radius: 50%;
}

/*******************************
 * 教育BARで教育の関係人口を増やす
 *******************************/
.vision {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.vision__box {
  padding-top: 5px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.vision__img {
  max-width: 600px;
  width: 100%;
  border-radius: 15px;
}

.vision__text + .vision__text {
  margin-top: 1.5rem;
}

/*******************************
 * 教育BARを開催したい人へ
 *******************************/
.state {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.state__images {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 40px;
}

.state__img-box {
  max-width: 400px;
}

.state__img {
  aspect-ratio: 4/3;
  width: 100%;
  height: auto;
  border-radius: 15px;
}

.state__img-caption {
  font-style: italic;
  margin-top: 10px;
  text-align: center;
}

/*******************************
 * 教育BARへの参加方法
 *******************************/
.howto {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.howto__profiles {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr 1fr;
  /* PC表示で3列 */
  margin-top: 2rem;
}

/* プロフィールカード */
.howto__profile {
  display: flex;
  height: 128px;
  align-items: center;
  justify-content: flex-start;
  background-color: var(--bg-color-card);
  border: 2px solid var(--main-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: translate 0.3s ease, box-shadow 0.3s ease,
    background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  color: inherit;
}

@media (any-hover: hover) {
  .howto__profile:hover {
    background-color: var(--sub-color);
    color: var(--text-color-profile-hover);
    translate: 0 -2px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }
}

.howto__profile:focus-visible {
  background-color: #2088d3;
  color: var(--text-color-profile-hover);
  translate: 0 -2px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.howto__profile-img {
  display: block;
  width: 128px;
  height: 128px;
  -o-object-fit: cover;
  object-fit: cover;
}

.howto__profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 0 0.8rem;
  box-sizing: border-box;
}

.howto__profile-texts {
  display: flex;
  align-items: center;
  gap: 5px;
}

.howto__profile-name {
  font-weight: bold;
}

.howto__window-icon {
  content: url(../images/another_window.webp);
  display: inline-block;
  width: 15px;
  height: 15px;
}

/* 高アクセントモード時の画像 */
[data-theme="high-contrast"] .howto__window-icon {
  content: url(../images/another_window-high.webp);
}

/*******************************
 * 教育BARを開催したい人へ
 *******************************/
.organizers {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.organizers__text + .organizers__text {
  margin-top: 1.5rem;
}

.organizers__list {
  border: 2px solid var(--main-color);
  border-radius: 12px;
  padding: 15px 20px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-color-card);
}

/*******************************
 * フッター
 *******************************/
.footer {
  text-align: center;
  padding: 2rem 0;
  background-color: var(--sub-color);
  margin-top: 2rem;
}

.footer__contents {
  display: flex;
  justify-content: center;
}

.footer__icon {
  content: url(../images/footer_icon.webp);
  display: block;
  width: 10px;
  margin-top: 3px;
  margin-left: 3px;
}

/* 高アクセントモード時の画像 */
[data-theme="high-contrast"] .footer__icon {
  content: url(../images/footer_icon-high.webp);
}

.footer__text {
  margin: 0;
  color: var(--bg-color);
  font-size: 0.9rem;
}

/*******************************
 * レスポンシブ対応
 *******************************/
@media screen and (max-width: 1024px) {
  .howto__profiles {
    grid-template-columns: 1fr 1fr;
    /* タブレットで2列 */
  }
}

@media screen and (max-width: 768px) {
  h2 {
    font-size: 1.5rem;
  }

  .state__images {
    flex-direction: column;
    align-items: center;
  }

  .about__cards {
    grid-template-columns: 1fr;
  }

  .howto__profiles {
    grid-template-columns: 1fr;
  }

  .vision__box {
    flex-direction: column;
  }

  .vision__img {
    max-width: 300px;
  }

  .about__icon {
    margin-bottom: 10px;
  }
}

@media screen and (max-width: 480px) {
  .kv {
    padding: 2rem 1rem;
  }

  .kv__heading {
    font-size: 1.8rem;
  }

  .kv__sub-heading {
    font-size: 1rem;
  }

  .kv__heading-box {
    padding-left: 60px;
  }

  .kv__logo {
    width: 400px;
  }

  .howto__profiles {
    gap: 1.2rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

@media screen and (max-width: 410px) {
  .kv__logo {
    width: 350px;
  }
}
