/* ─── Base / reset ─── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif-jp);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* safety for mobile full-bleed sliders */
}
a { color: inherit; text-decoration: none; transition: opacity .25s; }
a:hover { opacity: .65; }
/* height を指定しないと、HTML の height 属性がそのまま効いて縦に伸びる
   （スマホ幅で width だけ縮み、height は元のピクセル値のまま残るため）。 */
img { display: block; max-width: 100%; height: auto; }

/* ─── Scroll-triggered fade-in (shared utility) ─── */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.1s cubic-bezier(.2,.6,.2,1), transform 1.1s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-children > * {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1.1s cubic-bezier(.2,.6,.2,1), transform 1.1s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.fade-in-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-children.is-visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.fade-in-children.is-visible > *:nth-child(3) { transition-delay: 0.24s; }
.fade-in-children.is-visible > *:nth-child(n+4) { transition-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-children > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
