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

:root {
  --ink: #172623;
  --acc: #5cc6b0;
  --sand: #d4c4a8;
  --clay: #c07a58;
  --paper: #f5eee2;
  --paper2: #efe4d3;
  --line: rgba(23, 38, 35, 0.22);
  --line-soft: rgba(23, 38, 35, 0.12);
  --foot-ink: #0f1c1a;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding-bottom: 68px;
  font-family: 'Rubik', 'Nunito Sans', -apple-system, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(212, 196, 168, 0.55), transparent 58%),
    radial-gradient(circle at 88% 72%, rgba(92, 198, 176, 0.16), transparent 62%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper2) 100%);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: radial-gradient(var(--ink) 1px, transparent 1px);
  background-size: 4px 4px;
}

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

a {
  color: inherit;
}

h1, h2, h3, h4 {
  font-family: 'Rubik', 'Nunito Sans', 'PingFang SC', system-ui, sans-serif;
  line-height: 1.25;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

/* ---------- 底部固定条 ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(245, 238, 226, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 2px solid var(--acc);
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

.burger-ico {
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

/* ---------- 全屏菜单 ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  overflow-y: auto;
  padding: 4.5rem 1.5rem 7rem;
  color: var(--paper);
  background:
    radial-gradient(circle at 80% 12%, rgba(92, 198, 176, 0.22), transparent 55%),
    var(--foot-ink);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .menu {
  transform: translateY(0);
}

.menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 34rem;
}

.menu-nav li + li {
  border-top: 1px solid rgba(212, 196, 168, 0.22);
}

.menu-nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0.55rem 0;
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 500;
  color: var(--sand);
  text-decoration: none;
  transition: color 0.3s ease-out, padding-left 0.3s ease-out;
}

.menu-nav a:hover,
.menu-nav a:focus-visible {
  color: var(--acc);
  padding-left: 0.6rem;
}

/* ---------- 骨架 ---------- */
.shell {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.15rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 2.5rem;
  align-items: start;
}

main {
  min-width: 0;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  padding: 6rem 0 5rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(192, 122, 88, 0.35), rgba(212, 196, 168, 0.5) 55%, rgba(92, 198, 176, 0.28));
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transform: scale(1.06);
}

.hero-copy {
  position: relative;
  text-align: right;
  z-index: 2;
}

.hero-copy h1 {
  font-size: clamp(1.85rem, 4.6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}

.hero-desc {
  margin-left: auto;
  max-width: 34ch;
  font-size: 1rem;
  color: rgba(23, 38, 35, 0.78);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.9rem;
  padding: 0 1.3rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: rgba(92, 198, 176, 0.35);
  transition: background 0.3s ease-out, color 0.3s ease-out;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: var(--ink);
  color: var(--acc);
}

.hero-ghost {
  position: absolute;
  left: 0;
  bottom: -1.5rem;
  margin: 0;
  z-index: 0;
  white-space: nowrap;
  font-size: clamp(2.6rem, 11.5vw, 9rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: rgba(23, 38, 35, 0.08);
  pointer-events: none;
}

/* ---------- 正文 ---------- */
.article-body {
  counter-reset: sec;
}

.article-body > div {
  position: relative;
  counter-increment: sec;
  padding: 2.6rem 0 2.2rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 28px;
}

.article-body > div::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 2.1rem;
  right: 0;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(192, 122, 88, 0.55);
}

.article-body h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.95rem);
  font-weight: 600;
  padding-right: 3.2rem;
}

.article-body h2 span,
.article-body h3 span {
  display: inline-block;
  border-bottom: 3px solid var(--acc);
  padding-bottom: 0.1em;
}

.article-body h3 {
  margin-top: 1.8em;
  font-size: 1.12rem;
  font-weight: 600;
  color: #1d4f46;
}

.article-body p {
  max-width: 68ch;
}

.article-body ul,
.article-body ol {
  max-width: 68ch;
  padding-left: 1.25rem;
  margin: 0 0 1.2em;
}

.article-body li {
  margin: 0.45em 0;
}

.article-body li::marker {
  color: var(--clay);
}

.article-body a {
  color: #14655a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: var(--clay);
}

.article-body strong {
  font-weight: 600;
  background: linear-gradient(transparent 62%, rgba(92, 198, 176, 0.45) 62%);
}

