/* ==========================================================================
   ホーム（index.html）
   ========================================================================== */

/* --------------------------------------------------------------------------
   ヒーロー
   ※ --sy はスクロール量（site-layout.js が設定）。要素ごとに係数を変えて視差効果を出す
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--sw-blue-50);
}

/* 背景の方眼 */
.hero__grid {
  position: absolute;
  inset: -20% 0 0 0;
  background-image:
    linear-gradient(var(--sw-blue-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--sw-blue-100) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: translate3d(0, calc(var(--sy) * 0.35px), 0);
  will-change: transform;
}

.hero__inner {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(var(--header-h) + 40px) var(--gutter) 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

/* 左カラム（コピー・ボタン） */
.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  transform: translate3d(0, calc(var(--sy) * 0.12px), 0);
}

.hero__title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--sw-navy-800);
  animation: swRise var(--dur-slow) var(--ease-out) 120ms both;
}

/* 文節の途中で改行させない */
.hero__title-line {
  display: inline-block;
}

.hero__texts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: swRise var(--dur-slow) var(--ease-out) 240ms both;
}

.hero__subcopy {
  margin: 0;
  font-size: var(--fs-body-lg);
  font-weight: 700;
  letter-spacing: var(--ls-heading);
  color: var(--text-heading);
}

.hero__lead {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  max-width: 32em;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: swRise var(--dur-slow) var(--ease-out) 360ms both;
}

/* --------------------------------------------------------------------------
   ヒーロー右側のアニメーション
   「ご相談 → AIで組み立て → 試作品完成 → 操作 → 要望を反映 → 在庫画面を開く → お届け」を
   --hero-cycle（20秒）でくり返す。各パーツの @keyframes の % は下の表の秒数 × 5 で決めている。
   タイミングを変えるときは、関係するパーツの % をまとめて直すこと。

     0.2〜2.5秒   メモの3項目が1行ずつ書き込まれる（heroWrite1〜3）
     2.6〜6.6秒   「AIで試作品を組み立て中」のチップ（heroAi）
     0〜5.4秒     画面は仮表示（スケルトン）、バッジは「組み立て中」
     5.4〜6.4秒   画面が完成して中身が出る。棒グラフが伸び、一覧が並ぶ。メモにチェックが付く
     7.0〜8.2秒   カーソルが「＋新規登録」へ移動してクリック
     8.4〜8.9秒   一覧の先頭に新しい行が差し込まれる
     9.6〜14.4秒  お客さまの吹き出し「在庫もこの画面で見られますか？」
     10.8秒       要望を反映：メニューに「在庫 NEW」、URL とバッジが v2 に
     11.6〜12.8秒 カーソルがメニューの「在庫」へ移動してクリック
     13.0〜14.4秒 受注一覧が在庫一覧の画面に切り替わる。行が並び、在庫量のゲージが伸びる
     15.0〜18.9秒 完了通知
     19.2〜20秒   すべて元に戻して次の周へ

   ※ 各パーツの「アニメーションしていないときの見た目」は完成状態にしてある
     （「動きを減らす」設定の利用者には、動かない完成図として表示される）
   -------------------------------------------------------------------------- */
.hero__visual {
  --hero-cycle: 20s;
  --hero-start: 1s; /* 最初の周を始めるまでの待ち時間（各パーツの出現を待つ） */
  position: relative;
  aspect-ratio: 10 / 9;
  min-height: 340px;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 160px);
  justify-self: center;
}

/* 背景の装飾（円・回る点線の輪・ドット） */
.hero__deco {
  position: absolute;
  pointer-events: none;
  animation: heroFadeIn 1.2s var(--ease-out) 200ms both;
}

.hero__deco--disc {
  right: -4%;
  top: 12%;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sw-blue-100);
  animation:
    heroFadeIn 1.2s var(--ease-out) 200ms both,
    heroBreathe 12s var(--ease-in-out) infinite;
}

.hero__deco--ring {
  right: -14%;
  top: 0;
  width: 96%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px dashed var(--sw-blue-200);
  animation:
    heroFadeIn 1.2s var(--ease-out) 200ms both,
    heroSpin 80s linear infinite;
}

/* 輪の上をまわる小さな点 */
.hero__deco--ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--sw-blue-400);
  box-shadow: 0 0 0 5px var(--sw-blue-100);
}

