/* イチマンチャレンジ
   色は :root のトークンだけが実際の色を持つ。**直書きしない。**
   オレンジは「塗り用（鮮やか）」と「文字用（濃い）」を分ける。
   クリーム地に #FF6B1A の文字は 2.70:1 で読めないため（実測）。 */
:root {
  --color-bg: #FFF8EE;            /* クリーム */
  --color-surface: #FFFFFF;
  --color-text: #172C55;          /* ネイビー。クリーム地に 13.03:1 */
  --color-text-weak: #5B6674;     /* 5.54:1 */
  --color-brand: #FF6B1A;         /* 塗り用のビビッドなオレンジ */
  --color-brand-text: #C2410C;    /* 文字用。クリーム地に 4.91:1 */
  --color-navy: #172C55;
  --color-footer: #1E3C65;   /* logo-lockup-white.png の外周の平均。白文字 11.11:1 */
  --color-brand-dark: #7A6449;    /* プライバシーマークの下地。白文字 5.61:1（実測） */
  --color-gold: #FFD23F;          /* ネイビー地に 9.52:1 */
  --color-line: #E8DECF;
  --color-ng: #B3261E;
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1080px;
  --shadow: 0 6px 0 rgba(23, 44, 85, .12);
  --font-round: "Zen Maru Gothic", "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  --font-body: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.85;
}
h1, h2, h3, .num, .amount { font-family: var(--font-round); }
.in { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: var(--color-brand-text); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-navy); outline-offset: 2px;
}

/* ヘッダー。ロゴは PC 72px / スマホ 52px */
header.site { padding: 14px 0; }
header.site .logo { display: inline-block; }
header.site img { height: 72px; width: auto; display: block; }
.adm-title { margin-left: 14px; }

/* ファーストビュー */
.hero { padding: 8px 0 40px; }
.hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(28px, 4.3vw, 43px); line-height: 1.35; margin: 0 0 14px; font-weight: 900; text-wrap: balance; }
.hero h1 .hl {
  background: linear-gradient(transparent 62%, var(--color-gold) 62%);
  padding: 0 .1em;
}
.hero .sub { font-size: clamp(16px, 2.1vw, 19px); margin: 0 0 22px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; padding: 0; list-style: none; }
.badges li {
  background: var(--color-navy); color: #fff; border-radius: 999px;
  padding: 6px 16px; font-size: 14px; font-weight: 700;
}
.tier-note { font-size: 13px; color: var(--color-text-weak); margin: 0 0 12px; }
.tier { margin: 10px 0 0; font-weight: 700; font-family: var(--font-round); }
.tier.tier-5000 { color: var(--color-brand-text); }
.btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--color-brand); color: var(--color-navy); font-family: var(--font-round);
  font-size: clamp(17px, 2.4vw, 21px); font-weight: 900; text-decoration: none;
  border: 0; border-radius: 999px; padding: 18px 34px; min-height: 60px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .12s ease;
}
.btn-cta:hover { transform: translateY(2px); box-shadow: 0 4px 0 rgba(23, 44, 85, .12); }
.btn-cta[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
/* 副のボタン（「今回は見送る」「お断りする」）。主のボタンと見た目を分ける */
.btn-cta.sub { background: var(--color-surface); color: var(--color-text); border: 2px solid var(--color-line); }
.btn-cta.sub:hover { background: var(--color-bg); }

/* 架空の見積書カード。**社名欄は空欄のまま**（実在の会社名は入れない）。
   スタンプ・紙吹雪・トラックは装飾で、同じ内容は見出しと本文に書いてある */
.demo { position: relative; background: var(--color-surface); border: 3px solid var(--color-navy);
  border-radius: var(--radius-lg); padding: 22px 24px 160px; overflow: hidden; box-shadow: var(--shadow);
  animation: card 3.6s ease-out infinite; }
@keyframes card {
  0%, 60% { transform: translateY(0); }
  63% { transform: translateY(6px); }
  70%, 100% { transform: translateY(0); }
}
.demo-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px;
  border-bottom: 3px double var(--color-navy); margin-bottom: 14px; }
.demo-title { font-family: var(--font-round); font-weight: 900; font-size: 20px; letter-spacing: .1em; }
.demo-blank { flex: 1; height: 20px; border-bottom: 2px solid var(--color-line); }
.demo-rows { margin: 0; }
.demo-rows > div { display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dotted var(--color-line); }
.demo-rows dt, .demo-rows dd { margin: 0; font-size: 15px; }
.demo-rows dd { font-variant-numeric: tabular-nums; font-weight: 700; }
.demo .total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px;
  padding-top: 14px; border-top: 2px dashed var(--color-line); }
.demo .total span { font-size: 14px; color: var(--color-text-weak); font-weight: 700; }
.demo .amount { font-size: clamp(30px, 5vw, 42px); font-weight: 900; font-variant-numeric: tabular-nums; }
.demo-truck { position: absolute; left: 20px; bottom: 14px; height: 64px; width: auto;
  animation: truck 3.6s ease-out infinite; transform-origin: 50% 100%; }
