/* ==========================================================================
   Home v2 — layout rhythm modelled on the thxsilk.com template
   (banner → marquee → collection tabs → education duo → category grid →
    momme band → gifting → collage → reviews → story → promises → journal)
   Loaded only on index.html.
   ========================================================================== */

/* ---------- shared reveal animation ---------- */
.hx [data-animate],
[data-animate] {
  opacity: 0;
  transform: translateY(2.2rem);
  transition: opacity .85s cubic-bezier(.22, .61, .36, 1),
              transform .85s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.hx [data-animate].is-animated,
[data-animate].is-animated { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-animate] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- 1. hero banner ---------- */
.hx-hero {
  background: var(--color-surface);
  padding: 3.2rem 0 0;
}
.hx-hero__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.2rem;
}
.hx-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.6rem 0 0;
}
.hx-hero__eyebrow {
  font-size: 1.3rem;
  letter-spacing: .24rem;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 2rem;
}
.hx-hero__title {
  font-family: var(--font-heading-family);
  font-size: clamp(3.6rem, 5.4vw, 6.4rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--color-heading);
  margin: 0 0 2rem;
  font-weight: 600;
}
.hx-hero__lead {
  font-size: 1.45rem;
  line-height: 1.85;
  color: var(--color-text);
  max-width: 44rem;
  margin: 0 0 3rem;
}
.hx-hero__actions { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 3.6rem; }
.hx-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  font-size: 1.3rem;
  letter-spacing: .04rem;
  color: var(--color-text);
}
.hx-hero__trust span { display: inline-flex; align-items: center; gap: .6rem; }
.hx-hero__trust i {
  font-style: normal;
  width: 1.8rem; height: 1.8rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.hx-hero__media {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: var(--color-surface-alt);
  aspect-ratio: 4 / 5;
}
.hx-hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.4s cubic-bezier(.22, .61, .36, 1);
}
.hx-hero__media:hover img { transform: scale(1.06); }
.hx-hero__tag {
  position: absolute;
  left: 2rem; bottom: 2rem;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  padding: 1rem 1.6rem;
  font-size: 1.3rem;
  letter-spacing: .18rem;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* 手机首屏：让图先说话。
   原来第一屏是"眉标 + 大标题 + 三行长文 + 两个按钮 + 三个信任点"，几乎全是字，
   和整站的图片语感不协调。现在图片先出现，主张 / 按钮 / 信任点紧贴在图下方，
   长正文在手机上收成三行（完整文案仍在 DOM 里，SEO 与桌面端不受影响）。 */
@media (max-width: 899px) {
  .hx-hero { padding-top: 2.2rem; }
  .hx-hero__inner { gap: 2.4rem; }
  .hx-hero__media { order: -1; aspect-ratio: 4 / 4.3; border-radius: 4px; }
  .hx-hero__copy { padding: 0 0 .8rem; }
  .hx-hero__eyebrow { margin-bottom: 1.2rem; font-size: 1.2rem; letter-spacing: .2rem; }
  .hx-hero__title { font-size: 3.2rem; line-height: 1.08; margin-bottom: 1.4rem; }
  .hx-hero__lead {
    font-size: 1.35rem; line-height: 1.75; margin-bottom: 2.2rem;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  }
  .hx-hero__actions { margin-bottom: 2.4rem; }
  .hx-hero__tag { left: 1.4rem; bottom: 1.4rem; padding: .8rem 1.2rem; }
}

@media (min-width: 900px) {
  .hx-hero { padding-top: 4.8rem; }
  .hx-hero__inner { grid-template-columns: 1.02fr 1fr; gap: 6rem; align-items: center; }
  .hx-hero__copy { padding: 0; }
}

/* ---------- 2. marquee strip ---------- */
.hx-marquee {
  margin-top: 4.8rem;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
  padding: 1.4rem 0;
}
.hx-marquee__track {
  display: flex;
  width: max-content;
  animation: hxScroll 38s linear infinite;
}
.hx-marquee:hover .hx-marquee__track { animation-play-state: paused; }
.hx-marquee__track span {
  font-size: 1.3rem;
  letter-spacing: .28rem;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
  padding: 0 2.4rem;
  position: relative;
}
.hx-marquee__track span::after {
  content: "·";
  position: absolute;
  right: -.6rem;
  color: var(--color-accent);
}
@keyframes hxScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 3. collection tabs (re-skin) ---------- */
.hx-tabs { padding: 7.2rem 0 6.4rem; background: var(--color-surface); }
.hx-tabs__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.6rem;
  margin-bottom: 3.2rem;
}
.hx-tabs__eyebrow {
  font-size: 1.3rem; letter-spacing: .24rem; text-transform: uppercase;
  color: var(--color-muted); margin: 0 0 1.2rem;
}
.hx-tabs__title {
  font-family: var(--font-heading-family);
  font-size: clamp(2.6rem, 3.4vw, 3.8rem);
  line-height: 1.15; letter-spacing: -.01em;
  color: var(--color-heading); margin: 0;
}
.hx-tabs__link {
  font-size: 1.3rem; letter-spacing: .16rem; text-transform: uppercase;
  color: var(--color-primary);
  border-bottom: 1px solid currentColor;
  padding-bottom: .3rem;
}

