/* ================================================================
 *  EdenCode — site-common.css
 *  全ページ共通の基本トークン / アクセシビリティ / レスポンシブ
 *  各ページの独自インラインCSSはこのあとに読まれる想定 (後勝ち)
 * ================================================================ */

/* --- CSS変数 (ページ側で上書きされなければこれが適用) --- */
:root {
  --bg:       #0a0e14;
  --surface:  #111820;
  --border:   #1e2d3d;
  --accent:   #00d4aa;
  --accent2:  #ff6b35;
  --accent3:  #7c6aff;
  --text:     #e4eaf5;
  --text-dim: #7d90a8;
  --mono:     'Share Tech Mono', monospace;
  --sans:     'Noto Sans JP', sans-serif;
}

/* --- リセット --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

/* --- アクセシビリティ: フォーカス可視化 --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* --- アクセシビリティ: スキップリンク --- */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  z-index: 10000;
}
.skip-link:focus {
  left: 20px; top: 20px;
  width: auto; height: auto;
  padding: 10px 16px;
  background: var(--accent);
  color: #0a0e14;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 3px;
}

/* --- aria-disabled のダミーリンク --- */
a[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- モーション抑制: prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- スクリーンリーダー専用 --- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- 印刷 (軽め) --- */
@media print {
  body { background: #fff; color: #000; }
  nav, .scroll-hint, .indicators, .sns-section { display: none !important; }
}
