:root {
  --bg: #000000;
  --signal: #C8FF2E;
  --text: #FFFFFF;
  --text-sub: #A6ABB2;
  --line: #33373D;
  --bar: #2A2D32; /* 棒のグラフの低い(入力側の)棒 */

  --font-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-num: "B612 Mono", ui-monospace, monospace;

  /* 中身の幅と、左右のあき。画面が 1440px (中身 1360px + 左右 40px) より広いときは、あきを広げて中身を左右中央に置く。
     % は使う要素の親の幅に対する値なので、画面いっぱいの幅の要素 (main の直下の節、帯、ヘッダー、フッター、貼り付く帯) の
     左右の padding に使う。1360px の中身の中で使うと 40px になる。スクロールバーの幅を含む 100vw は使わない */
  --content-w: 1360px;
  --pad-x: max(40px, (100% - var(--content-w)) / 2);
  --header-h: 72px;
  /* 1440×900 で 64px。背の低い画面では詰めて、文字と 3D の波がぶつからないようにする */
  --copy-gap: clamp(32px, 7.12svh, 64px);
  --hero-min: 520px;
  --section-pad-y: 120px;
  --block-gap: 56px; /* Gain と受託開発のブロックの中のまとまりの間 */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* アンカーで飛んだ先が固定ヘッダーの下に隠れないようにする */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  /* 日本語は文節の切れ目で折り返す(「公開/したあと」のような折れ方を避ける) */
  word-break: auto-phrase;
}

/* 住所や電話番号を、郵便番号・番地・建物名の単位でだけ折り返す */
.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ヘッダー */

/* 地は黒で塗る。ファーストビューでは 3D の上端も黒なので見え方は変わらず、
   下のセクションでは本文がヘッダーの下を通っても重ならない */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad-x);
  background: var(--bg);
}

.site-header__logo {
  display: block;
}

.site-header__logo img {
  display: block;
  width: auto;
  height: 26px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav__list {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list > li > a,
.services-menu__button {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 6px;
}

.site-nav__list > li > a:hover,
.services-menu__button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* 開いているページ(aria-current)。ホバーの 1px より太い 2px の下線で示す。
   「サービス」のボタンは、サービスの下のページで aria-current="true" になる */
.site-nav__list > li > a[aria-current],
.services-menu__button[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* 「サービス」。押すと、ヘッダーの下に画面の幅いっぱいで開く(スマホのメニューと同じ開き方)。
   details で作るので、JavaScript が無くても開閉できる(menu.js は閉じ方の補助だけ)。
   ホバーでは開かない(768〜1023px のタブレットでもこのメニューが出るので、ホバーで開く作りだとタッチで開けない)。
   inline-block にして、隣のリンク(li の中の行に乗る inline)と同じ行の高さに乗せる(block だと文字が 2px 上にずれる) */
.services-menu__button {
  display: inline-block;
  list-style: none;
  cursor: pointer;
}

.services-menu__button::-webkit-details-marker {
  display: none;
}

.services-menu__button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* 開くことを示す下向きの山形。開いているあいだは上向きにする。下線は文字にだけ付く(inline-block には付かない) */
.services-menu__button::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  vertical-align: middle;
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.12s;
}

.services-menu[open] > .services-menu__button::after {
  transform: translateY(1px) rotate(225deg);
}

/* ヘッダーの下に、画面の幅いっぱいで開く。中身の左右はヘッダーと同じあきにそろえる。画面が低いときは中でスクロールする */
.services-menu__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100svh - var(--header-h));
  padding: 40px var(--pad-x) 32px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--text);
  background: var(--bg);
}

/* 3 つのまとまりを横に並べる。そのほかの事業(5 つ)は中を 2 列にして、ほかの 2 つと高さをそろえる */
.services-menu__groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
}

