:root {
  --brand: #c94f6d;
  --brand-dark: #a83a55;
  --brand-light: #e88aa0;
  --brand-soft: #fdf1f4;
  --accent: #6d8ac9;
  --accent-soft: #eef2fb;
  --text: #2a2226;
  --text-secondary: #5c5057;
  --text-muted: #8a7d84;
  --bg: #fffafb;
  --bg-alt: #fdf1f4;
  --bg-card: #ffffff;
  --border: #f0dde3;
  --border-strong: #e3c6cf;
  --shadow-sm: 0 2px 8px rgba(169, 58, 85, 0.06);
  --shadow-md: 0 8px 24px rgba(169, 58, 85, 0.10);
  --shadow-lg: 0 16px 48px rgba(169, 58, 85, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --header-h: 68px;
  --max-w: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #e8738f;
    --brand-dark: #c94f6d;
    --brand-light: #f0a3b6;
    --brand-soft: #2a1b21;
    --accent: #8aa3e0;
    --accent-soft: #1c2233;
    --text: #f2e9ec;
    --text-secondary: #c9bcc2;
    --text-muted: #9a8c93;
    --bg: #171114;
    --bg-alt: #1e161a;
    --bg-card: #221a1e;
    --border: #382a30;
    --border-strong: #4a3740;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
    --glass-bg: rgba(34, 26, 30, 0.62);
    --glass-border: rgba(255, 255, 255, 0.08);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(201, 79, 109, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(109, 138, 201, 0.08), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--brand-dark);
}

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

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

h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 0.7em; }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); margin: 1.6em 0 0.5em; }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

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

blockquote {
  margin: 1em 0;
  padding: 1em 1.2em;
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: normal;
}

blockquote p { margin: 0; }

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
}

.logo svg {
  transition: transform 0.4s var(--ease);
}

.logo:hover svg {
  transform: rotate(-12deg) scale(1.06);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#site-header nav {
  margin-left: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-list li { margin: 0; }

.nav-list a {
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}

.menu-toggle:hover { background: var(--border); }
.menu-toggle:active { transform: scale(0.96); }

/* ============ Main layout ============ */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > section {
  margin: 0 0 32px;
  padding: clamp(20px, 4vw, 44px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
}

main > section > h2 {
  position: relative;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

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

/* ============ Hero ============ */
#hero {
  position: relative;
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  padding: clamp(28px, 5vw, 60px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(201, 79, 109, 0.14), rgba(109, 138, 201, 0.12) 55%, rgba(232, 138, 160, 0.10));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 30%, rgba(201, 79, 109, 0.18), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(109, 138, 201, 0.16), transparent 45%);
  animation: heroFloat 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2%, -3%, 0) scale(1.06); }
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

#hero h1 {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 45%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-lead {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

.hero-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 8px 14px;
  display: inline-block;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  margin-bottom: 1.4em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.96rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 6px 18px rgba(201, 79, 109, 0.32);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(201, 79, 109, 0.42);
}

.btn-secondary {
  color: var(--brand);
  background: var(--glass-bg);
  border: 1.5px solid var(--brand);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: #fff;
  background: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(201, 79, 109, 0.28);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: floatY 6s ease-in-out infinite;
}

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

/* ============ Breadcrumb ============ */
.breadcrumb {
  margin: 0 0 28px;
  padding: 0 4px;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb li { margin: 0; display: inline-flex; align-items: center; }

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--text-muted);
  opacity: 0.7;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover { color: var(--brand); }

.breadcrumb [aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}

/* ============ Lists & cards ============ */
#brand ul,
#products ul,
#solutions ul,
#howto ul,
#howto ol {
  padding-left: 1.2em;
}

#products ul li,
#solutions ul li {
  padding: 4px 0;
}

#products ul li::marker,
#solutions ul li::marker {
  color: var(--brand);
}

/* News list */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.news-list li {
  margin: 0;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.news-list li:hover {
  transform: translateX(6px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

.news-list li strong {
  display: inline-block;
  margin-right: 12px;
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* Articles */
#articles article {
  position: relative;
  padding: 20px 22px;
  margin: 0 0 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

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

#articles article h3 {
  margin-top: 0;
  font-size: 1.12rem;
}

#articles article h3 a,
#articles article > a {
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

#articles article > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

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

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.8em;
}

/* HowTo */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  padding: 10px 0 10px 44px;
  counter-increment: step;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(201, 79, 109, 0.3);
}

/* FAQ */
#faq h3 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  margin: 0 0 8px;
  font-size: 1.02rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: default;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq h3::before {
  content: "Q";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 6px;
  margin-top: 2px;
}

#faq h3 + p {
  margin: 0 0 18px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.94rem;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq h3:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

#faq h3:hover + p {
  border-color: var(--brand-light);
}

/* Contact */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#contact ul li {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-3px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

#contact ul li a {
  word-break: break-all;
}

/* Sitemap & Links */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201, 79, 109, 0.28);
}

/* ============ Footer ============ */
footer {
  margin-top: 20px;
  background: linear-gradient(160deg, var(--bg-alt), var(--bg));
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 20px 56px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.footer-inner p {
  margin: 0 0 8px;
}

.footer-inner a {
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
}

.footer-inner a:hover {
  color: var(--brand);
}

/* ============ Back to top ============ */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 90;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(201, 79, 109, 0.38);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(201, 79, 109, 0.48);
}

.back-to-top:active {
  transform: translateY(-1px) scale(0.97);
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  #hero {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-visual {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }
  .hero-visual svg { max-width: 280px; }
  .nav-list { gap: 0; }
  .nav-list a { padding: 8px 9px; font-size: 0.86rem; }
}

@media (max-width: 820px) {
  :root { --header-h: 60px; }

  .header-inner { gap: 12px; }

  .menu-toggle { display: inline-block; }

  #site-header nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease), visibility 0.3s var(--ease);
  }

  #site-header.nav-open nav {
    max-height: 70vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 2px;
  }

  .nav-list a {
    display: block;
    padding: 12px 14px;
    font-size: 0.98rem;
    border-radius: var(--radius-sm);
  }

  .nav-list a::after { display: none; }

  main { padding: 0 14px 30px; }

  main > section {
    padding: 22px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 22px;
  }

  #hero {
    margin-top: 18px;
    padding: 26px 20px;
    border-radius: var(--radius-lg);
  }

  .hero-lead { font-size: 0.96rem; }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    flex: 1 1 auto;
    padding: 12px 20px;
  }

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

  .back-to-top {
    right: 14px;
    bottom: 18px;
    padding: 10px 15px;
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .logo-text { font-size: 1.3rem; }
  .logo svg { width: 34px; height: 34px; }
  #hero h1 { font-size: 1.5rem; }
  .hero-meta { font-size: 0.76rem; padding: 6px 12px; }
  .news-list li { font-size: 0.88rem; padding: 12px 14px; }
  .news-list li strong { display: block; margin: 0 0 4px; width: fit-content; }
  #articles article { padding: 16px 16px; }
  #faq h3 { font-size: 0.94rem; padding: 12px 14px; }
  #faq h3 + p { padding: 12px 14px; font-size: 0.88rem; }
}

/* ============ Print ============ */
@media print {
  #site-header,
  .back-to-top,
  .hero-actions,
  .menu-toggle {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  a { color: #000; text-decoration: underline; }
}