/* Rainwish 品牌总站 · 暗色高级感 · spec 001 §4
 * 零依赖零 CDN,系统字体栈回退;动效仅 transition/transform
 *
 * 对比度(实算,WCAG 相对亮度法):
 *   --text-hi #f2ede3 (L=0.849) on --bg-0 #0d0f13 (L=0.0045) = 16.5:1  ≥12 ✓
 *   --text-mid #9a958a (L=0.301) on --bg-0 = 6.4:1;on --bg-1 #14171d (L=0.0082) = 6.0:1  ≥4.5 ✓
 *   产品 accent 仅装饰(边框/光晕),不承文
 */

:root {
  --bg-0: #0d0f13;
  --bg-1: #14171d;
  --bg-2: #1b1f27;
  --hairline: rgba(206, 184, 140, .14);
  --text-hi: #f2ede3;
  --text-mid: #9a958a;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ── 基础 ─────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text-hi);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.section { max-width: 1080px; margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) 1.5rem 0; }
.section__title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 .4rem;
}
.section__lead { color: var(--text-mid); margin: 0 0 2.5rem; }

/* ── 1 Nav ────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto;
  padding: 1rem 1.5rem;
  transition: background .3s, box-shadow .3s;
}
.nav--scrolled {
  background: rgba(13, 15, 19, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-brand { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .05em; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; font-size: .95rem; }
.nav-links a:not(.btn) { color: var(--text-mid); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text-hi); }

/* ── 按钮 ─────────────────────────────── */
.btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  transition: border-color .2s, background .2s, transform .2s;
}
.btn-primary { border-color: rgba(206, 184, 140, .45); }
.btn:hover { border-color: rgba(206, 184, 140, .8); background: var(--bg-2); transform: translateY(-1px); }

/* ── 2 Hero ───────────────────────────── */
.hero {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(6rem, 16vw, 11rem) 1.5rem clamp(4rem, 9vw, 7rem);
  text-align: center;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  letter-spacing: .06em;
  margin: 0;
}
.hero-hairline {
  width: min(320px, 60%);
  margin: 2rem auto;
  border: none;
  border-top: 1px solid rgba(206, 184, 140, .35);
  animation: hairline-in 1.2s ease-out both;
}
@keyframes hairline-in { from { opacity: 0; } to { opacity: 1; } }
.hero-lead {
  max-width: 34em;
  margin: 0 auto 2.5rem;
  color: var(--text-mid);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

/* ── 3 产品橱窗(画廊展框) ───────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  align-items: stretch;
}
.product-card {
  --accent: rgba(206, 184, 140, .5); /* JS 内联注入品牌色,此为兜底 */
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.product-card__shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-2);
  transition: transform .3s;
}
.product-card:hover .product-card__shot { transform: translateY(-4px); }
.product-card__glow {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, var(--accent), transparent 70%);
  opacity: 0;
  transition: opacity .35s;
}
.product-card:hover .product-card__glow { opacity: .12; }
.product-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.product-card__name { font-family: var(--serif); font-size: 1.35rem; margin: 0; }
.product-card__tagline { color: var(--text-mid); margin: 0; font-size: .95rem; flex: 1; }
.product-card__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0; padding: 0; list-style: none; }
.product-card__chip {
  font-size: .78rem;
  color: var(--text-mid);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: .15rem .6rem;
}
.product-card__platform {
  margin: .3rem 0 0;
  font-size: .82rem;
  color: var(--text-mid);
  letter-spacing: .04em;
}
.product-card__arrow {
  position: absolute;
  right: 1.2rem; bottom: 1.1rem;
  color: var(--accent);
  transition: transform .25s;
}
.product-card:hover .product-card__arrow { transform: translateX(6px); }
/* 整卡链接由 JS 包 <a>,CSS 只管悬停态;noscript 降级卡(无 shot)同样式成立 */

/* ── 4 理念 ───────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.value {
  padding: 1.75rem 1.5rem;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: 4px;
}
.value__title { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 .6rem; }
.value__text { color: var(--text-mid); margin: 0; font-size: .95rem; }

/* ── 5 数字带 ─────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.5rem 1rem;
  text-align: center;
}
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat__num {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.2;
}
.stat__label { color: var(--text-mid); font-size: .85rem; }

/* ── 6 Footer ─────────────────────────── */
.footer {
  max-width: 1080px; margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a, .footer-copy { color: var(--text-mid); font-size: .9rem; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--text-hi); }
.footer-copy { margin: 0; }

/* ── reveal(仅 html.js 下生效,无 JS 内容直出) ── */
html.js [data-reveal] { opacity: 0; transform: translateY(24px); }
html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

/* ── 移动端 ≤900px ────────────────────── */
@media (max-width: 900px) {
  .product-grid, .values-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav {
    flex-wrap: wrap; gap: .5rem;
    overflow-x: auto;
  }
  .nav-links { gap: 1.1rem; white-space: nowrap; }
  .footer { flex-direction: column; text-align: center; }
}

/* ── reduced motion ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
