@charset "utf-8";
/* ===============================================
   kingstone-project.jp トップ  style.css
   =============================================== */

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, figure { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 56px; } /* 56px＝上のバーの高さ。ページ内リンクで見出しがバーに隠れない */
body {
  font-family: "Noto Sans JP", "游ゴシック体", YuGothic, "Yu Gothic", sans-serif;
  color: #000;
  background: #fff;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; vertical-align: top; }
a { color: inherit; text-decoration: none; transition: opacity .2s; }
.sp { display: inline; }
.pc { display: none; }
@media (min-width: 768px) { .sp { display: none; } .pc { display: inline; } } /* 768px＝これより広いとPC表示 */

/* ---------- ★スクロールで出てくる動き（全ページ共通） ---------- */
.ef {
  opacity: 0;
  transform: translateY(20px);                      /* 20px＝下からずれて出てくる距離 */
  transition: opacity .8s ease var(--d, 0s), transform .8s ease var(--d, 0s); /* .8s＝出てくる速さ。--d＝遅らせる時間 */
}
.ef.on { opacity: 1; transform: none; }

/* ---------- ★上のバー（全ページ共通） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px;                                     /* 56px＝バーの高さ */
  padding: 0 20px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid #e8e8e8;
}
.topbar-logo { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .04em; color: #f40d0d; white-space: nowrap; }
.topbar-nav { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a { font-family: "Oswald", sans-serif; font-weight: 500; font-size: 14px; letter-spacing: .05em; white-space: nowrap; }
.topbar a:hover { opacity: .6; }                    /* ★文字やボタン：少し薄く */
@media (max-width: 767px) {
  .topbar { padding: 0 12px; gap: 12px; }
  .topbar-logo { font-size: 15px; }
  .topbar-nav { gap: 14px; }
  .topbar-nav a { font-size: 12px; }
}

/* ---------- 大きな写真 ---------- */
.kv {
  position: relative;
  max-width: 1280px;                                /* 1280px＝写真の最大の幅 */
  margin: 30px auto 80px;                           /* 80px＝写真の下（点の下）のすき間 */
  padding: 0 30px;
}
.kv-slides {
  position: relative;
  aspect-ratio: 1280 / 630;                         /* 写真の縦横の比率（元画像と同じ） */
  overflow: hidden;
  animation: kvIn 1s ease both;                     /* 1s＝最初にふわっと出る速さ */
}
.kv-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 3s; } /* 3s＝写真が切り替わる速さ */
.kv-slide.is-on { opacity: 1; }
.kv-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.1);                            /* 1.1＝切り替わる前の拡大率 */
  transition: transform 1.5s cubic-bezier(.215,.61,.355,1); /* 1.5s＝拡大から戻る速さ */
}
.kv-slide.is-on img { transform: scale(1); }

.kv-logo { position: absolute; top: 0; left: 30px; z-index: 2; width: 285px; } /* 285px＝ロゴの幅 */
.kv-catch {
  position: absolute; top: 50%; left: 0; right: 0; z-index: 2;
  transform: translateY(-50%);
  color: #fff;
  font-family: "futura-pt", sans-serif; font-weight: 500; font-style: italic;
  font-size: 60px;                                  /* 60px＝キャッチの文字の大きさ */
  text-align: center; line-height: 1.2;
  text-shadow: 0 0 12px rgba(0,0,0,.25);
}
.kv-catch span {
  display: inline-block;
  animation: letterIn .5s ease-out both;            /* .5s＝1文字が出る速さ */
  animation-delay: calc(.8s + var(--i) * .1s);      /* .8s＝写真が出てから文字が出始めるまで。.1s＝1文字ずつの間隔 */
}

