:root {
  --brand: #ff8fb1;
  --brand-deep: #d6336c;
  --brand-soft: #ffeef4;
  --brand-mid: #ffb6c9;
  --brand-light: #ffc9d6;
  --accent: #8b5cf6;
  --accent-soft: #ede9fe;
  --bg: #fff7fa;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #3d2b33;
  --text-soft: #6b5560;
  --text-mute: #9a8590;
  --border: rgba(255, 143, 177, 0.22);
  --border-strong: rgba(255, 143, 177, 0.45);
  --shadow-sm: 0 2px 10px rgba(214, 51, 108, 0.06);
  --shadow: 0 8px 30px rgba(214, 51, 108, 0.1);
  --shadow-lg: 0 20px 50px rgba(214, 51, 108, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --grad-banner: linear-gradient(135deg, #ffd6e3 0%, #ffb6c9 30%, #e9d5ff 70%, #c4b5fd 100%);
  --grad-brand: linear-gradient(135deg, #ff8fb1 0%, #d6336c 100%);
  --grad-soft: linear-gradient(135deg, #fff0f5 0%, #f3e8ff 100%);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1180px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff9db9;
    --brand-deep: #ff7aa2;
    --brand-soft: #2a1c22;
    --brand-mid: #7a4a5c;
    --brand-light: #5c3a47;
    --accent: #a78bfa;
    --accent-soft: #2b2440;
    --bg: #16111a;
    --bg-alt: #1e1721;
    --bg-card: rgba(40, 30, 38, 0.72);
    --bg-glass: rgba(40, 30, 38, 0.55);
    --text: #f3e6ec;
    --text-soft: #cdb8c2;
    --text-mute: #9a8590;
    --border: rgba(255, 157, 185, 0.18);
    --border-strong: rgba(255, 157, 185, 0.4);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --grad-banner: linear-gradient(135deg, #3a2430 0%, #4a2c3a 30%, #322847 70%, #2b2440 100%);
    --grad-soft: linear-gradient(135deg, #2a1c22 0%, #2b2440 100%);
  }
}

*,
*::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(circle at 12% 8%, rgba(255, 143, 177, 0.14), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(167, 139, 250, 0.12), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 182, 201, 0.1), transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

svg {
  display: block;
}

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

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

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

h1, h2, h3, h4 {
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.6rem, 4.4vw, 2.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 750;
  position: relative;
  padding-left: 0.85em;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(255, 143, 177, 0.5);
}

h3 {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  font-weight: 700;
  color: var(--brand-deep);
}

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

ul, ol {
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.5em;
}

li::marker {
  color: var(--brand);
  font-weight: 700;
}

blockquote {
  margin: 1.4em 0;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font-style: italic;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(214, 51, 108, 0.06);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

header nav a:hover {
  color: var(--brand-deep);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

header nav a:hover::after {
  width: 55%;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 60px;
}

section {
  margin: 34px 0;
  padding: 30px 28px;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s var(--ease) both;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-banner);
  opacity: 0.85;
}

section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

section#home {
  margin-top: 28px;
  padding: 40px 32px;
  background: var(--grad-banner);
  border: none;
  box-shadow: 0 24px 60px rgba(214, 51, 108, 0.18);
}

section#home::before {
  display: none;
}

section#home h1 {
  color: var(--brand-deep);
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.55);
}

section#home p {
  color: var(--text);
}

section#home figure {
  margin: 24px 0;
  padding: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

section#home figure:hover {
  transform: scale(1.015) rotate(-0.4deg);
  box-shadow: var(--shadow-lg);
}

section#home figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-soft);
}

#products,
#cases,
#faq,
#howto,
#contact {
  background: var(--bg-alt);
}

#services,
#articles,
#news,
#knowledge {
  background: var(--grad-soft);
}

#articles article {
  margin: 18px 0;
  padding: 20px 22px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article:hover {
  transform: translateX(6px) translateY(-3px);
  box-shadow: var(--shadow);
  border-left-color: var(--accent);
}

#articles article h3 {
  margin-bottom: 0.35em;
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin-bottom: 0.5em;
}

#articles article a {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(214, 51, 108, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#articles article a:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 26px rgba(214, 51, 108, 0.4);
  filter: brightness(1.06);
}

#faq h3 {
  margin-top: 1.4em;
  padding: 12px 18px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3:hover {
  background: var(--brand-mid);
  transform: translateX(4px);
}

#faq h3 + p {
  margin-top: 0;
  padding: 14px 18px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-top: none;
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 12px 16px 12px 58px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 4px 12px rgba(214, 51, 108, 0.3);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

#cases blockquote {
  position: relative;
  padding-left: 3em;
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0.35em;
  top: 0.05em;
  font-size: 3rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.55;
  font-family: Georgia, serif;
}

#contact p {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

#contact p:last-child {
  border-bottom: none;
}

#sitemap ul,
#links ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 22px rgba(214, 51, 108, 0.3);
}

#author p {
  display: inline-block;
  margin: 0 14px 10px 0;
  padding: 6px 14px;
  font-size: 0.86rem;
  background: var(--brand-soft);
  border-radius: var(--radius-pill);
  color: var(--text-soft);
}

#legal h2 {
  margin-top: 1.6em;
}

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

footer {
  margin-top: 20px;
  padding: 40px 20px 48px;
  text-align: center;
  background: var(--grad-banner);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.25), transparent 45%);
  pointer-events: none;
}

footer p {
  position: relative;
  margin: 0.4em 0;
  color: var(--brand-deep);
  font-weight: 600;
  font-size: 0.92rem;
}

footer p:last-child {
  font-size: 0.84rem;
  font-weight: 500;
  opacity: 0.85;
}

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

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

section#home figure svg circle:first-of-type {
  animation: floatSoft 6s ease-in-out infinite;
}

section#home figure svg circle:nth-of-type(2) {
  animation: floatSoft 7s ease-in-out infinite reverse;
}

@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

@media (max-width: 900px) {
  :root {
    --radius-lg: 22px;
  }

  header nav ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 7px 12px;
  }

  section {
    padding: 24px 18px;
    margin: 22px 0;
  }

  section#home {
    padding: 28px 20px;
  }

  h2 {
    padding-left: 0.7em;
  }

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

@media (max-width: 560px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }

  main {
    padding: 0 12px 40px;
  }

  header nav {
    padding: 0 12px;
  }

  section {
    padding: 20px 15px;
    border-radius: var(--radius);
  }

  section#home {
    padding: 22px 16px;
  }

  section#home figure {
    padding: 10px;
  }

  h2::before {
    width: 4px;
  }

  blockquote {
    padding: 0.9em 1em;
  }

  #cases blockquote {
    padding-left: 2.4em;
  }

  #cases blockquote::before {
    font-size: 2.2rem;
  }

  #howto ol li {
    padding: 10px 12px 10px 50px;
  }

  #sitemap ul,
  #links ul {
    gap: 8px;
  }

  #sitemap a,
  #links a {
    padding: 7px 13px;
    font-size: 0.82rem;
  }

  #author p {
    margin: 0 8px 8px 0;
  }

  footer {
    padding: 30px 14px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  header,
  footer,
  #sitemap,
  #links {
    display: none;
  }

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

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    animation: none;
  }
}