:root {
  --primary: #E63946;
  --primary-dark: #C1121F;
  --primary-light: #FF6B6B;
  --accent: #FFB703;
  --accent-2: #FB8500;
  --bg: #FFF9F6;
  --bg-alt: #FFFFFF;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --glass-border: rgba(255, 255, 255, 0.55);
  --text: #2B1D1A;
  --text-soft: #5C4A46;
  --text-muted: #8A7772;
  --border: rgba(230, 57, 70, 0.14);
  --shadow-sm: 0 2px 8px rgba(43, 29, 26, 0.06);
  --shadow-md: 0 8px 28px rgba(43, 29, 26, 0.10);
  --shadow-lg: 0 18px 50px rgba(43, 29, 26, 0.14);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1120px;
  --grad-hero: linear-gradient(135deg, #E63946 0%, #FF6B6B 42%, #FFB703 100%);
  --grad-accent: linear-gradient(135deg, #FB8500 0%, #FFB703 100%);
  --grad-card: linear-gradient(160deg, rgba(255,255,255,0.9) 0%, rgba(255,244,240,0.85) 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16100F;
    --bg-alt: #1E1614;
    --surface: rgba(38, 28, 26, 0.66);
    --surface-solid: #241B19;
    --glass-border: rgba(255, 255, 255, 0.10);
    --text: #F6ECE8;
    --text-soft: #D8C8C2;
    --text-muted: #A08C86;
    --border: rgba(255, 107, 107, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
    --grad-hero: linear-gradient(135deg, #8C1620 0%, #C1121F 45%, #B36A00 100%);
    --grad-card: linear-gradient(160deg, rgba(46,34,31,0.92) 0%, rgba(32,23,21,0.88) 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: -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(230, 57, 70, 0.10), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 183, 3, 0.12), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(251, 133, 0, 0.08), transparent 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
}

h1 { font-size: clamp(1.7rem, 4.6vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
h4 { font-size: clamp(1.02rem, 1.9vw, 1.15rem); }

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

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

li {
  margin-bottom: 0.45em;
}

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

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

address {
  font-style: normal;
}

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 12px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  min-height: var(--header-h);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

header[role="banner"] > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

header[role="banner"] > div > a {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: transparent;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
  transition: transform 0.3s var(--ease);
}

header[role="banner"] > div > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

header[role="banner"] > div > a:hover {
  transform: translateY(-1px);
}

header[role="banner"] > div > a:hover::after {
  transform: scaleX(1);
}

header[role="banner"] > div > span {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

header[role="banner"] nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

header[role="banner"] nav li {
  margin: 0;
}

header[role="banner"] nav a {
  display: inline-block;
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}

header[role="banner"] nav a:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.08);
  border-color: var(--border);
  transform: translateY(-2px);
}

/* ============ Breadcrumb ============ */
nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 32px) 0;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

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

nav[aria-label="面包屑导航"] li[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* ============ Main / Sections ============ */
main {
  display: block;
}

main > section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 32px);
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
}

@supports not (animation-timeline: view()) {
  main > section {
    animation: none;
  }
}

main > section + section {
  border-top: 1px solid var(--border);
}

main > section > h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  margin-bottom: 1.2em;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-accent);
  transition: width 0.4s var(--ease);
}

main > section:hover > h2::after {
  width: 100%;
}

/* ============ Hero ============ */
#hero {
  position: relative;
  max-width: none;
  margin: 24px auto 0;
  padding: clamp(40px, 7vw, 76px) clamp(20px, 5vw, 60px);
  border-radius: var(--radius-lg);
  background: var(--grad-hero);
  background-size: 200% 200%;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
  animation: gradientShift 14s ease infinite, fadeUp 0.7s var(--ease) both;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.28), transparent 38%),
    radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.18), transparent 42%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -12%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(40px);
  z-index: -1;
  animation: floatBlob 12s ease-in-out infinite alternate;
}

#hero > * {
  position: relative;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  text-align: center;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.7vw, 1.06rem);
  text-align: justify;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
}

#hero p:last-child {
  margin-bottom: 0;
}

/* ============ Card styling for content blocks ============ */
#brand-intro,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#knowledge,
#contact,
#sitemap,
#links,
#legal {
  position: relative;
}

#brand-intro > h3,
#products > h3,
#solutions > h3,
#cases > h3,
#contact > h3,
#legal > h3 {
  margin-top: 1.8em;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  border-radius: 2px;
}

#products > h4,
#brand-intro > h3 + p,
#cases > h3 + p {
  scroll-margin-top: 90px;
}

