/* リセットとベーススタイル（全ページ共通） */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg-default);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* 見出しサイズ（MUI テーマの typography 準拠） */
h1 { font-weight: 500; font-size: 1.875rem; line-height: 1.5; }
h2 { font-weight: 500; font-size: 1.5rem; line-height: 1.5; }
h3 { font-weight: 500; font-size: 1.3125rem; line-height: 1.5; }
h4 { font-weight: 500; font-size: 1.125rem; line-height: 1.5; }
h5 { font-weight: 500; font-size: 1rem; line-height: 1.5; }
h6 { font-weight: 500; font-size: 0.875rem; line-height: 1.5; }

/* PC / SP 出し分けユーティリティ（旧 useMediaQuery(md) の置き換え。md=900px） */
.sp-only { display: block; }
.pc-only { display: none; }

@media (min-width: 900px) {
  .sp-only { display: none; }
  .pc-only { display: block; }
}

/* スクリーンリーダー専用テキスト */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/**
 * CTA クリック計測用の data 属性を持つ要素の子孫要素は、クリックイベントを無効化する。
 * これにより、CTA のラベルが正しく計測されるようになる。
 */
[data-cta-location] * {
  pointer-events: none;
}
