/* ============================================================
   黄铜工坊 · 视觉皮肤层
   版面沿用 style.css 原布局。
   原则：明暗拉开、底色干净通透、卡片比背景亮一档。
   ============================================================ */

:root {
  --at-paper:      #F7F2E8;
  --at-dark:       #131312;   /* 深区：比原 #121214 略暖，但保持足够深 */
  --at-soft:       #1C1C1B;   /* 中间区：与深区拉开 */
  --at-card:       #342B22;   /* 卡片：明显亮于背景 */
  --at-card-hi:    #40352A;
  --at-ink:        #241C14;
  --at-ink-2:      #6A5842;
  --at-copper:     #B07A34;
  --at-copper-lt:  #D8AF6A;
  --at-cream:      #F8F3E9;
  --at-rule-dark:  rgba(216, 175, 106, 0.30);
}

body {
  --ink: #131312;
  --ink-soft: #1C1C1B;
  --ink-card: #342B22;
  --ink-card-hover: #40352A;
  --gold: #C9A25E;
  --gold-light: #E4C68A;
  --gold-dim: #9A7B47;
  --cream: #F8F3E9;
  --cream-dim: #E9DECB;
  --paper-warm: #F7F2E8;
  --rule: rgba(201, 162, 94, 0.30);
  --muted: #8C8377;
  --muted-light: #BDB3A3;
}

/* ------------------------------------------------------------
   1. 区块底色 —— 保持原有的深/浅交替，只把纯黑换成有温度的深
   ------------------------------------------------------------ */
.section-light {
  background: var(--at-paper);
  color: var(--at-ink);
}

.section-dark {
  background: var(--at-dark);
  color: var(--at-cream);
}

.section-soft {
  background: var(--at-soft);
  color: var(--at-cream);
}

/* ------------------------------------------------------------
   2. 排版
   ------------------------------------------------------------ */
.section-label {
  font-family: var(--serif-sc);
  font-size: 0.74rem;
  letter-spacing: 0.30em;
  color: var(--at-copper);
}

.section-dark .section-label,
.section-soft .section-label {
  color: var(--at-copper-lt);
}

.section-title {
  font-family: var(--serif-sc);
  font-weight: 500;
  letter-spacing: 0.012em;
  line-height: 1.22;
  text-wrap: balance;
}

.section-title em {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.10em;
}

.section-desc {
  font-family: var(--serif-sc);
  font-weight: 300;
  line-height: 2.0;
  max-width: 36em;
}

.section-light .section-desc { color: var(--at-ink-2); }
.section-dark .section-desc,
.section-soft .section-desc { color: rgba(248, 243, 233, 0.88); }

.rule.gold {
  background: var(--at-copper);
  opacity: 0.85;
}

/* ------------------------------------------------------------
   3. 卡片 —— 比背景亮一档，金边看得见
   ------------------------------------------------------------ */
.card,
.inventory-card,
.service-card {
  background: var(--at-card);
  border: 1px solid var(--at-rule-dark);
  box-shadow: 0 16px 36px -32px rgba(0, 0, 0, 0.85);
}

.card:hover,
.inventory-card:hover,
.service-card:hover {
  border-color: rgba(228, 198, 138, 0.70);
  background: var(--at-card-hi);
}

.card::before { background: linear-gradient(90deg, transparent, var(--at-copper-lt), transparent); }

.service-icon {
  color: var(--at-copper-lt);
  opacity: 1;
}

