/* ==========================================================================
   base.css — リセット / タイポグラフィ / レイアウト / アニメーション基盤
   ========================================================================== */

/* Google Fonts（丸ゴシック見出し + 本文ゴシック、font-display: swap） */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* --- Base --- */
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background-color: var(--c-bg);
  font-size: 16px;
  line-height: 1.85;
  padding-top: var(--header-height);
  padding-bottom: var(--mobile-bar-height);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) {
  body { padding-bottom: 0; }
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.45;
  color: var(--c-text);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
@media (min-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.4rem; }
}
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; color: var(--c-text); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}
.container--narrow { max-width: var(--content-narrow); }

.section {
  padding: var(--section-pad-sp) 0;
  position: relative;
}
@media (min-width: 768px) {
  .section { padding: var(--section-pad) 0; }
}
.section--cream { background-color: var(--c-cream-deep); }
.section--mint  { background-color: var(--c-mint-soft); }
.section--blue  { background-color: var(--c-blue-soft); }

.section__heading {
  text-align: center;
  margin-bottom: 12px;
}
.section__heading--deco { position: relative; display: inline-block; }
.section__sub {
  text-align: center;
  color: var(--c-text-sub);
  margin-bottom: 44px;
  font-size: 0.95rem;
}
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .section__sub { margin-bottom: 0; }

/* 見出し下の小さな装飾ドット */
.heading-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 10px 0 0;
}
.heading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-coral-soft);
}
.heading-dots span:nth-child(2) { background: var(--c-peach); }
.heading-dots span:nth-child(3) { background: var(--c-mint); }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }

/* ==========================================================================
   アニメーション
   ========================================================================== */

/* 浮遊装飾（transform のみ・layout を発生させない） */
@keyframes float-a {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50%     { transform: translate(0,-30px) rotate(14deg); }
}
@keyframes float-b {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50%     { transform: translate(22px,-26px) rotate(-16deg); }
}
@keyframes float-c {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-18px,-28px) scale(1.18); }
}
@keyframes twinkle {
  0%,100% { opacity: .4; transform: scale(.7) rotate(0deg); }
  50%     { opacity: 1;  transform: scale(1.25) rotate(90deg); }
}
@keyframes sway {
  0%,100% { transform: translateX(0) rotate(0deg); }
  50%     { transform: translateX(-26px) rotate(4deg); }
}
/* ゆるやかな周回ドリフト（ebifly風の常時ふわふわ） */
@keyframes drift {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  25%     { transform: translate(26px,-22px) rotate(12deg); }
  50%     { transform: translate(10px,-40px) rotate(-8deg); }
  75%     { transform: translate(-22px,-16px) rotate(10deg); }
}
/* ゆっくり自転する花 */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* 上下のバウンド */
@keyframes bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-22px); }
}
/* 波線の横スライド（無限ループ） */
@keyframes wave-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-40px); }
}
/* 背景のやわらかい光の玉のドリフト（transform のみ） */
@keyframes blob-drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(24px,-18px) scale(1.06); }
  66%     { transform: translate(-18px,14px) scale(0.96); }
}

.deco { position: absolute; pointer-events: none; z-index: 1; opacity: .95; }
.deco--float-a { animation: float-a 6s var(--ease-soft) infinite; }
.deco--float-b { animation: float-b 7s var(--ease-soft) infinite; }
.deco--float-c { animation: float-c 8s var(--ease-soft) infinite; }
.deco--twinkle { animation: twinkle 3.6s ease-in-out infinite; }
.deco--sway    { animation: sway 6s var(--ease-soft) infinite; }
.deco--drift   { animation: drift 10s var(--ease-soft) infinite; }
.deco--bob     { animation: bob 4s ease-in-out infinite; }
.deco--spin    { animation: spin-slow 16s linear infinite; }
.deco--wave    { animation: wave-slide 7s linear infinite; }

/* 背景のソフトな光の玉 */
.blob {
  position: absolute; z-index: 0; pointer-events: none;
  border-radius: 50%; filter: blur(6px);
  animation: blob-drift 12s var(--ease-soft) infinite;
}


/* スクロール連動フェードイン（opacity + translateY のみ） */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* prefers-reduced-motion: すべてのアニメーションを無効化（装飾は静止表示のまま残す） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deco, .blob { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
