/**
 * home.css - ちょこシェアMAP ホームページスタイル
 * 
 * セクション構成:
 * 1. CSS変数
 * 2. 基本設定
 * 3. ヒーローセクション
 * 4. セクションタイトル装飾
 * 5. 特徴カード
 * 6. 使い方ステップ
 * 7. FAQアコーディオン
 * 8. 統計セクション
 * 9. CTAセクション
 * 10. 動画リンクセクション
 * 11. アニメーション
 * 12. レスポンシブ
 */

/* =============================================================================
   1. CSS変数
   ============================================================================= */

:root {
    /* テキストカラー */
    --text-primary: #1a202c;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* ブランドグラデーション */
    --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-hero-text: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* 背景 */
    --bg-section: #f8fafb;
    --bg-card: #ffffff;
    --border-light: #e5e7eb;
    
    /* 特徴カードカラー */
    --feature-blue: #0ea5e9;
    --feature-pink: #ec4899;
    --feature-yellow: #f59e0b;
    --feature-green: #22c55e;
    --feature-purple: #a855f7;
    --feature-indigo: #6366f1;
}


/* =============================================================================
   2. 基本設定
   ============================================================================= */

body {
    background: var(--bg-card);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


/* =============================================================================
   3. ヒーローセクション
   ============================================================================= */

.hero-section {
    background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-card) 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 179, 237, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(134, 239, 172, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.2;
}

/* サファイア（青い宝石）のグラデーション */
.hero-title-gradient {
    background: linear-gradient(
        135deg,
        #1e3a8a 0%,
        #2563eb 20%,
        #60a5fa 40%,
        #93c5fd 50%,
        #60a5fa 60%,
        #2563eb 80%,
        #1e40af 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3))
            drop-shadow(0 0 15px rgba(96, 165, 250, 0.2));
    background-size: 200% 200%;
    animation: gemShineSubtle 24s ease-in-out infinite;
    position: relative;
}

/* 端で10秒待機するアニメーション */
@keyframes gemShineSubtle {
    0%, 42% {
        background-position: 0% 50%;
    }
    50%, 92% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-image {
    position: relative;
    margin-top: 40px;
}

.hero-illustration {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

.phone-mockup {
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 200px;
    height: auto;
    transform: rotate(-5deg);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.15));
}


/* =============================================================================
   4. セクションタイトル装飾
   ============================================================================= */

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    width: 100%;
    z-index: 1;
}

/* カラフルな円の装飾 */
.section-title::before,
.section-title::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

.section-title::before {
    width: 120px;
    height: 120px;
    top: -30px;
    left: 50%;
    margin-left: -120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation-delay: 0s;
}

.section-title::after {
    width: 80px;
    height: 80px;
    top: -10px;
    left: 50%;
    margin-left: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation-delay: 2s;
}

/* 各セクション固有の円カラー */
.about-section .section-title::before {
    background: linear-gradient(135deg, #ffc107 0%, #4c40fe 100%);
}
.about-section .section-title::after {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.how-to-section .section-title::before {
    background: linear-gradient(135deg, #0d6efd 0%, #ff79a4 100%);
}
.how-to-section .section-title::after {
    background: linear-gradient(135deg, #ff9a9e 0%, #ffe3f6 100%);
}

.faq-section .section-title::before {
    background: linear-gradient(135deg, #ff4556 0%, #1eb8d7 100%);
}
.faq-section .section-title::after {
    background: linear-gradient(135deg, #ff6bf8 0%, #c2e9fb 100%);
}

.stats-section .section-title::before {
    background: linear-gradient(135deg, #cfd9df 0%, #e2ebf0 100%);
}
.stats-section .section-title::after {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
    max-width: 596px;
    margin-left: auto;
    margin-right: auto;
}


/* =============================================================================
   5. 特徴カード
   ============================================================================= */

.about-section {
    padding: 80px 0;
    background: var(--bg-card);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e0e7ff 0%, #f0f4f8 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    background: var(--bg-section);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4f8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, #ddd6fe 0%, #e0e7ff 100%);
    transform: scale(1.05);
}

.feature-icon i {
    color: var(--feature-indigo);
    font-size: 24px;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-icon i {
    color: #4f46e5;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-title {
    color: #0f172a;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-description {
    color: #475569;
}

/* 各カードの個別カラー */
.feature-card:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
}
.feature-card:nth-child(1) .feature-icon i { color: var(--feature-blue); }
.feature-card:nth-child(1):hover .feature-icon {
    background: linear-gradient(135deg, #bae6fd 0%, #e0f2fe 100%);
}

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #fce7f3 0%, #fdf2f8 100%);
}
.feature-card:nth-child(2) .feature-icon i { color: var(--feature-pink); }
.feature-card:nth-child(2):hover .feature-icon {
    background: linear-gradient(135deg, #fbcfe8 0%, #fce7f3 100%);
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}
.feature-card:nth-child(3) .feature-icon i { color: var(--feature-yellow); }
.feature-card:nth-child(3):hover .feature-icon {
    background: linear-gradient(135deg, #fde68a 0%, #fef3c7 100%);
}

.feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
}
.feature-card:nth-child(4) .feature-icon i { color: var(--feature-green); }
.feature-card:nth-child(4):hover .feature-icon {
    background: linear-gradient(135deg, #bbf7d0 0%, #dcfce7 100%);
}

.feature-card:nth-child(5) .feature-icon {
    background: linear-gradient(135deg, #e9d5ff 0%, #f3e8ff 100%);
}
.feature-card:nth-child(5) .feature-icon i { color: var(--feature-purple); }
.feature-card:nth-child(5):hover .feature-icon {
    background: linear-gradient(135deg, #d8b4fe 0%, #e9d5ff 100%);
}

.feature-card:nth-child(6) .feature-icon {
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
}
.feature-card:nth-child(6) .feature-icon i { color: var(--feature-indigo); }
.feature-card:nth-child(6):hover .feature-icon {
    background: linear-gradient(135deg, #c7d2fe 0%, #e0e7ff 100%);
}


/* =============================================================================
   6. 使い方ステップ
   ============================================================================= */

.how-to-section {
    padding: 80px 0;
    background: var(--bg-section);
    position: relative;
    overflow: hidden;
}

.step-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-right: 24px;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 24px;
    top: 48px;
    width: 1px;
    height: calc(100% + 20px);
    background: linear-gradient(180deg, #3b82f6 0%, transparent 100%);
    opacity: 0.3;
}


/* =============================================================================
   7. FAQアコーディオン
   ============================================================================= */

.faq-section {
    padding: 50px 0;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.faq-question {
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-section);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.faq-icon {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

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

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

.faq-item.active .faq-answer {
    padding: 0 24px 24px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}


/* =============================================================================
   8. 統計セクション
   ============================================================================= */

.stats-section {
    padding: 80px 0;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.stats-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 80px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    grid-template-columns: unset !important;
}

.stat-item {
    text-align: center;
    position: relative;
    flex: 0 0 auto;
    min-width: 200px;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, transparent, var(--border-light), transparent);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #52e6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: block;
}

/* クラウドファンディングお願いバナー */
.support-banner {
    margin-top: 40px;
    padding-top: 33px;
}

.support-banner p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.support-banner i.fa-heart {
    color: #f472b6;
    font-size: 0.85rem;
}

.support-banner a {
    color: #f59e0b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.support-banner a:hover {
    color: #d97706;
    text-decoration: underline;
}

.support-banner a i {
    font-size: 0.7rem;
}


/* =============================================================================
   9. CTAセクション
   ============================================================================= */

.cta-section {
    background: var(--bg-card);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card {
    background: linear-gradient(135deg, var(--bg-section) 0%, var(--bg-card) 100%);
    border-radius: 24px;
    padding: 60px 40px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-light);
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.cta-description {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-brand);
    color: #ffffff;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

.duration-select {
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    width: 100%;
    max-width: 266px;
    transition: border-color 0.3s ease;
}

.duration-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* メンテナンス時の停止表示 */
.maintenance-box {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 24px;
    border: 1px dashed var(--text-muted);
}

.maintenance-box p {
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
}


/* =============================================================================
   10. 動画リンクセクション
   ============================================================================= */

.video-link-section {
    padding: 40px 0;
    text-align: center;
    margin-top: -6rem;
}

.video-link-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.video-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444 0%, #fbbf24 100%);
    border-radius: 50%;
    margin-bottom: 20px;
}

.video-link-icon i {
    color: #ffffff;
    font-size: 24px;
    margin-left: 3px;
}

.video-link-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.video-link-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.video-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #fbbf24 100%);
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.video-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    color: #ffffff;
}

.video-link-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
    margin-bottom: 0;
}


/* =============================================================================
   11. アニメーション
   ============================================================================= */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}


/* =============================================================================
   12. レスポンシブ
   ============================================================================= */

/* タブレット (768px以下) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-title::before {
        width: 80px;
        height: 80px;
        margin-left: -80px;
        top: -20px;
    }
    
    .section-title::after {
        width: 60px;
        height: 60px;
        margin-left: 20px;
    }
    
    .phone-mockup {
        width: 150px;
        right: -20px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        flex-direction: row !important;
        gap: 30px;
        padding: 0 15px;
    }
    
    .stat-item {
        min-width: auto;
        flex: 1;
    }
    
    .stat-item:not(:last-child)::after {
        right: -15px;
        height: 40px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* スマホ (480px以下) */
@media (max-width: 480px) {
    .section-title::before {
        width: 60px;
        height: 60px;
        margin-left: -60px;
        top: -15px;
    }
    
    .section-title::after {
        width: 45px;
        height: 45px;
        margin-left: 20px;
        top: -10px;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .stats-grid {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-item:not(:last-child)::after {
        right: -10px;
    }
}

/* 小型スマホ (374px以下) */
@media (max-width: 374px) {
    .stats-grid {
        gap: 15px;
        padding: 0 10px;
    }
    
    .stat-item {
        min-width: 0;
        flex: 1 1 50%;
    }
    
    .stat-number {
        font-size: 3rem;
        white-space: nowrap;
    }
    
    .stat-label {
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    .stat-item:not(:last-child)::after {
        right: -8px;
        height: 35px;
    }
}

/* 極小画面 (320px以下) */
@media (max-width: 320px) {
    .stats-section {
        padding: 60px 0;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0;
    }
    
    .stat-item:not(:last-child)::after {
        display: none;
    }
}