/* koshin-tech.jp のサイト。色は名刺（濃紺・水色・青）に合わせる。名刺と同じく白地の配色で、ダークモードは持たない */
:root {
  color-scheme: light;
  --color-bg: #ffffff;
  --color-bg-tinted: #f3f7fb;
  --color-navy: #0a2540;
  --color-navy-deep: #061a2e;
  --color-text: #0a2540;
  --color-text-muted: #3b5470;
  --color-border: #d3dee9;
  --color-sky: #4fc3f7;
  --color-blue: #1e88e5;
  --color-tint: #eaf6fd;
  --color-link: #0b5cad;
  --font-en: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family:
    "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.03em;
}

/* 言語ごとの文字。日本語の書体のままだと、ハングルと中国語の字形が合わない */
body:lang(en) {
  font-family: var(--font-en);
  letter-spacing: 0.01em;
}

body:lang(ko) {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  letter-spacing: 0;
  word-break: keep-all;
}

body:lang(zh-Hans) {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

body:lang(zh-Hant) {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

a {
  color: var(--color-link);
}

img {
  max-width: 100%;
}

.header-inner,
.hero-inner,
.section-inner,
.footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ヘッダー */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  min-height: 68px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--color-text);
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.logo-wordmark {
  display: block;
  width: auto;
  height: 20px;
}

.logo-ja {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.42em;
  color: var(--color-text-muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  color: var(--color-text);
  text-decoration: none;
}

.nav a:hover {
  color: var(--color-link);
}

.header-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 28px;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  padding-left: 20px;
  border-left: 1px solid var(--color-border);
  font-size: 12px;
}

.languages a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.languages a:hover {
  color: var(--color-link);
  text-decoration: underline;
}

.languages a[aria-current="true"] {
  color: var(--color-navy);
  font-weight: 700;
}

/* トップの帯。名刺の裏面（濃紺の地、右下の淡い円）に、細い格子と光の円を重ねる */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 38%, rgb(79 195 247 / 0.22), transparent 34%),
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-deep) 100%);
  color: #ffffff;
}

/* 名刺の裏面の右下の淡い円 */
.hero::before {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -260px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(255 255 255 / 0.04);
}

/* カーソルに少し遅れてついていく、ぼんやりした光（hero.js が --glow-x・--glow-y を動かす） */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    440px circle at var(--glow-x, 80%) var(--glow-y, 38%),
    rgb(79 195 247 / 0.3),
    rgb(30 136 229 / 0.12) 40%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

/* 名刺のロゴの光 */
.hero-light {
  position: absolute;
  right: 10%;
  top: 22%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, #8fdcfb 0%, var(--color-sky) 45%, #1e88e5 100%);
  box-shadow: 0 0 80px rgb(79 195 247 / 0.45);
  opacity: 0.88;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 112px;
  padding-bottom: 104px;
}

.hero-motto {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--color-sky);
}

.hero-copy {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.05em;
}

.hero-motto:lang(en) {
  font-family: var(--font-en);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy:lang(en) {
  letter-spacing: 0;
}

.hero-en {
  margin: 28px 0 0;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b7d3f0;
}

/* 節 */
.section {
  padding: 96px 0;
  scroll-margin-top: 68px;
}

.section-tinted {
  background: var(--color-bg-tinted);
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 40px;
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-blue);
}

.section-label::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--color-blue);
}

p {
  margin: 0 0 16px;
}

/* メッセージ */
.message {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

mark {
  padding: 0 0.1em;
  background: linear-gradient(transparent 58%, rgb(79 195 247 / 0.38) 58%);
  color: inherit;
  font-weight: 700;
}

.signature {
  margin-top: 32px;
  font-weight: 500;
}

.stat {
  margin: 0;
  padding: 28px 28px 24px;
  border-top: 4px solid var(--color-navy);
  background: var(--color-bg-tinted);
}

.stat-value {
  margin: 0 0 12px;
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-navy);
}

.stat-number {
  font-size: 84px;
  letter-spacing: -0.03em;
  margin: 0 2px;
}

