:root {
  --brand: #c0392b;
  --brand-2: #e74c3c;
  --brand-3: #ff6b5a;
  --accent: #f39c12;
  --bg: #f7f5f2;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #1f2328;
  --text-2: #5a6470;
  --text-3: #8a94a0;
  --border: rgba(31, 35, 40, 0.08);
  --shadow-sm: 0 2px 10px rgba(31, 35, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(31, 35, 40, 0.1);
  --shadow-lg: 0 20px 50px rgba(31, 35, 40, 0.14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --blur: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-2: #161a20;
    --surface: rgba(30, 35, 44, 0.68);
    --surface-solid: #1a1f27;
    --text: #eef1f5;
    --text-2: #b6bfca;
    --text-3: #7f8a97;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 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-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(231, 76, 60, 0.12), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(243, 156, 18, 0.1), transparent 55%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 80% 100%, rgba(192, 57, 43, 0.08), transparent 70%);
}

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

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

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  line-height: 1.25;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  position: relative;
  padding-left: 18px;
}

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

h3 {
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  color: var(--text);
}

h4,
h5,
h6 {
  font-size: 1.02rem;
}

::selection {
  background: rgba(231, 76, 60, 0.22);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-3), var(--brand));
  background-clip: content-box;
}

/* ============ HEADER / BANNER ============ */

header {
  position: relative;
  max-width: var(--maxw);
  margin: 28px auto 0;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border-radius: var(--radius-xl);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, #c0392b 0%, #e74c3c 42%, #ff7043 72%, #f39c12 100%);
  box-shadow: var(--shadow-lg);
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px 320px at 88% 12%, rgba(255, 255, 255, 0.28), transparent 62%),
    radial-gradient(420px 300px at 8% 92%, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}

header h1 {
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
  animation: fadeUp 0.8s var(--ease) both;
}

header p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  max-width: 900px;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.14);
  animation: fadeUp 0.8s 0.12s var(--ease) both;
}

/* ============ NAV ============ */

nav {
  position: sticky;
  top: 12px;
  z-index: 100;
  max-width: var(--maxw);
  margin: 18px auto 0;
  padding: 10px clamp(12px, 2vw, 20px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.8s 0.2s var(--ease) both;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

nav li {
  flex: 0 0 auto;
}

nav a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

nav a:hover,
nav a:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.32);
}

nav a:hover::after,
nav a:focus-visible::after {
  width: 0;
}

/* ============ MAIN LAYOUT ============ */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 32px) 40px;
  display: block;
}

main > section {
  position: relative;
  margin: 0 0 clamp(24px, 4vw, 44px);
  padding: clamp(22px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(160%);
  backdrop-filter: blur(var(--blur)) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 28%;
}

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

main > section:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(231, 76, 60, 0.28);
}

main > section > h2 {
  margin-bottom: 22px;
}

main > section > h3 {
  margin-top: 26px;
}

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

/* ============ ARTICLES ============ */

#articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
  align-items: stretch;
}

#articles > h2 {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

#articles article {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-2), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

#articles article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(231, 76, 60, 0.3);
}

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

#articles article h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.5;
}

#articles article h3 + p {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#articles article h3 + p::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

#articles article p {
  font-size: 0.94rem;
  color: var(--text-2);
}

#articles article p:last-child {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 12px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 6px 16px rgba(192, 57, 43, 0.26);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease);
}

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

#articles article a:hover,
#articles article a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 10px 24px rgba(192, 57, 43, 0.36);
}

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

/* ============ FAQ ============ */

#faq h3 {
  position: relative;
  padding: 14px 18px 14px 46px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  cursor: default;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

#faq h3:hover {
  transform: translateX(4px);
  border-color: rgba(231, 76, 60, 0.32);
  box-shadow: var(--shadow-sm);
}

#faq h3 + p {
  margin: 10px 0 18px;
  padding-left: 18px;
  border-left: 3px solid var(--border);
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ============ HOWTO ============ */

#howto h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--brand);
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.18);
}

@media (prefers-color-scheme: dark) {
  #howto h3 {
    color: var(--brand-3);
    background: rgba(231, 76, 60, 0.16);
  }
}

#howto h3 + p {
  margin-top: 12px;
}

#howto p {
  font-size: 0.96rem;
}

/* ============ NEWS / CASES ============ */

#news h3,
#cases h3 {
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

#news h3 + p,
#cases h3 + p {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#news h3 + p::before {
  content: "🕒";
  font-size: 0.85em;
}

#cases p:last-child,
#cases p:nth-last-child(2) {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.08), rgba(243, 156, 18, 0.08));
  border-left: 4px solid var(--brand-2);
  font-style: italic;
  color: var(--text-2);
}

/* ============ CONTACT ============ */

#contact p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact p:hover {
  transform: translateX(4px);
  border-color: rgba(231, 76, 60, 0.3);
}

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

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

/* ============ SITEMAP / LINKS ============ */

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

#sitemap li,
#links li {
  flex: 0 0 auto;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

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

/* ============ LEGAL ============ */

#legal {
  background:
    linear-gradient(160deg, rgba(192, 57, 43, 0.06), rgba(243, 156, 18, 0.05)),
    var(--surface);
}

#legal h3 {
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  #legal h3 {
    color: var(--brand-3);
  }
}

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

/* ============ FOOTER ============ */

footer {
  max-width: var(--maxw);
  margin: 0 auto 32px;
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px);
  border-radius: var(--radius-lg);
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, #2b2f36 0%, #1c2027 55%, #14171c 100%);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 200px at 20% 0%, rgba(231, 76, 60, 0.22), transparent 65%),
    radial-gradient(420px 200px at 85% 100%, rgba(243, 156, 18, 0.18), transparent 65%);
  pointer-events: none;
}

footer p {
  position: relative;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

footer p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

/* ============ ANIMATIONS ============ */

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

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@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 {
    margin-top: 16px;
    border-radius: var(--radius-lg);
  }

  nav {
    top: 8px;
    border-radius: var(--radius);
    padding: 8px 10px;
  }

  nav ul {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

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

  nav a {
    white-space: nowrap;
    padding: 7px 14px;
    font-size: 0.86rem;
  }

  main > section {
    border-radius: var(--radius);
  }

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

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

  header {
    margin: 10px 10px 0;
    padding: 28px 20px;
    border-radius: var(--radius);
  }

  nav {
    margin: 12px 10px 0;
  }

  main {
    padding: 20px 10px 28px;
  }

  main > section {
    padding: 20px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

  #faq h3 {
    padding: 12px 14px 12px 42px;
    font-size: 0.98rem;
  }

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

  #articles article {
    padding: 18px;
  }

  footer {
    margin: 0 10px 20px;
    border-radius: var(--radius);
  }
}

/* ============ PRINT ============ */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  nav,
  footer::before,
  header::before,
  header::after {
    display: none;
  }

  main > section,
  header,
  footer {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}