/* ==========================================================================
   想想宋锦手作 · 宋锦与宋锦饰品
   配色取自宣纸、朱砂、描金与黛绿，移动端优先。
   ========================================================================== */

:root {
  --paper: #FBF7F0;
  --paper-2: #F4ECE0;
  --paper-3: #EFE5D6;
  --ink: #241F1A;
  --ink-2: #5C5348;
  --ink-3: #8C8172;
  --cinnabar: #A8402F;
  --gold: #B08A4F;
  --jade: #3F6656;
  --line: rgba(36, 31, 26, 0.12);
  --line-soft: rgba(36, 31, 26, 0.07);

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", "Songti TC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;

  --gutter: 22px;
  --radius: 4px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0;
}

p { margin: 0; }

::selection {
  background: rgba(168, 64, 47, 0.18);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

.container {
  width: min(100% - var(--gutter) * 2, 1080px);
  margin-inline: auto;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  color: #fff;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.topbar.is-scrolled {
  background: rgba(251, 247, 240, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.topbar-inner {
  width: min(100% - var(--gutter) * 2, 1080px);
  margin-inline: auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1;
  opacity: 0.9;
}

.brand-name {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.18em;
}

.nav {
  display: none;
  gap: 26px;
  margin-inline: auto;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  opacity: 0.94;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s;
}
.nav a:hover { opacity: 1; }

.topbar.is-scrolled .nav a { text-shadow: none; }

.topbar-cta {
  margin-left: auto;
  font-size: 13px;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(252, 247, 239, 0.55);
  border-radius: 999px;
  background: rgba(20, 15, 11, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  flex: none;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.topbar.is-scrolled .topbar-cta {
  background: transparent;
  border-color: var(--line);
}

@media (min-width: 860px) {
  .nav { display: flex; }
  .topbar-cta { margin-left: 0; }
  .topbar-inner { height: 66px; }
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: min(720px, 90svh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #2A221B;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media picture {
  display: block;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.02);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 190px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(18, 13, 9, 0.62), rgba(18, 13, 9, 0.18) 55%, transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(18, 13, 9, 0.95) 0%, rgba(18, 13, 9, 0.72) 26%, rgba(18, 13, 9, 0.34) 52%, rgba(18, 13, 9, 0.28) 74%, rgba(18, 13, 9, 0.6) 100%);
}

.hero-text {
  position: relative;
  z-index: 2;
  width: min(100% - var(--gutter) * 2, 1080px);
  margin-inline: auto;
  padding-bottom: clamp(48px, 9vh, 84px);
  color: #FCF7EF;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(252, 247, 239, 0.85);
  margin-bottom: 18px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-title {
  font-size: clamp(2.5rem, 12vw, 4.4rem);
  line-height: 1.24;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-sub {
  margin-top: 14px;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(252, 247, 239, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--cinnabar);
  color: #fff;
  box-shadow: 0 6px 20px rgba(120, 40, 28, 0.32);
}

.btn-ghost {
  border: 1px solid rgba(252, 247, 239, 0.5);
  color: #FCF7EF;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  width: 22px;
  height: 34px;
  margin-left: -11px;
  border: 1px solid rgba(252, 247, 239, 0.42);
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.hero-scroll span {
  width: 2px;
  height: 8px;
  background: rgba(252, 247, 239, 0.8);
  border-radius: 2px;
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(-3px); opacity: 0.4; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ---------- 通用板块 ---------- */

.section {
  padding-block: clamp(64px, 13vw, 112px);
  scroll-margin-top: 56px;
}

.section-alt { background: var(--paper-2); }

.section-dark {
  background: #211B16;
  color: #F0E7D9;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 18px;
}

.eyebrow span {
  display: block;
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow-light { color: rgba(214, 178, 118, 0.9); }

.section-title {
  font-size: clamp(1.5rem, 6.6vw, 2.4rem);
  line-height: 1.5;
  letter-spacing: 0.03em;
}

.section-lead {
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 15px;
  max-width: 40em;
}

.prose { margin-top: 28px; }

.prose p {
  color: var(--ink-2);
  font-size: 15.5px;
  margin-bottom: 1.1em;
  max-width: 44em;
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid rgba(176, 138, 79, 0.5);
  padding-bottom: 1px;
}

/* ---------- 数据 ---------- */

.facts {
  display: grid;
  gap: 26px;
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.fact-num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 8vw, 2.3rem);
  line-height: 1.2;
  color: var(--cinnabar);
  letter-spacing: 0.02em;
}

.fact-label {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* ---------- 时间线 ---------- */

.timeline {
  margin-top: 52px;
  display: grid;
  gap: 30px;
}

.tl-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 14px;
  position: relative;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: -34px;
  width: 1px;
  background: var(--line);
}

.tl-item:last-child::before { display: none; }

.tl-dot {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 3px var(--paper);
  justify-self: start;
}

.tl-item h3 {
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.tl-item p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 42em;
}

@media (min-width: 860px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .tl-item::before { display: none; }
  .tl-item { grid-template-columns: 1fr; }
  .tl-item .tl-dot { display: none; }
  .tl-item { border-top: 1px solid var(--line); padding-top: 20px; }
  .tl-item h3 { margin-top: 0; }
}

/* ---------- 工艺 ---------- */

.craft-grid {
  margin-top: 44px;
  display: grid;
  gap: 0;
}

.craft-card {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.craft-index {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.craft-card h3 {
  margin-top: 10px;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.craft-card p {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 34em;
}

@media (min-width: 760px) {
  .craft-grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 48px;
  }
}

@media (min-width: 1024px) {
  .craft-grid { grid-template-columns: repeat(4, 1fr); column-gap: 32px; }
}

/* ---------- 纹样 ---------- */

.pattern-scroller {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px var(--gutter) 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pattern-scroller::-webkit-scrollbar { display: none; }

.pattern-card {
  flex: none;
  width: 216px;
  scroll-snap-align: start;
  background: #FFFDF9;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 20px 26px;
  color: var(--gold);
}

.pattern-card svg {
  width: 62px;
  height: 62px;
  color: var(--gold);
  opacity: 0.85;
}

.pattern-card h3 {
  margin-top: 18px;
  font-size: 17px;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.pattern-card p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .pattern-scroller {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    overflow: visible;
    padding: 0;
    width: min(100% - var(--gutter) * 2, 1080px);
    margin-inline: auto;
  }
  .pattern-card { width: auto; }
}

/* ---------- 饰品 ---------- */

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  margin-top: 28px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.22s ease;
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 12px;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 22px 18px; }
}

@media (min-width: 940px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 26px 22px; }
}

.card {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.card[hidden] { display: none; }

.card-media {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, #F8F2E7 0%, #EFE4D3 100%);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.card:hover .card-media img,
.card:focus-visible .card-media img { transform: scale(1.045); }

.card-body { padding: 10px 2px 0; }

.card-body h3 {
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.card-body p {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.grid-empty {
  margin-top: 26px;
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------- 定制 ---------- */

.custom-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-line {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 12px 22px;
  cursor: pointer;
}

.btn-line:hover {
  border-color: rgba(176, 138, 79, 0.7);
  color: var(--cinnabar);
}

.custom-tip {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- 联系 ---------- */

.contact-grid {
  margin-top: 34px;
  display: grid;
  gap: 14px;
}

@media (min-width: 720px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

.contact-card {
  position: relative;
  display: block;
  padding: 26px 24px;
  border: 1px solid rgba(240, 231, 217, 0.16);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s, background 0.25s;
}

.contact-card:hover {
  border-color: rgba(214, 178, 118, 0.5);
  background: rgba(255, 255, 255, 0.055);
}

.contact-label {
  font-size: 11.5px;
  letter-spacing: 0.26em;
  color: rgba(214, 178, 118, 0.85);
}

.contact-value {
  display: block;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.contact-desc {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(240, 231, 217, 0.6);
}

.contact-arrow {
  position: absolute;
  right: 24px;
  top: 26px;
  color: rgba(214, 178, 118, 0.8);
}

.contact-card-wechat { padding-bottom: 26px; }

.copy-btn {
  margin-top: 16px;
  padding: 8px 18px;
  border: 1px solid rgba(214, 178, 118, 0.5);
  border-radius: 999px;
  background: transparent;
  color: #E8D6B8;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.copy-btn:hover { background: rgba(214, 178, 118, 0.14); }

.qr {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  border-radius: 3px;
}

.qr[data-missing] { display: none; }

@media (min-width: 520px) {
  .qr { width: 116px; height: 116px; right: 24px; bottom: 24px; }
}

.contact-tip {
  margin-top: 20px;
  font-size: 12px;
  color: rgba(240, 231, 217, 0.42);
}

.contact-tip code {
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ---------- 页脚 ---------- */

.footer {
  background: #1A1511;
  color: rgba(240, 231, 217, 0.55);
  padding: 44px 0 calc(44px + env(safe-area-inset-bottom));
  font-size: 12.5px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.3em;
  color: #E8D6B8;
  margin-bottom: 16px;
}

.footer-note {
  line-height: 1.9;
  margin-bottom: 6px;
  max-width: 46em;
}

.footer-copy { margin-top: 18px; opacity: 0.6; }

/* ---------- 底部操作条 ---------- */

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(251, 247, 240, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-bar.is-visible { transform: translateY(0); }

.ab-btn {
  flex: 1;
  padding: 13px 12px;
  border-radius: 999px;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.ab-primary {
  background: var(--cinnabar);
  color: #fff;
}

.ab-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

/* ---------- 大图 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 12px;
  background: rgba(16, 12, 9, 0.95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox[hidden] { display: none; }

.lightbox.is-open { opacity: 1; }

.lb-figure {
  margin: 0;
  max-width: min(92vw, 720px);
  text-align: center;
}

.lb-figure img {
  max-height: 68vh;
  width: auto;
  margin-inline: auto;
  border-radius: 2px;
  object-fit: contain;
}

.lb-figure figcaption {
  margin-top: 18px;
  color: #F2E8D8;
}

.lb-title {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.1em;
}

.lb-note {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(242, 232, 216, 0.65);
  padding-inline: 10px;
}

.lb-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #F2E8D8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lb-nav {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #F2E8D8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.lb-nav:hover { opacity: 1; }

@media (max-width: 420px) {
  .lb-nav { display: none; }
}

/* ---------- 提示条 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 130;
  transform: translate(-50%, 12px);
  background: rgba(36, 31, 26, 0.94);
  color: #F7EFE2;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 进入动画 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll span { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

body.is-locked { overflow: hidden; }

@media (min-width: 860px) {
  :root { --gutter: 40px; }
  body { font-size: 16.5px; }
  .hero { min-height: min(760px, 84vh); }
  .section { padding-block: 116px; }
}
