/* --- デザインシステム定義 --- */
:root {
    /* カラーパレット */
    --primary: #0F172A;   /* 信頼のダークネイビー */
    --secondary: #3B82F6; /* 革新のテックブルー */
    --accent: #0EA5E9;    /* 明るいアクセント */
    --text-main: #334155;
    --text-light: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    
    /* グラデーション */
    --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
    
    /* シャドウ */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- 基本リセット --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- 共通クラス --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ボタンデザイン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: 2px solid var(--secondary);
}
.btn-primary:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}
.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}
.btn-outline:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* セクション見出し */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}
.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* --- アニメーション --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-up.visible {
    margin: 0 auto;
    opacity: 1;
    transform: translateY(0);
}

/* --- ヘッダー --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i { color: var(--secondary); }

/* --- 1. ファーストビュー --- */
.hero {
    padding-top: 140px;
    padding-bottom: 100px;
    background: radial-gradient(circle at top right, #EFF6FF, #FFFFFF);
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-label {
    display: inline-block;
    background: #DBEAFE;
    color: var(--secondary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.hero-text h1 {
    font-size: 1.78rem;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 24px;
    color: var(--primary);
}
.hero-text p {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 40px;
}
.hero-actions {
    display: flex;
    gap: 16px;
}

/* CSSで描くチャットUIモックアップ（画像より軽量で綺麗） */
.ui-mockup-container {
    position: relative;
    perspective: 1000px;
}
.chat-ui {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-float);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(2deg);
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px) rotateY(-5deg); }
    50% { transform: translateY(-15px) rotateY(-5deg); }
    100% { transform: translateY(0px) rotateY(-5deg); }
}
.chat-header {
    background: #F8FAFC;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #10B981; }

.chat-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.msg-user {
    align-self: flex-end;
    background: var(--secondary);
    color: white;
    border-bottom-right-radius: 2px;
}
.msg-ai {
    align-self: flex-start;
    background: #F1F5F9;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    border: 1px solid #E2E8F0;
}
.rag-source {
    margin-top: 8px;
    background: white;
    border: 1px solid #CBD5E1;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- 2. 課題セクション --- */
section { padding: 100px 0; }
.bg-gray { background: var(--bg-light); }

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}
.problem-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: transform 0.3s;
}
.problem-card:hover { transform: translateY(-5px); }
.problem-img-area {
    height: 160px;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #94a3b8;
}
.problem-card h3 { font-size: 1.25rem; margin-bottom: 12px; }

/* --- 3. 解決策 --- */
.solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.solution-text h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 24px;
}
.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}
.check-list i { color: var(--secondary); font-size: 1.2rem; }

/* --- 4. ユースケース --- */
.usecase-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
}
.usecase-block:last-child { margin-bottom: 0; }
.usecase-block.reverse { direction: rtl; }
.usecase-block.reverse .usecase-text { direction: ltr; }

.usecase-img img {
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}
.usecase-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 12px;
}
.usecase-text h3 { font-size: 1.75rem; margin-bottom: 16px; }

/* --- 5. RAG コア価値 --- */
.section-dark {
    background: var(--primary);
    color: white;
    text-align: center;
}
.section-dark h2 {
    color: white;
    -webkit-text-fill-color: white; /* グラデーション打ち消し */
}
.rag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 48px;
}
.rag-item i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 24px;
}
.rag-item p { color: #94a3b8; }

/* --- 6. メリット & 7. 比較 --- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}
.benefit-item {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 16px;
}
.benefit-item i { color: var(--secondary); font-size: 1.5rem; margin-top: 4px; }

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.compare-table th, .compare-table td {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}
.compare-table th { background: #f1f5f9; font-weight: 700; }
.col-competitor { color: var(--text-light); }
.col-highlight { background: #eff6ff; color: var(--secondary); font-weight: 700; font-size: 1.1rem; }

/* --- 8. ステップ --- */
.step-container {
    display: flex;
    justify-content: space-between;
    position: relative;
}
.step-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}
.step-item {
    position: relative;
    z-index: 1;
    background: white;
    padding: 0 20px;
    text-align: center;
    flex: 1;
}
.step-num {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 16px;
    border: 4px solid white;
}

/* --- 9. 最終CTA (Bridge) --- */
.cta-bridge {
    background: var(--gradient-hero);
    color: white;
    text-align: center;
    padding: 80px 0;
}
.cta-bridge h2 { font-size: 2.5rem; margin-bottom: 24px; font-weight: 800; }

/* --- 10. 問い合わせフォーム --- */
.form-section { background: var(--bg-light); padding-top: 60px; }
.form-container {
    max-width: 800px;
    margin: -120px auto 0; /* CTAにかぶせる */
    background: white;
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-float);
    position: relative;
    z-index: 10;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full { grid-column: 1 / -1; }

label { font-weight: 700; font-size: 0.9rem; }
input, select {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    background: #f8fafc;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
}
.form-note {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- 新しいお問い合わせフォーム --- */
.contact-form-section {
    background: var(--bg-light);
    padding: 100px 0;
}

.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form-header {
    text-align: center;
    margin-bottom: 48px;
}

.contact-form-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-form-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.contact-form-container {
    background: white;
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-float);
}

.contact-form-container form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 32px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-light);
}

.form-section-title:first-of-type {
    margin-top: 0;
}

