/* ═══════════════════════════════════════════════
   宜舟家居 · 章节样式
   sections.css — 首屏/溯源/取材/匠作/泊岸/同行/归处
   ═══════════════════════════════════════════════ */

/* ═══ 序 · 启航（首屏）═════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px var(--gap) 90px;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* WebGL 不可用时的静态底 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(52% 42% at 74% 30%, rgba(122, 155, 118, 0.16), transparent 68%),
    radial-gradient(40% 34% at 18% 76%, rgba(201, 169, 110, 0.10), transparent 70%),
    var(--bg);
}

.hero__ghost {
  position: absolute;
  right: clamp(-40px, 2vw, 60px);
  bottom: clamp(-90px, -6vw, -30px);
  font-family: var(--f-serif);
  font-size: clamp(320px, 44vw, 680px);
  font-weight: 600;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(18, 59, 46, 0.08);
  z-index: 0;
  user-select: none;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--w-content);
  margin: 0 auto;
  width: 100%;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--f-latin);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--gold-deep);
  margin-bottom: clamp(26px, 4vh, 44px);
}

.hero__eyebrow-line {
  width: 64px;
  height: 1px;
  background: var(--gold);
  transform-origin: left;
  flex-shrink: 0;
}

/* 分段眉标：小屏在分段处换行，不拆词 */
.hero__eyebrow-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.9em;
  row-gap: 0.5em;
}

.hero__eyebrow-text span { white-space: nowrap; }
.hero__eyebrow-text i { color: var(--gold); letter-spacing: 0; }

.hero__title {
  font-size: clamp(44px, 8.2vw, 116px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: clamp(26px, 4vh, 40px);
}

.hero__sub {
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 2.1;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: clamp(36px, 5vh, 56px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* 右侧竖排 */
.hero__vertical {
  position: absolute;
  right: clamp(18px, 3.5vw, 56px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--f-serif);
  font-size: 14px;
  letter-spacing: 0.6em;
  color: var(--ink-faint);
  z-index: 2;
}

/* 底部滚动提示 */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.hero__scroll span:first-child {
  font-family: var(--f-latin);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--ink-faint);
}

.hero__scroll-line {
  width: 1px;
  height: 54px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--gold);
  animation: sail-down 2.2s var(--ease-io) infinite;
}

@keyframes sail-down {
  0% { transform: translateY(-110%); }
  60%, 100% { transform: translateY(280%); }
}

/* ═══ 一 · 溯源 ═══ */
.origin__grid {
  max-width: var(--w-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
}

.origin__principles { display: flex; flex-direction: column; }

.principle {
  display: flex;
  gap: clamp(18px, 2.5vw, 34px);
  padding: clamp(28px, 4vh, 42px) 0;
  border-bottom: 1px solid var(--t-line);
  transition: padding-left 0.5s var(--ease-out);
}

.principle:first-child { padding-top: 0; }
.principle:last-child { border-bottom: 0; }

.principle:hover { padding-left: 14px; }

.principle__num {
  font-family: var(--f-latin);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  line-height: 1;
  flex-shrink: 0;
  min-width: 1.6em;
}

.principle__name {
  font-size: clamp(20px, 2vw, 26px);
  color: var(--t-ink);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.principle__name small {
  font-family: var(--f-latin);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--t-ink-faint);
}

.principle__body p { color: var(--t-ink-soft); font-size: 15px; max-width: 480px; }

.origin__figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.origin__figure img {
  width: 100%;
  height: clamp(480px, 78vh, 760px);
  will-change: transform;
}

.origin__figure figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 26px 28px;
  font-family: var(--f-serif);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: #F7F5F0;
  background: linear-gradient(transparent, rgba(12, 42, 33, 0.78));
}

/* ═══ 二 · 取材 ═══ */
.materials { background: transparent; }

.materials__grid {
  max-width: var(--w-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
}

.material {
  position: relative;
  display: flex;
  flex-direction: column;
}

.material__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
}

.material__frame img {
  width: 100%;
  height: 100%;
  transform: scale(1.04);
  transition: transform 0.9s var(--ease-out), filter 0.7s;
  filter: saturate(0.92);
}

/* 光影交互：随鼠标移动的高光 */
.material__shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 300px at var(--mx, 50%) var(--my, 40%),
              rgba(255, 250, 235, 0.34), transparent 70%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.material:hover .material__shine { opacity: 1; }
.material:hover img { transform: scale(1.1); filter: saturate(1.02); }

.material__body { padding: 20px 4px 0; }

.material__name {
  font-size: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--t-ink);
  margin-bottom: 6px;
}

.material__name small {
  font-family: var(--f-latin);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--t-ink-faint);
}

.material__body p { font-size: 14px; color: var(--t-ink-soft); }

/* 数据带 */
.materials__stats {
  max-width: var(--w-content);
  margin: clamp(64px, 10vh, 110px) auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--t-line);
  border-bottom: 1px solid var(--t-line);
}

.stat { text-align: center; }

