/* ===== 基本設定とCSS変数 ===== */
:root {
    --primary-color: #2c405e;
    --primary-dark: #1a2a40;
    --primary-light: #e8edf3;
    --accent-color: #d4a23f;
    --accent-hover: #b8881f;
    --problem-color: #c0392b;
    --problem-light: #fdf2f1;
    --ideal-color: #1e7d5a;
    --ideal-light: #eef7f3;
    --text-color: #333333;
    --text-light: #666666;
    --bg-white: #FFFFFF;
    --bg-light: #f5f6f8;
    --border-color: #dde1e7;
    --header-height: 70px;
}

/* ===== リセット ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--bg-white);
    overflow-x: hidden;
    width: 100%;
    /* iOS Safariの横スクロール根本対策 */
    position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: var(--primary-color); }
ul { list-style: none; }

/* ===== レイアウト ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}
section { padding: 90px 0; }
.bg-light { background-color: var(--bg-light); }
.text-left { text-align: left !important; }
.text-white { color: #fff !important; }

/* ===== タイポグラフィ ===== */
h1, h2, h3 { font-weight: 700; line-height: 1.4; color: var(--primary-dark); }
.section-header { text-align: center; margin-bottom: 50px; }
.sub-title { display: inline-block; font-size: 0.9rem; font-weight: 900; color: var(--primary-color); letter-spacing: 0.1em; margin-bottom: 10px; }
.section-title { font-size: 2.2rem; }
.section-lead { font-size: 1.05rem; color: var(--text-light); margin-top: 12px; }
.sp-only { display: none; }
.pc-only { display: block; }

/* ===== ステップバッジ ===== */
.step-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 14px;
}
.step-badge--problem { background-color: var(--problem-light); color: var(--problem-color); border: 1.5px solid rgba(192,57,43,0.2); }
.step-badge--ideal { background-color: var(--ideal-light); color: var(--ideal-color); border: 1.5px solid rgba(30,125,90,0.2); }

/* ===== ボタン ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 32px; font-size: 1rem; font-weight: 700; border-radius: 8px; transition: all 0.3s ease; cursor: pointer; border: none; text-align: center; }
.btn-small { padding: 10px 20px; font-size: 0.9rem; }
.btn-large { padding: 18px 48px; font-size: 1.1rem; border-radius: 50px; }
.btn-primary { background-color: var(--accent-color); color: #fff; box-shadow: 0 4px 14px rgba(212,162,63,0.3); }
.btn-primary:hover { transform: translateY(-3px); background-color: var(--accent-hover); }
/* シャインアニメーションはclip-pathで封じる */
.btn-shiny { position: relative; overflow: hidden; }
.btn-shiny::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 30%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-200%) skewX(-15deg);
    animation: shine 3s infinite;
}
@keyframes shine {
    0%   { transform: translateX(-200%) skewX(-15deg); }
    20%  { transform: translateX(800%) skewX(-15deg); }
    100% { transform: translateX(800%) skewX(-15deg); }
}

/* ===== ヘッダー ===== */
.header { width: 100%; height: var(--header-height); background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); position: fixed; top: 0; left: 0; z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 1.5rem; font-weight: 900; color: var(--primary-color); display: flex; align-items: center; gap: 8px; }
.logo-svg { height: 36px; width: auto; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 12px 8px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 0; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--primary-dark); margin: 5px 0; transition: 0.3s; pointer-events: none; }