.stat figcaption {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.stat-source {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* 事業内容 */
.product-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-bottom: 16px;
}

.product-head img {
  height: 40px;
  width: auto;
}

.product-kind {
  word-break: auto-phrase;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.product-lead {
  max-width: 780px;
  margin-bottom: 40px;
}

/* 事業内容の帯。トップの帯と同じ濃紺にする */
.section-flow {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 0%, rgb(79 195 247 / 0.14), transparent 40%),
    linear-gradient(160deg, var(--color-navy) 0%, var(--color-navy-deep) 100%);
  color: #ffffff;
}

.section-flow .section-label {
  color: var(--color-sky);
}

.section-flow .section-label::before {
  background: var(--color-sky);
}

.section-flow .product-lead {
  color: #b7d3f0;
}

.section-flow a {
  color: #8fdcfb;
}

.product-head .product-icon {
  width: 40px;
  height: 40px;
  /* アイコンとロゴは 1 組に見せる */
  margin-right: -10px;
}

/* 機能紹介の図。原本から納品までの工程を、アイコンと短い言葉で並べる */
.flow-symbols {
  display: none;
}

.flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

/* 項目をつなぐ静かな線。ノードの中心を通し、ノードの地の色で線を隠す */
.flow-steps::before {
  content: "";
  position: absolute;
  top: 38px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 1px;
  background: linear-gradient(
    90deg,
    rgb(143 220 251 / 0.15),
    rgb(143 220 251 / 0.45) 50%,
    rgb(143 220 251 / 0.15)
  );
}

.flow-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border: 1px solid rgb(143 220 251 / 0.35);
  border-radius: 50%;
  background: var(--color-navy);
  box-shadow: 0 0 0 6px rgb(79 195 247 / 0.06);
  color: #8fdcfb;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
}

.flow-step:hover .flow-node {
  background: #123a5e;
  box-shadow:
    0 0 0 6px rgb(79 195 247 / 0.12),
    0 0 40px rgb(79 195 247 / 0.45);
}

.flow-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-step b {
  display: block;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.flow-note {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #9fbfdf;
}

.flow-support {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.flow-support li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgb(143 220 251 / 0.3);
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  color: #dceaf7;
}

.flow-support .flow-icon {
  width: 18px;
  height: 18px;
  color: var(--color-sky);
}

.product-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 40px 0 0;
}

.button {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 4px;
  background: var(--color-navy);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--color-link);
}

.section-flow .button {
  background: #ffffff;
  color: var(--color-navy);
}

.section-flow .button:hover {
  background: var(--color-tint);
}

/* 会社概要 */
.profile {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--color-navy);
}

.profile th,
.profile td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.profile th {
  width: 12em;
  font-weight: 700;
  white-space: nowrap;
}

/* お問い合わせ */
.contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
}

.contacts div {
  padding: 24px 28px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-blue);
  background: var(--color-bg);
}

.contacts dt {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
}

.contacts dd {
  margin: 4px 0 0;
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 600;
}

/* フッター */
.footer {
  background: var(--color-navy);
  color: #b7d3f0;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.logo-inverse {
  color: #ffffff;
}

.logo-inverse .logo-mark {
  width: 28px;
  height: 28px;
}

.logo-inverse .logo-wordmark {
  height: 17px;
}

.logo-inverse .logo-ja {
  color: #b7d3f0;
}

/* 404 */
.page-title {
  margin: 0 0 16px;
  font-size: 24px;
}

@media (max-width: 860px) {
  .message {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 28px;
  }

  /* 2 段に折り返すと線がつながらないので出さない */
  .flow-steps::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .header-inner,
  .hero-inner,
  .section-inner,
  .footer-inner {
    padding: 0 16px;
  }

  .header {
    position: static;
  }

  .header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav {
    gap: 4px 18px;
  }

  .hero-light {
    right: -20px;
    top: 24px;
    width: 96px;
    height: 96px;
  }

  .hero-inner {
    padding-top: 72px;
    padding-bottom: 64px;
  }

  .hero-copy {
    font-size: 26px;
  }

  .languages {
    padding-left: 0;
    border-left: none;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    margin-bottom: 28px;
    font-size: 24px;
  }

  .stat-number {
    font-size: 64px;
  }

  .profile th,
  .profile td {
    padding: 14px 8px;
  }

  .profile th {
    width: 6.5em;
  }

  .contacts {
    grid-template-columns: 1fr;
  }

  .contacts dd {
    font-size: 17px;
  }
}