.hero__deco--dots {
  left: 0;
  bottom: 22%;
  width: 92px;
  height: 72px;
  background-image: radial-gradient(var(--sw-blue-300) 1.6px, transparent 1.8px);
  background-size: 16px 16px;
  opacity: .7;
}

/* モック内の各パーツの配置（視差の係数はパーツごとに異なる） */
.hero__float {
  position: absolute;
  z-index: 2;
}

.hero__float--memo {
  left: 0;
  top: 2%;
  z-index: 3;
  transform: translate3d(0, calc(var(--sy) * 0.22px), 0);
}

.hero__float--ai {
  left: 2%;
  top: 41%;
  z-index: 5;
  transform: translate3d(0, calc(var(--sy) * 0.16px), 0);
}

.hero__float--app {
  right: 0;
  top: 30%;
  width: 80%;
  transform: translate3d(0, calc(var(--sy) * 0.06px), 0);
}

/* アプリ画面の後ろに重ねた「もう1枚の画面」（奥行きを出す） */
.hero__float--app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: var(--radius-lg);
  background: var(--sw-white);
  border: 1px solid var(--sw-blue-100);
  transform: translate(18px, 18px);
  opacity: .7;
  animation: heroFadeIn var(--dur-slow) var(--ease-out) 700ms both;
}

.hero__float--bubble {
  right: 3%;
  top: 4%;
  z-index: 4;
  transform: translate3d(0, calc(var(--sy) * -0.05px), 0);
}

.hero__float--toast {
  left: 3%;
  bottom: -7%; /* アプリ画面の下端にかかる程度にして、一覧の行を隠さない */
  z-index: 4;
  transform: translate3d(0, calc(var(--sy) * -0.14px), 0);
}

/* ご相談メモ（書き込まれた項目に、画面へ反映されるとチェックが付く） */
.hero-memo {
  background: var(--sw-paper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  rotate: -4deg;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation:
    swRise var(--dur-slow) var(--ease-out) 300ms both,
    heroBob 7s var(--ease-in-out) 1s infinite;
}

.hero-memo__label {
  font-family: var(--font-latin);
  font-size: 11px;
  letter-spacing: var(--ls-eyebrow);
  color: var(--text-muted);
}

.hero-memo__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--sw-gray-700);
}

.hero-memo__item {
  --d: 0s; /* チェックが付くタイミングのずらし */
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-memo__item:nth-child(2) { --d: .2s; }
.hero-memo__item:nth-child(3) { --d: .4s; }

.hero-memo__text {
  white-space: nowrap;
}

.hero-memo__item:nth-child(1) .hero-memo__text { animation: heroWrite1 var(--hero-cycle) linear var(--hero-start) infinite both; }
.hero-memo__item:nth-child(2) .hero-memo__text { animation: heroWrite2 var(--hero-cycle) linear var(--hero-start) infinite both; }
.hero-memo__item:nth-child(3) .hero-memo__text { animation: heroWrite3 var(--hero-cycle) linear var(--hero-start) infinite both; }

.hero-memo__check {
  position: relative;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--sw-success);
  background: var(--sw-success);
  animation: heroCheck var(--hero-cycle) var(--ease-out) calc(var(--hero-start) + var(--d)) infinite both;
}

/* チェックマーク（L字を回転させて描く） */
.hero-memo__check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.5px;
  width: 3.5px;
  height: 7px;
  border-right: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(45deg);
  animation: heroCheckMark var(--hero-cycle) var(--ease-out) calc(var(--hero-start) + var(--d)) infinite both;
}

/* 「AIで組み立て中」チップ */
.hero-ai {
  display: grid;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--sw-navy-800);
  color: #fff;
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  animation: heroAi var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-ai__state {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-ai__state--build { animation: heroAiBuild var(--hero-cycle) linear var(--hero-start) infinite both; }
.hero-ai__state--done  { animation: heroAiDone  var(--hero-cycle) linear var(--hero-start) infinite both; }

.hero-ai__spark {
  color: var(--sw-sky-300);
  font-size: 13px;
  animation: heroSpin 2.4s linear infinite;
}

.hero-ai__state--done .hero-ai__spark {
  color: var(--sw-leaf-400);
  animation: none;
}

.hero-ai__dots {
  display: inline-flex;
  gap: 3px;
}

.hero-ai__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: heroDot 1.2s var(--ease-in-out) infinite;
}

