/* =========================================================
   丝漉 SluviE — 首页场景区
   1. 如佑双场景（.duo）：两张影棚组合照错落排布，信息卡压在照片上，形成前后层次
   2. 系列橱窗（.shelf）：四个系列通栏排开，指到哪个哪个展开，其余收成色块
   ========================================================= */

/* ---------- 1. 如佑双场景 ---------- */
.duo { overflow: hidden; }
.duo .wrap { z-index: 2; }

/* 背景里的描边大字，滚动时与照片反向移动 */
.duo__ghost {
  position: absolute;
  right: -2vw;
  top: clamp(40px, 6vw, 110px);
  z-index: 1;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(120px, 24vw, 460px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(24, 120, 200, 0.16);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.duo__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(20px, 2.6vw, 48px);
  align-items: start;
  padding-bottom: clamp(40px, 5vw, 80px);
}
.scene { position: relative; }
.scene--a { grid-column: 1 / span 7; }
.scene--b { grid-column: 8 / span 5; margin-top: clamp(72px, 10vw, 190px); }

.scene__photo {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #DADCE1;
  cursor: pointer;
}
.scene--a .scene__photo { aspect-ratio: 3 / 2; }
.scene--a .scene__photo img { object-position: 0% 50%; }   /* 画面靠左取景，瓶子落在右侧，给信息卡让位 */
.scene--b .scene__photo { aspect-ratio: 4 / 3; }
.scene__photo img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
  transition: scale 1.2s var(--ease-out);
}
.scene__photo:hover img { scale: 1.035; }

.scene__flag {
  position: absolute;
  top: 18px; left: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}

/* 跟着鼠标走的「京东购买」标签 */
.scene__tag {
  position: absolute;
  left: 0; top: 0;
  translate: calc(var(--tx, 50%) - 50%) calc(var(--ty, 50%) - 50%);
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.25s ease, scale 0.35s var(--ease-out);
}
.scene__photo.is-hot .scene__tag { opacity: 1; scale: 1; }

/* 信息卡：压在照片上，比照片靠前一层 */
.scene__card {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2vw, 34px);
  box-shadow: 0 34px 70px -38px rgba(11, 30, 51, 0.42), 0 2px 0 rgba(11, 30, 51, 0.03);
}
.scene--a .scene__card {
  position: absolute;
  left: clamp(16px, 2.2vw, 40px);
  bottom: clamp(-72px, -4vw, -36px);
  width: min(440px, 46%);
}
.scene--b .scene__card {
  margin: clamp(-64px, -3.6vw, -36px) 0 0 clamp(20px, 3vw, 56px);
}

.scene__spec {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.02em;
}
.scene__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.5vw, 25px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.scene__desc {
  margin-top: 12px;
  font-size: clamp(14px, 0.95vw, 15.5px);
  line-height: 1.75;
  color: var(--ink-2);
}
.scene__specs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.scene__specs li { position: relative; padding-left: 16px; }
.scene__specs li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}
.scene__foot {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.scene__price {
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* ---------- 2. 系列橱窗 ---------- */
.shelf { padding-bottom: clamp(56px, 7vw, 110px); }
.shelf__row {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(8px, 0.7vw, 14px);
  height: clamp(440px, 62vh, 760px);
  padding: 0 clamp(12px, 1.6vw, 32px);
}
.shelf__panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #DADCE1;
  color: var(--white);
  isolation: isolate;
  transition: flex-grow 0.8s var(--ease-out);
}
.shelf__panel.is-on { flex-grow: 3.6; }

.shelf__panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  scale: 1.12;
  transition: scale 1.1s var(--ease-out);
}
.shelf__panel.is-on img { scale: 1; }

