:root {
  color-scheme: light;
  --night: #111e35;
  --night-deep: #0c1729;
  --night-line: #35455e;
  --light: #faf8f2;
  --paper: #f9f8f4;
  --blue-paper: #eaf0f6;
  --ink: #14233b;
  --muted: #4e5c70;
  --line: #d4dae2;
  --gold: #ffd18b;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-tap-highlight-color: #6b9fd333;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body:has(.site-dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a, button { touch-action: manipulation; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2 { text-wrap: balance; }
section[id], main[id] { scroll-margin-top: 24px; }
:focus-visible { outline: 2px solid #225fc2; outline-offset: 5px; }
.header-band :focus-visible, .opening :focus-visible, .footer-band :focus-visible { outline-color: var(--gold); }

.shell { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 5;
  inset: 12px auto auto 12px;
  padding: 12px 16px;
  background: var(--light);
  color: var(--ink);
}

.header-band, .opening, .footer-band {
  color-scheme: dark;
  color: var(--light);
  background: var(--night);
}

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header { min-height: 81px; border-bottom: 1px solid var(--night-line); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  flex: none;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .01em;
}
.brand img { border-radius: 10px; }
.wordmark {
  margin-inline-start: 4px;
  color: #b4c2d5;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: 13px;
  font-weight: 600;
}
.site-header nav { display: flex; gap: clamp(18px, 3vw, 46px); }
.site-header nav a, .back-top, .hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #d3dfed;
  font-size: 14px;
  white-space: nowrap;
}
.site-header nav a:hover, .back-top:hover, .hero-secondary:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.opening {
  background-image: radial-gradient(ellipse at 72% 80%, #203658, transparent 66%);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(22px, 3.8vw, 60px);
  padding-block: clamp(36px, 4vw, 63px) clamp(54px, 5.2vw, 82px);
}
.hero-copy { padding-bottom: 8px; }
.hero-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #cbd7e7;
  font-size: 14px;
  letter-spacing: .05em;
}
.hero-label span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px #ffd18b24;
}
.hero h1 {
  margin-top: 26px;
  font-size: clamp(44px, 5.75vw, 88px);
  font-weight: 800;
  line-height: 1.11;
  letter-spacing: -.065em;
}
.hero-line { white-space: nowrap; }
.hero-period { display: inline-block; width: .42em; color: var(--gold); }
.hero-intro {
  max-width: 25em;
  margin-top: 25px;
  color: #cbd7e7;
  font-size: clamp(15px, 1.28vw, 18px);
  line-height: 1.85;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 22px;
  row-gap: 8px;
  margin-top: 31px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 140ms var(--ease-out);
}
.button:active { transform: scale(.97); }
.button-bright { background: var(--gold); color: var(--night-deep); }
.button-bright:hover { background: #ffe1ad; }

.hero-figure {
  min-width: 0;
  padding: 11px;
  border: 1px solid #56677e;
  border-radius: 13px;
  background: #15253d;
  box-shadow: 0 18px 55px #070f2245;
}
.figure-top, .figure-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: #bfccdd;
  font-size: 12px;
  line-height: 1.5;
}
.figure-top { padding: 1px 4px 10px; letter-spacing: .06em; }
.figure-bottom { padding: 11px 4px 2px; }
.figure-bottom > span:first-child { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.figure-bottom strong { color: var(--light); font-size: 15px; font-weight: 700; }
.figure-bottom small { font-size: 12px; }

.compare {
  --split: 36%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 4 / 2.85;
  border-radius: 5px;
  background: #324b63;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare-before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.compare-tag {
  position: absolute;
  inset-block-start: 12px;
  padding: 4px 9px;
  border-radius: 3px;
  background: #0d192be8;
  color: white;
  font-size: 12px;
  pointer-events: none;
}
.tag-before { inset-inline-start: 12px; }
.tag-after { inset-inline-end: 12px; }
.compare-divider {
  position: absolute;
  inset: 0 auto 0 var(--split);
  width: 2px;
  transform: translateX(-50%);
  background: #fff9ea;
  pointer-events: none;
}
.compare-divider span {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 50% auto auto 50%;
  width: 43px;
  height: 43px;
  transform: translate(-50%, -50%);
  border: 1px solid #fff9ea;
  border-radius: 50%;
  background: #15253de8;
  color: #fff9ea;
}
.compare:has(.compare-range[hidden]) .compare-divider span { display: none; }
.compare-range {
  position: absolute;
  inset: 0 auto 0 -22px;
  appearance: none;
  width: calc(100% + 44px);
  height: 100%;
  margin: 0;
  border: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.compare-range::-webkit-slider-thumb { appearance: none; width: 44px; height: 44px; }
.compare-range::-moz-range-thumb { width: 44px; height: 44px; border: 0; }
.compare:has(.compare-range:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }

.gallery, .how, .project { padding-block: clamp(60px, 7vw, 108px); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px 36px;
  margin-bottom: 34px;
}
.section-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .1em;
}
.section-head h2, .project h2 {
  margin-top: 9px;
  font-size: clamp(34px, 4.2vw, 61px);
  line-height: 1.15;
  letter-spacing: -.05em;
}
.section-head h2 + p, .project-intro > p:last-child {
  margin-top: 13px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.filters button {
  min-height: 44px;
  padding: 7px 13px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.filters button:hover { background: var(--blue-paper); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--light); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 31px 19px;
}
.work-link { display: block; }
.work-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 4.35;
  border-radius: 6px;
  background: var(--blue-paper);
}
.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms var(--ease-out);
}
.work-open {
  position: absolute;
  inset: auto 10px 10px auto;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border: 1px solid #fff9ea99;
  border-radius: 50%;
  background: #111e35de;
  color: var(--light);
  font-size: 18px;
}
.work-link:hover .work-open, .work-link:focus-visible .work-open {
  background: var(--gold);
  color: var(--night-deep);
}
@media (hover: hover) {
  .work-link:hover img { transform: scale(1.035); }
}
.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1px 7px;
  padding-top: 11px;
}
.work-meta h3 { font-size: clamp(15px, 1.35vw, 19px); line-height: 1.45; }
.work-meta span, .work-link > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.work-link > p { margin-top: 5px; }
.gallery-note { margin-top: 26px; color: var(--muted); font-size: 13px; }