/* ---------- 4. education duo ---------- */
.hx-duo {
  background: var(--color-surface-alt);
  padding: 7.2rem 0;
}
.hx-duo__inner {
  max-width: var(--page-width);
  margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 2.4rem;
}
.hx-duo__card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--color-surface);
  overflow: hidden;
  border-radius: 2px;
  min-height: 100%;
}
.hx-duo__media { position: relative; overflow: hidden; aspect-ratio: 16 / 11; }
.hx-duo__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1);
}
.hx-duo__card:hover .hx-duo__media img { transform: scale(1.05); }
.hx-duo__body { padding: 2.8rem 2.8rem 3.2rem; display: flex; flex-direction: column; }
.hx-duo__kicker {
  font-size: 1.2rem; letter-spacing: .22rem; text-transform: uppercase;
  color: var(--color-accent); margin: 0 0 1.2rem;
}
.hx-duo__title {
  font-family: var(--font-heading-family);
  font-size: 2.4rem; line-height: 1.25; color: var(--color-heading);
  margin: 0 0 1.4rem;
}
.hx-duo__text { font-size: 1.3rem; line-height: 1.8; color: var(--color-text); margin: 0 0 2.4rem; }
.hx-duo__link {
  margin-top: auto;
  font-size: 1.3rem; letter-spacing: .16rem; text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex; align-items: center; gap: .8rem;
}
.hx-duo__link::after { content: "→"; transition: transform .3s ease; }
.hx-duo__card:hover .hx-duo__link::after { transform: translateX(.5rem); }

@media (min-width: 900px) {
  .hx-duo__inner { grid-template-columns: 1fr 1fr; gap: 3.2rem; }
}