.stat__num {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-family: var(--f-latin);
  color: var(--t-ink);
}

.stat__num b {
  font-size: clamp(44px, 5.4vw, 72px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
}

.stat__num i {
  font-family: var(--f-serif);
  font-size: 16px;
  color: var(--gold-deep);
}

.stat__label {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--t-ink-faint);
}

.materials__note {
  max-width: var(--w-content);
  margin: 30px auto 0;
  text-align: center;
  font-family: var(--f-serif);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--t-ink-soft);
}

/* ═══ 三 · 匠作（暗色章节）═════ */
.craft { background: transparent; }

.craft .section__head,
.craft .section__lead { position: relative; z-index: 2; }

.craft__pin { position: relative; }

.craft__track {
  display: flex;
  gap: clamp(24px, 3vw, 48px);
  padding: 10px var(--gap) 30px;
  will-change: transform;
}

.craft__card {
  position: relative;
  flex-shrink: 0;
  width: clamp(300px, 30vw, 430px);
}

.craft__figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3 / 4.2;
}

.craft__figure img {
  width: 100%;
  height: 100%;
  filter: brightness(0.72) saturate(0.85);
  transition: filter 0.8s var(--ease-out), transform 0.9s var(--ease-out);
  transform: scale(1.03);
}

/* 聚光：随鼠标的光晕 */
.craft__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 380px at var(--mx, 50%) var(--my, 50%),
              rgba(232, 204, 148, 0.24), transparent 72%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.craft__card:hover .craft__glow { opacity: 1; }
.craft__card:hover img { filter: brightness(0.94) saturate(1); transform: scale(1.09); }

.craft__body { padding: 22px 4px 0; }

.craft__num {
  font-family: var(--f-latin);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--t-accent);
}

.craft__name {
  font-size: 22px;
  color: var(--t-ink);
  margin: 10px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.craft__name small {
  font-family: var(--f-latin);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--t-ink-faint);
}

.craft__body p { font-size: 14px; color: var(--t-ink-soft); }

.craft__quote {
  flex-shrink: 0;
  width: clamp(300px, 34vw, 480px);
  align-self: center;
  padding: 40px clamp(24px, 3vw, 48px);
  border-left: 1px solid var(--t-line);
}

.craft__quote p {
  font-family: var(--f-serif);
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.7;
  color: var(--t-ink);
  margin-bottom: 22px;
}

.craft__quote cite {
  font-family: var(--f-serif);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--t-ink-faint);
}

/* ═══ 四 · 泊岸 ═══ */
.cases__grid {
  max-width: var(--w-content);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(80px, 14vh, 170px);
}

.case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 80px);
  align-items: center;
}

.case--right .case__figure { order: 1; }
.case--right .case__body { order: 2; }

.case--left .case__figure { order: 2; }
.case--left .case__body { order: 1; text-align: right; }

.case__figure {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 4.6;
}

.case__figure img {
  width: 100%;
  height: 100%;
  will-change: transform;
}

.case__meta {
  font-family: var(--f-latin);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--gold-deep);
  margin-bottom: 14px;
}

.case__name {
  font-size: clamp(26px, 3.2vw, 40px);
  color: var(--t-ink);
  margin-bottom: 18px;
}

.case__story { color: var(--t-ink-soft); font-size: 15px; max-width: 460px; }
.case--left .case__story { margin-left: auto; }

.case__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.case--left .case__tags { justify-content: flex-end; }

.case__tags span {
  padding: 7px 16px;
  border: 1px solid var(--t-line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--t-ink-soft);
}

/* ── 前后对比 ── */
.ba {
  max-width: 860px;
  margin: clamp(90px, 14vh, 160px) auto 0;
}

.ba__head { text-align: center; margin-bottom: 34px; }

.ba__title { font-size: clamp(24px, 2.6vw, 34px); color: var(--t-ink); }

.ba__sub {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--t-ink-faint);
}

.ba__viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 2.9;
  user-select: none;
  touch-action: none;
}

.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ba__img--before { filter: saturate(0.82) contrast(0.96); }

.ba__img--after {
  clip-path: inset(0 0 0 var(--ba-pos, 50%));
  filter: saturate(1.02);
}

.ba__label {
  position: absolute;
  top: 20px;
  padding: 8px 16px;
  font-family: var(--f-serif);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: #F7F5F0;
  background: rgba(12, 42, 33, 0.62);
  backdrop-filter: blur(4px);
  z-index: 3;
}

.ba__label--before { left: 20px; }
.ba__label--after { right: 20px; }

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos, 50%);
  z-index: 4;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba__handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(201, 169, 110, 0.55);
}

.ba__handle-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(18, 59, 46, 0.55);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ba__range {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.ba__note {
  margin-top: 26px;
  text-align: center;
  font-family: var(--f-serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--t-ink-faint);
}

.cases__cta {
  max-width: var(--w-content);
  margin: clamp(70px, 10vh, 110px) auto 0;
  text-align: center;
  font-family: var(--f-serif);
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--t-ink-soft);
  letter-spacing: 0.08em;
}

