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

:root {
  --ink: #172623;
  --ink-2: #1d312d;
  --sand: #d4c4a8;
  --mint: #5cc6b0;
  --clay: #c67b5c;
  --text: #e8dfd0;
  --dim: #a3b0a6;
  --line: rgba(212, 196, 168, 0.22);
  --line-soft: rgba(212, 196, 168, 0.14);
  --r: 18px;
  --sans: 'Inter', system-ui, -apple-system, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Playfair Display', 'Noto Serif SC', Georgia, 'Songti SC', serif;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 70% at 82% -12%, rgba(92, 198, 176, 0.11), transparent 62%),
    radial-gradient(90% 55% at -6% 104%, rgba(198, 123, 92, 0.12), transparent 58%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--mint); }
img { max-width: 100%; }

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(23, 38, 35, 0.93);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line-soft);
}

.mainnav ol {
  list-style: none;
  margin: 0 auto;
  padding: 6px 20px;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto repeat(3, 1fr);
  align-items: center;
  gap: 4px;
}

.mainnav li:nth-child(-n+3) { justify-self: start; }
.mainnav li:nth-child(n+5) { justify-self: end; }

.mainnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 7px;
  min-height: 42px;
  color: var(--sand);
  font-size: 15.5px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.25s ease;
}

.mainnav a:hover { color: var(--mint); }

.mainnav .ico {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--clay);
  opacity: 0.9;
}

.mainnav li.brand { justify-self: center; }

.mainnav li.brand a {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f3ecdc;
  padding: 10px 12px;
}

.searchline {
  display: flex;
  justify-content: center;
  padding: 0 16px 10px;
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(430px, 100%);
  padding: 4px 5px 4px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(212, 196, 168, 0.06);
}

.site-search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.site-search input:focus { outline: none; }
.site-search input::placeholder { color: var(--dim); }

.site-search button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: #10201d;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}

.site-search button:hover { background: #7ad6c3; }

.shake { animation: shake 0.5s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  max-width: 1180px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 46px 22px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  right: 10px;
  top: 2px;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(7rem, 23vw, 15rem);
  line-height: 0.78;
  color: rgba(92, 198, 176, 0.09);
  pointer-events: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: left;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.05rem, 5.1vw, 3.85rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: #f4edde;
  text-wrap: balance;
}

.hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 28px;
  min-height: 44px;
  border: 1px solid var(--mint);
  border-radius: 999px;
  color: var(--mint);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.hero-cta:hover {
  background: var(--mint);
  color: #10201d;
}

.hero-media {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 4.6;
  border: 1px solid rgba(212, 196, 168, 0.28);
  border-radius: 140px 20px 140px 20px;
  overflow: hidden;
  background:
    linear-gradient(152deg, rgba(198, 123, 92, 0.4), rgba(92, 198, 176, 0.22) 56%, rgba(212, 196, 168, 0.2));
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-decor {
  position: absolute;
  inset: 22% 18%;
  border: 1px solid rgba(244, 237, 222, 0.4);
  border-radius: 50% 50% 46% 54% / 52% 44% 56% 48%;
}

/* ---------- 主体骨架 ---------- */
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 4vw, 46px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 22px 12px;
}

.rail {
  position: sticky;
  top: 132px;
  align-self: start;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(212, 196, 168, 0.055);
}

.rail-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--mint);
  font-size: 12.5px;
  letter-spacing: 0.26em;
}

.rail-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: #f1e9d9;
  line-height: 1.3;
}

.rail-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.rail-list a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
  color: var(--sand);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.rail-list a:hover {
  color: var(--mint);
  padding-left: 5px;
}

.rail-top {
  display: inline-block;
  padding: 8px 0 2px;
  font-size: 14px;
  color: var(--mint);
  text-decoration: none;
}

/* ---------- 正文 ---------- */
.doc { min-width: 0; }

.doc > article {
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(212, 196, 168, 0.045);
  scroll-margin-top: 150px;
  transition: outline-color 0.4s ease;
  outline: 1px solid transparent;
}

.doc > article.flash {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.doc small {
  display: block;
  margin-bottom: 8px;
  color: var(--mint);
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.24em;
}

.doc h2 {
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  font-weight: 500;
  line-height: 1.3;
  color: #f2ebdc;
  text-wrap: balance;
}

.doc h3,
.doc h4 {
  margin: 1.4em 0 0.5em;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  color: #efe6d5;
}

.doc p {
  margin: 0 0 1em;
  line-height: 1.85;
  color: var(--text);
}

.doc p:last-child { margin-bottom: 0; }

.doc a { color: var(--mint); text-underline-offset: 3px; }

.doc strong { color: #f6efe1; font-weight: 600; }

.doc ul,
.doc ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.doc li { margin-bottom: 0.45em; }

.doc blockquote {
  margin: 0 0 1em;
  padding: 14px 20px;
  border-left: 3px solid var(--clay);
  border-radius: 0 14px 14px 0;
  background: rgba(198, 123, 92, 0.1);
  color: #f0e4d5;
}

.doc blockquote p:last-child { margin-bottom: 0; }

.doc img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.doc figure { margin: 0 0 1.2em; }

.doc pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 15px;
}

.doc code { font-size: 0.94em; }

.doc table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}

.doc th,
.doc td {
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  text-align: left;
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 1.6em 0;
}

.doc time {
  display: inline-block;
  color: var(--dim);
  font-size: 14.5px;
}

/* ---------- 滚动缓入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0ms),
    transform 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- 页脚 ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 30px;
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 26px 22px 34px;
  border-top: 1px solid var(--line);
}

.foot-brand a {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5.2vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--sand);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.foot-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: inline-block;
  padding: 11px 0;
  min-height: 40px;
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-nav a:hover { color: var(--mint); }

.foot-copy p {
  margin: 0;
  padding: 10px 0;
  color: var(--dim);
  font-size: 14.5px;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 920px) {
  .mainnav ol {
    display: flex;
    gap: 2px;
    padding: 4px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mainnav ol::-webkit-scrollbar { display: none; }

  .mainnav li { flex: 0 0 auto; }

  .mainnav li.brand { order: -1; }

  .mainnav a { padding: 12px 9px; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 30px 20px 44px;
  }

  .hero-ghost { font-size: clamp(6rem, 34vw, 11rem); right: 4px; }

  .hero-media {
    aspect-ratio: 16 / 11;
    border-radius: 80px 18px 80px 18px;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 24px 18px 10px;
  }

  .doc { grid-row: 1; }

  .rail {
    position: static;
    grid-row: 2;
  }

  .doc > article { scroll-margin-top: 118px; }

  .foot { padding: 22px 18px 30px; }
}

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .hero h1 { font-size: 1.95rem; }
  .mainnav a { font-size: 15px; padding: 12px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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