/* ============================================================
   ATMOTECT — Base（reset + 基礎タイポ）
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-gothic);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-weight: 400;
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;               /* 横スクロールは常に禁止 */
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:where(h1, h2, h3, h4) { font-weight: 500; line-height: var(--lh-head); text-wrap: balance; }
p { text-wrap: pretty; }

/* 明朝＝魂 / ゴシック＝骨格 のユーティリティ */
.mincho { font-family: var(--font-mincho); font-weight: 500; }
.gothic { font-family: var(--font-gothic); }

/* フォーカスは静かだが明確に（朱の細いリング） */
:focus-visible {
  outline: 2px solid var(--shu);
  outline-offset: 3px;
  border-radius: var(--radius-1);
}
::selection { background: color-mix(in oklch, var(--shu) 22%, transparent); }

.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; left: var(--space-4); top: -3rem;
  background: var(--ink); color: var(--paper);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-1);
  z-index: var(--z-tooltip); transition: top var(--dur-1) var(--ease-out-quart);
}
.skip-link:focus { top: var(--space-4); }
