/* ========================================
   EC Reviver LP - カスタムスタイル
   Tailwind CSS CDN を補完するスタイル定義
   ======================================== */

/* --- ベーススタイル --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  color: #1a1a2e;
  overflow-x: hidden;
}

/* --- グラデーション系 --- */
.gradient-text {
  background: linear-gradient(135deg, #1E88E5 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bg {
  background: linear-gradient(135deg, #1E88E5 0%, #7C3AED 100%);
}

.gradient-bg-reverse {
  background: linear-gradient(135deg, #7C3AED 0%, #1E88E5 100%);
}

.gradient-bg-light {
  background: linear-gradient(135deg, rgba(30,136,229,0.04) 0%, rgba(124,58,237,0.04) 100%);
}

.gradient-border {
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #1E88E5, #7C3AED);
  z-index: -1;
}

/* --- CTAボタン --- */
.btn-cta {
  background: linear-gradient(135deg, #1E88E5 0%, #7C3AED 100%);
  color: white;
  padding: 16px 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  border: none;
  cursor: pointer;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta-white {
  background: white;
  color: #1E88E5;
  padding: 16px 40px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
}

.btn-cta-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* --- セクション共通 --- */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.section-subtitle {
  font-size: 1.125rem;
  text-align: center;
  color: #6b7280;
  margin-bottom: 3rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
}

/* --- ステップカード --- */
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E88E5, #7C3AED);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ステップ間の接続線（デスクトップ） */
.step-connector {
  position: relative;
}

.step-connector::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -24px;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #1E88E5, #7C3AED);
}

@media (max-width: 1023px) {
  .step-connector::after {
    display: none;
  }
}

/* --- カード共通 --- */
.card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* 数値ハイライト */
.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #1E88E5, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .stat-number {
    font-size: 2.25rem;
  }
}

/* --- フォールバック配信フロー --- */
.fallback-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fallback-item {
  background: white;
  border-radius: 12px;
  padding: 16px 24px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  min-width: 120px;
}

.fallback-arrow {
  color: #7C3AED;
  font-size: 1.5rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .fallback-flow {
    flex-direction: column;
  }
  .fallback-arrow {
    transform: rotate(90deg);
  }
}

/* --- FAQアコーディオン --- */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  color: #1a1a2e;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #1E88E5;
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

.faq-answer p {
  color: #6b7280;
  line-height: 1.8;
}

/* --- スクロールアニメーション --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 遅延付きアニメーション */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* --- ヘッダー --- */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- モバイルメニュー --- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 400px;
}

/* --- 管理画面スクショの装飾 --- */
.screenshot-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ブラウザフレーム風ヘッダー */
.browser-header {
  background: #f3f4f6;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* --- フォーム --- */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: #1E88E5;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 4px;
  display: none;
}

.form-input.error + .form-error-message,
.form-group.error .form-error-message {
  display: block;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9375rem;
}

.form-required {
  color: #ef4444;
  font-size: 0.75rem;
  margin-left: 4px;
}

/* --- ファネル図（CSS） --- */
.funnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.funnel-step {
  padding: 12px 24px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* --- チャネルバッジ --- */
.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* --- パルスアニメーション（CTA注目用） --- */
@keyframes pulse-shadow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 4px 30px rgba(124, 58, 237, 0.5);
  }
}

.btn-cta-pulse {
  animation: pulse-shadow 2s infinite;
}

/* --- 装飾的背景要素 --- */
.bg-decoration {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

/* --- チェックマークアニメーション（サンクスページ） --- */
@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.check-animation path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: check-draw 0.6s ease forwards 0.3s;
}

@keyframes check-circle {
  to {
    stroke-dashoffset: 0;
  }
}

.check-animation circle {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: check-circle 0.6s ease forwards;
}

/* ========================================
   SP版（モバイル）デザイン修正
   ======================================== */

/* --- SP: カード共通パディング縮小 --- */
@media (max-width: 640px) {
  .card {
    padding: 20px;
  }

  /* CTAボタンフル幅対応 */
  .btn-cta,
  .btn-cta-white {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 0.9375rem;
  }

  /* フォールバック配信フロー改善 */
  .fallback-item {
    min-width: auto;
    width: 100%;
    padding: 12px 16px;
  }

  /* FAQの回答テキストが長い場合のmax-height拡大 */
  .faq-item.active .faq-answer {
    max-height: 500px;
  }

  /* FAQ質問文のフォントサイズ調整 */
  .faq-question {
    font-size: 0.9375rem;
    padding: 16px 0;
  }

  /* オファーセクションのバッジサイズ縮小 */
  .offer-badge-sp {
    font-size: 0.9375rem !important;
    padding: 8px 16px !important;
  }

  /* セクションタイトルの行間調整 */
  .section-title {
    line-height: 1.6;
  }

  /* 導入事例カードのヘッダーフォント縮小 */
  .case-header-title {
    font-size: 1rem !important;
  }

  /* 最終CTAセクションのタイトルサイズ調整 */
  .final-cta-title {
    font-size: 1.375rem !important;
    line-height: 1.6;
  }

  /* 充実の機能：SP版アコーディオン */
  .feature-accordion-item {
    border: 1px solid #f3f4f6;
  }
  .feature-accordion-btn:active {
    background: #f9fafb;
  }
  .feature-chevron.open {
    transform: rotate(180deg);
  }
}
