/* ============================================================
   Taoxiaopu — 模具行业内容站
   工业深色 · 钢蓝橙点缀 · Core Web Vitals 友好
   ============================================================ */

:root {
    --steel-950: #060a0f;
    --steel-900: #0c1219;
    --steel-800: #151d28;
    --steel-700: #1e2a3a;
    --steel-600: #2d3f54;
    --steel-500: #4a5d73;
    --slate-200: #c5cdd8;
    --slate-100: #e8ecf1;
    --slate-50:  #f4f6f8;
    --bg:        #eef1f5;
    --bg-card:   #ffffff;
    --text:      #1a2332;
    --text-muted:#5c6b7f;
    --border:    #d8dee8;
    --orange:    #f97316;
    --orange-dk: #ea580c;
    --cyan:      #22d3ee;
    --radius:    10px;
    --radius-lg: 16px;
    --shadow:    0 4px 24px rgba(12, 18, 25, 0.08);
    --shadow-lg: 0 16px 48px rgba(12, 18, 25, 0.14);
    --mono:      'JetBrains Mono', ui-monospace, monospace;
    --sans:      'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
}

/* === 全局 === */
body { font-family: var(--sans); }
a:hover { text-decoration: underline; }
.main-content { min-height: 50vh; }
.page-body { padding: 48px 0 64px; }

/* === 页头 === */
.site-header { transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 32px rgba(0,0,0,.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; position: relative; }
.logo { text-decoration: none; }
.logo:hover { text-decoration: none; opacity: .92; }
.logo-mark { flex-shrink: 0; }
.logo-text { color: #f4f6f8; letter-spacing: -.3px; }
.logo-text span { color: var(--orange); }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-200);
    border-radius: 6px;
    transition: color .2s, background .2s;
    white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav-link.active { color: var(--orange); background: rgba(249,115,22,.12); }
.nav-about { margin-left: 4px; border: 1px solid rgba(255,255,255,.15); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #f4f6f8;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === 工业 Hero === */
.hero-industrial {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(6,10,15,.92) 0%, rgba(12,18,25,.75) 45%, rgba(12,18,25,.55) 100%),
        url('/assets/images/mold-hero-bg.webp') center/cover no-repeat;
}
.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
    padding: 72px 20px 80px;
}
.hero-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--cyan);
    margin-bottom: 16px;
}
.hero-copy h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.5px;
    margin-bottom: 18px;
}
.hero-highlight {
    color: var(--orange);
}
.hero-desc {
    font-size: 17px;
    color: var(--slate-200);
    max-width: 520px;
    margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all .2s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-dk); border-color: var(--orange-dk); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.06); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-left: 3px solid var(--accent, var(--orange));
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: #fff;
    transition: background .2s, transform .2s;
}
.hero-stat:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); text-decoration: none; color: #fff; }
.hero-stat-num { font-family: var(--mono); font-size: 11px; color: var(--cyan); font-weight: 600; }
.hero-stat-name { font-size: 15px; font-weight: 600; }
.hero-stat-count { font-size: 12px; color: var(--slate-200); }

/* === 区块标题 === */
.section-head { margin-bottom: 28px; }
.section-label {
    display: block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: var(--orange);
    margin-bottom: 8px;
}
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--steel-900);
    letter-spacing: -.3px;
}
.cat-section { margin-bottom: 56px; }

/* === 栏目卡片 === */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-top: 3px solid var(--accent, var(--orange));
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .25s, transform .25s;
    overflow: hidden;
}
.cat-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
    pointer-events: none;
}
.cat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); text-decoration: none; color: var(--text); }
.cat-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.cat-index { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.cat-icon { color: var(--steel-500); opacity: .7; }
.cat-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--steel-900); }
.cat-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.cat-link { font-size: 13px; font-weight: 600; color: var(--accent); }

/* === 文章网格 === */
.articles-section { margin-top: 16px; }
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .25s, transform .25s;
}
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-image { display: block; overflow: hidden; background: var(--steel-800); }
.card-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform .4s ease;
}
.article-card:hover .card-image img { transform: scale(1.04); }
.card-body { padding: 20px; }
.card-category {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--accent, var(--orange));
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}
.card-body h3 { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 8px; }
.card-body h3 a { color: var(--steel-900); text-decoration: none; }
.card-body h3 a:hover { color: var(--orange); }
.card-body p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.6; }
.card-footer { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); font-family: var(--mono); }

/* === 面包屑 === */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px 0;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--steel-500); font-family: var(--mono); }

/* === 栏目页横幅 === */
.page-banner {
    background: linear-gradient(135deg, var(--steel-900) 0%, var(--steel-800) 100%);
    border-bottom: 3px solid var(--accent, var(--orange));
    padding: 8px 0 40px;
    color: #fff;
}
.page-banner .breadcrumb { padding-bottom: 8px; }
.page-banner .breadcrumb a,
.page-banner .breadcrumb li { color: var(--slate-200); }
.page-banner .breadcrumb a:hover { color: var(--orange); }
.page-banner .breadcrumb li + li::before { color: var(--steel-500); }
.category-header { padding-top: 8px; }
.category-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}
.category-header h1 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 12px;
    max-width: 720px;
}
.category-desc { font-size: 16px; color: var(--slate-200); max-width: 640px; line-height: 1.7; }
.category-meta { font-family: var(--mono); font-size: 13px; color: var(--cyan); margin-top: 16px; }

