/* RAKULINK Premium Stylesheet */

:root {
    --primary: #1A2B44;      /* 先進的なネイビー */
    --nature-green: #2D5A27; /* 山陰の深い森の緑 */
    --soft-green: #F0F7F4;   /* 優しい背景の緑 */
    --accent-gold: #C5A059;  /* 旅館のような上質なゴールド */
    --shinji-orange: #E67E22; /* 宍道湖の夕陽色 */
    
    /* アニメーション時間 */
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: 0.2s ease;
}

/* スムーススクロール & スクロールバー */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* navbar height */
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: var(--nature-green);
    border-radius: 9999px;
    border: 3px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #1e3f1a;
}

/* タイポグラフィと基本設定 */
body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #334155;
    overflow-x: hidden;
    line-height: 2.0;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

.font-serif {
    font-family: 'Shippori Mincho', serif;
}

.font-en {
    font-family: 'Montserrat', sans-serif;
}

/* 均整のとれた折り返し設定 */
.text-balanced {
    word-break: normal;
    overflow-wrap: anywhere;
}

.phrase {
    display: inline-block;
}

/* ナビゲーションの磨りガラス・浮遊感 */
nav {
    transition: all var(--transition-normal);
}
nav.scrolled {
    height: 4.5rem !important;
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}
nav.scrolled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

/* ナビゲーションリンクのアクティブエフェクト */
.nav-link {
    position: relative;
    padding: 0.25rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--nature-green);
    transition: width var(--transition-normal);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ヒーローヘッダー */
.hero-bg {
    background-color: #0b1320; /* プレミアムな濃紺 of フォールバックカラー */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.25)), 
                      url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?q=80&w=2000&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 装飾の浮遊アニメーション */
.float-illu {
    animation: floating 6s ease-in-out infinite;
}
.float-illu-delay {
    animation: floating 6s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

/* タイトルのアンダーライン装飾 */
.section-title {
    position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), #dfc591);
    margin: 24px auto 0;
    border-radius: 9999px;
}

/* カード要素のプレミアムインタラクション */
.service-card {
    transition: all var(--transition-slow);
}
.service-card:hover {
    transform: translateY(-16px);
    box-shadow: 0 40px 70px -15px rgba(26, 43, 68, 0.08);
}

.hero-card {
    transition: all var(--transition-slow);
}
.hero-card:hover {
    transform: translateY(-20px) scale(1.015);
    box-shadow: 0 50px 80px -20px rgba(26, 43, 68, 0.12);
}

/* アニメーション表示制御 */
.view-content {
    display: none;
    opacity: 0;
}
.view-content.active {
    display: block;
    animation: slideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スクロール・フェードインエフェクト */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 磨りガラス風お問い合わせフォーム */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
}

.form-input-field {
    background: rgba(255, 255, 255, 0.02);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-normal);
}
.form-input-field:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-gold);
    outline: none;
    box-shadow: 0 10px 20px -10px rgba(197, 160, 89, 0.15);
}

/* お問い合わせ成功ポップアップ */
.popup-success {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    background: rgba(26, 43, 68, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(197, 160, 89, 0.3);
    transform: translateY(-100px);
    opacity: 0;
    transition: all var(--transition-normal);
}
.popup-success.show {
    transform: translateY(0);
    opacity: 1;
}

/* モバイルメニューオーバーレイ */
#mobile-menu {
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
#mobile-menu.show {
    max-height: 400px;
    opacity: 1;
}

/* --- ドローン実績スタッツ & 特化セクション --- */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-normal);
}
.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 40px -10px rgba(197, 160, 89, 0.15);
}

/* --- 実績ギャラリー (WORKS) フィルタ・カード --- */
.filter-btn {
    position: relative;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    color: #94a3b8;
    transition: all var(--transition-normal);
}
.filter-btn.active {
    color: var(--nature-green);
}
.filter-btn::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--nature-green);
    transform: translateX(-50%);
    transition: width var(--transition-normal);
}
.filter-btn.active::after {
    width: 24px;
}

/* ホバー時のズームとオーバーレイマスク */
.work-card {
    transition: all var(--transition-slow);
}
.work-card .zoom-img {
    transition: transform var(--transition-slow);
}
.work-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -15px rgba(26, 43, 68, 0.1);
}
.work-card:hover .zoom-img {
    transform: scale(1.06);
}

/* --- ネイティブモーダル <dialog> スタイル --- */
dialog {
    border: none;
    border-radius: 2.5rem;
    padding: 0;
    max-width: 90%;
    width: 850px;
    max-height: 90vh;
    background: #ffffff;
    box-shadow: 0 50px 100px -20px rgba(15, 23, 42, 0.25), 
                0 0 1px 0 rgba(15, 23, 42, 0.1);
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                overlay 0.5s cubic-bezier(0.16, 1, 0.3, 1) allow-discrete,
                display 0.5s cubic-bezier(0.16, 1, 0.3, 1) allow-discrete;
}

dialog[open] {
    opacity: 1;
    transform: scale(1) translateY(0);
}

@starting-style {
    dialog[open] {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
}

/* モーダルの背景磨りガラス */
dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                overlay 0.5s cubic-bezier(0.16, 1, 0.3, 1) allow-discrete,
                display 0.5s cubic-bezier(0.16, 1, 0.3, 1) allow-discrete;
}

dialog[open]::backdrop {
    opacity: 1;
}

@starting-style {
    dialog[open]::backdrop {
        opacity: 0;
    }
}

/* 磨りガラス風プレイボタン */
.play-btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}
.play-btn-glass:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--accent-gold);
}

/* --- ビデオモーダル モバイル・ブラウザ完全互換レイアウト --- */
#video-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    padding: 0 !important;
    width: 95% !important;
    max-width: 896px !important; /* max-w-4xl */
    max-height: 95vh !important;
    border: none !important;
    background: transparent !important;
    z-index: 9999 !important;
}

#video-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important; /* Safari / iOS */
}


