/* ============================================================
   SANTO JOANNES 圣乔纳斯 · 扫码落地页
   视觉对齐品牌产品目录：黑底、白字、衬线字标、
   细线分隔，产品图用浅色图版承载（目录同款版式）。
   ============================================================ */

:root {
  --bg: #0c0d0e;
  --panel: #17181a;
  --line: #2a2c2f;
  --tile: #f1f0ee;
  --text: #e8e8e6;
  --text-dim: #9a9c9e;
  --text-faint: #5f6265;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* 拉丁字标用衬线，呼应目录封面的 Didone 风格字标 */
.serif, .brand-en, .series-en, .foot-brand {
  font-family: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", Georgia, serif;
}

h1, h2, h3 { font-weight: 600; line-height: 1.4; }

section, footer.foot {
  padding: 0 28px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- ① 首屏 ---------- */

.hero { position: relative; }

/* 首屏保持原图 1:1，整张显示不裁切；电脑上最宽 640px */
.hero-img {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #111214;
  touch-action: pan-y;
}

/* <picture> 只是选图用的外壳，不参与排版 */
picture { display: contents; }

/* 首屏打底的模糊小图（内联在 HTML 里）按第一张的位置铺满 */
.hero-img {
  background-size: cover;
  background-position: center;
}

/* 子午实拍轮播：叠放淡入淡出 */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}

.hero-slide.is-active { opacity: 1; }

/* 实拍图上缘压暗托住进度条，下缘融入黑底 */
.hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8,9,10,.55) 0%, transparent 20%, transparent 84%, var(--bg) 100%);
}

.hero-meta {
  position: absolute;
  z-index: 2;
  top: max(14px, env(safe-area-inset-top));
  left: 20px;
  right: 20px;
}

.hero-bars {
  display: flex;
  gap: 6px;
}

/* 进度条的按钮留足点击高度，线条本身只有 2px */
.hero-bars button {
  flex: 1;
  height: 16px;
  padding: 7px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.hero-bars i {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: rgba(255,255,255,.28);
  overflow: hidden;
  position: relative;
}

.hero-bars i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.hero-bars .is-done i::after { transform: scaleX(1); }

.hero-bars .is-active i::after {
  animation: hero-fill 5s linear forwards;
}

.hero-img.is-paused .hero-bars .is-active i::after { animation-play-state: paused; }

@keyframes hero-fill { to { transform: scaleX(1); } }

.hero-label {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,.75);
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.hero-label .serif { letter-spacing: .2em; margin-right: 4px; }

.hero-label b { font-weight: 600; color: #fff; margin-left: 6px; }

.hero-label span:last-child {
  margin-left: 8px;
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.55);
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 26px 28px 0;
  max-width: 560px;
  margin: -30px auto 0;
}

.brand-en {
  font-size: 30px;
  letter-spacing: .12em;
  color: #fff;
  text-transform: uppercase;
  font-weight: 500;
}

.brand-cn {
  margin-top: 6px;
  font-size: 14px;
  letter-spacing: .5em;
  color: var(--text-dim);
}

.hero h1 {
  margin-top: 34px;
  font-size: 26px;
  letter-spacing: .06em;
}

.hero-sub {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-dim);
}

/* ---------- 通用 ---------- */

section { padding-top: 80px; }

section h2 { font-size: 23px; letter-spacing: .03em; }

section h2 .serif { font-size: 21px; letter-spacing: .14em; font-weight: 500; }

.section-lede {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-dim);
  max-width: 32em;
}

/* ---------- ② 品牌：名字与署名 ---------- */

.name-cards {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.name-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 18px;
  background: var(--panel);
}

.name-word {
  font-family: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", Georgia, serif;
  font-size: 20px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}

.name-key {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2em;
}

.name-desc {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.signatures { margin-top: 44px; }

/* 使命与愿景 */
.mission {
  margin-top: 44px;
  padding: 28px 24px;
  border-left: 2px solid #fff;
  background: linear-gradient(90deg, rgba(255,255,255,.045), transparent 70%);
}

.mission-label {
  font-size: 13px;
  letter-spacing: .25em;
  color: var(--text-dim);
}

.mission-text {
  margin-top: 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #fff;
  line-height: 1.5;
}

.mission-desc {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-dim);
}

.mission-vision {
  margin-top: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.signatures h3 { font-size: 17px; }

.sig-list {
  list-style: none;
  margin-top: 16px;
  counter-reset: sig;
}

.sig-list li {
  position: relative;
  counter-increment: sig;
  padding: 14px 0 14px 34px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--text-dim);
}

.sig-list li strong { color: var(--text); font-weight: 600; }

.sig-list li::before {
  content: counter(sig);
  position: absolute;
  left: 2px;
  top: 16px;
  width: 20px;
  height: 20px;
  border: 1px solid var(--text-faint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- ③ 材质 ---------- */

.photo {
  margin-top: 36px;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.photo figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-faint);
}

.material-points {
  list-style: none;
  margin-top: 28px;
}

.material-points li {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.material-points h3 { font-size: 17px; }

.material-points p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-dim);
}

/* ---------- ④⑤ 系列 ---------- */

.product {
  margin-top: 30px;
}

/* 浅色图版承载产品图：目录内页同款版式 */
.product-img {
  background: var(--tile);
  border-radius: 6px;
  overflow: hidden;
}

