/* ── CSS Variables ── */
:root {
    --bg: #ffffff;
    --bg-sub: #f8fafc;
    --bg-dark: #0f172a;

    --tx: #1e293b;
    --tx-sub: #475569;
    --tx-muted: #94a3b8;

    --pri: #2563eb;
    --pri-hover: #1d4ed8;
    --pri-light: #eff6ff;
    --pri-border: #bfdbfe;

    --accent: #ea580c;         /* CTA「資料請求」専用 */
    --accent-hover: #c2410c;

    --bd: #e2e8f0;

    /* Legacy aliases */
    --pri-d: #1d4ed8;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    background: var(--bg);
    color: var(--tx);
    line-height: 1.8;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--pri); text-decoration: none; transition: color .2s; }
a:hover { color: var(--pri-hover); }
img { max-width: 100%; height: auto; }

/* ── Header ── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bd);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px; height: 64px; gap: 24px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--tx); flex-shrink: 0;
}
.logo-icon {
    width: 36px; height: 36px;
    background: var(--pri);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.logo-icon .material-icons-outlined { font-size: 20px; color: white; }
.logo-text {
    font-size: 18px; font-weight: 700; letter-spacing: 0.08em;
    color: var(--tx);
}
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a {
    color: var(--tx-sub); font-size: 14px; font-weight: 500;
    padding: 6px 12px; border-radius: 6px;
    transition: color .2s, background .2s; text-decoration: none;
}
.nav a:hover { color: var(--tx); background: var(--bg-sub); }
.nav a.active { color: var(--pri); background: var(--pri-light); }

/* Header CTAs */
.header-cta {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* ── Hamburger ── */
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    padding: 8px; flex-direction: column; gap: 5px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--tx-sub); transition: all .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); }

/* ── Buttons ── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px;
    background: var(--pri); color: #fff;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    text-decoration: none; transition: background .2s;
    white-space: nowrap;
}
.btn-primary:hover { background: var(--pri-hover); color: #fff; }
.btn-primary .material-icons-outlined { font-size: 17px; }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px;
    background: #fff; color: var(--pri);
    border: 1px solid var(--pri); border-radius: 8px;
    font-size: 14px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    text-decoration: none; transition: background .2s, color .2s;
    white-space: nowrap;
}
.btn-secondary:hover { background: var(--pri-light); color: var(--pri-hover); }
.btn-secondary .material-icons-outlined { font-size: 17px; }

/* Dark background variant — CTAダークセクション内の「お問い合わせ」ボタン */
.btn-secondary.btn-on-dark {
    background: transparent; color: #fff; border-color: #475569;
}
.btn-secondary.btn-on-dark:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Large buttons for hero/cta areas */
.btn-primary.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-secondary.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-primary.btn-lg .material-icons-outlined,
.btn-secondary.btn-lg .material-icons-outlined { font-size: 19px; }