.service-title {
  color: var(--at-cream);
  font-family: var(--serif-sc);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.service-desc {
  color: rgba(248, 243, 233, 0.86);
  font-family: var(--serif-sc);
  font-weight: 300;
  line-height: 1.95;
}

.service-link { color: var(--at-copper-lt); letter-spacing: 0.1em; }

/* 工序 */
.craft-step { border-right-color: var(--at-rule-dark); }
.craft-step-num {
  background: linear-gradient(180deg, var(--at-copper-lt) 0%, var(--at-copper) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.78;
}
.craft-step-title { color: var(--at-cream); }
.craft-step-desc { color: rgba(248, 243, 233, 0.80); }

/* ------------------------------------------------------------
   4. 理念轮播 —— 覆盖内联的黑底渐变，改用暖棕（仍保持深，与纸区形成对比）
   ------------------------------------------------------------ */
.phil-carousel-slide {
  background: linear-gradient(135deg, #2A2119 0%, #3A2C20 52%, #2C231A 100%) !important;
  box-shadow: 0 24px 54px -30px rgba(36, 28, 20, 0.55),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phil-carousel-slide:nth-child(2n) {
  background: linear-gradient(135deg, #2E2620 0%, #3D3126 52%, #2A2219 100%) !important;
}

.phil-carousel-slide-inner { text-align: center; padding: 2rem; }

.phil-carousel-slide-symbol {
  font-family: var(--serif-en);
  font-style: italic;
  color: var(--at-copper-lt);
  opacity: 0.95;
}

.phil-carousel-slide-title {
  font-family: var(--serif-sc);
  color: var(--at-cream);
  font-weight: 500;
}

.phil-carousel-slide-sub {
  font-family: var(--serif-sc);
  color: rgba(248, 243, 233, 0.78);
  letter-spacing: 0.08em;
}

.phil-carousel-dot { border-color: rgba(216, 175, 106, 0.5); }
.phil-carousel-dot.active { background: var(--at-copper-lt); border-color: var(--at-copper-lt); }

/* ------------------------------------------------------------
   5. 商品卡
   ------------------------------------------------------------ */
.inventory-card-image { background: #2C231A; }

.inventory-card-overlay {
  background: linear-gradient(to top,
    rgba(23, 19, 16, 0.94) 0%,
    rgba(23, 19, 16, 0.68) 42%,
    rgba(23, 19, 16, 0) 100%);
}

.inventory-card-tag {
  color: var(--at-copper-lt);
  font-family: var(--serif-sc);
  letter-spacing: 0.16em;
}

.inventory-card-name { color: var(--at-cream); font-family: var(--serif-sc); }
.inventory-card-price { color: rgba(248, 243, 233, 0.80); }

.inventory-card-symbol {
  color: rgba(216, 175, 106, 0.38);
  background: #2C231A;
}

/* ------------------------------------------------------------
   6. CTA
   ------------------------------------------------------------ */
.cta-banner {
  background: linear-gradient(135deg, #2E2419 0%, #43301E 48%, #241B13 100%);
  border-top: 1px solid var(--at-rule-dark);
  border-bottom: 1px solid var(--at-rule-dark);
}

/* ------------------------------------------------------------
   7. 后台可配的三张工坊图（填了才显示，隐藏逻辑不变）
   ------------------------------------------------------------ */
.craft-gallery figure {
  border-color: var(--at-rule-dark);
  background: #2C231A;
}

/* ------------------------------------------------------------
   8. 降低动效
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .card,
  .inventory-card,
  .craft-gallery img,
  .phil-carousel-slide {
    transition: none !important;
  }
}

/* ------------------------------------------------------------
   9. 导航：暖调半透明，压在纸区上不发灰
   ------------------------------------------------------------ */
.nav {
  background-color: rgba(26, 21, 17, 0.88);
  border-bottom: 1px solid rgba(201, 162, 94, 0.16);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
}

.nav-scrolled {
  background-color: rgba(22, 18, 14, 0.95);
}

.nav-brand,
.nav-links a { color: var(--at-cream); }

.nav-links a:hover,
.nav-links a.active { color: var(--at-copper-lt); }

/* ------------------------------------------------------------
   10. 浅色区里的文字必须是深色（原版 contact 标题漏了这层）
   ------------------------------------------------------------ */
.section-light .section-title { color: var(--at-ink); }
.section-light .section-title em { color: var(--at-copper); }
.section-light .section-label { color: var(--at-copper); }
.section-light .section-desc { color: var(--at-ink-2); }

.section-light .contact-info-title { color: var(--at-ink); }
.section-light .contact-info-text { color: var(--at-ink-2); }

/* ============================================================
   11. 工艺区：金线工序链 + 三图阵列（无悬停交互）
   ============================================================ */
#craft {
  background: var(--at-paper);
  color: var(--at-ink);
  padding: clamp(5rem, 8vw, 9rem) 0 clamp(5rem, 8vw, 8rem);
}

#craft > .container { position: relative; z-index: 1; }

#craft .section-label { color: var(--at-copper); }
#craft .section-title { color: var(--at-ink); }
#craft .section-title em { color: var(--at-copper); }

.atelier-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 3rem);
  margin-top: clamp(2.5rem, 4vw, 3.6rem);
}

.atelier-steps::before {
  content: "";
  position: absolute;
  top: 1.55rem; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right,
    rgba(176, 122, 52, 0) 0%,
    rgba(176, 122, 52, 0.42) 8%,
    rgba(176, 122, 52, 0.42) 92%,
    rgba(176, 122, 52, 0) 100%);
}

.atelier-step { position: relative; padding-top: 4.1rem; }

.atelier-step-num {
  position: absolute;
  top: 0; left: 0;
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(176, 122, 52, 0.42);
  border-radius: 50%;
  background: var(--at-paper);
  font-family: var(--serif-en);
  font-style: normal;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--at-copper);
  -webkit-text-fill-color: currentColor;
}

.atelier-step-title {
  font-family: var(--serif-sc);
  font-weight: 500;
  font-size: clamp(1.08rem, 1.35vw, 1.22rem);
  line-height: 1.45;
  color: var(--at-ink);
  margin: 0 0 0.72rem;
}

.atelier-step-desc {
  font-family: var(--serif-sc);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--at-ink-2);
  margin: 0;
}

/* 三图：等宽等高阵列 */
.atelier-craft-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.2rem);
  margin-top: clamp(3.2rem, 5.5vw, 5.5rem);
  align-items: stretch;
}