.kv-dots { position: absolute; left: 0; right: 0; bottom: -50px; display: flex; justify-content: center; gap: 36px; } /* 36px＝点の間隔 */
.kv-dots button {
  width: 14px; height: 14px; padding: 0;            /* 14px＝点の大きさ */
  border: 0; border-radius: 50%; background: #e4e4e2; cursor: pointer;
  transition: background .3s;
}
.kv-dots button.is-on { background: #e60012; }
.kv-dots button:hover { opacity: .6; }

@keyframes kvIn { from { opacity: 0; transform: translateY(20px); } }
@keyframes letterIn { from { opacity: 0; transform: translateX(20px); } }

@media (max-width: 767px) {
  .kv { margin: 5vw 5vw 16vw; padding: 0; }
  .kv-slides { aspect-ratio: 1 / 0.94; }            /* スマホでは、ほぼ正方形に切り抜く */
  .kv-logo { left: 0; width: 38vw; }
  .kv-catch { font-size: 6.4vw; }                  /* 6.4vw＝スマホで1行に収まる大きさ */
  .kv-dots { bottom: -10vw; gap: 24px; }
  .kv-dots button { width: 12px; height: 12px; }
}

/* ---------- ごあいさつ ---------- */
.intro { max-width: 1280px; margin: 0 auto 40px; padding: 0 20px; text-align: center; line-height: 2; }
.intro-lead { margin-bottom: 8px; font-size: 28px; font-weight: 700; animation: kvIn .8s ease 2.6s both; }  /* 2.6s＝キャッチが出そろってから出す */
.intro-text { font-size: 16px; animation: kvIn .8s ease 3.2s both; }
@media (max-width: 767px) {
  .intro { margin-bottom: 10vw; }
  .intro-lead { font-size: 19px; line-height: 1.7; }
  .intro-text { font-size: 13px; }
}

/* ---------- WORKS ---------- */
.works { padding: 50px 30px 30px; background: #f7f7f6; }
.works-title, .works-list { max-width: 1280px; margin: 0 auto; }
.works-title {
  position: relative;
  margin-bottom: 40px;
  padding-left: 38px;
  color: #f40d0d; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 30px; line-height: 1.2;
}
.works-title::before { content: ""; position: absolute; top: 50%; left: 0; width: 28px; height: 1px; background: #f40d0d; } /* 28px＝見出しの前の線の長さ */

.works-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);            /* 3＝PCで横に並ぶ数 */
  grid-auto-flow: dense;                            /* すき間ができないように詰める */
  gap: 28px;                                        /* 28px＝カードの間隔 */
}
.work.wide { grid-column: span 2; }                 /* 横長カード＝2マス分 */
.work.full { grid-column: 1 / -1; }                 /* 1列ぜんぶの横長カード（今は使っていない。使うときは class に full を足す） */

.work a { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid #e8e8e8; }
.work .thm { overflow: hidden; border-bottom: 1px solid #e8e8e8; }
.work .thm img { width: 100%; transition: transform .4s ease; } /* .4s＝写真が大きくなる速さ */
.work .thm.contain { display: flex; justify-content: center; background: #fff; }
.work .thm.contain img { width: auto; }
.work .set { flex: 1; display: flex; flex-direction: column; padding: 18px 28px; }
.work .name { margin-bottom: 10px; color: #f40d0d; font-size: 20px; font-weight: 700; line-height: 1.3; text-underline-offset: 4px; }
.work .name.en { font-family: "Oswald", sans-serif; font-weight: 500; font-size: 24px; }
.work .text { margin-bottom: 14px; font-size: 13px; line-height: 1.6; }
.work .visit { position: relative; margin-top: auto; align-self: flex-end; padding-left: 48px; font-size: 14px; font-weight: 700; transition: opacity .2s; }
.work .visit::before { content: ""; position: absolute; top: 50%; left: 0; width: 36px; height: 1px; background: #a0a0a0; } /* 36px＝VISIT SITEの前の線の長さ */

/* 横長カード：写真を左、文字を右 */
.work.wide a { flex-direction: row; align-items: center; }
.work.wide .thm { width: 45%; max-width: 378px; border-bottom: 0; border-right: 1px solid #e8e8e8; } /* 45%＝写真の幅の割合 */
.work.wide .set { padding: 28px; align-self: stretch; justify-content: center; }
.work.wide .name { margin-bottom: 15px; }
.work.wide .text { margin-bottom: 30px; }

/* 過去の支援活動（WORKS の下のバナー） */
.past {
  display: flex; align-items: center; gap: 30px;
  max-width: 1280px; margin: 40px auto 20px;        /* 40px＝WORKS のカードとのすき間 */
  padding: 24px 28px; background: #fff; border: 1px solid #e8e8e8;
}
.past-title { flex-shrink: 0; padding-right: 30px; border-right: 1px solid #e8e8e8; font-size: 16px; line-height: 1.4; }
.past-list { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; padding: 0; list-style: none; } /* 28px＝リンクどうしの横の間隔 */
.past-list a { color: #f40d0d; font-size: 15px; font-weight: 700; text-underline-offset: 4px; }
.past-list a:hover { text-decoration: underline; } /* ★名前：赤＋下線 */

/* ★マウスを乗せたとき：写真は1.04倍、名前は赤＋下線、ボタンは少し薄く */
.work a:hover .thm img { transform: scale(1.04); }
.work a:hover .name { text-decoration: underline; }
.work a:hover .visit { opacity: .6; }

@media (max-width: 1100px) {                        /* 1100px以下（タブレット）：横に2つ */
  .works-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {                         /* スマホ：横に2つ、横長カードは写真が上 */
  .works { padding: 6vw 4vw 4vw; }
  .works-title { margin-bottom: 5vw; padding-left: 32px; font-size: 24px; }
  .works-title::before { width: 22px; }
  .works-list { gap: 10px; }
  .work.wide { grid-column: span 1; }              /* スマホでは横長カードも1マス（横に2つずつ） */
  .work.full { grid-column: 1 / -1; }              /* 1列ぜんぶのカードは、スマホでも横いっぱい */
  .work.wide a { flex-direction: column; align-items: stretch; }
  .work.wide .thm { width: 100%; max-width: none; border-right: 0; border-bottom: 1px solid #e8e8e8; }
  .work .set, .work.wide .set { padding: 12px; }
  .work .name, .work.wide .name { margin-bottom: 6px; font-size: 15px; }
  .work .name.en { font-size: 16px; }
  .work .text, .work.wide .text { margin-bottom: 10px; font-size: 12px; }
  .work .visit { padding-left: 30px; font-size: 12px; }
  .work .visit::before { width: 22px; }
  .past { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 6vw; padding: 16px; }
  .past-title { padding: 0; border: 0; font-size: 14px; }
  .past-list { flex-direction: column; }
  .past-list a { font-size: 13px; }
}

/* ---------- ★フッター（全ページ共通） ---------- */
.footer { padding: 50px 20px; color: #fff; background: #333; font-size: 14px; text-align: center; line-height: 2; }
.footer a { text-decoration: underline; }
.footer a:hover { opacity: .6; }
@media (max-width: 767px) { .footer { padding: 6vw 20px; font-size: 12px; } }

/* ---------- 上のバー: スマホは右の4つのリンクを「≡」にまとめる（押すと、バーの下に白い一覧） ★全ページ共通 ---------- */
.topbar-menu { display: none; }
@media (max-width: 767px) {
  .topbar-nav { display: none; }
  .topbar-menu {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px;                      /* 44px＝押しやすい大きさ */
    margin-right: -8px; padding: 0 10px;
    border: 0; background: none; cursor: pointer;
  }
  .topbar-menu span { display: block; height: 2px; border-radius: 2px; background: #333; transition: transform .25s, opacity .25s; }
  .topbar.is-open .topbar-menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }   /* ≡ → × */
  .topbar.is-open .topbar-menu span:nth-child(2) { opacity: 0; }
  .topbar.is-open .topbar-menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .topbar.is-open .topbar-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 56px; left: 0; right: 0;   /* 56px＝バーの高さ（このすぐ下に出す） */
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
  }
  .topbar.is-open .topbar-nav a { padding: 16px 20px; font-size: 16px; border-top: 1px solid #f0f0f0; }
  .topbar.is-open::after {                          /* 後ろのページを薄暗く（押すと閉じる） */
    content: ""; position: fixed; top: 56px; right: 0; bottom: 0; left: 0; z-index: -1;
    background: rgba(0,0,0,.35);
  }
}

/* ---------- WORKS: 1列に2つ・どのカードも同じ大きさ（2026-10-25 案2） ----------
   どの段も同じ高さ。PCは写真が左・文が右、スマホは写真が上（どのカードも同じ向きなので、縦の線がそろう） */
.works-list { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; } /* 2＝横に並ぶ数 ／ 1fr＝すべての段を同じ高さに */
.work .thm { position: relative; }
.work .thm img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; } /* cover＝枠いっぱいに、はみ出た所を切る */
.work .thm.shop img { object-fit: contain; background: #000; } /* ショップのロゴは切らずに全体を見せる（画像と同じ黒の背景） */
.work .thm.left img { object-position: left center; } /* ポータルの画面の写真は、左の題名が残るように左を基準に切る */
.work .thm.map img { object-position: 58% center; } /* 社協の地図: 日本地図が切れないよう、少し右を基準に切る（58%） */
@media (min-width: 768px) {
  .work a { flex-direction: row; }
  .work .thm { flex: none; width: 45%; border-bottom: 0; border-right: 1px solid #e8e8e8; } /* 45%＝カードの中の写真の幅 */
  .work .set { padding: 24px 28px; justify-content: center; } /* 24px 28px＝文のまわりの余白（上下・左右） */
}
.work .label { margin-bottom: 4px; color: #888; font-size: 13px; letter-spacing: .12em; } /* 見出しの上の小さな英語（WEB制作のカード） */
.work .label.en { font-family: "Oswald", sans-serif; font-weight: 500; }
.work .label + .name { font-size: 24px; }           /* 「WEB制作」: ほかの英語の見出し（24px）と同じ大きさ */
@media (max-width: 767px) {                         /* スマホ: 写真が上。写真の縦横をそろえる */
  .work .thm { aspect-ratio: 406 / 158; }           /* 406/158＝ショップの画像と同じ縦横 */
  .work .label { font-size: 10px; letter-spacing: .08em; }
  .work .label + .name { font-size: 16px; }         /* スマホ: ほかの英語の見出しと同じ 16px */
}
