/* ==========================================================================
   Variables & Reset (共通設定)
   ========================================================================== */
:root {
    /* --- コーポレートカラー定義 (PDF準拠) --- */
    --color-primary: #23a5bb;        /* 水色：メインカラー（ヘッダー・フッター・通常ボタン） */
    --color-corporate-blue: #003668; /* 紺色：ベースカラー（見出し・背景・ホバー色） */
    --color-accent: #e84233;         /* オレンジ：アクセント（CVボタン・強調） */

    /* --- 派生カラー（ホバー時の色など） --- */
    --color-accent-hover: #c9302c;   /* オレンジボタンのホバー色（少し濃く） */
    --color-btn-white-hover: #f0f0f0; /* 白ボタンのホバー色（薄いグレー） */
    
    /* --- テキスト・背景・境界線 --- */
    --color-text-main: #333;         /* テキスト：黒 */
    --color-text-light: #666;        /* テキスト：グレー */
    --color-bg-body: #fff;           /* 背景：白 */
    --color-bg-light: #f4f7f6;       /* 背景：薄いグレー */
    --color-bg-dark: #1a1a1a;        /* 背景：黒（汎用） */
    --color-bg-placeholder: #ccc;    /* 画像プレースホルダー背景 */
    
    --color-white: #fff;             /* 白 */
    --color-border: #e0e0e0;         /* 通常の境界線 */
    --color-border-on-dark: rgba(255,255,255,0.1); /* 暗い背景上の境界線 */

    /* --- フォント・サイズ設定 --- */
    --font-base: "Noto Sans JP", "Inter", sans-serif;
    
    --spacing-md: 1.5rem;
    --spacing-lg: 4rem; /* PC用余白 */
    --spacing-lg-sp: 3rem; /* スマホ用余白 */
    --container-width: 1080px;
    --radius-base: 6px;
    --header-height: 70px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-text-main);
    line-height: 1.6;
    background-color: var(--color-bg-body);
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

/* スマホでの改行制御クラス */
.u-pc-only { display: block; }
@media (max-width: 768px) {
    .u-pc-only { display: none; }
}

/* ==========================================================================
   Layout (レイアウト)
   ========================================================================== */
.l-container {
    width: 90%;
    max-width: var(--container-width);
    margin-inline: auto;
}
.l-container--narrow { max-width: 700px; }

/* Header */
/* ==========================================================================
   Header (独立・浮遊・追従型へ変更)
   ========================================================================== */
.l-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    
    /* ★ここが変更ポイント */
    position: sticky;                  /* スクロールに追従 */
    top: 1rem;                         /* 画面上端から少し空ける */
    margin: 1rem auto;                 /* 上下左右に隙間を作る */
    width: 95%;                        /* 横幅を少し縮める */
    max-width: var(--container-width); /* コンテンツ幅に合わせる */
    border-radius: var(--radius-base); /* 角を丸くする */
    box-shadow: 0 4px 20px var(--color-shadow); /* 影をつけて浮かせる */
    background: var(--color-bg-body); 
    color: var(--color-primary); 
    z-index: 1000;
    /* ボーダーは削除（浮いているため不要） */
    border-bottom: none;
}

.l-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   Hamburger Menu & Nav (レスポンシブ対応)
   ========================================================================== */

/* デフォルト（PC表示） */
.l-nav__list { 
    display: flex; 
    gap: 1.5rem; 
    align-items: center; 
    font-size: 0.9rem; 
    font-weight: 700; 
}
.c-hamburger { display: none; }

/* スマホ表示 (768px以下) */
@media (max-width: 768px) {
    .c-hamburger {
        display: block;
        width: 30px;
        height: 30px;
        position: relative;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 0;
    }
    .c-hamburger__line {
        position: absolute;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--color-white);
        transition: 0.3s;
        border-radius: 2px;
    }
    .c-hamburger__line:nth-child(1) { top: 4px; }
    .c-hamburger__line:nth-child(2) { top: 14px; }
    .c-hamburger__line:nth-child(3) { bottom: 4px; }

    .c-hamburger.is-active .c-hamburger__line:nth-child(1) {
        top: 14px;
        transform: rotate(45deg);
    }
    .c-hamburger.is-active .c-hamburger__line:nth-child(2) {
        opacity: 0;
    }
    .c-hamburger.is-active .c-hamburger__line:nth-child(3) {
        bottom: 14px;
        transform: rotate(-45deg);
    }

    .l-nav {
        position: fixed;
        /* ★変更：ヘッダーの下ではなく画面一番上から覆う */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* 画面全体の高さ */
        
        background: var(--color-primary);
        
        /* ★変更：中身がヘッダーと被らないように余白を足す */
        padding-top: calc(var(--header-height) + 3rem);
        padding-inline: 2rem;
        
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 999; /* ヘッダー(1000)より後ろ、またはハンバーガー(1001)より後ろ */
    }

    .l-nav.is-active {
        transform: translateX(0);
    }

    .l-nav__list {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        font-size: 1.1rem;
    }
    .l-nav__link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }
}

/* ==========================================================================
   Components (コンポーネント)
   ========================================================================== */
.c-logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    height: 100%;
    z-index: 1001;
}
.c-logo__image {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* ボタン設定 */
.c-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.8em 2em;
    border-radius: var(--radius-base);
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, opacity 0.3s;
}

/* 通常ボタン：水色 -> ホバーでオレンジ（アクセント） */
.c-btn--primary { 
    background: var(--color-primary); 
    color: var(--color-white); 
}
.c-btn--primary:hover { 
    background: var(--color-accent);
}

