/* ===========================================================================
   BaseIN LP v3 — 基盤スタイル
   ---------------------------------------------------------------------------
   LPv2 の custom.css をベースに、v3 用に簡素化。
   - ブランドカラー (CSS 変数)
   - フォント / ベースリセット
   - CTA ボタンのアニメーション
   - 共通 keyframes
   =========================================================================== */

/* ===========================================================================
   ■ 1. ブランドカラー定義（LPv2 と完全一致）
   =========================================================================== */
:root {
  --color-primary:        #131B3D;
  --color-primary-light:  #1E2A5F;
  --color-primary-dark:   #0A0F25;

  --color-sub1:           #D9D2C7;
  --color-sub1-light:     #E8E3DA;
  --color-sub1-bg:        #F5F2ED;

  --color-sub2:           #6F8FAF;
  --color-sub2-light:     #8FA8C2;
  --color-sub2-dark:      #5A7A99;

  --color-accent:         #4053A6;
  --color-accent-light:   #5266B8;
  --color-accent-dark:    #2E3E80;

  --color-base:           #F7F8FA;
  --color-white:          #FFFFFF;

  --color-brand-yellow:   #F2E67B;

  /* 機能色 (v3 で追加) */
  --color-amber:          #F59E0B;
  --color-amber-light:    #FCD34D;
  --color-amber-bg:       #FEF3C7;
  --color-success:        #10B981;
  --color-success-light:  #34D399;
  --color-success-bg:     #D1FAE5;

  --color-text-primary:   #131B3D;
  --color-text-secondary: #5A6275;
  --color-text-tertiary:  #8A92A5;
}


/* ===========================================================================
   ■ 2. ベース
   =========================================================================== */
body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-base);
  color: var(--color-text-primary);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

button, a { -webkit-tap-highlight-color: transparent; }

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(64, 83, 166, 0.15);
}

::-webkit-scrollbar          { width: 8px; }
::-webkit-scrollbar-track    { background: var(--color-sub1-bg); }
::-webkit-scrollbar-thumb    { background: var(--color-sub2-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-sub2); }

@media (min-width: 1024px) {
  html { scroll-padding-top: 80px; }
}


/* ===========================================================================
   ■ 3. 共通アニメーション keyframes
   =========================================================================== */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(64, 83, 166, 0.30),
      0 4px 12px rgba(64, 83, 166, 0.40);
  }
  50% {
    box-shadow:
      0 0 30px rgba(64, 83, 166, 0.50),
      0 8px 20px rgba(64, 83, 166, 0.60);
  }
}

@keyframes arrow-slide {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ===========================================================================
   ■ 4. CTA ボタン
   =========================================================================== */
.cta-button-primary {
  animation: pulse-glow 2.5s ease-in-out infinite;
  transition: all 0.3s ease;
}
.cta-button-primary:hover {
  animation: none;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 24px rgba(64, 83, 166, 0.5);
}
.cta-button-primary:active { transform: scale(0.98); }

.cta-button-primary .arrow,
.cta-button-secondary .arrow {
  display: inline-block;
  animation: arrow-slide 1.5s ease-in-out infinite;
}

.cta-button-secondary {
  transition: all 0.3s ease;
}
.cta-button-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(64, 83, 166, 0.3);
}

.header-cta {
  transition: background-color 0.2s ease;
}


/* ===========================================================================
   ■ 5. スクロール出現用ユーティリティ
   =========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1)  { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2)  { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3)  { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4)  { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5)  { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6)  { transition-delay: 0.55s; }
.reveal-stagger.is-visible > *:nth-child(7)  { transition-delay: 0.65s; }
.reveal-stagger.is-visible > *:nth-child(8)  { transition-delay: 0.75s; }
.reveal-stagger.is-visible > *:nth-child(9)  { transition-delay: 0.85s; }
.reveal-stagger.is-visible > *:nth-child(10) { transition-delay: 0.95s; }


/* ===========================================================================
   ■ 6. フォーム
   =========================================================================== */
#apply-form, #apply-form * { color-scheme: light !important; }
.apply-form-input {
  transition: all 0.2s ease;
  color-scheme: light !important;
  background-color: #ffffff !important;
  color: #131B3D !important;
}
.apply-form-input:focus { box-shadow: 0 0 0 3px rgba(64, 83, 166, 0.15); }

.apply-form-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: applyFormSpin 0.8s linear infinite;
}
@keyframes applyFormSpin { to { transform: rotate(360deg); } }
.apply-form-error {
  display: none;
  color: #DC2626;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}
.apply-form-error.show { display: block; }


/* ===========================================================================
   ■ 7. モバイル固定 CTA バー
   =========================================================================== */
.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-sub1);
  box-shadow: 0 -6px 20px rgba(19, 27, 61, 0.08);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.mobile-sticky-cta.is-visible { transform: translateY(0); }
.mobile-sticky-cta a {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 6px 14px rgba(64, 83, 166, 0.35);
}
@media (min-width: 1024px) {
  .mobile-sticky-cta { display: none; }
}


