:root {
  --brand: #c8452d;
  --brand-deep: #9e2f1c;
  --brand-soft: #e86a4f;
  --accent: #f2b544;
  --accent-soft: #ffd98a;
  --ink: #1f1a17;
  --ink-soft: #4a3f39;
  --ink-mute: #7a6c63;
  --bg: #fdf8f3;
  --bg-alt: #f6ece2;
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.72);
  --line: rgba(200, 69, 45, 0.14);
  --shadow-sm: 0 4px 14px rgba(158, 47, 28, 0.08);
  --shadow-md: 0 12px 34px rgba(158, 47, 28, 0.12);
  --shadow-lg: 0 24px 60px rgba(158, 47, 28, 0.18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff7a5c;
    --brand-deep: #ff9a80;
    --brand-soft: #d9533a;
    --accent: #ffc766;
    --accent-soft: #ffe3a8;
    --ink: #f4ece6;
    --ink-soft: #cdc0b7;
    --ink-mute: #9c8d83;
    --bg: #14100e;
    --bg-alt: #1c1714;
    --card: #1f1916;
    --card-glass: rgba(31, 25, 22, 0.66);
    --line: rgba(255, 122, 92, 0.2);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(242, 181, 68, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(200, 69, 45, 0.12), transparent 60%);
  background-attachment: fixed;
  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-deep);
}

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

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

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

h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.8rem);
  margin: 0 0 1rem;
  background: linear-gradient(120deg, var(--brand), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin: 0 0 1rem;
  position: relative;
  padding-left: 1.1rem;
}

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(--accent));
}

h3 {
  font-size: clamp(1.08rem, 2.2vw, 1.32rem);
  margin: 1.6rem 0 0.6rem;
}

h4 {
  font-size: 1.02rem;
  margin: 1.2rem 0 0.4rem;
  color: var(--brand-deep);
}

p {
  margin: 0 0 1rem;
}

blockquote {
  margin: 1.2rem 0;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius);
  background: var(--card-glass);
  border-left: 4px solid var(--brand);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-soft);
  font-style: normal;
}

blockquote p {
  margin: 0;
}

/* ============ HEADER ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.brand-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.brand-bar a {
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(110deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s var(--ease);
  display: inline-block;
}

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

.brand-slogan {
  font-size: 0.8rem;
  color: var(--ink-mute);
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: rgba(242, 181, 68, 0.16);
  border: 1px solid var(--line);
  white-space: nowrap;
}

nav[role="navigation"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem 0.7rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

nav[role="navigation"] ul {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  padding-bottom: 0.2rem;
}

nav[role="navigation"] li a {
  display: inline-block;
  padding: 0.32rem 0.8rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.25s var(--ease);
}

nav[role="navigation"] li a:hover,
nav[role="navigation"] li a:focus-visible {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-soft));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(200, 69, 45, 0.28);
  transform: translateY(-2px);
}

/* ============ MAIN LAYOUT ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

section {
  margin: 0 0 1.6rem;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
  animation: riseIn 0.7s var(--ease) both;
}

section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(200, 69, 45, 0.28);
}

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

/* stagger via nth-of-type */
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(n+11) { animation-delay: 0.4s; }

#intro {
  background:
    linear-gradient(135deg, rgba(200, 69, 45, 0.06), rgba(242, 181, 68, 0.1)),
    var(--card);
  border-color: rgba(200, 69, 45, 0.22);
  position: relative;
  overflow: hidden;
}

#intro::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 181, 68, 0.28), transparent 70%);
  pointer-events: none;
}

.hero-visual {
  margin: 1.4rem 0 0.4rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-visual:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

/* ============ ARTICLES / NEWS ============ */
article {
  margin: 0 0 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

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

article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--card);
}

article h3 {
  margin-top: 0;
}

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

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

article p {
  font-size: 0.94rem;
  color: var(--ink-mute);
}

article p a {
  display: inline-block;
  font-weight: 600;
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand), var(--brand-soft));
  color: #fff;
  font-size: 0.84rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