/* Accent button — 「資料請求」専用 */
.btn-accent {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px;
    background: var(--accent); color: #fff;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    text-decoration: none; transition: background .2s;
    white-space: nowrap;
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-accent .material-icons-outlined { font-size: 17px; }
.btn-accent.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-accent.btn-lg .material-icons-outlined { font-size: 19px; }

/* ── Section utilities ── */
.section {
    max-width: 1200px; margin: 0 auto;
    padding: 96px 32px;
}
.section-alt {
    background: var(--bg-sub);
}
.section-wrap { width: 100%; }
.section-border { border-top: 1px solid var(--bd); padding-top: 96px; }

.section-label {
    display: inline-block;
    font-size: 12px; font-weight: 700;
    color: var(--pri); text-transform: uppercase; letter-spacing: 0.1em;
    background: var(--pri-light); padding: 4px 12px; border-radius: 20px;
    margin-bottom: 16px;
}
.section h2 { font-size: 30px; font-weight: 700; margin-bottom: 16px; color: var(--tx); }
.section > p { color: var(--tx-sub); font-size: 16px; margin-bottom: 56px; }

/* Legacy .section-title (kept for index.php compatibility) */
.section-title {
    font-size: 12px; color: var(--pri); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px;
}

/* ── Trust Bar (hero直下 信頼指標) ── */
.trust-bar {
    background: var(--bg-sub);
    border-top: 1px solid var(--bd);
    border-bottom: 1px solid var(--bd);
    padding: 24px 32px;
}
.trust-bar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    gap: 48px; flex-wrap: wrap;
}
.trust-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--tx-sub);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}
.trust-item:nth-child(1) { animation-delay: 0.1s; }
.trust-item:nth-child(2) { animation-delay: 0.25s; }
.trust-item:nth-child(3) { animation-delay: 0.4s; }
.trust-item:nth-child(4) { animation-delay: 0.55s; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.trust-item strong { font-size: 22px; font-weight: 700; color: var(--tx); }
.trust-item .material-icons-outlined { font-size: 20px; color: var(--pri); }

/* ── CTA Section ── */
.cta-section { padding: 0; }
.cta-section-inner {
    background: var(--bg-dark);
    padding: 96px 32px;
}
.cta-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-inner h2 { font-size: 28px; color: #fff; margin-bottom: 12px; }
.cta-inner p { color: #94a3b8; margin-bottom: 40px; font-size: 16px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ── */
.site-footer {
    background: var(--bg-dark);
    padding: 80px 0 0;
    margin-top: 0;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.footer-top { display: flex; justify-content: space-between; gap: 64px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand .logo-text { color: #f8fafc; }
.footer-brand .logo-icon { background: var(--pri); }
.footer-brand p { color: #64748b; font-size: 14px; margin-top: 8px; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 12px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.footer-col a { color: #94a3b8; font-size: 14px; text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: #f8fafc; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
    margin-top: 0;
}
.footer-bottom p { color: #64748b; font-size: 13px; }

/* ── Hero ── */
.hero {
    padding: 160px 32px 80px;
    text-align: center;
    max-width: 900px; margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
    pointer-events: none;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}
.hero-badge {
    display: inline-block; padding: 5px 14px; border-radius: 20px;
    background: var(--pri-light); color: var(--pri);
    font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 24px;
    border: 1px solid var(--pri-border);
}
.hero h1 {
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 900; line-height: 1.3;
    color: var(--tx); margin-bottom: 20px;
}
.hero h1 .accent {
    color: var(--pri);
    /* no gradient — cleaner for BtoB */
}
.hero p {
    font-size: 17px; color: var(--tx-sub); line-height: 1.8;
    max-width: 640px; margin: 0 auto;
}
.hero-actions {
    display: flex; gap: 12px; margin-top: 36px;
    justify-content: center; flex-wrap: wrap;
}

/* ── Cards Grid ── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.section .cards { margin-top: 32px; }
.features-more { text-align: center; margin-top: 40px; }
.card {
    background: #fff; border: 1px solid var(--bd);
    border-radius: 12px; padding: 28px;
    transition: box-shadow .2s, transform .2s;
}
.card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.card-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.card-icon .material-icons-outlined { font-size: 22px; }

/* Icon color — 青1色に統一 */
.icon-primary,
.icon-indigo { background: var(--pri-light); color: var(--pri); }

.card h3 { font-size: 17px; font-weight: 700; color: var(--tx); margin-bottom: 8px; }
.card p  { color: var(--tx-sub); font-size: 14px; line-height: 1.7; }

/* ── Solution Grid ── */
.solution-grid { display: flex; flex-direction: column; gap: 20px; margin-top: 48px; }
.solution-item {
    display: flex; gap: 20px; align-items: flex-start;
    background: #fff; border: 1px solid var(--bd); border-radius: 12px; padding: 24px 28px;
    transition: box-shadow .2s;
}
.solution-item:hover { box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
.solution-item > .material-icons-outlined {
    font-size: 28px; color: var(--pri); flex-shrink: 0; margin-top: 2px;
    animation: gentlePulse 3s ease-in-out infinite;
}
@keyframes gentlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
.solution-item h4 { font-size: 17px; font-weight: 700; color: var(--tx); margin-bottom: 6px; }
.solution-item p { color: var(--tx-sub); font-size: 14px; line-height: 1.7; margin: 0; }

/* ── AI Section ── */
.ai-section { background: var(--bg-sub); padding-top: 96px; padding-bottom: 96px; text-align: center; }
.ai-section .section { background: transparent; padding-top: 0; padding-bottom: 0; }
.ai-agents {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin: 40px 0 24px; flex-wrap: wrap;
}
.ai-agent {
    display: flex; align-items: center; gap: 6px;
    background: var(--pri-light); border: 1px solid var(--pri-border);
    padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--pri);
}
.ai-agent .material-icons-outlined { font-size: 17px; }
.ai-conn {
    color: var(--tx-muted); font-size: 16px;
    animation: dataFlow 2s ease-in-out infinite;
}
@keyframes dataFlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
.ai-hub {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--pri-light); border: 1px solid var(--pri-border);
    padding: 12px 24px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--pri);
}
.ai-hub .material-icons-outlined { font-size: 20px; }

/* ── Blog ── */
.blog-list { display: flex; flex-direction: column; gap: 16px; }
.blog-item {
    display: block; text-decoration: none; color: inherit;
    background: #fff; border: 1px solid var(--bd);
    border-radius: 12px; padding: 24px 28px;
    transition: box-shadow .2s, border-color .2s;
}
.blog-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); border-color: var(--pri-border); }
.blog-item time { font-size: 13px; color: var(--tx-muted); }
.blog-item h2 { font-size: 18px; font-weight: 700; margin: 8px 0 6px; color: var(--tx); }
.blog-item p  { color: var(--tx-sub); font-size: 14px; line-height: 1.7; }

/* ── Article ── */
.article {
    max-width: 760px; margin: 0 auto;
    padding: 112px 32px 80px;
}
.article-header { margin-bottom: 40px; }
.article-header time { font-size: 13px; color: var(--tx-muted); }
.article-header h1 { font-size: 30px; font-weight: 700; margin-top: 10px; line-height: 1.5; color: var(--tx); }
.article-body h2 {
    font-size: 22px; font-weight: 700; margin: 48px 0 16px;
    padding-bottom: 10px; border-bottom: 2px solid var(--pri-light);
    color: var(--tx);
}
.article-body h3 { font-size: 17px; font-weight: 700; margin: 32px 0 12px; color: var(--tx); }
.article-body p { color: var(--tx-sub); font-size: 16px; line-height: 2; margin-bottom: 24px; }
.article-body ul, .article-body ol { color: var(--tx-sub); font-size: 16px; line-height: 2; margin-bottom: 24px; padding-left: 24px; }
.article-body blockquote {
    border-left: 3px solid var(--pri); padding: 12px 20px; margin: 24px 0;
    background: var(--pri-light); border-radius: 0 8px 8px 0;
    color: var(--tx-sub); font-style: italic;
}
.article-body code { background: var(--bg-sub); padding: 2px 8px; border-radius: 4px; font-size: 13px; border: 1px solid var(--bd); }
.article-body pre {
    background: #1e293b; border-radius: 10px;
    padding: 20px 24px; overflow-x: auto; margin: 24px 0;
}
.article-body pre code { background: none; padding: 0; font-size: 13px; line-height: 1.7; color: #e2e8f0; border: none; }
.article-body img { border-radius: 10px; margin: 24px 0; }
.article-body a { color: var(--pri); text-decoration: underline; }

/* ── Page Content ── */
.page-content {
    max-width: 900px; margin: 0 auto;
    padding: 112px 32px 80px;
}
.page-content h1 { font-size: 32px; font-weight: 700; margin-bottom: 28px; color: var(--tx); }
.page-content h2 { font-size: 22px; font-weight: 700; margin: 40px 0 16px; color: var(--tx); }
.page-content p { color: var(--tx-sub); font-size: 16px; line-height: 2; margin-bottom: 20px; }
.page-content ul, .page-content ol { color: var(--tx-sub); font-size: 16px; line-height: 2; margin-bottom: 20px; padding-left: 24px; }
.page-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.page-content th, .page-content td { padding: 12px 16px; border: 1px solid var(--bd); font-size: 14px; }
.page-content th { background: var(--bg-sub); font-weight: 600; text-align: left; color: var(--tx); }
.page-content td { color: var(--tx-sub); }

/* ── Contact Form (inline styles in contact/index.php reference --pri2, update vars here) ── */
/* Variables used by contact page inline styles are covered by :root above */

/* ── Responsive ── */
@media (max-width: 768px) {
    .header-inner { padding: 0 16px; }

    /* Hide desktop nav; show hamburger */
    .hamburger { display: flex; }
    .header-cta { display: none; }
    .nav {
        display: none;
        position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
        background: #fff; flex-direction: column;
        padding: 24px 20px; gap: 4px; z-index: 99;
        overflow-y: auto;
        border-top: 1px solid var(--bd);
    }
    .nav.open { display: flex; }
    .nav a { font-size: 16px; padding: 12px 16px; }

    .hero { padding: 120px 16px 56px; }
    .section { padding: 64px 16px; }
    .cards { grid-template-columns: 1fr; }
    .article { padding: 96px 16px 56px; }
    .page-content { padding: 96px 16px 56px; }
    .footer-top { flex-direction: column; gap: 32px; }
    .footer-links { flex-direction: column; gap: 24px; }
    .solution-item { flex-direction: column; }
    .ai-agents { gap: 6px; }
    .ai-conn { display: none; }
    .hero-actions, .cta-actions { flex-direction: column; align-items: center; }
    .trust-bar-inner { gap: 24px; }
    .cta-section-inner { padding: 64px 16px; }
    .footer-inner { padding: 0 16px; }
}
