/* bymuriel-comfyui article-specific styles — base styles in /css/pages.css */

/* Hero (article uses .hero, not .page-hero) */

.hero {
    background: var(--terracotta);
    color: var(--white);
    padding: 5rem 2rem 4.5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 80% 20%, rgba(255,255,255,0.06), transparent),
        radial-gradient(ellipse 80% 50% at 10% 90%, rgba(0,0,0,0.1), transparent);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 80px;
    background: var(--paper);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.hero-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--white-10);
    border: 1px solid var(--white-20);
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
    color: var(--white-90);
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.18;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--white-90);
    max-width: 620px;
    font-weight: 300;
}
.hero-meta {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.82rem;
    color: var(--white-70);
}
.hero-meta a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--white-50); transition: border-color 0.2s; }
.hero-meta a:hover { border-color: var(--white); }
.hero-back {
    position: absolute; top: 1.5rem; left: 2rem; z-index: 2;
    color: var(--white-70); text-decoration: none; font-size: 0.85rem;
    font-weight: 500; transition: color 0.2s;
}
.hero-back:hover { color: var(--white); }

/* Article body */

article { max-width: 780px; margin: 0 auto; padding: 3rem 2rem 5rem; }

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--terracotta-dark);
    margin: 3.5rem 0 1rem;
    padding-top: 2rem;
    letter-spacing: -0.01em;
    position: relative;
}
h2::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 48px; height: 3px;
    background: var(--terracotta);
    border-radius: 2px;
}
h2:first-of-type { padding-top: 0; margin-top: 0; }
h2:first-of-type::before { display: none; }

h3 { font-size: 1.1rem; font-weight: 600; color: var(--ink); margin: 2rem 0 0.6rem; }
p { margin-bottom: 1.1rem; }
a { color: var(--terracotta); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
a:hover { border-bottom-color: var(--terracotta); }
strong { font-weight: 600; }
code {
    font-family: var(--font-mono); font-size: 0.85em;
    background: var(--terracotta-pale); color: var(--terracotta-deeper);
    padding: 0.15em 0.4em; border-radius: 4px;
}

/* Figures */

figure {
    margin: 2rem 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
}
figure img { display: block; width: 100%; height: auto; }
figcaption {
    padding: 0.8rem 1.2rem;
    font-size: 0.78rem;
    color: var(--ink-muted);
    line-height: 1.5;
    border-top: 1px solid var(--border);
}

/* Callouts */

.callout {
    background: var(--terracotta-pale);
    border-left: 4px solid var(--terracotta);
    border-radius: 0 10px 10px 0;
    padding: 1.2rem 1.5rem;
    margin: 1.8rem 0;
    font-size: 0.92rem;
}
.callout-title {
    font-weight: 700; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 0.4rem; color: var(--ink-light);
}

/* Key figures */

.key-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 1rem; margin: 2rem 0;
}
.key-figure {
    text-align: center;
    background: var(--terracotta); color: var(--white);
    border-radius: 12px; padding: 1.4rem 1rem;
    box-shadow: 0 4px 16px rgba(232, 93, 58, 0.2);
}
.key-figure .number { font-size: 2rem; font-weight: 800; display: block; line-height: 1.1; letter-spacing: -0.02em; }
.key-figure .label { font-size: 0.75rem; color: var(--white-90); margin-top: 0.3rem; display: block; font-weight: 300; }

/* Pipeline */

.pipeline {
    display: flex; align-items: stretch; gap: 0;
    margin: 2rem 0; overflow-x: auto; padding-bottom: 0.5rem;
}
.pipeline-step {
    flex: 1; min-width: 110px; text-align: center;
    padding: 1rem 0.5rem; position: relative;
    background: white; border: 1px solid var(--border);
}
.pipeline-step:first-child { border-radius: 12px 0 0 12px; }
.pipeline-step:last-child { border-radius: 0 12px 12px 0; }
.pipeline-step:not(:last-child)::after {
    content: '\2192'; position: absolute; right: -0.6rem; top: 50%;
    transform: translateY(-50%); font-size: 1.1rem; color: var(--terracotta);
    z-index: 1; background: var(--paper); width: 1.2rem; text-align: center; font-weight: 700;
}
.pipeline-step .step-icon { font-size: 1.4rem; margin-bottom: 0.25rem; }
.pipeline-step .step-title { font-weight: 700; font-size: 0.76rem; color: var(--ink); }
.pipeline-step .step-detail { font-size: 0.68rem; color: var(--ink-muted); margin-top: 0.1rem; }

/* Code block */

.code-block {
    background: #2d2420; color: #f0ddd6;
    border-radius: 12px; padding: 1.2rem 1.5rem; margin: 1.5rem 0;
    font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.7;
    overflow-x: auto; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.code-block .comment { color: #8a7568; }
.code-block .keyword { color: var(--terracotta-light); }

/* Author card & article footer */

.article-footer { max-width: 780px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.author-card {
    display: flex; gap: 1.2rem; align-items: center;
    background: var(--terracotta); color: white;
    border-radius: 14px; padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(232, 93, 58, 0.2);
}
.author-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--white-20);
    object-fit: cover;
    flex-shrink: 0;
}
.author-info .name { font-weight: 700; font-size: 1.05rem; }
.author-info .role { color: var(--white-70); font-size: 0.88rem; font-weight: 300; }
.author-info a { color: white; border-bottom-color: var(--white-50); }
.author-info a:hover { border-bottom-color: white; }

/* Responsive */

@media (max-width: 640px) {
    .hero { padding: 3rem 1.2rem 3rem; }
    .hero::after { clip-path: ellipse(75% 100% at 50% 100%); }
    .hero-back { top: 1rem; left: 1.2rem; font-size: 0.78rem; }
    .hero .page-hero-lang { top: 1rem; right: 1.2rem; font-size: 0.78rem; }
    article { padding: 2rem 1.2rem 3rem; }
    .key-figures { grid-template-columns: repeat(2, 1fr); }
    .pipeline { flex-direction: column; }
    .pipeline-step:not(:last-child)::after { content: '\2193'; right: 50%; top: auto; bottom: -0.6rem; transform: translateX(50%); }
    .pipeline-step:first-child { border-radius: 12px 12px 0 0; }
    .pipeline-step:last-child { border-radius: 0 0 12px 12px; }
    .author-card { flex-direction: column; text-align: center; }
}