@charset "UTF-8";

/* --- 1. 変数定義（Xserver風 高級感テックカラー） --- */
:root {
    --primary: #003580;       /* Xserver風の濃紺 */
    --primary-light: #004ba0; /* ホバー用 */
    --accent: #ff9900;        /* コンバージョン（オレンジ） */
    --text: #333333;
    --text-light: #666666;
    --bg-gray: #f7f9fb;
    --white: #ffffff;
    --border: #e1e4e8;
    --font-base: "Helvetica Neue", "Arial", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    --font-en: "Oswald", sans-serif; /* 英語用 */
}

body {
    font-family: var(--font-base);
    color: var(--text);
    background: var(--bg-gray);
    margin: 0;
    line-height: 1.8;
    padding-bottom: 70px; /* スマホフッター用 */
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.bg-white { background: var(--white); }

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

/* --- 3. ヘッダー --- */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 10px 0;
    position: sticky; top: 0; z-index: 1000;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* ロゴマーク（アイコン部分） */
.logo-mark {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #001f4d 100%); /* 深い青のグラデーション */
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px; /* 少し角丸 */
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(0, 53, 128, 0.25); /* 影で立体感 */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* テキストグループ */
.logo-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

/* メインロゴ「K-ANC」 */
.logo-main {
    font-family: "Oswald", sans-serif; /* 英語用フォントでスタイリッシュに */
    font-size: 1.8rem; /* 大きく */
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

/* サブテキスト（正式名称） */
.logo-sub {
    font-size: 0.5rem; /* 小さく */
    color: #889bb5;    /* クールなグレー */
    font-weight: bold;
    letter-spacing: 0.15em; /* 文字間を広げて高級感を出す */
    white-space: nowrap;    /* 改行させない */
}

.operator-badge {
    background: #f0f4f8; font-size: 0.65rem; padding: 3px 8px;
    border-radius: 4px; color: #555; margin-left: 10px; vertical-align: middle;
}

.pc-nav { display: flex; gap: 25px; align-items: center; }
.pc-nav a { font-size: 0.9rem; font-weight: bold; color: var(--primary); position: relative; }
.pc-nav a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: 0.3s;
}
.pc-nav a:hover::after { width: 100%; }
.nav-btn { background: var(--primary); color: var(--white) !important; padding: 10px 20px; border-radius: 4px; }
.nav-btn:hover { background: var(--primary-light); color: var(--white); }

/* ハンバーガー */
.hamburger { display: none; cursor: pointer; z-index: 2000; }
.hamburger span {
    display: block; width: 25px; height: 2px; background: var(--primary);
    margin: 5px 0; transition: 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ドロワーメニュー */
.sp-menu {
    position: fixed; top: 0; right: 0; width: 80%; max-width: 300px; height: 100vh;
    background: var(--primary); color: var(--white);
    transform: translateX(100%); transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1500; padding: 80px 30px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.sp-menu.active { transform: translateX(0); }
.sp-menu a {
    display: block; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: bold; font-size: 1rem;
}
.sp-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 1400;
    opacity: 0; pointer-events: none; transition: 0.3s;
}
.sp-overlay.active { opacity: 1; pointer-events: auto; }

/* --- 4. ヒーローエリア --- */
.hero {
    position: relative; height: 600px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--white);
}
.hero-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.slide-item {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease; transform: scale(1.1);
}
.slide-item.active { opacity: 1; transform: scale(1); transition: opacity 1.5s, transform 5s linear; }
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,53,128,0.85) 0%, rgba(0,25,60,0.7) 100%);
    z-index: 2;
}
.hero-content { position: relative; z-index: 3; width: 100%; padding: 40px 20px 50px; }
.hero h1 {
    font-size: 2.4rem; font-weight: 900; margin-bottom: 15px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3); letter-spacing: 0.05em;
}
.hero-lead { font-size: 1.1rem; margin-bottom: 40px; opacity: 0.9; }

/* 検索ボックス */
.hero-search-box {
    background: var(--white); max-width: 750px; margin: 0 auto; padding: 25px;
    border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 15px;
    transform: translateY(20px); opacity: 0; animation: fadeUp 1s forwards 0.5s;
}
@keyframes fadeUp { to { transform: translateY(0); opacity: 1; } }
.search-label { font-weight: bold; color: var(--primary); font-size: 1.1rem; }
.search-input { flex: 1; background: #f0f4f8; padding: 10px 15px; border-radius: 6px; color: #555; text-align: left; }
.btn-cv {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--accent); color: var(--white);
    padding: 12px 35px; font-weight: bold; border-radius: 50px;
    font-size: 1.1rem; box-shadow: 0 5px 15px rgba(255,153,0,0.3);
}
.btn-cv:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,153,0,0.4); }

