/* ============================================================
   衍影 · 产品介绍页
   视觉方向：暗房（safelight amber on blue-black）。
   配色与维度语义色沿用 prototype/styles/tokens.css，
   页面和 App 是同一套识别，不另起炉灶。
   约束：CSP style-src 'self' —— 页面里不写任何 style="" / <style>，
   定位与数值全部落在本文件的具名类上（.mark--N 的 --x/--y、
   .dim--N 的 --v）。
   ============================================================ */

:root {
  color-scheme: dark;

  /* ---------- 颜色：暗房蓝黑 + 安全灯琥珀 ---------- */
  --ink-deep:  oklch(11% 0.012 268);
  --ink:       oklch(15.5% 0.014 268);
  --paper:     oklch(97.5% 0.004 268);
  --muted:     oklch(73% 0.014 268);
  --faint:     oklch(62% 0.015 268);
  --safelight: oklch(82% 0.145 72);
  --hairline:  oklch(100% 0 0 / 0.11);
  --hairline-strong: oklch(100% 0 0 / 0.2);

  /* 维度语义色 —— 只做数据编码，不做装饰 */
  --dim-composition: oklch(70% 0.14 252);
  --dim-lighting:    oklch(80% 0.14 74);
  --dim-color:       oklch(70% 0.16 16);
  --dim-subject:     oklch(72% 0.13 158);
  --dim-technical:   oklch(72% 0.13 305);
  --dim-mood:        oklch(74% 0.11 218);

  /* ---------- 字体：与 App 同栈，页面和产品要连续 ---------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "PingFang SC", system-ui, sans-serif;
  --font-num: "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
              "PingFang SC", system-ui, sans-serif;

  /* ---------- 字号阶 ----------
     正文按 iOS body 17px 起。正文→小标题是平缓的四度，
     小标题→首屏是刻意的大跳（约 2.6×），层级靠对比拉开而不是平铺。 */
  --t-xs:   0.8125rem;
  --t-sm:   0.9375rem;
  --t-base: 1.0625rem;
  --t-lg:   1.25rem;
  --t-xl:   clamp(1.5rem, 1.24rem + 1.1vw, 2.125rem);
  --t-hero: clamp(2.55rem, 1.05rem + 6.6vw, 5.5rem);

  /* ---------- 间距与版心 ----------
     节奏刻意不等距：首屏与演示同属一件事，收得紧；
     章节之间才拉开。等距大留白会让每个板块一样重要。 */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
  --sect: clamp(3.75rem, 2.4rem + 4.4vw, 6.5rem);

  --r-md: 16px;
  --r-sm: 10px;

  --shadow-print: 0 30px 60px -24px oklch(0% 0 0 / 0.85);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   基础
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink-deep);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { font-family: var(--font-display); margin: 0; }

p { margin: 0; }

a {
  color: var(--safelight);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--safelight);
  outline-offset: 3px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 0.65rem 1.1rem;
  background: var(--safelight);
  color: var(--ink-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: top 120ms var(--ease);
}
.skip:focus-visible { top: 1rem; }

/* ============================================================
   顶栏
   ============================================================ */