/* ===========================================================================
   ■ 7.5. セクション遷移誘導 (下向き矢印・バウンス)
   料金 → 申込フォーム のスムーズな視線誘導
   =========================================================================== */
.scroll-arrow {
  display: inline-block;
  cursor: pointer;
}
.scroll-arrow span {
  animation: scroll-arrow-bounce 1.6s ease-in-out infinite;
  transition: background-color 0.25s ease;
}
@keyframes scroll-arrow-bounce {
  0%, 100%   { transform: translateY(0); }
  50%        { transform: translateY(8px); }
}
.scroll-arrow:hover span {
  animation-play-state: paused;
  transform: translateY(2px);
}
/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  .scroll-arrow span { animation: none; }
}


/* ===========================================================================
   ■ 8. ラインアイコン（SEC-5 3層構造カード）
   =========================================================================== */
.ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 14px;
  height: 14px;
}
.ico-m { width: 24px; height: 24px; }


/* ===========================================================================
   ■ 9. 実画面カルーセル（SEC-4：タブ・ドット）
   =========================================================================== */
.sc-tab {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 9999px;
  color: var(--color-sub2);
  background: var(--color-white);
  box-shadow: inset 0 0 0 1px var(--color-sub1);
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.sc-tab:hover { color: var(--color-accent); }
.sc-tab.is-active {
  color: #fff;
  background: var(--color-accent);
  box-shadow: none;
}
.sc-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--color-sub1);
  transition: width 0.25s ease, background-color 0.25s ease;
  cursor: pointer;
}
.sc-dot.is-active {
  width: 20px;
  background: var(--color-accent);
}


/* ===========================================================================
   ■ 10. 3層構造カードの結論バー（→ だから…）
   1 行を保ちつつ目立たせる: 極小画面では縮小し折り返しを防ぐ流体サイズ。
   =========================================================================== */
.layer-conclusion {
  font-size: clamp(11.5px, 3.4vw, 15px);
  line-height: 1.4;
}


/* ===========================================================================
   ■ 11. チャット打刻デモ（SEC-5：Slack / LINE 切替カルーセル）
   dakoku-chat-demo を LP に統合。ブランド色（Slack #4A154B / LINE #06C755）と
   ステータス緑はそのまま、グレー類はブランドパレットに寄せる。
   =========================================================================== */
.dk-demo { display: flex; flex-direction: column; align-items: center; }

