/* =========================================================
   Chepics コーポレートサイト — Dark Glow テーマ
   漆黒背景 × オレンジグロー × グラスモーフィズム。
   デザイントークンは :root のカスタムプロパティに集約。
   ========================================================= */

:root {
    /* フォント: Arial準拠(和文はヒラギノ/メイリオにフォールバック) */
    --font-base: Arial, Helvetica, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    /* 背景系: 真っ黒ではなく、ごく僅かに暖色に振った黒 */
    --bg-base: #0a0806;
    --bg-section: #0e0b08;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);

    /* アクセント: オレンジは4階調で「熱」を表現(deep=外縁 → core=中心のほぼ白) */
    --accent-deep: #c2410c;
    --accent: #f97316;
    --accent-bright: #fdba74;
    --accent-core: #fff7ed;
    --accent-glow: rgba(249, 115, 22, 0.35);

    /* サブアクセント(用途別カードなどで限定使用) */
    --sub-blue: #60a5fa;
    --sub-green: #4ade80;

    /* テキスト */
    --text-primary: #f5f0eb;
    --text-secondary: rgba(245, 240, 235, 0.65);
    --text-muted: rgba(245, 240, 235, 0.4);

    /* 枠線・ガラス */
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-glass-strong: rgba(251, 146, 60, 0.3);

    /* 形状 */
    --radius-card: 16px;
    --radius-pill: 999px;

    /* データ可視化用(セットA/B/Cの3値) */
    --viz-a: #f97316;
    --viz-b: #60a5fa;
    --viz-c: #6b7280;

    --section-gap: clamp(40px, 5.5vw, 72px);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: min(1120px, 100% - 48px);
    margin-inline: auto;
}

section { position: relative; }

/* ---------- 背景装飾 ---------- */
.glow-field {
    position: absolute; inset: 0;
    pointer-events: none; overflow: hidden;
}
.glow-field::before {
    content: ''; position: absolute;
    width: 800px; height: 800px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    filter: blur(60px);
    opacity: 0.55;
}
.glow-hero::before { top: -480px; right: -480px; opacity: 0.4; }
.glow-mission::before { top: calc(50% - 400px); left: -400px; opacity: 0.4; }
.glow-cta::before { bottom: -400px; left: -200px; opacity: 0.5; }

/* 粒子ネットワーク背景: js/particles-bg.js(共通パーツ)がスタイルごと注入
   (フッターなど不透明背景のセクションで覆う) */

/* 同心円オービット */
.orbit-field {
    position: absolute; pointer-events: none;
}
.orbit {
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(249, 115, 22, 0.15);
}
.orbit-dot {
    position: absolute; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-bright);
    box-shadow: 0 0 12px var(--accent-glow), 0 0 4px var(--accent-bright);
}

