:root {
  --cobalt: #2456C8;  /* コバルト：ボタン・強調 */
  --navy: #14213D;    /* 濃紺：文字 */
  --yellow: #FFC83D;  /* 黄：枚数・試算のアクセント */
  --pale: #EEF2F8;    /* 淡い青灰：地 */
  --gray: #3A4150;    /* 本文 */
  --line: #C9D2E3;    /* 罫線 */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--pale);
  color: var(--navy);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}
h1, h2, h3 { word-break: auto-phrase; text-wrap: balance; line-break: strict; }

.lp { max-width: 640px; margin: 0 auto; background: #fff; box-shadow: 0 0 40px rgba(20,33,61,.08); container-type: inline-size; }
.part { position: relative; margin: 0; line-height: 0; overflow: hidden; }
.part img { display: block; width: 100%; height: auto; }

/* 画像の中のボタンに重ねる透明なリンク（ときどき光が走る） */
.hit { position: absolute; display: block; border-radius: 999px; color: transparent; font-size: 1px; overflow: hidden; }
.hit:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--cobalt); }
.hit.shine::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.4), rgba(255,255,255,0));
  animation: btn-shine 4.5s ease-in-out 2.5s infinite;
}
@keyframes btn-shine { 0% { left: -40%; } 30%, 100% { left: 120%; } }

/* ---------- FV：枚数が数え上がる ---------- */
/* 画像の数字の上に同じ色の面をかぶせて数え、数え終わったら面を消して画像の数字に戻す */
.count-cover { position: absolute; display: none; align-items: center; justify-content: flex-start; pointer-events: none;
  background: rgb(236,243,251); color: var(--navy); line-height: 1; }
.count-cover b { font-family: "Noto Sans JP", sans-serif; font-weight: 800; font-size: 6.4cqw; letter-spacing: -.02em; white-space: nowrap; }
.count-cover i { font-style: normal; font-variant-numeric: tabular-nums; font-size: 1.2em; }
html.js .count-cover { display: flex; }
.count-cover.done { opacity: 0; transition: opacity .35s ease; }

/* ---------- 悩み：吹き出しが1つずつ出る ---------- */
.bubble-cover { position: absolute; display: none; pointer-events: none; background: rgb(232,239,248); }
html.js .bubble-cover { display: block; }
#pain.on .bubble-cover { animation: wipe .6s cubic-bezier(.3,.6,.3,1) calc(var(--i) * .45s + .2s) both; }
@keyframes wipe { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }

/* ---------- 提案：カタログの数値4つを順に光らせる（2周で止まる） ---------- */
.card-glow { position: absolute; border: .5cqw solid var(--cobalt); border-radius: 2.2cqw; opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 1cqw rgba(36,86,200,.12); }
#offer.on .card-glow { animation: card-on 4.4s ease-out calc(var(--i) * .6s + .3s) 2; }
@keyframes card-on { 0% { opacity: 0; } 6% { opacity: 1; } 22% { opacity: 1; } 32%, 100% { opacity: 0; } }

/* ---------- 機能の詳細：4つの帯を順に光らせる ---------- */
.row-glow { position: absolute; border: .45cqw solid var(--cobalt); border-radius: 2.4cqw; opacity: 0; pointer-events: none; }
#feature.on .row-glow { animation: card-on 4.4s ease-out calc(var(--i) * .6s + .3s) 2; }

/* ---------- 料金のしくみ：ピン1〜4と説明を順に光らせる ---------- */
.pin, .legend { position: absolute; pointer-events: none; }
.pin { left: var(--x); top: var(--y); width: 7.6%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.pin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: .5cqw solid var(--cobalt); opacity: 0; }
.legend { border: .45cqw solid var(--cobalt); border-radius: 2.2cqw; opacity: 0; }
#price.on .pin::after { animation: pin-ring 4.4s ease-out calc(var(--i) * .6s + .3s) 2; }
#price.on .legend { animation: card-on 4.4s ease-out calc(var(--i) * .6s + .3s) 2; }
@keyframes pin-ring { 0% { opacity: .9; transform: scale(1); } 16% { opacity: 0; transform: scale(2.2); } 100% { opacity: 0; } }