.hero-ai__dots span:nth-child(2) { animation-delay: .15s; }
.hero-ai__dots span:nth-child(3) { animation-delay: .3s; }

/* 受注管理アプリのモック */
.hero-mock {
  position: relative;
  background: var(--sw-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation:
    swRise var(--dur-slow) var(--ease-out) 450ms both,
    heroMockFlash var(--hero-cycle) var(--ease-out) var(--hero-start) infinite;
}

.hero-mock__titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-mock__window-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--sw-gray-200);
}

/* URL 欄（v1 → v2 に切り替わる） */
.hero-mock__url {
  display: grid;
  margin-left: 10px;
  flex: 1;
  min-width: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sw-gray-100);
  font-family: var(--font-latin);
  font-size: 11px;
  color: var(--text-muted);
}

.hero-mock__url-text {
  grid-area: 1 / 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-mock__url-text--v1 { animation: heroShowV1 var(--hero-cycle) linear var(--hero-start) infinite both; }
.hero-mock__url-text--v2 { opacity: 0; animation: heroShowV2 var(--hero-cycle) linear var(--hero-start) infinite both; }

/* 状態バッジ（組み立て中 → v1 公開中 → v2 に更新） */
.hero-mock__badge {
  display: grid;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.hero-mock__badge-text {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
}

.hero-mock__badge-text::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.hero-mock__badge-text--build {
  background: var(--sw-warning-bg);
  color: var(--sw-warning);
  opacity: 0;
  animation: heroShowBuild var(--hero-cycle) linear var(--hero-start) infinite both;
}

.hero-mock__badge-text--build::before {
  animation: heroBlink 1s ease-in-out infinite;
}

.hero-mock__badge-text--v1 {
  background: var(--sw-success-bg);
  color: var(--sw-success);
  animation: heroShowBadgeV1 var(--hero-cycle) linear var(--hero-start) infinite both;
}

.hero-mock__badge-text--v2 {
  background: var(--sw-blue-100);
  color: var(--sw-blue-700);
  opacity: 0;
  animation: heroShowV2 var(--hero-cycle) linear var(--hero-start) infinite both;
}

.hero-mock__body {
  position: relative;
  display: grid;
  grid-template-columns: 26% 1fr;
  min-height: 240px;
}

.hero-mock__sidebar {
  background: var(--sw-navy-800);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
}

.hero-mock__menu-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.hero-mock__menu-item--active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  animation: heroOrdersMenu var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

/* 要望を受けて追加される「在庫」メニュー */
.hero-mock__menu-item--stock {
  position: relative;
  animation: heroStock var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

/* 「在庫」をクリックしたときの波紋 */
.hero-mock__menu-item--stock::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--sw-sky-300);
  opacity: 0;
  animation: heroMenuRipple var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__menu-new {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--sw-sky-300);
  color: var(--sw-navy-900);
  font-family: var(--font-latin);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: 0;
  animation: heroStockNew var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__main {
  position: relative;
  padding: 16px 18px;
  min-width: 0;
}

.hero-mock__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: heroContent var(--hero-cycle) linear var(--hero-start) infinite both;
}

/* 組み立て中の仮表示（スケルトン） */
.hero-mock__skeleton {
  position: absolute;
  inset: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  animation: heroSkeleton var(--hero-cycle) linear var(--hero-start) infinite both;
}

.hero-mock__skel {
  height: 12px;
  border-radius: 6px;
  background: var(--sw-gray-100);
  animation: heroPulse 1.1s var(--ease-in-out) infinite alternate;
}

.hero-mock__skel--head  { width: 40%; height: 16px; }
.hero-mock__skel--chart { height: 44px; background: var(--sw-blue-50); }
.hero-mock__skel--short { width: 62%; }
.hero-mock__skel:nth-child(3) { animation-delay: .1s; }
.hero-mock__skel:nth-child(4) { animation-delay: .2s; }
.hero-mock__skel:nth-child(5) { animation-delay: .3s; }
.hero-mock__skel:nth-child(6) { animation-delay: .4s; }

.hero-mock__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.hero-mock__heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: .06em;
}

.hero-mock__new-button {
  position: relative;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sw-blue-500);
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  animation: heroPress var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

/* クリックしたときの波紋 */
.hero-mock__new-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--sw-blue-400);
  opacity: 0;
  animation: heroRipple var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