.atelier-craft-strip figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--at-paper-deep, #E3D7C1);
}

.atelier-craft-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03);
}

.atelier-craft-strip figcaption {
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.85rem;
  font-family: var(--serif-sc);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(248, 243, 233, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   12. 服务区：回到原先的黑金
   ============================================================ */
#services {
  background: #0F0E0D;
}

#services .service-card {
  background: linear-gradient(160deg, #18181e 0%, #1f1f27 50%, #17171d 100%);
  border-color: rgba(184, 148, 75, 0.22);
  box-shadow: none;
}

#services .service-card:hover {
  background: linear-gradient(160deg, #1d1d24 0%, #25252e 50%, #1c1c23 100%);
  border-color: rgba(184, 148, 75, 0.55);
}

#services .service-icon { color: #C9A25E; }
#services .service-title { color: #F5F0E8; }
#services .service-desc { color: #B7A78E; }

/* ============================================================
   13. 预约咨询：黑白过渡带
   ============================================================ */
#cta {
  background: linear-gradient(180deg,
    #0A0908 0%,
    #0A0908 46%,
    #2B2822 62%,
    #6E6A62 78%,
    #C9C3B7 90%,
    #F7F2E8 100%);
  border-top: 0;
  border-bottom: 0;
}

#cta .cta-title,
#cta h2 { color: #F5F0E8; }

#cta p { color: rgba(245, 240, 232, 0.82); }

/* ============================================================
   14. 工艺区响应式
   ============================================================ */
@media (max-width: 1024px) {
  .atelier-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atelier-steps::before { display: none; }
}

@media (max-width: 640px) {
  .atelier-steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .atelier-step { padding-top: 0; padding-left: 4rem; }
  .atelier-step-num { top: 0; }
  .atelier-craft-strip { grid-template-columns: 1fr; }
  .atelier-craft-strip figure { aspect-ratio: 16 / 11; }
}

/* ============================================================
   15. 工艺步骤：悬停交互（无图片依赖）
   ============================================================ */
.atelier-step {
  transition: transform 0.45s var(--ease-out);
}

.atelier-step-num {
  transition: background-color 0.35s var(--ease-out),
              color 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out),
              transform 0.35s var(--ease-out);
}

