:root {
  --lemon-50: #fffdf2;
  --lemon-100: #fff8d6;
  --lemon-200: #ffef a8;
  --lemon-300: #ffe27a;
  --lemon-400: #ffd23f;
  --lemon-500: #f7b500;
  --lemon-600: #d99a00;
  --lemon-700: #a87400;
  --ink-900: #1c1a14;
  --ink-800: #2a271e;
  --ink-700: #3b372c;
  --ink-600: #55503f;
  --ink-500: #6f6955;
  --ink-400: #8d876f;
  --ink-300: #b6b09a;
  --ink-200: #d8d3c2;
  --ink-100: #ece9df;
  --ink-50: #f7f5ee;
  --white: #ffffff;
  --bg: #fdfcf7;
  --bg-soft: #f7f4ea;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --text: #2a271e;
  --text-soft: #55503f;
  --text-muted: #8d876f;
  --border: rgba(28, 26, 20, 0.09);
  --border-strong: rgba(28, 26, 20, 0.16);
  --accent: #f7b500;
  --accent-strong: #d99a00;
  --accent-soft: #fff3c4;
  --shadow-sm: 0 2px 8px rgba(28, 26, 20, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 26, 20, 0.08);
  --shadow-lg: 0 24px 60px rgba(28, 26, 20, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --container: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.35s;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-soft: #1a1813;
    --surface: #1f1d17;
    --surface-glass: rgba(31, 29, 23, 0.72);
    --text: #f4f1e6;
    --text-soft: #cfcab8;
    --text-muted: #9a947f;
    --border: rgba(244, 241, 230, 0.1);
    --border-strong: rgba(244, 241, 230, 0.2);
    --accent: #ffd23f;
    --accent-strong: #f7b500;
    --accent-soft: rgba(255, 210, 63, 0.14);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 210, 63, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(247, 181, 0, 0.12), transparent 55%);
  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(--accent-strong);
  text-decoration: none;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

a:hover {
  color: var(--accent);
}

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

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

li {
  margin: 0.35em 0;
}

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

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(120deg, var(--ink-900), var(--accent-strong) 55%, var(--accent) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-color-scheme: dark) {
  h1 {
    background: linear-gradient(120deg, #fff8d6, var(--accent) 50%, var(--accent-strong));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  position: relative;
  padding-bottom: 0.45em;
}

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

h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.2em;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text);
  font-style: normal;
}

blockquote::before {
  content: "“";
  font-size: 1.6em;
  line-height: 0;
  color: var(--accent-strong);
  margin-right: 0.1em;
  vertical-align: -0.2em;
}

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

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

header > div > a:first-child {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

header > div > a:first-child::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 4px 12px rgba(247, 181, 0, 0.45);
  flex: 0 0 auto;
}

header nav {
  flex: 1;
  min-width: 0;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

header nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

header nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

/* ---------- Main & Sections ---------- */
main {
  display: block;
}

main > section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 20px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

main > section + section {
  border-top: 1px solid var(--border);
}

/* reveal animation */
main > section {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal 0.7s var(--ease) forwards;
}

main > section:nth-of-type(1) { animation-delay: 0.02s; }
main > section:nth-of-type(2) { animation-delay: 0.05s; }
main > section:nth-of-type(3) { animation-delay: 0.08s; }
main > section:nth-of-type(4) { animation-delay: 0.11s; }
main > section:nth-of-type(5) { animation-delay: 0.14s; }
main > section:nth-of-type(6) { animation-delay: 0.17s; }
main > section:nth-of-type(7) { animation-delay: 0.2s; }
main > section:nth-of-type(n+8) { animation-delay: 0.22s; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  main > section {
    opacity: 1;
    transform: none;
    animation: reveal-view linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
  @keyframes reveal-view {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ---------- Hero ---------- */
#hero {
  max-width: none;
  padding: 0;
  border-top: none;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(255, 210, 63, 0.35), transparent 60%),
    radial-gradient(700px 420px at 92% 20%, rgba(247, 181, 0, 0.22), transparent 55%),
    linear-gradient(135deg, #fff8d6 0%, #fff3c4 40%, #ffe9a3 100%);
  position: relative;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  #hero {
    background:
      radial-gradient(900px 420px at 12% 0%, rgba(255, 210, 63, 0.18), transparent 60%),
      radial-gradient(700px 420px at 92% 20%, rgba(247, 181, 0, 0.14), transparent 55%),
      linear-gradient(135deg, #221f16 0%, #1c1a13 45%, #171510 100%);
  }
}

#hero::before,
#hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

#hero::before {
  width: 320px;
  height: 320px;
  top: -120px;
  right: 8%;
  background: rgba(255, 210, 63, 0.5);
}

#hero::after {
  width: 260px;
  height: 260px;
  bottom: -140px;
  left: 4%;
  background: rgba(247, 181, 0, 0.35);
}

#hero > div {
  max-width: var(--container);
  margin: 0 auto;
  padding: 64px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

#hero h1 {
  margin-bottom: 0.5em;
}

#hero p {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 62ch;
}

