:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-dark: #1b4332;
  --accent: #52b788;
  --accent-warm: #d4a373;
  --bg: #f7faf8;
  --bg-alt: #eef4f0;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --text: #1a2e22;
  --text-secondary: #4a6355;
  --text-muted: #7a9484;
  --border: #d8e5dd;
  --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 67, 50, 0.09);
  --shadow-lg: 0 16px 48px rgba(27, 67, 50, 0.13);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #52b788;
    --primary-light: #74c69d;
    --primary-dark: #2d6a4f;
    --accent: #95d5b2;
    --accent-warm: #e6b98a;
    --bg: #0f1a14;
    --bg-alt: #16241c;
    --surface: #1b2e22;
    --surface-glass: rgba(27, 46, 34, 0.78);
    --text: #e2efe6;
    --text-secondary: #a8c5b4;
    --text-muted: #6b8a78;
    --border: #2a4434;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  }
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(82, 183, 136, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(45, 106, 79, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(212, 163, 115, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}

header:hover {
  box-shadow: var(--shadow-sm);
}

nav[aria-label="主导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

nav[aria-label="主导航"] > a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition), transform var(--transition);
}

nav[aria-label="主导航"] > a::before {
  content: "🐦";
  font-size: 1.4rem;
  line-height: 1;
}

nav[aria-label="主导航"] > a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

nav[aria-label="主导航"] ul {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
}

nav[aria-label="主导航"] ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

nav[aria-label="主导航"] ul li a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform var(--transition);
}

nav[aria-label="主导航"] ul li a:hover {
  color: var(--primary);
  background: rgba(82, 183, 136, 0.1);
}

nav[aria-label="主导航"] ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ===== MAIN ===== */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ===== HERO ===== */
#hero {
  position: relative;
  margin: 32px 0 48px;
  padding: 72px 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 35%, #40916c 65%, #52b788 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 163, 115, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero h1 {
  position: relative;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 0.8s ease-out both;
}

#hero p {
  position: relative;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.85;
  max-width: 720px;
  opacity: 0.92;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

/* ===== BREADCRUMB ===== */
nav[aria-label="面包屑"] {
  margin-bottom: 40px;
  animation: fadeInUp 0.6s ease-out both;
}

nav[aria-label="面包屑"] ol {
  display: flex;
  list-style: none;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

nav[aria-label="面包屑"] ol li {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav[aria-label="面包屑"] ol li:not(:last-child)::after {
  content: "/";
  color: var(--border);
}

nav[aria-label="面包屑"] ol li a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

nav[aria-label="面包屑"] ol li a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== SECTIONS ===== */
main > section {
  margin-bottom: 56px;
  animation: fadeInUp 0.7s ease-out both;
}

main > section:nth-child(odd) {
  animation-delay: 0.05s;
}

main > section:nth-child(even) {
  animation-delay: 0.1s;
}

main > section > h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 28px;
  padding-bottom: 14px;
  position: relative;
  letter-spacing: -0.01em;
}

main > section > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
}

main > section > h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin: 32px 0 14px;
  letter-spacing: -0.01em;
}

main > section > h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}

main > section > p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.85;
}

/* ===== CARD STYLES FOR SECTIONS ===== */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#howto,
#faq,
#contact,
#team,
#sitemap,
#links {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#howto:hover,
#faq:hover,
#contact:hover,
#team:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ===== NEWS & ARTICLES CARDS ===== */
#news article,
#articles article {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 4px 4px 0;
  transform: scaleY(0);
  transition: transform var(--transition);
}

#news article:hover,
#articles article:hover {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

#news article:hover::before,
#articles article:hover::before {
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
  transition: color var(--transition);
}

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

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

#news article p,
#articles article p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 8px;
  transition: all var(--transition);
}

#articles article a::after {
  content: "→";
  transition: transform var(--transition);
}

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

#articles article a:hover::after {
  transform: translateX(4px);
}

/* ===== BLOCKQUOTE ===== */
blockquote {
  position: relative;
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px 28px 24px 56px;
  margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  transition: all var(--transition);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 12px;
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
  font-family: Georgia, serif;
}

blockquote:hover {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

blockquote p {
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ===== HOWTO LISTS ===== */
#howto ul,
#howto ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

#howto ul li,
#howto ol li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.8;
  padding-left: 6px;
}

#howto ul li::marker {
  color: var(--accent);
  font-size: 1.1em;
}

#howto ol li::marker {
  color: var(--primary);
  font-weight: 600;
}

/* ===== FAQ ===== */
#faq dl {
  display: grid;
  gap: 12px;
}

#faq dt {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 1rem;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  padding-left: 44px;
  border: 1px solid transparent;
  border-bottom: none;
}

#faq dt::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

#faq dt:hover {
  background: rgba(82, 183, 136, 0.12);
  color: var(--primary);
}

#faq dd {
  padding: 16px 20px 20px 44px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.85;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-bottom: 4px;
  position: relative;
}

#faq dd::before {
  content: "A";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ===== CONTACT & TEAM ===== */
#contact p,
#team p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.8;
}

#team ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

#team ul li {
  background: var(--bg-alt);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-left: 3px solid var(--accent);
  transition: all var(--transition);
}

