/* NeXtep ホームページ専用のスタイル。
   明るい画面の後ろに粒の画面(WebGL)を 1 枚固定する。冒頭では粒がロゴになり、
   そのあとは淡い粒として後ろに残る。色はロゴに合わせて、濃紺と紫。
   動きは控えめにする: スクロールに連動して文字が変わる演出は使わない。 */

:root {
  --ink: #1b2132;
  --sub: #5f667a;
  --dim: #9a9fb0;
  --purple: #6941a5;
  --lav: #f3eefb;
  --paper: #fbfaff;
  --line: #e2dcee;
  --jp: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  --num: 'Archivo', 'Zen Kaku Gothic New', sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--jp);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ol {
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 後ろに固定する、淡い光と粒の画面 ---------- */

.glow,
.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.glow {
  background:
    radial-gradient(60% 50% at 88% 0%, #ece2fb 0%, rgba(236, 226, 251, 0) 70%),
    radial-gradient(50% 45% at 0% 100%, #f1ebfb 0%, rgba(241, 235, 251, 0) 70%);
}

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

/* ---------- ヘッダーとメニュー ---------- */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 30px);
  height: 68px;
  padding: 0 var(--pad);
}

.top::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(251, 250, 255, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.3s;
}

.top.solid::before {
  opacity: 1;
}

.open .top::before {
  opacity: 0;
}

/* 冒頭は大きなロゴが見えているので、ヘッダーのロゴはそこを過ぎてから出す */
.top .name {
  margin-right: auto;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0s 0.3s;
}

.top .name img {
  width: auto;
  height: 50px;
}

.top.named .name,
.open .top .name {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.3s,
    visibility 0s;
}

/* お問い合わせは、どの幅でもヘッダーに出したままにする */
.top .ask {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: background 0.3s;
}

.top .ask:hover {
  background: var(--purple);
}

.menu {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  padding: 8px 0;
}

.menu i {
  position: relative;
  display: block;
  width: 26px;
  height: 12px;
}

.menu i::before,
.menu i::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu i::before {
  top: 0;
}

.menu i::after {
  bottom: 0;
}

.open .menu i::before {
  transform: translateY(5px) rotate(45deg);
}

.open .menu i::after {
  transform: translateY(-5px) rotate(-45deg);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  align-content: center;
  padding: 90px var(--pad) 40px;
  background: var(--lav);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s,
    visibility 0s 0.25s;
}

.open .sheet {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.25s,
    visibility 0s;
}

.sheet a {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(8px, 1.4vh, 16px) 0;
  border-bottom: 1px solid #d9d0ea;
  font-weight: 900;
  font-size: clamp(22px, 3.2vw, 38px);
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s;
}

.sheet a:hover {
  color: var(--purple);
}

@media (max-width: 480px) {
  .top .ask {
    font-size: 13px;
    padding: 6px 14px;
  }
}

/* ごく狭い画面では、メニューは線の印だけにして、お問い合わせの場所を空ける */
@media (max-width: 359px) {
  .menu .lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* ---------- 最初の画面: ロゴと、何をしているか ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 68px;
}

.hero .mark {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 8px var(--pad) 16px;
}

/* ロゴの画像。粒の画面が使えるときは、同じ場所・同じ大きさで粒がロゴを描く
   (粒の位置は、この画像の位置から決める) */
.logo-fb {
  width: min(56vw, 44vh, 440px);
}

.gl .logo-fb {
  visibility: hidden;
}

.hero .hint {
  position: absolute;
  right: var(--pad);
  top: 90px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dim);
  opacity: 0;
  animation: fade 0.6s ease 2.6s forwards;
  pointer-events: none;
}

.hero .foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 5vw, 90px);
  align-items: end;
  padding: 0 var(--pad) clamp(28px, 4.2vw, 56px);
  animation: enter 0.5s var(--ease) 0.1s both;
}

.hero h1 {
  font-weight: 900;
  font-size: min(7.6vw, clamp(34px, 4.8vw, 70px));
  white-space: nowrap;
  line-height: 1.26;
  letter-spacing: 0.01em;
}

.hero h1 .ln {
  display: block;
}

.hero h1 .ln:nth-child(2) {
  color: var(--purple);
}

.hero .side {
  max-width: 31em;
  justify-self: end;
}

.hero .lead {
  color: var(--sub);
  font-size: clamp(14px, 1.15vw, 16px);
}

.hero .go {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero .go a,
.more {
  position: relative;
  display: inline-block;
  padding: 4px 26px 4px 0;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  transition: color 0.3s;
}

.hero .go a::after,
.more::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.35s var(--ease);
}

.hero .go a:hover,
.more:hover {
  color: var(--purple);
}

.hero .go a:hover::after,
.more:hover::after {
  transform: translateX(4px) rotate(45deg);
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

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

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

  .hero .side {
    justify-self: start;
  }

  .hero .hint {
    display: none;
  }
}