#hero p:last-child {
  margin-bottom: 0;
  padding: 14px 18px;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 0.96rem;
}

#hero > div > div:last-child {
  display: flex;
  justify-content: center;
}

#hero svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  padding: 10px;
  transition: transform 0.6s var(--ease);
}

#hero svg:hover {
  transform: translateY(-6px) rotate(-1.2deg);
}

/* ---------- Cards for generic sections ---------- */
#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#article-detail-1,
#faq,
#howto,
#contact,
#sitemap,
#links,
#privacy,
#disclaimer,
#copyright {
  position: relative;
}

/* Card-like blocks */
#news article,
#articles article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

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

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

#news article h3,
#articles article h3 {
  margin-bottom: 0.4em;
}

#news article p,
#articles article p {
  font-size: 0.95rem;
  margin-bottom: 0.6em;
}

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

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

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

#articles article a:hover {
  background: var(--accent);
  color: #1c1a14;
  transform: translateY(-1px);
}

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

/* Products list */
#products ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 1.2em 0 0;
}

#products ul li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px 14px 44px;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

#products ul li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 13px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #1c1a14;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

#products ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Solutions blocks */
#solutions h3,
#cases h3,
#brand h3,
#contact h3,
#howto h3 {
  margin-top: 1.6em;
  display: flex;
  align-items: center;
  gap: 10px;
}

#solutions h3::before,
#cases h3::before,
#brand h3::before,
#contact h3::before,
#howto h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: 0 0 auto;
}

#solutions h3:first-of-type,
#cases h3:first-of-type,
#brand h3:first-of-type,
#contact h3:first-of-type,
#howto h3:first-of-type {
  margin-top: 0;
}

/* Cases */
#cases blockquote {
  display: inline-block;
  margin: 0.5em 0.6em 0.5em 0;
  font-size: 0.92rem;
}

/* FAQ */
#faq h3 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 14px 18px 12px 46px;
  margin: 0;
  position: relative;
  font-size: 1rem;
  transition: background var(--dur) var(--ease);
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #1c1a14;
  font-size: 0.8rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

#faq h3 + p {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 12px 18px 16px;
  margin: 0 0 12px;
  font-size: 0.94rem;
  transition: background var(--dur) var(--ease);
}

#faq h3:hover {
  background: var(--accent-soft);
}

#faq h3:hover + p {
  background: var(--accent-soft);
}

/* HowTo */
#howto ul,
#howto ol {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px 18px 44px;
  box-shadow: var(--shadow-sm);
}

#howto ol li::marker {
  color: var(--accent-strong);
  font-weight: 800;
}

#howto ul li::marker {
  color: var(--accent-strong);
}

/* Contact */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#contact ul li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.94rem;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

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

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

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

#sitemap ul a,
#links ul a {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur) var(--ease);
}

#sitemap ul a:hover,
#links ul a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1c1a14;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(247, 181, 0, 0.35);
}

/* Privacy / disclaimer / copyright */
#privacy p,
#disclaimer p,
#copyright p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink-900);
  color: var(--ink-200);
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong), var(--accent));
}

footer > div {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px;
}

footer p {
  margin: 0.35em 0;
  font-size: 0.88rem;
  color: var(--ink-300);
  line-height: 1.7;
}

footer p:first-child {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.6em;
}

footer p:last-child {
  margin-top: 1em;
  padding-top: 1em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-400);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  #hero > div {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 20px;
  }

  #hero > div > div:last-child {
    order: -1;
  }

  #hero svg {
    max-width: 300px;
  }

  header > div {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }

  header nav ul {
    justify-content: flex-start;
    gap: 2px;
  }

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

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

  main > section {
    padding: 40px 16px;
  }

  #hero > div {
    padding: 40px 16px;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  #hero p:last-child {
    padding: 12px 14px;
    font-size: 0.92rem;
  }

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

  #products ul,
  #contact ul {
    grid-template-columns: 1fr;
  }

  #faq h3 {
    padding: 12px 14px 10px 40px;
    font-size: 0.95rem;
  }

  #faq h3 + p {
    padding: 10px 14px 14px;
  }

  #howto ul,
  #howto ol {
    padding: 14px 16px 14px 38px;
  }

  footer > div {
    padding: 28px 16px;
  }
}

@media (max-width: 400px) {
  header > div > a:first-child {
    font-size: 0.95rem;
  }

  header nav a {
    padding: 5px 8px;
    font-size: 0.8rem;
  }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  main > section {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print ---------- */
@media print {
  header,
  footer,
  #hero svg {
    display: none;
  }

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

  main > section {
    opacity: 1;
    transform: none;
    padding: 16px 0;
    border-top: 1px solid #ddd;
  }

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