.top {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding-block: 1.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  align-self: center;
  border-radius: 9px;
  box-shadow: 0 2px 10px -2px oklch(0% 0 0 / 0.6);
}
.brand__name {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.brand__role {
  font-size: var(--t-xs);
  color: var(--faint);
  letter-spacing: 0.14em;
}

.top__nav {
  display: flex;
  gap: 1.75rem;
  font-size: var(--t-sm);
}
.top__nav a { color: var(--muted); text-decoration: none; }
.top__nav a:hover { color: var(--paper); text-decoration: underline; }

/* ============================================================
   首屏
   ============================================================ */

.hero {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding-block: clamp(3rem, 1.5rem + 6vw, 6.5rem) clamp(2.25rem, 1.4rem + 3vw, 3.75rem);
  display: grid;
  gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  align-items: end;
}

.hero h1 {
  font-size: var(--t-hero);
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-weight: 680;
}

.hero__lead {
  padding-block-end: 0.35em;
  max-width: 30ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  line-height: 1.72;
  color: var(--muted);
  /* 中文会在任意字之间断行。balance 让各行长度接近，
     基本不会再出现「这/里」这种把词劈开的断点。 */
  text-wrap: balance;
}

/* ============================================================
   演示：照片 + 标注点 + 逐条点评
   ============================================================ */

.demo {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  /* 不留底部留白：与首屏同属一件事，下一节的 padding-block 自己会拉开距离。
     两处都加留白会叠成一大片空白。 */
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
  align-items: start;
}

/* ---- 照片：摊在暗房台面上的一张相片 ---- */

.shot { margin: 0; }

.shot__frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-print);
  outline: 1px solid oklch(100% 0 0 / 0.09);
  outline-offset: -1px;
}
.shot__frame img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.shot__cap {
  margin-block-start: 0.95rem;
  font-size: var(--t-xs);
  line-height: 1.7;
  color: var(--faint);
}

/* 标注点容器：铺满照片 */
.shot__marks {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

/* ---- 标注点：琥珀色 grease-pencil 环 ---- */

.mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  cursor: pointer;
  animation: mark-in 520ms var(--ease) both;
}

.mark input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.mark__dot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid oklch(82% 0.145 72 / 0.85);
  background: oklch(12% 0.012 268 / 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: var(--safelight);
  font-family: var(--font-num);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 180ms var(--ease), color 180ms var(--ease),
              scale 180ms var(--ease), border-color 180ms var(--ease);
}

.mark:hover .mark__dot {
  border-color: var(--safelight);
  background: oklch(82% 0.145 72 / 0.22);
}

.mark:has(input:checked) .mark__dot {
  background: var(--safelight);
  border-color: var(--safelight);
  color: oklch(18% 0.05 62);
  scale: 1.14;
  box-shadow: 0 0 0 5px oklch(82% 0.145 72 / 0.18);
}

.mark:has(input:focus-visible) .mark__dot {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.mark--1 { --x: 66%;   --y: 21%;   animation-delay: 120ms; }
.mark--2 { --x: 80%;   --y: 55%;   animation-delay: 220ms; }
.mark--3 { --x: 10%;   --y: 60%;   animation-delay: 320ms; }
.mark--4 { --x: 43.5%; --y: 35%;   animation-delay: 420ms; }
.mark--5 { --x: 37.5%; --y: 44%;   animation-delay: 520ms; }

@keyframes mark-in {
  from { opacity: 0; scale: 0.5; }
  to   { opacity: 1; scale: 1; }
}

/* ---- 右栏：总分 + 逐条点评 ---- */

.rail {
  display: grid;
  gap: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  align-content: start;
}

.score {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.15rem;
  align-items: baseline;
  padding-block-end: clamp(1.25rem, 1rem + 1vw, 1.85rem);
  border-block-end: 1px solid var(--hairline);
}
.score__label {
  grid-column: 1 / -1;
  font-size: var(--t-xs);
  color: var(--faint);
  letter-spacing: 0.12em;
}
.score__value {
  font-family: var(--font-num);
  font-size: clamp(3.5rem, 2.2rem + 4.5vw, 5.25rem);
  font-weight: 620;
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--safelight);
}
.score__band {
  font-size: var(--t-sm);
  color: var(--muted);
  line-height: 1.55;
}

/* 所有 note 叠在同一格，切换时不改变栏高。
   min-block-size 取最长一条的实际高度（约 15.5rem）——留太大就是一片空档。 */
.notes {
  display: grid;
  min-block-size: 15.5rem;
}
.note {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease),
              visibility 0s linear 260ms;
}

