/* マルニシ風デザイン - カスタムスタイル */

/* カラーパレット */
:root {
  --brand-primary: #00b1a0;
  --brand-secondary: #008c7e;
  --brand-gray: #737a80;
  --brand-light-gray: rgba(115, 122, 128, 0.1);
  --brand-dark: #2d3748;
  --poppins: "Poppins", sans-serif;
  --noto-sans: "Noto Sans JP", sans-serif;
}

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

/* ナビゲーション固定時の背景ぼかし効果 */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
}

/* プロミネントバッジのスタイル強化 */
.hero-badge span,
#philosophy .text-center:first-child span,
.brand-badge {
    position: relative;
    letter-spacing: 0.15em;
    font-weight: 800;
    text-transform: uppercase;
    animation: subtlePulse 3s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0, 177, 160, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 25px rgba(0, 177, 160, 0.2);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* スクロールアニメーション */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animate {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-left.animate {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-right.animate {
    animation: fadeInRight 0.8s ease-out forwards;
}

/* マルニシスタイルのホバー効果 */
.marunishi-style {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* シンプルなシャドウ */
.marunishi-shadow {
    box-shadow: 0 2px 8px rgba(115, 122, 128, 0.1);
}

.marunishi-shadow:hover {
    box-shadow: 0 4px 16px rgba(115, 122, 128, 0.15);
}

/* ポートフォリオアイテムの初期表示 */
.portfolio-item {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ホバー効果の強化 */
.portfolio-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 177, 160, 0.1);
}

/* グラデーション背景の追加効果 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* カードのシャドウ効果 */
.card-shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* テキストグラデーション */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* フィルターボタンのアクティブ状態 */
.filter-btn.active {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 177, 160, 0.3);
}

/* プルス効果 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-on-hover:hover {
    animation: pulse 0.6s ease-in-out;
}

/* フォームスタイリング */
input[type="text"], input[type="email"], select, textarea {
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 177, 160, 0.1);
}

/* セレクトボックスのスタイリング */
select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23ffffff' d='m2 0-2 2 4 0m-4 1 2 2 2-2'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 3rem;
    appearance: none;
}

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

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

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

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

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .text-4xl {
        font-size: 2rem;
        line-height: 2.5rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
        line-height: 3rem;
    }
    
    .text-6xl {
        font-size: 3rem;
        line-height: 3.5rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* プリローダー */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* パーティクル効果（背景装飾） */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; }
.particle:nth-child(4) { right: 15%; animation-delay: 1s; }
.particle:nth-child(5) { right: 35%; animation-delay: 3s; }

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

/* セクション間の区切り線 */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
    margin: 2rem 0;
}

/* 成功メッセージスタイル */
.success-message {
    background-color: #10B981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* エラーメッセージスタイル */
.error-message {
    background-color: #EF4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* ツールチップ */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.tooltip:hover::before {
    opacity: 1;
}

/* アクセシビリティの向上 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 印刷スタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .auto-dark input, .auto-dark textarea, .auto-dark select {
        background-color: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
}

/* フォーカスインジケーター */
*:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ボタンの無効化状態 */
button:disabled, input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ローディング状態 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* タブレット向け調整 */
@media (min-width: 768px) and (max-width: 1024px) {
    .tablet-adjust {
        padding: 1rem;
    }
}

/* マルニシ風の企業サイトスタイル */
.corporate-card {
    border: 1px solid rgba(115, 122, 128, 0.1);
    background: #ffffff;
    transition: all 0.3s ease;
}

.corporate-card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 16px rgba(0, 177, 160, 0.08);
}

/* プロフェッショナルなボタン */
.btn-corporate {
    background: var(--brand-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-corporate:hover {
    background: var(--brand-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 177, 160, 0.2);
}

.btn-corporate-outline {
    background: transparent;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-corporate-outline:hover {
    background: var(--brand-primary);
    color: white;
}

/* タイポグラフィの調整 */
.heading-corporate {
    font-family: var(--poppins);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--brand-dark);
}

.text-corporate {
    font-family: var(--noto-sans);
    color: var(--brand-gray);
    line-height: 1.7;
}

/* 大画面向け調整 */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
}

/* ==============================================
   ファーストビューアニメーション（Marunishi風）
   ============================================== */

/* 背景動画コンテナ */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

/* 動画マスク（フェードイン効果） */
.hero-video-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
    opacity: 1;
    transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-video-mask.is-active {
    opacity: 0;
}

/* 背景動画 */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-video.is-active {
    opacity: 1;
}

/* モバイルでの動画最適化 */
@media (max-width: 768px) {
    .hero-video {
        /* モバイルでは動画を縦長にトリミング */
        min-width: auto;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ヒーローコンテンツの初期状態 */
.hero-content {
    opacity: 0;
}

/* ページロード時のアニメーション */
.hero-content.is-active {
    opacity: 1;
}

/* テキストの可読性向上（動画背景用） - シンプルなアプローチ */

/* タイトルに軽い影 */
#hero h1 {
    text-shadow: 
        0 2px 4px rgba(255, 255, 255, 0.8),
        0 4px 8px rgba(255, 255, 255, 0.6);
}

/* サブタイトルに軽い影 */
#hero .hero-subtitle {
    text-shadow: 
        0 2px 4px rgba(255, 255, 255, 0.8),
        0 4px 8px rgba(255, 255, 255, 0.6);
}

/* バッジは背景を維持 */
#hero .hero-badge span {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* サブメッセージに軽い影 */
#hero .hero-submessage p {
    text-shadow: 
        0 2px 4px rgba(255, 255, 255, 0.8),
        0 4px 8px rgba(255, 255, 255, 0.6);
}

/* ボタンの視認性 */
#hero .btn-corporate {
    box-shadow: 0 4px 12px rgba(0, 177, 160, 0.4);
}

/* バッジのフェードイン */
.hero-badge {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.is-active .hero-badge {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

/* タイトルのスライドアップ＆フェードイン */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.is-active .hero-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

/* サブタイトルのフェードイン */
.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.is-active .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

/* ボタンのフェードイン */
.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.is-active .hero-buttons {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1s;
}

/* サブメッセージのフェードイン */
.hero-submessage {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.is-active .hero-submessage {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.2s;
}

/* スクロールインジケーターのアニメーション */
@keyframes bounceGentle {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 10px);
    }
}

#hero .animate-bounce {
    animation: bounceGentle 2s ease-in-out infinite;
}