:root {
  --brand: #ff6b35;
  --brand-2: #ffb347;
  --brand-3: #06d6a0;
  --brand-4: #118ab2;
  --ink: #1f2430;
  --ink-soft: #4a5163;
  --muted: #6b7280;
  --bg: #fff8f3;
  --bg-2: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --border: rgba(31, 36, 48, 0.1);
  --shadow: 0 18px 45px rgba(255, 107, 53, 0.16);
  --shadow-soft: 0 8px 24px rgba(31, 36, 48, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --ink: #f2f4f8;
  --ink-soft: #cbd2e0;
  --muted: #9aa4b5;
  --bg: #0f1218;
  --bg-2: #151a23;
  --card: rgba(26, 32, 43, 0.72);
  --card-solid: #1a202b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.32);
}

* {
  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", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 179, 71, 0.18), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(6, 214, 160, 0.14), transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
  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 {
  color: var(--brand-4);
}

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

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 700;
}

h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

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

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

li {
  margin-bottom: 0.4em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 243, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

[data-theme="dark"] #site-header {
  background: rgba(15, 18, 24, 0.72);
}

#site-header.scrolled {
  box-shadow: 0 10px 30px rgba(31, 36, 48, 0.1);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--brand), var(--brand-2) 50%, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  transition: transform 0.3s var(--ease);
}

.logo:hover {
  transform: scale(1.04);
}

#main-nav {
  flex: 1 1 auto;
}

#main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
}

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

#main-nav a:hover {
  background: rgba(255, 107, 53, 0.12);
  color: var(--brand);
  transform: translateY(-2px);
}

#site-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#search-input {
  width: 190px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.25s var(--ease);
}

#search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.18);
  width: 220px;
}

#site-search button,
#theme-toggle,
#menu-toggle {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
  white-space: nowrap;
}

#theme-toggle {
  background: var(--card);
  color: var(--ink);
  border-color: var(--border);
}

#menu-toggle {
  display: none;
  background: var(--card);
  color: var(--ink);
  border-color: var(--border);
}

#site-search button:hover,
#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ============ Main / layout ============ */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.2rem 4rem;
}

section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 100px;
}

/* ============ Breadcrumb ============ */
#breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 0;
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

#breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--muted);
  opacity: 0.6;
}

/* ============ Hero ============ */
#hero {
  position: relative;
  padding: 2.2rem 1.6rem 2.4rem;
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 209, 102, 0.55), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(6, 214, 160, 0.4), transparent 45%),
    linear-gradient(135deg, #ff6b35 0%, #ff8c42 35%, #ffb347 70%, #06d6a0 130%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  height: 160%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 65%);
  transform: rotate(18deg);
  z-index: -1;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  max-width: 900px;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.94);
  max-width: 880px;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.14);
}

#banner-carousel {
  display: flex;
  gap: 1rem;
  margin: 1.6rem 0;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

#banner-carousel .slide {
  flex: 0 0 min(560px, 88%);
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#banner-carousel .slide:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.3);
}

#banner-carousel svg {
  width: 100%;
  display: block;
}

#stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 1.6rem;
}

#stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#stats .stat:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.28);
}

.stat-num {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

#stats .stat span:last-child {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.2rem;
}

/* ============ Generic section cards ============ */
#brand,
#products,
#solutions,
#cases,
#news,
#articles,
#faq,
#howto,
#contact,
#sitemap,
#links,
#legal {
  background: var(--card);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-soft);
}

#brand h2,
#products h2,
#solutions h2,
#cases h2,
#news h2,
#articles h2,
#faq h2,
#howto h2,
#contact h2,
#sitemap h2,
#links h2,
#legal h2 {
  position: relative;
  padding-bottom: 0.5rem;
}

#brand h2::after,
#products h2::after,
#solutions h2::after,
#cases h2::after,
#news h2::after,
#articles h2::after,
#faq h2::after,
#howto h2::after,
#contact h2::after,
#sitemap h2::after,
#links h2::after,
#legal h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
}

#brand h3,
#products h3,
#solutions h3,
#cases h3,
#howto h3 {
  margin-top: 1.6rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--brand);
}

#products h4,
#solutions h4,
#howto h4 {
  margin-top: 1.2rem;
  color: var(--brand-4);
}

[data-theme="dark"] #products h4,
[data-theme="dark"] #solutions h4,
[data-theme="dark"] #howto h4 {
  color: var(--brand-3);
}

/* ============ News / Articles ============ */
#news article,
#articles article {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.1rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(255, 107, 53, 0.4);
}

#news article h3,
#articles article h3 {
  margin-top: 0;
  color: var(--ink);
}

#news time,
#articles time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(255, 107, 53, 0.1);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

#articles article a {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#articles article a:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.35);
}

/* ============ Blockquote / cases ============ */
#cases blockquote {
  margin: 1rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(255, 107, 53, 0.1), rgba(6, 214, 160, 0.1));
  border-left: 4px solid var(--brand);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#cases blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

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

/* ============ FAQ ============ */
#faq details {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.8rem;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: var(--shadow-soft);
}

#faq details[open] {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(255, 107, 53, 0.06), transparent);
}

#faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 2rem;
  transition: color 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.14);
  color: var(--brand);
  font-weight: 800;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--brand);
  color: #fff;
}

#faq details p {
  margin: 0.7rem 0 0.2rem;
  animation: fadeSlide 0.4s var(--ease);
}

/* ============ Contact / sitemap / links ============ */
#contact p {
  margin-bottom: 0.5rem;
}

#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
}

/* ============ Footer ============ */
#site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.2rem 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

#site-footer p {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}

#site-footer a {
  font-weight: 700;
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  #stats {
    grid-template-columns: repeat(2, 1fr);
  }
  #search-input {
    width: 150px;
  }
  #search-input:focus {
    width: 170px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    gap: 0.6rem;
  }
  #main-nav {
    order: 5;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }
  #main-nav.open {
    max-height: 520px;
  }
  #main-nav ul {
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0;
  }
  #main-nav a {
    display: block;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
  }
  #menu-toggle {
    display: inline-block;
  }
  #site-search {
    order: 4;
    flex: 1 1 100%;
  }
  #search-input {
    flex: 1;
    width: auto;
  }
  #search-input:focus {
    width: auto;
  }
  #brand,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links,
  #legal {
    padding: 1.5rem 1.2rem;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 1rem 0.9rem 3rem;
  }
  #hero {
    padding: 1.6rem 1.1rem 1.8rem;
    border-radius: var(--radius);
  }
  #banner-carousel .slide {
    flex-basis: 92%;
  }
  #stats {
    gap: 0.6rem;
  }
  #stats .stat {
    padding: 0.8rem 0.4rem;
  }
  section {
    margin-bottom: 2.4rem;
  }
  #site-footer {
    padding: 1.6rem 0.9rem 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  #site-header,
  #site-search,
  #theme-toggle,
  #menu-toggle,
  #site-footer a {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  section {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}