/* 棒グラフ（左から順に伸びる） */
.hero-mock__chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 44px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-mock__bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  animation: heroBarGrow var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__bar:nth-child(1) { height: 40%;  background: var(--sw-blue-200); }
.hero-mock__bar:nth-child(2) { height: 62%;  background: var(--sw-blue-200); animation-delay: calc(var(--hero-start) + .08s); }
.hero-mock__bar:nth-child(3) { height: 48%;  background: var(--sw-blue-300); animation-delay: calc(var(--hero-start) + .16s); }
.hero-mock__bar:nth-child(4) { height: 80%;  background: var(--sw-blue-400); animation-delay: calc(var(--hero-start) + .24s); }
.hero-mock__bar:nth-child(5) { height: 100%; background: var(--sw-blue-500); animation-delay: calc(var(--hero-start) + .32s); }

/* 受注一覧（4行分だけ見せる。新しい行が差し込まれると、いちばん下の行は枠の外へ押し出される） */
.hero-mock__rows {
  --row-h: 34px;
  height: calc(var(--row-h) * 4);
  margin: 0 -6px; /* 差し込まれた行の色付き背景が左右にはみ出せるよう、切り取り枠を少し広げる */
  padding: 0 6px;
  overflow: hidden;
}

.hero-mock__rows-track {
  animation: heroRowsTrack var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  height: var(--row-h);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  animation: heroRowIn var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__row:nth-child(3) { animation-delay: calc(var(--hero-start) + .1s); }
.hero-mock__row:nth-child(4) { animation-delay: calc(var(--hero-start) + .2s); }
.hero-mock__row:nth-child(5) { animation-delay: calc(var(--hero-start) + .3s); }

/* 差し込まれた行は、しばらく色付きで目立たせる */
.hero-mock__row--added {
  padding: 0 6px;
  margin: 0 -6px;
  border-radius: 6px;
  animation:
    heroRowIn var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both,
    heroRowAdded var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__date {
  font-family: var(--font-latin);
  color: var(--text-muted);
}

.hero-mock__client {
  color: var(--sw-gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-mock__status {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.hero-mock__status--new  { background: var(--sw-blue-100);    color: var(--sw-blue-700); }
.hero-mock__status--wip  { background: var(--sw-warning-bg);  color: var(--sw-warning); }
.hero-mock__status--done { background: var(--sw-success-bg);  color: var(--sw-success); }

/* 在庫一覧画面（受注一覧と同じ位置に重ね、クリックで入れ替える） */
.hero-mock__stock {
  position: absolute;
  inset: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  animation: heroStockScreen var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

/* 在庫一覧の「＋入庫登録」は押さない飾りなので動かさない */
.hero-mock__new-button--static {
  animation: none;
}

.hero-mock__new-button--static::after {
  display: none;
}

/* 集計タイル（棒グラフと同じ高さ） */
.hero-mock__tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  height: 44px;
}

.hero-mock__tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--sw-blue-50);
  line-height: 1.3;
}

.hero-mock__tile-label {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}

.hero-mock__tile-num {
  font-family: var(--font-latin);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
}

.hero-mock__tile--alert {
  background: var(--sw-warning-bg);
}

.hero-mock__tile--alert .hero-mock__tile-num {
  color: var(--sw-warning);
}

/* 在庫の行（品名・在庫量のゲージ・数量） */
.hero-mock__stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30% 3.4em;
  gap: 10px;
  align-items: center;
  height: 34px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  animation: heroStockRowIn var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__stock-row:nth-child(2) { animation-delay: calc(var(--hero-start) + .1s); }
.hero-mock__stock-row:nth-child(3) { animation-delay: calc(var(--hero-start) + .2s); }
.hero-mock__stock-row:nth-child(4) { animation-delay: calc(var(--hero-start) + .3s); }

.hero-mock__item {
  color: var(--sw-gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-mock__gauge {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--sw-gray-100);
  overflow: hidden;
}

.hero-mock__gauge::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--level);
  border-radius: inherit;
  background: var(--sw-blue-400);
  transform-origin: left;
  animation: heroGauge var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-mock__qty {
  font-family: var(--font-latin);
  color: var(--text-heading);
  text-align: right;
}

/* 残りわずかの品目は色を変える */
.hero-mock__stock-row--low .hero-mock__gauge::after {
  background: var(--sw-warning);
}

.hero-mock__stock-row--low .hero-mock__qty {
  color: var(--sw-warning);
  font-weight: 700;
}

/* 操作するマウスカーソル */
.hero-mock__cursor {
  position: absolute;
  left: calc(100% - 52px);
  top: 26px;
  z-index: 3;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(10, 27, 90, .25));
  pointer-events: none;
  animation: heroCursor var(--hero-cycle) var(--ease-in-out) var(--hero-start) infinite both;
}

/* 吹き出し */
.hero-bubble {
  position: relative;
  background: var(--sw-white);
  border: 1.5px solid var(--sw-gray-200);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-heading);
  box-shadow: var(--shadow-sm);
  transform-origin: 28px 100%;
  animation:
    heroBubble var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both,
    heroBob 5.5s var(--ease-in-out) infinite;
}

.hero-bubble__tail {
  position: absolute;
  left: 28px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: var(--sw-white);
  border-right: 1.5px solid var(--sw-gray-200);
  border-bottom: 1.5px solid var(--sw-gray-200);
  transform: rotate(45deg);
}

/* 完了通知 */
.hero-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--sw-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  animation:
    heroToast var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both,
    heroBob 6.5s var(--ease-in-out) infinite;
}

