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

:root {
    --text-color: #333333;
    --accent-color: #8C9E5E;
    --bg-color: #ffffff;
    --sub-bg-color: #f9f9f9;
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    --header-height: 80px;
}

/* --- 全要素に適用する重要なリセット --- */
/* これにより、パディングによる幅の計算ズレ（文字が右に寄る現象）を防ぎます */
* {
    box-sizing: border-box;
}

/* --- 基本設定 --- */
body {
    font-family: var(--font-sans);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    background-color: var(--bg-color);
    overflow-x: hidden; 
}

a { text-decoration: none; color: inherit; transition: opacity 0.3s; }
a:hover { opacity: 0.7; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* --- 見出しデザイン --- */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.05em; }
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--text-color);
    margin: 1rem auto 0;
}

/* --- ローディング画面 --- */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s ease;
}
#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-text {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #333;
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 15px;
    opacity: 0;
    animation: textFadeIn 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.loader-line {
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    margin: 0 auto;
    animation: lineGrow 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes textFadeIn {
    0% { opacity: 0; transform: translateY(10px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes lineGrow {
    0% { width: 0; }
    100% { width: 60px; }
}

/* --- ヘッダー --- */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    background: #ffffff;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* 左右に配置 */
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo-area img { height: 50px; width: auto; }

/* --- ハンバーガーメニュー --- */
.menu-btn { 
    cursor: pointer; 
    z-index: 2000; 
    width: 30px; 
    height: 20px; 
    position: relative; /* ここが重要。3本線の基準点になります */
}
.menu-btn span { 
    display: block; 
    width: 100%; 
    height: 1px; 
    background: #000; 
    position: absolute; /* 親(menu-btn)に対して絶対配置 */
    transition: all 0.3s; 
}
.menu-btn span:nth-child(1) { top: 0; }
.menu-btn span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-btn span:nth-child(3) { bottom: 0; }

/* メニューオープン時の動き */
.menu-btn.active span:nth-child(1) { top: 50%; transform: rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { bottom: auto; top: 50%; transform: rotate(-45deg); }

#nav-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(255,255,255,0.98); z-index: 1500;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
#nav-menu.active { opacity: 1; visibility: visible; }
#nav-menu ul { list-style: none; padding: 0; text-align: center; }
#nav-menu li { margin: 20px 0; opacity: 0; transform: translateY(20px); transition: 0.4s; }
#nav-menu.active li { opacity: 1; transform: translateY(0); }
#nav-menu a { font-family: var(--font-serif); font-size: 1.2rem; display: block; }

/* --- 共通フッター --- */
footer { background: #1a1a1a; color: #fff; padding: 60px 0 20px; text-align: center; font-size: 0.8rem; }

/* --- アニメーション --- */
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- レイアウト汎用 --- */
.section { padding: 80px 0; }
.bg-gray { background-color: var(--sub-bg-color); }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* 2カラム */
.two-col { display: flex; align-items: center; gap: 4rem; margin-bottom: 4rem; }
.two-col:nth-child(even) { flex-direction: row-reverse; }
.two-col .col-text { flex: 1; }
.two-col .col-img { flex: 1; }
.two-col h3 { font-size: 1.5rem; margin-bottom: 1rem; border-left: 4px solid var(--accent-color); padding-left: 15px; }

/* --- TOPページ ヒーローエリア --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}
.hero-section video {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%; width: auto; height: auto;
    z-index: 1; object-fit: cover;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* 文字位置 (PC用) */
.hero-content {
    position: relative; 
    z-index: 3; 
    top: 40%;
    transform: translateY(-50%);
    text-align: center; 
    color: #ffffff; 
    width: 100%;
}

.hero-text-group {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-company, .hero-brand {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    letter-spacing: 0.15em;
    display: block;
}

.hero-cross {
    display: block;
    font-size: 1.5rem;
    margin: 1rem 0;
    opacity: 0.8;
}

/* --- その他詳細ページ用CSS --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; margin-top: 2rem; }
.product-item { background: #fff; transition: transform 0.3s; }
.product-item:hover { transform: translateY(-5px); }
.product-img { width: 100%; height: 250px; background: #eee; object-fit: cover; margin-bottom: 1.5rem; }
.company-table { width: 100%; border-collapse: collapse; margin-bottom: 3rem; font-size: 1rem; }
.company-table th, .company-table td { padding: 20px 0; border-bottom: 1px solid #e0e0e0; text-align: left; }
.company-table th { width: 30%; font-weight: 500; color: var(--accent-color); font-family: var(--font-serif); }
.business-list { list-style: none; padding: 0; margin: 0; }
.business-list li { padding: 10px 0; border-bottom: 1px dashed #eee; padding-left: 20px; position: relative; }
.business-list li::before { content: "●"; color: var(--accent-color); position: absolute; left: 0; top: 10px; font-size: 0.8rem; }
.faq-item { border-bottom: 1px solid #e0e0e0; margin-bottom: 1rem; }
.faq-question { padding: 20px 0; font-size: 1.1rem; font-weight: 500; cursor: pointer; position: relative; padding-right: 40px; transition: color 0.3s; }
.faq-question:hover { color: var(--accent-color); }
.faq-question::after { content: '+'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; transition: transform 0.3s; }
.faq-item.active .faq-question::after { content: '-'; transform: translateY(-50%) rotate(0deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
.faq-answer p { padding-bottom: 20px; color: #666; line-height: 2; }
.contact-form { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 2rem; }
.form-control { width: 100%; padding: 15px; border: 1px solid #ddd; background: #fcfcfc; font-size: 1rem; box-sizing: border-box; }
.submit-btn { display: inline-block; background: #333; color: #fff; padding: 15px 60px; border: none; font-size: 1rem; cursor: pointer; transition: background 0.3s; letter-spacing: 0.1em; }
.submit-btn:hover { background: var(--accent-color); }

/* --- スマホ対応 (修正済み) --- */
@media (max-width: 768px) {
    /* ヘッダー：自然な左右配置 */
    header { padding: 0 20px; justify-content: space-between; }
    
    .logo-area { margin-left: 0; }
    .logo-area img { height: 40px; width: auto; }
    
    /* メニューボタン修正箇所：position: relative を維持 */
    .menu-btn { 
        position: relative; /* ここをstaticにしてはいけなかった */
        transform: none; 
        margin-right: 0; 
    }

    /* 文字サイズ調整 */
    .section-title { font-size: 1.5rem; }
    .two-col { flex-direction: column !important; gap: 2rem; }
    .company-table th { width: 35%; }
    
    /* ヒーローエリアの文字 */
    .hero-company, .hero-brand {
        font-size: 1.4rem; 
        width: 100%;
        padding: 0 10px;
    }
}