:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0f2438;
  --accent: #5ec8a0;
  --accent-light: #7ddcb8;
  --accent-dark: #3da87f;
  --bg: #f5f8fb;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --text: #1c2b3a;
  --text-secondary: #4a5b6e;
  --text-muted: #7a8a9c;
  --border: rgba(26, 58, 92, 0.1);
  --shadow-sm: 0 2px 8px rgba(26, 58, 92, 0.06);
  --shadow-md: 0 6px 24px rgba(26, 58, 92, 0.1);
  --shadow-lg: 0 12px 40px rgba(26, 58, 92, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #5ec8a0;
    --primary-light: #7ddcb8;
    --primary-dark: #3da87f;
    --accent: #5ec8a0;
    --accent-light: #7ddcb8;
    --accent-dark: #3da87f;
    --bg: #0d1520;
    --bg-card: #16212e;
    --bg-glass: rgba(22, 33, 46, 0.78);
    --text: #e6edf3;
    --text-secondary: #a8b8c8;
    --text-muted: #6a7a8c;
    --border: rgba(94, 200, 160, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  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;
}

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

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

h1,
h2,
h3 {
  line-height: 1.35;
  font-weight: 700;
  color: var(--text);
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-logo {
  border-radius: 10px;
  transition: transform var(--transition);
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.06);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.main-nav a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition),
    transform var(--transition);
}

.main-nav a:hover {
  color: var(--accent-dark);
  background: rgba(94, 200, 160, 0.12);
  transform: translateY(-1px);
}

/* ============ MAIN LAYOUT ============ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main > section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

main > section:last-child {
  border-bottom: none;
}

main > section > h2 {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
}

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

main > section > h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--primary-light);
}

/* ============ HERO ============ */
#hero {
  position: relative;
  margin: 1.5rem 0 0;
  padding: 3.5rem 2.5rem !important;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    #1a3a5c 0%,
    #2a5a8c 45%,
    #3da87f 100%
  );
  background-size: 200% 200%;
  animation: heroGradient 12s ease infinite;
  overflow: hidden;
  border-bottom: none !important;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(94, 200, 160, 0.35),
    transparent 70%
  );
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.12),
    transparent 70%
  );
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.25rem;
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  max-width: 820px;
  margin-bottom: 0;
}

@keyframes heroGradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ============ ANCHOR NAV ============ */
#anchor-nav {
  position: sticky;
  top: 60px;
  z-index: 900;
  margin: 1.5rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--border) !important;
}

#anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

#anchor-nav a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all var(--transition);
}

#anchor-nav a:hover {
  color: var(--accent-dark);
  background: rgba(94, 200, 160, 0.12);
  border-color: rgba(94, 200, 160, 0.35);
  transform: translateY(-2px);
}

/* ============ CARDS (sections content) ============ */
#brand,
#history,
#culture,
#products,
#advantages,
#solutions,
#applications,
#cases,
#reviews,
#news,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links {
  padding: 2.5rem 2rem !important;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  transition: box-shadow var(--transition), transform var(--transition);
}

#brand:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#faq:hover,
#contact:hover {
  box-shadow: var(--shadow-lg);
}

/* ============ ARTICLES ============ */
#articles {
  padding: 2.5rem 2rem !important;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
}

#articles article {
  position: relative;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    rgba(94, 200, 160, 0.06),
    rgba(26, 58, 92, 0.04)
  );
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  overflow: hidden;
}

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

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(94, 200, 160, 0.35);
}

#articles article:hover::before {
  opacity: 1;
}

#articles article h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1.15rem;
}

#articles article p {
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

#articles article p:first-of-type {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-dark);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(94, 200, 160, 0.12);
  transition: all var(--transition);
}

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

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

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

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  padding: 0.9rem 1.1rem 0.9rem 2.6rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(94, 200, 160, 0.07);
  font-size: 1.02rem;
  transition: background var(--transition);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  border-radius: 50%;
}

#faq h3 + p {
  padding: 0 0.5rem 0.5rem 2.6rem;
  font-size: 0.93rem;
}

#faq h3:hover {
  background: rgba(94, 200, 160, 0.14);
}