.services-menu__label,
.site-menu__label {
  margin: 0 0 8px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.services-menu__list,
.site-menu__services-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.services-menu__group:last-child .services-menu__list {
  columns: 2;
  column-gap: 40px;
}

.services-menu__list li {
  break-inside: avoid;
}

.services-menu__list a,
.services-menu__index a,
.site-menu__services-list a {
  display: block;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 6px;
}

.services-menu__list a:hover,
.services-menu__index a:hover,
.site-menu__services-list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.services-menu__list a[aria-current],
.services-menu__index a[aria-current],
.site-menu__services-list a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* サービス一覧のページへのリンク。3 つのまとまりの下に、線で区切って置く */
.services-menu__index {
  margin: 32px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.services-menu__index a {
  display: inline-block;
}

/* スマホのメニュー。文字のナビが隠れる幅(767px 以下)でだけ出す。details で作るので、JavaScript が無くても開閉できる
   (menu.js は、リンクを押したときなどに閉じる補助だけ) */
.site-menu {
  display: none;
}

.site-menu__button {
  display: block;
  min-width: 84px;
  padding: 9px 14px;
  border: 1px solid var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  list-style: none;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.site-menu__button::-webkit-details-marker {
  display: none;
}

.site-menu__button:hover,
.site-menu[open] > .site-menu__button {
  background: var(--text);
  color: #000;
}

.site-menu__button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* 開いているあいだは「閉じる」と読ませる */
.site-menu__close,
.site-menu[open] .site-menu__open {
  display: none;
}

.site-menu[open] .site-menu__close {
  display: inline;
}

/* ヘッダーの下に、画面の幅いっぱいで開く。画面が低いときは中でスクロールする */
.site-menu__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100svh - var(--header-h));
  padding: 0 var(--pad-x) 24px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--text);
  background: var(--bg);
}

/* メニューの中のサービス。メニューの中でさらに畳むと、また見つけにくくなるので、開いたまま並べる。
   押す所の高さは 44px(文字 24px + 上下 10px) */
.site-menu__services {
  padding: 18px 0 8px;
  border-bottom: 1px solid var(--line);
}

.site-menu__services-list a {
  padding: 10px 0;
}

.site-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-menu__list li + li {
  border-top: 1px solid var(--line);
}

.site-menu__list a {
  display: block;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  text-underline-offset: 6px;
}

.site-menu__list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-menu__list a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* .btn の inline-block より強くして、メニューの幅いっぱいにする */
.site-menu__panel .site-menu__cta {
  display: block;
  margin-top: 8px;
  text-align: center;
}

/* ボタン */

