@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:wght@400;500;600;700&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --paper: #fafaf8;
  --mid: #4a4a4a;
  --ink: #1a1a1a;
  --line: #c9c9c1;
  --dot: #deddd5;
  --serif: "Bodoni Moda", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: "Jost", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr) 232px;
  grid-template-areas:
    "nav main rail"
    "nav foot foot";
  column-gap: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .75;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(26, 26, 26, .035) 0 1px,
    rgba(26, 26, 26, 0) 1px 4px
  );
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: .005em;
  margin: 0;
}

h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

a { color: var(--ink); }

hr {
  border: 0;
  height: 2px;
  width: 56px;
  background: var(--ink);
  margin: 12px 0 20px;
  transform: rotate(-.8deg);
}

/* ---------- 左侧导航 ---------- */

.lrail {
  grid-area: nav;
  position: sticky;
  top: 0;
  z-index: 3;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 20px 28px 24px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mark-link {
  display: block;
  width: 54px;
  height: 54px;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  transform: rotate(-3deg);
  overflow: hidden;
  text-decoration: none;
  flex: 0 0 auto;
}

.mark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.1);
}

.mark-txt {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 3px;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 2px;
  color: var(--mid);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .12s steps(2), transform .12s steps(2);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
  transform: translateX(2px);
}

.ct { margin-top: auto; }

.tel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 28px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transform: rotate(-.7deg);
}

/* ---------- 主体 ---------- */

main {
  grid-area: main;
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 0 10px 0 28px;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 20px;
  overflow: hidden;
  background-image: radial-gradient(var(--dot) 1.15px, transparent 1.2px);
  background-size: 17px 17px;
}

.slots { position: absolute; inset: 0; pointer-events: none; }

.slot {
  position: absolute;
  display: block;
  width: min(24vw, 262px);
}

.slot.s1 { top: 9vh; left: 1.5%; transform: rotate(-4.5deg); }
.slot.s2 { bottom: 9vh; right: 1.5%; transform: rotate(3.6deg); }

.collage {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  padding: 8px 8px 26px;
  filter: grayscale(1) contrast(1.08);
}

.hero-txt {
  position: relative;
  z-index: 2;
  max-width: 26ch;
  padding: 34px 26px;
  text-align: center;
  background: rgba(250, 250, 248, .88);
  border: 1px solid var(--ink);
  border-radius: 28px;
  transform: rotate(-.6deg);
}

.hero-txt h1 {
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  letter-spacing: -.01em;
}

.lede {
  margin: 16px 0 0;
  font-size: 16px;
  color: var(--mid);
  line-height: 1.7;
}

article.body {
  padding: 52px 0 76px;
  max-width: 72ch;
}

main article > div {
  padding: 30px 0 6px;
  scroll-margin-top: 92px;
}

main article > div + div {
  margin-top: 30px;
  padding-top: 42px;
  border-top: 1px dashed var(--line);
}

main article > div h2 + hr {
  width: 84px;
  height: 2px;
  background: var(--ink);
  border: 0;
  margin: 14px 0 22px;
  transform: rotate(-.7deg);
}

div > p:first-of-type { margin-top: 0; }

div ul,
div ol { padding-left: 1.25em; }

div li { margin-bottom: .35em; }

div a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

div img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px;
  background: #fff;
  filter: grayscale(1) contrast(1.04);
}

div blockquote {
  margin: 0 0 1.1em;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--ink);
  color: var(--mid);
}

/* ---------- 右侧栏 ---------- */

.rrail {
  grid-area: rail;
  position: sticky;
  top: 0;
  z-index: 1;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 48px 22px 30px 6px;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc a {
  display: flex;
  gap: 9px;
  align-items: baseline;
  min-height: 42px;
  padding: 9px 0;
  font-size: 15px;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
  transition: color .12s steps(2);
}

.toc a:hover,
.toc a:focus-visible { color: var(--ink); }

.toc .n {
  font-size: 12px;
  letter-spacing: .08em;
  color: #9d9d95;
  font-variant-numeric: tabular-nums;
}

.totop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 28px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  transform: rotate(.8deg);
}

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

footer {
  grid-area: foot;
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding: 46px 24px 34px 28px;
  border-top: 1px solid var(--ink);
}

.cta {
  border: 1px solid var(--ink);
  border-radius: 28px;
  padding: 34px 28px;
  background: #fff;
  transform: rotate(-.5deg);
  margin-bottom: 38px;
}

.cta h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); }
.cta h2 + hr { width: 92px; height: 2px; background: var(--ink); border: 0; margin: 14px 0 20px; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 28px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
}

.fcols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

address {
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
}

address strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

address .tel {
  display: inline-flex;
  margin-top: 6px;
  transform: none;
  font-size: 15px;
}

.flist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flist a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}

.flist a:hover,
.flist a:focus-visible { color: var(--ink); }

.base {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 14px;
  color: var(--mid);
}

.base p { margin: 0; }

/* ---------- 动效 ---------- */

body.js main article > div {
  opacity: 0;
  transform: translateY(9px);
}

body.js main article > div.in {
  opacity: 1;
  transform: none;
  transition: opacity .22s steps(3), transform .22s steps(3);
}

@keyframes jitter {
  0%, 100% { transform: rotate(-.6deg) translateY(0); }
  50% { transform: rotate(.4deg) translateY(-3px); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-txt { animation: jitter 9s steps(6, end) infinite; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js main article > div { opacity: 1; transform: none; }
  .hero-txt { animation: none; }
  .slot, .cta, .hero-txt, .tel, .totop { transition: none; }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 1080px) {
  body { grid-template-columns: 184px minmax(0, 1fr) 200px; }
  main { padding-left: 22px; }
  .slot { width: 150px; }
}

@media (max-width: 900px) {
  body {
    display: block;
    font-size: 17px;
  }

  .lrail {
    position: static;
    height: auto;
    overflow: visible;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark-link { width: 44px; height: 44px; border-radius: 12px; }
  .mark-txt { font-size: 9px; }

  .nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
  .nav ul { flex-direction: row; gap: 2px; }
  .nav a {
    white-space: nowrap;
    padding: 10px 12px;
    border-bottom: 0;
    border-radius: 22px;
  }
  .nav a:hover,
  .nav a:focus-visible { transform: none; background: #fff; border-bottom: 0; }

  .ct { margin-top: 0; flex: 0 0 auto; }
  .tel { white-space: nowrap; padding: 0 14px; font-size: 15px; }

  main { padding: 0; }

  .hero {
    min-height: 88vh;
    padding: 76px 16px 96px;
  }

  .slot { width: 108px; }
  .slot.s1 { top: 4vh; left: 2%; }
  .slot.s2 { bottom: 5vh; right: 2%; }
  .collage { padding: 5px 5px 16px; }

  .hero-txt { max-width: 22ch; padding: 26px 18px; }
  .hero-txt h1 { font-size: clamp(1.9rem, 8.4vw, 2.9rem); }
  .lede { font-size: 16px; }

  article.body { padding: 40px 20px 56px; max-width: none; }

  .rrail {
    position: static;
    height: auto;
    overflow: visible;
    padding: 34px 20px 10px;
    border-top: 1px solid var(--line);
  }

  .toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px;
  }

  footer { padding: 38px 20px 30px; }
  .fcols { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cta { padding: 26px 20px; }
}

@media (max-width: 420px) {
  .slot { width: 92px; }
  .hero { padding-top: 64px; }
  .toc { grid-template-columns: minmax(0, 1fr); }
}

button[aria-expanded]{min-width:44px;min-height:44px}
