:root {
  --primary: #1a3a5c;
  --primary-light: #2a5a8c;
  --primary-dark: #0f2540;
  --accent: #e8b84b;
  --accent-light: #f0cc6e;
  --accent-dark: #c99a2e;
  --bg: #f5f7fa;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #8896a8;
  --border: rgba(26, 58, 92, 0.12);
  --border-light: rgba(26, 58, 92, 0.06);
  --shadow-sm: 0 2px 8px rgba(26, 58, 92, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 58, 92, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 58, 92, 0.14);
  --shadow-glow: 0 0 32px rgba(232, 184, 75, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --max-width: 1200px;
  --header-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #6ea8d8;
    --primary-light: #8ec0e8;
    --primary-dark: #4a8ab8;
    --accent: #e8b84b;
    --accent-light: #f0cc6e;
    --accent-dark: #c99a2e;
    --bg: #0d1520;
    --bg-alt: #131e2e;
    --bg-card: rgba(19, 30, 46, 0.78);
    --bg-glass: rgba(19, 30, 46, 0.6);
    --text: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;
    --border: rgba(110, 168, 216, 0.15);
    --border-light: rgba(110, 168, 216, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 32px rgba(232, 184, 75, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(26, 58, 92, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(232, 184, 75, 0.06), transparent 60%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(ellipse 80% 60% at 10% 0%, rgba(110, 168, 216, 0.06), transparent 60%),
      radial-gradient(ellipse 60% 50% at 90% 100%, rgba(232, 184, 75, 0.04), transparent 60%);
  }
}

::selection {
  background: var(--accent);
  color: var(--primary-dark);
}

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

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.25rem;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  position: relative;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-bottom: 0.75rem;
  color: var(--primary);
}

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

strong {
  color: var(--text);
  font-weight: 600;
}

/* ========== HEADER ========== */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

header[role="banner"]:hover {
  box-shadow: var(--shadow-sm);
}

header[role="banner"] nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header[role="banner"] nav > a {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

header[role="banner"] nav > a:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

header[role="banner"] nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

header[role="banner"] nav ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

header[role="banner"] nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform var(--transition);
  transform-origin: center;
}

header[role="banner"] nav ul li a:hover {
  color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}

header[role="banner"] nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ========== MAIN ========== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

article {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ========== SECTIONS ========== */
section {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}

section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-2px);
}

section:hover::before {
  opacity: 1;
}

section#intro {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-glass) 100%);
}

section#intro::before {
  opacity: 1;
  height: 4px;
}

section#contact {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232, 184, 75, 0.06) 100%);
}

section#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 24px;
  margin: 16px 0;
}

section#contact ul li {
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-light);
}

section#contact ul li:last-child {
  border-bottom: none;
}

/* ========== NEWS ARTICLES ========== */
section#news article {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

section#news article::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  opacity: 0;
  transition: opacity var(--transition);
}

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

section#news article:hover::before {
  opacity: 1;
}

section#news article h3 {
  margin-bottom: 4px;
  font-size: 1.15rem;
  transition: color var(--transition-fast);
}

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

section#news article time {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

section#news article p {
  font-size: 0.925rem;
  margin-bottom: 6px;
}

section#news article p a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(26, 58, 92, 0.06);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  width: fit-content;
}

section#news article p a::after {
  content: '→';
  transition: transform var(--transition-fast);
}

section#news article p a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.25);
}

section#news article p a:hover::after {
  transform: translateX(3px);
}

/* ========== FAQ ========== */
section#faq h3 {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 16px 20px;
  margin-bottom: 0;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 10px;
}

section#faq h3::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

section#faq h3:hover {
  background: var(--bg-glass);
  color: var(--accent);
}

section#faq h3 + p {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 16px 20px 20px 56px;
  margin-bottom: 12px;
  font-size: 0.925rem;
  position: relative;
}

section#faq h3 + p::before {
  content: 'A';
  position: absolute;
  left: 20px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

