:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6e6e73;
  --line: #e8e8ed;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.nav-brand { font-weight: 700; letter-spacing: 0.14em; font-size: 15px; color: var(--text); text-decoration: none; display: flex; align-items: center; white-space: nowrap; }
/* 品牌后缀「服务中心」：小一号、灰、细竖线隔开，不抢 GOOD WILL 的主次 */
.brand-sub {
  margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line);
  font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); line-height: 1;
}
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--text); color: #fff; text-decoration: none;
  font-size: 13px; padding: 7px 16px; border-radius: 999px;
  transition: background .2s;
}
.nav-cta:hover { background: #333; }

/* ---------- 首页动画 ---------- */
#hero { height: 250vh; }
.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.tiles { position: absolute; inset: 0; }

.tile {
  position: absolute;
  left: 50%; top: 50%;
  width: 300px;              /* 高清「母图」基准：110 : 155 竖向比例。真相是所有卡片都由 transform:scale() 从这张 300px 母图缩小而来 */
  aspect-ratio: 110 / 155;   /* 缩小永远比放大清晰 —— 大卡/拱形都能保持锐利，未来高清原图也不会被放大糊掉 */
  perspective: 700px;
  will-change: transform, filter;
  cursor: pointer;
}
.tile-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}
.tile-face {
  position: absolute; inset: 0;
  border-radius: 35px;       /* 在 300px 母图上的圆角（缩小时对应原 14px 视觉，比例不变） */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.tile-front { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12); }  /* 按 300px 母图等比放大投影，视觉与原来一致 */
.tile-back {
  transform: rotateY(180deg);
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
}

.hero-center-text {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  max-width: 30%;
  text-align: center;
  line-height: 1.2;
  font-size: clamp(22px, 2.8vw, 40px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.26);   /* 与周围小图同款的柔和投影：已加强(0.14→0.26)，看得清又不过深 */
  opacity: 0;
  pointer-events: none;
}

/* 常驻顶部标题（三层，始终显示） */
.hero-title {
  position: absolute;
  top: 11%;                   /* 用户要求整体上移（13%→11%） */
  left: 50%;
  /* ⚠ 绝对定位 + left:50% 时可用宽度只有「容器宽 - 50%」(1440 下仅 720px)，两行英文标题会被挤成四行、
     压到下方品牌章上。用 max-content 让标题按内容撑开，再用 92vw 兜住窄屏 */
  width: max-content;
  max-width: 92vw;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}
.hero-title-main {
  font-size: clamp(13px, 2.2vw, 30px);   /* 用户要求：再小、并排成一行（桌面 30px，整行约 790px） */
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
  white-space: nowrap;                    /* 一行到底，不换行 */
}
/* 手机窄屏一行放不下会溢出，这里允许折成两行（标题下移幅度也收一点，别压到 LOGO） */
@media (max-width: 720px) {
  .hero-title { top: 9%; }
  .hero-title-main { white-space: normal; font-size: 15px; line-height: 1.3; }
}
.hero-title-main sup { font-size: .5em; vertical-align: super; letter-spacing: 0; }   /* 10th 的 th */

/* 品牌章（旺康 LOGO）：只在「圆→拱」成型后浮现在标题与拱之间的留白处；
   点卡片弹大卡时由 hero.js 立刻淡出（opacity 由 JS 逐帧控制，这里不写 transition，避免两边打架） */
.hero-logo {
  position: absolute;
  left: 50%;
  top: 19%;
  height: min(44vh, 420px);   /* 竖版：高定死、宽自适应（图本身 817×1200）。用户要求放大到接近标题下方整块留白 */
  width: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 3;                 /* 低于拱上卡片(10~60)，永远被卡片盖住，不会挡点击 */
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 900px) {
  .hero-logo { top: 18%; height: min(34vh, 300px); }
}
@media (max-width: 720px) {
  .hero-logo { top: 18%; height: 26vh; }
}

.scroll-hint {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: opacity .4s;
}

/* ---------- 点击放大展示（被点 tile 飞到居中成大卡，大卡本身由 tile 充当） ---------- */
/* viewer 只是 UI 层：关闭按钮 + 左右箭头 + 大卡名称。它绝不拦截拱形 tile 的点击。 */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;   /* 关键：整层不拦截，穿透到下方的拱形 tile */
  transition: opacity .3s ease;
}
.viewer.open { opacity: 1; }

.viewer-close,
.viewer-arrow {
  pointer-events: auto;   /* 只有按钮自己可点 */
}

.viewer-close {
  position: absolute;
  top: 22px; right: 26px;
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 30px; line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
  z-index: 3;
}
.viewer-close:hover { color: var(--text); }

/* 大卡底部名称（覆盖层，不拦截点击） */
.viewer-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #6e6e73;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 2;
}
.viewer.open .viewer-label.show { opacity: 1; }