.product-img img {
  display: block;
  width: 100%;
  height: auto;
}

.product-info { margin-top: 18px; }

.specs {
  list-style: none;
}

.specs li {
  position: relative;
  padding: 3px 0 3px 16px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 7px;
  height: 1px;
  background: var(--text-faint);
}

.price {
  display: inline-block;
  margin-top: 14px;
  font-size: 18px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* 八配色横滑画廊 */
.gallery-title {
  margin-top: 48px;
  font-size: 17px;
}

.colorways {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  /* 让画廊两端贴到屏幕边缘 */
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
}

.colorways::-webkit-scrollbar { display: none; }

.colorways figure {
  flex: 0 0 132px;
  scroll-snap-align: start;
}

.colorways img {
  display: block;
  width: 132px;
  height: 158px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--tile);
}

.colorways figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}

.colorways figcaption span {
  display: block;
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: .05em;
}

.gallery-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- 子午主图轮播 ---------- */

.carousel {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.carousel-track,
.lb-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar,
.lb-track::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  cursor: zoom-in;
}

.slide img {
  display: block;
  width: 100%;
  height: auto;
}

.slide figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
}

.slide figcaption span {
  margin-left: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, .62);
  letter-spacing: .04em;
}

.nav-btn {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 24px;
  line-height: 34px;
  cursor: pointer;
}

.nav-prev { left: 10px; }
.nav-next { right: 10px; }

.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.carousel-count {
  font-size: 12.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.dots { display: flex; }

/* 圆点本身很小，按钮留足点击面积 */
.dots button {
  width: 18px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dots button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #4a4d52;
  transition: width .2s, background-color .2s;
}

.dots button[aria-current="true"]::after {
  width: 14px;
  background: #fff;
}

/* ---------- 可点击的配色缩略图 ---------- */

.colorways .cw {
  flex: 0 0 132px;
  scroll-snap-align: start;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cw-img {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
}

.colorways .cw img {
  transition: transform .25s;
}

.cw:active img { transform: scale(.97); }

.cw-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .62);
  font-size: 10.5px;
  color: #fff;
}

.cw-name {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}

.cw-name span {
  display: block;
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: .05em;
}

/* ---------- 配色细节全屏查看 ---------- */

html.lb-open,
html.lb-open body { overflow: hidden; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: #121317;
}

.lb[hidden] { display: none; }

.lb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 20px 12px;
}

.lb-title { font-size: 18px; font-weight: 600; color: #fff; }

.lb-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.lb-sub span + span { margin-left: 12px; }

.lb-close {
  width: 40px;
  height: 40px;
  margin: -4px -8px 0 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 26px;
  line-height: 38px;
  cursor: pointer;
}

.lb-track {
  flex: 1;
  min-height: 0;
}

.lb-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lb .nav-btn { top: 50%; }

.lb-foot {
  padding: 14px 20px max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lb-hint {
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- ⑥ 保修与服务 ---------- */

.service-list {
  list-style: none;
  margin-top: 24px;
}

.service-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--text-dim);
}

.service-list li strong { color: var(--text); font-weight: 600; }

/* ---------- ⑦ 本店礼遇 ---------- */

.offer { padding-top: 68px; }

.offer-box {
  border: 1px solid #45484c;
  border-radius: 10px;
  padding: 28px 24px;
  background: var(--panel);
}

.offer-from {
  font-size: 14px;
  color: var(--text-dim);
}

.offer-from strong { color: var(--text); font-weight: 600; }

.offer-text {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
}

.offer-from[hidden] + .offer-text { margin-top: 0; }

.offer-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- ⑤ 联系 ---------- */

.contact { padding-bottom: 20px; }

.wechat-hint {
  margin-top: 26px;
  font-size: 14px;
  color: var(--text);
}

.wechat-list {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.wechat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* 二维码保持白底与留白，长按识别更稳 */
.wechat-qr {
  flex: 0 0 132px;
  width: 132px;
  height: 132px;
  border-radius: 6px;
  background: #fff;
  -webkit-touch-callout: default;
}

.wechat-info { min-width: 0; }

.wechat-role {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-dim);
}

.wechat-name {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: normal;
}

.wechat-name img {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.wechat-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---------- 页脚 ---------- */

.foot {
  padding-top: 64px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  text-align: center;
}

.foot-brand {
  font-size: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.foot p:not(.foot-brand) {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- 可访问性与桌面端 ---------- */

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (min-width: 640px) {
  .hero h1 { font-size: 32px; }
  .product {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 26px;
    align-items: start;
  }
  .product-info { margin-top: 0; }
  .lb-slide img { max-width: min(100%, 900px); }
}

/* 小屏手机（如 iPhone SE）给文字多留点宽度 */
@media (max-width: 350px) {
  .wechat-card { gap: 12px; padding: 12px; }
  .wechat-qr { flex-basis: 112px; width: 112px; height: 112px; }
}

/* 触屏上隐藏左右按钮，直接滑 */
@media (hover: none) and (pointer: coarse) {
  .nav-btn { display: none; }
}

/* 不支持 aspect-ratio 的旧浏览器：用宽度撑出正方形 */
@supports not (aspect-ratio: 1 / 1) {
  .hero-img { height: 100vw; max-height: 640px; }
}
