/* =============================================
   Bloom ナレッジ — 共通スタイル
   ============================================= */

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

:root {
    --brand-blue: #3B82F6;
    --brand-violet: #8B5CF6;
    --brand-pink: #EC4899;
    --brand-indigo: #6366F1;
    --brand-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    --text-900: #0F172A;
    --text-700: #334155;
    --text-500: #64748B;
    --text-400: #94A3B8;
    --bg-50: #F8FAFC;
    --bg-100: #F1F5F9;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --max-w: 780px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.12);
    --radius: 14px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #FFFFFF;
    color: var(--text-700);
    line-height: 1.8;
    font-feature-settings: "palt";
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-indigo); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-pink); }

/* ============= HEADER ============= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.2) blur(12px);
    -webkit-backdrop-filter: saturate(1.2) blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.site-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-900);
    font-weight: 800;
    font-size: 1.125rem;
}

.site-logo:hover { color: var(--text-900); }

.site-logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.site-logo-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.site-logo-sub {
    color: var(--text-500);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding-left: 10px;
    margin-left: 10px;
    border-left: 1px solid var(--border);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    color: var(--text-700);
    font-weight: 600;
    font-size: 0.9rem;
}

.site-nav-cta {
    padding: 9px 18px;
    background: var(--brand-gradient);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}

.site-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
    color: #fff !important;
}

@media (max-width: 640px) {
    .site-nav { gap: 14px; }
    .site-nav a:not(.site-nav-cta) { display: none; }
    .site-logo-sub { padding-left: 8px; margin-left: 8px; }
}

/* ============= LIST PAGE ============= */
.blog-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 24px 40px;
    text-align: center;
}

.blog-hero-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(236, 72, 153, 0.08));
    color: var(--brand-indigo);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.blog-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--text-900);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 12px;
}

.blog-hero p {
    color: var(--text-500);
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto;
}

.blog-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 96px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    color: inherit;
}

.blog-card-cover {
    aspect-ratio: 16 / 9;
    background: var(--brand-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    font-size: 1.5rem;
    text-align: center;
    padding: 24px;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.blog-card-cover::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2), transparent 50%);
    pointer-events: none;
}

.blog-card-cover span { position: relative; z-index: 1; }

.blog-card-cover.c-1 { background: linear-gradient(135deg, #3B82F6, #8B5CF6); }
.blog-card-cover.c-2 { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.blog-card-cover.c-3 { background: linear-gradient(135deg, #F97316, #EC4899); }
.blog-card-cover.c-4 { background: linear-gradient(135deg, #10B981, #3B82F6); }
.blog-card-cover.c-5 { background: linear-gradient(135deg, #6366F1, #A855F7); }
.blog-card-cover.c-6 { background: linear-gradient(135deg, #F59E0B, #EF4444); }

.blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-card-category {
    color: var(--brand-indigo);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-card-title {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--text-900);
    line-height: 1.5;
    letter-spacing: -0.005em;
}

.blog-card-desc {
    font-size: 0.875rem;
    color: var(--text-500);
    line-height: 1.7;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-400);
    font-size: 0.75rem;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* ============= ARTICLE ============= */
.article-hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 40px 24px 16px;
}

.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-400);
    margin-bottom: 24px;
}

.breadcrumb a { color: var(--text-500); font-weight: 600; }
.breadcrumb a:hover { color: var(--brand-indigo); }
.breadcrumb .sep { margin: 0 8px; color: var(--text-400); }

.article-category {
    display: inline-block;
    color: var(--brand-indigo);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.article-title {
    font-size: clamp(1.75rem, 4.5vw, 2.375rem);
    font-weight: 900;
    color: var(--text-900);
    line-height: 1.35;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-500);
    font-size: 0.875rem;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.article-meta .dot {
    width: 3px;
    height: 3px;
    background: var(--text-400);
    border-radius: 50%;
}

.article-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-700);
}

.article-meta .author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.article-cover {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 32px;
}

.article-cover-inner {
    aspect-ratio: 1200 / 630;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #fff;
    text-align: center;
    font-weight: 900;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    line-height: 1.4;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.article-cover-inner::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.3), transparent 50%),
                radial-gradient(circle at 85% 80%, rgba(255, 255, 255, 0.2), transparent 50%);
    pointer-events: none;
}

.article-cover-inner span { position: relative; z-index: 1; }

.article-body {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 16px 24px 48px;
    color: var(--text-700);
    font-size: 1rem;
    line-height: 1.9;
}

.article-body p {
    margin: 0 0 1.3em;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-900);
    letter-spacing: -0.015em;
    line-height: 1.45;
    margin: 2.4em 0 0.8em;
    padding-top: 0.4em;
    position: relative;
}

.article-body h2::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: var(--brand-gradient);
    border-radius: 2px;
    margin-bottom: 16px;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
    font-size: 1.1875rem;
    font-weight: 800;
    color: var(--text-900);
    line-height: 1.5;
    margin: 1.8em 0 0.6em;
    letter-spacing: -0.01em;
}

.article-body h4 {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--text-900);
    margin: 1.4em 0 0.5em;
    letter-spacing: -0.005em;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.4em;
    padding-left: 1.6em;
}

.article-body li { margin-bottom: 0.5em; }
.article-body li::marker { color: var(--brand-violet); font-weight: 700; }

.article-body strong { color: var(--text-900); font-weight: 700; }
.article-body em { font-style: normal; background: linear-gradient(transparent 65%, rgba(236, 72, 153, 0.2) 65%); padding: 0 2px; }

.article-body blockquote {
    border-left: 4px solid var(--brand-violet);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.04), rgba(236, 72, 153, 0.04));
    padding: 16px 20px;
    border-radius: 0 10px 10px 0;
    margin: 1.6em 0;
    color: var(--text-700);
    font-style: italic;
}