.hero-toast__icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--sw-success-bg);
  color: var(--sw-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: heroToastIcon var(--hero-cycle) var(--ease-out) var(--hero-start) infinite both;
}

.hero-toast__texts {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.hero-toast__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
}

.hero-toast__note {
  font-size: 12px;
  color: var(--text-muted);
}

/* 「動きを減らす」設定のときは、疑似要素（::before / ::after）のアニメーションも止める
   （common.css の一括停止は疑似要素には効かないため） */
@media (prefers-reduced-motion: reduce) {
  .hero__visual *::before,
  .hero__visual *::after {
    animation: none !important;
  }
}

/* ---- ヒーロー右側：くり返しのない動き ---- */
@keyframes heroFadeIn {
  from { opacity: 0; }
}

@keyframes heroBreathe {
  0%, 100% { scale: 1; }
  50%      { scale: 1.05; }
}

@keyframes heroSpin {
  to { rotate: 360deg; }
}

/* ふわふわ浮かぶ（transform とは別の translate を使うので、出現アニメーションとぶつからない） */
@keyframes heroBob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

@keyframes heroDot {
  0%, 60%, 100% { transform: none; opacity: .5; }
  30%           { transform: translateY(-3px); opacity: 1; }
}

@keyframes heroBlink {
  50% { opacity: .25; }
}

@keyframes heroPulse {
  from { opacity: .55; }
  to   { opacity: 1; }
}

/* ---- ヒーロー右側：20秒周期のタイムライン（% = 秒 × 5） ---- */
/* メモの書き込み（0.2〜0.9秒 / 1.0〜1.7秒 / 1.8〜2.5秒） */
@keyframes heroWrite1 {
  0%, 1%         { clip-path: inset(0 100% 0 0); }
  4.5%, 96%      { clip-path: inset(0 0 0 0); opacity: 1; }
  98.75%, 100%   { clip-path: inset(0 0 0 0); opacity: 0; }
}

@keyframes heroWrite2 {
  0%, 5%         { clip-path: inset(0 100% 0 0); }
  8.5%, 96%      { clip-path: inset(0 0 0 0); opacity: 1; }
  98.75%, 100%   { clip-path: inset(0 0 0 0); opacity: 0; }
}

