:root {
  --brand: #c8102e;
  --brand-dark: #a00d25;
  --brand-light: #e94560;
  --accent: #533483;
  --accent-2: #0f3460;
  --bg: #f7f7fb;
  --bg-alt: #ffffff;
  --bg-soft: #f0f0f6;
  --text: #1a1a2e;
  --text-soft: #4a4a5e;
  --text-muted: #7a7a8e;
  --border: rgba(26, 26, 46, 0.1);
  --card-bg: rgba(255, 255, 255, 0.72);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 28px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-brand: linear-gradient(135deg, #c8102e 0%, #e94560 45%, #533483 100%);
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #2b1b4d 40%, #c8102e 100%);
  --grad-soft: linear-gradient(160deg, rgba(200, 16, 46, 0.06), rgba(83, 52, 131, 0.06));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e1a;
    --bg-alt: #16162a;
    --bg-soft: #1c1c32;
    --text: #f2f2f8;
    --text-soft: #c4c4d6;
    --text-muted: #8e8ea6;
    --border: rgba(255, 255, 255, 0.12);
    --card-bg: rgba(28, 28, 50, 0.7);
    --glass-bg: rgba(22, 22, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
    --grad-soft: linear-gradient(160deg, rgba(233, 69, 96, 0.1), rgba(83, 52, 131, 0.14));
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      circle at 12% 0%,
      rgba(200, 16, 46, 0.08),
      transparent 42%
    ),
    radial-gradient(circle at 88% 12%, rgba(83, 52, 131, 0.1), transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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-light);
}

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

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

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  margin: 0 0 0.8em;
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  margin: 0 0 0.9em;
  padding-bottom: 0.5em;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-brand);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  margin: 1.6em 0 0.6em;
  color: var(--text);
}

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

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

li {
  margin-bottom: 0.5em;
}

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

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

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.3em;
  background: var(--grad-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  position: relative;
}

blockquote p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  min-height: var(--header-h);
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand {
  flex: 0 0 auto;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

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

.brand svg {
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.brand a:hover svg {
  transform: rotate(-6deg) scale(1.06);
  box-shadow: 0 6px 20px rgba(200, 16, 46, 0.5);
}

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 500;
  transition: all 0.25s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.35);
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 auto;
}

header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

header form[role="search"] input[type="search"] {
  width: clamp(140px, 20vw, 220px);
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}

header form[role="search"] input[type="search"]::placeholder {
  color: var(--text-muted);
}

header form[role="search"] input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
  outline: none;
}

header form[role="search"] button {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

header form[role="search"] button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.4);
  filter: brightness(1.05);
}

/* ============ Main layout ============ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--text-muted);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-soft);
}

main > nav[aria-label="面包屑导航"] a:hover {
  color: var(--brand);
}

/* ============ Sections ============ */
section {
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease),
    background 0.4s var(--ease), border-color 0.4s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
}

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

/* Hero */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 3rem);
  background: var(--grad-hero);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 15% 20%,
      rgba(233, 69, 96, 0.45),
      transparent 45%
    ),
    radial-gradient(circle at 85% 80%, rgba(83, 52, 131, 0.55), transparent 50%);
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

#hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 72ch;
}

#hero strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  padding: 0.1em 0.45em;
  border-radius: 6px;
}

#hero figure {
  margin: 1.6rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
}

#hero figure svg {
  width: 100%;
  height: auto;
}

#hero figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* ============ Products: 卡片化列表 ============ */
#products ul,
#solutions ul,
#notice ul,
#contact ul,
#sitemap ul,
#howto ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

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

#products ul li,
#solutions ul li,
#notice ul li,
#contact ul li,
#howto ul li {
  position: relative;
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 2.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  transition: all 0.3s var(--ease);
}

#products ul li::before,
#solutions ul li::before,
#notice ul li::before,
#contact ul li::before,
#howto ul li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

#products ul li:hover,
#solutions ul li:hover,
#notice ul li:hover,
#contact ul li:hover,
#howto ul li:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-md);
}

/* 品牌历史时间线 */
#intro ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.4rem;
  position: relative;
}