/* アクセントボタン（オレンジ） */
.c-btn--accent {
    background: var(--color-accent);
    color: var(--color-white);
}
.c-btn--accent:hover {
    /* ★修正：直接指定を排除 */
    background: var(--color-accent-hover);
    opacity: 1;
}

/* 白ボタン：白 -> ホバーで薄グレー（文字は水色） */
.c-btn--white {
    background: var(--color-white);
    color: var(--color-primary);
}
.c-btn--white:hover {
    /* ★修正：直接指定を排除 */
    background: var(--color-btn-white-hover);
}
.c-btn--large { padding: 1em 3em; }
.c-btn--wide { width: 100%; }

/* 見出し */
.c-heading { 
    font-size: clamp(1.75rem, 5vw, 2rem); 
    margin-bottom: 2rem; 
    text-align: center; 
    color: var(--color-corporate-blue);
    position: relative;
    padding-bottom: 10px;
}
/* 下線の設定 */
.c-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.c-heading--white { color: var(--color-white); }

/* スローガン */
.c-slogan {
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-corporate-blue);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    font-family: var(--font-base);
    text-align: center; 
}

.c-lead-text { font-size: clamp(1rem, 3vw, 1.2rem); text-align: center; margin-bottom: 2rem; }
.c-text-white { color: var(--color-white); }
.c-text-center { text-align: center; }

/* 必須バッジ */
.c-badge-required {
    font-size: 0.75rem;
    background: var(--color-accent);
    /* ★修正：直接指定を排除 */
    color: var(--color-white);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5em;
    vertical-align: middle;
}

/* ==========================================================================
   Project Specifics
   ========================================================================== */
.p-section { padding-block: var(--spacing-lg); }
@media (max-width: 768px) {
    .p-section { padding-block: var(--spacing-lg-sp); }
}

.p-section--bg-light { background: var(--color-bg-light); }
/* コンタクト背景：水色単色 */
.p-section--dark {
    background: var(--color-primary);
}

/* Hero */
.p-hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-corporate-blue));
    color: var(--color-white);
    padding: 6rem 0;
    text-align: center;
}
@media (max-width: 768px) { .p-hero { padding: 4rem 0; } }

.p-hero__title { font-size: clamp(1.8rem, 6vw, 3.5rem); margin-bottom: 1rem; line-height: 1.3; }

/* Grid for Services */
.p-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.c-card {
    /* ★修正：直接指定を排除 */
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-base);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* 影は透明度が絡むため今回は許容 */
    display: flex;
    flex-direction: column;
    height: 100%;
}
.c-card__image-wrapper {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
    /* ★修正：#f4f4f4 を既存の var(--color-bg-light) に統一 */
    background-color: var(--color-bg-light);
}
.c-card__image {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    display: block;
}
.c-card__title {
    color: var(--color-corporate-blue); 
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}
.c-card__text {
    font-size: 0.95rem;
    color: var(--color-text-main);
    margin-bottom: 0;
    flex-grow: 1;
}

/* Stats for Achievements */
.p-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    text-align: center;
}
@media (max-width: 768px) {
    .p-stats { gap: 2rem; flex-direction: column; }
}
.p-stats__item { display: flex; flex-direction: column; }
.p-stats__number { 
    font-size: 3.5rem; 
    font-weight: 700; 
    color: var(--color-corporate-blue); 
    line-height: 1; 
}

.p-stats__label { font-size: 0.9rem; color: var(--color-text-light); margin-top: 0.5rem; }

/* List Check */
.p-list-check { max-width: 700px; margin: 0 auto; }
.p-list-check li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 0.8em;
}
.p-list-check li::before {
    content: "✔";
    color: var(--color-accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Split Layout */
.p-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media(min-width: 768px) { .p-split { grid-template-columns: 1fr 1fr; } }

.c-placeholder-img {
    /* ★修正：直接指定を排除 */
    background: var(--color-bg-placeholder);
    aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-base);
    /* ★修正：直接指定を排除 */
    color: var(--color-text-light);
}
.p-rep-name { font-size: 1.5rem; margin-top: 0; }
.p-rep-name__en { font-size: clamp(1.5rem, 5vw, 3rem); color: var(--color-text-main); margin-left: 0.5rem; display: inline-block; }

/* Definition List */
.c-definition-list { border-top: 1px solid var(--color-border); }
.c-definition-list__row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}
.c-definition-list dt { width: 100%; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-corporate-blue); }
.c-definition-list dd { width: 100%; margin: 0; }

@media(min-width: 600px) {
    .c-definition-list dt { width: 30%; margin-bottom: 0; }
    .c-definition-list dd { width: 70%; }
}

/* Form */
.p-form { 
    /* ★修正：直接指定を排除 */
    background: var(--color-white); 
    padding: 2rem; 
    border-radius: var(--radius-base); 
}
@media (max-width: 768px) { .p-form { padding: 1.5rem; } }

.p-form__group { margin-bottom: 1.5rem; }
.p-form__label { display: block; margin-bottom: 0.5rem; font-weight: 700; color: var(--color-text-main); }
.p-form__input, .p-form__textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    appearance: none;
}
.p-form__input:focus, .p-form__textarea:focus {
    outline: 2px solid var(--color-primary);
    border-color: transparent;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.l-footer {
    background-color: var(--color-primary); 
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
}

.l-footer__logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.l-footer__logo img {
    display: block;
    margin: 0 auto;
}

.l-footer__copyright {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}