/* ---------- 共通パーツ ---------- */
.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-family: var(--font-base);
    font-size: clamp(2.2rem, 4.4vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-base);
    font-weight: 900;
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.section-lead {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 640px;
    margin-top: 20px;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--radius-pill);
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-base);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--accent-glow), 0 0 24px var(--accent-glow);
}
/* 塗りつぶし型CTA: カプセルがプライマリーカラー単色、文字は白 */
.btn-solid-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-solid-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px var(--accent-glow);
}
/* アウトライン型CTA: 文字と枠線がプライマリーカラー、背景は透過 */
.btn-accent-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}
.btn-accent-outline:hover {
    background: rgba(249, 115, 22, 0.1);
    box-shadow: 0 0 24px var(--accent-glow);
    transform: translateY(-2px);
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.text-link {
    color: var(--accent-bright);
    font-weight: 700;
    border-bottom: 1px solid var(--border-glass-strong);
    padding-bottom: 2px;
    transition: opacity 0.2s ease;
}
.text-link:hover { opacity: 0.75; }

/* ---------- ヘッダー ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(10, 8, 6, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
}
.site-header-inner {
    width: min(1120px, 100% - 48px);
    margin-inline: auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
}
.site-logo img { height: 30px; width: auto; }
.site-nav {
    display: flex; align-items: center; gap: 32px;
    font-size: 0.9rem; font-weight: 500;
    font-family: var(--font-base);
}
.site-nav a { color: var(--text-secondary); transition: color 0.2s ease; }
.site-nav a:hover { color: var(--text-primary); }
.site-nav .btn { padding: 10px 24px; font-size: 0.85rem; }

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 40px; height: 40px;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text-primary); border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- ヒーロー ---------- */
.hero {
    position: relative;
    /* ヒーローのみ間隔を詰める前の余白を維持する(--section-gapに追従させない) */
    padding: calc(68px + clamp(80px, 12vw, 140px)) 0 clamp(80px, 12vw, 160px);
    overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; width: min(1120px, 100% - 48px); margin-inline: auto; }
.hero-copy { max-width: 640px; }
.hero-title {
    font-family: var(--font-base);
    font-weight: 800;
    font-size: clamp(2.2rem, 5.5vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
/* h1 内のブランド表記。見出し本体より小さく、eyebrow と同じトーンで見せる */
.hero-title .hero-brand {
    display: block;
    color: var(--accent);
    font-size: clamp(0.95rem, 1.6vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    margin-bottom: 14px;
}
.hero-title .accent {
    display: block;
    white-space: nowrap; /* "pick your future" は改行させず1行で見せる */
    color: var(--accent);
    text-shadow: 0 0 60px var(--accent-glow);
}
.hero-lead {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 2;
    margin-top: 28px;
    max-width: 480px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.hero-actions {
    display: flex; flex-wrap: wrap; gap: 16px;
    margin-top: 40px;
}

/* ストアバッジ(App Store / Google Play) */
.hero-stores {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin-top: 44px;
}
.hero-stores img { height: 48px; width: auto; }

/* 手前をゆっくり上昇する微細パーティクル */
.hero-particles {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ヒーロー右のロゴアニメーション(Lottie) */
.hero-anim {
    position: absolute;
    right: clamp(24px, 8vw, 140px);
    top: 50%;
    transform: translateY(-50%);
    width: clamp(280px, 34vw, 480px);
    aspect-ratio: 1;
    pointer-events: none;
    z-index: 1;
}

/* ---------- ミッション ---------- */
.mission { padding: var(--section-gap) 0; overflow: hidden; }
.mission-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px; align-items: center;
    position: relative; z-index: 2;
}
.mission-copy .text-link { display: inline-block; margin-top: 28px; }

/* ハブ&スポーク図解 */
.hub-figure {
    position: relative;
    aspect-ratio: 1;
    max-width: 440px;
    margin-inline: auto;
    width: 100%;
}
.hub-figure .orbit { border-color: rgba(249, 115, 22, 0.12); }
.hub-orbit-1 { inset: 12%; }
.hub-orbit-2 { inset: -2%; }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-lines line { stroke: rgba(249, 115, 22, 0.35); stroke-width: 1; }
.hub-center {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 110px; height: 110px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(251, 146, 60, 0.25), rgba(10, 8, 6, 0.9) 70%);
    border: 1px solid var(--border-glass-strong);
    box-shadow: 0 0 60px var(--accent-glow), inset 0 0 24px rgba(249, 115, 22, 0.2);
    display: flex; align-items: center; justify-content: center;
}
.hub-center img { width: 64%; height: auto; }
.hub-node {
    position: absolute;
    width: 78px; height: 78px; border-radius: 50%;
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-glass-strong);
    box-shadow: 0 0 24px rgba(249, 115, 22, 0.12), inset 0 0 12px rgba(249, 115, 22, 0.06);
    backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    font-family: var(--font-base);
    font-size: 0.68rem; font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}
/* 線画アイコン(画像・絵文字は使わない) */
.hub-node svg {
    width: 22px; height: 22px;
    fill: none;
    stroke: var(--accent-bright);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hub-node-1 { top: 0; left: 50%; transform: translate(-50%, 0); }
.hub-node-2 { top: 50%; right: 0; transform: translate(0, -50%); }
.hub-node-3 { bottom: 0; left: 50%; transform: translate(-50%, 0); }
.hub-node-4 { top: 50%; left: 0; transform: translate(0, -50%); }

/* ---------- 事業内容 ---------- */
.how { padding: var(--section-gap) 0; }
.how-head { text-align: center; }
.how-head .section-lead { margin-inline: auto; }
.biz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 56px;
}
.biz-card {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: 28px;
    transition: background 0.25s ease, transform 0.25s ease;
}
.biz-card:hover { background: var(--bg-card-hover); transform: translateY(-4px); }
.biz-mock {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    height: 170px;
    padding: 16px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
/* セル左の画像: ロゴは余白を持ってcontain、写真は枠いっぱいにcover */
.biz-mock-logo img {
    max-width: 60%;
    max-height: 72%;
    width: auto; height: auto;
    object-fit: contain;
}
.biz-mock-photo { padding: 0; }
.biz-mock-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.biz-actions {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-top: 22px;
}
.biz-actions .btn {
    white-space: normal;
    text-align: center;
    padding: 12px 24px;
    font-size: 0.9rem;
}
.biz-card h3 {
    font-family: var(--font-base);
    font-weight: 700; font-size: 1.25rem;
    margin-top: 12px;
}
.biz-card p {
    font-size: 0.9rem; color: var(--text-secondary);
    margin-top: 12px;
}
.biz-card .text-link {
    display: inline-block;
    margin-top: 22px;
    font-size: 0.9rem;
}
/* ---------- 数字で見る: js/stats-section.js(共通パーツ)がスタイルごと注入 ---------- */

/* ---------- ニュース ---------- */
.news { padding: var(--section-gap) 0; }
.news-head { text-align: center; }
.news-list { margin-top: 48px; display: grid; gap: 14px; }
.news-item {
    display: block;
    padding: 22px 26px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.news-item:hover { background: var(--bg-card-hover); border-color: var(--border-glass-strong); }
.news-meta { display: flex; align-items: center; gap: 12px; }
.news-date {
    font-family: var(--font-base);
    font-size: 0.8rem; color: var(--text-muted);
}
.news-tag {
    font-size: 0.7rem; font-weight: 700;
    font-family: var(--font-base);
    color: var(--accent-bright);
    border: 1px solid var(--border-glass-strong);
    border-radius: var(--radius-pill);
    padding: 2px 12px;
}
.news-title {
    font-family: var(--font-base);
    font-size: 1rem; font-weight: 700;
    margin-top: 8px;
}
.news-summary {
    font-size: 0.85rem; color: var(--text-secondary);
    margin-top: 6px;
}
.news-state {
    text-align: center; color: var(--text-muted);
    font-family: var(--font-base);
    margin-top: 40px;
}

/* ---------- 最終CTAバンド ---------- */
.cta { padding: var(--section-gap) 0; }
.cta-band {
    position: relative;
    border-radius: 24px;
    border: 1px solid var(--border-glass-strong);
    background:
        radial-gradient(ellipse 90% 120% at 80% 120%, rgba(249, 115, 22, 0.22), transparent 60%),
        radial-gradient(ellipse 70% 100% at 10% -30%, rgba(249, 115, 22, 0.12), transparent 60%),
        var(--bg-section);
    overflow: hidden;
    padding: clamp(56px, 8vw, 96px) 32px;
    text-align: center;
}
.cta-band .cta-logo {
    position: absolute;
    right: -60px; top: 50%;
    transform: translateY(-50%);
    width: 320px;
    opacity: 0.07;
    pointer-events: none;
}
.cta-band h2 {
    font-family: var(--font-base);
    font-weight: 900;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
    position: relative;
}
.cta-band p {
    color: var(--text-secondary);
    margin-top: 16px;
    position: relative;
}
.cta-band .btn { margin-top: 36px; position: relative; }

/* ---------- フッター ---------- */
.site-footer {
    background: #070503;
    border-top: 1px solid var(--border-glass);
    padding: 64px 0 32px;
    font-family: var(--font-base);
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}
.footer-brand img { height: 28px; width: auto; }
.footer-brand p {
    color: var(--text-muted); font-size: 0.85rem;
    margin-top: 16px;
}
.footer-stores {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-top: 20px;
}
.footer-stores img { height: 40px; width: auto; }
.footer-nav {
    display: flex; flex-wrap: wrap; align-items: center;
    column-gap: 32px; row-gap: 12px;
    font-size: 0.9rem;
    padding-top: 6px;
}
.footer-nav a { color: var(--text-secondary); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--accent-bright); }
.footer-bottom {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: var(--font-base);
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 960px) {
    .mission-grid { grid-template-columns: 1fr; }
    .cta-band .cta-logo { width: 220px; right: -80px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: rgba(10, 8, 6, 0.97);
        border-bottom: 1px solid var(--border-glass);
        padding: 12px 24px 20px;
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--border-glass); }
    .site-nav .btn { margin-top: 16px; border-bottom: none; }


    /* モバイルはロゴを上、メッセージを下に縦積み */
    .hero {
        display: flex;
        flex-direction: column;
    }
    .hero-anim {
        position: relative;
        right: auto; top: auto;
        transform: none;
        order: -1;
        margin: 0 auto 8px;
        width: min(240px, 58vw);
    }

    .footer-grid { flex-direction: column; gap: 28px; }

    .hub-figure { max-width: 340px; }
    .hub-node { width: 66px; height: 66px; font-size: 0.6rem; gap: 3px; }
    .hub-node svg { width: 18px; height: 18px; }

    /* 事業カードはモバイルで縦積み */
    .biz-card { grid-template-columns: 1fr; gap: 20px; }

    .cta-band h2 { font-size: clamp(1.35rem, 5.8vw, 1.6rem); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- 言語切替(ヘッダー) ---------- */
.lang-switch select {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
}
.lang-switch select:focus { outline: 1px solid var(--border-glass-strong); }
.lang-switch option { background: var(--bg-section); color: var(--text-primary); }

/* ---------- スクロール表示(i18n.jsが .visible を付与) ---------- */
.fade-in {
    opacity: 0;
    translate: 0 14px;
    transition: opacity 0.6s ease, translate 0.6s ease;
}
.fade-in.visible { opacity: 1; translate: 0 0; }

/* ハンバーガー開閉アイコン(navの.openに追従) */
.site-header-inner:has(.site-nav.open) .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header-inner:has(.site-nav.open) .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header-inner:has(.site-nav.open) .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .site-nav .lang-switch { padding: 14px 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in { opacity: 1; translate: 0 0; transition: none; }
}

/* ユーティリティ */
.mx-auto { margin-inline: auto; }
.news-head { text-align: center; }