@keyframes truck {
  0%, 60% { transform: translateY(0); }
  64% { transform: translateY(-14px); }
  68% { transform: translateY(0); }
  71% { transform: translateY(-6px); }
  75%, 100% { transform: translateY(0); }
}
.scan { position: absolute; left: 0; right: 0; height: 64px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,107,26,.28), transparent);
  border-top: 2px solid var(--color-brand); animation: scan 3.6s linear infinite; }
@keyframes scan { 0% { top: -64px; } 60%, 100% { top: 100%; } }

/* 主役。オレンジ地・白の縁取り・−8度 */
.stamp {
  position: absolute; right: 22px; bottom: 16px; z-index: 2; opacity: 0;
  transform: rotate(-8deg) scale(2.6);
  background: var(--color-brand); color: #fff; border: 4px solid #fff;
  box-shadow: 0 0 0 3px rgba(23,44,85,.15);
  font-family: var(--font-round); font-weight: 900;
  font-size: clamp(30px, 5.1vw, 42px); padding: 10px 24px; border-radius: 14px;
  animation: stamp 3.6s ease-out infinite;
}
@keyframes stamp {
  0%, 59% { opacity: 0; transform: rotate(-8deg) scale(2.6); }
  63% { opacity: 1; transform: rotate(-8deg) scale(.94); }
  67% { opacity: 1; transform: rotate(-8deg) scale(1); }
  92% { opacity: 1; transform: rotate(-8deg) scale(1); }
  100% { opacity: 0; transform: rotate(-8deg) scale(1); }
}

/* 紙吹雪（0.6秒で消える。**CSS だけ**） */
.confetti { position: absolute; right: 150px; bottom: 118px; width: 0; height: 0; z-index: 3; pointer-events: none; }
.confetti i { position: absolute; width: 10px; height: 10px; opacity: 0;
  animation: pop 3.6s ease-out infinite; }
.confetti i:nth-child(3n+1) { background: var(--color-brand); }
.confetti i:nth-child(3n+2) { background: var(--color-navy); }
.confetti i:nth-child(3n+3) { background: var(--color-gold); }
.confetti i:nth-child(1)  { --x: -120px; --y: -70px; --r: 180deg; }
.confetti i:nth-child(2)  { --x:  -80px; --y: -110px; --r: -160deg; }
.confetti i:nth-child(3)  { --x:  -30px; --y: -120px; --r: 210deg; }
.confetti i:nth-child(4)  { --x:   30px; --y: -110px; --r: -120deg; }
.confetti i:nth-child(5)  { --x:   80px; --y:  -80px; --r: 150deg; }
.confetti i:nth-child(6)  { --x:  120px; --y:  -40px; --r: -200deg; }
.confetti i:nth-child(7)  { --x:  110px; --y:   20px; --r: 130deg; }
.confetti i:nth-child(8)  { --x:   70px; --y:   60px; --r: -170deg; }
.confetti i:nth-child(9)  { --x:   10px; --y:   80px; --r: 190deg; }
.confetti i:nth-child(10) { --x:  -50px; --y:   70px; --r: -140deg; }
.confetti i:nth-child(11) { --x: -100px; --y:   30px; --r: 160deg; }
.confetti i:nth-child(12) { --x: -140px; --y:  -20px; --r: -190deg; }
.confetti i:nth-child(13) { --x:  -60px; --y:  -40px; --r: 240deg; }
.confetti i:nth-child(14) { --x:   40px; --y:  -50px; --r: -110deg; }
.confetti i:nth-child(15) { --x:   90px; --y:  -10px; --r: 200deg; }
.confetti i:nth-child(16) { --x:  -20px; --y:   40px; --r: -220deg; }
@keyframes pop {
  0%, 61% { opacity: 0; transform: translate(0, 0) rotate(0); }
  63% { opacity: 1; transform: translate(0, 0) rotate(0); }
  78% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
  .scan, .confetti { display: none; }
  .demo, .demo-truck { animation: none; }
  .stamp { animation: none; opacity: 1; transform: rotate(-8deg); }
  html { scroll-behavior: auto; }
}

/* セクション */
section { padding: 44px 0; }
h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 900; margin: 0 0 22px; text-align: center; }
h2 .mark { color: var(--color-brand-text); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 0; list-style: none; }
.steps li { background: var(--color-surface); border: 3px solid var(--color-navy); border-radius: var(--radius-lg);
  padding: 22px 20px; box-shadow: var(--shadow); }
.steps li { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "num icon" "head head" "body body";
  gap: 4px 14px; align-items: center; }
.steps .num { grid-area: num; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 999px; background: var(--color-brand);
  color: var(--color-navy); font-size: 24px; font-weight: 900; }
.steps .icon { grid-area: icon; width: 56px; height: 56px; justify-self: end; color: var(--color-navy); }
.steps h3 { grid-area: head; }
.steps p { grid-area: body; }
.steps h3 { margin: 10px 0 6px; font-size: 19px; font-weight: 900; }
.steps p { margin: 0; font-size: 15px; color: var(--color-text-weak); }

