/* Compflex 団体サイト — 外部フォント・CDN なし */
:root {
  --navy: #1b2b4b;
  --navy-2: #2a3f66;
  --blue: #4a90d9;       /* 飾り(ロゴの四角・線)用 */
  --blue-text: #2b67a8;  /* 文字用(白・薄い背景でコントラスト 4.5 以上) */
  --teal: #2e7d72;
  --teal-bg: #e6f1ef;
  --ink: #1f2633;
  --muted: #5a6475;
  --line: #d9dee6;
  --tint: #f4f6f9;
  --white: #ffffff;
  --radius: 10px;
  --wrap: 1080px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.03em;
  font-feature-settings: "palt" 0;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--navy-2); }
strong { color: var(--navy); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.narrow-left { max-width: 760px; }
.sp-only { display: none; }

/* キーボード操作 */
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 8px 16px; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.hero a:focus-visible, .site-footer a:focus-visible { outline-color: #ffffff; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo {
  font-family: "Helvetica Neue", Arial, var(--font);
  font-weight: 800; font-size: 26px; letter-spacing: -0.02em;
  color: var(--navy); text-decoration: none; display: inline-flex; align-items: baseline;
}
.logo-dot { display: inline-block; width: 7px; height: 7px; background: var(--blue); margin-left: 2px; }
.nav { display: flex; gap: 24px; align-items: center; font-size: 14px; }
.nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--blue-text); }
.nav .nav-cta { background: var(--navy); color: var(--white); padding: 6px 16px; border-radius: 999px; }
.nav .nav-cta:hover { background: var(--navy-2); color: var(--white); }

/* トップ(ヒーロー)は末尾の「ヒーロー」にまとめた */
.btn { display: inline-block; padding: 14px 32px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; }
.btn-primary { background: var(--white); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-2); }
.btn-primary:hover { background: #e8eef8; }
.btn-ghost { border: 1px solid rgba(255,255,255,0.5); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }

/* セクション共通 */
.section { padding: 120px 0; }
.section-tint { background: var(--tint); }
.section-en {
  font-family: "Helvetica Neue", Arial, var(--font);
  color: var(--blue-text); font-weight: 700; font-size: 13px; letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 8px;
}
.section-title { font-size: 32px; color: var(--navy); margin-bottom: 40px; }
.section-lead { color: var(--muted); margin-bottom: 48px; }
.sub-title {
  font-size: 22px; color: var(--navy);
  margin: 88px 0 28px; padding-left: 14px; border-left: 4px solid var(--blue);
}
.mini-title { font-size: 17px; color: var(--navy); margin: 40px 0 16px; }
.note-center { text-align: center; color: var(--muted); margin: 40px 0 0; }
.small { font-size: 13px; color: var(--muted); margin-top: 24px; }

/* 想い */
.values { list-style: none; display: grid; gap: 20px; }
.values li {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--tint); border-radius: var(--radius); padding: 24px 28px;
}
.values strong { font-size: 17px; display: block; margin-bottom: 4px; }
.values p { margin: 0; color: var(--muted); }
.value-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: var(--white); font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}

