@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');

* {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 背景色が明示的に指定されている要素は背景色のトランジションを除外 */
.bg-black,
.bg-white {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

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

.hero-gradient { 
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%), 
                 url('https://images.unsplash.com/photo-1446776653964-20c1d3a81b06?auto=format&fit=crop&q=80&w=2072'); 
    background-size: cover; 
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
}

/* 黒背景のカード用のホバースタイル - 背景色を保持 */
.glass-card.bg-black {
    background: #000000 !important;
}

.glass-card.bg-black:hover {
    background: #000000 !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* 白背景のカード用のホバースタイル - 背景色を保持 */
.glass-card.bg-white {
    background: #ffffff !important;
}

.glass-card.bg-white:hover {
    background: #ffffff !important;
}

.gradient-border {
    position: relative;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid transparent;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.glow-effect {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.2);
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-hover {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* 背景色を保持するためのスタイル - 背景色のトランジションを除外 */
.card-hover.bg-black,
.card-hover.bg-black:hover {
    background-color: #000000 !important;
}

.card-hover.bg-white,
.card-hover.bg-white:hover {
    background-color: #ffffff !important;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.6); }
}

/* パララックス効果用スタイル */
.parallax-section,
.parallax-slow,
.parallax-medium,
.parallax-fast {
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.parallax-section {
    position: relative;
}

/* スクロールアニメーション用スタイル */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 遅延アニメーション */
.fade-in-up.delay-100 {
    transition-delay: 0.1s;
}

.fade-in-up.delay-200 {
    transition-delay: 0.2s;
}

.fade-in-up.delay-300 {
    transition-delay: 0.3s;
}

.fade-in-up.delay-400 {
    transition-delay: 0.4s;
}

/* ============================================
   デザインの洗練：マイクロインタラクション
   ============================================ */

/* ボタンのリップルエフェクト */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

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

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
}

/* テキストのホバーアニメーション */
.text-hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.text-hover-lift:hover {
    transform: translateY(-2px);
}

/* カードのインタラクティブな反応 */
.card-interactive {
    position: relative;
    overflow: hidden;
}

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

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

/* ボタンのスケールアニメーション */
.btn-scale {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-scale:active {
    transform: scale(0.95);
}

/* ============================================
   グラデーションアニメーション
   ============================================ */

/* 背景グラデーションのアニメーション */
.gradient-animated {
    background: linear-gradient(-45deg, #1a1a1a, #2d2d2d, #1a1a1a, #0a0a0a);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* テキストグラデーションのアニメーション */
.text-gradient-animated {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706, #f59e0b, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-gradient-shift 3s linear infinite;
}

@keyframes text-gradient-shift {
    to { background-position: 200% center; }
}

/* ボーダーグラデーションのアニメーション */
.border-gradient-animated {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.border-gradient-animated::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706, #f59e0b, #fbbf24);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: border-gradient-shift 3s linear infinite;
}

@keyframes border-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   ホバーエフェクトの統一
   ============================================ */

/* 統一されたホバーエフェクト */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ホバー時のグローエフェクト */
.hover-glow {
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4),
                0 0 40px rgba(212, 175, 55, 0.2);
}

/* ホバー時の色変化 */
.hover-color-shift {
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-color-shift:hover {
    color: #fbbf24;
}

/* ホバー時のボーダー強調 */
.hover-border-emphasis {
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-border-emphasis:hover {
    border-color: #fbbf24;
    border-width: 2px;
}

/* ============================================
   レスポンシブの細部調整
   ============================================ */

/* モバイルでの最適化 */
@media (max-width: 640px) {
    /* タッチターゲットの最小サイズ確保 */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* モバイルでのフォントサイズ調整 */
    .text-responsive {
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }
    
    /* モバイルでの余白調整 */
    .mobile-spacing {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* モバイルでのカード調整 */
    .glass-card {
        padding: 1rem;
    }
}

/* タブレットでの最適化 */
@media (min-width: 641px) and (max-width: 1024px) {
    /* タブレットでのグリッド調整 */
    .tablet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* タブレットでのフォントサイズ調整 */
    .text-responsive {
        font-size: clamp(1rem, 2vw, 1.25rem);
    }
}

/* 大画面での最適化 */
@media (min-width: 1280px) {
    /* 大画面での最大幅制限 */
    .container-xl {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    /* 大画面での余白調整 */
    .desktop-spacing {
        padding: 3rem;
    }
}

/* 高解像度ディスプレイでの最適化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 高解像度でのシャープな表示 */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 横画面での最適化 */
@media (orientation: landscape) and (max-height: 600px) {
    /* 横画面での高さ調整 */
    .hero-gradient {
        min-height: 100vh;
        padding: 2rem 0;
    }
}

/* プリント時の最適化 */
@media print {
    /* プリント時の背景色と影の削除 */
    .glass-card,
    .card-hover {
        box-shadow: none;
        background: white;
        border: 1px solid #ccc;
    }
    
    /* プリント時のアニメーション無効化 */
    * {
        animation: none !important;
        transition: none !important;
    }
}