.demo:has(.mark--1 input:checked) .note--1,
.demo:has(.mark--2 input:checked) .note--2,
.demo:has(.mark--3 input:checked) .note--3,
.demo:has(.mark--4 input:checked) .note--4,
.demo:has(.mark--5 input:checked) .note--5 {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.note__meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.note__score {
  font-family: var(--font-num);
  font-size: var(--t-lg);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.note__title {
  margin-block-start: 0.75rem;
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.75rem);
  line-height: 1.32;
  letter-spacing: -0.012em;
  font-weight: 640;
}
.note__body {
  margin-block-start: 0.85rem;
  max-width: 42ch;
  color: var(--muted);
}
.note__tip {
  margin-block-start: 1.15rem;
  padding-block-start: 1.15rem;
  border-block-start: 1px solid var(--hairline);
  max-width: 42ch;
  color: var(--paper);
}
.note__tip-label {
  display: inline-block;
  margin-inline-end: 0.75rem;
  padding: 0.14rem 0.62rem;
  border-radius: 999px;
  background: oklch(82% 0.145 72 / 0.16);
  color: var(--safelight);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  vertical-align: 0.12em;
}

/* 维度徽标：颜色即维度 */
.chip {
  padding: 0.16rem 0.68rem;
  border-radius: 999px;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.chip--composition { background: oklch(70% 0.14 252 / 0.18); color: var(--dim-composition); }
.chip--lighting    { background: oklch(80% 0.14 74  / 0.18); color: var(--dim-lighting); }
.chip--color       { background: oklch(70% 0.16 16  / 0.18); color: var(--dim-color); }
.chip--subject     { background: oklch(72% 0.13 158 / 0.18); color: var(--dim-subject); }
.chip--technical   { background: oklch(72% 0.13 305 / 0.18); color: var(--dim-technical); }
.chip--mood        { background: oklch(74% 0.11 218 / 0.18); color: var(--dim-mood); }

.rail__hint {
  font-size: var(--t-sm);
  color: var(--faint);
  max-width: 40ch;
}

/* ============================================================
   区块
   ============================================================ */

.band { padding-block: var(--sect); }
.band--raised {
  background: var(--ink);
  border-block: 1px solid var(--hairline);
}

.band > * {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* 限宽落在文字上，不落在容器上：
   容器已经由 .band > * 定宽 + margin-inline:auto，再叠 max-width 会把
   整块居中，和下面的数据带左边缘对不齐。 */
.band__head h2 {
  max-width: 22ch;
  font-size: var(--t-xl);
  line-height: 1.24;
  letter-spacing: -0.016em;
  font-weight: 650;
}
.band__lead {
  margin-block-start: 1.15rem;
  max-width: 46ch;
  color: var(--muted);
}

/* ---- 六维度：横向数据带 ---- */

.dims {
  list-style: none;
  padding: 0;
  margin-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
  border-block-start: 1px solid var(--hairline);
}

.dim {
  display: grid;
  grid-template-columns: 5.5rem 1fr 3.25rem;
  align-items: center;
  gap: clamp(0.85rem, 0.4rem + 1.6vw, 1.85rem);
  padding-block: 1.05rem;
  border-block-end: 1px solid var(--hairline);
}
.dim__name {
  font-size: var(--t-sm);
  color: var(--muted);
}
.dim__track {
  display: block;
  block-size: 0.42rem;
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.08);
  overflow: hidden;
}
.dim__fill {
  display: block;
  inline-size: var(--v);
  block-size: 100%;
  border-radius: 999px;
}
.dim__score {
  font-family: var(--font-num);
  font-size: var(--t-lg);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.dim--composition .dim__fill { --v: 73%; background: var(--dim-composition); }
.dim--lighting    .dim__fill { --v: 67%; background: var(--dim-lighting); }
.dim--color       .dim__fill { --v: 83%; background: var(--dim-color); }
.dim--subject     .dim__fill { --v: 82%; background: var(--dim-subject); }
.dim--technical   .dim__fill { --v: 68%; background: var(--dim-technical); }
.dim--mood        .dim__fill { --v: 76%; background: var(--dim-mood); }

/* ---- 三步 ---- */

.steps {
  list-style: none;
  padding: 0;
  margin-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
  display: grid;
  gap: clamp(1.75rem, 1rem + 2.5vw, 3rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step {
  padding-block-start: 1.35rem;
  border-block-start: 1px solid var(--hairline-strong);
}
.step__n {
  font-family: var(--font-num);
  font-size: var(--t-sm);
  font-weight: 650;
  color: var(--safelight);
  font-variant-numeric: tabular-nums;
}
.step__t {
  margin-block-start: 0.75rem;
  font-size: var(--t-lg);
  line-height: 1.42;
  font-weight: 640;
}
.step__d {
  margin-block-start: 0.75rem;
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: 1.85;
}

/* ---- 评分档位表 ---- */

/* 不写 inline-size/width —— 版心已由 .band > * 给定，
   这里再写 100% 会覆盖它，表格就冲出栏外、和标题对不齐。 */
.bands {
  margin-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
  border-collapse: collapse;
  text-align: start;
  font-size: var(--t-sm);
}
.bands th, .bands td {
  padding: 1.05rem 1rem 1.05rem 0;
  border-block-end: 1px solid var(--hairline);
  vertical-align: baseline;
}
.bands thead th {
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.11em;
  color: var(--faint);
  border-block-end-color: var(--hairline-strong);
}
.bands tbody th {
  font-family: var(--font-num);
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
  inline-size: 8.5rem;
}
.bands tbody td { color: var(--muted); }
.bands tbody td:first-of-type {
  color: var(--paper);
  font-weight: 600;
  inline-size: 5.5rem;
}
.bands .is-current th,
.bands .is-current td {
  color: var(--safelight);
  background: oklch(82% 0.145 72 / 0.08);
}
.bands .is-current th {
  box-shadow: inset 2px 0 0 var(--safelight);
  padding-inline-start: 1rem;
}

.bands__note {
  font-size: var(--t-xs);
  color: var(--faint);
}

/* ============================================================
   页脚
   ============================================================ */

.foot {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) clamp(2.5rem, 2rem + 2vw, 4rem);
  display: grid;
  gap: clamp(1.75rem, 1rem + 2.5vw, 3.5rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr) auto;
  align-items: start;
  border-block-start: 1px solid var(--hairline);
}

.foot__brand { display: grid; gap: 0.65rem; }
.foot__brand .brand__mark { border-radius: 8px; }
.foot__brand p { font-size: var(--t-sm); }
.foot__co { font-size: var(--t-sm); font-weight: 600; }
.foot__small {
  font-size: var(--t-xs);
  line-height: 1.85;
  color: var(--faint);
}
.foot__nav {
  display: grid;
  gap: 0.6rem;
  font-size: var(--t-sm);
  justify-items: start;
}
.foot__nav a { color: var(--muted); text-decoration: none; }
.foot__nav a:hover { color: var(--paper); text-decoration: underline; }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 900px) {
  /* 标题里的 <br class="brk"> 不隐藏：那三个断点每行 6–7 个汉字，
     320px 宽也排得下，反而是自然换行会掉出「上。」这种孤字。 */
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero__lead { max-width: 38ch; }
  .demo { grid-template-columns: minmax(0, 1fr); }
  .shot { max-width: 26rem; }
  /* 移动端正文换行更多，note 更高；保留叠放避免切换时下方内容跳动 */
  .notes { min-block-size: 22rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .top { padding-block-start: 1.15rem; }
  .top__nav { gap: 1.15rem; }
  .brand__role { display: none; }
  .dim {
    grid-template-columns: 4.25rem 1fr 2.75rem;
    gap: 0.75rem;
    padding-block: 0.95rem;
  }
  .bands th, .bands td { padding-block: 0.85rem; }
  .bands tbody th { inline-size: 5.5rem; }
}

/* ============================================================
   减少动态效果
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