.atelier-step:hover { transform: translateY(-3px); }

.atelier-step:hover .atelier-step-num {
  background: var(--at-copper);
  border-color: var(--at-copper);
  color: var(--at-paper);
  transform: scale(1.06);
}

.atelier-step:hover .atelier-step-title { color: var(--at-copper); }

.atelier-step-title { transition: color 0.35s var(--ease-out); }

/* 键盘可达性：与悬停同等的反馈 */
.atelier-step:focus-within .atelier-step-num {
  background: var(--at-copper);
  border-color: var(--at-copper);
  color: var(--at-paper);
}

/* 图片已移除，清掉对应规则占位 */
.atelier-craft-strip { display: none !important; }

/* ============================================================
   16. 工艺工序：悬停累积点亮（1 → 1-2 → 1-2-3 → 1-2-3-4）
   ============================================================ */
.atelier-step {
  --i: 0;
  transition: transform 0.4s var(--ease-out);
}

.atelier-step-num,
.atelier-step-title,
.atelier-step-desc {
  transition-duration: 0.38s;
  transition-timing-function: var(--ease-out);
  transition-delay: calc(var(--i) * 55ms);
}

.atelier-step.lit .atelier-step-num {
  background: var(--at-copper);
  border-color: var(--at-copper);
  color: var(--at-paper);
  transform: scale(1.06);
}

.atelier-step.lit .atelier-step-title { color: var(--at-copper); }
.atelier-step.lit .atelier-step-desc { color: var(--at-ink); }

/* 悬停项自身轻微上浮，其余只点亮 */
.atelier-step.lit:hover { transform: translateY(-3px); }

/* 保留原有单项悬停不再单独放大圆圈（由 .lit 统一控制） */
.atelier-step:hover .atelier-step-num { transform: scale(1.06); }

/* ============================================================
   17. 工艺连线：随点亮进度填充
   ============================================================ */
.atelier-steps {
  --p: 0;
}

.atelier-steps::before {
  background: rgba(176, 122, 52, 0.18);
}

.atelier-steps::after {
  content: "";
  position: absolute;
  top: 1.55rem;
  left: 0;
  height: 1px;
  width: calc(var(--p) * 100%);
  background: linear-gradient(to right,
    rgba(216, 175, 106, 0.25) 0%,
    rgba(216, 175, 106, 0.85) 70%,
    rgba(232, 200, 140, 1) 100%);
  box-shadow: 0 0 8px rgba(216, 175, 106, 0.45);
  transition: width 0.45s var(--ease-out);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .atelier-steps::after { display: none; }
}

/* ============================================================
   18. 工艺工序：加粗点亮 + 流动灌注
   ============================================================ */
.atelier-steps {
  --p: 0;
  --dur: 0.5s;
}

/* 基线略收细，让灌注线更突出 */
.atelier-steps::before {
  height: 1px;
  background: rgba(176, 122, 52, 0.16);
}

/* 灌注线：加粗到 2px，带流动高光 */
.atelier-steps::after {
  top: 1.45rem;
  height: 2px;
  width: calc(var(--p) * 100%);
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(216, 175, 106, 0.35) 0%,
    rgba(232, 200, 140, 0.95) 55%,
    rgba(255, 236, 190, 1) 100%);
  background-size: 200% 100%;
  box-shadow:
    0 0 10px rgba(216, 175, 106, 0.55),
    0 0 22px rgba(216, 175, 106, 0.28);
  transition: width var(--dur) cubic-bezier(0.22, 0.61, 0.36, 1);
  animation: at-flow 1.6s linear infinite;
}