.article-body blockquote {
  margin: 1.4em 0;
  padding: 0.2em 0 0.2em 1rem;
  border-left: 4px solid var(--acc);
  color: rgba(23, 38, 35, 0.85);
}

.article-body > div > *:last-child {
  margin-bottom: 0;
}

.article-body figure {
  margin: 1.4em 0;
}

.article-body figcaption {
  font-size: 0.86rem;
  color: rgba(23, 38, 35, 0.6);
  margin-top: 0.4rem;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 1.6rem;
  margin-top: 6rem;
  padding: 1.1rem 1rem 1.3rem;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.72);
}

.side h2,
.foot h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-bottom: 0.9rem;
  color: var(--ink);
}

.side h2 span,
.foot h2 span {
  display: inline-block;
  border-bottom: 2px solid var(--acc);
  padding-bottom: 0.25em;
}

.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav li + li {
  border-top: 1px dashed var(--line-soft);
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0;
  font-size: 0.94rem;
  text-decoration: none;
  color: rgba(23, 38, 35, 0.82);
  transition: color 0.25s ease-out, padding-left 0.25s ease-out;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  color: #14655a;
  padding-left: 0.35rem;
}

/* ---------- 页脚 ---------- */
.foot {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
  padding: 2.6rem 1.15rem 2rem;
  color: var(--sand);
  background: var(--foot-ink);
  border-top: 3px solid var(--acc);
}

.foot-cols {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 2rem;
}

.foot h2 {
  color: var(--sand);
}

.foot address {
  font-style: normal;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.6;
}

.sub {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sub input {
  flex: 1 1 8rem;
  min-height: 44px;
  padding: 0 0.7rem;
  font: inherit;
  font-size: 0.94rem;
  color: var(--paper);
  background: rgba(245, 238, 226, 0.08);
  border: 1px solid rgba(212, 196, 168, 0.45);
  border-radius: 0;
}

.sub input::placeholder {
  color: rgba(212, 196, 168, 0.7);
}

.sub button {
  min-height: 44px;
  padding: 0 1.1rem;
  font: inherit;
  font-size: 0.94rem;
  color: var(--foot-ink);
  background: var(--acc);
  border: 1px solid var(--acc);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.3s ease-out;
}

.sub button:hover {
  background: var(--sand);
  border-color: var(--sand);
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.2rem;
}

.foot-links li {
  break-inside: avoid;
}

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.94rem;
  color: rgba(212, 196, 168, 0.9);
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: var(--acc);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-base {
  max-width: 1140px;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 196, 168, 0.25);
  text-align: center;
}

.foot-base p {
  margin: 0.15rem 0;
  font-size: 0.86rem;
  color: rgba(212, 196, 168, 0.75);
}

.copy {
  letter-spacing: 0.06em;
  color: var(--paper) !important;
}

/* ---------- 动效 ---------- */
.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.js [data-stagger] > *:nth-child(2) { transition-delay: 0.05s; }
.js [data-stagger] > *:nth-child(3) { transition-delay: 0.1s; }
.js [data-stagger] > *:nth-child(4) { transition-delay: 0.15s; }
.js [data-stagger] > *:nth-child(5) { transition-delay: 0.2s; }
.js [data-stagger] > *:nth-child(6) { transition-delay: 0.25s; }
.js [data-stagger] > *:nth-child(7) { transition-delay: 0.3s; }

.js [data-stagger].is-in > * {
  opacity: 1;
  transform: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .side {
    position: static;
    margin-top: 0;
    order: 2;
  }

  .foot-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 0;
    padding: 4.6rem 0 3.4rem;
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .hero-media {
    aspect-ratio: 16 / 10;
    max-height: 42vh;
  }

  .hero-copy {
    text-align: right;
  }

  .hero-ghost {
    bottom: -0.6rem;
    font-size: 2.6rem;
    opacity: 0.75;
  }

  .article-body > div::before {
    font-size: 1.3rem;
    top: 1.9rem;
  }

  .article-body h2 {
    padding-right: 2.4rem;
  }
}

@media (max-width: 560px) {
  .foot-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .foot-links {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .menu,
  .hero-cta,
  .menu-nav a,
  .side-nav a,
  .sub button {
    transition: none;
  }

  .hero-img {
    transform: none;
  }

  .js [data-stagger] > * {
    opacity: 1;
    transform: none;
  }
}

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