:root {
  --brand: #e8590c;
  --brand-2: #ff922b;
  --brand-3: #ffd8a8;
  --brand-soft: rgba(232, 89, 12, 0.1);
  --bg: #fdf9f5;
  --bg-2: #ffffff;
  --bg-3: #fff4ea;
  --text: #2b2118;
  --text-2: #5c4d40;
  --text-3: #8a7868;
  --border: rgba(232, 89, 12, 0.14);
  --border-2: rgba(43, 33, 24, 0.08);
  --shadow-sm: 0 2px 8px rgba(120, 70, 30, 0.06);
  --shadow: 0 8px 28px rgba(120, 70, 30, 0.1);
  --shadow-lg: 0 18px 48px rgba(120, 70, 30, 0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.7);
  --header-h: 132px;
  --max: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff922b;
    --brand-2: #ffb066;
    --brand-3: #7a3d12;
    --brand-soft: rgba(255, 146, 43, 0.14);
    --bg: #16110c;
    --bg-2: #1f1811;
    --bg-3: #221a12;
    --text: #f4ece3;
    --text-2: #cbbcad;
    --text-3: #9c8b7a;
    --border: rgba(255, 146, 43, 0.2);
    --border-2: rgba(244, 236, 227, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
    --glass: rgba(31, 24, 17, 0.6);
    --glass-border: rgba(255, 146, 43, 0.16);
  }
}

*,
*::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.85;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 146, 43, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 8%, rgba(232, 89, 12, 0.1), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection {
  background: var(--brand);
  color: #fff;
}

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

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

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

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

ul,
ol {
  padding-left: 1.35em;
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px clamp(16px, 4vw, 40px) 12px;
  background: var(--glass);
  -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: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent);
  opacity: 0.55;
}

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

.brand {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandShine 8s linear infinite;
}

@keyframes brandShine {
  to {
    background-position: 200% center;
  }
}

.slogan {
  font-size: 0.86rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

header nav {
  max-width: var(--max);
  margin: 0 auto;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

header nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}

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

/* ============ Main layout ============ */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 40px;
}

/* Breadcrumb */
main > nav[aria-label="面包屑导航"] {
  margin: 22px 0 6px;
}

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-3);
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--brand);
  opacity: 0.6;
}

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

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

/* ============ Sections ============ */
section {
  margin: 34px 0;
  padding: clamp(22px, 4vw, 40px);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 40%;
}

@supports not (animation-timeline: view()) {
  section {
    animation: fadeUp 0.6s var(--ease) both;
  }
}

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

section::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-soft), transparent 70%);
  pointer-events: none;
  transition: transform 0.6s var(--ease);
}

section:hover::before {
  transform: scale(1.25);
}

/* Hero */
#hero {
  margin-top: 18px;
  padding: clamp(30px, 6vw, 64px) clamp(22px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(232, 89, 12, 0.94) 0%, rgba(255, 146, 43, 0.9) 48%, rgba(255, 176, 102, 0.88) 100%),
    var(--bg-2);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 70%);
  width: 340px;
  height: 340px;
  top: -140px;
  right: -100px;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.22), transparent 45%);
  z-index: -1;
  pointer-events: none;
}

#hero h1 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 3.8vw, 2.35rem);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(120, 50, 0, 0.25);
}

#hero p {
  margin: 0;
  max-width: 860px;
  font-size: clamp(0.95rem, 1.6vw, 1.06rem);
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.95);
}

/* Headings */
h2 {
  position: relative;
  margin: 0 0 22px;
  padding-left: 18px;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.4;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.01em;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 14px var(--brand-soft);
}

h3 {
  margin: 28px 0 10px;
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  line-height: 1.5;
  font-weight: 700;
  color: var(--brand);
  transition: color 0.25s var(--ease);
}

h3:first-of-type {
  margin-top: 0;
}

h4 {
  margin: 20px 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

h4::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 4px var(--brand-soft);
  flex: none;
}

p {
  margin: 0 0 14px;
  color: var(--text-2);
  text-align: justify;
  word-break: break-word;
}

section > p:last-child,
section > article:last-child {
  margin-bottom: 0;
}

/* ============ Cards: articles / news / cases ============ */
#news,
#articles,
#cases {
  display: block;
}

#news article,
#articles article {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 22px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  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), background 0.35s var(--ease);
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brand-2);
  background: var(--bg-2);
}

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

