/* 案E: 白地に青のぼかしの球と大きな字（動きを強めた形）。球は3〜4個でやや大きく16〜20秒の1周・トップの字は左寄せで特大・字はスクロールで左から右へ塗りが進むように濃くなる。端末にある文字だけを使う */
:root {
  --chi: #f1f7ff;
  --ji: #08112b;
  --ji-usui: #6a7fa8;
  --mizu: #4fbcff;
  --kon: #182a8f;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  background: var(--chi);
  color: var(--ji);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.9;
  word-break: auto-phrase;
  overflow-x: clip;
}

/* ぼかしの球: 文字を持たない空の物。字の後ろ（z-index 0）に置く */
.sora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.tama {
  position: absolute;
  width: clamp(320px, 74vw, 920px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--kon) 0%, var(--mizu) 50%, rgba(79, 188, 255, 0) 72%);
  filter: blur(56px);
  opacity: 0.62;
}

.t1 {
  top: -10vw;
  right: -26vw;
}

.t2 {
  top: calc(min(100svh, 960px) - 20vw);
  left: -30vw;
  width: clamp(280px, 62vw, 800px);
}

.t3 {
  top: 40%;
  right: -34vw;
  width: clamp(280px, 66vw, 840px);
}

.t4 {
  top: 58%;
  left: -32vw;
  width: clamp(260px, 58vw, 760px);
}

.kessan .t1 {
  top: 6vw;
  right: auto;
  left: -20vw;
}

main {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

/* トップは画面いっぱいの高さ（高すぎる窓では960pxで止める）・左寄せで下に置く */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: min(100svh, 960px);
  padding: 48px 0 72px;
  text-align: left;
}

.kessan .hero {
  min-height: 62vh;
  min-height: min(62svh, 640px);
}

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 17vw, 8.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* 「株式会社」と「ルナカイ」の切れ目で折り返す（狭い画面で右に切れない） */
h1 span {
  display: inline-block;
}

.kessan h1 {
  font-size: clamp(3rem, 14vw, 8rem);
}

.en {
  margin: 28px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.lead {
  max-width: 26em;
  margin: 28px 0 0;
  font-size: clamp(1.2rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.6;
}

section {
  padding: 80px 0 24px;
}

h2 {
  margin: 0 0 32px;
  font-size: clamp(2.4rem, 9vw, 5rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h2::before {
  content: "";
  display: block;
  width: 56px;
  height: 5px;
  margin-bottom: 20px;
  background: var(--kon);
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 0;
  padding-left: 1.2em;
}

li {
  margin-bottom: 12px;
}

li ul {
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid rgba(8, 17, 43, 0.18);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

thead th {
  padding-top: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-bottom: 2px solid var(--ji);
}

tbody th {
  width: 6.5em;
  font-weight: 700;
  white-space: nowrap;
}

a {
  color: var(--kon);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 4px;
}

.back {
  margin-top: 36px;
}

footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 2px solid var(--ji);
}

.copy {
  margin: 0;
  font-size: 0.85rem;
}

@media (min-width: 800px) {
  main {
    padding: 0 48px 80px;
  }

  section {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 48px;
    padding: 96px 0 32px;
  }

  h2 {
    margin: 0;
  }

  .kessan section {
    display: block;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  main {
    padding: 0 20px 56px;
  }

  section {
    padding: 64px 0 16px;
  }
}

/* 動き: 「動きを減らす」を選んでいない閲覧器だけ。外では球は止まり、字は最初から濃い */
@media (prefers-reduced-motion: no-preference) {
  @keyframes yura {
    0%,
    100% {
      transform: translate3d(0, 0, 0) scale(1);
    }

    33% {
      transform: translate3d(-9vw, 6vw, 0) scale(1.14);
    }

    66% {
      transform: translate3d(5vw, 10vw, 0) scale(0.92);
    }
  }

  @keyframes nuri {
    from {
      background-position: 100% 0;
    }

    to {
      background-position: 0% 0;
    }
  }

  .tama {
    animation: yura 18s ease-in-out infinite;
  }

  .t2 {
    animation-duration: 16s;
    animation-delay: -5s;
  }

  .t3 {
    animation-duration: 20s;
    animation-delay: -11s;
  }

  .t4 {
    animation-duration: 17s;
    animation-delay: -3s;
  }

  /* 字の塗りが左から右へ進む（濃い色が左、薄い色が右。窓は画像の4割ぶん） */
  @supports (animation-timeline: scroll()) {
    .hero h1,
    .hero .lead,
    h2 {
      color: transparent;
      background-image: linear-gradient(90deg, var(--ji) 0%, var(--ji) 40%, var(--ji-usui) 60%, var(--ji-usui) 100%);
      background-size: 250% 100%;
      background-position: 100% 0;
      -webkit-background-clip: text;
      background-clip: text;
      animation: nuri linear both;
    }

    .hero h1,
    .hero .lead {
      animation-timeline: scroll(root);
      animation-range: 0px 50vh;
    }

    h2 {
      animation-timeline: view();
      animation-range: cover 0% cover 55%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .tama {
    animation: none;
  }

  .hero h1,
  .hero .lead,
  h2 {
    animation: none;
    color: var(--ji);
  }
}
