/* --- 基本設定 & 変数 --- */
:root {
    --color-primary: #007bff;
    --color-dark: #121212;
    --color-body: #212529;
    --color-bg: #f8f9fa;
    --font-base: 'Noto Sans JP', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --content-width: 1200px;
    --header-height: 90px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- リセット & 基本スタイル --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-base);
    color: var(--color-body);
    line-height: 1.8;
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}
body.is-loading { overflow: hidden; }
a { text-decoration: none; color: inherit; cursor: none; }
img { max-width: 100%; height: auto; vertical-align: middle; }
.container { max-width: var(--content-width); width: 90%; margin: 0 auto; }
.section-padding { padding: 140px 0; }

/* --- ローディング画面 --- */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-dark); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s var(--ease-out-expo);
}
#loader.is-loaded { opacity: 0; pointer-events: none; }
.loader-logo {
    font-family: var(--font-heading); color: #fff; font-size: 32px;
    font-weight: 700; letter-spacing: 2px;
    opacity: 0; animation: loader-fade-in 1s forwards;
}
@keyframes loader-fade-in { to { opacity: 1; } }

/* --- カーソル追従エフェクト --- */
#cursor-follower {
    position: fixed; top: 0; left: 0; z-index: 9998;
    width: 20px; height: 20px;
    background-color: var(--color-primary);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo);
}
#cursor-follower.is-active { width: 60px; height: 60px; }

/* --- ヘッダー --- */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1001; /* z-indexを調整 */
    transform: translateY(-100%); 
    transition: transform 0.8s var(--ease-out-expo), background-color 0.4s, box-shadow 0.4s;
}
body:not(.is-loading) .header { transform: translateY(0); }
.header.scrolled {
    background-color: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header__inner { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); padding: 0 5%; }
.header__logo a { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: #fff; transition: color 0.4s; }
.header.scrolled .header__logo a { color: var(--color-dark); }

.header__nav { display: flex; align-items: center; }
.header__nav ul { display: flex; list-style: none; padding: 0; margin: 0; }
.header__nav li { margin-left: 40px; }
.header__nav a { font-family: var(--font-heading); font-weight: 600; font-size: 14px; color: #fff; position: relative; padding: 5px 0; transition: color 0.4s; }
.header.scrolled .header__nav a { color: var(--color-dark); }
.header__nav a:not(.header__contact-button)::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
    background-color: var(--color-primary); transition: width 0.3s;
}
.header__nav a:not(.header__contact-button):hover::after { width: 100%; }

.header__contact-button {
    display: block; background-color: var(--color-primary); color: #fff !important;
    padding: 10px 24px; border-radius: 50px; font-size: 14px; font-weight: 700;
    border: 2px solid var(--color-primary);
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    margin-left: 40px;
}
.header__contact-button:hover { background-color: transparent; color: var(--color-primary) !important; transform: translateY(-2px); opacity: 1; }
.header.scrolled .header__contact-button:hover { color: var(--color-primary) !important; }

.hamburger { display: none; }

/* --- メインビジュアル (Hero) --- */
.hero { height: 100vh; position: relative; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__video-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
}
.hero__inner { position: relative; z-index: 2; width: 90%; max-width: var(--content-width); margin: 0 auto; }
.hero__title { font-family: var(--font-heading); font-size: clamp(48px, 8vw, 90px); line-height: 1.1; font-weight: 700; }
.hero__subtitle { font-size: clamp(16px, 3vw, 20px); margin: 20px 0 0; }
.animate-text {
    display: inline-block; transform: translateY(100%);
    animation: text-reveal-up 1s var(--ease-out-expo) forwards;
}
.hero__title span:nth-child(2) { animation-delay: 0.15s; }
.hero__title span:nth-child(3) { animation-delay: 0.3s; }
.hero__subtitle { animation-delay: 0.5s; }
@keyframes text-reveal-up { to { transform: translateY(0); } }
.hero__scroll-down {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-heading); font-size: 12px; letter-spacing: 2px;
    writing-mode: vertical-rl;
}
.hero__scroll-down::after {
    content: ''; display: block; width: 1px; height: 50px;
    background-color: #fff; margin: 10px auto 0;
    animation: scroll-indicator 2s infinite;
}
@keyframes scroll-indicator { 0% { height: 0; } 50% { height: 50px; } 100% { height: 0; transform: translateY(50px); } }

