/* ============================================
   烽审榜主样式
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-zh);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text-secondary);
  background: var(--color-bg-primary);
  background-image:
    radial-gradient(ellipse at top, rgba(184, 146, 74, 0.08) 0%, transparent 50%),
    var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--color-gold-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold-highlight);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   通用容器
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ============================================
   顶部导航
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: var(--color-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(184, 146, 74, 0.1);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: var(--color-header-bg-scrolled);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: var(--fs-xl);
  color: var(--color-text-primary);
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav a:hover,
.nav a.active {
  color: var(--color-gold-highlight);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--gradient-gold) !important;
  color: var(--color-bg-primary) !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  -webkit-text-fill-color: var(--color-bg-primary);
}

.nav-cta::after {
  display: none !important;
}

.menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-gold-secondary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* ============================================
   首页主视觉
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(72px + 4rem) 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(184, 146, 74, 0.15) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 560px;
  text-align: left;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(184, 146, 74, 0.1);
  border: 1px solid rgba(184, 146, 74, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  color: var(--color-gold-highlight);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.hero-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-gold-secondary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--color-gold-secondary);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: var(--fs-6xl);
  font-weight: 900;
  line-height: 1.1;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-title .gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--fs-xl);
  color: var(--color-text-tertiary);
  margin-bottom: 3rem;
  line-height: 1.6;
  max-width: 560px;
  margin-left: 0;
  margin-right: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-portrait {
  position: relative;
  justify-self: center;
}

/* 人物轮播容器：维持原 3:4 尺寸与金色描边，内部切图
   注意：宽度必须给固定值。父级 .hero-portrait 是 grid 子项（justify-self:center），
   宽度靠内容撑开；这里若写 width:100% 会形成循环依赖，把容器塌成 0 宽。 */
.portrait-carousel {
  position: relative;
  width: 380px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gold-primary);
  box-shadow: var(--shadow-gold);
  overflow: hidden;
  background: var(--color-bg-subtle, #f7f4ee);
}

.portrait-track {
  position: absolute;
  inset: 0;
}

.portrait-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 6s ease;
  pointer-events: none;
}

.portrait-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* 轮播指示点 */
.portrait-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(20, 18, 15, 0.35);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.portrait-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all var(--transition-base);
}

.portrait-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.portrait-dot.is-active {
  width: 22px;
  border-radius: var(--radius-full);
  background: var(--color-gold-primary);
}

.portrait-dot:focus-visible {
  outline: 2px solid var(--color-gold-primary);
  outline-offset: 2px;
}

.hero-portrait-img {
  display: block;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gold-primary);
  box-shadow: var(--shadow-gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: var(--fs-base);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-bg-primary);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 106, 0.4);
  color: var(--color-bg-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold-highlight);
  border: 1px solid var(--color-gold-primary);
}

.btn-outline:hover {
  background: rgba(184, 146, 74, 0.1);
  border-color: var(--color-gold-highlight);
  transform: translateY(-2px);
}

/* ============================================
   区块通用
   ============================================ */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-tag {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--color-gold-secondary);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-title {
  font-size: var(--fs-5xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-title .gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  font-size: var(--fs-lg);
  color: var(--color-text-tertiary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   主营业务卡片网格
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: var(--space-xl);
}

.service-card {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--color-bg-secondary);
  background-image: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-gold-primary);
  box-shadow: var(--shadow-gold);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(184, 146, 74, 0.4));
}
/* 业务图标支持图片（后台可上传图片图标，URL 模式） */
.service-icon img, .service-detail-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  filter: none;
}

.service-title {
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.service-subtitle {
  font-family: var(--font-en);
  font-size: var(--fs-sm);
  color: var(--color-gold-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.service-summary {
  color: var(--color-text-tertiary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: var(--fs-sm);
}

/* ============================================================
   Markdown 渲染容器表格样式
   后台「案例 / 业务」摘要用 Markdown 编辑器撰写（支持表格），
   存储时已转成 <table> HTML。这些摘要原本被塞进 <p> 标签、
   且全站 CSS 此前完全没有表格样式，导致表格要么被浏览器拆坏、
   要么裸奔无边框。这里统一补样式（与博客详情页保持一致）。
   涉及容器：.case-card-summary / .service-detail-summary / .service-summary
   ============================================================ */
.case-card-summary table,
.service-detail-summary table,
.service-summary table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: var(--fs-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.case-card-summary thead,
.service-detail-summary thead,
.service-summary thead {
  background: var(--color-bg-secondary);
}
.case-card-summary th,
.service-detail-summary th,
.service-summary th,
.case-card-summary td,
.service-detail-summary td,
.service-summary td {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.9rem;
  text-align: left;
  min-width: 90px;
  line-height: 1.5;
}
.case-card-summary th,
.service-detail-summary th,
.service-summary th {
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
}
.case-card-summary tbody tr:nth-child(even),
.service-detail-summary tbody tr:nth-child(even),
.service-summary tbody tr:nth-child(even) {
  background: var(--color-bg-secondary);
}
.case-card-summary tbody tr:hover,
.service-detail-summary tbody tr:hover,
.service-summary tbody tr:hover {
  background: rgba(201, 162, 77, 0.08);
}

.service-features {
  margin-bottom: 1.5rem;
}

.service-features li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  margin-bottom: 0.5rem;
}

.service-features li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--color-gold-secondary);
  font-size: 0.625rem;
  top: 0.4rem;
}

.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-gold-secondary);
  font-weight: 600;
  font-size: var(--fs-sm);
}

