/* ===========================================
   咖啡科普小站 · 公共样式
   =========================================== */

:root {
    --bean-dark: #3a2418;
    --bean-darker: #2a1810;
    --bean-mid: #6b4226;
    --bean-light: #a47148;
    --bean-pale: #d4b596;
    --cream: #faf5ec;
    --cream-dark: #f0e6d2;
    --sage: #7c9082;
    --ink: #2a1810;
}

/* 全局 */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--cream);
    color: var(--ink);
}

h1, h2, h3, h4 {
    font-family: Georgia, 'Noto Serif SC', 'Songti SC', serif;
    color: var(--bean-dark);
    margin: 0;
}

/* ===== 顶部导航 ===== */
.site-nav {
    background: var(--bean-darker);
    color: var(--cream);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.site-nav .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: Georgia, 'Noto Serif SC', serif;
    font-weight: 700;
    color: var(--cream);
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.site-nav .brand-icon { font-size: 22px; }

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

.site-nav .nav-link {
    color: var(--cream-dark);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.site-nav .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--bean-light);
}

.site-nav .nav-link.active {
    background: var(--bean-light);
    color: var(--cream);
}

@media (max-width: 640px) {
    .site-nav .nav-links { gap: 2px; }
    .site-nav .nav-link { padding: 6px 10px; font-size: 13px; }
    .site-nav .brand { font-size: 15px; }
}

/* ===== 通用容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 章节基础 ===== */
.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section { padding: 56px 0; }
}

.section-eyebrow {
    color: var(--bean-light);
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--bean-mid);
    line-height: 1.7;
    max-width: 640px;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(180deg, var(--bean-dark) 0%, var(--bean-darker) 100%);
    color: var(--cream);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(164,113,72,0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(164,113,72,0.15);
    color: var(--bean-light);
    border: 1px solid rgba(164,113,72,0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    color: var(--cream);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-title .accent { color: var(--bean-light); }

.hero-desc {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--cream-dark);
    line-height: 1.75;
    margin-bottom: 40px;
    max-width: 640px;
    opacity: 0.92;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--cream-dark);
    opacity: 0.7;
    font-size: 14px;
}

/* ===== 卡片系统 ===== */
.card {
    background: white;
    border-radius: 20px;
    border: 1px solid rgba(164,113,72,0.12);
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -16px rgba(58,36,24,0.25);
    border-color: var(--bean-light);
}

.entry-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.entry-card .card-visual {
    padding: 48px 32px;
    text-align: center;
    font-size: 72px;
    line-height: 1;
}

