/* 会社サイトの見た目。濃紺の地・白い文字・一本の光の朱（社章の「複雑さの中から、いちばんの答えへ」）。
   外部のフォントは読み込まない（端末にあるものを使う）。 */
:root {
  --paper: #070d1a;
  --surface: rgba(22, 36, 62, 0.55);
  --ink: #e8ecf2;
  --muted: #9fb0c4;
  --line: #2a3a52;
  --accent: #f07a52;
  --serif-latin: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI',
    'Meiryo', 'Segoe UI', sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 50% at 85% 0%, rgba(88, 110, 220, 0.22), transparent 70%),
    radial-gradient(ellipse 55% 45% at 0% 55%, rgba(150, 82, 170, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(240, 122, 82, 0.08), transparent 70%),
    linear-gradient(180deg, #050a15 0%, #0b1730 55%, #0a1326 100%);
  background-attachment: fixed;
  font-family: var(--sans);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  /* トップの図は画面の端まで広がるので、横にはみ出した分でスクロールが出ないようにする */
  overflow-x: clip;
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

i {
  font-family: var(--serif-latin);
}

/* 社章 */
.mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

/* トップの図（ゆっくり形を変える、からまった線・一本の光る線）。色は図の中のグラデーションで決める */
.figure .chaos path {
  fill: none;
  stroke: url(#chaos);
}

.figure .beam,
.figure .beam-glow,
.figure .beam-flow {
  fill: none;
  stroke: url(#beam);
  stroke-linecap: round;
}

.figure .beam {
  stroke-width: 2.4;
}

.figure .beam-glow {
  stroke-width: 10;
  stroke-opacity: 0.18;
}

.figure .beam-flow {
  stroke: #fff7ef;
  stroke-width: 2.4;
  stroke-opacity: 0.85;
}

/* 上の帯 */
.top {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif-latin);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.brand:hover {
  color: var(--ink);
}

.menu {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 0.92rem;
}

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

.menu a:hover {
  color: var(--ink);
}

.langs {
  display: flex;
  gap: 4px;
  font-size: 0.85rem;
}

.langs a,
.langs span {
  padding: 2px 10px;
  border-radius: 999px;
  text-decoration: none;
}

.langs span {
  border: 1px solid var(--line);
}

.langs a {
  color: var(--muted);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 104px 0;
  border-top: 1px solid var(--line);
}

/* 見出し：日本語の見出しの上に、英語の小見出し（FLUX などと同じ形） */
.section-head {
  margin: 0 0 40px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* トップ */
.hero {
  position: relative;
  border-top: none;
  padding: 96px 0 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.formula {
  margin: 0 0 20px;
  font-family: var(--serif-latin);
  font-size: 1.1rem;
  color: var(--muted);
}

h1 {
  margin: 0 0 24px;
  text-wrap: balance;
  font-size: clamp(2.2rem, 5.2vw, 3.7rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lead {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.04rem;
}

.figure {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* 立体の図（hero.js が平面の図と入れ替える）。横長の画面では、トップの帯を画面の端から端まで使い、文字の後ろに置く */
.figure-3d {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}

/* 線が浮かび、一本の線が伸びる。一本の線の上を流れる光は、動きを減らす設定の人には出さない */
@media (prefers-reduced-motion: no-preference) {
  .figure .chaos {
    opacity: 0;
    animation: appear 1.6s ease-out 0.1s forwards;
  }

  .figure .beam,
  .figure .beam-glow {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw 1.2s ease-out 1.2s forwards;
  }

  .figure .focus {
    transform-box: fill-box;
    transform-origin: center;
    animation: pulse 4s ease-in-out 2s infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .figure .beam-flow {
    display: none;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes appear {
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.25);
    opacity: 0.7;
  }
}

/* トップのボタン：主（朱）と副（線） */
.actions {
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.button:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1426;
}

.button.primary:hover {
  background: #f5a25d;
  border-color: #f5a25d;
  color: #0b1426;
}

/* 考え方の3段 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  counter-reset: none;
}

.step {
  position: relative;
  padding: 28px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.step-no {
  position: absolute;
  top: 26px;
  right: 28px;
  font-family: var(--serif-latin);
  font-size: 0.95rem;
  color: var(--muted);
}

.step-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 18px;
}

.step h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

/* Pain Reliever だけでなく Gain Creator を（Gain Creator の側を朱で立てる） */
.value {
  margin-top: 72px;
}

.value h3 {
  margin: 0 0 12px;
  font-family: var(--serif-latin);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 600;
}

.value-lead {
  margin: 0 0 28px;
  max-width: 42em;
  color: var(--muted);
}

.value-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 24px;
}

.value-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.value-card .step-icon {
  color: var(--muted);
}

.value-card.gain {
  border-color: rgba(240, 122, 82, 0.55);
  background: linear-gradient(135deg, rgba(240, 122, 82, 0.12), rgba(22, 36, 62, 0.55) 60%);
}

.value-card.gain .step-icon,
.value-card.gain .term {
  color: var(--accent);
}

.term {
  margin: 0 0 4px;
  font-family: var(--serif-latin);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.value-card h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.value-card p:last-child {
  margin: 0;
  color: var(--muted);
}

/* 見出しは句の途中で折り返さない */
h1 span {
  display: inline-block;
}

/* 社名について */
.name {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}

.name .section-head {
  margin: 0;
}

.prose p {
  margin: 0 0 1em;
  max-width: 40em;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* プロダクト */
.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.product-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product h3 {
  margin: 0;
  font-family: var(--serif-latin);
  font-size: 1.6rem;
  font-weight: 600;
}

.status {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
  white-space: nowrap;
}

.catch {
  margin: 14px 0 8px;
  font-weight: 600;
}

.product p {
  margin-top: 0;
  color: var(--muted);
}

.product .catch {
  color: var(--ink);
}

.visit {
  margin-top: auto;
  font-size: 0.92rem;
}

/* 会社概要 */
.company {
  width: 100%;
  border-collapse: collapse;
}

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

.company th {
  width: 220px;
  font-weight: 500;
  color: var(--muted);
}

/* 下の帯 */
.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  font-size: 0.88rem;
  color: var(--muted);
}

.foot .brand.small {
  font-size: 1.05rem;
}

.foot .brand.small .mark {
  width: 22px;
  height: 22px;
}

.foot span:last-child {
  margin-left: auto;
}

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

/* スマホ */
@media (max-width: 760px) {
  .top {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .menu {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .langs {
    margin-left: auto;
  }

  main {
    padding: 0 16px;
  }

  section {
    padding: 64px 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 40px 0 56px;
    gap: 32px;
  }

  /* スマホでは文字の下に、横幅いっぱいで置く */
  .figure-3d {
    position: static;
    width: calc(100% + 32px);
    margin: 0 -16px;
    height: auto;
    aspect-ratio: 4 / 3;
    transform: none;
  }

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

  .name .section-head {
    margin-bottom: 28px;
  }

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

  .value {
    margin-top: 52px;
  }

  .section-head {
    margin-bottom: 28px;
  }

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

  .product {
    padding: 22px;
  }

  .company th,
  .company td {
    display: block;
    width: auto;
  }

  .company th {
    padding: 14px 0 0;
    border-bottom: none;
    font-size: 0.85rem;
  }

  .company td {
    padding: 2px 0 14px;
  }

  .foot {
    padding: 28px 16px 40px;
  }

  .foot span:last-child {
    margin-left: 0;
    width: 100%;
  }
}