/* --- 共通セクションタイトル --- */
.section-header { text-align: center; margin-bottom: 80px; }
.section-title {
    font-size: 40px; font-weight: 700; position: relative;
    display: inline-block; padding-bottom: 15px;
}
.section-title::before {
    content: attr(data-en); font-family: var(--font-heading);
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: clamp(80px, 15vw, 150px); font-weight: 700;
    color: rgba(0,0,0,0.04); z-index: -1; white-space: nowrap;
}

/* --- 事業内容 (Business) --- */
.business__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.business__card {
    display: block; background: #fff; border: 1px solid #e9ecef;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.business__card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1); }
.business__card-img-wrapper { overflow: hidden; aspect-ratio: 16/10; }
.business__card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out-expo); }
.business__card:hover img { transform: scale(1.05); }
.business__card-body { padding: 30px; }
.business__card-body h3 { font-size: 20px; margin: 0 0 15px; font-weight: 700; color: var(--color-dark); }

/* --- ★★★ ここが完全に修正された「私たちの強み」セクションです ★★★ --- */
.strength { background-color: #fff; overflow: hidden; }
.strength__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; align-items: center; }
.strength__text-content { grid-column: 1 / span 5; /* テキストを左側5列に配置 */ }
.strength__lead { font-size: 24px; font-weight: 500; margin-bottom: 25px; line-height: 1.6; }
.strength__image-1 { grid-column: 8 / span 5; grid-row: 1; }
.strength__image-2 { grid-column: 6 / span 5; grid-row: 1; margin-top: 25%; z-index: 2; }
.strength__image-3 { grid-column: 10 / span 3; grid-row: 1; margin-top: -20%; z-index: 1; }
.strength__image-1 img, .strength__image-2 img, .strength__image-3 img {
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}
.arrow-button {
    display: inline-block; margin-top: 20px; font-weight: 700; position: relative;
    padding: 10px 20px 10px 0; color: var(--color-primary);
}
.arrow-button::after {
    content: '→'; position: absolute; right: 0; transition: transform 0.3s;
}
.arrow-button:hover::after { transform: translateX(5px); }

