/* ==========================================================================
   base.css
   CSS変数・リセット・基本タイポグラフィ

   正式ロゴを追加する際は --color-navy / --color-navy-dark / --color-accent /
   --color-accent-light の値をロゴカラーに合わせて調整してください。
   ========================================================================== */

:root {
  /* カラー */
  --color-navy: #16294b;
  --color-navy-dark: #0e1d36;
  --color-accent: #1e8c86;
  --color-accent-dark: #17726d;
  --color-accent-light: #e4f3f1;
  --color-white: #ffffff;
  --color-gray-light: #f5f6f8;
  --color-border: #e2e5ea;
  --color-text: #1b2333;
  --color-text-muted: #5b6472;
  --color-error: #b3392c;
  --color-success: #2e7d5b;

  /* タイポグラフィ（外部Webフォントに依存しないシステムフォント） */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo,
    sans-serif;

  /* レイアウト */
  --container-max-width: 1120px;
  --header-height: 72px;
  --section-padding-y: 96px;
  --radius-sm: 4px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 29, 54, 0.08);
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
    --section-padding-y: 56px;
  }
}

/* リセット
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  color: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

/* section[id] を持つ全セクションで、stickyヘッダーに見出しが隠れないよう調整 */
section[id] {
  scroll-margin-top: var(--header-height);
}

/* フォーカス表示は消さず、視認性の高いスタイルに統一 */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* タイポグラフィ基本設定
   ========================================================================== */

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-navy);
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  font-size: 1rem;
}

@media (min-width: 768px) {
  h2 {
    font-size: 2rem;
  }
}

/* ユーティリティ
   ========================================================================== */

.container {
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 100;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}

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

.required {
  color: var(--color-error);
  font-size: 0.75rem;
  font-weight: 600;
  margin-inline-start: 6px;
}

.optional {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-inline-start: 6px;
}
