/* dgx-spark 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;
}

/* 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 strong { color: var(--terracotta-dark); font-weight: 700; }

/* Spec grid */

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.spec-card {
    text-align: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem 1rem;
    transition: border-color 0.2s;
}
.spec-card:hover { border-color: var(--terracotta); }
.spec-val {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--terracotta);
    display: block;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}
.spec-label {
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Table */

.table-wrap {
    overflow-x: auto; margin: 1.5rem 0;
    border-radius: 12px; box-shadow: 0 2px 12px var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead { background: var(--terracotta); color: var(--white); }
th { padding: 0.85rem 1rem; text-align: left; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); background: white; }
tbody tr:hover td { background: var(--terracotta-pale); }
td:first-child { font-weight: 600; }
.model-name { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; }
.model-family { font-size: 0.68rem; color: var(--ink-muted); margin-top: 0.15rem; }
.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-weight: 500;
}
.badge-flux { background: rgba(234, 81, 39, 0.08); color: var(--terracotta); border: 1px solid rgba(234, 81, 39, 0.2); }
.badge-sd { background: rgba(180, 120, 60, 0.1); color: #8a5a30; border: 1px solid rgba(180, 120, 60, 0.25); }
.badge-other { background: rgba(76, 175, 80, 0.08); color: #2e7d32; border: 1px solid rgba(76, 175, 80, 0.2); }
.num { font-family: var(--font-mono); font-size: 0.82rem; }
.num-good { color: #2e7d32; font-weight: 700; }
.num-mid { color: var(--terracotta-dark); font-weight: 600; }
.num-bad { color: #c0392b; font-weight: 700; }
.bar-cell { min-width: 130px; }
.bar-wrap { display: flex; align-items: center; gap: 8px; }
.bar { height: 6px; border-radius: 3px; background: var(--terracotta-pale); flex: 1; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; }

/* Highlights */

.highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}
.highlight-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.4rem;
}
.highlight-card .hc-icon { font-size: 1.4rem; margin-bottom: 0.5rem; }
.highlight-card .hc-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
    margin-bottom: 0.3rem;
}
.highlight-card .hc-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--terracotta);
    margin-bottom: 0.3rem;
}
.highlight-card p { font-size: 0.85rem; color: var(--ink-muted); margin: 0; }

/* Image grid */

.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.img-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.img-card:hover { border-color: var(--terracotta); transform: translateY(-2px); }
.img-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.img-caption { padding: 0.8rem 1rem; }
.img-model { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--ink); margin-bottom: 0.2rem; }
.img-perf { font-family: var(--font-mono); font-size: 0.72rem; margin-bottom: 0.3rem; }
.img-desc { font-size: 0.75rem; color: var(--ink-muted); line-height: 1.4; }

/* 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); }

/* Conclusion grid */

.conclusion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}
.cg-card {
    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);
}
.cg-card .cg-emoji { font-size: 1.6rem; margin-bottom: 0.5rem; display: block; }
.cg-card .cg-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; }
.cg-card .cg-val { font-family: var(--font-mono); font-size: 0.72rem; color: var(--white-70); }

/* 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; }
    .spec-grid { grid-template-columns: repeat(2, 1fr); }
    .highlights { grid-template-columns: 1fr; }
    .img-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .conclusion-grid { grid-template-columns: 1fr; }
    .author-card { flex-direction: column; text-align: center; }
}