/* ---------- 5. category grid ---------- */
.hx-cats { padding: 7.6rem 0; background: var(--color-surface); }
.hx-cats__inner { max-width: var(--page-width); margin: 0 auto; padding: 0 1.5rem; }
.hx-cats__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.6rem; margin-bottom: 3.2rem;
}
.hx-cats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}
.hx-cat {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--color-surface-alt);
  border-radius: 2px;
}
.hx-cat__media { aspect-ratio: 3 / 4; overflow: hidden; }
.hx-cat__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1);
}
.hx-cat:hover .hx-cat__media img { transform: scale(1.06); }
.hx-cat__veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 24, 20, .46) 0%, rgba(20, 24, 20, .05) 46%, transparent 70%);
}
.hx-cat__label {
  position: absolute; left: 1.8rem; right: 1.8rem; bottom: 1.8rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  color: #fff;
}
.hx-cat__name { font-size: 1.35rem; letter-spacing: .04rem; font-weight: 600; }
.hx-cat__count { font-size: 1.2rem; opacity: .78; display: block; margin-top: .35rem; letter-spacing: .08rem; }
.hx-cat__arrow {
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  transition: background .3s ease, color .3s ease;
}
.hx-cat:hover .hx-cat__arrow { background: #fff; color: var(--color-primary); }
@media (min-width: 900px) {
  .hx-cats__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
}

/* ---------- 6. collage ---------- */
.hx-collage { padding: 0 0 7.6rem; background: var(--color-surface); }
.hx-collage__inner {
  max-width: var(--page-width); margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 1.2rem;
}
.hx-collage__big { position: relative; overflow: hidden; border-radius: 2px; min-height: 34rem; }
.hx-collage__big img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
  transition: transform 1.4s cubic-bezier(.22, .61, .36, 1);
}
.hx-collage__big:hover img { transform: scale(1.04); }
.hx-collage__big figcaption {
  position: absolute; left: 3.2rem; bottom: 3.2rem; right: 3.2rem;
  color: #fff; z-index: 1;
}
.hx-collage__big h3 {
  font-family: var(--font-heading-family); font-size: 2.6rem; line-height: 1.2;
  color: #fff; margin: 0 0 1rem;
}
.hx-collage__big p { font-size: 1.3rem; line-height: 1.7; margin: 0; max-width: 40rem; color: rgba(255,255,255,.9); }
.hx-collage__side { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.hx-collage__card {
  position: relative; overflow: hidden; border-radius: 2px;
  min-height: 16rem;
  display: flex; align-items: flex-end;
}
.hx-collage__card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1);
}
.hx-collage__card:hover img { transform: scale(1.06); }
.hx-collage__card span {
  position: relative; z-index: 1; color: #fff;
  padding: 2rem; font-size: 1.3rem; letter-spacing: .14rem; text-transform: uppercase;
}
.hx-collage__card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,24,20,.5), transparent 62%);
}
@media (min-width: 900px) {
  .hx-collage__inner { grid-template-columns: 1.55fr 1fr; gap: 2rem; }
  .hx-collage__big { min-height: 58rem; }
  .hx-collage__side { grid-template-columns: 1fr; gap: 2rem; }
  .hx-collage__card { min-height: 0; }
}

/* ---------- 7. promises ---------- */
.hx-guards { padding: 0 0 7.6rem; background: var(--color-surface); }
.hx-guards__inner {
  max-width: var(--page-width); margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
}
.hx-guard {
  background: var(--color-surface-alt);
  border-radius: 1rem;
  padding: 2.6rem 2.2rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.hx-guard svg { width: 2.6rem; height: 2.6rem; stroke: var(--color-primary); fill: none; stroke-width: 1.4; }
.hx-guard__title { font-size: 1.3rem; font-weight: 600; letter-spacing: .04rem; color: var(--color-heading); }
.hx-guard__text { font-size: 1.3rem; line-height: 1.65; color: var(--color-muted); }
@media (min-width: 900px) {
  .hx-guards__inner { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
}

/* ---------- 8. journal ---------- */
.hx-journal { padding: 0 0 8rem; background: var(--color-surface); }
.hx-journal__inner { max-width: var(--page-width); margin: 0 auto; padding: 0 1.5rem; }
.hx-journal__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.6rem; margin-bottom: 3.2rem; }
.hx-journal__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.2rem;
}
.hx-post { display: block; }
.hx-post__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-surface-alt); border-radius: 2px; }
.hx-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.22,.61,.36,1); }
.hx-post:hover .hx-post__media img { transform: scale(1.05); }
.hx-post__meta {
  margin: 1.4rem 0 .8rem; font-size: 1.2rem; letter-spacing: .16rem;
  text-transform: uppercase; color: var(--color-muted);
}
.hx-post__title {
  font-family: var(--font-heading-family);
  font-size: 1.55rem; line-height: 1.35; color: var(--color-heading); margin: 0;
}
.hx-post:hover .hx-post__title { color: var(--color-primary); }
@media (min-width: 900px) {
  .hx-journal__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
  .hx-post__title { font-size: 1.7rem; }
}

/* ---------- mobile refinements ---------- */
@media (max-width: 749px) {
  .hx-tabs, .hx-duo, .hx-cats { padding-top: 5.2rem; padding-bottom: 5.2rem; }
  .hx-hero__title { font-size: 3.6rem; }
  .hx-hero__media { aspect-ratio: 1 / 1.06; }
  .hx-duo__body { padding: 2.2rem 2rem 2.6rem; }
  .hx-collage__big h3 { font-size: 2.1rem; }
  .hx-guard { padding: 2rem 1.8rem; }
}