#intro ul::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--brand),
    var(--accent),
    transparent
  );
  border-radius: 2px;
}

#intro ul li {
  position: relative;
  margin: 0 0 0.7rem;
  padding: 0.55rem 0.9rem 0.55rem 2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: all 0.3s var(--ease);
}

#intro ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

#intro ul li:hover {
  transform: translateX(4px);
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-sm);
}

/* ============ News ============ */
#news {
  display: grid;
  gap: 1rem;
}

#news > h2 {
  grid-column: 1 / -1;
}

#news article {
  padding: 1.2rem 1.3rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

#news article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

#news article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 16, 46, 0.3);
}

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

#news article h3 {
  margin-top: 0;
  font-size: 1.08rem;
}

#news article h3 a,
#news article > a {
  color: var(--text);
}

#news article p {
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
}

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

#news article > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
}

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

#news article > a:hover {
  color: var(--brand-light);
}

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

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 0.7rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

#faq details[open] {
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-sm);
}

#faq details:hover {
  border-color: rgba(200, 16, 46, 0.28);
}

#faq summary {
  cursor: pointer;
  padding: 0.95rem 2.6rem 0.95rem 1.1rem;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
  position: relative;
  list-style: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover {
  color: var(--brand);
  background: var(--grad-soft);
}

#faq details p {
  margin: 0;
  padding: 0 1.1rem 1.1rem;
  font-size: 0.92rem;
  animation: fadeUp 0.4s var(--ease);
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  transition: all 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.35);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-sm);
}

/* ============ Contact ============ */
#contact ul {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#contact h3 + p {
  padding: 0.7rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

/* ============ Sitemap ============ */
#sitemap ul {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#sitemap ul li {
  padding: 0.65rem 0.9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.3s var(--ease);
}

#sitemap ul li:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 16, 46, 0.35);
  box-shadow: var(--shadow-sm);
}

#sitemap ul li a {
  display: block;
  color: var(--text-soft);
}

#sitemap ul li a:hover {
  color: var(--brand);
}

#sitemap h3 {
  margin-top: 1.6rem;
}

/* ============ Footer ============ */
footer {
  margin-top: 2rem;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--grad-hero);
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 0%,
      rgba(233, 69, 96, 0.35),
      transparent 50%
    ),
    radial-gradient(circle at 90% 100%, rgba(83, 52, 131, 0.45), transparent 55%);
  pointer-events: none;
}

footer > * {
  position: relative;
  z-index: 1;
}

footer p {
  margin: 0.4rem 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
}

footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

footer nav li {
  margin: 0;
}

footer nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}

footer nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

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

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

/* 滚动动画：利用 animation-timeline 渐进增强 */
@supports (animation-timeline: view()) {
  section {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

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

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header {
    gap: 0.6rem;
    padding: 0.7rem 1rem;
  }

  header nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
  }

  header form[role="search"] {
    margin-left: auto;
  }

  header form[role="search"] input[type="search"] {
    width: 120px;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-lg: 18px;
    --radius: 14px;
  }

  body {
    font-size: 15px;
  }

  header form[role="search"] input[type="search"] {
    width: 96px;
    padding: 0.45rem 0.7rem;
  }

  header form[role="search"] button {
    padding: 0.45rem 0.8rem;
  }

  section {
    padding: 1.1rem;
  }

  #hero {
    padding: 1.3rem;
  }

  #hero figure {
    margin: 1.2rem 0;
  }

  #products ul,
  #solutions ul,
  #contact ul,
  #sitemap ul {
    grid-template-columns: 1fr;
  }

  #news article {
    padding: 1rem;
  }

  #faq summary {
    padding: 0.85rem 2.4rem 0.85rem 0.95rem;
    font-size: 0.92rem;
  }

  footer nav ul {
    gap: 0.3rem 0.5rem;
  }
}

@media (max-width: 380px) {
  .brand a span {
    display: none;
  }
}

/* 打印样式 */
@media print {
  header,
  footer,
  #hero::before,
  section::before {
    display: none;
  }

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

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