/* ---------- 節 ---------- */

.sec {
  padding: clamp(44px, 5.4vw, 84px) 0;
}

.sec-h {
  font-weight: 900;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.sec-h.keep {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sec-p {
  margin-top: 14px;
  max-width: 36em;
  color: var(--sub);
  text-wrap: pretty;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 6vw, 100px);
  align-items: start;
}

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

.more {
  margin-top: 22px;
  font-weight: 700;
}

/* 見出しは、画面に入るときに一度だけ、短くふわっと出る(スクリプトが動くときだけ) */
.js .up > * {
  display: block;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s ease,
    transform 0.45s var(--ease);
}

.js .up.in > * {
  opacity: 1;
  transform: none;
}

/* ---------- 挿し絵と文を並べる組 ---------- */

.media {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
}

.media.flip > .ill {
  order: 2;
}

.media.text-first {
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

.ill img {
  width: 100%;
}

@media (max-width: 860px) {
  .media,
  .media.text-first {
    grid-template-columns: 1fr;
  }

  .media.flip > .ill {
    order: 0;
  }

  .ill img {
    max-width: 520px;
    margin: 0 auto;
  }
}

/* ---------- 私たちについて ---------- */

.kicker {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple);
}

.creed {
  margin-top: 10px;
  font-weight: 900;
  font-size: clamp(27px, 3.5vw, 50px);
  line-height: 1.42;
  letter-spacing: 0.01em;
}

/* 文節の途中で折り返さない */
.creed .ph {
  display: inline-block;
}

/* 強み 3 つ */
.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(28px, 3.6vw, 52px);
}

.cols > div {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.cols .ico {
  width: 100%;
  max-width: 168px;
  margin: 0 0 10px;
}

.cols h3,
.pair h3 {
  font-weight: 900;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.5;
}

.cols p,
.pair p {
  margin-top: 6px;
  color: var(--sub);
}

/* 狭い画面では、絵を左に小さく置いて縦の長さを抑える */
@media (max-width: 760px) {
  .cols {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cols > div {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
    padding-top: 16px;
  }

  .cols .ico {
    grid-row: 1 / span 2;
    margin: 0;
  }
}

/* ---------- 事業とプロジェクト ---------- */

.biz {
  display: grid;
  gap: clamp(40px, 5vw, 76px);
  margin-top: clamp(28px, 3.6vw, 52px);
}

.biz h3 {
  margin-top: 12px;
  font-weight: 900;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.3;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.biz p {
  margin-top: 12px;
  color: var(--sub);
}

.biz .tags {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
}

/* 実際の画面 */
.shot {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 1px var(--line),
    0 30px 70px -30px rgba(77, 44, 134, 0.45);
  transition: transform 0.4s var(--ease);
}

.shot:hover {
  transform: translateY(-4px);
}

.shot img {
  width: 100%;
}

.state {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
}

.state.idea {
  background: none;
  color: var(--sub);
  box-shadow: inset 0 0 0 1px #c9c2d8;
}

/* ---------- 協業・実証 ---------- */

.pair {
  display: grid;
  gap: 18px;
  margin-top: clamp(22px, 2.6vw, 34px);
}

.pair > div {
  padding-left: 16px;
  border-left: 2px solid var(--purple);
}

.flow {
  counter-reset: f;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(40px, 4.6vw, 64px);
}

.flow li {
  counter-increment: f;
  position: relative;
  padding-top: 22px;
  border-top: 1px solid #b9b0cc;
}

.flow li::after {
  content: counter(f);
  position: absolute;
  top: -15px;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-family: var(--num);
  font-weight: 800;
  font-size: 14px;
  line-height: 30px;
  text-align: center;
}

.flow b {
  display: block;
  margin-top: 6px;
  font-weight: 900;
  font-size: clamp(18px, 1.7vw, 22px);
}

.flow span {
  display: block;
  margin-top: 4px;
  color: var(--sub);
  font-size: 15px;
}

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

/* ---------- 組織概要 ---------- */

.facts > div {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #c9c2d8;
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  color: var(--sub);
}

@media (max-width: 560px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- お問い合わせ ---------- */

.contact {
  padding-bottom: clamp(56px, 7vw, 100px);
}

.reach-l {
  font-size: 13px;
  font-weight: 700;
  color: var(--sub);
}

.contact .mail {
  display: inline-block;
  font-family: var(--num);
  font-weight: 700;
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  transition: color 0.3s;
}

.contact .mail:hover {
  color: var(--purple);
}

.end {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  justify-content: space-between;
  align-items: center;
  min-height: 62px;
  padding: 10px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
}

/* ---------- 動きを減らす設定の端末では、出現の動きを止める ----------
   (粒の画面は home.js の側で、動かない絵にする) */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .up > * {
    opacity: 1;
    transform: none;
  }

  .hero .hint {
    display: none;
  }

  .shot:hover {
    transform: none;
  }
}
