/* =====================================================================
   2014 福祉 × 教育 ベン図アニメーション — venn-welfare.css
   依存フォント：'Inter'（英字ラベル） / 'Noto Sans JP'（日本語ラベル）
   使い方：venn-welfare.html を貼り付け → この CSS と venn-welfare.js を読み込む
   色：福祉 #0f86aa / #0f7a9c / #3ec8d8、教育 #2560d8 / #1d55b0 / #4d9bef
   ===================================================================== */

/* ---------- 1. 図の本体（レイアウト・色） ---------- */
.hub-welfare {
  zoom:0.78;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:calc(34px + 2cm) 0 0;
  max-width:min(calc(980px + 2*clamp(30px,4vw,52px)),100%);
}
.hub-welfare__region {
  position:relative;
  box-sizing:border-box;
  width:calc((100% + 2*calc(clamp(30px,4vw,52px) + clamp(4px,2vw,26px) + 1.125*clamp(44px,5vw,62px)))/2 - 28px);
  max-width:660px;
  margin-right:calc(-2*calc(clamp(30px,4vw,52px) + clamp(4px,2vw,26px) + 1.125*clamp(44px,5vw,62px)) + 56px);
  padding:clamp(50px,6vw,74px) clamp(30px,4vw,52px);
}
.hub-welfare__field {
  position:absolute;
  inset:0;
  border-radius:50%;
  background:radial-gradient(115% 120% at 74% 14%,rgba(255,255,255,0.9) 0%,rgba(214,240,246,0.7) 46%,rgba(62,200,216,0.28) 100%);
  border:1px solid rgba(15,134,170,0.26);
  box-shadow:0 40px 90px -60px rgba(22,50,90,0.55);
  mix-blend-mode:multiply;
  pointer-events:none;
}
.hub-welfare__label {
  position:absolute;
  top:0;
  left:50%;
  transform:translate(-50%,-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  padding:0 16px;
  white-space:nowrap;
  z-index:4;
}
.hub-welfare__label-en {
  font-family:'Inter',sans-serif;
  font-size:14px;
  font-weight:600;
  letter-spacing:0.22em;
  color:#5a7295;
}
.hub-welfare__label-jp {
  font-family:'Noto Sans JP',sans-serif;
  font-size:30px;
  font-weight:700;
  letter-spacing:0.14em;
  color:#0f7a9c;
}
.hub-welfare__rows {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-right:calc(clamp(30px,4vw,52px) + clamp(4px,2vw,26px) + 1.125*clamp(44px,5vw,62px));
}
.hub-welfare__row {
  display:flex;
  align-items:center;
  gap:12px;
  padding-left:90px;
}
.hub-welfare__node {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:50%;
  background:#fff;
  border:1px solid rgba(15,134,170,0.16);
  box-shadow:0 10px 24px -14px rgba(22,50,90,0.42), inset 0 1px 0 #fff;
}
.hub-welfare__icon {
  flex:0 0 auto;
  display:block;
  pointer-events:none;
}
.hub-welfare__pipe {
  position:relative;
  flex:1 1 0;
  min-width:26px;
  height:48px;
}
.hub-welfare__pipe-fill {
  position:absolute;
  left:0;
  right:0;
  top:17px;
  height:14px;
  background-image:linear-gradient(90deg,rgba(15,134,170,0) 0%,rgba(15,134,170,0.34) 16%,rgba(15,134,170,0.34) 84%,rgba(15,134,170,0) 100%);
  background-size:100% 1px;
  background-repeat:no-repeat;
  background-position:left center;
}
.hub-welfare__pipe-dot {
  position:absolute;
  right:0;
  top:21px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#3ec8d8;
}
.hub-welfare__pipe-arrow {
  position:absolute;
  top:16px;
}
.hub-welfare__icon-teal {
  display:block;
  filter:drop-shadow(0 1px 4px rgba(15,134,170,0.5));
}
.hub-welfare__row-indent-left {
  display:flex;
  align-items:center;
  gap:12px;
  padding-left:20px;
}
.hub-welfare__region-education {
  position:relative;
  box-sizing:border-box;
  width:calc((100% + 2*calc(clamp(30px,4vw,52px) + clamp(4px,2vw,26px) + 1.125*clamp(44px,5vw,62px)))/2 - 28px);
  max-width:660px;
  padding:clamp(50px,6vw,74px) clamp(30px,4vw,52px);
}
.hub-welfare__field-education {
  position:absolute;
  inset:0;
  border-radius:50%;
  background:radial-gradient(115% 120% at 26% 14%,rgba(255,255,255,0.9) 0%,rgba(219,233,250,0.7) 46%,rgba(77,155,239,0.26) 100%);
  border:1px solid rgba(29,85,176,0.26);
  box-shadow:0 40px 90px -60px rgba(22,50,90,0.55);
  mix-blend-mode:multiply;
  pointer-events:none;
}
.hub-welfare__label-jp-education {
  font-family:'Noto Sans JP',sans-serif;
  font-size:30px;
  font-weight:700;
  letter-spacing:0.14em;
  color:#1d55b0;
}
.hub-welfare__arrow {
  position:absolute;
  left:calc(clamp(30px,4vw,52px) - 28px);
  top:calc(50% - 1cm);
  transform:translateY(-50%);
  z-index:3;
  padding-left:clamp(4px,2vw,26px);
}
.hub-welfare__image {
  display:block;
  height:clamp(44px,5vw,62px);
  width:auto;
}
.hub-welfare__rows-education {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:16px;
  margin-left:calc(clamp(30px,4vw,52px) + clamp(4px,2vw,26px) + 1.125*clamp(44px,5vw,62px));
}
.hub-welfare__row-indent-right-wide {
  display:flex;
  align-items:center;
  gap:12px;
  padding-right:90px;
}
.hub-welfare__pipe-fill-education {
  position:absolute;
  left:0;
  right:0;
  top:17px;
  height:14px;
  background-image:linear-gradient(90deg,rgba(29,85,176,0) 0%,rgba(29,85,176,0.34) 16%,rgba(29,85,176,0.34) 84%,rgba(29,85,176,0) 100%);
  background-size:100% 1px;
  background-repeat:no-repeat;
  background-position:left center;
}
.hub-welfare__pipe-dot-education {
  position:absolute;
  left:0;
  top:21px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#4d9bef;
}
.hub-welfare__icon-blue {
  display:block;
  filter:drop-shadow(0 1px 4px rgba(37,96,216,0.5));
}
.hub-welfare__node-education {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:50%;
  background:#fff;
  border:1px solid rgba(29,85,176,0.16);
  box-shadow:0 10px 24px -14px rgba(22,50,90,0.42), inset 0 1px 0 #fff;
}
.hub-welfare__row-indent-right {
  display:flex;
  align-items:center;
  gap:12px;
  padding-right:20px;
}

/* ---------- 2. 出現フック（.reveal--visible は venn-welfare.js が付与） ---------- */
.reveal {
  zoom:0.78;
  opacity:0;
  transform:translateY(30px);
  transition:opacity .9s cubic-bezier(.22,.61,.36,1),transform 1s cubic-bezier(.16,.84,.3,1);
}
.reveal.reveal--visible {
  opacity:1;
  transform:none;
}
.hub-structure__hub {
  opacity:0;
  transform:translateX(-16px) scale(.96);
  transition:opacity .75s cubic-bezier(.22,.61,.36,1) .1s,transform .95s cubic-bezier(.16,1,.3,1) .1s;
}
.hub-structure.reveal--visible .hub-structure__hub,
.hub-structure.hub-structure--visible .hub-structure__hub {
  opacity:1;
  transform:none;
}
.hub-structure__row {
  opacity:0;
  transform:translateX(-22px);
  transition:opacity .7s cubic-bezier(.22,.61,.36,1),transform .9s cubic-bezier(.16,1,.3,1);
}
.hub-structure.reveal--visible .hub-structure__row,
.hub-structure.hub-structure--visible .hub-structure__row {
  opacity:1;
  transform:none;
}
.hub-structure.reveal--visible .hub-structure__row--first,
.hub-structure.reveal--visible .hub-structure__row--second,
.hub-structure.reveal--visible .hub-structure__row--third,
.hub-structure.reveal--visible .hub-structure__row--fourth,
.hub-structure.hub-structure--visible .hub-structure__row--first,
.hub-structure.hub-structure--visible .hub-structure__row--second,
.hub-structure.hub-structure--visible .hub-structure__row--third,
.hub-structure.hub-structure--visible .hub-structure__row--fourth {
  transition-delay:.5s;
}
.hub-structure__dot {
  left:0;
  opacity:0;
  margin-left:-7px;
  pointer-events:none;
}
.hub-structure.reveal--visible .hub-structure__dot,
.hub-structure.hub-structure--visible .hub-structure__dot {
  animation:hsFlow 2.3s cubic-bezier(.5,0,.5,1) infinite;
}
.hub-structure.reveal--visible .hub-structure__row--first .hub-structure__dot,
.hub-structure.hub-structure--visible .hub-structure__row--first .hub-structure__dot {
  animation-delay:1.2s;
}
.hub-structure.reveal--visible .hub-structure__row--second .hub-structure__dot,
.hub-structure.hub-structure--visible .hub-structure__row--second .hub-structure__dot {
  animation-delay:1.5s;
}
.hub-structure.reveal--visible .hub-structure__row--third .hub-structure__dot,
.hub-structure.hub-structure--visible .hub-structure__row--third .hub-structure__dot {
  animation-delay:1.8s;
}
.hub-structure.reveal--visible .hub-structure__row--fourth .hub-structure__dot,
.hub-structure.hub-structure--visible .hub-structure__row--fourth .hub-structure__dot {
  animation-delay:2.1s;
}
.welfare-flow__dot {
  right:0;
  opacity:0;
  margin-right:-7px;
  pointer-events:none;
}
.welfare-flow.reveal--visible .welfare-flow__dot {
  animation:wfFlow 2.3s cubic-bezier(.5,0,.5,1) infinite;
}
.welfare-flow.reveal--visible .hub-structure__row--first .welfare-flow__dot {
  animation-delay:1.2s;
}
.welfare-flow.reveal--visible .hub-structure__row--second .welfare-flow__dot {
  animation-delay:1.5s;
}
.welfare-flow.reveal--visible .hub-structure__row--third .welfare-flow__dot {
  animation-delay:1.8s;
}
.welfare-flow.reveal--visible .hub-structure__row--fourth .welfare-flow__dot {
  animation-delay:2.1s;
}
@keyframes hsFlow{0%{left:0;opacity:0;}12%{opacity:1;}82%{opacity:1;}100%{left:100%;opacity:0;}}
@keyframes wfFlow{0%{right:0;opacity:0;}12%{opacity:1;}82%{opacity:1;}100%{right:100%;opacity:0;}}

/* ---------- 3. ベン図シーケンスの初期状態（.hub-welfare--venn が付くと完成形） ---------- */
.hub-welfare__region,.hub-welfare__region-education {
  will-change:width;
}
.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region>.hub-welfare__field,.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region>.hub-welfare__rows {
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0) 34%,#000 66%,#000 100%);
  mask-image:linear-gradient(90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0) 34%,#000 66%,#000 100%);
  -webkit-mask-size:300% 100%;
  mask-size:300% 100%;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:0% 0%;
  mask-position:0% 0%;
}
.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region>.hub-welfare__label {
  opacity:0;
  transform:translate(-50%,calc(-50% + 8px));
}
.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region-education {
  width:100%;
  max-width:none;
  margin-left:calc(-50% + clamp(30px,4vw,52px) + clamp(4px,2vw,26px) + 1.125*clamp(44px,5vw,62px) - 28px);
}
.hub-welfare__region .hub-structure__row {
  transition-delay:1.5s;
}

/* ---------- 4. 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
  opacity:1;
  transform:none;
  transition:none;
}.hub-structure__hub,.hub-structure__row {
  opacity:1 !important;
  transform:none !important;
}.hub-structure__dot,.welfare-flow__dot {
  display:none;
};
}
@media (prefers-reduced-motion: reduce) {
  .hub-welfare:not(.hub-welfare--venn) .hub-welfare__region>.hub-welfare__field,.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region>.hub-welfare__rows {
  -webkit-mask-image:none;
  mask-image:none;
}.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region>.hub-welfare__label {
  opacity:1;
  transform:translate(-50%,-50%);
}.hub-welfare:not(.hub-welfare--venn) .hub-welfare__region-education {
  width:auto;
  margin-left:0;
};
}