/* ===== ヒーロー ===== */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    background-color: #1a2a40;
    overflow: hidden;
    /* glowのはみ出しをブロック */
    clip-path: inset(0);
}
.hero-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    /* 固定px → vwベースに変更 */
}
.glow-1 { top: -10%; left: -10%; width: min(500px, 60vw); height: min(500px, 60vw); background: var(--primary-color); }
.glow-2 { bottom: -20%; right: -10%; width: min(600px, 70vw); height: min(600px, 70vw); background: var(--accent-color); opacity: 0.2; }
.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    /* Safariのgridオーバーフロー対策 */
    min-width: 0;
}
.hero-content > * { min-width: 0; }
.hero-text { color: #fff; min-width: 0; }
.hero h1 { font-size: 2.4rem; color: #fff; margin-bottom: 24px; line-height: 1.35; font-weight: 900; word-break: auto-phrase; overflow-wrap: break-word; }
.hero h1 .accent { background: linear-gradient(90deg, #a8c5e8 0%, #c9dff0 45%, var(--accent-color) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.hero-desc { font-size: 1rem; color: rgba(255,255,255,0.8); margin-bottom: 40px; line-height: 1.8; }
.hero-stats { display: flex; align-items: center; background: rgba(0,0,0,0.2); border-radius: 12px; padding: 20px; margin-bottom: 40px; border: 1px solid rgba(255,255,255,0.05); }
.stat-item { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stat-title { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.stat-sub { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); margin: 0 16px; flex-shrink: 0; }
.hero-visual { display: flex; align-items: center; justify-content: center; min-width: 0; }
.hero-image { width: 100%; max-width: 480px; transition: transform 0.4s ease; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); }
.hero-image:hover { transform: translateY(-10px); }
.cta-note { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 10px; }

/* ===== 現状×理想 2カラム ===== */
.reality-section { background-color: var(--bg-light); }
.reality-grid {
    display: grid;
    grid-template-columns: 1fr 72px 1fr;
    align-items: stretch;
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    margin-bottom: 40px;
    width: 100%;
    /* Safariのgridバグ対策 */
    min-width: 0;
}
.reality-grid > * { min-width: 0; }
.reality-col { padding: 40px; min-width: 0; }
.reality-col--now { border-top: 4px solid var(--problem-color); }
.reality-col--ideal { border-top: 4px solid var(--ideal-color); }
.reality-col-header { margin-bottom: 20px; }
.reality-col-header h3 { font-size: 1.05rem; color: var(--text-color); margin-top: 10px; font-weight: 700; }
.reality-items { display: flex; flex-direction: column; gap: 12px; }
.reality-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}
.reality-vs { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.75rem; font-weight: 900; color: var(--text-light); }
.reality-arrow { font-size: 1.4rem; color: var(--accent-color); }

/* アイテム */
.reality-item { padding: 14px 16px; border-radius: 10px; }
.reality-item--problem { background: #fff5f4; border: 1px solid rgba(192,57,43,0.15); }
.reality-item--ideal { background: #f0faf6; border: 1px solid rgba(30,125,90,0.15); }
.reality-item strong { display: block; font-size: 0.94rem; margin-bottom: 6px; line-height: 1.5; }
.reality-item--problem strong { color: var(--problem-color); }
.reality-item--ideal strong { color: var(--ideal-color); }
.reality-item p { font-size: 0.87rem; color: var(--text-light); line-height: 1.75; margin: 0; }

/* 吹き出し */
.speech-bubble-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.speech-bubble-top-icon {
    font-size: 1.4rem; flex-shrink: 0;
    width: 44px; height: 44px;
    background: rgba(192,57,43,0.08);
    border: 1.5px solid rgba(192,57,43,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.speech-bubble-top-balloon {
    position: relative;
    background: #fff;
    border: 1.5px solid rgba(192,57,43,0.25);
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 0;
    flex: 1;
}
.speech-bubble-top-tail {
    position: absolute;
    top: 50%; left: -9px;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 9px solid rgba(192,57,43,0.25);
}
.speech-bubble-top-tail::after {
    content: '';
    position: absolute;
    top: -6px; left: 2px;
    width: 0; height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #fff;
}
.speech-bubble-top-text { font-size: 0.88rem; font-weight: 700; color: var(--problem-color); line-height: 1.6; font-style: italic; }

/* 理想側吹き出し */
.speech-bubble-top--ideal .speech-bubble-top-icon { background: rgba(30,125,90,0.08); border-color: rgba(30,125,90,0.2); }
.speech-bubble-top-balloon--ideal { border-color: rgba(30,125,90,0.25); }
.speech-bubble-top-tail--ideal { border-right-color: rgba(30,125,90,0.25); }
.speech-bubble-top-tail--ideal::after { border-right-color: #fff; }
.speech-bubble-top-text--ideal { color: var(--ideal-color); }

/* ===== ギャップセクション ===== */
.gap-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #223355 50%, var(--primary-dark) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.gap-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(44,64,94,0.3) 0%, transparent 70%);
    pointer-events: none;
}
.gap-inner { display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.gap-lead { font-size: 1rem; color: rgba(255,255,255,0.6); margin-bottom: 12px; text-align: center; }
.gap-text { color: #fff; text-align: center; }
.gap-text h2 { color: #fff; font-size: 2.1rem; margin-bottom: 28px; line-height: 1.4; }
.gap-reasons { display: flex; flex-direction: column; gap: 16px; margin-bottom: 4px; text-align: left; }
.gap-reason { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 18px 20px; }
.gap-reason-x { width: 28px; height: 28px; background: rgba(192,57,43,0.3); color: #f87171; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.9rem; flex-shrink: 0; margin-top: 2px; }
.gap-reason strong { display: block; color: #fff; font-size: 0.97rem; margin-bottom: 6px; }
.gap-reason p { font-size: 0.88rem; color: rgba(255,255,255,0.6); line-height: 1.7; margin: 0; }
.gap-bridge-arrow { font-size: 2rem; color: var(--accent-color); margin: 20px 0 12px; text-align: center; animation: bounce 1.5s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
.gap-solution-lead { font-size: 1.05rem; font-weight: 700; color: #fff; background: rgba(212,162,63,0.15); border-left: 4px solid var(--accent-color); padding: 14px 18px; border-radius: 0 8px 8px 0; text-align: left; }

/* ===== 解決策 ===== */
.slant-bg { position: relative; background: var(--primary-color); padding: 120px 0; overflow: hidden; }
.slant-bg::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--primary-dark); clip-path: polygon(0 0, 100% 15%, 100% 100%, 0 85%); z-index: 1; }
.featuresslant-container { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; position: relative; z-index: 2; }
.featuresslant-text { max-width: 980px; margin: 0 auto; width: 100%; }
.featuresslant-text .section-title { text-align: center !important; margin-bottom: 28px; font-size: 2rem; word-break: auto-phrase; overflow-wrap: break-word; }
.featuresslant-text .highlight-point { display: table; margin: 0 auto 16px; }
.highlight-point { display: inline-flex; align-items: center; gap: 8px; background: rgba(212,162,63,0.15); padding: 6px 16px; border-radius: 100px; color: var(--accent-color); font-weight: 700; font-size: 0.95rem; margin-bottom: 16px; }
.solution-list { list-style: none; margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.solution-list > * { min-width: 0; }
.solution-list li { position: relative; padding: 28px 24px 24px 56px; font-size: 0.93rem; color: rgba(255,255,255,0.82); line-height: 1.8; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16); border-radius: 14px; overflow-wrap: break-word; word-break: auto-phrase; }
.solution-list li::before { content: '✓'; position: absolute; left: 20px; top: 26px; width: 22px; height: 22px; background: var(--accent-color); color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.75rem; font-weight: bold; }
.solution-list li strong { display: block; color: #fff; font-size: 0.97rem; margin-bottom: 10px; line-height: 1.5; }

/* ===== 導入事例 ===== */
.case-study-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.case-study-cards > * { min-width: 0; }
.c-card { background-color: var(--bg-white); border-radius: 16px; padding: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border: 1px solid var(--border-color); display: flex; flex-direction: column; transition: transform 0.3s ease; }
.c-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.case-badge { display: inline-block; background: var(--bg-light); color: var(--primary-color); font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: 4px; margin-bottom: 20px; }
.case-title { font-size: 1.25rem; margin-bottom: 20px; line-height: 1.5; overflow-wrap: break-word; }
.case-story { color: var(--text-light); flex-grow: 1; }

/* ===== キャンペーン ===== */
.campaign-container { background: var(--primary-dark); border-radius: 24px; padding: 60px 40px; text-align: center; color: #fff; }
.campaign-container h2 { color: #fff; font-size: 2.2rem; margin-bottom: 20px; }
.campaign-container p { font-size: 1.1rem; color: rgba(255,255,255,0.8); }
.text-accent { color: var(--accent-color); }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; background-color: var(--bg-white); border-radius: 16px; padding: 20px 40px; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-item:last-child { border-bottom: none; }
.faq-question { width: 100%; background: none; border: none; padding: 24px 0; text-align: left; font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--primary-dark); }
.faq-icon { width: 12px; height: 12px; flex-shrink: 0; border-right: 2px solid var(--primary-color); border-bottom: 2px solid var(--primary-color); transform: rotate(45deg); transition: 0.3s; }
.faq-question.active .faq-icon { transform: rotate(-135deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-answer p { padding: 0 0 24px; color: var(--text-light); }

/* ===== フォーム ===== */
.form-wrapper { max-width: 900px; margin: 0 auto; overflow: hidden; }
.form-wrapper iframe { display: block; margin: 0 auto; width: 100% !important; max-width: 100%; border: 0; }

/* ===== フッター ===== */
.footer { background-color: var(--bg-light); padding: 60px 0 30px; text-align: center; border-top: 1px solid var(--border-color); }
.footer-content { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; }
.footer-links { display: flex; justify-content: center; gap: 30px; }
.footer-links a { color: var(--text-light); font-weight: 400; font-size: 0.9rem; text-decoration: underline; }
.jpx-logo { height: 60px; width: auto; }
.footer-text, .footer-copyright { color: #94a3b8; font-size: 0.85rem; margin-bottom: 10px; }
.footer-text { margin-bottom: 0; }

/* ===== レスポンシブ（768px以下） ===== */
@media (max-width: 768px) {
    section { padding: 50px 0; }
    .container { padding: 0 16px; }
    .pc-only { display: none; }

    /* ヘッダー */
    .header-nav { display: none; }
    .menu-toggle { display: flex; }

    /* ヒーロー */
    .hero { padding-top: calc(var(--header-height) + 24px); padding-bottom: 48px; }
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 24px; }
    .hero h1 { font-size: 1.55rem; line-height: 1.5; }
    .hero-desc { font-size: 0.9rem; }
    .hero-stats { flex-direction: column; padding: 14px; gap: 0; }
    .stat-item { padding: 10px 0; width: 100%; }
    .stat-divider { width: 100%; height: 1px; margin: 0; }
    .hero-visual { display: none; }
    .btn-large { width: 100%; max-width: 100%; padding: 16px 24px; font-size: 0.95rem; }
    .cta-buttons { width: 100%; }

    /* 現状×理想 */
    .reality-grid { grid-template-columns: 1fr; border-radius: 16px; }
    .reality-col { padding: 20px 16px; }
    .reality-col--now { border-top: 4px solid var(--problem-color); border-bottom: 1px solid var(--border-color); }
    .reality-divider { height: 48px; width: 100%; }
    .reality-arrow { transform: rotate(90deg); }

    /* ギャップ */
    .gap-section { padding: 60px 0; }
    .gap-text h2 { font-size: 1.4rem; }

    /* 解決策 */
    .slant-bg { padding: 64px 0; }
    .slant-bg::before { clip-path: polygon(0 0, 100% 3%, 100% 100%, 0 97%); }
    .featuresslant-text .section-title { font-size: 1.3rem; }
    .solution-list { grid-template-columns: 1fr; gap: 12px; }
    .solution-list li { padding: 18px 14px 16px 44px; font-size: 0.88rem; }
    .solution-list li::before { left: 14px; top: 18px; }

    /* 導入事例 */
    .case-study-cards { grid-template-columns: 1fr; gap: 16px; }
    .c-card { padding: 20px; }
    .case-title { font-size: 1.05rem; }

    /* キャンペーン */
    .campaign-container { padding: 36px 20px; border-radius: 16px; }
    .campaign-container h2 { font-size: 1.4rem; }

    /* FAQ */
    .faq-list { padding: 8px 16px; }
    .faq-question { font-size: 0.9rem; padding: 18px 0; }

    /* フッター */
    .footer-content { flex-direction: column; gap: 16px; }
    .footer-links { flex-direction: column; gap: 12px; align-items: center; }
}

/* ===== 全セクション横スクロール防止（iOS Safari対策）===== */
html, body { overflow-x: hidden; }
/* * { max-width: 100% } はbuttonのタップエリアを壊すため使わない */
img, video { max-width: 100%; height: auto; }
section, footer, main { overflow-x: hidden; }
/* headerはメニュードロップダウンのためoverflowをvisibleに */
header { overflow: visible; }