/* 收起时整块染成系列色，展开后只在底部留一道色带衬文字 */
.shelf__tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--c) 96%, #000) 0%, color-mix(in srgb, var(--c) 70%, transparent) 30%, transparent 62%),
    color-mix(in srgb, var(--c) 78%, transparent);
  background-blend-mode: normal;
  transition: background-color 0.7s ease;
}
.shelf__panel.is-on .shelf__tint {
  background:
    linear-gradient(to top, color-mix(in srgb, var(--c) 96%, #000) 0%, color-mix(in srgb, var(--c) 60%, transparent) 26%, transparent 52%),
    transparent;
}

.shelf__label {
  position: absolute;
  left: clamp(18px, 1.8vw, 36px);
  bottom: clamp(20px, 2vw, 38px);
  transition: bottom 0.7s var(--ease-out);
}
.shelf__panel.is-on .shelf__label { bottom: clamp(84px, 6.4vw, 118px); }
.shelf__count {
  display: block;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}
.shelf__label h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.2vw, 60px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.shelf__more {
  position: absolute;
  left: clamp(18px, 1.8vw, 36px);
  right: clamp(18px, 1.8vw, 36px);
  bottom: clamp(20px, 2vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  opacity: 0;
  translate: 0 14px;
  transition: opacity 0.35s ease, translate 0.5s var(--ease-out);
}
.shelf__panel.is-on .shelf__more { opacity: 1; translate: 0 0; transition-delay: 0.22s; }
.shelf__more p {
  font-size: clamp(14.5px, 1.1vw, 18px);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shelf__go {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.shelf__go::after {
  content: "";
  width: 14px; height: 9px;
  background: currentColor;
  clip-path: polygon(0 40%, 65% 40%, 65% 0, 100% 50%, 65% 100%, 65% 60%, 0 60%);
}
.shelf__panel:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .scene--a { grid-column: 1 / -1; }
  .scene--b { grid-column: 1 / -1; margin-top: clamp(96px, 14vw, 150px); }
  .scene--b .scene__photo { aspect-ratio: 3 / 2; }
}
@media (max-width: 760px) {
  .duo__ghost { top: 120px; }
  .scene--a .scene__card,
  .scene--b .scene__card {
    position: relative;
    left: auto; bottom: auto;
    width: auto;
    margin: -36px 12px 0;
  }
  .scene--b { margin-top: 44px; }
  .scene--a .scene__photo, .scene--b .scene__photo { aspect-ratio: 4 / 3; }
  .scene__tag { display: none; }

  /* 手机：橱窗竖排，全部展开 */
  .shelf__row { flex-direction: column; height: auto; }
  .shelf__panel,
  .shelf__panel.is-on { flex: none; height: clamp(260px, 74vw, 380px); }
  .shelf__panel img { scale: 1; }
  .shelf__panel .shelf__tint {
    background:
      linear-gradient(to top, color-mix(in srgb, var(--c) 96%, #000) 0%, color-mix(in srgb, var(--c) 82%, transparent) 42%, transparent 74%),
      transparent;
  }
  .shelf__panel .shelf__label { bottom: 68px; }
  .shelf__panel .shelf__more { opacity: 1; translate: 0 0; }
  .shelf__go { padding: 9px 14px; font-size: 13px; }
}

@media (hover: none), (pointer: coarse) {
  .scene__tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shelf__panel, .shelf__panel img, .shelf__label, .shelf__more, .scene__photo img { transition: none; }
  .scene__tag { display: none; }
}

/* ---------- 3. 品牌理念（.creed）：左边四条理念，右边一张大图，指到哪条换哪张 ---------- */
.creed {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 110px);
  align-items: center;
}
.creed__item {
  position: relative;
  padding: clamp(18px, 1.7vw, 30px) 0 clamp(18px, 1.7vw, 30px) clamp(20px, 2vw, 36px);
  border-top: 1px solid var(--line);
  cursor: pointer;
  outline: none;
}
.creed__item:last-child { border-bottom: 1px solid var(--line); }
.creed__item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--yellow);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease-out);
}
.creed__item.is-on::before { transform: scaleY(1); }
.creed__item h3 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.7vw, 50px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: rgba(14, 26, 38, 0.28);
  transition: color 0.4s ease;
}
.creed__item.is-on h3 { color: var(--ink); }
.creed__item:focus-visible h3 { text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 8px; }
.creed__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-out);
}
.creed__item.is-on .creed__body { grid-template-rows: 1fr; }
.creed__body p {
  overflow: hidden;
  font-size: clamp(14.5px, 1.05vw, 17px);
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 44ch;
}
.creed__item.is-on .creed__body p { padding-top: 12px; }

.creed__stage {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #DADCE1;
}
.creed__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 100% 0);
}
/* 新图从上往下盖住旧图 */
.creed__stage img.was-on { clip-path: inset(0); z-index: 1; }
.creed__stage img.is-on {
  clip-path: inset(0);
  z-index: 2;
  transition: clip-path 0.9s var(--ease-out);
}

@media (max-width: 900px) {
  .creed { grid-template-columns: 1fr; }
  .creed__stage { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .creed__stage img.is-on, .creed__body, .creed__item::before { transition: none; }
}

/* 收起的橱窗标题缩小一档，英文长词（Protection、Gift Sets）也放得下 */
@media (min-width: 761px) {
  .shelf__label h3 { transition: font-size 0.6s var(--ease-out); }
  .shelf__panel:not(.is-on) .shelf__label h3 { font-size: clamp(20px, 1.9vw, 36px); }
}