.cases__cta a {
  color: var(--gold-deep);
  border-bottom: 1px solid rgba(169, 139, 79, 0.5);
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.cases__cta a:hover { color: var(--forest); border-color: var(--forest); }

/* ═══ 五 · 同行 ═══ */
.process__grid {
  max-width: var(--w-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.process__figure {
  position: sticky;
  top: 110px;
  overflow: hidden;
  border-radius: var(--radius);
}

.process__figure img {
  width: 100%;
  height: auto;
  will-change: transform;
}

.process__figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 24px;
  font-family: var(--f-serif);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: #F7F5F0;
  background: linear-gradient(transparent, rgba(12, 42, 33, 0.78));
}

.process__steps { display: flex; flex-direction: column; }

.step {
  display: flex;
  gap: clamp(18px, 2.5vw, 36px);
  padding: clamp(26px, 4vh, 38px) 0;
  border-bottom: 1px solid var(--t-line);
  position: relative;
}

.step:last-child { border-bottom: 0; }

.step__num {
  font-family: var(--f-latin);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  line-height: 1.1;
  min-width: 1.7em;
  flex-shrink: 0;
}

.step__name {
  font-size: clamp(19px, 1.8vw, 24px);
  color: var(--t-ink);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.step__name small {
  font-family: var(--f-latin);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--t-ink-faint);
}

.step__body p { font-size: 14.5px; color: var(--t-ink-soft); max-width: 520px; }

.process__note {
  max-width: var(--w-content);
  margin: clamp(50px, 8vh, 80px) auto 0;
  text-align: center;
  font-family: var(--f-serif);
  font-size: clamp(16px, 1.6vw, 20px);
  letter-spacing: 0.1em;
  color: var(--t-ink-soft);
}

.process__note b { color: var(--gold-deep); font-weight: 600; }

/* ═══ 终 · 归处 ═══ */
.contact {
  min-height: 86vh;
  display: flex;
  align-items: center;
  padding-bottom: clamp(80px, 12vh, 150px);
}

.contact__inner {
  max-width: var(--w-content);
  margin: 0 auto;
  text-align: center;
}

.contact__title {
  font-size: clamp(38px, 6.4vw, 88px);
  color: var(--t-ink);
  margin: 8px 0 22px;
}

.contact__sub {
  font-size: clamp(14.5px, 1.3vw, 18px);
  color: var(--t-ink-soft);
  max-width: 620px;
  margin: 0 auto clamp(30px, 4.5vh, 44px);
}

.contact__actions { margin-bottom: clamp(36px, 5.5vh, 56px); }

.contact__info {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 84px);
}

.contact__info > div { display: flex; flex-direction: column; gap: 6px; }

.contact__info dt {
  font-family: var(--f-latin);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--t-ink-faint);
}

.contact__info dd {
  font-family: var(--f-serif);
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--t-ink);
}

/* ═══ 响应式 ═══ */
@media (max-width: 1100px) {
  .materials__grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .materials__stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}

@media (max-width: 900px) {
  .hero { padding-top: 110px; }
  .hero__vertical { display: none; }
  .hero__ghost { font-size: 78vw; opacity: 0.6; }

  /* 小屏：眉标分段换行、滚动提示加强 */
  .hero__eyebrow { font-size: 11px; letter-spacing: 0.3em; }
  .hero__eyebrow-line { width: 38px; }
  .hero__scroll span:first-child {
    font-size: 11px;
    letter-spacing: 0.4em;
    color: var(--ink-soft);
  }
  .hero__scroll-line { height: 44px; }

  .origin__grid { grid-template-columns: 1fr; }
  .origin__figure img { height: 62vw; }

  .case { grid-template-columns: 1fr; gap: 26px; }
  .case--right .case__figure, .case--left .case__figure { order: 1; }
  .case--right .case__body, .case--left .case__body { order: 2; text-align: left; }
  .case--left .case__story { margin-left: 0; }
  .case--left .case__tags { justify-content: flex-start; }

  .process__grid { grid-template-columns: 1fr; }
  .process__figure { position: static; }
  .process__figure img { height: 64vw; }

  /* 匠作章节：移动端改为纵向堆叠（JS 停用横向滚动） */
  .craft__track { flex-direction: column; padding: 0; }
  .craft__card { width: 100%; }
  .craft__figure { aspect-ratio: 3 / 3.4; }
  .craft__quote { width: 100%; border-left: 0; border-top: 1px solid var(--t-line); padding: 34px 0 0; }

  .contact { min-height: auto; }
  .contact__info { flex-direction: column; gap: 26px; }
}

@media (max-width: 560px) {
  .materials__grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .material__name { font-size: 17px; }
  .material__body p { font-size: 12.5px; }
  .materials__stats { grid-template-columns: 1fr 1fr; }

  .ba__viewport { aspect-ratio: 4 / 4.4; }
  .hero__actions .btn { width: 100%; }
}