#products h4 {
  display: inline-block;
  margin-top: 1.4em;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.98rem;
  color: var(--primary-dark);
  background: rgba(230, 57, 70, 0.09);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

#products h4:hover {
  transform: translateX(4px);
  background: rgba(230, 57, 70, 0.15);
}

/* ============ News list ============ */
#news ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#news li {
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

#news li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

#news li strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
}

/* ============ Articles ============ */
#articles {
  display: grid;
  gap: clamp(18px, 3vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}

#articles > h2,
#articles > p {
  grid-column: 1 / -1;
}

#articles article {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 26px);
  border-radius: var(--radius);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

#articles article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

#articles article:hover::before {
  transform: scaleX(1);
}

#articles article h3 {
  margin-bottom: 0.5em;
  font-size: 1.12rem;
  line-height: 1.45;
}

#articles article h3::before {
  content: "📖";
  margin-right: 8px;
  font-size: 0.95em;
}

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

#articles article p:nth-of-type(1) {
  margin-bottom: 0.5em;
}

#articles article > p > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--grad-hero);
  background-size: 160% 160%;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background-position 0.5s var(--ease);
  margin-top: auto;
  align-self: flex-start;
}

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

#articles article > p > a:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(230, 57, 70, 0.4);
  background-position: 100% 50%;
}

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

#articles article div[id^="article-"] {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(230, 57, 70, 0.05);
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text-soft);
  animation: fadeIn 0.5s var(--ease) both;
}

#articles article div[id^="article-"] p {
  margin: 0;
}

/* ============ FAQ ============ */
#faq {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}

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

#faq h3 {
  margin: 0;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
  position: relative;
  padding-left: 46px;
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #fff;
  background: var(--grad-hero);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

#faq h3 + p {
  margin: 0;
  padding: 4px 20px 18px;
  font-size: 0.92rem;
  color: var(--text-soft);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq h3:hover {
  color: var(--primary);
}

#faq h3:hover + p {
  box-shadow: var(--shadow-sm);
}

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

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 58px;
  border-radius: var(--radius-sm);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease),
    border-color 0.32s var(--ease);
  font-size: 0.94rem;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(251, 133, 0, 0.35);
}

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

#howto h3 {
  margin-top: 1.6em;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

/* ============ Contact ============ */
#contact address {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--radius);
  background: var(--grad-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#contact address p {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
  word-break: break-word;
}

@media (prefers-color-scheme: dark) {
  #contact address p {
    background: rgba(255, 255, 255, 0.04);
  }
}

#contact address p:hover {
  transform: translateY(-3px);
  background: rgba(230, 57, 70, 0.08);
}

#contact address a {
  font-weight: 700;
}

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

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

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

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-hero);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(230, 57, 70, 0.3);
}

/* ============ Legal ============ */
#legal h3 {
  margin-top: 1.5em;
}

/* ============ Footer ============ */
footer[role="contentinfo"] {
  margin-top: clamp(24px, 5vw, 48px);
  padding: clamp(28px, 5vw, 44px) clamp(16px, 4vw, 40px);
  text-align: center;
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--glass-border);
}

footer[role="contentinfo"] p {
  margin: 0 auto 10px;
  max-width: 720px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

footer[role="contentinfo"] p:first-child {
  font-weight: 700;
  color: var(--text-soft);
  font-size: 0.92rem;
}

footer[role="contentinfo"] a {
  font-weight: 600;
  color: var(--text-soft);
  padding: 2px 8px;
  border-radius: 6px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

footer[role="contentinfo"] a:hover {
  color: #fff;
  background: var(--primary);
}

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

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

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

@keyframes floatBlob {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-40px, 40px) scale(1.15); }
}

@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: 900px) {
  :root {
    --header-h: auto;
  }

  header[role="banner"] {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
  }

  header[role="banner"] nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  header[role="banner"] nav::-webkit-scrollbar {
    display: none;
  }

  header[role="banner"] nav ul {
    flex-wrap: nowrap;
    width: max-content;
  }

  header[role="banner"] nav a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  html {
    scroll-padding-top: 16px;
  }

  #hero {
    margin: 16px 12px 0;
    border-radius: var(--radius);
  }

  #articles,
  #faq {
    grid-template-columns: 1fr;
  }

  main > section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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

  #hero {
    padding: 34px 20px;
  }

  #hero p {
    text-align: left;
  }

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

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

  #howto ol li {
    padding-left: 52px;
  }

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

  footer[role="contentinfo"] p {
    font-size: 0.8rem;
  }
}

@media (hover: none) {
  #articles article:hover,
  #news li:hover,
  #sitemap a:hover,
  #links a:hover {
    transform: none;
  }
}