@keyframes heroWrite3 {
  0%, 9%         { clip-path: inset(0 100% 0 0); }
  12.5%, 96%     { clip-path: inset(0 0 0 0); opacity: 1; }
  98.75%, 100%   { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* メモのチェック（5.6秒〜。項目ごとに --d ずつ遅らせる） */
@keyframes heroCheck {
  0%, 28%        { background: transparent; border-color: var(--sw-gray-300); }
  30%, 96%       { background: var(--sw-success); border-color: var(--sw-success); }
  98.75%, 100%   { background: transparent; border-color: var(--sw-gray-300); }
}

@keyframes heroCheckMark {
  0%, 28%        { opacity: 0; transform: rotate(45deg) scale(.3); }
  30%, 96%       { opacity: 1; transform: rotate(45deg) scale(1); }
  98.75%, 100%   { opacity: 0; transform: rotate(45deg) scale(1); }
}

/* AIチップ（2.6〜6.6秒。5.4秒で「できました」に切り替え） */
@keyframes heroAi {
  0%, 13%        { opacity: 0; transform: translateY(8px) scale(.94); }
  15%, 32%       { opacity: 1; transform: none; }
  34%, 100%      { opacity: 0; transform: translateY(-8px); }
}

@keyframes heroAiBuild {
  0%, 27%        { opacity: 1; }
  28%, 100%      { opacity: 0; }
}

@keyframes heroAiDone {
  0%, 27%        { opacity: 0; }
  28%, 100%      { opacity: 1; }
}

/* 仮表示 → 受注一覧（5.4〜6.0秒）→ 在庫一覧（13.0〜13.6秒）→ 19.2秒から仮表示に戻る */
@keyframes heroSkeleton {
  0%, 27%        { opacity: 1; }
  30%, 96%       { opacity: 0; }
  98.75%, 100%   { opacity: 1; }
}

@keyframes heroContent {
  0%, 27%        { opacity: 0; }
  30%, 64.5%     { opacity: 1; transform: none; }
  66.5%, 100%    { opacity: 0; transform: translateX(-10px); }
}

@keyframes heroStockScreen {
  0%, 65%        { opacity: 0; transform: translateX(12px); }
  68%, 96%       { opacity: 1; transform: none; }
  98.75%, 100%   { opacity: 0; transform: none; }
}

@keyframes heroBarGrow {
  0%, 28%        { transform: scaleY(0); }
  32%, 100%      { transform: scaleY(1); }
}

@keyframes heroRowIn {
  0%, 28%        { opacity: 0; transform: translateY(8px); }
  31%, 100%      { opacity: 1; transform: none; }
}

/* 在庫一覧の行・ゲージ（13.2秒〜） */
@keyframes heroStockRowIn {
  0%, 66%        { opacity: 0; transform: translateY(6px); }
  69%, 100%      { opacity: 1; transform: none; }
}

@keyframes heroGauge {
  0%, 67%        { transform: scaleX(0); }
  72%, 100%      { transform: scaleX(1); }
}

/* バッジ・URL の切り替え（組み立て中 0〜5.4秒 / v1 5.4〜10.8秒 / v2 10.8〜19.2秒） */
@keyframes heroShowBuild {
  0%, 27%        { opacity: 1; }
  30%, 96%       { opacity: 0; }
  98.75%, 100%   { opacity: 1; }
}

@keyframes heroShowBadgeV1 {
  0%, 27%        { opacity: 0; }
  30%, 54%       { opacity: 1; }
  56%, 100%      { opacity: 0; }
}

@keyframes heroShowV1 {
  0%, 54%        { opacity: 1; }
  56%, 96%       { opacity: 0; }
  98.75%, 100%   { opacity: 1; }
}

@keyframes heroShowV2 {
  0%, 54%        { opacity: 0; }
  56%, 96%       { opacity: 1; }
  98.75%, 100%   { opacity: 0; }
}

/* カーソル
   1回目: 7.0秒に下から現れ、8.0秒に「新規登録」へ到着、8.2秒にクリック、9.4秒までに消える
   2回目: 11.6秒に現れ、12.6秒にメニューの「在庫」へ到着、12.8秒にクリック、14.0秒までに消える */
@keyframes heroCursor {
  0%, 35%        { opacity: 0; left: 55%; top: 100%; transform: none; }
  37%            { opacity: 1; left: 55%; top: 82%; }
  40%            { opacity: 1; left: calc(100% - 52px); top: 26px; transform: scale(1); }
  41%            { transform: scale(.82); }
  42%            { transform: scale(1); }
  45%            { opacity: 1; left: calc(100% - 52px); top: 26px; }
  47%            { opacity: 0; left: calc(100% - 40px); top: 44px; }
  58%            { opacity: 0; left: 62%; top: 86%; }
  60%            { opacity: 1; left: 56%; top: 74%; }
  63%            { opacity: 1; left: 36px; top: 58px; transform: scale(1); }
  64%            { transform: scale(.82); }
  65%            { transform: scale(1); }
  68%            { opacity: 1; left: 36px; top: 58px; }
  70%, 100%      { opacity: 0; left: 48px; top: 76px; }
}

@keyframes heroPress {
  0%, 40.5%      { transform: none; }
  41.1%          { transform: scale(.9); }
  42.4%, 100%    { transform: none; }
}

@keyframes heroRipple {
  0%, 41%        { opacity: 0; transform: scale(.8); }
  41.6%          { opacity: .8; }
  45%, 100%      { opacity: 0; transform: scale(1.25, 1.7); }
}

/* 新しい行の差し込み（8.4〜8.9秒）。10.5秒まで色付きで目立たせる */
@keyframes heroRowsTrack {
  0%, 42%        { transform: translateY(calc(var(--row-h) * -1)); }
  44.5%, 100%    { transform: none; }
}

@keyframes heroRowAdded {
  0%, 45%        { background: var(--sw-blue-50); }
  52.5%, 100%    { background: transparent; }
}

/* お客さまの吹き出し（9.6〜14.4秒） */
@keyframes heroBubble {
  0%, 48%        { opacity: 0; transform: translateY(10px) scale(.92); }
  50%, 72%       { opacity: 1; transform: none; }
  74.5%, 100%   { opacity: 0; transform: translateY(-6px); }
}

/* 要望の反映（10.8秒）：「在庫」メニューが光り、NEW が付く。画面の枠も一瞬光る
   12.8秒のクリックで「在庫」が選択中になり、「受注一覧」の選択が外れる */
@keyframes heroStock {
  0%, 54%        { background: rgba(255, 255, 255, 0); color: rgba(255, 255, 255, .7); box-shadow: 0 0 0 0 rgba(140, 203, 224, 0); }
  56%            { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: 0 0 0 3px rgba(140, 203, 224, .7); }
  60%, 64%       { background: rgba(255, 255, 255, .06); color: #fff; box-shadow: 0 0 0 0 rgba(140, 203, 224, 0); }
  65%, 96%       { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: 0 0 0 0 rgba(140, 203, 224, 0); }
  98.75%, 100%   { background: rgba(255, 255, 255, 0); color: rgba(255, 255, 255, .7); }
}

@keyframes heroOrdersMenu {
  0%, 64%        { background: rgba(255, 255, 255, .12); color: #fff; }
  65%, 96%       { background: rgba(255, 255, 255, 0); color: rgba(255, 255, 255, .7); }
  98.75%, 100%   { background: rgba(255, 255, 255, .12); color: #fff; }
}

@keyframes heroMenuRipple {
  0%, 64%        { opacity: 0; transform: scale(.9); }
  64.6%          { opacity: .9; }
  68%, 100%      { opacity: 0; transform: scale(1.15, 1.5); }
}

@keyframes heroStockNew {
  0%, 55%        { opacity: 0; transform: scale(.4); }
  57%, 96%       { opacity: 1; transform: none; }
  98.75%, 100%   { opacity: 0; }
}

@keyframes heroMockFlash {
  0%, 54%        { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(90, 130, 206, 0); }
  56%            { box-shadow: var(--shadow-lg), 0 0 0 5px rgba(90, 130, 206, .35); }
  62%, 100%      { box-shadow: var(--shadow-lg), 0 0 0 12px rgba(90, 130, 206, 0); }
}

/* 完了通知（15.0〜18.9秒） */
@keyframes heroToast {
  0%, 75%        { opacity: 0; transform: translateY(14px) scale(.95); }
  77.5%, 92%     { opacity: 1; transform: none; }
  94.5%, 100%    { opacity: 0; transform: translateY(6px); }
}

@keyframes heroToastIcon {
  0%, 76%        { transform: scale(.4); }
  78%            { transform: scale(1.15); }
  80%, 100%      { transform: none; }
}

/* Scroll Down ボタン */
.hero__scroll {
  all: unset;
  cursor: pointer;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  background: var(--sw-white);
  border-radius: 10px 10px 0 0;
  padding: 6px 22px;
  font-family: var(--font-latin);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--sw-gray-600);
}

/* --------------------------------------------------------------------------
   共感（こんなお悩み、ありませんか。）
   -------------------------------------------------------------------------- */
/* 2列 × 2段（狭い画面では1列） */
.worries__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 32px 28px;
}

/* お客様の声に見立てた吹き出し型カード（影は吹き出しの尻尾にも付くよう drop-shadow で指定） */
.worry {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 24px;
  height: 100%;
  box-sizing: border-box;
  padding: 36px 36px 36px 32px;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 8px 24px rgba(10, 27, 90, .09));
}

.worry::after {
  content: "";
  position: absolute;
  left: 44px;
  bottom: -14px;
  width: 22px;
  height: 15px;
  background: var(--surface-card);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.worry__no {
  font-family: var(--font-latin);
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--ls-latin-display);
  font-variant-numeric: tabular-nums;
  color: var(--sw-blue-200);
  /* 番号の字幅の違いで本文の開始位置がずれないよう幅を固定 */
  min-width: 1.25em;
}

.worry__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.worry__title {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-h4);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text-heading);
}