article p a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(200, 69, 45, 0.32);
}

/* ============ FAQ ============ */
#faq h3 {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  margin: 0.6rem 0 0.35rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 1rem;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3:hover {
  background: rgba(242, 181, 68, 0.14);
  border-color: rgba(200, 69, 45, 0.3);
  transform: translateX(3px);
}

#faq p {
  padding: 0 0.4rem 0 1rem;
  font-size: 0.94rem;
}

/* ============ HOWTO ============ */
#howto h4 {
  position: relative;
  padding-left: 1.7rem;
}

#howto h4::before {
  content: counter(step);
  counter-increment: step;
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 1.25rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

#howto {
  counter-reset: step;
}

/* ============ SITEMAP / LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

#sitemap li a,
#links li a {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  font-size: 0.88rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: all 0.28s var(--ease);
}

#sitemap li a:hover,
#links li a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-soft));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(200, 69, 45, 0.26);
}

/* ============ CONTACT ============ */
#contact {
  background:
    linear-gradient(140deg, rgba(200, 69, 45, 0.08), rgba(242, 181, 68, 0.12)),
    var(--card);
  border-color: rgba(200, 69, 45, 0.24);
}

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

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

/* ============ FOOTER ============ */
footer[role="contentinfo"] {
  margin-top: 1rem;
  padding: 2.2rem 1.25rem 1.6rem;
  background: linear-gradient(160deg, #2b1a14, #1a100c 70%);
  color: #d9ccc4;
  border-top: 3px solid var(--brand);
}

footer[role="contentinfo"] > section {
  max-width: var(--maxw);
  margin: 0 auto 1.2rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: none;
  box-shadow: none;
}

footer[role="contentinfo"] > section:hover {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.16);
}

footer h2 {
  color: #ffe6c9;
  font-size: 1.05rem;
  padding-left: 0.9rem;
}

footer h2::before {
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand-soft));
}

footer p {
  color: #bdaaa0;
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
}

footer p:last-child {
  margin-bottom: 0;
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  color: #a08d83;
  font-size: 0.84rem;
  padding: 0.35rem 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  main {
    padding: 1.4rem 1rem 2.4rem;
  }

  section {
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
  }

  .brand-bar {
    padding: 0.75rem 1rem;
  }

  nav[role="navigation"] {
    padding: 0 1rem 0.6rem;
  }
}

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

  .brand-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .brand-slogan {
    font-size: 0.74rem;
  }

  nav[role="navigation"] ul {
    gap: 0.3rem;
  }

  nav[role="navigation"] li a {
    font-size: 0.8rem;
    padding: 0.28rem 0.65rem;
  }

  main {
    padding: 1rem 0.8rem 2rem;
  }

  section {
    padding: 1.1rem 0.95rem;
    border-radius: var(--radius);
  }

  h2 {
    padding-left: 0.9rem;
  }

  h2::before {
    width: 4px;
  }

  article {
    padding: 0.9rem 0.9rem;
  }

  #faq h3 {
    font-size: 0.94rem;
    padding: 0.7rem 0.8rem;
  }

  #faq p {
    padding: 0 0.2rem 0 0.6rem;
  }

  #sitemap li a,
  #links li a {
    font-size: 0.82rem;
    padding: 0.34rem 0.8rem;
  }

  footer[role="contentinfo"] {
    padding: 1.5rem 0.8rem 1.2rem;
  }

  footer[role="contentinfo"] > section {
    padding: 0.9rem 0.95rem;
  }
}

@media (max-width: 380px) {
  .brand-slogan {
    display: none;
  }
}

/* ============ ACCESSIBILITY / 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;
  }
}

/* ============ SELECTION & SCROLLBAR ============ */
::selection {
  background: rgba(200, 69, 45, 0.22);
  color: var(--ink);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-soft));
  border-radius: 999px;
  border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-deep);
}

/* ============ PRINT ============ */
@media print {
  header[role="banner"],
  nav[role="navigation"],
  .hero-visual,
  footer[role="contentinfo"] {
    display: none;
  }

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

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