.entry-card .visual-processing { background: linear-gradient(135deg, #fed7aa, #fb923c); }
.entry-card .visual-flavor { background: linear-gradient(135deg, #c4b5fd, #8b5cf6); }
.entry-card .visual-varieties { background: linear-gradient(135deg, #bbf7d0, #22c55e); }

.entry-card .card-body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.entry-card .card-meta {
    color: var(--bean-light);
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.entry-card .card-title {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--bean-dark);
}

.entry-card .card-desc {
    color: var(--bean-mid);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.entry-card .card-arrow {
    align-self: flex-start;
    color: var(--bean-light);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.card:hover .card-arrow { gap: 10px; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--bean-light);
    color: var(--cream);
}

.btn-primary:hover {
    background: var(--bean-mid);
}

.btn-ghost {
    background: transparent;
    color: var(--cream);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.5);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bean-darker);
    color: var(--cream-dark);
    padding: 56px 0 28px;
    font-size: 14px;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.site-footer h5 {
    color: var(--cream);
    font-size: 14px;
    margin-bottom: 14px;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 1px;
}

.site-footer a {
    color: var(--cream-dark);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.site-footer a:hover { color: var(--bean-light); }

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    opacity: 0.7;
}

/* ===== 分页面通用样式 ===== */
.breadcrumb {
    background: var(--cream-dark);
    padding: 14px 0;
    font-size: 13px;
    color: var(--bean-mid);
}

.breadcrumb a {
    color: var(--bean-mid);
    text-decoration: none;
}

.breadcrumb a:hover { color: var(--bean-light); }

.breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

/* ===== 子页 Hero ===== */
.sub-hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid rgba(164,113,72,0.15);
}

.sub-hero .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bean-mid);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.sub-hero .back-link:hover { color: var(--bean-light); }

.sub-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    margin-bottom: 16px;
    line-height: 1.15;
}

.sub-hero .lead {
    font-size: 18px;
    color: var(--bean-mid);
    line-height: 1.75;
    max-width: 640px;
}

/* ===== 文章样式 ===== */
.prose {
    color: var(--bean-mid);
    font-size: 17px;
    line-height: 1.85;
}

.prose p { margin: 0 0 20px; }
.prose p strong { color: var(--bean-dark); }
.prose h2 {
    font-size: 30px;
    margin: 56px 0 20px;
}
.prose h3 {
    font-size: 22px;
    margin: 36px 0 12px;
}

.prose .highlight {
    background: rgba(164,113,72,0.15);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--bean-dark);
    font-weight: 600;
}

/* ===== 处理步骤卡 ===== */
.process-flow {
    background: var(--cream-dark);
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
}

.process-flow .flow-title {
    color: var(--bean-light);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.process-step {
    background: white;
    padding: 20px 14px;
    border-radius: 14px;
    text-align: center;
    position: relative;
}

.process-step .step-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.process-step .step-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--bean-dark);
}

.process-step .step-note {
    font-size: 12px;
    color: var(--bean-mid);
    margin-top: 4px;
    opacity: 0.8;
}

.process-step.highlight-step {
    box-shadow: 0 0 0 2px var(--bean-light);
}

.process-step.highlight-step::after {
    content: '关键';
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--bean-light);
    color: var(--cream);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}

.flow-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--bean-mid);
}

.flow-footer strong { color: var(--bean-dark); }

/* ===== 信息侧边卡 ===== */
.info-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 32px 0;
}

@media (max-width: 768px) {
    .info-pair { grid-template-columns: 1fr; }
}

.info-card {
    padding: 24px;
    border-radius: 16px;
    background: white;
    border: 1px solid rgba(164,113,72,0.12);
}

.info-card.accent-orange { border-left: 4px solid #fb923c; }
.info-card.accent-blue { border-left: 4px solid #06b6d4; }
.info-card.accent-emerald { border-left: 4px solid #10b981; }
.info-card.accent-rose { border-left: 4px solid #f43f5e; }
.info-card.accent-violet { border-left: 4px solid #8b5cf6; }

.info-card .info-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--bean-mid);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.info-card h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--bean-dark);
}

.info-card p {
    color: var(--bean-mid);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.tag {
    display: inline-block;
    background: var(--cream-dark);
    color: var(--bean-mid);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    margin: 2px;
}

.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }

/* ===== 对比表 ===== */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    font-size: 15px;
}

.compare-table th, .compare-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(164,113,72,0.1);
}

.compare-table thead {
    background: var(--bean-dark);
    color: var(--cream);
}

.compare-table thead th { font-weight: 700; }

.compare-table tbody tr:nth-child(even) {
    background: rgba(164,113,72,0.04);
}

.compare-table td:first-child {
    font-weight: 700;
    color: var(--bean-dark);
}

/* ===== 风味轮 SVG 容器 ===== */
.flavor-wheel {
    background: var(--cream-dark);
    border-radius: 24px;
    padding: 40px;
    margin: 40px 0;
    text-align: center;
}

/* ===== 数据卡 ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    border: 1px solid rgba(164,113,72,0.12);
    text-align: center;
}

.stat-card .stat-num {
    font-family: Georgia, serif;
    font-size: 44px;
    font-weight: 700;
    color: var(--bean-light);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--bean-mid);
}

/* ===== 豆种卡片 ===== */
.variety-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(164,113,72,0.12);
}

.variety-card h3 { font-size: 22px; margin-bottom: 8px; }

