/* qoop UI Base
 * リセット / 基本タイポ / ユーティリティ
 * Spec §3, §5
 */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family-text);
  font-size: var(--font-size-body);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-ja);
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--font-size-headline); }
h2 { font-size: var(--font-size-title-l); }
h3 { font-size: var(--font-size-title); }

p { margin: 0 0 var(--space-3); }
a { color: var(--color-brand-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--color-brand-600); }

small { font-size: var(--font-size-caption); color: var(--color-text-secondary); }
code, pre, kbd { font-family: var(--font-family-mono); font-size: 0.9375em; }

/* キーボード操作向けフォーカスリング共通
 * forced-colors mode では box-shadow が無視されるため、
 * 透明 outline をフォールバックに置く
 */
:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

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

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