.viewer-arrow {
  position: absolute;
  top: 34%;
  transform: translateY(-50%);
  width: 25px; height: 25px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 3;
}
.viewer-arrow:hover { background: #f5f5f7; }
.viewer-prev { left: 26px; }
.viewer-next { right: 26px; }

/* ---------- 卖点区 ---------- */
.intro {
  padding: 120px 24px;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.intro h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
}
/* 标题逐词「模糊浮现」（react-bits BlurText 的原生复刻，零依赖）
   ⚠ 安全设计：只有 JS 加上 .bt-ready 后才隐藏文字 → 万一 JS 没跑，标题照常显示，不会变空白 */
.intro h1.bt-ready .bt-w {
  display: inline-block;
  opacity: 0; filter: blur(10px); transform: translateY(12px);
  transition: opacity .55s ease, filter .7s ease, transform .6s cubic-bezier(.2,.7,.3,1);
  will-change: opacity, filter, transform;
}
.intro h1.bt-in .bt-w { opacity: 1; filter: blur(0); transform: none; }
@media (prefers-reduced-motion: reduce) {
  .intro h1.bt-ready .bt-w { opacity: 1; filter: none; transform: none; transition: none; }
}
.intro-sub {
  margin-top: 20px;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}
/* 首页「毛坯 → 效果图」案例对比轮播
   - .intro-compare 拉满视口宽（左右邻居露出到页面边距里），overflow:hidden 防止出横向滚动条
   - 每张卡：底层毛坯 + 上层效果图（clip-path 按 --pos 揭开），配竖线手柄
   - ⚠ 案例图放 images/cases/compare/01/before.jpg + after.jpg（02、03… 同理），程序自动探测 */
.intro-compare {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 44px;
  overflow: hidden;              /* 裁掉两侧更远的卡，页面不出现横向滚动 */
  padding: 10px 0 4px;           /* 给卡片投影留一点上下空间 */
}
/* 顶部：项目名 + 第几间房 / 共几间 */
.cmp-head {
  max-width: 880px; margin: 0 auto 14px; padding: 0 4px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  text-align: left;
}
.cmp-head-proj { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.cmp-head-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cmp-head-meta b { color: var(--text); font-weight: 600; }

/* 房间缩略图条：一个业主的多个房间，点一下换这个房间的对比 */
.cmp-rooms {
  max-width: min(880px, 92vw); margin: 16px auto 0;
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.cmp-rooms::-webkit-scrollbar { display: none; }
.cmp-room {
  flex: 0 0 auto; width: 92px; padding: 0; border: 0; background: none;
  cursor: pointer; font: inherit; scroll-snap-align: center;
}
.cmp-room-img {
  display: block; width: 92px; height: 62px; border-radius: 10px;
  background: #f5f5f7 center/cover no-repeat;
  border: 1px solid rgba(17, 24, 39, .08);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cmp-room-name {
  display: block; margin-top: 6px; font-size: 11px; color: var(--muted);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmp-room:hover .cmp-room-img { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.10); }
.cmp-room.on .cmp-room-img { border-color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.cmp-room.on .cmp-room-name { color: var(--text); font-weight: 600; }

/* 同一房间里有多组对比（A / B）时的切换胶囊 */
.cmp-pairs {
  max-width: min(880px, 92vw); margin: 12px auto 0;
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.cmp-pair {
  min-width: 34px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font: inherit; font-size: 12px; cursor: pointer; transition: all .2s;
}
.cmp-pair:hover { border-color: var(--text); color: var(--text); }
.cmp-pair.on { background: var(--text); border-color: var(--text); color: #fff; }

.cmp-carousel { position: relative; width: min(880px, 92vw); margin: 0 auto; }
.cmp-track { position: relative; }

.cmp-slide {
  position: absolute; left: 50%; top: 0; width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 18px; overflow: hidden;
  background: #f5f5f7;
  border: 1px solid rgba(17, 24, 39, .06);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .07);
  cursor: ew-resize;
  touch-action: pan-y;           /* 手机上左右拖交给滑块，上下仍滚页面 */
  user-select: none;
  transition: transform .55s cubic-bezier(.2, .7, .3, 1), opacity .40s ease, box-shadow .3s ease;
  will-change: transform, opacity;
}
.cmp-slide.dim {                /* 左右邻居：小一号、暗一点、能点 */
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
  filter: brightness(.92) saturate(.96);
}
.cmp-slide.dim .cmp-handle { opacity: 0; pointer-events: none; }
/* 邻居只展示「效果图」整张当预告（不然固定 50% 的竖线会把卡切成两半却没手柄，看着莫名其妙） */
.cmp-slide.dim .cmp-after { clip-path: none; }
.cmp-slide.dim .cmp-label { display: none; }
.cmp-slide.dim:hover { filter: brightness(1) saturate(1); }

.cmp-layer {
  position: absolute; inset: 0;
  background-color: #f5f5f7;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
/* 上层 = 效果图：露出「竖线左侧」那一条 —— 竖线从左往右扫，效果图随之从左往右揭开 */
.cmp-after { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

/* 分隔线 + 圆钮（热区宽 44px、视觉线只有 2px） */
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 44px; margin-left: -22px;
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; outline: none;
  transition: opacity .3s;
}
.cmp-handle-bar {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 0 18px rgba(0, 0, 0, .18);
}
.cmp-handle-knob {
  position: relative; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
  transition: transform .2s;
}
.cmp-handle-knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cmp-slide.active:hover .cmp-handle-knob { transform: scale(1.06); }
.cmp-handle:focus-visible .cmp-handle-knob { box-shadow: 0 0 0 3px rgba(17, 17, 17, .18), 0 4px 16px rgba(0, 0, 0, .22); }

/* 角标 Before / After */
.cmp-label {
  position: absolute; top: 14px; z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); background: rgba(255, 255, 255, .88);
  border-radius: 999px; padding: 5px 11px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  pointer-events: none;
}
.cmp-label--l { left: 14px; }
.cmp-label--r { right: 14px; }

/* 底部圆点（切换案例） */
.cmp-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.cmp-dot {
  width: 8px; height: 8px; padding: 0; border-radius: 50%;
  border: none; background: #d2d2d7; cursor: pointer;
  transition: background .2s, transform .2s;
}
.cmp-dot:hover { background: #b0b0b6; }
.cmp-dot.on { background: var(--text); transform: scale(1.25); }

@media (max-width: 720px) {
  .intro-compare { margin-top: 34px; }
  .cmp-head { padding: 0 14px; }
  .cmp-head-proj { font-size: 13px; }
  .cmp-head-meta { font-size: 11px; }
  .cmp-room { width: 76px; }
  .cmp-room-img { width: 76px; height: 52px; }
  .cmp-slide { aspect-ratio: 4 / 3; }
  .cmp-handle-knob { width: 36px; height: 36px; }
  .cmp-label { top: 10px; font-size: 10px; padding: 4px 9px; }
  .cmp-label--l { left: 10px; }
  .cmp-label--r { right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp-slide { transition: none; }
}

.cta-row {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
/* 数据条（CountUp 原生复刻）：滚动到这一屏时数字从 0 往上跳
   ⚠ HTML 里默认写的是「真实数字」（不是 0）→ 没 JS 时直接显示真数，不会永远停在 0 */
/* ⚠ 宽度必须和下方 .preview（1200 / 3 列 / gap 24）一致 —— 否则数据条的「列」和瓷砖的「列」错开，
   看起来不像同一套栅格（看图代理实测：960 时三列列心 409/720/1033，与瓷砖的 328/720/1112 对不上） */
.stats {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px 132px;   /* 上下留白按实测调平（见需求记录五十四） */
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center;
}
/* 数据条的「锚」：一行极小的全大写小标题，让这条数据带有所属感、不悬在两版块之间 */
.stats-eyebrow {
  grid-column: 1 / -1;                 /* 横跨三列 */
  text-align: center;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); line-height: 1; margin-bottom: -6px;   /* 收紧与下方数字的间距，让上/下的呼吸更匀 */
}
.stat-num {
  font-size: clamp(36px, 4.6vw, 58px); font-weight: 700; line-height: 1;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;   /* 等宽数字，跳动时不左右抖 */
}
.stat-suf { font-size: .48em; font-weight: 600; color: var(--muted); margin-left: 4px; }
.stat-label { margin-top: 10px; font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; gap: 30px; padding-bottom: 56px; }
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  text-decoration: none;
  transition: background .2s;
}
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #333; }
.btn-ghost { color: var(--text); border: 1px solid var(--text); }
.btn-ghost:hover { background: #f5f5f7; }

/* ---------- 花色预览 ---------- */
.preview {
  padding: 0 24px 120px;
  max-width: 1200px;
  margin: 0 auto;
}
.preview h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 44px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  border-radius: 14px;
  overflow: hidden;
  background: #f5f5f7;
}
.card-img { height: 240px; transition: transform .4s ease; }
.card:hover .card-img { transform: scale(1.05); }
.card-label { padding: 14px 18px; font-size: 14px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.footer {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* ---------- 全站右下角悬浮 WhatsApp（各页共用） ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* 窄屏先隐藏「服务中心」后缀，给 6 项导航让位（1024 以下品牌与链接只剩 0–32px 间隙） */
@media (max-width: 1023px) {
  .brand-sub { display: none; }
}

/* ---------- 手机端汉堡菜单（js/nav.js 生成） ---------- */
.nav-toggle {
  display: none;                      /* 桌面隐藏 */
  width: 40px; height: 40px; padding: 0;
  border: none; background: none; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.6px; background: var(--text);
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.on span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle.on span:nth-child(2) { opacity: 0; }
.nav-toggle.on span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

.nav-mobile {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 49;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 8px 20px 18px;
  display: none; flex-direction: column;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .06);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 14px 2px; font-size: 15px; color: var(--muted);
  text-decoration: none; border-bottom: 1px solid rgba(17, 24, 39, .05);
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a:active { color: var(--text); }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .viewer-arrow { width: 20px; height: 20px; font-size: 11px; }
  .viewer-prev { left: 10px; }
  .viewer-next { right: 10px; }
  .wa-float { right: 14px; bottom: 14px; width: 50px; height: 50px; }
}