/* ========== HOWTO ========== */
section#howto ol {
  counter-reset: howto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

section#howto ol li {
  counter-increment: howto;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px 16px 56px;
  position: relative;
  font-size: 0.925rem;
  color: var(--text-secondary);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

section#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

section#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

/* ========== CASES ========== */
section#cases ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

section#cases ul li {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 44px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  font-style: italic;
}

section#cases ul li::before {
  content: '“';
  position: absolute;
  left: 16px;
  top: 10px;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
  font-family: Georgia, serif;
  opacity: 0.7;
}

section#cases ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

/* ========== SITEMAP & LINKS ========== */
section#sitemap ul,
section#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

section#sitemap ul li a,
section#links ul li a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 100px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

section#sitemap ul li a:hover,
section#links ul li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.25);
}

/* ========== LEGAL ========== */
section#legal h2 {
  margin-top: 24px;
}

section#legal h2:first-child {
  margin-top: 0;
}

section#legal p {
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ========== EEAT ========== */
section#eeat {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(26, 58, 92, 0.04) 100%);
}

section#eeat h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

section#eeat h3::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  flex-shrink: 0;
}

/* ========== FOOTER ========== */
footer[role="contentinfo"] {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 24px 32px;
  margin-top: 48px;
  position: relative;
  overflow: hidden;
}

footer[role="contentinfo"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
}

footer[role="contentinfo"] > p {
  max-width: var(--max-width);
  margin: 0 auto 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.6;
}

footer[role="contentinfo"] nav {
  max-width: var(--max-width);
  margin: 24px auto 0;
}

footer[role="contentinfo"] nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

footer[role="contentinfo"] nav ul li a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
}

footer[role="contentinfo"] nav ul li a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* ========== SCROLL ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  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 scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

section {
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

section#news article {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

section#news article:nth-child(1) { animation-delay: 0.05s; }
section#news article:nth-child(2) { animation-delay: 0.1s; }
section#news article:nth-child(3) { animation-delay: 0.15s; }
section#news article:nth-child(4) { animation-delay: 0.2s; }
section#news article:nth-child(5) { animation-delay: 0.25s; }
section#news article:nth-child(6) { animation-delay: 0.3s; }
section#news article:nth-child(7) { animation-delay: 0.35s; }
section#news article:nth-child(8) { animation-delay: 0.4s; }
section#news article:nth-child(9) { animation-delay: 0.45s; }
section#news article:nth-child(10) { animation-delay: 0.5s; }

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

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-light), var(--accent));
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  header[role="banner"] nav ul li a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  section {
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  header[role="banner"] nav {
    padding: 0 16px;
    gap: 8px;
  }

  header[role="banner"] nav > a {
    font-size: 1rem;
  }

  header[role="banner"] nav ul {
    gap: 2px;
  }

  header[role="banner"] nav ul li a {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  main {
    padding: 20px 16px 48px;
  }

  article {
    gap: 28px;
  }

  section {
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }

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

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

  section#news article {
    padding: 18px;
  }

  section#faq h3 {
    padding: 14px 16px;
    font-size: 0.925rem;
  }

  section#faq h3 + p {
    padding: 14px 16px 16px 48px;
  }

  section#howto ol li {
    padding: 14px 16px 14px 48px;
  }

  footer[role="contentinfo"] {
    padding: 36px 16px 24px;
  }

  footer[role="contentinfo"] nav ul {
    gap: 6px 16px;
  }
}

@media (max-width: 480px) {
  header[role="banner"] nav ul li a {
    padding: 4px 6px;
    font-size: 0.7rem;
  }

  header[role="banner"] nav > a {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  section {
    padding: 20px 14px;
  }

  section#sitemap ul li a,
  section#links ul li a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* ========== REDUCED MOTION ========== */
@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;
  }
}

/* ========== PRINT ========== */
@media print {
  header[role="banner"],
  footer[role="contentinfo"] {
    display: none;
  }

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

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

  a {
    color: #000;
    text-decoration: underline;
  }
}