/* 
 * UNIQSTYLE Silent Keyboard & Mouse (B2B Layout)
 * Base Style Definitions
 */

:root {
    --color-bg: #ffffff;
    --color-surface: #f8f9fa;
    --color-text-main: #333333;
    --color-text-muted: #666666;
    --color-accent: #000000;
    --color-border: #e0e0e0;
    --color-black-bg: #111111;
    
    --font-family-sans: 'Inter', 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, p {
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px; /* ロゴ画像の高さ（適宜調整） */
    width: auto;
    display: block;
}

nav a {
    color: var(--color-text-main);
    text-decoration: none;
    margin-left: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #888;
}

/* Hero Section */
.section-hero {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000; /* 動画読み込み前や未設定時の背景色 */
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 1;
    object-fit: cover;
    opacity: 0.8; /* 動画が暗めになるように */
}

.hero-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    text-align: center;
}

.hero-bg-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%; /* キーボードの拡大表示 */
    max-width: 1600px;
    opacity: 0; /* 初期値 */
    z-index: 0; /* 波紋(1)よりも奥へ配置 */
    pointer-events: none;
    animation: fadeInBg 2s ease-out 0.8s forwards;
}

@keyframes fadeInBg {
    0% { opacity: 0; }
    100% { opacity: 0.25; } /* 黒背景にうっすら見える15%透過 */
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    z-index: 1; /* 背景(0)より手前、メイン画像(2)より奥 */
    pointer-events: none;
}

.hero-image, .hero-icon {
    position: relative;
    z-index: 2; /* 背景画像や波紋よりも確実に手前に表示 */
}

.ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: rippleAnimation 5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.ripple-2 {
    animation-delay: 2.5s;
}

.hero-image {
    max-width: 80%; /* キービジュアルの大きさに応じて後で調整可能 */
    margin: 0 auto;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5)); /* 透過PNG用のドロップシャドウ */
}

