/* ============================================================
   GLINK ESTATE — Base Styles
   リセット、box-sizing、基本タイポ、a11y
   ============================================================ */

/* ---------- リセット (modern, minimal) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol {
  margin: 0;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- HTML / Body ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif-jp);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: var(--color-text-body);
  background: var(--color-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (max-width: 767px) {
  body {
    font-size: var(--fs-body-sp);
  }
}

/* ---------- 見出しの基本 (詳細はstyle.cssで) ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-heading);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

/* ---------- リンク ---------- */
a {
  transition: color var(--dur-base) var(--easing);
}

a:hover {
  color: var(--color-accent);
}

/* ---------- フォーカスリング (a11y) ---------- */
/* :focus-visible 非対応ブラウザではブラウザ既定のフォーカスリングを尊重 */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 画像のデフォルト ---------- */
img {
  font-style: italic;          /* alt表示時に視覚的に区別 */
  vertical-align: middle;
}

/* ---------- 選択色 ---------- */
::selection {
  background: var(--color-accent);
  color: var(--color-bg-base);
}

/* ---------- スクロールバー (薄く) ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--color-line);
  border-radius: 8px;
}

/* ---------- ユーティリティ: 視覚的に隠す (SR向け) ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- レイアウトコンテナ ---------- */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--content-pad-pc);
}

@media (max-width: 767px) {
  .container {
    padding-inline: var(--content-pad-sp);
  }
}

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