/* --- お知らせ (News) --- */
.news__list { list-style: none; padding: 0; margin: 0; }
.news__item a {
    display: flex; align-items: center; padding: 25px 0;
    border-bottom: 1px solid #dee2e6; transition: opacity 0.3s;
}
.news__item a:hover { opacity: 0.6; }
.news__item time { font-family: var(--font-heading); margin-right: 40px; font-weight: 600; color: #6c757d; flex-shrink: 0; }
.news__item a > span:not(.news__arrow) {
    flex-grow: 1;
    font-weight: 500;
}
.news__arrow {
    width: 30px; height: 30px; border: 1px solid var(--color-dark);
    border-radius: 50%; position: relative; transition: background-color 0.3s, color 0.3s;
    flex-shrink: 0; margin-left: 20px;
}
.news__arrow::after {
    content: '→'; font-size: 16px; line-height: 1;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.news__item a:hover .news__arrow { background-color: var(--color-dark); color: #fff; }
.news__more { text-align: right; margin-top: 40px; }

/* --- フッター --- */
.footer { background-color: var(--color-dark); color: #fff; padding: 80px 0 30px; }
.footer__inner { display: flex; justify-content: space-between; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer__info h3 { font-family: var(--font-heading); font-size: 22px; margin-bottom: 15px; }
.footer__nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px 50px; list-style: none; padding: 0; }
.footer__copyright { text-align: center; font-size: 12px; opacity: 0.6; padding-top: 30px; }

/* --- アニメーション --- */
.anim-slide-up {
    opacity: 0; transform: translateY(80px);
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
.anim-slide-up.is-visible { opacity: 1; transform: translateY(0); }

/* --- 下層ページ共通 --- */
.sub-hero {
    height: 40vh; min-height: 300px;
    background-size: cover; background-position: center;
    position: relative; display: flex; align-items: center; justify-content: center;
    color: #fff; text-align: center;
}
.sub-hero::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.4);
}
.sub-hero__inner { position: relative; z-index: 2; }
.sub-hero__title { font-family: var(--font-heading); font-size: clamp(36px, 5vw, 52px); font-weight: 700; }
.sub-hero__subtitle { margin-top: 10px; font-size: 16px; }

.breadcrumb { padding: 15px 0; background-color: #fff; font-size: 14px; }
.breadcrumb a { text-decoration: underline; }
.breadcrumb span { color: #6c757d; }

.section-padding--sm { padding: 100px 0; }
.bg-white { background-color: #fff; }

/* --- 会社概要ページ (Company) --- */
.philosophy-content { text-align: center; max-width: 800px; margin: 0 auto; }
.philosophy-lead { font-size: 22px; font-weight: 500; line-height: 1.8; margin-bottom: 30px; }
.info-table { width: 100%; border-top: 1px solid #dee2e6; }
.info-table th, .info-table td { padding: 20px; border-bottom: 1px solid #dee2e6; vertical-align: top; }
.info-table th { width: 20%; min-width: 150px; font-weight: 700; text-align: left; background-color: var(--color-bg); }
.history-list { list-style: none; padding: 0; margin: 0 auto; max-width: 800px; border-left: 2px solid var(--color-primary); }
.history-item { position: relative; padding: 10px 0 30px 40px; }
.history-item::before {
    content: ''; position: absolute; left: -9px; top: 18px;
    width: 16px; height: 16px; background-color: var(--color-primary); border-radius: 50%;
}
.history-item time { font-family: var(--font-heading); font-weight: 700; font-size: 18px; display: block; margin-bottom: 5px; }
.access-map iframe { filter: grayscale(80%); transition: filter 0.3s; }
.access-map iframe:hover { filter: grayscale(0%); }

/* --- 事業内容ページ (Business) --- */
.business-item { display: flex; align-items: center; gap: 5%; }
.business-item:not(:last-child) { margin-bottom: 100px; }
.business-item.reverse { flex-direction: row-reverse; }
.business-item__img { width: 50%; flex-shrink: 0; }
.business-item__img img { box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); }
.business-item__text { width: 45%; }
.business-item__title { font-size: 28px; font-weight: 700; margin-bottom: 20px; }

/* --- お問い合わせページ (Contact) --- */
.contact-wrapper { max-width: 800px; margin: 0 auto; }
.contact-lead { text-align: center; margin-bottom: 50px; }
.form-group { margin-bottom: 30px; }
.form-label { display: block; font-weight: 700; margin-bottom: 10px; }
.form-required {
    display: inline-block; margin-left: 10px; padding: 2px 8px;
    font-size: 12px; font-weight: normal; background-color: var(--color-primary);
    color: #fff; border-radius: 3px;
}
.form-input, .form-textarea {
    width: 100%; padding: 15px; border: 1px solid #ced4da;
    border-radius: 5px; font-size: 16px; font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input:focus, .form-textarea:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}
.form-privacy { text-align: center; margin-bottom: 40px; }
.form-checkbox-label { display: inline-flex; align-items: center; }
.form-checkbox-label input[type="checkbox"] { width: 20px; height: 20px; margin-right: 10px; }
.form-checkbox-label a { text-decoration: underline; }
.form-checkbox-label a:hover { text-decoration: none; }
.form-submit { text-align: center; }
.submit-button {
    display: inline-block; min-width: 250px; padding: 18px 30px;
    border: none; background-color: var(--color-primary);
    color: #fff; font-size: 18px; font-weight: 700; border-radius: 50px;
    transition: background-color 0.3s, transform 0.3s;
}
.submit-button:hover { background-color: #0056b3; transform: translateY(-3px); }

/* --- お知らせページ (News) --- */
.news-list-page { list-style: none; padding: 0; margin: 0; }
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 60px; }
.page-numbers {
    display: flex; justify-content: center; align-items: center;
    width: 40px; height: 40px; border: 1px solid #dee2e6;
    border-radius: 50%; transition: background-color 0.3s, color 0.3s;
}
.page-numbers:hover, .page-numbers.current {
    background-color: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.breadcrumb--post { padding-top: calc(var(--header-height) + 30px); background-color: transparent; }
.post-container { max-width: 800px; }
.post-header { margin-bottom: 50px; text-align: center; }
.post-title { font-size: clamp(24px, 5vw, 36px); font-weight: 700; line-height: 1.6; margin-bottom: 20px; }
.post-date { font-family: var(--font-heading); color: #6c757d; }
.post-body p { margin-bottom: 1.5em; }
.post-body h2 { font-size: 24px; font-weight: 700; margin: 2em 0 1em; padding-bottom: 0.5em; border-bottom: 2px solid var(--color-primary); }
.post-body ul { list-style: disc; padding-left: 1.5em; margin-bottom: 1.5em; }
.post-body ul li { margin-bottom: 0.5em; }
.post-body figure { margin: 2em 0; }
.post-body figcaption { font-size: 14px; color: #6c757d; text-align: center; margin-top: 10px; }
.post-navigation { text-align: center; margin-top: 60px; }

/* --- 採用・その他ページ --- */
.recruit-job-title { font-size: 24px; font-weight: 700; margin-bottom: 20px; padding-left: 1em; border-left: 5px solid var(--color-primary); }
.recruit-entry { text-align: center; margin-top: 60px; }
.recruit-entry p { margin-bottom: 30px; }
.sitemap-list { list-style: none; padding: 0; column-count: 2; column-gap: 40px; }
.sitemap-list li { margin-bottom: 15px; border-bottom: 1px solid #dee2e6; }
.sitemap-list a { display: block; padding: 10px 0; font-weight: 500; position: relative; padding-left: 20px; }
.sitemap-list a::before { content: '→'; position: absolute; left: 0; color: var(--color-primary); }

/* --- レスポンシブ対応 (900px以下) --- */
@media (max-width: 900px) {
    body { cursor: auto; }
    #cursor-follower { display: none; }
    .section-padding { padding: 80px 0; }

    /* スマホ用ヘッダー */
    .header__nav {
        display: none;
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background-color: var(--color-bg);
        flex-direction: column; justify-content: center; align-items: center;
        opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
        z-index: 1000;
    }
    .header__nav.is-open { display: flex; opacity: 1; visibility: visible; }
    .header__nav ul { flex-direction: column; }
    .header__nav li { margin: 20px 0; margin-left: 0; }
    .header__nav a { font-size: 20px; color: var(--color-dark); }
    .header__nav a:not(.header__contact-button)::after { display: none; }
    .header__contact-button {
        margin-left: 0;
        margin-top: 40px;
        color: #fff !important;
    }
    .header__contact-button:hover { color: var(--color-primary) !important; }

    .hamburger {
        display: block; position: relative; width: 30px; height: 21px; z-index: 1001;
        cursor: pointer; background: none; border: none;
    }
    .hamburger span {
        display: block; position: absolute; left: 0; width: 100%; height: 3px;
        background-color: #fff; transition: all 0.4s; border-radius: 2px;
    }
    .header.scrolled .hamburger span, .hamburger.is-open span { background-color: var(--color-dark); }
    .hamburger span:first-child { top: 0; }
    .hamburger span:last-child { bottom: 0; }
    .hamburger.is-open span:first-child { top: 9px; transform: rotate(45deg); }
    .hamburger.is-open span:last-child { top: 9px; transform: rotate(-45deg); }

    /* 各セクションのモバイル対応 */
    .business__grid { grid-template-columns: 1fr; }
    .strength__grid { display: flex; flex-direction: column; }
    .strength__text-content { order: 1; }
    .strength__image-1 { order: 2; margin-top: 40px; }
    .strength__image-2, .strength__image-3 { display: none; } 
    .news__item a { flex-wrap: wrap; }
    .news__item time { width: 100%; margin-bottom: 5px; }
    .sitemap-list { column-count: 1; }
    .info-table th, .info-table td { display: block; width: 100%; }
    .info-table th { border-bottom: none; }
    .business-item, .business-item.reverse { flex-direction: column; }
    .business-item__img { margin-bottom: 30px; }
    .business-item__img, .business-item__text { width: 100%; }

    /* フッターのモバイル表示 */
    .footer__inner {
        flex-direction: column;
        text-align: center;
        border-bottom: none;
        padding-bottom: 0;
    }
    .footer__info {
        margin-bottom: 40px;
    }
    .footer__nav ul {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .footer__copyright {
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 40px;
    }
}