:root {
  --primary: #2d5016;
  --primary-light: #4a7c2a;
  --primary-dark: #1a3009;
  --accent: #c9a227;
  --accent-light: #e0bd4a;
  --bg: #faf8f3;
  --bg-alt: #f4efe6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #2b2b26;
  --text-muted: #6b6b60;
  --border: rgba(45, 80, 22, 0.14);
  --shadow-sm: 0 2px 8px rgba(26, 48, 9, 0.06);
  --shadow-md: 0 8px 28px rgba(26, 48, 9, 0.10);
  --shadow-lg: 0 18px 48px rgba(26, 48, 9, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --blur: saturate(160%) blur(16px);
  --transition: 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  --maxw: 1180px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #8fbf6a;
    --primary-light: #a8d488;
    --primary-dark: #6a9a48;
    --accent: #e0bd4a;
    --accent-light: #f0d478;
    --bg: #12140f;
    --bg-alt: #1a1d16;
    --surface: rgba(38, 42, 32, 0.68);
    --surface-solid: #22261d;
    --text: #e8e6dd;
    --text-muted: #a2a396;
    --border: rgba(143, 191, 106, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(201, 162, 39, 0.10), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(45, 80, 22, 0.10), transparent 46%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.3;
  color: var(--text);
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  margin: 0 0 1em;
  color: var(--text);
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.4em;
}

li::marker {
  color: var(--accent);
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header > a[href="#top"] {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary-light);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(45, 80, 22, 0.10), rgba(201, 162, 39, 0.12));
  transition: transform var(--transition), box-shadow var(--transition);
}

header > a[href="#top"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

header nav a:hover {
  color: var(--primary-light);
  background: rgba(45, 80, 22, 0.10);
  transform: translateY(-1px);
}

/* ---------- Main layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

section {
  position: relative;
  margin: 0 0 clamp(1.6rem, 4vw, 3rem);
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-timeline: view();
  animation-range: entry 0% entry 28%;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports not (animation-timeline: view()) {
  section {
    animation: rise 0.7s ease both;
  }
}

section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.35), transparent 40%, rgba(45, 80, 22, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

/* ---------- Hero ---------- */
#hero {
  padding: clamp(2rem, 5vw, 3.6rem);
  background:
    linear-gradient(135deg, rgba(45, 80, 22, 0.92), rgba(26, 48, 9, 0.88) 45%, rgba(201, 162, 39, 0.55)),
    var(--primary-dark);
  color: #f4efe6;
  overflow: hidden;
}

#hero::before {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.6), transparent 55%, rgba(255, 255, 255, 0.18));
  opacity: 0.9;
}

#hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.45), transparent 68%);
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 22px) scale(1.08); }
}

#hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 1;
}

#hero p {
  color: rgba(244, 239, 230, 0.92);
  max-width: 76ch;
  position: relative;
  z-index: 1;
}

#hero figure {
  margin: 1.8rem 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  transition: transform var(--transition), box-shadow var(--transition);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

#hero figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  text-align: center;
  color: rgba(244, 239, 230, 0.85);
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#hero svg {
  width: 100%;
  height: auto;
}

/* ---------- Anchor nav ---------- */
nav[aria-label="站内锚点导航"] {
  padding: clamp(1rem, 2.5vw, 1.6rem);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: clamp(1.6rem, 4vw, 3rem);
}

nav[aria-label="站内锚点导航"] h2 {
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

nav[aria-label="站内锚点导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav[aria-label="站内锚点导航"] li {
  margin: 0;
}

nav[aria-label="站内锚点导航"] a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.88rem;
  color: var(--primary-light);
  background: rgba(45, 80, 22, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

nav[aria-label="站内锚点导航"] a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Articles & news cards ---------- */
#articles,
#news {
  display: grid;
  gap: 1rem;
}

#articles > h2,
#news > h2 {
  grid-column: 1 / -1;
}

#articles article,
#news article {
  padding: 1.3rem 1.4rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#articles article:hover,
#news article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 162, 39, 0.45);
}

#articles article h3,
#news article h3 {
  margin-bottom: 0.4rem;
  color: var(--primary-light);
  transition: color var(--transition);
}

#articles article:hover h3,
#news article:hover h3 {
  color: var(--accent);
}

#articles article p:first-of-type,
#news article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

#articles article a {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-light);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

#articles article a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Blockquotes / testimonials ---------- */
blockquote {
  margin: 0 0 1.1rem;
  padding: 1.1rem 1.3rem 1.1rem 1.5rem;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.10), rgba(45, 80, 22, 0.06));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

blockquote:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

blockquote p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text);
}

/* ---------- FAQ details ---------- */
#faq details {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.7rem;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

#faq details:hover {
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 80, 22, 0.35);
}

#faq summary {
  cursor: pointer;
  padding: 0.95rem 1.2rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 2.6rem;
  transition: color var(--transition), background var(--transition);
  user-select: none;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform var(--transition);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover {
  color: var(--primary-light);
  background: rgba(45, 80, 22, 0.05);
}

#faq details p {
  margin: 0;
  padding: 0 1.2rem 1.1rem;
  color: var(--text-muted);
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Contact address ---------- */
address {
  font-style: normal;
  display: grid;
  gap: 0.55rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, rgba(45, 80, 22, 0.06), rgba(201, 162, 39, 0.08));
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

address p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

address a {
  font-weight: 600;
  color: var(--primary-light);
  border-bottom: 1px dashed rgba(45, 80, 22, 0.35);
}

address a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 2rem;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  background:
    linear-gradient(160deg, rgba(26, 48, 9, 0.96), rgba(45, 80, 22, 0.94)),
    var(--primary-dark);
  color: rgba(244, 239, 230, 0.85);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem clamp(1rem, 3vw, 2.5rem);
  border-top: 3px solid var(--accent);
}

footer section {
  margin: 0;
  padding: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

footer section::before {
  display: none;
}

footer h2 {
  font-size: 1rem;
  color: var(--accent-light);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

footer p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(244, 239, 230, 0.75);
  line-height: 1.7;
}

footer > p:last-child {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid rgba(244, 239, 230, 0.15);
  font-size: 0.82rem;
  color: rgba(244, 239, 230, 0.6);
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  #articles,
  #news {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #articles {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 719px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
  }

  header nav {
    width: 100%;
  }

  header nav ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.85rem;
  }

  html {
    scroll-padding-top: 130px;
  }

  section {
    border-radius: var(--radius);
    padding: 1.2rem 1.1rem;
  }

  #hero {
    padding: 1.6rem 1.1rem;
  }

  #hero::after {
    width: 220px;
    height: 220px;
  }

  blockquote:hover {
    transform: none;
  }

  #articles article:hover,
  #news article:hover {
    transform: translateY(-3px);
  }
}

@media (max-width: 400px) {
  body {
    font-size: 15px;
  }

  header nav a {
    padding: 0.3rem 0.55rem;
  }
}

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

/* ---------- Print ---------- */
@media print {
  header,
  footer,
  nav[aria-label="站内锚点导航"] {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}