:root {
  --brand: #e8542a;
  --brand-2: #ff8a3d;
  --brand-3: #ffb347;
  --brand-soft: rgba(232, 84, 42, 0.12);
  --bg: #fdf9f5;
  --bg-2: #fff6ef;
  --bg-3: #f4ece4;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.55);
  --border: rgba(232, 84, 42, 0.16);
  --border-strong: rgba(232, 84, 42, 0.3);
  --text: #2b211c;
  --text-2: #5c4a40;
  --text-3: #8a766b;
  --shadow-sm: 0 2px 10px rgba(120, 60, 30, 0.06);
  --shadow-md: 0 10px 30px rgba(120, 60, 30, 0.1);
  --shadow-lg: 0 20px 50px rgba(120, 60, 30, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff7a4d;
    --brand-2: #ff9d5c;
    --brand-3: #ffc078;
    --brand-soft: rgba(255, 122, 77, 0.16);
    --bg: #14100e;
    --bg-2: #1b1512;
    --bg-3: #221a16;
    --surface: rgba(38, 29, 25, 0.72);
    --surface-solid: #241c18;
    --surface-2: rgba(46, 35, 30, 0.55);
    --border: rgba(255, 140, 90, 0.18);
    --border-strong: rgba(255, 140, 90, 0.34);
    --text: #f4ece6;
    --text-2: #cbb9ae;
    --text-3: #9c887c;
    --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);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(232, 84, 42, 0.1), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 179, 71, 0.12), transparent 46%),
    radial-gradient(circle at 50% 100%, rgba(232, 84, 42, 0.06), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  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 {
  color: var(--brand-2);
}

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

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

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

h1 {
  font-size: clamp(1.7rem, 4.4vw, 2.9rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.05rem);
  position: relative;
  padding-bottom: 0.55em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
}

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

h4 {
  font-size: 1.02rem;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
  color: var(--text-2);
}

li {
  margin-bottom: 0.45em;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.3em;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

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

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--brand), var(--brand-2));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-3);
}

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

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  padding: 6px 2px;
  position: relative;
  white-space: nowrap;
  background: linear-gradient(92deg, var(--brand), var(--brand-2) 60%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

header nav > a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

header nav > a:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

header nav > a:hover::after {
  transform: scaleX(1);
}

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

header nav ul li {
  margin: 0;
}

header nav ul a {
  display: inline-block;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

header nav ul a:hover {
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(232, 84, 42, 0.16);
}

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

main {
  display: block;
}

main > article {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

section {
  margin: 0 0 34px;
  padding: 30px clamp(18px, 3.4vw, 40px);
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3), transparent 85%);
  opacity: 0.85;
}

section:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

section > h2:first-child {
  margin-top: 0;
}

section p:last-child,
section ul:last-child,
section ol:last-child,
section blockquote:last-child {
  margin-bottom: 0;
}

/* ===================== HERO ===================== */

#hero {
  margin-top: 28px;
  padding: clamp(34px, 6vw, 68px) clamp(20px, 4vw, 52px);
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.28), transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.2), transparent 50%),
    linear-gradient(125deg, #e8542a 0%, #f97316 42%, #ffa53d 72%, #ffc46b 100%);
  border: none;
  color: #fff;
  box-shadow: 0 24px 60px rgba(232, 84, 42, 0.32);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
  filter: blur(10px);
  z-index: -1;
  animation: heroFloat 14s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -8%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
  filter: blur(8px);
  z-index: -1;
  animation: heroFloat 18s ease-in-out infinite reverse;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, 22px, 0) scale(1.06);
  }
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(120, 40, 10, 0.28);
  max-width: 20em;
}

#hero p {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.96rem, 1.6vw, 1.06rem);
  max-width: 62em;
  margin-bottom: 0;
  text-shadow: 0 1px 10px rgba(120, 40, 10, 0.18);
}

/* ===================== INNER CONTENT ===================== */

section > h3 {
  margin-top: 1.6em;
  padding-left: 14px;
  position: relative;
}

section > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  bottom: 0.28em;
  width: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
}

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

/* Cards for repeated children */

#products ul,
#howto ul,
#howto ol,
#contact ul,
#links ul,
#sitemap ul {
  list-style: none;
  padding: 0;
  margin: 1.1em 0;
  display: grid;
  gap: 12px;
}

#products ul {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#products ul li {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#products ul li:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

#products ul li::marker {
  content: "";
}

#links ul {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

#links ul li {
  margin: 0;
}

