/**
 * 財務の右腕 - カスタムスタイルシート
 * 120点のデザインを実現するための追加スタイル
 */

/* ========================================
   1. グローバルスタイル
   ======================================== */
:root {
    --primary: #1e3a8a;
    --primary-light: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --secondary-light: #fbbf24;
    --secondary-dark: #d97706;
    --accent: #ef4444;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ========================================
   2. ヒーローセクション強化
   ======================================== */
.hero-bg {
    background-image: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%), 
                      url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ロゴボックスの洗練 */
.logo-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(251, 191, 36, 0.2) inset;
    transition: all 0.3s ease;
}

.logo-box:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.8);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4),
                0 0 50px rgba(251, 191, 36, 0.3) inset;
}

/* ========================================
   3. グラデーションテキスト
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   4. カード効果の強化
   ======================================== */
.card-premium {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    transition: left 0.6s ease;
}

.card-premium:hover::before {
    left: 100%;
}

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(251, 191, 36, 0.2);
}

/* ========================================
   5. ボタンスタイルの強化
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3),
                0 0 0 1px rgba(251, 191, 36, 0.5) inset;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4),
                0 0 0 2px rgba(251, 191, 36, 0.6) inset;
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

/* ========================================
   6. セクション区切りの強化
   ======================================== */
.section-divider {
    position: relative;
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 6px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
    border-radius: 3px;
}

/* ========================================
   7. 統計カードの強化
   ======================================== */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========================================
   8. テキスト装飾の強化
   ======================================== */
.text-highlight {
    position: relative;
    display: inline-block;
    padding: 0 8px;
}

.text-highlight::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(90deg, #fef3c7, #fde68a, #fef3c7);
    opacity: 0.6;
    z-index: -1;
    transform: skewY(-2deg);
}

/* ========================================
   9. フォーム強化
   ======================================== */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1),
                0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   10. アニメーション
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.6s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ========================================
   11. スクロールアニメーション
   ======================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   12. ヘッダースクロール効果
   ======================================== */
header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* ========================================
   13. レスポンシブユーティリティ
   ======================================== */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }
    
    .section-divider {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* ========================================
   14. アクセシビリティ
   ======================================== */
.focus-visible:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 4px;
}

/* ========================================
   15. プリント最適化
   ======================================== */
@media print {
    .hero-bg {
        background: white;
        color: black;
    }
    
    header, footer {
        display: none;
    }
}

/* ========================================
   16. パフォーマンス最適化
   ======================================== */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

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

::-webkit-scrollbar-track {
    background: var(--gray-50);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border-radius: 6px;
    border: 2px solid var(--gray-50);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

/* ========================================
   18. 選択テキストのスタイル
   ======================================== */
::selection {
    background-color: #fef3c7;
    color: var(--dark);
}

::-moz-selection {
    background-color: #fef3c7;
    color: var(--dark);
}

.md\:grid-cols-2{
    grid-template-columns: repeat(1, minmax(0, 1fr))!important;
}

#errorMessage {
    display: none;
}

#errorMessage.show {
    display: block;
}

#successMessage {
    display: none;
}
#successMessage.show {
    display: block;
}