.how { background: var(--blue-paper); }
.scan-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #aab8cc;
  border-radius: 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}
.scan-link:hover { background: var(--ink); color: var(--light); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.steps li { border-top: 1px solid #aab8cc; padding: 19px 8px 0 0; }
.steps span {
  color: #345983;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin-top: 9px; font-size: 22px; }
.steps p { max-width: 24em; margin-top: 7px; color: var(--muted); font-size: 15px; line-height: 1.8; }

.project {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 32px clamp(36px, 6vw, 92px);
}
.project-intro > p:last-child { max-width: 26em; }
.project-details { border-top: 1px solid var(--line); }
.project-details div { border-bottom: 1px solid var(--line); padding: 16px 0; }
.project-details dt { font-size: 17px; font-weight: 700; }
.project-details dd { margin-top: 5px; color: var(--muted); font-size: 15px; line-height: 1.8; }

.site-footer { padding-block: 28px; }
.footer-intro p { margin-top: 7px; color: #b4c2d5; font-size: 13px; }
.footer-scan {
  display: flex;
  align-items: center;
  gap: 14px;
  scroll-margin-top: 24px;
  font-size: 15px;
  font-weight: 700;
}
.scan-preview { flex: none; padding: 5px; border: 0; border-radius: 6px; background: white; }
.scan-preview:not(:disabled):hover { box-shadow: 0 0 0 2px var(--gold); }
.scan-preview:disabled { cursor: default; opacity: 1; }
.footer-scan img { width: 134px; height: auto; }
.footer-scan figcaption span {
  display: block;
  margin-top: 5px;
  color: #b4c2d5;
  font-size: 13px;
  font-weight: 400;
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 24px;
  padding-block: 5px;
  border-top: 1px solid var(--night-line);
  color: #b4c2d5;
  font-size: 13px;
}
.footer-meta a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.footer-meta a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 5px; }
.footer-meta .back-top { margin-inline-start: auto; font-size: inherit; }

.site-dialog {
  color-scheme: light;
  width: min(920px, calc(100% - 36px));
  max-height: calc(100% - 36px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 22px 100px #070f2266;
}
.site-dialog::backdrop { background: #081224c9; }
.wechat-dialog { width: min(360px, calc(100% - 36px)); }
.wechat-code {
  width: min(274px, 100%);
  height: auto;
  margin: 16px auto 0;
  padding: 8px;
  border-radius: 6px;
  background: white;
}
.dialog-body { padding: clamp(15px, 3vw, 30px); }
.dialog-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dialog-top h2 { margin-top: 4px; font-size: clamp(24px, 4vw, 36px); line-height: 1.2; }
#dialog-caption { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.dialog-close:hover { background: var(--blue-paper); }
.dialog-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 19px; }
.dialog-pair img {
  width: 100%;
  height: clamp(150px, 58vh, 520px);
  border-radius: 5px;
  object-fit: contain;
  background: #e6ebf2;
}
.dialog-pair figcaption { margin-top: 7px; text-align: center; font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: enter 480ms var(--ease-out) both; }
  .hero-figure { animation: enter 530ms var(--ease-out) 60ms both; }
}
@keyframes enter {
  from { opacity: .55; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .button, .work-image img { transition: none; }
  .button:active, .work-link:hover img { transform: none; }
}
@media (max-width: 1080px) {
  .shell { width: calc(100% - 68px); }
}
@media (max-width: 850px) {
  .shell { width: calc(100% - 44px); }
  .hero { grid-template-columns: 1fr; gap: 27px; }
  .hero h1 { font-size: clamp(49px, 10vw, 78px); }
  .hero-intro { max-width: 28em; }
  .hero-figure { max-width: 690px; }
  .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 0; padding-top: 11px; }
  .site-header nav { justify-content: space-between; width: 100%; gap: 8px; }
  .hero { padding-top: 33px; }
  .hero h1 { margin-top: 19px; }
  .hero-intro { margin-top: 17px; }
  .hero-actions { margin-top: 20px; }
  .hero-figure { padding: 7px; }
  .figure-top { padding-bottom: 7px; }
  .figure-bottom { padding-top: 7px; }
  .section-head { margin-bottom: 25px; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 12px; }
  .work-open { width: 29px; height: 29px; inset: auto 7px 7px auto; font-size: 16px; }
  .work-meta { padding-top: 8px; }
  .steps, .project { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 20px; }
  .footer-meta .back-top { margin-inline-start: 0; }
  .dialog-pair { gap: 7px; }
  .dialog-pair img { height: clamp(120px, 55vw, 320px); }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 32px); }
  .hero h1 { font-size: clamp(36px, 14vw, 49px); }
}