#links ul a {
  display: block;
  padding: 14px 18px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease), color 0.3s var(--ease);
}

#links ul a:hover {
  transform: translateY(-4px) scale(1.01);
  color: var(--brand);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#sitemap ul {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#sitemap ul li {
  margin: 0;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

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

#sitemap ul a {
  display: block;
  color: var(--text-2);
  font-size: 0.94rem;
}

#sitemap ul a:hover {
  color: var(--brand);
}

#contact ul {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

#contact ul li {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

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

#news article,
#articles article {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 22px;
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease), background 0.35s var(--ease);
}

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

#news article::after,
#articles article::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-3), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#news article:hover::after,
#articles article:hover::after {
  transform: scaleX(1);
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.35em;
  transition: color 0.3s var(--ease);
}

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

#articles article p {
  font-size: 0.95rem;
}

#articles article p a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand);
  transition: background 0.28s var(--ease), transform 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

#articles article p a:hover {
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 6px 18px rgba(232, 84, 42, 0.3);
}

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

#faq h3 {
  margin-top: 1.4em;
  padding: 14px 18px;
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#faq h3::before {
  display: none;
}

#faq h3:hover {
  background: var(--brand-soft);
  border-color: var(--border-strong);
  border-left-color: var(--brand-2);
  box-shadow: var(--shadow-sm);
}

#faq h3 + p {
  padding: 0 4px 0 18px;
  font-size: 0.95rem;
}

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

#howto ol {
  counter-reset: howto;
  list-style: none;
  padding: 0;
}

#howto ol li {
  counter-increment: howto;
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 58px;
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(232, 84, 42, 0.32);
}

#howto ol li:hover {
  transform: translateX(5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

#howto ul li {
  margin: 0;
  padding: 12px 18px 12px 40px;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#howto ul li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 0 0 4px var(--brand-soft);
}

#howto ul li:hover {
  transform: translateX(5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

/* ===================== KNOWLEDGE ===================== */

#knowledge h3 {
  margin-top: 1.5em;
}

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

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

footer {
  margin-top: 40px;
  padding: 44px 20px 36px;
  background:
    radial-gradient(circle at 15% 0%, rgba(232, 84, 42, 0.14), transparent 50%),
    linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--text-3);
  line-height: 1.7;
}

footer p:first-child {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(92deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

footer nav {
  margin-top: 18px;
}

footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 6px;
}

footer nav ul li {
  margin: 0;
}

footer nav ul a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text-2);
  border-radius: var(--radius-pill);
  transition: color 0.28s var(--ease), background 0.28s var(--ease),
    transform 0.28s var(--ease);
}

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

/* ===================== SCROLL ANIMATION ===================== */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    section,
    #news article,
    #articles article {
      animation: revealUp linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 26%;
    }
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@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 nav {
    gap: 10px;
    padding: 8px 16px;
    min-height: auto;
  }

  header nav > a {
    font-size: 1.08rem;
  }

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

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

  header nav ul a {
    padding: 6px 11px;
    font-size: 0.85rem;
  }

  section {
    margin-bottom: 24px;
    padding: 24px 18px;
    border-radius: var(--radius);
  }

  #hero {
    margin-top: 18px;
    padding: 34px 20px;
  }
}

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

  main > article {
    padding: 0 12px 24px;
  }

  section {
    padding: 22px 15px;
    border-radius: var(--radius);
  }

  h2::after {
    width: 44px;
    height: 3px;
  }

  #hero {
    padding: 30px 16px;
  }

  #products ul,
  #contact ul,
  #links ul,
  #sitemap ul,
  #howto ul,
  #howto ol {
    grid-template-columns: 1fr;
  }

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

  #news article::after,
  #articles article::after {
    left: 15px;
    right: 15px;
  }

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

  #faq h3 + p {
    padding-left: 12px;
  }

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

  #howto ol li::before {
    left: 12px;
    width: 26px;
    height: 26px;
  }

  #howto ul li {
    padding: 11px 14px 11px 34px;
  }

  #howto ul li::before {
    left: 14px;
  }

  blockquote {
    padding: 0.9em 1.1em;
  }

  footer {
    padding: 34px 14px 28px;
  }
}

@media (hover: none) {
  section:hover,
  #products ul li:hover,
  #contact ul li:hover,
  #links ul a:hover,
  #sitemap ul li:hover,
  #news article:hover,
  #articles article:hover,
  #howto ol li:hover,
  #howto ul li:hover,
  header nav ul a:hover,
  footer nav ul a:hover {
    transform: none;
  }
}