:root {
  --brand: #c8102e;
  --brand-dark: #9a0c23;
  --brand-light: #e63950;
  --accent: #ff7a45;
  --accent-2: #ffb347;
  --gradient-brand: linear-gradient(135deg, #c8102e 0%, #e63950 45%, #ff7a45 100%);
  --gradient-soft: linear-gradient(135deg, rgba(200, 16, 46, 0.08), rgba(255, 122, 69, 0.08));
  --bg: #f7f5f2;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.88);
  --text: #1f1b1a;
  --text-secondary: #4a4340;
  --text-muted: #7a716c;
  --border: rgba(31, 27, 26, 0.09);
  --border-strong: rgba(31, 27, 26, 0.16);
  --shadow-sm: 0 2px 8px rgba(31, 27, 26, 0.06);
  --shadow-md: 0 8px 28px rgba(31, 27, 26, 0.09);
  --shadow-lg: 0 20px 56px rgba(31, 27, 26, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max-width: 1180px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100f;
    --bg-elevated: #1d1817;
    --bg-glass: rgba(29, 24, 23, 0.66);
    --bg-glass-strong: rgba(29, 24, 23, 0.86);
    --text: #f3eeeb;
    --text-secondary: #cfc5c0;
    --text-muted: #9a8f89;
    --border: rgba(243, 238, 235, 0.1);
    --border-strong: rgba(243, 238, 235, 0.18);
    --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 20px 56px rgba(0, 0, 0, 0.6);
    --gradient-soft: linear-gradient(135deg, rgba(230, 57, 80, 0.14), rgba(255, 122, 69, 0.1));
  }
}

*,
*::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-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(200, 16, 46, 0.07), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(255, 122, 69, 0.08), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(200, 16, 46, 0.05), transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

@media (prefers-color-scheme: dark) {
  a {
    color: var(--brand-light);
  }
}

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

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

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

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: var(--gradient-brand);
}

h3 {
  font-size: clamp(1.1rem, 1.9vw, 1.28rem);
  color: var(--text);
}

h4 {
  font-size: 1.02rem;
  color: var(--text-secondary);
}

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

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.4em;
  color: var(--text-secondary);
}

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

::selection {
  background: rgba(200, 16, 46, 0.22);
  color: var(--text);
}

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.brand-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}

.brand-bar a {
  font-size: clamp(1.18rem, 2.4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
  transition: transform 0.3s var(--ease);
}

.brand-bar a:hover {
  transform: translateY(-1px);
}

.brand-bar span {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

nav[aria-label="主导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

nav[aria-label="主导航"]::-webkit-scrollbar {
  display: none;
}

nav[aria-label="主导航"] ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

nav[aria-label="主导航"] li {
  margin: 0;
  flex: 0 0 auto;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 6px 13px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: var(--brand);
  background: var(--gradient-soft);
  border-color: var(--border);
  transform: translateY(-1px);
}

/* ============ Main ============ */
main {
  display: block;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

/* ============ Sections (cards) ============ */
main > section {
  position: relative;
  margin: 0 0 26px;
  padding: 30px clamp(20px, 3.4vw, 40px);
  background: var(--bg-glass-strong);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
  animation: rise-in 0.7s var(--ease) both;
}

main > section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

main > section:last-of-type {
  margin-bottom: 0;
}

/* Hero / intro */
#intro {
  background:
    linear-gradient(135deg, rgba(200, 16, 46, 0.92) 0%, rgba(230, 57, 80, 0.88) 42%, rgba(255, 122, 69, 0.86) 100%),
    var(--bg-glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#intro::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
  pointer-events: none;
}

#intro::before {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

#intro h1,
#intro p {
  position: relative;
  z-index: 1;
  color: #fff;
}

#intro h1 {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

#intro p {
  color: rgba(255, 255, 255, 0.93);
  font-size: 1.02rem;
  max-width: 78ch;
}

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

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

#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

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

#articles article:last-of-type {
  margin-bottom: 0;
}

#articles article h3 {
  margin-bottom: 0.3em;
  font-size: 1.1rem;
  transition: color 0.3s var(--ease);
}

#articles article:hover h3 {
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  #articles article:hover h3 {
    color: var(--brand-light);
  }
}

#articles article p:nth-of-type(1) {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.55em;
}

#articles article p:nth-of-type(2) {
  margin-bottom: 0.8em;
  font-size: 0.95rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

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

#articles article a:hover {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.28);
}

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

/* ============ Reviews ============ */
#reviews p {
  position: relative;
  padding: 16px 20px 16px 52px;
  margin: 0 0 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-style: normal;
  color: var(--text-secondary);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#reviews p::before {
  content: "“";
  position: absolute;
  left: 18px;
  top: 8px;
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.85;
}

#reviews p:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

#reviews p:last-of-type {
  background: transparent;
  border: none;
  padding-left: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#reviews p:last-of-type::before {
  display: none;
}

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  margin: 0 0 6px;
  padding: 16px 20px 16px 48px;
  font-size: 1rem;
  background: var(--bg-elevated);
  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";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
  background: var(--gradient-brand);
}

#faq h3 + p {
  margin: 0 0 14px;
  padding: 14px 20px 16px;
  font-size: 0.94rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: background 0.3s var(--ease);
}

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

@media (prefers-color-scheme: dark) {
  #faq h3:hover {
    color: var(--brand-light);
  }
}