.variety-card .variety-meta {
    font-size: 13px;
    color: var(--bean-light);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

/* ===== 通用 ===== */
.divider-deco {
    height: 12px;
    background-image: radial-gradient(circle, var(--bean-light) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    background-position: 0 6px;
}

.text-center { text-align: center; }
.mt-12 { margin-top: 48px; }
.mb-12 { margin-bottom: 48px; }

/* ===== 处理法分类标签 ===== */
.method-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    letter-spacing: 0.5px;
}

.badge-traditional {
    background: #f0e6d2;
    color: #6b4226;
}

.badge-mainstream {
    background: #dbeafe;
    color: #1e40af;
}

.badge-innovation {
    background: #fce7f3;
    color: #9d174d;
}

/* ===== 页面目录 ===== */
.toc {
    background: white;
    border: 1px solid rgba(164,113,72,0.12);
    border-radius: 16px;
    padding: 24px;
    margin: 32px 0;
}

.toc-title {
    font-size: 14px;
    color: var(--bean-light);
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bean-mid);
    text-decoration: none;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.toc-list li a:hover {
    background: var(--cream-dark);
    color: var(--bean-dark);
}

.toc-list .toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--cream-dark);
    color: var(--bean-light);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

/* ===== 小众处理法紧凑卡片 ===== */
.niche-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.niche-card {
    background: white;
    border: 1px solid rgba(164,113,72,0.12);
    border-radius: 16px;
    padding: 22px;
    transition: all 0.2s ease;
}

.niche-card:hover {
    box-shadow: 0 12px 28px -12px rgba(58,36,24,0.18);
    transform: translateY(-2px);
}

.niche-card .niche-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.niche-card h4 {
    font-size: 18px;
    margin: 0;
}

.niche-card .niche-en {
    font-size: 12px;
    color: var(--bean-light);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.niche-card p {
    color: var(--bean-mid);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

/* ===== 蜜处理子类型色带 ===== */
.honey-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.honey-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--bean-mid);
    background: white;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(164,113,72,0.12);
}

.honey-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* 移动端隐藏部分元素 */
@media (max-width: 640px) {
    .hero { padding: 64px 0 48px; }
    .container { padding: 0 20px; }
    .hero-meta { font-size: 13px; }
}

/* ===== 关于本站 ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 56px 0;
}

.about-card {
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: 14px;
    padding: 26px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(78, 52, 26, 0.08);
}

.about-icon {
    font-size: 28px;
    margin-bottom: 12px;
    line-height: 1;
}

.about-card h3 {
    color: var(--bean-dark);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.about-card p {
    color: var(--bean-mid);
    font-size: 14px;
    line-height: 1.78;
    margin: 0;
}

.about-card p strong {
    color: var(--bean-dark);
}

/* ===== 联系作者 ===== */
.contact-block {
    background: var(--bean-dark);
    color: var(--cream);
    border-radius: 20px;
    padding: 48px 32px;
    margin-top: 56px;
    box-shadow: 0 16px 40px rgba(78, 52, 26, 0.18);
}

.contact-block .contact-eyebrow {
    text-align: center;
    color: var(--cream-dark);
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.contact-block h3 {
    text-align: center;
    color: var(--cream);
    font-size: 26px;
    margin: 0 0 14px 0;
    font-weight: 700;
}

.contact-block > p {
    text-align: center;
    color: rgba(250, 245, 236, 0.75);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.78;
    font-size: 15px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    text-decoration: none;
    color: var(--cream);
    transition: all 0.25s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-3px);
    border-color: var(--cream);
}

.contact-icon {
    font-size: 26px;
    margin-bottom: 10px;
    line-height: 1;
}

.contact-label {
    font-size: 12px;
    color: var(--cream-dark);
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    opacity: 0.85;
}

.contact-value {
    font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
    font-size: 15px;
    color: var(--cream);
    background: rgba(0, 0, 0, 0.22);
    padding: 6px 12px;
    border-radius: 8px;
    word-break: break-all;
    text-align: center;
}

@media (max-width: 640px) {
    .contact-block { padding: 36px 20px; }
    .contact-block h3 { font-size: 22px; }
    .about-grid { grid-template-columns: 1fr; }
}
