/* =============================================================
   base.css — リセット・素の要素・アクセシビリティ基盤
   ============================================================= */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a {
  color: var(--brand-green-800);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--brand-green-600); text-decoration: underline; text-underline-offset: 3px; }

strong { font-weight: var(--weight-bold); }

/* --- 見出し --- */
.h1, .h2, .h3 { line-height: var(--leading-tight); letter-spacing: 0.01em; color: var(--ink); }
.h1 { font-size: var(--text-3xl); font-weight: var(--weight-bold); }
.h2 { font-size: var(--text-2xl); font-weight: var(--weight-bold); }
.h3 { font-size: var(--text-lg); font-weight: var(--weight-medium); }

@media (max-width: 640px) {
  .h1 { font-size: var(--text-2xl); }
  .h2 { font-size: var(--text-xl); }
}

.lead { font-size: var(--text-md); color: var(--ink-soft); line-height: var(--leading-normal); }
.muted { color: var(--ink-muted); font-size: var(--text-sm); }

/* --- フォーカス可視化（キーボード操作の担保） --- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- スキップリンク（支援技術・キーボード） --- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--brand-green-700);
  color: var(--on-brand);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-4); text-decoration: none; }

.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;
}

/* --- レイアウト補助 --- */
.container { width: min(100% - 2 * var(--space-5), var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2 * var(--space-5), var(--container-narrow)); margin-inline: auto; }

.section { padding-block: var(--space-12); }
.section--tint { background: var(--bg-tint); }
@media (max-width: 640px) { .section { padding-block: var(--space-8); } }

.section-head { max-width: 46rem; margin-bottom: var(--space-8); }
.section-head .eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--brand-green-600);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

/* エディトリアルなアクセント（見出しラベルの前に細い線） */
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  background: var(--brand-green-accent);
  vertical-align: middle;
  margin-right: 0.7rem;
  margin-bottom: 0.18em;
}

/* スクロールで静かに現れる（JS有効時のみ・モーション配慮） */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
