:root {
  --brand: #e94f37;
  --brand-dark: #c73a25;
  --brand-light: #ff7a5c;
  --accent: #ffb703;
  --accent-2: #fb8500;
  --ink: #1f1b24;
  --ink-soft: #4a4453;
  --ink-mute: #7a7386;
  --bg: #fdf9f6;
  --bg-alt: #f4ece7;
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.72);
  --border: rgba(31, 27, 36, 0.08);
  --border-strong: rgba(31, 27, 36, 0.14);
  --shadow-sm: 0 2px 8px rgba(31, 27, 36, 0.06);
  --shadow-md: 0 10px 30px rgba(31, 27, 36, 0.09);
  --shadow-lg: 0 24px 60px rgba(31, 27, 36, 0.14);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --gradient-hero: linear-gradient(135deg, #e94f37 0%, #fb8500 55%, #ffb703 100%);
  --gradient-soft: linear-gradient(135deg, rgba(233, 79, 55, 0.1), rgba(255, 183, 3, 0.12));
  --gradient-line: linear-gradient(90deg, var(--brand), var(--accent));
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3eefc;
    --ink-soft: #cfc7dd;
    --ink-mute: #9c93ad;
    --bg: #14121a;
    --bg-alt: #1c1924;
    --card: #201c2b;
    --card-glass: rgba(32, 28, 43, 0.66);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.6);
    --gradient-hero: linear-gradient(135deg, #b8321f 0%, #c9660a 55%, #d99a00 100%);
    --gradient-soft: linear-gradient(135deg, rgba(233, 79, 55, 0.16), rgba(255, 183, 3, 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.8;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(233, 79, 55, 0.1), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 183, 3, 0.1), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

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

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  color: var(--ink-soft);
}

li {
  margin-bottom: 0.45em;
}

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

time {
  font-variant-numeric: tabular-nums;
  font-size: 0.86em;
  color: var(--ink-mute);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
}

blockquote {
  margin: 0 0 1.2em;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

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

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  flex-shrink: 0;
}

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

.brand svg {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(233, 79, 55, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

.brand-name {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li {
  margin: 0;
}

.nav-list a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #fff;
  background: var(--gradient-hero);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 79, 55, 0.3);
}

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

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--ink-mute);
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--ink-mute);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--ink-soft);
  font-weight: 600;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--brand);
  font-weight: 700;
}

/* ---------- Sections ---------- */
section {
  margin-top: 40px;
  padding: 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
}

@supports (animation-timeline: view()) {
  section {
    animation: fadeUp 0.8s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

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

section h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-line);
}

section > h3 {
  margin-top: 1.6em;
  color: var(--ink);
}

section > h3:first-of-type {
  margin-top: 0.4em;
}

/* ---------- Hero ---------- */
#hero {
  position: relative;
  margin-top: 28px;
  padding: clamp(34px, 6vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: none;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 62%);
  border-radius: 50%;
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 62%);
  border-radius: 50%;
  z-index: -1;
  animation: float 16s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-24px, 22px, 0); }
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  max-width: 22ch;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 68ch;
  font-size: 1.02rem;
}

#hero .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--brand-dark);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#hero .cta::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#hero .cta:hover,
#hero .cta:focus-visible {
  transform: translateY(-3px);
  background: #fff8f2;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  color: var(--brand-dark);
}

#hero .cta:hover::after {
  transform: translateX(5px);
}

/* ---------- Cards: articles & cases ---------- */
#cases blockquote {
  border-left-color: var(--accent-2);
}

#articles {
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(255, 183, 3, 0.12), transparent 65%),
    var(--card);
}

#articles > p {
  margin-bottom: 26px;
}

#articles article {
  position: relative;
  padding: 24px 26px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--card-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

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

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

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

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

#articles article h3 {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

#articles article h3 a,
#articles article a {
  color: var(--ink);
}

#articles article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--brand);
  font-size: 0.94rem;
}

#articles article > a::after {
  content: "›";
  font-size: 1.2em;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}

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

/* ---------- News ---------- */
#news ul {
  list-style: none;
  padding: 0;
}

#news li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news li:hover {
  transform: translateX(6px);
  border-color: var(--brand);
}

/* ---------- FAQ ---------- */
#faq h3 {
  margin-top: 1.5em;
  padding-left: 16px;
  position: relative;
  font-size: 1.05rem;
}

#faq h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(233, 79, 55, 0.16);
}

#faq p {
  padding-left: 16px;
}

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

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

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-hero);
  box-shadow: 0 4px 12px rgba(233, 79, 55, 0.3);
}

#howto ol li:hover {
  background: var(--gradient-soft);
  transform: translateX(4px);
}

/* ---------- Contact / sitemap ---------- */
#contact ul,
#sitemap ul,
#editorial ul {
  list-style: none;
  padding: 0;
}

#contact > ul li {
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

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

#sitemap > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap > ul li {
  margin: 0;
}

#sitemap > ul a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.28s var(--ease);
}

#sitemap > ul a:hover {
  color: #fff;
  background: var(--gradient-hero);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 79, 55, 0.28);
}

#sitemap h3 {
  margin-top: 1.8em;
}

#sitemap h3 + ul a {
  color: var(--brand);
  background: transparent;
  border-style: dashed;
}

#sitemap h3 + ul a:hover {
  color: #fff;
}

#editorial ul li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-strong);
}

#editorial ul li:last-child {
  border-bottom: none;
}

/* ---------- Legal ---------- */
#legal {
  background: var(--gradient-soft), var(--card);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 60px;
  padding: 40px 20px 50px;
  text-align: center;
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--ink-mute);
}

footer a {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--gradient-hero);
  box-shadow: 0 8px 22px rgba(233, 79, 55, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

footer a:hover,
footer a:focus-visible {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(233, 79, 55, 0.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-inner {
    padding: 10px 16px;
    justify-content: center;
    gap: 10px;
  }

  .nav-list {
    justify-content: center;
  }

  main {
    padding: 0 14px 44px;
  }

  section {
    padding: 24px 20px;
    border-radius: var(--radius);
    margin-top: 28px;
  }

  #hero {
    padding: 30px 22px;
    border-radius: var(--radius);
  }

  #hero h1 {
    max-width: none;
  }
}

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

  .nav-list a {
    padding: 6px 11px;
    font-size: 0.85rem;
  }

  .brand-name {
    font-size: 1rem;
  }

  section {
    padding: 20px 16px;
  }

  #articles article {
    padding: 18px;
  }

  #news li {
    padding: 12px 14px;
  }

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

  #hero .cta {
    width: 100%;
    justify-content: center;
  }
}

@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 {
  #site-header,
  footer,
  #hero::before,
  #hero::after {
    display: none;
  }

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

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