.worry__text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--text-body);
  text-wrap: pretty;
}

.worries__closing {
  margin: 0;
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  color: var(--text-body);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   3ステップ
   -------------------------------------------------------------------------- */
/* リード文を途中で折り返さない（見出しのリード文は通常 640px までのため、ここでは解除） */
.steps .section-heading__lead {
  max-width: none;
}

.steps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
}

.step__no {
  font-family: var(--font-latin);
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--ls-latin-display);
  color: var(--brand-primary);
}

.step__title {
  margin: 0;
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text-heading);
}

/* --------------------------------------------------------------------------
   強み（ネイビー背景）
   -------------------------------------------------------------------------- */
.strengths {
  position: relative;
  overflow: hidden;
  background: var(--surface-inverse);
}

.strengths__inner {
  position: relative;
}

.strengths__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 48px;
}

.strength {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.strength__figure {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--sw-blue-200);
}

.strength__num {
  font-family: var(--font-latin);
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
}

.strength__unit {
  font-size: 20px;
  font-weight: 700;
}

.strength__title {
  margin: 0;
  font-size: var(--fs-h4);
  letter-spacing: var(--ls-heading);
  color: #fff;
}

.strength__text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: rgba(255, 255, 255, .8);
  text-wrap: pretty;
}

/* スマホでだけ効かせる改行 */
.br-sp {
  display: none;
}