.contact-form-container .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.contact-form-container label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.contact-form-container input,
.contact-form-container select {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.contact-form-container input:focus,
.contact-form-container select:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.required {
    color: #ef4444;
    margin-left: 4px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.radio-option:hover {
    border-color: var(--secondary);
    background: #eff6ff;
}

.radio-option.checked {
    border-color: var(--secondary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    width: auto;
    cursor: pointer;
}

.radio-option span {
    flex: 1;
    font-weight: 500;
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

.form-submit .btn {
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    font-size: 1.1rem;
}

.success-message {
    background: white;
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-float);
    text-align: center;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.success-message h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.success-message p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 32px;
    line-height: 1.8;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: #475569;
    border-color: #475569;
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

/* Footer */
footer {
    background: #0F172A;
    color: #94A3B8;
    padding: 60px 0;
    text-align: center;
    font-size: 0.9rem;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}
.footer-links a:hover { color: white; text-decoration: underline; }

/* --- 動画デモモーダル --- */
.demo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.demo-modal.active {
    display: flex;
}

.demo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.demo-modal-container {
    position: relative;
    z-index: 10001;
    width: 100%;
    max-width: 1200px;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Window Frame Styles */
.window-frame {
    background: rgba(15, 23, 42, 0.8); /* slate-900/80 */
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(51, 65, 85, 0.7); /* slate-700 */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.window-header {
    margin-bottom: 0.75rem;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.2s;
}

.window-control:hover {
    opacity: 0.8;
}

.window-control-close {
    background-color: #ef4444; /* red-500 */
}

.window-control-minimize {
    background-color: #eab308; /* yellow-500 */
}

.window-control-maximize {
    background-color: #22c55e; /* green-500 */
}

.window-content {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #1e293b; /* slate-800 */
    border-radius: 0.5rem;
    overflow: hidden;
}

.window-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 動画プレビューのレスポンシブ対応 */
.mobile-video {
    display: none;
}

.desktop-video {
    display: block;
}

/* SP専用の改行 */
.sp-only {
    display: none;
}

/* レスポンシブ */
@media (max-width: 768px) {
    /* SP専用の改行を表示 */
    .sp-only {
        display: inline;
    }
    
    /* ヘッダーのモバイル対応 */
    header {
        padding: 8px 0;
    }
    
    .header-inner {
        gap: 8px;
    }
    
    .logo {
        font-size: 1rem;
        gap: 6px;
    }
    
    .logo i {
        font-size: 1.2rem;
    }
    
    header .btn {
        padding: 4px 10px !important;
        font-size: 0.58rem !important;
        border-radius: 6px;
    }
    
    /* 共通のセクション見出しとテキストサイズ調整 */
    .section-header h2 {
        font-size: 1.37rem;
        margin-bottom: 12px;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    /* ボタンサイズの調整 */
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    /* 課題セクションの調整 */
    .problem-card h3 {
        font-size: 1.1rem;
    }
    
    .problem-card p {
        font-size: 0.9rem;
    }
    
    /* 解決策セクションの調整 */
    .solution-text h2 {
        font-size: 1.6rem;
        margin-bottom: 16px;
    }
    
    .solution-text p {
        font-size: 0.9rem;
    }
    
    .check-list li {
        font-size: 0.9rem;
    }
    
    /* ユースケースセクションの調整 */
    .usecase-text h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .usecase-text p {
        font-size: 0.9rem;
    }
    
    .usecase-label {
        font-size: 0.75rem;
    }
    
    /* RAGセクションの調整 */
    .rag-item h4 {
        font-size: 1.1rem;
    }
    
    .rag-item p {
        font-size: 0.85rem;
    }
    
    .rag-item i {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }
    
    /* メリットセクションの調整 */
    .benefit-item h4 {
        font-size: 1rem;
    }
    
    .benefit-item p {
        font-size: 0.85rem;
    }
    
    /* 比較テーブルの調整 */
    .compare-table th,
    .compare-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .col-highlight {
        font-size: 0.95rem;
    }
    
    /* ステップセクションの調整 */
    .step-item h4 {
        font-size: 1.1rem;
    }
    
    .step-item p {
        font-size: 0.85rem;
    }
    
    .step-num {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* CTAセクションの調整 */
    .cta-bridge h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .hero-grid, .solution-grid, .usecase-block, .rag-grid, .benefits-grid, .form-grid {
        grid-template-columns: 1fr;
    }
    .usecase-block.reverse { direction: ltr; }
    .hero { padding-top: 50px; padding-bottom: 60px; text-align: center; }
    .hero-actions { justify-content: center; flex-wrap: wrap; }
    .step-container { flex-direction: column; gap: 30px; }
    .step-container::before { display: none; }
    .form-container { margin-top: 0; padding: 24px; }
    .ui-mockup-container { margin-top: 40px; transform: none; }
    .chat-ui { transform: none; animation: none; }
    
    /* 動画プレビューの表示切り替え */
    .desktop-video {
        display: none;
    }
    
    .mobile-video {
        display: block;
    }
    .demo-modal-container {
        padding: 10px;
    }
    
    /* お問い合わせフォームのレスポンシブ */
    .contact-form-section {
        padding: 60px 0;
    }
    
    .contact-form-header h2 {
        font-size: 1.5rem;
    }
    
    .contact-form-header p {
        font-size: 0.9rem;
    }
    
    .contact-form-container {
        padding: 24px;
    }
    
    .contact-form-container .form-group {
        margin-bottom: 20px;
    }
    
    .form-section-title {
        font-size: 1.15rem;
        margin-top: 24px;
        margin-bottom: 20px;
    }
    
    .contact-form-container label {
        font-size: 0.85rem;
    }
    
    .contact-form-container input,
    .contact-form-container select {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .form-submit .btn {
        max-width: 100%;
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .success-message {
        padding: 32px 24px;
    }
    
    .success-message h3 {
        font-size: 1.3rem;
    }
    
    .success-message p {
        font-size: 0.9rem;
    }
    
    /* セクションのパディング調整 */
    section {
        padding: 60px 0;
    }
}