/* カード */
.cards { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards-4 { grid-template-columns: repeat(2, 1fr); margin-top: 32px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 24px; }
.card h3, .card h4 { font-size: 17px; color: var(--navy); margin-bottom: 12px; }
.card h3::before { content: ""; display: block; width: 24px; height: 3px; background: var(--blue); margin-bottom: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card-plain { border-color: #b9d9d3; background: var(--teal-bg); }
.card-plain h4 { color: #22625a; }

/* いま → これから */
.before-after { list-style: none; display: grid; gap: 16px; }
.before-after li {
  display: grid; grid-template-columns: 1fr 40px 1fr; align-items: stretch;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.ba-now, .ba-next { padding: 18px 24px; font-size: 15px; }
.ba-now { color: var(--muted); }
.ba-next { background: var(--teal-bg); color: var(--ink); font-weight: 600; }
.ba-arrow { position: relative; }
.ba-arrow::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px;
  border-top: 2px solid var(--navy); border-right: 2px solid var(--navy);
  transform: translate(-70%, -50%) rotate(45deg);
}
.ba-legend { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: right; }
.tag { display: inline-block; padding: 0 10px; border-radius: 999px; font-size: 12px; }
.tag-now { background: #e3e6ec; color: var(--muted); }
.tag-next { background: var(--teal); color: var(--white); }

/* 進め方 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.step {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 24px 20px;
}
.step-free { border-top-color: var(--teal); }
.step-no { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 12px; font-weight: 700; color: var(--blue-text); letter-spacing: 0.1em; }
.step h3 { font-size: 16px; color: var(--navy); margin: 6px 0 12px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }
.badge { display: inline-block; background: var(--teal); color: var(--white); font-size: 12px; font-weight: 700; padding: 0 10px; border-radius: 999px; margin-bottom: 10px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -13px; width: 0; height: 0;
  border-left: 8px solid #9aa4b4; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  transform: translateY(-50%);
}

/* 料金の図 */
.chart { margin: 48px 0 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 32px 24px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart-sp { display: none !important; }
.chart figcaption { font-size: 13px; color: var(--muted); margin-top: 16px; }
.axis { stroke: var(--ink); stroke-width: 2; }
.axis-head { fill: var(--ink); }
.axis-label { font-size: 15px; font-weight: 700; fill: var(--ink); font-family: var(--font); }
.axis-sub { font-size: 13px; fill: var(--muted); font-family: var(--font); }
.line-general { fill: none; stroke: #6b7280; stroke-width: 6; stroke-linejoin: round; }
.line-compflex { fill: none; stroke: var(--teal); stroke-width: 6; stroke-linecap: round; }
.lbl-general { font-size: 17px; font-weight: 700; fill: #4b5563; font-family: var(--font); }
.lbl-sub { font-size: 13px; fill: #6b7280; font-family: var(--font); }
.lbl-compflex { font-size: 19px; font-weight: 700; fill: var(--teal); font-family: var(--font); }
.lbl-sub-c { font-size: 13px; fill: var(--teal); font-family: var(--font); }
.diff { stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 4 4; }
.lbl-diff { font-size: 14px; font-weight: 700; fill: var(--navy); font-family: var(--font); }

/* 実績 */
.works { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; background: var(--white); }
.work-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 10px; border-radius: 999px; background: #e3e8f2; color: var(--navy-2); }
.status-live { background: var(--teal); color: var(--white); }
.work h3 { font-size: 18px; color: var(--navy); margin-bottom: 16px; }
.work-issue { font-size: 14px; color: var(--muted); background: var(--tint); border-radius: 6px; padding: 10px 14px; }
.work-issue span { display: block; font-weight: 700; color: var(--ink); font-size: 12px; }
.work ul { padding-left: 1.2em; font-size: 15px; list-style: disc; }
.work li + li { margin-top: 4px; }
.plain-list { padding-left: 1.2em; }
.plain-list li + li { margin-top: 6px; }

/* メンバー */
.members { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 760px; }
.member { background: var(--white); border-radius: var(--radius); padding: 32px; border-top: 4px solid var(--navy); }
.member-role { font-size: 14px; color: var(--blue-text); font-weight: 700; margin-bottom: 4px; }
.member-name { font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: 0.12em; margin: 0; }

.profile { margin: 0; max-width: 760px; background: var(--white); border-radius: var(--radius); padding: 8px 32px; }
.profile > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.profile > div:last-child { border-bottom: none; }
.profile dt { font-weight: 700; color: var(--navy); }
.profile dd { margin: 0; }

/* お問い合わせ */
.contact { text-align: center; }
.contact .narrow { margin: 0 auto; }
.contact-box { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0 8px; }
.contact-item {
  display: flex; flex-direction: column; gap: 6px; padding: 28px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  background: var(--white); transition: border-color .2s;
}
.contact-item:hover { border-color: var(--blue); }
.contact-label { font-size: 13px; color: var(--muted); }

/* 本文だけのページ(プライバシーポリシー・404) */
.page { padding: 96px 0 120px; }
.page h2 { font-size: 20px; color: var(--navy); margin: 56px 0 16px; }
.page ul { padding-left: 1.2em; margin-bottom: 1em; }
.page li + li { margin-top: 6px; }
.page-date { color: var(--muted); font-size: 14px; margin-top: 56px; }
.page-center { text-align: center; }
.page-center .btn { margin-top: 24px; }
.contact-value { font-size: 20px; font-weight: 700; color: var(--navy); word-break: break-all; }

/* フッター */
.site-footer { background: var(--navy); color: #c5d0e2; padding: 48px 0; font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.footer-inner p { margin: 0; }
.site-footer a { color: #ffffff; }
.small-lead { color: var(--muted); font-size: 14px; margin: -12px 0 20px; }
.awards { max-width: 760px; }
.logo-footer { color: var(--white); font-size: 22px; }
.copyright { margin-left: auto !important; }

/* タブレット */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .step:not(:last-child)::after {
    top: auto; bottom: -16px; right: auto; left: 50%;
    border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 8px solid #9aa4b4; border-bottom: 0;
    transform: translateX(-50%);
  }
  .nav a:not(.nav-cta) { display: none; }
}

/* スマホ */
@media (max-width: 600px) {
  body { font-size: 15px; line-height: 1.85; }
  .wrap { padding: 0 20px; }
  .sp-only { display: inline; }
  .header-inner { height: 56px; }
  .logo { font-size: 22px; }
  .nav .nav-cta { padding: 5px 14px; font-size: 13px; }
  .btn { padding: 12px 24px; font-size: 14px; }
  .section { padding: 80px 0; }
  .section-title { font-size: 25px; margin-bottom: 28px; }
  .section-lead { margin-bottom: 32px; }
  .sub-title { font-size: 19px; margin-top: 64px; }
  .cards, .cards-4, .members, .contact-box { grid-template-columns: 1fr; }
  .card { padding: 24px 22px 20px; }
  .values li { padding: 20px; gap: 16px; }
  .before-after li { grid-template-columns: 1fr; }
  .ba-now, .ba-next { padding: 14px 18px; }
  .ba-arrow { height: 24px; }
  .ba-arrow::after { transform: translate(-50%, -70%) rotate(135deg); }
  .ba-legend, .note-center { text-align: left; }
  .chart { padding: 20px 16px; }
  .chart-pc { display: none !important; }
  .chart-sp { display: block !important; }
  .work { padding: 24px 20px; }
  .member { padding: 24px; }
  .profile { padding: 4px 20px; }
  .profile > div { grid-template-columns: 1fr; gap: 4px; }
  .contact { text-align: left; }
  .contact-value { font-size: 18px; }
  .copyright { margin-left: 0 !important; }
}

/* ===== ヒーロー(案 A/B/C は html の data-hero で切り替え。動きは hero.js) ===== */
:root { --hh: 64px; }
.hero {
  position: relative; overflow: hidden; overflow: clip; color: var(--white); /* clip は sticky を壊さない */
  background: radial-gradient(ellipse at 78% 40%, #253a66 0%, var(--navy) 62%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero-shade { display: none; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(27,43,75,.92) 0%, rgba(27,43,75,.75) 38%, rgba(27,43,75,0) 68%); }
.hero-sticky { position: relative; min-height: calc(100svh - var(--hh)); max-height: 980px; display: flex; align-items: center; padding: 72px 0; }
.hero-inner { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; align-items: center; }
.hero-text { position: relative; z-index: 1; }
.hero-label { color: #b8c6de; font-size: 15px; margin-bottom: 24px; }
.hero-title { font-size: 56px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.45; margin-bottom: 32px; }
.hero-em {
  background: linear-gradient(var(--blue), var(--blue)) no-repeat 0 96% / 0% 0.1em;
  transition: background-size .9s cubic-bezier(.2,.7,.2,1);
}
.hero.is-done .hero-em { background-size: 100% 0.1em; }
.hero-lead { font-size: 17px; color: #dde5f2; max-width: 560px; margin-bottom: 44px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { position: relative; height: 440px; }
.c-stage { display: none; }
[data-hero="c"] .hero-visual { height: 470px; }

/* 案 B: 背景いっぱいのネットワーク。文字側を暗くして読みやすく */
[data-hero="b"] .hero-shade { display: block; }

/* 案 C: スクロールで「いま → これから」。高さを足して中身を貼り付ける */
[data-hero="c"] .hero { height: calc(100svh - var(--hh) + 90vh); }
[data-hero="c"] .hero-sticky { position: sticky; top: var(--hh); height: calc(100svh - var(--hh)); min-height: 0; max-height: none; padding: 0; }
[data-hero="c"] .hero-canvas { display: none; }
[data-hero="c"] .c-stage {
  display: block; position: absolute; inset: 0;
  --phone-top: 40px; --phone-w: 236px; --phone-h: 420px; --row-top: 74px; --row-step: 64px; --row-h: 52px; --row-w: 204px;
}
.c-label { position: absolute; left: 0; right: 0; top: 0; text-align: center; margin: 0; height: 28px; font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.c-label span { position: absolute; left: 50%; transform: translateX(-50%); padding: 2px 14px; border-radius: 999px; white-space: nowrap; }
.c-now { background: rgba(255,255,255,.14); color: #dde5f2; }
.c-next { background: var(--teal); color: #fff; opacity: 0; }
.c-phone {
  position: absolute; left: 50%; top: var(--phone-top); width: var(--phone-w); height: var(--phone-h); margin-left: calc(var(--phone-w) / -2);
  border: 2px solid rgba(255,255,255,.55); border-radius: 30px; background: rgba(255,255,255,.06); opacity: 0;
}
.c-phone-head { margin: 22px 0 0; text-align: center; font-size: 12px; font-weight: 700; color: #dde5f2; letter-spacing: .06em; }
.c-item { position: absolute; left: 50%; width: var(--row-w); height: var(--row-h); margin-left: calc(var(--row-w) / -2); will-change: transform; }
.c-item { top: calc(var(--phone-top) + var(--row-top) + var(--row-step) * var(--i)); }
.c-old {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #f3f1ea; color: #4b5563; border-radius: 4px; padding: 10px 12px; font-size: 12px; line-height: 1.4;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: nowrap; animation: c-wobble 3.2s ease-in-out infinite;
}
.c-old b { display: block; font-weight: 700; color: #374151; margin-bottom: 6px; }
.c-old i { display: block; height: 4px; background: #c9ccd3; border-radius: 2px; margin-top: 6px; }
.c-paper { width: 132px; }
.c-paper i:nth-of-type(2) { width: 80%; } .c-paper i:nth-of-type(3) { width: 60%; }
.c-call { border-radius: 16px; background: #ffffff; }
.c-sheet { width: 128px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #eef5ee; }
.c-sheet b { grid-column: 1 / -1; color: #2e6b3a; margin-bottom: 2px; }
.c-sheet i { margin: 0; height: 10px; background: #cfe0cf; }
.c-card { width: 120px; display: flex; flex-wrap: wrap; gap: 6px; }
.c-card b { width: 100%; margin-bottom: 0; }
.c-card i { width: 16px; height: 16px; border-radius: 50%; margin: 0; background: #d9a3a3; }
.c-card i:nth-of-type(n+3) { background: none; border: 2px solid #d9a3a3; }
.c-memo { background: #fbe9a6; transform: translate(-50%, -50%) rotate(-3deg); }
.c-item .c-old { animation-delay: calc(var(--i) * -0.7s); }
@keyframes c-wobble { 0%, 100% { margin-top: 0; } 50% { margin-top: -5px; } }
.c-new {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: #ffffff; border-radius: 10px; opacity: 0;
}
.c-ico { flex: none; width: 26px; height: 26px; border-radius: 6px; background: #dbe7f6; }
.c-first .c-ico { background: var(--blue); }
.c-lines { flex: 1; } .c-lines i { display: block; height: 5px; border-radius: 3px; background: #cdd5e1; }
.c-lines i + i { margin-top: 6px; width: 60%; background: #e3e8ef; }
.c-chip { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: var(--teal); padding: 1px 8px; border-radius: 999px; }
.c-cue { position: absolute; left: 0; right: 0; bottom: -8px; margin: 0; text-align: center; font-size: 12px; color: #b8c6de; letter-spacing: .08em; }
.c-cue::after { content: ""; display: block; width: 8px; height: 8px; margin: 6px auto 0; border-right: 2px solid #b8c6de; border-bottom: 2px solid #b8c6de; transform: rotate(45deg); animation: c-cue 1.6s ease-in-out infinite; }
@keyframes c-cue { 0%, 100% { translate: 0 0; } 50% { translate: 0 5px; } }

/* 見比べ用の切り替え(?hero= を付けたときだけ出る) */
.hero-switch {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); font-size: 12px; color: var(--muted);
}
.hero-switch[hidden] { display: none; }
.hero-switch span { margin-right: 4px; }
.hero-switch a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; text-decoration: none; color: var(--navy); font-weight: 700; }
.hero-switch a[aria-current] { background: var(--navy); color: #fff; }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { height: 220px; }
  [data-hero="c"] .hero-visual { height: 470px; }
  [data-hero="b"] .hero-shade { background: linear-gradient(180deg, rgba(27,43,75,.9) 0%, rgba(27,43,75,.72) 55%, rgba(27,43,75,.1) 80%); }
}
@media (max-width: 600px) {
  :root { --hh: 56px; }
  .hero-sticky { padding: 56px 0 40px; max-height: none; }
  .hero-label { font-size: 13px; margin-bottom: 16px; }
  .hero-title { font-size: 31px; margin-bottom: 20px; }
  .hero-lead { font-size: 15px; margin-bottom: 28px; }
  .hero-lead br { display: none; }
  .hero-visual { height: 200px; }
  [data-hero="c"] .hero-sticky { padding: 16px 0; }
  [data-hero="c"] .hero-lead { display: none; }
  [data-hero="c"] .hero-visual { height: 360px; }
  [data-hero="c"] .c-stage { --phone-top: 34px; --phone-w: 196px; --phone-h: 316px; --row-top: 58px; --row-step: 48px; --row-h: 40px; --row-w: 172px; }
  .c-old { font-size: 11px; padding: 8px 10px; }
  .c-paper, .c-sheet { width: 112px; } .c-card { width: 104px; }
  .c-new { gap: 8px; padding: 0 10px; } .c-ico { width: 22px; height: 22px; }
  .hero-switch { left: 50%; transform: translateX(-50%); }
}

/* 動きを減らす設定のときは止めた版 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-em { transition: none; background-size: 100% 0.1em; }
  .c-old, .c-cue::after { animation: none; }
  [data-hero="c"] .hero { height: auto; }
  [data-hero="c"] .hero-sticky { position: relative; top: 0; height: auto; min-height: calc(100svh - var(--hh)); padding: 64px 0; }
  .c-cue { display: none; }
}
