/* カスタムフォントの設定 */
body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* グラデーション背景 */
.hero-gradient {
    background: linear-gradient(135deg, #65558f 0%, #8b7ab8 100%);
    position: relative;
    /* 美しいグラデーション効果 */
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
}

/* グラデーションアニメーション */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.1"/><circle cx="40" cy="60" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="80" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="90" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-gradient > * {
    position: relative;
    z-index: 1;
}

/* スムーススクロール */
html {
    scroll-behavior: smooth;
}

/* ホバーエフェクトの改善 */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* カードスタイルの強化 */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

/* ボタンのアニメーション */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* セクション間の視覚的分離 */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2rem 0;
}

/* フォームスタイルの改善 */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* ナビゲーションの改善 */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #3b82f6;
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* モバイルメニューのアニメーション */
.mobile-menu {
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}

/* ステップインジケーターのスタイル */
.step-number {
    background: linear-gradient(135deg, #65558f 0%, #8b7ab8 100%);
    box-shadow: 0 4px 15px rgba(101, 85, 143, 0.4);
}

/* 成功メッセージのアニメーション */
.success-message {
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ローディング状態のスタイル */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

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

/* カスタムスクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* レスポンシブ対応の改善 */
@media (max-width: 768px) {
    .hero-gradient {
        padding: 3rem 0;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-4xl {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .text-5xl {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

@media (max-width: 480px) {
    .text-4xl {
        font-size: 1.75rem;
    }
    
    .text-5xl {
        font-size: 2rem;
    }
    
    .px-8 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* フォーカス可能な要素のアクセシビリティ向上 */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 印刷時のスタイル */
@media print {
    .hero-gradient {
        background: #65558f !important;
        color: white !important;
    }
    
    .shadow-lg,
    .shadow-xl {
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* パフォーマンス最適化 */
.transform {
    will-change: transform;
}

.transition-all {
    will-change: auto;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000 !important;
    }
    
    .text-gray-700 {
        color: #000000 !important;
    }
    
    .bg-gray-50 {
        background-color: #ffffff !important;
    }
}

/* 動きを減らす設定に対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ヘッダー用ロゴスタイル（背景白） */
.logo-header {
    display: block;
    max-width: 100%;
    height: auto;
    /* 高品質表示 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* ホバーエフェクト */
    transition: all 0.3s ease;
}

.logo-header:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* フッター用ロゴスタイル（背景黒） */
.logo-footer {
    display: block;
    max-width: 100%;
    height: auto;
    /* 高品質表示 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* ホバーエフェクト */
    transition: all 0.3s ease;
}

.logo-footer:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ヘッダーのスマホ版対応 */
@media (max-width: 767px) {
    header {
        /* スマホ版では常に白背景を維持 */
        background-color: white !important;
        color: inherit !important;
        /* ヘッダーの高さを確保 */
        min-height: 64px;
    }
    
    header .text-gray-700 {
        /* スマホ版でのリンク色も確実に維持 */
        color: #374151 !important;
    }
}

/* モバイルメニューのスタイル強化 */
#mobileMenu {
    /* 固定位置でヘッダー直下に表示 */
    position: fixed !important;
    top: 64px; /* ヘッダーの高さ分 */
    left: 0;
    right: 0;
    width: 100%;
    /* 確実に前面表示 */
    z-index: 9999 !important;
    /* ボーダーで区切り */
    border-top: 1px solid #e5e7eb;
}

/* ヘッダーナビゲーションの垂直配置調整 */
nav a {
    /* 全てのリンクの高さとライン高を統一 */
    line-height: 1.5;
    display: flex;
    align-items: center;
    min-height: 40px;
}

/* お問い合わせボタンの追加調整 */
nav a[href="#contact"] {
    /* ボタンスタイルの場合も同じ高さに */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ヒーロー画像のスタイル */
.hero-image {
    /* 美しい角丸 */
    border-radius: 24px;
    /* 高品質な表示 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* シャドウで立体感 */
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    /* PC版は450px幅に調整 */
    max-width: 450px;
    width: 100%;
    height: auto;
    /* アニメーション */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ホバーエフェクトの強化 */
.hero-image:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 
        0 35px 60px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ヒーローセクションの追加スタイル */
.hero-gradient {
    position: relative;
    overflow: hidden;
}

/* ヒーローセクション内のテキスト調整 */
.hero-gradient h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-gradient p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* タブレット用の調整 */
@media (max-width: 1024px) {
    .hero-image {
        /* タブレットサイズでは300px */
        max-width: 300px;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .logo-header,
    .logo-footer {
        /* モバイルでは若干小さめに */
        max-height: 32px;
    }
    
    .hero-image {
        /* モバイルでは250px程度に */
        max-width: 250px;
        border-radius: 16px;
        /* 中央配置 */
        margin: 0 auto;
    }
    
    /* モバイルでは画像を上に配置 */
    .hero-gradient .grid {
        grid-template-rows: auto auto;
    }
    
    .hero-gradient .grid > div:last-child {
        order: -1;
        margin-bottom: 2rem;
    }
}

/* より小さな画面用 */
@media (max-width: 480px) {
    .hero-image {
        /* 小さなモバイルでは200px */
        max-width: 200px;
    }
}

/* 課題提起セクションのスタイル */
.challenge-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.challenge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 課題イラストのスタイル */
.challenge-illustration {
    max-width: 450px;
    width: 100%;
    height: auto;
    /* 高品質な表示 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* アニメーション */
    transition: all 0.3s ease;
}

.challenge-illustration:hover {
    transform: scale(1.02);
}

/* 解決策セクションのスタイル */
.solution-section {
    background: linear-gradient(135deg, rgba(232, 222, 248, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
    position: relative;
}

/* セパレーターラインのアニメーション */
.separator-line {
    background: linear-gradient(90deg, transparent, #65558f, transparent);
    animation: pulse 2s infinite;
}

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

/* CTAボタンのリップル効果 */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* 課題提起セクションのレスポンシブ調整 */
@media (max-width: 1023px) {
    .challenge-illustration {
        /* タブレット以下では小さめに */
        max-width: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .challenge-illustration {
        /* モバイルではさらに小さく */
        max-width: 280px;
    }
    
    /* モバイルでは画像を上部に配置 */
    .challenge-section .grid > div:first-child {
        order: -1;
        margin-bottom: 2rem;
    }
}

/* 大画面用の調整 */
@media (min-width: 1920px) {
    .hero-gradient .container {
        /* 1920px以上ではコンテナ幅を制限 */
        max-width: 1400px;
    }
    
    .hero-gradient .grid {
        /* より適切な間隔に調整 */
        gap: 3rem;
    }
}

/* ダークテーマ対応（SVGロゴ） */
@media (prefers-color-scheme: dark) {
    .logo-svg {
        /* SVGロゴは通常そのまま表示で問題なし */
        filter: none;
    }
    
    /* 必要に応じてダークモード用の色調整 */
    .logo-svg-dark-mode {
        filter: brightness(1.2) contrast(0.9);
    }
}