/* 代理店のしくみ（図解は HTML/CSS で構成。文字は選択でき、狭い画面では縦に並びます） */
.flow-figure { margin-top: 8px; }
.flow {
  --flow-gap: 56px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--flow-gap);
  counter-reset: none; align-items: stretch;
}
.flow__node {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 28px 20px 24px; text-align: left;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.flow__node:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.flow__step {
  position: absolute; top: -16px; left: 18px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px;
}
.flow__icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: #eef0f2; color: #3b434b; }
.flow__tier { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-top: 4px; }
.flow__name { font-size: 19px; line-height: 1.5; color: var(--ink); }
.flow__near { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: #eef0f2; color: #2e353c; border: 1.5px solid #c9ced3; }
.flow__role { font-size: 14.5px; line-height: 1.85; color: var(--text); }

/* オカモト（二次代理店）を強調：色だけでなく「私たち」バッジと太い枠で示す */
.flow__node--secondary { border-color: var(--red); border-width: 3px; background: linear-gradient(180deg, var(--red-soft), #fff 70%); box-shadow: 0 10px 30px rgba(204, 0, 51, .14); }
.flow__node--secondary .flow__step { background: var(--red); }
.flow__node--secondary .flow__icon { background: var(--red); color: #fff; }
.flow__node--secondary .flow__tier { color: var(--red-dark); }
.flow__node--secondary .flow__near { background: var(--red); border-color: var(--red); color: #fff; }
.flow__badge { position: absolute; top: -15px; right: 16px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 14px; border-radius: 999px; letter-spacing: .06em; }
.flow__node--customer { border-style: dashed; background: var(--surface); }

/* ノード間の矢印（装飾。常に表示され、動きは補助のみ） */
.flow__node:not(:last-child)::after {
  content: ""; position: absolute; z-index: 2; pointer-events: none;
  top: 50%; right: calc(var(--flow-gap) / -1 + 6px); width: calc(var(--flow-gap) - 12px); height: 3px; margin-top: -1.5px;
  background: linear-gradient(90deg, #8a939b 0 100%);
}
.flow__node:not(:last-child)::before {
  content: ""; position: absolute; z-index: 2; pointer-events: none;
  top: 50%; right: calc(var(--flow-gap) / -1 + 4px); width: 14px; height: 14px; margin-top: -7px;
  border-top: 3px solid #8a939b; border-right: 3px solid #8a939b; transform: rotate(45deg) scale(.9);
}
.flow__node--secondary:not(:last-child)::after { background: var(--red); }
.flow__node--secondary:not(:last-child)::before { border-color: var(--red); }
.flow__node:nth-child(2):not(:last-child)::after { background: var(--red); opacity: .55; }
.flow__node:nth-child(2):not(:last-child)::before { border-color: var(--red); opacity: .55; }

/* 流れる点（動きを止める設定のときは非表示） */
.flow__node:not(:last-child) .flow__icon { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .flow__node:not(:last-child) .flow__tier::after { content: ""; position: absolute; top: 50%; left: calc(100% + 6px); width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--red); z-index: 3; animation: flowDot 2.8s var(--ease) infinite; }
  html:not([data-motion="off"]) .flow__node:nth-child(2) .flow__tier::after { animation-delay: .9s; }
  html:not([data-motion="off"]) .flow__node:nth-child(3) .flow__tier::after { animation-delay: 1.8s; }
}
@keyframes flowDot { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(calc(var(--flow-gap) - 18px)); opacity: 0; } }
.flow__node .flow__tier { position: static; }
.flow__node { overflow: visible; }


/* 狭い画面：縦に並べ、矢印も下向きにして関係を保つ */
@media (max-width: 1040px) {
  .flow { grid-template-columns: 1fr; --flow-gap: 52px; max-width: 560px; margin-inline: auto; row-gap: var(--flow-gap); }
  .flow__node:not(:last-child)::after { top: auto; bottom: calc(var(--flow-gap) / -1 + 6px); right: auto; left: 50%; width: 3px; height: calc(var(--flow-gap) - 12px); margin: 0 0 0 -1.5px; background: #8a939b; }
  .flow__node:not(:last-child)::before { top: auto; bottom: calc(var(--flow-gap) / -1 + 4px); right: auto; left: 50%; margin: 0 0 0 -7px; transform: rotate(135deg) scale(.9); border-top-width: 3px; border-right-width: 3px; }
  .flow__node--secondary:not(:last-child)::after { background: var(--red); }
  .flow__node:nth-child(2):not(:last-child)::after { background: var(--red); opacity: .55; }
  .flow__node:nth-child(2):not(:last-child)::before { opacity: .55; }
  html:not([data-motion="off"]) .flow__node:not(:last-child) .flow__tier::after { top: calc(100% + 6px); right: auto; left: 50%; bottom: auto; margin: 0 0 0 -5px; animation-name: flowDotV; }
  .flow__node { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 4px; align-items: start; padding: 26px 20px 22px; }
  .flow__icon { grid-row: 1 / span 4; }
  .flow__node > :not(.flow__icon):not(.flow__step):not(.flow__badge) { grid-column: 2; }
  .flow__near { justify-self: start; }
}
@keyframes flowDotV { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(calc(var(--flow-gap) - 18px)); opacity: 0; } }
@media (max-width: 480px) {
  .flow__node { grid-template-columns: 1fr; }
  .flow__icon { grid-row: auto; }
  .flow__node > :not(.flow__icon):not(.flow__step):not(.flow__badge) { grid-column: 1; }
}

/* 目指していること */
.value { margin-top: clamp(40px, 6vw, 72px); padding: clamp(24px, 4vw, 40px); background: var(--surface); border-radius: var(--radius); }
.value__title { font-size: 18px; margin-bottom: 20px; }
.value__list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.value__item { position: relative; display: grid; gap: 6px; background: #fff; border-radius: 14px; padding: 18px 20px 18px 62px; border: 1px solid var(--line); line-height: 1.7; }
.value__item strong { font-size: 17px; color: var(--ink); }
.value__item span:last-child { font-size: 14.5px; color: var(--text); }
.value__num { position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; }

.provide-title { font-size: 18px; margin-bottom: 14px; }
.provide-list { display: grid; gap: 12px; }
.provide-list li { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 14px 18px; display: grid; gap: 2px; }
.provide-list strong { color: var(--ink); }
.provide-list span { font-size: 14.5px; line-height: 1.8; }
.role-num { font-weight: 700; font-size: 32px; color: var(--red); line-height: 1; margin-bottom: 10px; letter-spacing: .04em; }