/* 切替トグル */
.dk-toggle {
  display: inline-flex;
  background: var(--color-sub1-bg);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.dk-seg {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text-secondary);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 7px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dk-seg.is-active {
  background: var(--color-white);
  color: var(--color-text-primary);
  box-shadow: 0 2px 6px -2px rgba(19, 27, 61, 0.25);
}

/* カルーセル */
.dk-carousel { position: relative; width: 340px; max-width: 100%; overflow: hidden; }
.dk-track { display: flex; transition: transform 0.38s cubic-bezier(0.3, 0.8, 0.3, 1); }
.dk-slide { min-width: 100%; padding: 2px; }

/* 共通フレーム */
.dk-frame {
  width: 100%;
  background: var(--color-white);
  border: 1px solid #e6e8ee;
  border-radius: 20px;
  box-shadow: 0 16px 36px -22px rgba(19, 27, 61, 0.4);
  overflow: hidden;
  position: relative;
}
.dk-hdr {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-bottom: 1px solid #eef0f3;
  background: var(--color-white);
}
.dk-wsq {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.dk-hdr .dk-t { font-weight: 800; font-size: 13px; }
.dk-hdr .dk-s { font-size: 10px; color: var(--color-text-tertiary); }
.dk-pill { margin-left: auto; font-size: 10px; font-weight: 700; border-radius: 20px; padding: 3px 9px; }

.dk-msgs { padding: 13px; min-height: 250px; display: flex; flex-direction: column; gap: 12px; }
.dk-msg {
  display: flex; gap: 9px; align-items: flex-start;
  opacity: 0; transform: translateY(8px);
  animation: dkIn 0.4s ease forwards;
}
.dk-av {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dk-av svg { width: 16px; height: 16px; }
.dk-body { min-width: 0; flex: 1; }
.dk-nm { display: flex; align-items: center; gap: 6px; }
.dk-nm b { font-size: 12.5px; }
.dk-tag { font-size: 9px; font-weight: 700; color: var(--color-text-secondary); background: #eef0f3; border-radius: 3px; padding: 1px 5px; }
.dk-tm { font-size: 10px; color: #aab2bf; }
.dk-tx { font-size: 12.5px; color: #1f2937; line-height: 1.6; margin-top: 2px; }
.dk-acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.dk-btn {
  position: relative;
  font-size: 11.5px; font-weight: 700;
  border: 1px solid #d6dae1; background: #fff; color: #1f2937;
  border-radius: 8px; padding: 7px 11px; overflow: hidden;
}
.dk-btn .dk-dot2 {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #2EB67D; margin-right: 5px; vertical-align: 1px;
}
.dk-ripple { position: absolute; inset: 0; opacity: 0; }
.dk-ripple.is-go { animation: dkRip 0.6s ease; background: rgba(46, 182, 125, 0.28); }

/* Slack モーダル */
.dk-ov {
  position: absolute; inset: 0;
  background: rgba(19, 27, 61, 0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.dk-ov.is-show { opacity: 1; }
.dk-modal {
  width: 236px; background: #fff; border-radius: 16px; padding: 17px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.4);
  transform: scale(0.88); transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  text-align: center;
}
.dk-ov.is-show .dk-modal { transform: scale(1); }
.dk-modal .dk-mt { font-size: 13.5px; font-weight: 800; }
.dk-modal .dk-md { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 6px; }
.dk-modal .dk-big { font-size: 21px; font-weight: 800; color: var(--color-primary); margin-top: 2px; }
.dk-modal .dk-ma { display: flex; gap: 8px; margin-top: 14px; }
.dk-bp {
  flex: 1; position: relative; overflow: hidden;
  background: #2EB67D; color: #fff; font-weight: 800; font-size: 13px;
  border: 0; border-radius: 9px; padding: 10px;
}
.dk-bg2 {
  flex: 0 0 auto; background: #fff; color: var(--color-text-secondary);
  font-weight: 700; font-size: 12px; border: 1px solid #e2e5ea;
  border-radius: 9px; padding: 10px 13px;
}
.dk-confirm .dk-tx {
  background: #eafaf1; border: 1px solid #cdeede; border-radius: 10px;
  padding: 9px 11px; color: #137a4d; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.dk-confirm .dk-tx svg { width: 16px; height: 16px; flex-shrink: 0; }
.dk-inp { border-top: 1px solid #eef0f3; padding: 9px 12px; }
.dk-inp .dk-box { border: 1px solid #e2e5ea; border-radius: 10px; padding: 8px 11px; font-size: 12px; color: #aab2bf; }

/* LINE */
.dk-line .dk-msgs { background: #8aabd4; min-height: 206px; }
.dk-line .dk-av { background: #06C755; }
.dk-line .dk-bubble {
  background: #fff; border-radius: 4px 14px 14px 14px;
  padding: 9px 12px; font-size: 12.5px; color: #1f2937; line-height: 1.6;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); display: inline-block; max-width: 215px;
}
.dk-line .dk-ok { display: flex; align-items: center; gap: 7px; font-weight: 700; color: #137a4d; }
.dk-line .dk-ok svg { width: 16px; height: 16px; }
.dk-line .dk-subnote { font-size: 10.5px; color: var(--color-text-tertiary); margin-top: 3px; }
.dk-rich { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #d7dee6; background: #fff; }
.dk-tile { position: relative; padding: 11px 4px 9px; text-align: center; border-right: 1px solid #eef0f3; }
.dk-tile:last-child { border-right: 0; }
.dk-tile .dk-ic {
  width: 26px; height: 26px; border-radius: 8px; margin: 0 auto 5px;
  display: flex; align-items: center; justify-content: center;
  background: #eef0f3; color: var(--color-text-tertiary);
}
.dk-tile.is-go .dk-ic { background: #e4f7ee; color: #06C755; }
.dk-tile .dk-lb { font-size: 11px; font-weight: 700; color: #475569; }

/* LIFF 打刻シート */
.dk-shov {
  position: absolute; inset: 0; background: rgba(19, 27, 61, 0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.28s ease;
}
.dk-shov.is-show { opacity: 1; }
.dk-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 18px 18px 0 0; padding: 15px 15px 17px;
  box-shadow: 0 -12px 30px -10px rgba(0, 0, 0, 0.3);
  transform: translateY(105%); transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.25, 1); z-index: 3;
}
.dk-sheet.is-show { transform: translateY(0); }
.dk-sh-hd { display: flex; align-items: center; justify-content: space-between; }
.dk-sh-t { font-weight: 800; font-size: 13.5px; }
.dk-sh-time { font-size: 14px; font-weight: 800; color: #06934a; }
.dk-sh-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dk-sb { position: relative; overflow: hidden; border-radius: 11px; padding: 12px; font-size: 12.5px; font-weight: 800; text-align: center; }
.dk-sb.is-go { background: #06C755; color: #fff; }
.dk-sb.is-out { background: #fff; border: 1.5px solid #e2e5ea; color: #475569; }

/* 指タップ */
.dk-finger { position: absolute; width: 24px; height: 24px; opacity: 0; pointer-events: none; z-index: 5; }
.dk-finger.is-show { animation: dkTap 1s ease; }

.dk-plabel { font-size: 11px; color: var(--color-text-tertiary); margin-top: 10px; font-weight: 700; text-align: center; }

@keyframes dkIn { to { opacity: 1; transform: none; } }
@keyframes dkRip { 0% { opacity: 0.6; } 100% { opacity: 0; } }
@keyframes dkTap {
  0%   { opacity: 0; transform: translateY(6px); }
  30%  { opacity: 1; transform: translateY(0); }
  55%  { transform: translateY(-5px); }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dk-msg { animation: none; opacity: 1; transform: none; }
  .dk-finger.is-show { animation: none; }
}
