/* =========================================================
   WakusanServer（wksn.org）の見た目
   考え方：「わく（枠）」が「さん（3）」つ。2px の黒い線・角丸・ずらした影
   ========================================================= */
:root {
  --ink: #111827;          /* 文字・線 */
  --paper: #eef1f4;        /* ページの背景 */
  --card: #ffffff;
  --text-2: #374151;       /* 本文の弱い文字 */
  --text-3: #4b5563;       /* さらに弱い文字 */
  --line-soft: #d1d5db;
  --orange: #e0521f;       /* 背景・大きい文字だけに使う */
  --orange-text: #b53d12;  /* 小さい文字のオレンジ */
  --mint: #d9e7e3;
  --mint-text: #0d5446;
  --radius: 24px;
  --font: "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-en: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.7; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--orange-text); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.en { font-family: var(--font-en); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--card); padding: 8px 14px; border: 2px solid var(--ink); border-radius: 10px; }

/* ---------- ヘッダー ---------- */
.hd { position: sticky; top: 0; z-index: 20; background: rgba(238, 241, 244, .9); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.hd .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font-family: var(--font-en); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 10px 14px; font-size: 15px; font-weight: 500; text-decoration: none; border-radius: 10px; }
.nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav .cta { margin-left: 8px; padding: 12px 22px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 12px; }
.nav .cta:hover { color: #fff; background: #000; }
.burger { display: none; width: 48px; height: 48px; align-items: center; justify-content: center; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); cursor: pointer; }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 14px 26px; border-radius: 14px; border: 2px solid var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; background: var(--card); transition: transform .2s, box-shadow .2s; }
.btn-orange { background: var(--orange); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-orange:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-light:hover { transform: translateY(-3px); }
.btn-on-dark { background: transparent; color: #fff; border-color: #fff; }
.btn-on-dark:hover { color: #fff; transform: translateY(-3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 共通の部品 ---------- */
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec-white { background: var(--card); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.sec-mint { background: var(--mint); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.eyebrow { margin: 0 0 10px; font-family: var(--font-en); font-weight: 700; font-size: 14px; letter-spacing: .14em; color: var(--orange-text); }
.h2 { margin: 0; font-weight: 900; font-size: clamp(28px, 4vw, 48px); line-height: 1.3; }
.lead { margin: 0; font-size: 16px; line-height: 1.9; color: var(--text-2); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.sec-head .lead { max-width: 480px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { margin: 0; font-size: 22px; font-weight: 900; }
.card p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--text-2); }
.lift { transition: transform .25s, box-shadow .25s; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(17, 24, 39, .14); }
.num { width: 56px; height: 56px; border-radius: 16px; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--font-en); font-weight: 700; font-size: 20px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.crumb { font-size: 14px; color: var(--text-3); }
.crumb a { color: var(--text-3); }

/* ---------- ヒーロー ---------- */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.badge { align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 700; margin: 0; }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: #12715f; }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(40px, 6.4vw, 88px); line-height: 1.12; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--orange-text); }
.hero .lead { max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); }
.frames { flex: 1 1 380px; min-width: 0; height: 440px; position: relative; }
.frames div { position: absolute; width: 62%; height: 62%; border: 3px solid var(--ink); border-radius: 36px; }
.frames .f1 { left: 0; top: 0; background: var(--card); }
.frames .f2 { left: 19%; top: 19%; background: var(--mint); }
.frames .f3 { left: 38%; top: 38%; background: var(--orange); display: flex; align-items: flex-end; padding: 24px; font-family: var(--font-en); font-weight: 700; font-size: 22px; }

/* ---------- 流れる帯 ---------- */
.marq { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--ink); color: #fff; overflow: hidden; }
.marq-track { display: flex; width: max-content; gap: 48px; padding: 16px 0; font-family: var(--font-en); font-weight: 500; font-size: 22px; white-space: nowrap; }
.marq-track b { color: var(--orange); font-weight: 500; }

/* ---------- つくっているもの ---------- */
.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.work { display: flex; flex-direction: column; text-decoration: none; border: 2px solid var(--ink); border-radius: 28px; overflow: hidden; background: #f6f4ff; color: var(--ink); }
.work:hover { color: var(--ink); }
.work-pic { height: 300px; background: #241f52; position: relative; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.work-pic img { position: relative; height: 280px; width: auto; }
.work-pic svg { position: absolute; inset: 0; }
.work-body { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.work-body h3 { margin: 0; font-size: 26px; font-weight: 900; }
.work-body p { margin: 0; font-size: 15px; line-height: 1.9; color: var(--text-2); }
.work.soon { border-style: dashed; border-color: #6b7280; background: #f4f6f8; }
.work.soon .work-pic { background: transparent; border-bottom: 2px dashed #6b7280; align-items: center; color: var(--text-3); }

/* ---------- 数字 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat { border-top: 2px solid var(--ink); padding-top: 18px; }
.stat b { display: block; font-family: var(--font-en); font-weight: 700; font-size: 56px; line-height: 1.2; }
.stat b small { font-size: 24px; }
.stat span { font-size: 15px; color: var(--text-2); }

/* ---------- メンバー ---------- */
.team { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.avatars { display: flex; }
.avatars img, .avatars span { width: 60px; height: 60px; border-radius: 18px; border: 2px solid var(--ink); background: var(--card); object-fit: cover; }
.avatars > * + * { margin-left: -12px; }
.avatars span { background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--font-en); font-weight: 700; }

/* ---------- お問い合わせ ---------- */
.contact { background: var(--ink); color: #fff; border-radius: 32px; padding: clamp(32px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.contact .lead { color: #d1d5db; }
.contact .mail { margin: 0; font-family: var(--font-en); font-weight: 500; font-size: clamp(24px, 3.2vw, 40px); word-break: break-all; }

/* ---------- ページの見出し ---------- */
.page-head { border-bottom: 2px solid var(--ink); }
.page-head .wrap { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; }
.page-head h1 { margin: 8px 0 0; font-weight: 900; font-size: clamp(36px, 5.6vw, 72px); line-height: 1.2; }
.page-head .lead { max-width: 680px; font-size: 17px; }

/* ---------- 組織概要の表 ---------- */
.kv { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.kv-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.kv-row + .kv-row { border-top: 1px solid var(--line-soft); }
.kv-row dt { padding: 20px 24px; font-weight: 700; background: #f4f6f8; }
.kv-row dd { margin: 0; padding: 20px 24px; line-height: 1.9; }
.logo-story { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.logo-box { flex: 0 0 auto; width: 220px; height: 220px; border: 2px solid var(--ink); border-radius: 32px; display: grid; place-items: center; background: var(--paper); }

/* ---------- スタッフ ---------- */
.staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.staff li { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; transition: transform .25s, box-shadow .25s; }
.staff li:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 18px 40px rgba(17, 24, 39, .14); }
.staff img, .staff .noicon { width: 96px; height: 96px; border-radius: 24px; border: 2px solid var(--ink); background: var(--paper); object-fit: cover; }
.staff .noicon { border-style: dashed; border-color: #6b7280; display: grid; place-items: center; font-size: 32px; font-weight: 900; color: var(--text-3); }
.staff strong { font-size: 19px; }
.role { padding: 3px 10px; border-radius: 999px; font-family: var(--font-en); font-size: 13px; font-weight: 700; border: 1.5px solid var(--ink); background: var(--card); }
.role.owner { background: var(--orange); }
.role.sub { background: #f3b49b; }
.role.ill { background: var(--mint); }

/* ---------- フッター ---------- */
.ft { border-top: 2px solid var(--ink); background: var(--card); }
.ft .wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.ft-brand { display: flex; flex-direction: column; gap: 12px; }
.ft nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; }
.ft nav a { text-decoration: none; }
.ft small { font-size: 13px; color: var(--text-3); }
.dmca-slot { min-height: 30px; }

/* ---------- 動き ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes shift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -8px); } }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .24s; } .d3 { animation-delay: .36s; }
.frames .f1, .frames .f3 { animation: shift 7s ease-in-out infinite; }
.frames .f2 { animation: shift 7s ease-in-out infinite reverse; }
.marq-track { animation: marq 30s linear infinite; }
/* スクロールで見えたときに浮かぶ（site.js が .in を付ける） */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- スマホ（〜760px） ---------- */
@media (max-width: 760px) {
  .burger { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--paper); border-bottom: 2px solid var(--ink); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav .cta { margin: 12px 0 0; text-align: center; border-radius: 12px; border-bottom: 0; }
  .frames { display: none; }
  .kv-row { grid-template-columns: 1fr; }
  .kv-row dt { padding-bottom: 8px; }
  .kv-row dd { padding-top: 8px; }
  .btn { width: 100%; }
}

/* 端末で「動きを減らす」がオンのとき */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
