/* ==========================================================================
   Base — reset / typography / layout utilities
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: .03em;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* 背景の呼吸 — ペタル色の淡い光がゆっくり漂う(コンテンツの背後) */
body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 42% at 26% 30%, rgba(228, 176, 171, .13), transparent 70%),
    radial-gradient(circle 46% at 74% 62%, rgba(159, 191, 212, .12), transparent 70%),
    radial-gradient(circle 38% at 56% 86%, rgba(61, 82, 136, .16), transparent 70%);
  animation: bg-breathe 34s var(--ease-inout) infinite alternate;
  will-change: transform;
}
@keyframes bg-breathe {
  0%   { transform: translate(-4%, -3%) rotate(-3deg) scale(1); }
  100% { transform: translate(4%, 3%) rotate(4deg) scale(1.22); }
}

/* 全面グレイン(CSS Cargo: bg-noise 改 — bodyに常時薄く敷く) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--rose); color: var(--bg); }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

main { position: relative; z-index: 2; }

/* 遠くの灯り(field.js が描画)。本文の背後・bodyノイズの下 */
.ambient-lights {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 英字キッカーやラベルの共通声色 */
.kicker-voice {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: .28em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
