/* --- Reset & Base --- */
:root {
    /* 完全な黒ではなく、深い色味を入れる */
    --bg-color: #050505;
    --text-color: #ffffff;
    --text-muted: #aaaaaa;
    --accent-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --font-en: 'Montserrat', sans-serif;
    --font-ja: 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* 背景のゆらぎアニメーション */
    background: linear-gradient(135deg, #000000, #0a0a12, #050505, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    
    color: var(--text-color);
    font-family: var(--font-ja);
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* 横スクロール防止 */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Opening Animation --- */
.opening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1);
}

.opening-overlay.loaded {
    transform: translateY(-100%); /* 上にスライドして消える */
}

.opening-text {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 4rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.opening-text span {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: textAppear 0.8s forwards;
}

.opening-text span:nth-child(2) {
    animation-delay: 0.2s;
    margin-left: 1.5rem; /* 少しずらす */
}

@keyframes textAppear {
    to { opacity: 1; transform: translateY(0); }
}

/* モバイル向けオープニング調整 */
@media (max-width: 768px) {
    .opening-text { font-size: 2.5rem; }
}


/* --- Images & Hover Effects --- */
img {
    max-width: 100%;
    height: auto;
    display: block;
    /* 通常時：少し暗く、彩度を落とす */
    filter: brightness(0.8) saturate(0.5);
    transition: filter 0.5s ease, transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

/* ホバー時の演出：色が戻り、明るくなる */
.hover-trigger:hover img,
.service-card:hover img,
.hero:hover .hero__bg img {
    filter: brightness(1.1) saturate(1.1);
    transform: scale(1.03); /* ふわりと拡大 */
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s, color 0.3s;
}

a:hover {
    opacity: 0.8;
}

ul { list-style: none; }


/* --- Typography --- */
h1, h2, h3, h4, .section__label, .header__nav a, .btn-border, .btn-arrow {
    font-family: var(--font-en);
    text-transform: uppercase;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.2;
    background: linear-gradient(90deg, #fff, #999); /* 文字に微妙なグラデーション */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section__label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 3px;
    border-left: 1px solid var(--text-muted); /* ラベル横に線 */
    line-height: 1;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 140px 0;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 30px 40px;
    transition: padding 0.3s, background 0.3s;
}

.header.scrolled {
    padding: 15px 40px;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
}

.header__inner {
    display: flex;
    /* ここが重要：PCでは中央寄せ */
    justify-content: center; 
    align-items: center;
    gap: 80px; /* ロゴとメニューの間隔 */
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.header__logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    position: relative;
    top: -2px; 
}

.header__nav ul {
    display: flex;
    gap: 50px;
}

.header__nav a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    position: relative;
}

/* ナビゲーションのホバーライン */
.header__nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: #fff;
    transition: width 0.3s;
}
.header__nav a:hover::after { width: 100%; }

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero__content {
    text-align: center;
    z-index: 1;
}

.hero__title {
    font-family: var(--font-en);
    font-size: 7rem;
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: linear-gradient(180deg, #ffffff 0%, #aaaaaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__sub {
    font-family: var(--font-ja);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* --- Split Layout (About) --- */
.split-layout {
    display: flex;
    gap: 80px;
    align-items: center;
}

.split-layout__text { flex: 1; }

.split-layout__text p {
    margin-bottom: 2.5rem;
    color: #ccc;
    font-weight: 400;
    font-size: 1rem;
}

.split-layout__img {
    flex: 1.2;
    overflow: hidden;
    border-radius: 4px;
}

.btn-arrow {
    font-size: 0.9rem;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    position: relative;
}
.btn-arrow::after {
    content: '→';
    margin-left: 10px;
    transition: transform 0.3s;
    display: inline-block;
}
.btn-arrow:hover { border-bottom-color: #fff; }
.btn-arrow:hover::after { transform: translateX(5px); }


/* --- Services (Grid Layout 変更) --- */
.service-grid {
    display: grid;
    /* ここを変更: 3列から2列へ */
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.service-card {
    display: block;
    group: hover;
}

.service-card__img {
    height: 320px; /* 2列になるので高さを少し増やす */
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 4px;
}

.service-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card__text h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.service-card:hover .service-card__text h4 {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.service-card__text p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-border {
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 18px 60px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    margin-top: 60px;
    transition: all 0.3s;
}

.btn-border:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.text-center { text-align: center; }
.mt-5 { margin-top: 3rem; }

/* --- Footer --- */
.footer {
    padding: 100px 0 40px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.3);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
}

.footer__info address {
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 300;
    margin-top: 1.5rem;
    line-height: 1.8;
}

.footer__links ul { text-align: right; }
.footer__links li { margin-bottom: 15px; }
.footer__links a {
    font-family: var(--font-en);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    opacity: 0.7;
}
.footer__links a:hover { opacity: 1; }

.footer__copy {
    text-align: center;
    font-size: 0.75rem;
    color: #555;
    font-family: var(--font-en);
}

/* --- Hamburger & SP --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 102;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    position: absolute;
    right: 0;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); width: 70%; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); width: 100%; }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); width: 100%; }

.sp-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #050505;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.sp-nav.active { opacity: 1; pointer-events: auto; }

.sp-nav__list li {
    text-align: center;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s;
}

.sp-nav.active .sp-nav__list li { opacity: 1; transform: translateY(0); }
.sp-nav.active .sp-nav__list li:nth-child(1) { transition-delay: 0.1s; }
.sp-nav.active .sp-nav__list li:nth-child(2) { transition-delay: 0.2s; }
.sp-nav.active .sp-nav__list li:nth-child(3) { transition-delay: 0.3s; }
.sp-nav.active .sp-nav__list li:nth-child(4) { transition-delay: 0.4s; }

.sp-nav__list a {
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.sp-nav__info {
    position: absolute;
    bottom: 40px;
    width: 100%;
    text-align: center;
    color: #555;
    opacity: 0;
    transition: 0.5s 0.5s;
}
.sp-nav.active .sp-nav__info { opacity: 1; }

.sp-only { display: none; }


/* --- Animation Utilities --- */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }


/* --- Sub Page Header --- */
.page-header {
    position: relative;
    height: 50vh; /* トップページより低く */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
}
.page-header .hero__bg img {
    opacity: 0.4; /* 少し暗く */
}
.page-header .hero__title {
    font-size: 3.5rem;
    z-index: 1;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    background: none; /* トップページのグラデーション文字を解除 */
    -webkit-text-fill-color: #fff;
}

/* Company Profile Table */
.company-profile {
    border-top: 1px solid var(--border-color);
}
.profile-row {
    display: flex;
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
}
.profile-row dt {
    width: 200px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-ja);
}
.profile-row dd {
    flex: 1;
    font-weight: 400;
}


/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    /* Header Adjustment for Mobile */
    .header__inner {
        /* スマホではロゴとハンバーガーを離すために space-between に戻す */
        justify-content: space-between; 
        gap: 0;
    }
    
    .header__nav { display: none; }
    .hamburger { display: block; }
    
    /* Layout Adjustments */
    .hero__title { font-size: 3.8rem; margin-bottom: 1.5rem;}
    .section__title { font-size: 2rem; }
    
    .split-layout { flex-direction: column; gap: 40px; }
    /* スマホでも1列で大きく見せるため、repeat(1, 1fr)に変更 */
    .service-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .footer__inner { flex-direction: column; gap: 40px; }
    .footer__links ul { text-align: left; }
    
    .container { padding: 0 25px; }
    .sp-only { display: block; }

    /* Profile Adjustments */
    .profile-row { flex-direction: column; gap: 10px; }
    .page-header .hero__title { font-size: 2.5rem; }
}