/* --- 5. コンテンツエリア --- */
.section { padding: 80px 0; }

/* カード（選ばれる理由など） */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.card {
    background: var(--white); border-radius: 12px; padding: 35px 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid var(--border);
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-color: var(--primary); }
.card-icon { font-size: 2.5rem; margin-bottom: 20px; color: var(--primary); }
.card h3 { font-size: 1.3rem; margin-bottom: 15px; color: var(--primary); }

/* --- ★ここから復活・修正させたパーツ群 --- */

/* 実績カウンター */
.stats-section { background: var(--white); padding: 40px 0; border-bottom: 1px solid var(--border); }
.stats-grid { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-size: 2.5rem; font-weight: bold; color: var(--primary); font-family: var(--font-en); }
.stat-label { font-size: 0.9rem; color: #777; }

/* 料金表 */
.price-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--white); }
.price-table th { background: #f0f4f8; padding: 15px; border: 1px solid var(--border); color: var(--primary); font-weight: bold; }
.price-table td { padding: 15px; border: 1px solid var(--border); text-align: center; font-weight: bold; color: #333; }
.price-note { font-size: 0.8rem; color: #666; margin-top: 10px; text-align: right; }

/* 流れ（ステップ） */
.step-list { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; }
.step-item {
    background: var(--white); padding: 30px 20px; border-radius: 12px; flex: 1; text-align: center;
    border: 1px solid var(--border); position: relative;
}
.step-num {
    display: inline-block; background: var(--primary); color: var(--white);
    width: 35px; height: 35px; border-radius: 50%; line-height: 35px;
    font-weight: bold; margin-bottom: 15px; font-family: var(--font-en);
}

/* よくある質問 */
.faq-list { max-width: 800px; margin: 30px auto 0; }
.faq-item { background: var(--white); margin-bottom: 15px; padding: 25px; border-radius: 8px; border: 1px solid var(--border); }
.faq-q { font-weight: bold; color: var(--primary); display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 1.1rem; }
.faq-q::before { content: "Q."; background: var(--primary); color: var(--white); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; }
.faq-a { padding-left: 35px; color: #555; }

/* エリアタグ */
.area-box { background: var(--white); padding: 10px 10px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); }

/* グリッド表示に変更 */
.area-tags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* カード型リンク */
.tag.area-card-link {
    display: flex;
    flex-direction: column; /* 縦並び */
    align-items: flex-start;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    transition: 0.3s;
    text-decoration: none;
}

.tag.area-card-link:hover {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* 都市名と時間 */
.tag-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 8px;
}

.tag-name {
    font-weight: bold;
    color: var(--primary);
    font-size: 1rem;
}

.tag-time {
    font-size: 0.75rem;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    color: #555;
}

/* 駅名リスト（小さく表示） */
.tag-stations {
    font-size: 0.75rem;
    color: #777;
    line-height: 1.4;
    text-align: left;
}

/* スマホ調整 */
@media (max-width: 768px) {
    .area-tags {
        grid-template-columns: 1fr 1fr; /* スマホは2列 */
    }
    .tag-name { font-size: 0.9rem; }
    .tag-stations { font-size: 0.7rem; }
}

.tag {
    background: #f8f9fa; border: 1px solid #ddd; padding: 8px 15px;
    border-radius: 20px; font-size: 0.9rem; color: #555; display: flex; align-items: center; gap: 5px;
}
.tag:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.tag-time { font-size: 0.75rem; background: #eee; padding: 2px 6px; border-radius: 10px; color: #333; }

/* 求人詳細用パーツ */
.recruit-header { background: #222; color: var(--white); padding: 60px 0; text-align: center; margin-bottom: 40px; }
.recruit-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--white); }
.recruit-table th, .recruit-table td { border: 1px solid #ddd; padding: 15px; text-align: left; }
.recruit-table th { background: #f9f9f9; width: 30%; font-weight: bold; color: var(--primary); }
.job-card { border: 2px solid var(--primary); border-radius: 8px; overflow: hidden; margin-bottom: 30px; background: var(--white); }
.job-head { background: var(--primary); color: var(--white); padding: 15px; font-weight: bold; font-size: 1.2rem; }
.job-body { padding: 20px; }


/* --- 6. スマホ最適化 --- */
@media (max-width: 768px) {
    .pc-nav { display: none; }
    .hamburger { display: block; }
    .site-logo { font-size: 1rem; }

    .logo-mark {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .logo-main {
        font-size: 1.4rem;
    }
    .logo-sub {
        font-size: 0.4rem;
        letter-spacing: 0.05em;
    }
    .operator-badge { display: none; }

    .hero { height: 650px; padding-top: 40px; }
    .hero h1 { font-size: 1.5rem; line-height: 1.4; margin-bottom: 10px; }
    .hero-lead { font-size: 0.9rem; margin-bottom: 20px; text-align: left; }
    
    .hero-search-box { flex-direction: column; margin: 50px 0px; padding: 40px; width: 100%; gap: 15px; align-items: stretch; }
    .search-label { font-size: 1rem; text-align: center; }
    .btn-cv { width: 100%; padding: 15px; }

    .section { padding: 50px 0; }
    .card-grid { grid-template-columns: 1fr; gap: 20px; }
    .stats-grid { gap: 20px; }
    .step-list { flex-direction: column; }
    
    h2 { font-size: 1.5rem; }
    p { font-size: 0.95rem; text-align: left; }
    .area-tags .tag { font-size: 0.8rem; padding: 6px 12px; }
    
    /* 求人テーブルのスマホ対応 */
    .recruit-table th, .recruit-table td { display: block; width: 100%; box-sizing: border-box; }
    .recruit-table th { background: #eee; }
}

/* --- 固定フッター --- */
.fixed-footer {
    position: fixed; bottom: 0; left: 0; width: 100%; background: var(--white);
    border-top: 1px solid var(--border); display: flex; z-index: 2000;
    height: 65px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.ff-item {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
    border-right: 1px solid #eee; font-size: 0.7rem; color: #666; font-weight: bold;
}
.ff-item i { font-size: 1.2rem; margin-bottom: 3px; color: var(--primary); }
.ff-item.tel {
    flex: 1.6; background: var(--primary); color: var(--white);
    flex-direction: row; gap: 8px; font-size: 1rem; border: none;
}
.ff-item.tel i { color: var(--white); font-size: 1.2rem; margin: 0; }

/* --- 修正：スマホ表示の横揺れ・はみ出し防止 --- */

/* 1. 全ての要素のサイズ計算を「枠線を含めた幅」にする（必須） */
*, *::before, *::after {
    box-sizing: border-box;
}

/* 2. 画面全体の設定 */
html, body {
    width: 100%;
    overflow-x: hidden; /* 横へのはみ出しを強制的に隠す */
}

/* 3. スマホ時のボタンとテーブルの調整 */
@media (max-width: 768px) {
    /* コンテナ自体の余白を守る */
    .container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        overflow-x: hidden;
    }

    /* ボタンがはみ出さないように修正 */
    .btn-cv {
        width: 100% !important;     /* 幅いっぱい */
        max-width: 100%;            /* 親要素を超えない */
        box-sizing: border-box;     /* パディングを幅に含める（ここが重要） */
        margin-left: 0;
        margin-right: 0;
    }

    /* 料金表などがはみ出す場合の保険（横スクロール化） */
    .price-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap; /* 改行させない */
    }
}



/* --- ファーストビュー：Architectural Art Animation (Random Loop) --- */

.hero-svg-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; overflow: hidden;
    background: radial-gradient(circle at center, #003580 0%, #000c1f 100%);
}

.hero-svg {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
}

/* --- アニメーション定義（8秒ループ） --- */

@keyframes drawLoop {
    0% { stroke-dashoffset: 600; opacity: 0; }
    10% { opacity: 1; }
    40% { stroke-dashoffset: 0; } /* 描画完了 */
    80% { stroke-dashoffset: 0; opacity: 1; } /* 待機 */
    100% { stroke-dashoffset: 0; opacity: 0; } /* フェードアウト */
}

@keyframes nodeLoop {
    0% { transform: scale(0); opacity: 0; }
    40% { transform: scale(0); opacity: 0; } /* 線より少し遅れて出る */
    50% { transform: scale(1.5); opacity: 1; }
    60% { transform: scale(1); opacity: 1; }
    80% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

/* --- スタイル定義 --- */

.grid-line { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }

.art-pipe {
    fill: none;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.8));
    opacity: 0; /* 初期非表示 */
    /* 基本のアニメーション設定 */
    animation: drawLoop 8s cubic-bezier(0.2, 1, 0.3, 1) infinite;
}

.art-brace {
    fill: none;
    stroke: #ffaa00;
    stroke-width: 1.5;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    opacity: 0;
    animation: drawLoop 8s cubic-bezier(0.2, 1, 0.3, 1) infinite;
}

.art-node {
    fill: #fff;
    transform-origin: center;
    transform-box: fill-box;
    opacity: 0;
    animation: nodeLoop 8s ease-out infinite;
}

/* --- ランダム生成ロジック（ここがミソ） --- */
/* 数式を使って、要素ごとにタイミングをずらす */

/* パイプのランダム化 */
.art-pipe:nth-child(odd) { animation-delay: 0.2s; }
.art-pipe:nth-child(even) { animation-delay: 1.5s; }
.art-pipe:nth-child(3n) { animation-delay: 0.8s; }
.art-pipe:nth-child(5n) { animation-delay: 2.2s; }
.art-pipe:nth-child(7n) { animation-delay: 0.5s; }
.art-pipe:nth-child(2n+4) { animation-delay: 1.8s; }

/* 筋交い（ブレス）のランダム化 */
.art-brace:nth-child(odd) { animation-delay: 1.0s; }
.art-brace:nth-child(even) { animation-delay: 2.5s; }

/* ノード（光の点）のランダム化 */
.art-node:nth-child(odd) { animation-delay: 0.9s; }
.art-node:nth-child(even) { animation-delay: 2.0s; }
.art-node:nth-child(3n) { animation-delay: 1.4s; }
.art-node:nth-child(4n) { animation-delay: 2.8s; }

.hero-overlay { background: rgba(0, 10, 30, 0.3); }



.parallax-section {
    height: 400px;
    background-attachment: fixed; /* これがパララックスの肝 */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.parallax-overlay {
    background: rgba(0, 53, 128, 0.4); /* 青っぽいフィルター */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* スマホではパララックスを解除（重くなるため） */
@media (max-width: 768px) {
    .parallax-section {
        background-attachment: scroll;
        height: 250px;
    }
}



.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.work-item img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* 写真を枠に合わせてトリミング */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.work-item:hover img {
    transform: scale(1.02);
}
.work-item p {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #555;
}


/* お問い合わせエリア用のクラスを作る */
.cta-section {
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), 
                url('https://goom.xsrv.jp/ashiba-network/hero3.jpg'); /* 背景に写真を薄く敷く */
    background-size: cover;
    background-position: center;
    padding: 80px 0;
}


/* --- 背景テキスト（ランダム出現エフェクト） --- */

/* 親要素の基準設定 */
.section, .area-box {
    position: relative;
    overflow: hidden;
}

.bg-text-random {
    position: absolute;
    bottom: -10px;           /* 完全に下部に固定 */
    left: 0;
    width: 100%;
    text-align: center;
    
    font-size: 10vw;         /* 画面幅に合わせて巨大化 */
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    color: rgba(0, 0, 0, 0.04); /* かなり薄く */
    line-height: 0.8;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
}

/* 1文字ごとのスタイル（初期状態） */
.bg-text-random span {
    display: inline-block;
    opacity: 0;                  /* 見えない */
    transform: translateY(50px); /* 下に沈んでいる */
    filter: blur(10px);          /* ぼやけている */
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1); /* ヌルっと動く */
}

/* クラスがついた時のスタイル（出現状態） */
.bg-text-random.is-visible span {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* スマホ調整 */
@media (max-width: 768px) {
    .bg-text-random {
        font-size: 12vw; /* スマホだともっと大きく */
        bottom: 0;
    }
}


/* --- スマホ横揺れ・スクロール防止の強制修正 --- */

/* 全てのセクションで「はみ出し」を強制的に隠す */
section, .section, .area-box {
    overflow: hidden !important;
    position: relative; /* 念のため再指定 */
}

/* 背景テキストが暴れないように制限をかける */
.bg-text-random {
    max-width: 100%; /* 横幅を親要素に収める */
    overflow: hidden; /*念のため */
    pointer-events: none; /* スクロールの邪魔をさせない */
}