#team ul li:hover {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* ===== SITEMAP & LINKS ===== */
#sitemap ul,
#links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

#sitemap ul li a,
#links ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
}

#sitemap ul li a::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  transition: transform var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

#sitemap ul li a:hover::before {
  transform: translateX(4px);
}

#links ul li a::before {
  content: "🔗";
  font-size: 0.85rem;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--surface) 100%);
  border-top: 1px solid var(--border);
  padding: 56px 24px 32px;
  margin-top: 40px;
}

footer > section {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

footer > section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

footer > section h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

footer > section p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.8;
  max-width: 800px;
}

footer > p {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== SCROLL REVEAL ===== */
@media (prefers-reduced-motion: no-preference) {
  main > section {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out forwards;
  }

  main > section:nth-child(1) { animation-delay: 0.05s; }
  main > section:nth-child(2) { animation-delay: 0.1s; }
  main > section:nth-child(3) { animation-delay: 0.15s; }
  main > section:nth-child(4) { animation-delay: 0.2s; }
  main > section:nth-child(5) { animation-delay: 0.25s; }
  main > section:nth-child(6) { animation-delay: 0.3s; }
  main > section:nth-child(7) { animation-delay: 0.35s; }
  main > section:nth-child(8) { animation-delay: 0.4s; }
  main > section:nth-child(9) { animation-delay: 0.45s; }
  main > section:nth-child(10) { animation-delay: 0.5s; }
  main > section:nth-child(n+11) { animation-delay: 0.55s; }
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
  nav[aria-label="主导航"] {
    padding: 0 20px;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  main {
    padding: 0 20px 64px;
  }

  #hero {
    padding: 56px 36px;
    margin: 24px 0 40px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #howto,
  #faq,
  #contact,
  #team,
  #sitemap,
  #links {
    padding: 32px 28px;
  }
}

/* Mobile Large */
@media (max-width: 768px) {
  nav[aria-label="主导航"] {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  nav[aria-label="主导航"] > a {
    font-size: 1.15rem;
  }

  nav[aria-label="主导航"] ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  main {
    padding: 0 16px 48px;
  }

  #hero {
    padding: 40px 24px;
    margin: 16px 0 32px;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    font-size: 1.5rem;
  }

  #hero p {
    font-size: 0.92rem;
  }

  main > section {
    margin-bottom: 40px;
  }

  main > section > h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
  }

  main > section > h3 {
    font-size: 1.1rem;
    margin: 24px 0 10px;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #howto,
  #faq,
  #contact,
  #team,
  #sitemap,
  #links {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  #news article,
  #articles article {
    padding: 18px 20px;
  }

  blockquote {
    padding: 18px 20px 18px 44px;
  }

  blockquote::before {
    left: 12px;
    top: 8px;
    font-size: 2.2rem;
  }

  #faq dt {
    padding: 14px 16px 14px 40px;
    font-size: 0.95rem;
  }

  #faq dd {
    padding: 14px 16px 18px 40px;
    font-size: 0.9rem;
  }

  #team ul {
    grid-template-columns: 1fr;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  footer {
    padding: 40px 16px 24px;
  }

  footer > section h2 {
    font-size: 0.95rem;
  }

  footer > section p {
    font-size: 0.82rem;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  nav[aria-label="主导航"] {
    padding: 10px 12px;
  }

  nav[aria-label="主导航"] > a {
    font-size: 1.05rem;
  }

  nav[aria-label="主导航"] > a::before {
    font-size: 1.2rem;
  }

  nav[aria-label="主导航"] ul li a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  main {
    padding: 0 12px 40px;
  }

  #hero {
    padding: 32px 20px;
    margin: 12px 0 24px;
    border-radius: var(--radius);
  }

  #hero h1 {
    font-size: 1.3rem;
    line-height: 1.35;
  }

  #hero p {
    font-size: 0.88rem;
    line-height: 1.75;
  }

  main > section > h2 {
    font-size: 1.15rem;
  }

  main > section > h3 {
    font-size: 1rem;
  }

  main > section > h4 {
    font-size: 0.95rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #howto,
  #faq,
  #contact,
  #team,
  #sitemap,
  #links {
    padding: 20px 16px;
    border-radius: var(--radius-sm);
  }

  #news article,
  #articles article {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  #news article h3,
  #articles article h3 {
    font-size: 1rem;
  }

  blockquote {
    padding: 16px 16px 16px 40px;
    border-radius: var(--radius-sm);
  }

  #faq dt {
    padding: 12px 14px 12px 36px;
    font-size: 0.9rem;
  }

  #faq dt::before {
    left: 12px;
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
  }

  #faq dd {
    padding: 12px 14px 16px 36px;
    font-size: 0.85rem;
  }

  #faq dd::before {
    left: 12px;
    top: 14px;
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 32px 12px 20px;
  }

  footer > section {
    margin-bottom: 20px;
    padding-bottom: 18px;
  }
}

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

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

/* ===== PRINT ===== */
@media print {
  header,
  footer,
  nav[aria-label="面包屑"] {
    display: none;
  }

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

  #hero {
    background: none;
    color: #000;
    box-shadow: none;
    padding: 0;
    margin-bottom: 24px;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}