/* 1. すべての要素のボックスモデルを border-box に統一 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. デフォルトの余白をリセット */
* {
  margin: 0;
  padding: 0;
}

/* 3. HTMLとBODYの高さ・フォント設定の最適化 */
html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased; /* 文字のレンダリングを滑らかに */
  background-color: #fdfbf7; /* 今回のベースカラーを設定可能 */
}

/* 4. メディア要素（画像、ビデオ等）のレスポンシブ対応 */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 5. フォーム要素のフォント・スタイルのリセット */
input,
button,
textarea,
select {
  font: inherit;
}

/* 6. テキストの折り返しと不要な改行防止の最適化 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance; /* タイトルが不自然な位置で改行されるのを防ぐ */
}

/* 7. コンポーネント内の z-index 分離（バグ防止） */
#root,
#__next,
#app {
  isolation: isolate;
}

/* 8. リストの装飾をリセット（お好みで調整） */
ol,
ul {
  list-style: none;
}

/* 9. リンクのアンダーラインはアクセシビリティのため残し、色のみ継承（必要に応じて変更） */
a {
  color: inherit;
  text-decoration-line: inherit;
}

:root {
  --ink: #40465a;
  --sub: #6c7287;
  --paper: #fefcf9;
  --panel: #fbf9fe;
  --line: #f1edf5;
  --sage: #cfe3c4;
  --vis-base: #fefdff;
  --row-bg: linear-gradient(135deg, #f9fbfe, #fcf9fe);
  --cta-base: #fffefc;
  --glow2: rgba(255, 200, 150, 0.22);
  --a1: #4fc1f0;
  --a2: #9a7cf0;
  --btn: linear-gradient(100deg, #3b9fe3, #7d5ad9);
  --grad: linear-gradient(100deg, var(--a1), var(--a2));
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eceef3;
    --sub: #a4aab8;
    --paper: #161820;
    --panel: #1f222d;
    --line: #2d313e;
    --sage: #6f8268;
    --a1: #52b8ec;
    --a2: #9a78e6;
    --vis-base: #1f222d;
    --row-bg: #1f222d;
    --cta-base: #1f222d;
    --glow2: rgba(255, 200, 150, 0.05);
  }
}
:root[data-theme="dark"] {
  --ink: #eceef3;
  --sub: #a4aab8;
  --paper: #161820;
  --panel: #1f222d;
  --line: #2d313e;
  --sage: #6f8268;
  --a1: #52b8ec;
  --a2: #9a78e6;
  --vis-base: #1f222d;
  --row-bg: #1f222d;
  --cta-base: #1f222d;
  --glow2: rgba(255, 200, 150, 0.05);
}
* {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px);
}
body {
  background: radial-gradient(
      900px 420px at 12% -80px,
      rgba(79, 193, 240, 0.16),
      transparent 70%
    ),
    radial-gradient(800px 380px at 92% -60px, var(--glow2), transparent 70%),
    var(--paper);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 16px/2 "Noto Sans JP", system-ui, sans-serif;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
nav {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
  color: var(--sub);
}
nav a {
  color: inherit;
  text-decoration: none;
}
nav a:hover {
  color: var(--ink);
}
.logo {
  display: inline-flex;
  align-items: center;
  font: 300 30px/1 Montserrat, sans-serif;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.logo .q {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 300;
}
.logo svg {
  width: 1.35em;
  height: 0.9em;
  margin: 0 0.03em;
  transform: translateY(0.02em);
  stroke-width: 3.3;
}
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: 999px;
  background: var(--btn);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgba(143, 111, 214, 0.6);
}
.btn.ghost {
  background: none;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.sec {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.sec h2 {
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.04em;
  margin-bottom: 36px;
}
.row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 28px 32px;
  margin-bottom: 14px;
  border-radius: 28px;
  background: var(--row-bg);
}
.row:last-child {
  margin-bottom: 0;
}
.row h3 {
  font-weight: 500;
  font-size: 17px;
}
.row p {
  color: var(--sub);
  max-width: 36em;
}
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.about h2 {
  line-height: 1.35;
}
.about p {
  color: var(--sub);
}
.cta {
  margin: 24px 0 72px;
  padding: 60px 40px;
  border-radius: 48px;
  background: linear-gradient(
      135deg,
      rgba(79, 193, 240, 0.24),
      rgba(154, 124, 240, 0.22)
    ),
    var(--cta-base);
  text-align: center;
}
.cta h2 {
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 12px;
}
.cta p {
  color: var(--sub);
  margin-bottom: 28px;
}
footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--a2);
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 22px 24px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  nav a:not(.btn) {
    display: none;
  }
  .cta {
    padding: 44px 24px;
  }
}

.kv {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 120px 24px 96px;
  text-align: center;
  background: radial-gradient(
      circle at 20% 16%,
      rgba(79, 193, 240, 0.4),
      transparent 55%
    ),
    radial-gradient(
      circle at 88% 90%,
      rgba(154, 124, 240, 0.32),
      transparent 55%
    ),
    radial-gradient(
      circle at 90% 14%,
      rgba(255, 205, 160, 0.45),
      transparent 45%
    ),
    var(--vis-base);
}
.kv .inf {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 820px);
  transform: translate(-50%, -50%);
  opacity: 0.3;
  stroke-width: 2;
}
.kv-copy {
  position: relative;
  max-width: 760px;
}
.kv-copy h1 {
  font-weight: 500;
  font-size: clamp(28px, 5.2vw, 52px);
  line-height: 1.5;
  letter-spacing: 0.04em;
  opacity: 0;
  animation: rise 1.4s ease 1s forwards;
}
.kv-copy p {
  margin: 24px auto 34px;
  color: var(--sub);
  max-width: 30em;
  opacity: 0;
  animation: rise 1.2s ease 2.2s forwards;
}
.kv-copy .acts {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: rise 1.2s ease 2.2s forwards;
}
header.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  animation: fade 1.2s ease 3.2s forwards;
}
.scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font: 300 12px/1 Montserrat, sans-serif;
  letter-spacing: 0.2em;
  color: var(--sub);
  opacity: 0;
  animation: fade 1.2s ease 3.4s forwards;
}
.scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin: 10px auto 0;
  background: linear-gradient(var(--a2), transparent);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kv-copy h1,
  .kv-copy p,
  .kv-copy .acts,
  header.top,
  .scroll {
    animation: none;
    opacity: 1;
  }
}

@media (min-width: 900px) {
  .kv .inf {
    width: min(78vw, 1100px);
    opacity: 0.42;
    stroke-width: 2.4;
    animation: drift 16s ease-in-out infinite alternate;
  }
  .kv-copy {
    max-width: 880px;
  }
  .kv-copy h1 {
    font-size: clamp(40px, 4.4vw, 60px);
  }
  .kv-copy p {
    font-size: 17px;
    max-width: 34em;
  }
}
@keyframes drift {
  from {
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }
  to {
    transform: translate(-50%, -50%) scale(1.04) rotate(-1.5deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kv .inf {
    animation: none;
  }
}

/* フッター: ロゴを左、コピーライトを右に配置 */
footer .wrap {
  align-items: center;
}
footer .logo {
  font-size: 22px;
}
.copyright {
  flex-basis: auto;
  margin-top: 0;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--sub);
}

/* スマホでは縦に並べて中央揃え */
@media (max-width: 620px) {
  footer .wrap {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .copyright {
    text-align: center;
  }
}