/* ---------- CTA：料金のマス（HTMLの文字） ---------- */
.fee { position: absolute; display: flex; flex-direction: column; gap: .6cqw; padding-left: 1.6cqw; line-height: 1.35;
  font-size: 3.4cqw; color: var(--navy); font-feature-settings: "palt"; white-space: nowrap; pointer-events: none; }
.fee em { font-style: normal; font-size: 2.3cqw; color: var(--cobalt); }
html.js .fee { opacity: 0; transform: translateY(1cqw); transition: opacity .6s ease .4s, transform .6s ease .4s; }
html.js #cta.on .fee { opacity: 1; transform: none; }

/* 画像はふわっと表示 */
.part.reveal img { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.part.reveal.on img { opacity: 1; transform: none; }

/* ---------- 申込フォーム ---------- */
.apply { padding: 56px 6% 64px; background: var(--pale); }
.apply-label { margin: 0 0 8px; color: var(--cobalt); font-size: 15px; letter-spacing: .06em; }
.apply-label::before { content: ""; display: inline-block; width: 28px; height: 2px; margin-right: 10px; vertical-align: middle; background: var(--cobalt); }
.apply h2 { margin: 0 0 16px; font-weight: 400; font-size: clamp(23px, 6vw, 30px); line-height: 1.5; }
.apply-lead { margin: 0 0 28px; font-size: 16px; line-height: 1.8; color: var(--gray); text-wrap: pretty; }
#apply-form { display: grid; gap: 18px; padding: 24px 5%; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
#apply-form > label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 0; font-size: 16px; }
#apply-form > label > input, #apply-form > label > textarea { grid-column: 1 / -1; }
.req, .opt { justify-self: start; margin-left: 8px; padding: 0 8px; font-size: 12px; line-height: 20px; display: inline-block; }
.req { background: var(--cobalt); color: #fff; }
.opt { background: var(--pale); color: var(--gray); }
#apply-form input, #apply-form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--navy);
  border: 1px solid #B9C4D8; border-radius: 4px; background: #fff;
}
#apply-form textarea { line-height: 1.7; resize: vertical; }
#apply-form :focus-visible { outline: 3px solid rgba(36,86,200,.3); border-color: var(--cobalt); }
.form-msg { margin: 0; padding: 12px 14px; font-size: 15px; line-height: 1.7; background: #FFF6D9; border-left: 4px solid #C98A1B; }
.form-msg.error { background: #FDECEA; border-left-color: #B3261E; }
#apply-form button {
  min-height: 56px; margin-top: 4px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--cobalt); color: #fff; font: inherit; font-size: 17px; letter-spacing: .03em;
}
#apply-form button:hover { filter: brightness(1.08); }

.foot { padding: 32px 6% 120px; background: var(--navy); color: #fff; font-size: 14px; line-height: 1.8; }
.foot p { margin: 0 0 8px; }
.foot-name { font-size: 16px; letter-spacing: .08em; }
.demo { opacity: .75; font-size: 12.5px; }

/* 画面下に追従するボタン */
.sticky {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%) translateY(140%);
  width: min(92vw, 560px); min-height: 52px; padding: 12px 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--cobalt); color: #fff; text-decoration: none; font-size: 16px; letter-spacing: .03em;
  border-radius: 999px; box-shadow: 0 6px 20px rgba(20,33,61,.25);
  transition: transform .35s ease; z-index: 10;
}
.sticky.show { transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .count-cover, html.js .bubble-cover { display: none; }
  .card-glow, .row-glow, .legend, .pin::after, .hit.shine::after { animation: none !important; }
  html.js .fee { opacity: 1; transform: none; transition: none; }
  .part.reveal img { opacity: 1; transform: none; transition: none; }
  .sticky { transition: none; }
}