/* ==========================================================================
   レスポンシブ（599px 以下）
   試作画面のモックが重なり合わないよう配置を組み直し、視差効果を止める
   ========================================================================== */
@media (max-width: 599px) {
  .hero__inner {
    padding-bottom: 64px;
  }

  /* 視差効果を止める（狭い画面では要素同士が重なるため） */
  .hero__copy,
  .hero__float {
    transform: none;
  }

  .hero__visual {
    aspect-ratio: auto;
    height: 430px;
    min-height: 0;
    max-height: none;
  }

  /* メモ・AIチップ・ドット装飾は省略し、吹き出し → アプリ画面 → 完了通知 の順に縦へ並べる */
  .hero__float--memo,
  .hero__float--ai,
  .hero__deco--dots {
    display: none;
  }

  .hero__deco--disc {
    right: -16%;
    top: 8%;
    width: 90%;
  }

  .hero__deco--ring {
    right: -30%;
    top: -4%;
    width: 110%;
  }

  /* 奥の画面は右にはみ出さないよう下にだけずらす */
  .hero__float--app::before {
    transform: translate(0, 14px) scale(.94);
  }

  .hero__float--bubble {
    top: 0;
    right: 0;
  }

  .hero__float--app {
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
  }

  .hero__float--toast {
    left: 0;
    bottom: -40px;
  }

  /* 内容が画面より長くなるため、Scroll Down は表示しない */
  .hero__scroll {
    display: none;
  }

  /* セクション見出しは1〜2文字だけ次の行に落ちないよう小さくする */
  .section .container > :first-child h2 {
    font-size: clamp(20px, 5.8vw, 26px);
  }

  .br-sp {
    display: inline;
  }

  /* お悩みカードは番号を見出しの上に置き、本文を横幅いっぱいに使う */
  .worry {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 24px;
  }

  .worry::after {
    left: 32px;
  }

  .worry__no {
    font-size: 36px;
  }

  .worry__body {
    padding-top: 0;
  }

  /* ボタンは横幅いっぱいに（ボタンはランタイムの包み要素 .sc-host-x の中にあるため子孫セレクタで指定） */
  .hero__actions a {
    flex: 1 1 100%;
  }
}

/* 359px 以下（小さいスマホ）: ボタン文言が収まるよう左右の余白を詰める
   （余白はデザインシステムの部品側で直接指定されているため !important で上書き） */
@media (max-width: 359px) {
  .hero__actions a {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