.btn {
  display: inline-block;
  padding: 16px 28px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.btn--signal {
  border-color: var(--signal);
  background: var(--signal);
  color: #000;
}

.btn--ghost {
  border-color: var(--text);
  color: var(--text);
}

.btn:hover {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.btn--small {
  padding: 9px 18px;
  font-size: 14px;
}

/* 「相談する」のページを開いているとき。ナビの現在地と同じ 2px の下線で示す */
.btn[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ファーストビュー */

/* ヒーローを 70vh ぶん固定し、そのあいだのスクロールで波を大きくする(main.js の p) */
.hero-track {
  height: calc(max(100vh, var(--hero-min)) + 70vh);
}

/* 文字とボタンが切れないように高さに下限を付ける。画面のほうが低いときは、下の端まで見えた所で固定する */
.hero {
  position: sticky;
  top: min(0px, 100svh - var(--hero-min));
  height: max(100svh, var(--hero-min));
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero__copy {
  position: absolute;
  top: calc(var(--header-h) + var(--copy-gap));
  left: var(--pad-x);
  z-index: 1;
  width: min(620px, 100% - var(--pad-x) * 2);
}

.hero__title {
  margin: 0;
  /* 横幅に加えて高さでも上限を付ける(1440×900 では 5.6vw のまま) */
  font-size: clamp(44px, min(5.6vw, 9svh), 84px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* 幅を文字に合わせ、main.js がブレースとの重なりを測れるようにする */
.hero__title span {
  display: block;
  width: max-content;
  white-space: nowrap;
}

/* 幅を行の長さに合わせ、main.js がブレースとの重なりを測れるようにする。
   行の長さは 1-pillar-wave の本文と同じくらいに抑え、ブレースの高さと 3D の構図を変えない */
.hero__lead {
  width: fit-content;
  max-width: 20.5em;
  margin: 28px 0 0;
  color: var(--text-sub);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* 後ろを 3D の波が通っても文字が読めるように、枠だけのボタンの中を黒で塗る。
   :where() で詳細度を上げず、ホバーの白い地(.btn:hover)が勝つようにする */
:where(.hero__actions) .btn--ghost {
  background: #000;
}

/* 軸ラベル。横位置は main.js が 3D の位置を投影して決める */

.axis {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.axis__item {
  position: absolute;
  bottom: 28px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
  visibility: hidden;
}

.axis__line {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 1px;
  height: 0;
  background: var(--line);
}

.axis__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.axis__sub {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.axis__value {
  color: var(--signal);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* WebGL2 が使えないときは文字だけにする */

.no-webgl .hero__canvas,
.no-webgl .axis {
  display: none;
}

/* セクション共通 */

.section {
  padding: var(--section-pad-y) var(--pad-x);
  border-top: 1px solid var(--line);
}

.section__title {
  margin: 0 0 56px;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.section__title--lead {
  margin-bottom: 20px;
}

.section__title--small {
  margin-bottom: 40px;
  font-size: clamp(22px, 2.4vw, 32px);
}

/* 見出しの右に小さな 1 行を置く */
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 32px;
  margin-bottom: 56px;
}

.section__head .section__title {
  margin-bottom: 0;
}

/* 縦の棒のグラフ。ヒーローの「入力 → 出力」の縮図。棒は main.js が並べる */

.bars {
  --bar-max: 56px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: var(--bar-max);
}

.bar {
  flex: none;
  width: 6px;
  height: calc(var(--h) * var(--bar-max));
  background: var(--bar);
}

.bar--signal {
  background: var(--signal);
}

/* 進め方 */

.approach__lead {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

/* 2 行の長さをそろえて、文節の途中(「その/場で」など)で折れないようにする */
.approach__text {
  max-width: 40em;
  margin: 8px 0 56px;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.9;
  text-wrap: balance;
}

.approach__more {
  margin-top: 56px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: var(--content-w);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: 0 48px;
}

.step:first-child {
  padding-left: 0;
}

.step:last-child {
  padding-right: 0;
}

.step + .step {
  border-left: 1px solid var(--line);
}

.step__label {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.bars--step {
  margin-bottom: 32px;
}

.step__title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.step__text {
  margin: 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.9;
}

/* 増幅の段を挟むブレース。縦に伸ばしても線の太さと角の鋭さは変わらない */
.step__brace {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linejoin: miter;
  stroke-miterlimit: 10;
}

.step__brace polyline {
  vector-effect: non-scaling-stroke;
}

.step__brace--open {
  left: 14px;
}

.step__brace--close {
  right: 14px;
}

/* 頼み方の表 */

.plans {
  width: 100%;
  max-width: var(--content-w);
  border-collapse: collapse;
  border-bottom: 1px solid var(--line);
  table-layout: fixed;
  text-align: left;
}

.plans th,
.plans td {
  padding: 28px 32px 28px 0;
  vertical-align: baseline;
}

.plans th:last-child,
.plans td:last-child {
  padding-right: 0;
}

.plans thead th {
  padding-top: 0;
  padding-bottom: 16px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.plans thead th:nth-child(1),
.plans thead th:nth-child(2) {
  width: 19%;
}

.plans thead th:nth-child(3) {
  width: 38%;
}

.plans tbody tr {
  border-top: 1px solid var(--line);
}

.plans__way {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.plans__service,
.plans__scene,
.plans__cost {
  font-size: 16px;
  line-height: 1.8;
}

.plans__scene {
  color: var(--text-sub);
}

.plans__service a {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* Gain と受託開発。白 1px の枠で囲む同じ大きさのブロック */

.product {
  max-width: var(--content-w);
  padding: 56px;
  border: 1px solid var(--text);
}

/* 上部は左に名前、右に見出しを置き、横長の枠の右側が空かないようにする */
.product__head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  column-gap: 56px;
}

.product__pitch > :first-child {
  margin-top: 0;
}

.product__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}

.product__name {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.product__by {
  color: var(--text-sub);
  font-size: 14px;
}

.product__tagline {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.7;
}

.product__preface {
  margin: 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.9;
}

.product__catch {
  margin: 12px 0 0;
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.product__catch span {
  display: block;
}

.product__text {
  max-width: 40em;
  margin: 20px 0 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.9;
  text-wrap: balance;
}

/* Gain の伴走と受託開発の体制。上下を罫で区切った 1 行 */
.product__band {
  margin: var(--block-gap) 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
}

.product__sub {
  margin: var(--block-gap) 0 24px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--block-gap);
}

/* ブロックの中の 2〜3 列。列の間は縦罫 */

.columns {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  margin: var(--block-gap) 0 0;
  padding: 0;
  list-style: none;
}

.product__sub + .columns {
  margin-top: 0;
}

.contracts {
  --cols: 2;
}

.column {
  padding: 0 40px;
}

.column:first-child {
  padding-left: 0;
}

.column:last-child {
  padding-right: 0;
}

.column + .column {
  border-left: 1px solid var(--line);
}

.column__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.column__text {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.9;
}

.gain-steps .column__text {
  margin-top: 16px;
  font-size: 15px;
}

.gain-steps__num {
  margin-right: 6px;
}

/* 5 段のレベルメーター。点いている段だけ黄緑で塗る */
.meter {
  display: flex;
  gap: 4px;
  margin-top: 18px;
}

.meter__cell {
  width: 22px;
  height: 10px;
  border: 1px solid var(--line);
}

.meter__cell--on {
  border-color: var(--signal);
  background: var(--signal);
}

/* 料金 */

.prices__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.prices__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0 0;
}

.prices__num {
  font-family: var(--font-num);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1;
}

/* 単位は 14px だと大きな数字に埋もれ、「5 万円〜」が「5 円」に見えかねないので、白で大きめにする */
.prices__unit {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.prices__note {
  margin: 14px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.7;
}

/* ご利用開始まで。番号の間を横線でつなぐ */

.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow__step {
  position: relative;
  padding-right: 32px;
}

.flow__num {
  display: block;
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 700;
  line-height: 20px;
}

.flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 16px;
  left: 32px;
  height: 1px;
  background: var(--line);
}

.flow__text {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.8;
}

/* 横棒の図。名前の列は一番長い名前に合わせ、棒の左端をそろえる */

.hbars {
  --max: 33; /* いちばん長い棒の件数 */
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 18px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hbar {
  display: contents;
}

.hbar__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.hbar__value {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 長さは件数に比例させ、右に件数を置く分を残す */
.hbar__bar {
  flex: none;
  width: calc(var(--n) / var(--max) * (100% - 5em));
  height: 12px;
  background: var(--signal);
}

.hbar__count {
  flex: none;
  font-size: 16px;
  line-height: 1.5;
}

.hbar__num {
  font-family: var(--font-num);
  font-weight: 700;
}

/* 実績 */

.works-total {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  column-gap: 96px;
  max-width: var(--content-w);
  margin-bottom: 64px;
}

.works-total__count {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
}

.works-total__num {
  font-family: var(--font-num);
  font-size: clamp(72px, 10vw, 144px);
  font-weight: 700;
  line-height: 0.85;
}

.works-total__unit {
  font-size: 24px;
  font-weight: 700;
}

/* 実績のマス。枠は隣と 1px 重ねて 1 本に見せる */

.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: var(--content-w);
  margin: 0;
  padding: 0;
  list-style: none;
}

.work {
  margin: 0 -1px -1px 0;
  padding: 32px 36px 36px;
  border: 1px solid var(--line);
  transition: border-color 0.12s;
}

.work:hover {
  position: relative;
  z-index: 1;
  border-color: var(--text);
}

.work__kind {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

.work__name {
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

.work__text {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.8;
}

.works__more {
  margin-top: 48px;
}

/* 一覧や詳しいページへのボタン (節の終わりに置く) */
.section__more {
  margin-top: 48px;
}

/* お知らせとブログ */

.news__caption {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.6;
}

.news {
  max-width: var(--content-w);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  list-style: none;
}

.news li + li {
  border-top: 1px solid var(--line);
}

.news__item {
  display: grid;
  grid-template-columns: 7em 5.5em minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 32px;
  padding: 24px 0;
  text-decoration: none;
}

.news__date {
  color: var(--text-sub);
  font-family: var(--font-num);
  font-size: 14px;
}

.news__type {
  font-size: 13px;
  font-weight: 700;
}

.news__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

/* リンクのある行だけ、題名に灰色の下線を引く(触れると白)。リンクの無い行は線も反応もなし */
a.news__item .news__title {
  text-decoration: underline;
  text-decoration-color: var(--text-sub);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.12s;
}

a.news__item:hover .news__title,
a.news__item:focus-visible .news__title {
  text-decoration-color: currentColor;
}

.news__sample {
  padding: 1px 8px;
  border: 1px solid var(--line);
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

/* そのほかの事業 */

.others {
  max-width: var(--content-w);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.other {
  display: grid;
  grid-template-columns: minmax(0, 18em) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 40px;
  padding: 22px 0;
}

.other + .other {
  border-top: 1px solid var(--line);
}

.other__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.other__name a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.other__text {
  margin: 0;
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.8;
}

/* 相談・会社概要 */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: start;
  column-gap: 80px;
}

.contact > * {
  max-width: 760px;
}

.contact__title {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.contact__title span {
  display: block;
}

.contact__text {
  margin: 32px 0 0;
  color: var(--text-sub);
  font-size: 16px;
  line-height: 1.9;
}

.contact__button {
  margin-top: 40px;
}

.company {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.company__row {
  display: grid;
  grid-template-columns: 7em minmax(0, 1fr);
  column-gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.company dt {
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.8;
}

.company dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

.company dd a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.company__more {
  margin-top: 40px;
}

/* フッター */

.site-footer {
  padding: 48px var(--pad-x) 40px;
  border-top: 1px solid var(--line);
}

.site-footer__logo {
  display: block;
  width: fit-content;
}

.site-footer__logo img {
  display: block;
  width: auto;
  height: 26px;
}

/* 全ページ共通の案内: 左に会社、右にサービスと会社情報 */
.site-footer__main {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  column-gap: 56px;
  max-width: var(--content-w);
}

.site-footer__name {
  margin: 28px 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.site-footer__info {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer__info div {
  display: grid;
  grid-template-columns: 3.5em minmax(0, 1fr);
  column-gap: 12px;
  padding: 3px 0;
}

.site-footer__info dt {
  color: var(--text-sub);
}

.site-footer__info dd {
  margin: 0;
}

.site-footer__info a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.site-footer__title {
  margin: 0 0 10px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

/* 見出しの「サービス」だけはリンクなので、下線で見分けられるようにする */
.site-footer__title a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.site-footer__title a:hover {
  color: var(--text);
}

.site-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__list a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
  text-underline-offset: 6px;
}

.site-footer__list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 40px;
  max-width: var(--content-w);
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer__bottom a {
  text-decoration: none;
  text-underline-offset: 6px;
}

.site-footer__bottom a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__bottom small {
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .work,
  .site-menu__button,
  .services-menu__button::after,
  a.news__item .news__title {
    transition: none;
  }
}

/* タブレット: ヘッダーのナビ 5 つが入るように間を詰める。ブロックの上部と、相談・会社概要は 1 列に積む
   (会社概要の住所は折り返せない単位があり、2 列のままだと 768〜820px で右にはみ出す) */
@media (max-width: 1023px) {
  .site-nav {
    gap: 24px;
  }

  .site-nav__list {
    gap: 18px;
  }

  /* 「サービス」の中身: 3 つのまとまりを同じ幅にして、そのほかの事業も 1 列にする
     (1fr 1fr 2fr のままだと 768px で「ソースコード全件チェック」が折り返す) */
  .services-menu__groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .services-menu__group:last-child .services-menu__list {
    columns: auto;
  }

  .product__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .product__pitch {
    margin-top: var(--block-gap);
  }

  .contact {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 56px;
  }

  /* フッター: 会社を上に、サービスと会社情報の 2 列を下に */
  .site-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 24px;
  }

  .site-footer__company {
    grid-column: 1 / -1;
  }
}

/* 3 段を横に並べたまま列が狭いときは、行の途中で折ってよいことにする (そのままだと隣の列にはみ出す) */
@media (min-width: 768px) and (max-width: 1023px) {
  .steps:not(.steps--wide) .step__text .nowrap {
    white-space: normal;
  }
}

/* スマホ: ヘッダーは「相談する」だけを残す。セクションは 1 列に積み、表は 1 件ずつ縦に積む */
@media (max-width: 767px) {
  :root {
    --pad-x: 20px;
    --copy-gap: 28px;
    --hero-min: 680px; /* 文字の下に、波とラベルが入る高さ */
    --section-pad-y: 88px;
    --block-gap: 40px;
  }

  .site-nav__list {
    display: none;
  }

  /* 文字のナビの代わりに「メニュー」ボタンを出す。「相談する」は並べて残す */
  .site-nav {
    gap: 8px;
  }

  .site-nav .btn--small {
    padding-right: 14px;
    padding-left: 14px;
  }

  .site-menu {
    display: block;
  }

  .section__title {
    margin-bottom: 40px;
  }

  .section__title--lead {
    margin-bottom: 16px;
  }

  .section__head {
    margin-bottom: 40px;
  }

  .approach__text {
    margin-bottom: 40px;
  }

  .approach__more {
    margin-top: 40px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .step,
  .step:first-child,
  .step:last-child {
    padding: 0;
  }

  .step + .step {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .step--gate {
    padding-right: 40px;
    padding-left: 40px;
  }

  /* 上の罫からではなく、段の中身の高さに合わせて立てる */
  .step--gate .step__brace {
    top: 40px;
    height: calc(100% - 40px);
  }

  .step__brace--open {
    left: 0;
  }

  .step__brace--close {
    right: 0;
  }

  /* 表は 1 件ずつ縦に積み、見出し行の言葉を各項目の上に出す */
  .plans,
  .plans tbody,
  .plans tr,
  .plans th,
  .plans td {
    display: block;
    width: auto;
  }

  .plans thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .plans tbody tr {
    padding: 24px 0 28px;
  }

  .plans th,
  .plans td {
    padding: 0;
  }

  .plans td {
    margin-top: 14px;
  }

  .plans td::before {
    content: attr(data-label);
    display: block;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
  }

  .product {
    padding: 32px 18px;
  }

  /* 見出しは 2 行固定。1 行目(約 11 文字分)が枠の内側に収まる大きさまで、画面幅に合わせて縮める */
  .product__catch {
    font-size: min(28px, (100vw - 78px) / 11);
  }

  .columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .column,
  .column:first-child,
  .column:last-child {
    padding: 0;
  }

  .column + .column {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  /* 番号を縦に並べ、番号の間を縦線でつなぐ */
  .flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow__step {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 0 0 24px;
  }

  .flow__text {
    margin-top: 0;
    line-height: 20px;
  }

  .flow__step:not(:last-child)::after {
    top: 30px;
    right: auto;
    bottom: 6px;
    left: 6px;
    width: 1px;
    height: auto;
  }

  .hbars {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .hbar__value {
    margin-bottom: 12px;
  }

  .works-total {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
  }

  .works {
    grid-template-columns: minmax(0, 1fr);
  }

  .work {
    padding: 28px 24px 30px;
  }

  .news__item {
    grid-template-columns: auto auto minmax(0, 1fr);
    row-gap: 8px;
    column-gap: 16px;
    padding: 20px 0 22px;
  }

  .news__title {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .news__sample {
    justify-self: start;
  }

  .other {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
    padding: 18px 0;
  }

  .contact {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 56px;
  }

  .company__row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
    padding: 16px 0;
  }

  .site-footer {
    padding-top: 40px;
    padding-bottom: 32px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 40px;
  }

  .site-footer__list a {
    padding: 8px 0;
  }
}

/* 380px より狭い画面では、ロゴ・「相談する」・「メニュー」が 1 行に入らない。
   ヘッダーの「相談する」は外し、メニューの中の「相談する」だけにする */
@media (max-width: 379px) {
  .site-nav > .btn {
    display: none;
  }

  /* 2 行目の 7 文字が幅に収まる大きさ(348px 以上では 44px のまま) */
  .hero__title {
    font-size: min(44px, (100vw - var(--pad-x) * 2) / 7);
  }
}
