/* ============================================================
   base.css — /terms 共通(リセット / トークン / 背景 / ヘッダ / フッタ)
   トークン・背景・ヘッダ・フッタは LP (lp/src/index.css) に揃えている。
   LP 側のデザインを変えたら、こちらも合わせて更新すること。
   ============================================================ */

:root {
  --brand-blue: #669bc2;
  --brand-pink: #e7a5a1;

  --bg: #fbfbfa;
  --surface: rgba(255, 255, 255, 0.72);
  --ink: #333;
  --ink-2: #555;
  --muted: #767676;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.22);
  --accent: #2e80b7;

  --sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;

  --radius: 24px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --content-width: 760px;
  --page-width: 1160px;

  color-scheme: light;
}

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

html {
  scroll-padding-top: calc(var(--header-h) + 32px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  /* px 直指定にすると、rem 指定の見出し(h1-h3 等)だけがブラウザの
     「デフォルトフォントサイズ」設定に連動し、本文との大小関係が環境に
     よって崩れる(実際に発生を確認)。全体を rem に揃えて同じ基準で
     スケールさせ、ユーザーのフォントサイズ設定(アクセシビリティ)も
     ページ全体で一貫して反映されるようにする。 */
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

/* --- 背景: LP と同じ、ブランド色の淡いグラデーションがゆっくり漂う --- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg i {
  position: absolute;
  width: 70vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}
.bg i:nth-child(1) {
  top: -30vmax;
  right: -20vmax;
  background: radial-gradient(closest-side, rgba(231, 165, 161, 0.42), transparent);
  animation: bg-drift-a 26s ease-in-out infinite alternate;
}
.bg i:nth-child(2) {
  top: 10vmax;
  left: -30vmax;
  background: radial-gradient(closest-side, rgba(102, 155, 194, 0.34), transparent);
  animation: bg-drift-b 32s ease-in-out infinite alternate;
}
.bg i:nth-child(3) {
  bottom: -35vmax;
  right: -10vmax;
  background: radial-gradient(closest-side, rgba(231, 165, 161, 0.3), transparent);
  animation: bg-drift-c 38s ease-in-out infinite alternate;
}
@keyframes bg-drift-a {
  to {
    transform: translate(-22vw, 18vh) scale(1.15);
  }
}
@keyframes bg-drift-b {
  to {
    transform: translate(26vw, 20vh) scale(0.9);
  }
}
@keyframes bg-drift-c {
  to {
    transform: translate(-30vw, -24vh) scale(1.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bg i {
    animation: none;
  }
}

/* --- スキップリンク(キーボード操作時のみ表示) --- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  top: 8px;
}

/* --- ヘッダ: LP と同じフロスト調のピル --- */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  height: var(--header-h);
  max-width: calc(var(--page-width) + var(--gutter) * 2);
  margin: 16px auto 0;
  padding-inline: var(--gutter);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  border-radius: 100px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.85));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 8px 24px -16px rgba(0, 0, 0, 0.2);
}

.site-header__logo {
  display: flex;
}

.site-header__logo img {
  height: 18px;
  width: auto;
}

/* --- フッタ --- */
.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-footer__inner {
  max-width: calc(var(--page-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  color: inherit;
  text-decoration: none;
}

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

.site-footer__copyright {
  margin: 0 0 0 auto;
}

/* --- メインコンテンツ(各ページ共通のコンテンツ幅) --- */
.site-main {
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  width: 100%;
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
}

/* スマホ: LP と同じく、浮いたピルではなく全幅のバーにする */
@media (max-width: 600px) {
  :root {
    --header-h: 60px;
  }

  .site-header {
    top: 0;
    margin: 0;
    padding: 0;
    max-width: none;
  }

  .site-header__inner {
    padding: 0 var(--gutter);
    border-radius: 0;
    background: rgba(251, 251, 250, 0.88);
    box-shadow: 0 1px 0 var(--line);
  }

  .site-main {
    padding-top: 24px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .site-footer__nav {
    flex-direction: column;
    gap: 14px;
    font-size: 0.875rem;
  }

  .site-footer__copyright {
    margin-left: 0;
  }
}