@keyframes at-flow {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* 圆圈：按到达顺序依次点亮，所选位置最后亮 */
.atelier-step-num {
  transition:
    background-color 0.30s var(--ease-out),
    color 0.30s var(--ease-out),
    border-color 0.30s var(--ease-out),
    transform 0.30s var(--ease-out),
    box-shadow 0.30s var(--ease-out);
  transition-delay: calc(var(--i) * 130ms);
}

.atelier-step.lit .atelier-step-num {
  background: var(--at-copper);
  border-color: var(--at-copper-lt);
  color: var(--at-paper);
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(216, 175, 106, 0.16),
              0 0 16px rgba(216, 175, 106, 0.45);
}

/* 文字同步加粗点亮 */
.atelier-step-title {
  transition: color 0.3s var(--ease-out), font-weight 0.3s var(--ease-out);
  transition-delay: calc(var(--i) * 130ms);
}
.atelier-step.lit .atelier-step-title {
  color: var(--at-copper);
  font-weight: 600;
}

.atelier-step-desc {
  transition: color 0.3s var(--ease-out);
  transition-delay: calc(var(--i) * 130ms);
}
.atelier-step.lit .atelier-step-desc { color: var(--at-ink); }

@media (prefers-reduced-motion: reduce) {
  .atelier-steps::after { animation: none; }
  .atelier-step-num, .atelier-step-title, .atelier-step-desc { transition-delay: 0s !important; }
}

/* ============================================================
   19. 流光只在点亮期间运行；取消上浮避免抖动
   ============================================================ */
.atelier-steps::after { animation: none; }
.atelier-steps.flowing::after { animation: at-flow 1.6s linear infinite; }

.atelier-step:hover,
.atelier-step.lit:hover { transform: none; }

/* ============================================================
   20. 连线分段：只走圆外，接住每个圆，不重叠
   ============================================================ */
.atelier-steps {
  --gap: clamp(1.2rem, 3vw, 3rem);
  gap: var(--gap);
}

/* 停用贯穿全宽的单条线 */
.atelier-steps::before,
.atelier-steps::after { display: none !important; }

/* 每段：从本列圆右缘，连到下一列圆左缘 */
.atelier-step::before {
  content: "";
  position: absolute;
  top: 1.55rem;
  left: 3.1rem;
  width: calc(100% - 3.1rem + var(--gap));
  height: 1px;
  background: rgba(176, 122, 52, 0.18);
  pointer-events: none;
}

/* 点亮段：从起点向终点生长 */
.atelier-step::after {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: 3.1rem;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(216, 175, 106, 0.55) 0%,
    rgba(240, 212, 158, 0.95) 100%);
  box-shadow: 0 0 8px rgba(216, 175, 106, 0.45);
  transition: width 0.26s linear;
  transition-delay: calc(var(--i) * 130ms);
  pointer-events: none;
}

.atelier-step.line-lit::after {
  width: calc(100% - 3.1rem + var(--gap));
}

/* 最后一步右侧没有下一段 */
.atelier-step:last-child::before,
.atelier-step:last-child::after { display: none; }

/* 移动端单列：不画横向连线 */
@media (max-width: 640px) {
  .atelier-step::before,
  .atelier-step::after { display: none; }
}

/* ============================================================
   21. 离开时从右向左顺滑暗灭
   ============================================================ */
.atelier-steps.closing .atelier-step::after,
.atelier-steps.closing .atelier-step-num,
.atelier-steps.closing .atelier-step-title,
.atelier-steps.closing .atelier-step-desc {
  transition-delay: 0s !important;
  transition-duration: 0.34s !important;
  transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1) !important;
}

/* 熄灭时线条向起点方向收回 */
.atelier-steps.closing .atelier-step::after {
  transition-property: width, opacity;
}
