/* ==========================================================================
   base.css — リセット・基本タイポグラフィ
   ========================================================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

ul[class], ol[class] { list-style: none; padding: 0; }

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

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

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

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

table { border-collapse: collapse; width: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-main);
  background: var(--color-bg);
  min-height: 100vh;
  font-feature-settings: "palt";
  letter-spacing: 0.01em;
}

/* CLS対策：フォント読み込み前(fallback)と読み込み後で行間を微調整して寸法差を圧縮 */
body { line-height: calc(var(--lh-body) * var(--lh-fallback-adjust)); }
.fonts-loaded body,
html.fonts-loaded body { line-height: var(--lh-body); }

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--color-navy-900);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

h1 {
  font-size: var(--fs-h1-mobile);
  line-height: 1.45;
}
h2 {
  font-size: var(--fs-h2-mobile);
}
h3 {
  font-size: var(--fs-h3-mobile);
}

@media (min-width: 1024px) {
  h1 { font-size: var(--fs-h1-desktop); }
  h2 { font-size: var(--fs-h2-desktop); }
  h3 { font-size: var(--fs-h3-desktop); }
}

p {
  max-width: var(--measure);
}

p.no-measure, .no-measure p { max-width: none; }

small { font-size: var(--fs-small); }

::selection {
  background: var(--color-gold-100);
  color: var(--color-navy-900);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.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: 12px;
  top: -60px;
  background: var(--color-navy-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus {
  top: 12px;
}

section {
  padding-block: var(--space-2xl);
}

@media (max-width: 767px) {
  section { padding-block: var(--space-xl); }
}