.why { background: var(--color-navy); color: #fff; border-radius: var(--radius-lg); padding: 30px 26px; }
.why h2 { color: #fff; }
.why p { margin: 0 auto; max-width: 720px; text-align: center; }
.why strong { color: var(--color-gold); }

ul.checks { list-style: none; padding: 0; max-width: 720px; margin: 0 auto; }
ul.checks li { position: relative; padding: 12px 12px 12px 48px; margin: 10px 0;
  background: var(--color-surface); border-radius: var(--radius); border: 2px solid var(--color-line); }
ul.checks li::before { content: "✓"; position: absolute; left: 14px; top: 11px;
  width: 24px; height: 24px; border-radius: 999px; background: var(--color-brand);
  color: var(--color-navy); font-weight: 900; text-align: center; line-height: 24px; font-size: 15px; }

/* フォーム */
.card { background: var(--color-surface); border: 3px solid var(--color-navy);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card.plain { border-width: 2px; border-color: var(--color-line); box-shadow: none; }
label.field { display: block; margin: 14px 0; }
label.field > span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
input[type=text], input[type=date], input[type=email], input[type=tel], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 12px; font-size: 16px; font-family: inherit;
  border: 2px solid var(--color-line); border-radius: 10px;
  background: var(--color-surface); color: var(--color-text); min-height: 48px;
}
textarea { min-height: 160px; line-height: 1.8; resize: vertical; font-family: inherit; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 240px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin-top: 10px; }
.consent input { width: 22px; height: 22px; margin-top: 3px; flex: 0 0 auto; }
.msg { padding: 14px; border-radius: var(--radius); margin: 14px 0; }
.msg.err { background: #FDECEA; color: var(--color-ng); font-weight: 700; }
.msg.info { background: var(--color-bg); border: 2px solid var(--color-line); }
.note { color: var(--color-text-weak); font-size: 14px; }

/* FAQ */
.notice { max-width: 720px; margin: 22px auto 0; background: var(--color-surface);
  border: 2px solid var(--color-brand); border-radius: var(--radius); padding: 16px 20px; }
.notice h3 { margin: 0 0 6px; font-size: 17px; color: var(--color-brand-text); }
.notice p { margin: 0; font-size: 15px; }
.work-condition { border-left: 4px solid var(--color-line); padding-left: 12px; }
.faq details { background: var(--color-surface); border: 2px solid var(--color-line);
  border-radius: var(--radius); padding: 14px 18px; margin: 10px 0; }
.faq summary { font-weight: 900; cursor: pointer; font-family: var(--font-round); }
.faq p { margin: 10px 0 0; }

/* フッター。**白版ロゴはネイビー背景が焼き込まれている**ので、背景色を画像に合わせる
   （画像の外周の平均が #1E3C65。継ぎ目が出ないようにするため、--color-navy とは別に持つ） */
footer.site { background: var(--color-footer); color: #fff; margin-top: 40px; padding: 30px 0 100px; }
.footer-logo { height: 64px; width: auto; display: block; margin-bottom: 14px; }
footer.site a { color: #fff; display: inline-block; margin-right: 18px; min-height: 44px; line-height: 44px; }
footer.site .small { font-size: 14px; opacity: .85; }
/* プライバシーマーク。**登録番号が入っているときだけ footer.js が作る。**
   画像が無い間は img だけが消え、登録番号は残る（持っていない認証は出さない・
   持っている認証は番号で示す）。下地は --color-brand-dark（白文字 5.61:1） */
footer.site .pmark {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-brand-dark); border-radius: 10px;
  padding: 8px 14px; margin-top: 8px; opacity: 1;
}
footer.site .pmark img { display: block; height: 60px; width: auto; }

/* スマホの固定 CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 248, 238, .96); border-top: 2px solid var(--color-line); }
.sticky-cta .tier-note { font-size: 13px; color: var(--color-text-weak); margin: 0 0 12px; }
.tier { margin: 10px 0 0; font-weight: 700; font-family: var(--font-round); }
.tier.tier-5000 { color: var(--color-brand-text); }
.btn-cta { width: 100%; }
.sticky-cta/* 画面を切り替えたときに見出しが隠れないよう、ヘッダーのぶんを逃がす */
.step-head { scroll-margin-top: 16px; }
.step-head:focus { outline: none; }
.step-head:focus-visible { outline: 3px solid var(--color-navy); outline-offset: 2px; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  header.site img { height: 52px; }
  /* スマホではスタンプの文字が小さくなる（clamp の下限 30px）ので、空ける量も減らす */
  .demo { padding-bottom: 118px; }
  .stamp { bottom: 14px; right: 16px; }
  .confetti { right: 110px; bottom: 90px; }
  .hero .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .sticky-cta { display: block; }
  section { padding: 34px 0; }
}
/* 画面を切り替えたときに見出しが隠れないよう、ヘッダーのぶんを逃がす */
.step-head { scroll-margin-top: 16px; }
.step-head:focus { outline: none; }
.step-head:focus-visible { outline: 3px solid var(--color-navy); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