.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body .callout {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 1.8em 0;
}

.article-body .callout h4 {
    color: var(--brand-indigo);
    margin-top: 0;
    margin-bottom: 0.4em;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-body .callout h4::before {
    content: "💡";
    font-size: 1.1em;
}

.article-body .callout p:last-child { margin-bottom: 0; }

.article-body .callout.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(239, 68, 68, 0.06));
    border-color: rgba(245, 158, 11, 0.3);
}

.article-body .callout.warning h4 { color: #D97706; }
.article-body .callout.warning h4::before { content: "⚠️"; }

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-body table th,
.article-body table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.article-body table th {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    color: var(--text-900);
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.article-body table tr:last-child td { border-bottom: none; }
.article-body table tr:hover td { background: var(--bg-50); }

.article-body .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.6em 0;
}
.article-body .table-scroll table { margin: 0; }

.article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.4em 0;
}

/* TOC */
.toc {
    background: var(--bg-50);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 0 0 2em;
}

.toc-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-500);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.toc li {
    counter-increment: toc-counter;
    margin-bottom: 6px;
    padding-left: 28px;
    position: relative;
    font-size: 0.9375rem;
}

.toc li::before {
    content: counter(toc-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-violet);
    font-weight: 800;
    font-size: 0.8125rem;
    font-feature-settings: "tnum";
}

.toc a {
    color: var(--text-700);
    font-weight: 600;
}

.toc a:hover { color: var(--brand-indigo); }

/* FAQ */
.article-faq {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px;
}

.article-faq h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-900);
    margin-bottom: 24px;
    letter-spacing: -0.015em;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item[open] {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    padding: 18px 56px 18px 22px;
    font-weight: 700;
    color: var(--text-900);
    cursor: pointer;
    position: relative;
    list-style: none;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-100);
    color: var(--text-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    transition: transform 0.25s, background 0.25s, color 0.25s;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
    background: var(--brand-gradient);
    color: #fff;
}

.faq-item .faq-a {
    padding: 0 22px 20px;
    color: var(--text-700);
    font-size: 0.9375rem;
    line-height: 1.8;
}

/* CTA */
.article-cta {
    max-width: var(--max-w);
    margin: 48px auto;
    padding: 0 24px;
}

.article-cta-box {
    background: var(--brand-gradient);
    border-radius: 20px;
    padding: 40px 32px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(139, 92, 246, 0.25);
}

.article-cta-box::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2), transparent 50%);
    pointer-events: none;
}

.article-cta-box > * { position: relative; z-index: 1; }

.article-cta-eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.article-cta-box h2 {
    font-size: clamp(1.25rem, 3vw, 1.625rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.015em;
    line-height: 1.45;
    margin-bottom: 12px;
}

.article-cta-box p {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.75;
    margin: 0 auto 22px;
    max-width: 480px;
}

.article-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.article-cta-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9375rem;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
}

.article-cta-buttons .btn-primary {
    background: #fff;
    color: var(--brand-indigo) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.article-cta-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: var(--brand-pink) !important;
}

.article-cta-buttons .btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.article-cta-buttons .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff !important;
}

/* Related */
.article-related {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px;
    border-top: 1px solid var(--border-light);
}

.article-related-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-900);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.article-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ============= FOOTER ============= */
.site-footer {
    background: var(--bg-50);
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
    margin-top: 48px;
}

.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
    align-items: flex-start;
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.site-footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--text-900);
    font-size: 1.0625rem;
}

.site-footer-brand p {
    color: var(--text-500);
    font-size: 0.8125rem;
    line-height: 1.7;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 40px;
}

.site-footer-col h5 {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-500);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.site-footer-col a {
    display: block;
    color: var(--text-700);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.site-footer-col a:hover { color: var(--brand-indigo); }

.site-footer-copyright {
    max-width: 1100px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-400);
    font-size: 0.8125rem;
    text-align: center;
}

/* Reveal animations */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.in-view {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .blog-hero { padding: 40px 20px 28px; }
    .blog-grid { padding: 16px 20px 64px; gap: 18px; }
    .article-hero { padding: 32px 20px 12px; }
    .article-body { padding: 12px 20px 36px; }
    .article-body h2 { margin-top: 2em; font-size: 1.3125rem; }
    .article-body h3 { font-size: 1.0625rem; }
    .article-cta { padding: 0 20px; }
    .article-cta-box { padding: 28px 20px; }
    .article-faq { padding: 20px; }
    .article-related { padding: 36px 20px; }
}