#news article h3,
#articles article h3 {
  margin-top: 0;
  color: var(--text);
}

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

#news article p:first-of-type,
#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

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

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

#articles article p a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 18px var(--brand-soft);
}

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

/* ============ FAQ ============ */
#faq h3 {
  margin: 0 0 10px;
  padding: 16px 20px 16px 52px;
  position: relative;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: all 0.3s var(--ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--brand-soft);
}

#faq h3:hover {
  border-color: var(--brand-2);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

#faq h3 + p {
  margin: 0 0 16px;
  padding: 16px 20px 16px 52px;
  position: relative;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  line-height: 1.85;
}

#faq h3 + p::before {
  content: "A";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 8px;
}

/* ============ HowTo steps ============ */
#howto h4 {
  display: flex;
  margin: 18px 0 8px;
  padding: 12px 16px;
  background: linear-gradient(90deg, var(--brand-soft), transparent);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all 0.3s var(--ease);
}

#howto h4::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

#howto h4:hover {
  transform: translateX(4px);
  background: linear-gradient(90deg, var(--brand-soft), transparent 80%);
}

/* ============ Contact ============ */
#contact p {
  padding: 8px 0;
  margin: 0;
  border-bottom: 1px dashed var(--border-2);
  font-size: 0.95rem;
}

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

#contact h3 {
  margin-top: 24px;
}

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

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

#sitemap a,
#links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
}

#sitemap a::before {
  content: "#";
  color: var(--brand-2);
  font-weight: 700;
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--brand-soft);
}

#sitemap a:hover::before {
  color: #fff;
}

/* ============ Legal ============ */
#legal h3 {
  color: var(--text);
  padding-left: 14px;
  border-left: 3px solid var(--brand-2);
}

#legal p {
  font-size: 0.94rem;
}

/* ============ Footer ============ */
footer {
  margin-top: 20px;
  padding: 40px clamp(16px, 4vw, 40px);
  text-align: center;
  color: var(--text-3);
  background: linear-gradient(180deg, transparent, var(--brand-soft));
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--text-3);
  text-align: center;
}

footer p:last-child {
  margin-bottom: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  :root {
    --header-h: 148px;
    --radius-lg: 20px;
  }

  section {
    margin: 24px 0;
  }

  h2 {
    margin-bottom: 16px;
  }
}

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

  body {
    font-size: 15px;
    line-height: 1.8;
  }

  header {
    padding: 10px 14px 8px;
  }

  .brand-line {
    margin-bottom: 8px;
    gap: 2px 10px;
  }

  .slogan {
    font-size: 0.76rem;
  }

  header nav ul {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav a {
    white-space: nowrap;
    padding: 5px 11px;
    font-size: 0.82rem;
    background: var(--bg-3);
    border-color: var(--border-2);
  }

  main {
    padding: 0 14px 28px;
  }

  section {
    padding: 20px 16px;
    margin: 20px 0;
  }

  #hero {
    padding: 26px 18px;
  }

  #hero h1 {
    font-size: 1.42rem;
    line-height: 1.4;
  }

  #hero p {
    font-size: 0.92rem;
    line-height: 1.85;
  }

  h2 {
    padding-left: 14px;
    font-size: 1.2rem;
  }

  h2::before {
    width: 4px;
  }

  h3 {
    font-size: 1.04rem;
  }

  p {
    text-align: left;
  }

  #news article,
  #articles article {
    padding: 16px;
  }

  #faq h3 {
    padding: 14px 14px 14px 46px;
    font-size: 0.95rem;
  }

  #faq h3::before {
    left: 12px;
    width: 24px;
    height: 24px;
  }

  #faq h3 + p {
    padding: 14px 14px 14px 46px;
    font-size: 0.9rem;
  }

  #faq h3 + p::before {
    left: 12px;
    top: 14px;
    width: 24px;
    height: 24px;
  }

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

  footer {
    padding: 28px 14px;
  }
}

@media (max-width: 380px) {
  body {
    font-size: 14.5px;
  }

  #hero h1 {
    font-size: 1.28rem;
  }
}

/* ============ Motion & accessibility ============ */
@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 (hover: none) {
  #news article:hover,
  #articles article:hover,
  #sitemap a:hover,
  #links a:hover,
  #howto h4:hover,
  #faq h3:hover {
    transform: none;
  }
}

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

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

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