.service-link::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.service-card:hover .service-link::after {
  transform: translateX(4px);
}

/* ============================================
   个人介绍
   ============================================ */
.about-section {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 320px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--color-gold-primary);
  box-shadow: var(--shadow-gold);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  filter: drop-shadow(0 0 24px var(--color-gold-glow));
}

.about-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(184, 146, 74, 0.1) 100%);
}

.about-name {
  font-size: var(--fs-4xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.about-title {
  font-size: var(--fs-lg);
  color: var(--color-gold-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.about-desc {
  color: var(--color-text-tertiary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: var(--fs-base);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: var(--font-en);
  font-size: var(--fs-4xl);
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-tertiary);
  margin-top: 0.5rem;
}

/* ============================================
   数据统计
   ============================================ */
.stats-section {
  background: var(--color-bg-primary);
  padding: var(--space-2xl) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-box {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
}

.stat-box:hover {
  border-color: var(--color-gold-primary);
  transform: translateY(-4px);
}

/* ============================================
   CTA 区域
   ============================================ */
.cta-section {
  text-align: center;
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(184, 146, 74, 0.12) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-title {
  font-size: var(--fs-5xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.cta-desc {
  font-size: var(--fs-lg);
  color: var(--color-text-tertiary);
  margin-bottom: 2.5rem;
}

/* ============================================
   页脚
   ============================================ */
.footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-lg);
  color: var(--color-text-tertiary);
  font-size: var(--fs-sm);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-primary), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand img {
  height: auto;
  width: auto;
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
  align-self: flex-start;
  border-radius: var(--radius-sm);
}

.footer-tagline {
  color: var(--color-text-tertiary);
  line-height: 1.8;
  font-size: var(--fs-sm);
  max-width: 320px;
}

.footer-col h4 {
  color: var(--color-gold-secondary);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--color-text-tertiary);
  padding: 0.25rem 0;
  font-size: var(--fs-sm);
}

.footer-col a:hover {
  color: var(--color-gold-highlight);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  line-height: 1.8;
}

/* 页脚备案号（工信部链接） */
.footer-icp {
  margin-top: 0.5rem;
  font-size: var(--fs-xs);
}
.footer-icp-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-icp-link:hover {
  color: var(--color-gold-highlight);
  text-decoration: underline;
}

/* 页脚友情链接（下拉 <select>，数据来自 data/friendlinks.json，后台可图形管理增删） */
.fl-mount { margin-top: 0.2rem; }
.fl-select {
  width: 100%;
  max-width: 200px;
  padding: 0.5rem 1.8rem 0.5rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-secondary, #fff);
  color: var(--color-text-secondary, #333);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  /* 金色下拉箭头（用渐变绘制，免去外链图标，明暗主题自适应） */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-gold-primary) 50%),
    linear-gradient(135deg, var(--color-gold-primary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.fl-select:hover,
.fl-select:focus {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 3px rgba(201, 162, 92, 0.15); /* 金色辉光，与品牌色一致 */
  outline: none;
}
/* 仅供搜索引擎 / AI 爬虫抓取的隐藏锚点（<select> 的 <option> 不被爬虫索引） */
.fl-seo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
.fl-seo a {
  color: var(--color-text-tertiary);
  font-size: var(--fs-xs);
  text-decoration: none;
}

/* 小屏：页脚网格降到 2 列，品牌占满整行 */
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ============================================
   滚动动画
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

/* ============================================
   响应式：Hero 分栏 / About 在移动端堆叠
   ============================================ */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-portrait {
    order: -1;
  }
  .hero-portrait-img,
  .portrait-carousel {
    max-width: 260px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