#faq h3:hover + p {
  background: var(--gradient-soft);
}

/* ============ Sitemap & lists ============ */
#sitemap ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 14px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

#sitemap ul li {
  margin: 0;
}

#sitemap ul li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.3s var(--ease);
}

#sitemap ul li a:hover {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.24);
}

#sitemap h3 {
  margin-top: 8px;
}

/* ============ Contact ============ */
#contact p {
  padding: 10px 16px;
  margin: 0 0 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact p:hover {
  transform: translateX(4px);
  border-color: var(--brand);
}

#contact h3 {
  margin-top: 1.4em;
}

#contact h3:first-of-type {
  margin-top: 0.4em;
}

/* ============ Footer ============ */
footer[role="contentinfo"] {
  position: relative;
  margin-top: 40px;
  padding: 48px 24px 32px;
  background: linear-gradient(180deg, transparent, rgba(200, 16, 46, 0.05) 40%, rgba(200, 16, 46, 0.09));
  border-top: 1px solid var(--border);
}

footer[role="contentinfo"]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 40%);
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--gradient-brand);
}

footer[role="contentinfo"] > section {
  max-width: var(--max-width);
  margin: 0 auto 22px;
  padding: 20px 24px;
  background: var(--bg-glass);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

footer[role="contentinfo"] > section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

footer[role="contentinfo"] > section h2 {
  font-size: 1rem;
  padding-left: 14px;
  margin-bottom: 0.5em;
}

footer[role="contentinfo"] > section h2::before {
  width: 3px;
}

footer[role="contentinfo"] > section p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.7;
}

footer[role="contentinfo"] > p {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============ Animations ============ */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

main > section:nth-of-type(1) { animation-delay: 0.02s; }
main > section:nth-of-type(2) { animation-delay: 0.06s; }
main > section:nth-of-type(3) { animation-delay: 0.1s; }
main > section:nth-of-type(4) { animation-delay: 0.14s; }
main > section:nth-of-type(5) { animation-delay: 0.18s; }
main > section:nth-of-type(6) { animation-delay: 0.22s; }
main > section:nth-of-type(7) { animation-delay: 0.26s; }
main > section:nth-of-type(8) { animation-delay: 0.3s; }
main > section:nth-of-type(9) { animation-delay: 0.34s; }
main > section:nth-of-type(10) { animation-delay: 0.38s; }
main > section:nth-of-type(11) { animation-delay: 0.42s; }
main > section:nth-of-type(12) { animation-delay: 0.46s; }
main > section:nth-of-type(13) { animation-delay: 0.5s; }
main > section:nth-of-type(14) { animation-delay: 0.54s; }
main > section:nth-of-type(15) { animation-delay: 0.58s; }
main > section:nth-of-type(16) { animation-delay: 0.62s; }
main > section:nth-of-type(17) { animation-delay: 0.66s; }

@supports (animation-timeline: view()) {
  main > section {
    animation: rise-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 28%;
  }
  main > section:nth-of-type(n) {
    animation-delay: 0s;
  }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .brand-bar {
    padding: 12px 18px 8px;
  }
  nav[aria-label="主导航"] {
    padding: 0 18px 10px;
  }
  main {
    padding: 20px 18px 56px;
  }
  main > section {
    padding: 24px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
  }
  footer[role="contentinfo"] {
    padding: 36px 18px 24px;
  }
  footer[role="contentinfo"] > section {
    padding: 18px 18px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.72;
  }
  .brand-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .brand-bar span {
    font-size: 0.74rem;
  }
  nav[aria-label="主导航"] ul {
    gap: 2px;
  }
  nav[aria-label="主导航"] a {
    padding: 5px 11px;
    font-size: 0.8rem;
  }
  main {
    padding: 16px 14px 48px;
  }
  main > section {
    padding: 20px 16px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
  }
  h2 {
    padding-left: 14px;
  }
  h2::before {
    width: 4px;
  }
  #intro {
    padding: 26px 18px;
  }
  #articles article {
    padding: 16px 16px;
  }
  #reviews p {
    padding: 14px 16px 14px 44px;
  }
  #reviews p::before {
    left: 14px;
    font-size: 2rem;
  }
  #faq h3 {
    padding: 14px 16px 14px 42px;
    font-size: 0.95rem;
  }
  #faq h3::before {
    left: 13px;
    width: 20px;
    height: 20px;
  }
  #faq h3 + p {
    padding: 12px 16px 14px;
  }
  #sitemap ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 8px;
  }
  #sitemap ul li a {
    padding: 7px 10px;
    font-size: 0.82rem;
    text-align: center;
  }
  footer[role="contentinfo"] {
    padding: 30px 14px 20px;
  }
  footer[role="contentinfo"] > section {
    padding: 16px 16px;
  }
}

@media (max-width: 380px) {
  #sitemap ul {
    grid-template-columns: 1fr;
  }
}

/* ============ Reduced motion ============ */
@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;
  }
  main > section {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============ High contrast / print ============ */
@media (prefers-contrast: more) {
  :root {
    --border: rgba(31, 27, 26, 0.28);
    --text-secondary: #2b2422;
    --text-muted: #4a4340;
  }
}

@media print {
  header[role="banner"],
  footer[role="contentinfo"] {
    position: static;
    background: #fff;
    box-shadow: none;
  }
  main > section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    animation: none;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  #intro {
    background: #fff;
  }
  #intro h1,
  #intro p {
    color: #000;
  }
}