.hero-icon {
    display: block;
    max-width: 60%; /* キーボード本体幅に近い大きさに調整 */
    margin: 30px auto 0;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

/* Features (Cards Grid) */
.section-features {
    padding: 100px 0;
    background-color: var(--color-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    /* サイレントキーのようにスッと動くトランジション設定 */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    /* 初期状態：キーストロークが深いことを表現する、高く浮いた大きな影 */
    box-shadow: 0 20px 40px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
}

.feature-card:hover {
    /* ホバー時：豪快に押し込まれる（12px沈む） */
    transform: translateY(12px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08), 0 2px 5px rgba(0,0,0,0.04);
}

.feature-card:active {
    /* クリック時：完全に底打ちする（18px沈む） */
    transform: translateY(18px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.feature-card img {
    width: 100%;
    height: auto; /* 画像の端が途切れないようにアスペクト比固定やクロップを解除 */
    display: block;
    border-radius: 12px 12px 0 0;
}

.card-content {
    padding: 24px;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Concept (Black Accent Section) */
.section-concept {
    padding: 120px 20px;
    background-color: var(--color-black-bg);
    color: #ffffff;
    text-align: center;
}

.concept-content {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start; /* 左揃えに変更 */
    text-align: left; /* テキストも左揃え */
}

/* Silent Key (flow.png) Animation */
.silent-key-flow {
    display: block;
    width: 80px; /* キーのサイズ（必要に応じて調整） */
    height: auto;
    margin: 0 auto 30px auto; /* 左右中央寄せ、下余白 */
    align-self: center; /* フレックスコンテナ内でこの要素だけ中央寄せに */
    animation: key-press 2s ease-out infinite;
}

@keyframes key-press {
    0% { transform: translateY(0); }
    5% { transform: translateY(12px); } /* 深めに押し込む */
    12% { transform: translateY(0); } /* 戻る */
    100% { transform: translateY(0); } /* 待機 */
}

.concept-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.concept-subtext {
    font-size: 1.15rem;
    color: #a0a0a5;
    font-weight: 400;
    letter-spacing: 0.15em;
    margin: 0 0 40px 0;
}

.concept-emblem {
    display: block;
    width: 493px; /* 画像の本来の横幅(987px)のちょうど半分のサイズ（Retina表示用） */
    max-width: 100%; /* スマホなど画面が狭い場合は画面幅に合わせて縮小 */
    height: auto;
    margin-top: 30px;
}

/* Specs (B2B Table) */
.section-specs {
    padding: 100px 0;
    background-color: var(--color-black-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-specs .section-title h2 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.section-specs .section-title p {
    color: #aaaaaa;
}

.spec-table-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.spec-grid {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    background: #111111; /* テーブル背景をダークに */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); /* 影を濃く */
}

.spec-table th, .spec-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a; /* ボーダーを暗く */
}

.spec-table th {
    width: 30%;
    background-color: #1a1a1a; /* ヘッダー背景を暗く */
    font-weight: 700;
    color: #ffffff;
}

.spec-table td {
    color: #cccccc; /* テキストを明るいグレーに */
    line-height: 1.6;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-table.half {
    width: 50%;
}

.spec-table thead th {
    background-color: #222222; /* セクションヘッダー */
    text-align: center;
    font-size: 1.1rem;
    padding: 16px;
    border-bottom: 2px solid #000000;
}

.spec-notes {
    margin-top: 30px;
    padding: 20px;
    background-color: #111111;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #999999;
    line-height: 1.8;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.spec-notes .notes-text {
    flex: 1;
}

/* Gallery Section */
.section-gallery {
    padding: 100px 0;
    background-color: #ffffff; /* 白背景でコントラストをつける */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* クリックできることを示す */
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #cccccc;
}

/* Footer */
#footer {
    background-color: #111111;
    text-align: center;
    padding: 60px 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.back-to-top {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff; /* ダーク背景に合わせて白に */
    margin-left: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-back-to-top {
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0;
}

.back-to-top:hover {
    opacity: 0.6;
    transform: translateY(-3px);
}

.back-to-top .arrow {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: #aaaaaa;
}

.back-to-top .text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

#footer p {
    color: #888888;
    font-size: 0.85rem;
    margin: 0 0 5px 0;
}

#footer p:last-child {
    margin-bottom: 0;
}

/* Animations */
@keyframes rippleAnimation {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    30% {
        opacity: 0.6;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

@keyframes fadeInLoadCinematic {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

.fade-in-load {
    opacity: 0; /* アニメーション開始前は見えない状態に */
    animation: fadeInLoadCinematic 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.fade-in-load-delayed {
    opacity: 0;
    /* 本体画像のフェードイン開始から0.6秒後にフェードイン開始 */
    animation: fadeInLoadCinematic 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.6s;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Responsive */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .spec-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .logo-pc {
        display: none;
    }
    .logo-sp {
        display: block;
        height: 44px; /* ロゴサイズを大きく */
    }
    nav a {
        white-space: nowrap; /* ナビメニュー（ダウンロード等）の改行を防ぐ */
        font-size: 0.8rem;
    }
    .hero-image {
        max-width: 96%; /* キービジュアルを大きく */
    }
    .hero-icon {
        max-width: 85%; /* ヒーローアイコンも大きく */
    }
    .feature-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 10px 20px 20px 20px;
        margin: 0 -20px;
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
    }
    .feature-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }
    .feature-card {
        flex: 0 0 85%; /* 画面幅の85%を占めるように（次のカードがチラ見えする） */
        scroll-snap-align: start;
    }
    .concept-content h2 {
        font-size: 2rem;
    }
    .concept-subtext {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .spec-table th, .spec-table td {
        display: block;
        width: 100%;
    }
    .spec-table th {
        border-bottom: none;
        padding-bottom: 4px;
    }
    .spec-table td {
        padding-top: 4px;
        margin-bottom: 12px;
    }
    .spec-table-wrapper {
        padding: 20px;
    }
    .spec-notes {
        flex-direction: column;
        align-items: flex-end;
        gap: 15px;
    }
    .spec-notes .notes-text {
        width: 100%;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* スマホでは2列 */
        gap: 10px;
    }
    .footer-back-to-top {
        position: static;
        margin-top: 30px;
    }
}
