@charset "UTF-8";
/* ==========================================================================
   小松空き家相談センター — motion.css
   原則：300-500ms / ease-out / 移動16-24px / 一度だけ（sowelu と同じ仕組み）
   ライブラリ不使用（IntersectionObserver + CSS transition）。js/reveal.js が .is-in を付ける。
   ========================================================================== */

/* ---------- 1. スクロール出現 ---------- */
.js .reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* 子要素を順にずらす：親に .stagger、子に .reveal */
.js .stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.js .stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.js .stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.js .stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.js .stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.js .stagger > .reveal:nth-child(6) { transition-delay: 400ms; }

/* ---------- 2. ヒーロー ---------- */
.js .hero__label, .js .hero__title span, .js .hero__text, .js .hero__btns, .js .hero__note {
  opacity: 0; transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
.hero.is-ready .hero__label                  { opacity: 1; transform: none; transition-delay: 80ms; }
.hero.is-ready .hero__title span:nth-child(1) { opacity: 1; transform: none; transition-delay: 160ms; }
.hero.is-ready .hero__title span:nth-child(2) { opacity: 1; transform: none; transition-delay: 240ms; }
.hero.is-ready .hero__text                   { opacity: 1; transform: none; transition-delay: 360ms; }
.hero.is-ready .hero__btns                   { opacity: 1; transform: none; transition-delay: 440ms; }
.hero.is-ready .hero__note                   { opacity: 1; transform: none; transition-delay: 520ms; }

/* イラストはふわっと浮き上がる（1回のみ） */
.js .hero__art img { opacity: 0; transform: translateY(14px) scale(.98); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.hero.is-ready .hero__art img { opacity: 1; transform: none; transition-delay: 120ms; }
.js .hero__art::before { transform: scale(.92); opacity: 0; transition: transform 1100ms var(--ease), opacity 700ms var(--ease); }
.hero.is-ready .hero__art::before { transform: none; opacity: 1; }

/* 浮島：ゆっくり上下（6px・7秒）。登場アニメの transform とぶつからないよう、外側の .hero__island を動かす */
@keyframes island-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes island-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.88); opacity: .6; } }
.hero.is-ready .hero__island { animation: island-float 7s ease-in-out 1.2s infinite; }
.hero.is-ready .hero__shadow { animation: island-shadow 7s ease-in-out 1.2s infinite; }

/* 雲：右から左へ。速さと開始位置をずらして、同時に並ばないようにする */
@keyframes cloud-drift { from { transform: translateX(110%); } to { transform: translateX(-30%); } }
.hero__c { animation: cloud-drift linear infinite; width: 100%; }
.hero__c svg { margin-left: 0; }
.hero__c--1 { animation-duration: 70s; animation-delay: -20s; }
.hero__c--2 { animation-duration: 95s; animation-delay: -60s; }
.hero__c--3 { animation-duration: 82s; animation-delay: -5s; }
.hero__c--4 { animation-duration: 110s; animation-delay: -85s; }

/* ---------- 3. 数字 ---------- */
.js .svc__n { opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.svc.is-in .svc__n { opacity: 1; transform: none; transition-delay: 120ms; }

/* ---------- 4. 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero__label, .js .hero__title span, .js .hero__text, .js .hero__btns, .js .hero__note,
  .js .hero__art img, .js .hero__art::before, .js .svc__n {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .flow::before { transform: none !important; transition: none !important; }
  .hero__island, .hero__c, .hero__shadow { animation: none !important; }
  .hero__c--1 { transform: translateX(8%); } .hero__c--2 { transform: translateX(62%); }
  .hero__c--3 { transform: translateX(4%); }  .hero__c--4 { transform: translateX(78%); }
}
