/* ================================================================================
 * ファイル名: app/assets/stylesheets/landing_hero.css
 * 📊 リファクタリング基準（コメント行は行数カウントから除外）
 *   ✅ 500行未満: 完璧
 *   ✅ 800行未満: 問題なし
 *   ⚠️  1200行未満: 注意喚起・リファクタリング要検討
 *   🚨 1200行以上: リファクタリング必須
 * 現在のコード行数: 約230行（コメント除く） / 総行数 313行 → ✅ 完璧
 *
 * 🎯 作成日: 2026-03-20
 * 📝 目的: ランディングページ ヒーローセクション（ファーストビュー・引用句・CTA・統計数値）のCSS
 *
 * 【分離元】landing.css（Phase 1 セクション別分離 → 2026-05-03 配線完了）
 *
 * 【セクション構成】
 *   1. ヒーロー背景（グリッドパターン + 放射状グラデーション + ゴールドシマーライン）
 *   2. コンテンツ（バッジ・タイトル・グラデーションテキスト）
 *   3. ニュートン引用句セクション（quote → lead → message → closing）
 *   4. フェードインアニメーション（JSと連携）
 *   5. CTA（アクションボタン群）
 *   6. 統計数値（stat-value / stat-label）
 *
 * 【ジュニアエンジニア向け解説】
 *   - min-height: 100vh でファーストビュー全画面表示
 *   - clamp(2.5rem, 8vw, 4.5rem) はビューポート幅に応じたレスポンシブフォントサイズ
 *   - -webkit-background-clip: text でテキストにグラデーションを適用
 *   - mask-image: グラデーションで背景パターンの端をフェードアウト
 *
 * 【関連ファイル】
 *   - app/assets/stylesheets/landing.css（CSS変数・ベーススタイル・レスポンシブ）
 *   - app/views/landing/sections/_hero.html.erb
 *   - public/javascripts/landing_page.js
 *
 * 【変更履歴】
 *   2026-03-22: 日本語コメント追加（保守性向上）
 *   2026-05-03: hero 専用レスポンシブ（@media 768px / 480px）を本ファイル末尾に集約。
 *               以前は landing.css 共通レスポンシブブロック内に混在していたが、
 *               セクション固有スタイルは各分離ファイルに閉じ込める方針に統一
 *               （Phase 1+2 リファクタリング）
 * ================================================================================ */

/* ----------------------------------------
   ヒーローセクション
   ファーストビュー（100vh）。グリッドパターン背景・紫＋ゴールドの
   放射状グラデーション・ゴールドシマーライン・パーティクルアニメーション。
   バッジ（稼働状況ドット）・タイトル・CTA・統計数値を含む。
   ---------------------------------------- */
/* 2026-04-18: モバイル viewport 対応
   - min-height: 100vh → 100dvh に置換
   - ランディングページのヒーロー領域（ファーストビュー）を
     モバイルアドレスバー表示時も画面内に収めるため。
   - 注: コメント L24/L40 の「100vh」記載は docstring のため更新不要。 */
.landing-hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.landing-hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Subtle grid pattern */
.landing-hero__background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 70%);
}

.landing-hero__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(168, 85, 247, 0.15), transparent 60%),
    radial-gradient(ellipse 40% 30% at 70% 60%, rgba(212, 175, 55, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(99, 102, 241, 0.1), transparent 50%);
  animation: gradient-shift 15s ease-in-out infinite;
}

/* Gold shimmer line */
.landing-hero__gradient::after {
  content: '';
  position: absolute;
  top: 30%;
  left: -100%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0) 20%,
    rgba(212, 175, 55, 0.4) 50%,
    rgba(212, 175, 55, 0) 80%,
    transparent 100%);
  animation: shimmer-gold 8s ease-in-out infinite;
  transform: rotate(-5deg);
}

@keyframes shimmer-gold {
  0% { transform: translateX(-30%) rotate(-5deg); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translateX(30%) rotate(-5deg); opacity: 1; }
  60% { opacity: 0; }
  100% { transform: translateX(30%) rotate(-5deg); opacity: 0; }
}

.landing-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black, transparent);
}

.landing-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--landing-container-padding);
}

.landing-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--landing-card-bg);
  border: 1px solid var(--landing-card-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--landing-text-muted);
  margin-bottom: 32px;
}

.landing-hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--landing-positive);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.landing-hero__title {
  font-family: var(--landing-font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.landing-hero__title-gradient {
  background: linear-gradient(135deg, var(--landing-gradient-start), var(--landing-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----------------------------------------
   ニュートン引用句セクション（2026-01-11追加）
   ----------------------------------------
   【概要】ヒーローセクションのメインコンテンツ
   【構成】quote → lead → main_message → closing の4要素
   【アニメーション】フェードイン（1秒→3秒→5秒→8秒）
   【関連】app/views/landing/sections/_hero.html.erb
   ---------------------------------------- */

/* 引用句: ニュートンの名言
   - イタリック体で引用らしさを演出
   - 白色で視認性確保 */
.landing-hero__quote {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.6;
  font-style: italic;
}

/* 導入文: 引用句の現代的解釈
   - white-space: pre-line でYAMLの改行を維持
   - 引用句と同じフォントサイズで統一感 */
.landing-hero__lead {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.6;
  white-space: pre-line;
}

/* メインメッセージ: WeProcessの価値提案
   - グレー色で引用句との差別化
   - 小さめフォントで詳細説明感
   - 行間広めで読みやすさ確保 */
.landing-hero__message {
  font-size: 18px;
  color: #a0a0a0;
  margin-bottom: 40px;
  line-height: 1.8;
  white-space: pre-line;
}

/* 締めくくり: CTAへの誘導文
   - 太字で強調
   - CTAボタンとの余白を十分に確保（80px） */
.landing-hero__closing {
  font-size: 22px;
  color: var(--landing-text-primary);
  margin-bottom: 80px;
  line-height: 1.6;
  font-weight: 600;
}

/* ----------------------------------------
   フェードインアニメーション用クラス（2026-01-11追加）
   ----------------------------------------
   【仕組み】
   1. 初期状態: opacity: 0, translateY(20px) で非表示
   2. JSがtransitionを設定後、opacity: 1, translateY(0)に変更
   3. CSSトランジションで滑らかにフェードイン

   【注意】
   - min-height: 要素が非表示でもレイアウト崩れを防止
   - opacity: 0 は必須（JSでアニメーション開始時に1に変更）
   ---------------------------------------- */
.landing-hero__typing {
  opacity: 0;
  transform: translateY(20px);
  min-height: 1.5em;
}

/* 以下はレガシー互換性のため残存（現在未使用） */
.landing-hero__typing--active {
  text-align: left !important;
}

.landing-hero__typing--complete {
  text-align: center !important;
}

/* ----------------------------------------
 * セクション5: サブタイトル・CTA・統計数値
 * ---------------------------------------- */
.landing-hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--landing-text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

/* CTAボタン群: flexboxで中央寄せ横並び */
.landing-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
}

/* 統計数値: ユーザー数・プロジェクト数等の実績表示 */
.landing-hero__stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-hero__stat {
  text-align: center;
}

.landing-hero__stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--landing-text);
}

.landing-hero__stat-label {
  font-size: 0.85rem;
  color: var(--landing-text-muted);
}

/* ----------------------------------------
   レスポンシブ
   ---------------------------------------- */
@media (max-width: 768px) {
  .landing-hero__stats {
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .landing-hero__cta {
    flex-direction: column;
  }
}