/* === 文章页 === */
.article-page { padding-top: 24px; }
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}
.article-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article-category {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent, var(--orange));
    display: inline-block;
    margin-bottom: 12px;
}
.article-header h1 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--steel-900);
    letter-spacing: -.3px;
    margin-bottom: 16px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--mono);
}
.article-cover {
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.article-cover img { width: 100%; }

/* 正文 */
.article-body { font-size: 17px; line-height: 1.85; color: var(--text); }
.article-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--orange);
    color: var(--steel-900);
}
.article-body h3 { font-size: 20px; font-weight: 600; margin: 32px 0 12px; color: var(--steel-800); }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--orange); }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.article-body th, .article-body td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.article-body th { background: var(--steel-900); color: #fff; font-weight: 600; }
.article-body tr:nth-child(even) td { background: var(--slate-50); }
.article-body strong { font-weight: 700; color: var(--steel-900); }
.article-body blockquote {
    border-left: 4px solid var(--cyan);
    padding: 16px 20px;
    margin: 24px 0;
    background: #f0f9ff;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--steel-700);
}
.article-body code { background: var(--slate-100); padding: 2px 7px; border-radius: 4px; font-size: 14px; font-family: var(--mono); color: var(--steel-800); }
.article-body pre { background: var(--steel-900); color: #e2e8f0; padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 24px 0; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body img { border-radius: var(--radius); margin: 16px 0; border: 1px solid var(--border); }
.article-body a { color: var(--orange-dk); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--orange); }
.ai-image { margin: 24px 0; text-align: center; }
.ai-image img { border-radius: var(--radius); }
.ai-image figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* 侧边栏 */
.article-sidebar { position: sticky; top: 88px; }
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    border-top: 3px solid var(--orange);
}
.sidebar-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--steel-900);
}
.related-list { list-style: none; }
.related-list li { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.related-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.related-list a { display: block; color: var(--text); text-decoration: none; }
.related-list a:hover .related-title { color: var(--orange); }
.related-title { font-size: 14px; font-weight: 500; display: block; margin-bottom: 4px; line-height: 1.45; transition: color .2s; }
.related-list time { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }

/* === 分页 === */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 32px 0 16px; }
.page-link {
    min-width: 40px; height: 40px; padding: 0 12px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-family: var(--mono);
    font-size: 14px;
    background: var(--bg-card);
}
.page-link.active, .page-link:hover { background: var(--steel-900); color: #fff; border-color: var(--steel-900); text-decoration: none; }
.page-ellipsis { min-width: 28px; height: 40px; display: flex; align-items: flex-end; justify-content: center; color: var(--text-muted); }

/* === 404 === */
.error-page {
    text-align: center;
    padding: 100px 20px 120px;
    background: linear-gradient(180deg, var(--steel-900) 0%, var(--steel-800) 100%);
    color: #fff;
    min-height: 50vh;
    display: flex;
    align-items: center;
}
.error-code {
    font-family: var(--mono);
    font-size: clamp(72px, 15vw, 140px);
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--orange);
    margin-bottom: 16px;
}
.error-page h1 { font-size: 24px; margin-bottom: 8px; }
.error-page p { color: var(--slate-200); margin-bottom: 8px; }
.error-page .btn { margin-top: 24px; }

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

/* === 页脚 === */
.site-footer { margin-top: 0; }
.footer-top {
    background: var(--steel-900);
    color: var(--slate-200);
    padding: 56px 0 40px;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
    background-size: 40px 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 320px; color: var(--slate-200); }
.footer-nav h4 {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: var(--mono);
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: var(--slate-200); font-size: 14px; }
.footer-nav a:hover { color: var(--orange); }
.footer-bottom {
    background: var(--steel-950);
    padding: 18px 0;
    font-size: 13px;
    color: var(--steel-500);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.06);
}

/* === About === */
.about-page { max-width: 760px; margin: 0 auto; padding: 48px 0 64px; }
.about-tagline { font-size: 1.1em; color: var(--text-muted); margin-top: 10px; }
.about-page .article-header h1 { color: var(--steel-900); }

/* === 响应式 === */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 68px; left: 0; right: 0;
        background: var(--steel-900);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: var(--shadow-lg);
        align-items: stretch;
        gap: 4px;
    }
    .main-nav.is-open { display: flex; }
    .nav-link { padding: 12px 14px; }
    .menu-toggle { display: flex; }
    .site-header { position: sticky; }
    .site-header .container { position: relative; }
    .hero-industrial { min-height: auto; }
    .hero-inner { padding: 48px 20px 56px; }
    .hero-stats { grid-template-columns: 1fr; }
    .cat-grid, .article-grid { grid-template-columns: 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