/* ============ HOWTO ============ */
#howto h3 {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(94, 200, 160, 0.15),
    rgba(26, 58, 92, 0.08)
  );
  color: var(--accent-dark);
  font-size: 1rem;
}

/* ============ CONTACT ============ */
#contact p {
  font-size: 0.95rem;
}

#contact h3 {
  color: var(--primary-light);
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap li,
#links li {
  flex: 0 0 auto;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(26, 58, 92, 0.05);
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============ FOOTER ============ */
#site-footer {
  margin-top: 2rem;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, var(--primary-dark), #081420);
  color: rgba(230, 237, 243, 0.85);
}

#site-footer > section {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--transition), border-color var(--transition);
}

#site-footer > section:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(94, 200, 160, 0.3);
}

#site-footer h2 {
  font-size: 1.1rem;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1rem;
}

#site-footer h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 1.1em;
  border-radius: 2px;
  background: var(--accent);
}

#site-footer p {
  color: rgba(230, 237, 243, 0.78);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.footer-copy {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(230, 237, 243, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

main > section,
#site-footer > section {
  animation: fadeUp 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

#hero {
  animation: heroGradient 12s ease infinite, fadeIn 0.9s ease both;
}

#anchor-nav {
  animation: fadeIn 1s ease both;
}

/* stagger sections via nth-child */
main > section:nth-of-type(1) {
  animation-delay: 0.05s;
}
main > section:nth-of-type(2) {
  animation-delay: 0.1s;
}
main > section:nth-of-type(3) {
  animation-delay: 0.15s;
}
main > section:nth-of-type(4) {
  animation-delay: 0.2s;
}
main > section:nth-of-type(5) {
  animation-delay: 0.25s;
}
main > section:nth-of-type(6) {
  animation-delay: 0.3s;
}
main > section:nth-of-type(7) {
  animation-delay: 0.35s;
}
main > section:nth-of-type(8) {
  animation-delay: 0.4s;
}
main > section:nth-of-type(9) {
  animation-delay: 0.45s;
}
main > section:nth-of-type(10) {
  animation-delay: 0.5s;
}
main > section:nth-of-type(11) {
  animation-delay: 0.55s;
}
main > section:nth-of-type(12) {
  animation-delay: 0.6s;
}
main > section:nth-of-type(13) {
  animation-delay: 0.65s;
}
main > section:nth-of-type(14) {
  animation-delay: 0.7s;
}
main > section:nth-of-type(15) {
  animation-delay: 0.75s;
}
main > section:nth-of-type(16) {
  animation-delay: 0.8s;
}
main > section:nth-of-type(17) {
  animation-delay: 0.85s;
}
main > section:nth-of-type(18) {
  animation-delay: 0.9s;
}

@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;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .main-nav a {
    white-space: nowrap;
  }

  #anchor-nav {
    top: auto;
    position: static;
  }
}

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

  main {
    padding: 0 1rem;
  }

  #hero {
    padding: 2.5rem 1.5rem !important;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
  }

  #brand,
  #history,
  #culture,
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases,
  #reviews,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 1.75rem 1.25rem !important;
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
  }

  #articles article {
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  }

  #faq h3 {
    padding: 0.8rem 0.9rem 0.8rem 2.4rem;
    font-size: 0.95rem;
  }

  #faq h3 + p {
    padding-left: 2.4rem;
  }

  #site-footer {
    padding: 2rem 1rem 1.5rem;
  }

  #site-footer > section {
    padding: 1.25rem 1.25rem;
  }

  .header-inner {
    padding: 0.65rem 1rem;
  }

  .brand-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.45rem;
  }

  #hero {
    padding: 2rem 1.15rem !important;
  }

  #anchor-nav ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  #anchor-nav ul::-webkit-scrollbar {
    display: none;
  }

  #anchor-nav a {
    white-space: nowrap;
  }

  #sitemap a,
  #links a {
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
  }

  .footer-copy {
    font-size: 0.78rem;
  }
}

/* ============ FOCUS & ACCESSIBILITY ============ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(94, 200, 160, 0.35);
  color: var(--text);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(26, 58, 92, 0.25);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 200, 160, 0.5);
  background-clip: padding-box;
}

@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-thumb {
    background: rgba(94, 200, 160, 0.25);
    background-clip: padding-box;
  }
}
</style>