:root {
  --primary: #2c3e50;
  --primary-light: #34495e;
  --accent: #e74c3c;
  --accent-soft: #ff6b5b;
  --accent-2: #f39c12;
  --gradient-1: linear-gradient(135deg, #2c3e50 0%, #4a6572 50%, #e74c3c 100%);
  --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 40%, #c0392b 100%);
  --bg: #f7f8fa;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-border: rgba(255, 255, 255, 0.4);
  --text: #2c3e50;
  --text-muted: #6b7a8a;
  --text-light: #95a5a6;
  --border: rgba(44, 62, 80, 0.1);
  --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.06);
  --shadow-md: 0 8px 30px rgba(44, 62, 80, 0.1);
  --shadow-lg: 0 16px 50px rgba(44, 62, 80, 0.15);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #e8edf2;
    --primary-light: #c9d4de;
    --accent: #ff6b5b;
    --accent-soft: #ff8a7a;
    --accent-2: #f5b041;
    --gradient-1: linear-gradient(135deg, #1a1a2e 0%, #2c3e50 50%, #c0392b 100%);
    --gradient-2: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #7b241c 100%);
    --bg: #12141a;
    --bg-card: #1c1f28;
    --bg-glass: rgba(28, 31, 40, 0.65);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text: #e8edf2;
    --text-muted: #9aa8b5;
    --text-light: #6b7a8a;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(231, 76, 60, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(102, 126, 234, 0.06) 0%, transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

ul {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.9rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-1);
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

strong {
  color: var(--text);
}

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

/* ============ HEADER ============ */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--bg-glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

header > div {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

header > div > a {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: transform var(--transition);
}

header > div > a:hover {
  transform: scale(1.03);
  -webkit-text-fill-color: transparent;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

nav ul li a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  position: relative;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width var(--transition);
}

nav ul li a:hover {
  color: var(--accent);
  background: rgba(231, 76, 60, 0.08);
  transform: translateY(-2px);
}

nav ul li a:hover::after {
  width: 40%;
}

/* ============ MAIN ============ */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main > section {
  margin: 2.5rem 0;
  padding: 2.2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition);
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

main > section:hover {
  box-shadow: var(--shadow-md);
}

main > section:nth-child(1) { animation-delay: 0.05s; }
main > section:nth-child(2) { animation-delay: 0.1s; }
main > section:nth-child(3) { animation-delay: 0.15s; }
main > section:nth-child(4) { animation-delay: 0.2s; }
main > section:nth-child(5) { animation-delay: 0.25s; }
main > section:nth-child(6) { animation-delay: 0.3s; }
main > section:nth-child(7) { animation-delay: 0.35s; }
main > section:nth-child(8) { animation-delay: 0.4s; }
main > section:nth-child(9) { animation-delay: 0.45s; }
main > section:nth-child(10) { animation-delay: 0.5s; }
main > section:nth-child(11) { animation-delay: 0.55s; }
main > section:nth-child(12) { animation-delay: 0.6s; }

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

/* ============ HERO ============ */
#hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  color: #fff;
  padding: 3.5rem 2.5rem;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(231, 76, 60, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatBlob 12s ease-in-out infinite;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatBlob 15s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  max-width: 900px;
}

#hero h1::after {
  display: none;
}

#hero p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  max-width: 820px;
  font-size: 1.02rem;
  line-height: 1.9;
}

#hero p:first-of-type {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.95);
}

/* ============ BRAND / PRODUCTS / SOLUTIONS ============ */
#brand,
#products,
#solutions,
#cases,
#news,
#howto,
#contact {
  position: relative;
}

#brand h3,
#products h3,
#solutions h3,
#cases h3,
#news h3,
#howto h3,
#contact h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#brand h3::before,
#products h3::before,
#solutions h3::before,
#cases h3::before,
#news h3::before,
#howto h3::before,
#contact h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1.1em;
  border-radius: 3px;
  background: var(--gradient-1);
  flex-shrink: 0;
}

/* ============ ARTICLES ============ */
#articles {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

#articles > h2 {
  padding-left: 0.2rem;
}

#articles > article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

#articles > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-1);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--transition);
}

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

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

#articles > article h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text);
  transition: color var(--transition);
}

#articles > article:hover h3 {
  color: var(--accent);
}

#articles > article p:nth-of-type(1) {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.7rem;
  background: rgba(231, 76, 60, 0.08);
  border-radius: 999px;
}

#articles > article p:nth-of-type(2) {
  font-size: 0.96rem;
  line-height: 1.85;
  color: var(--text-muted);
}

#articles > article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.35rem 0;
  position: relative;
}

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

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

/* ============ FAQ ============ */
#faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}

#faq details:hover {
  border-color: rgba(231, 76, 60, 0.3);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: rgba(231, 76, 60, 0.35);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}

#faq summary {
  cursor: pointer;
  padding: 1.05rem 1.4rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  transition: color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

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

#faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}

#faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

#faq summary:hover {
  color: var(--accent);
  background: rgba(231, 76, 60, 0.04);
}

#faq details p {
  padding: 0 1.4rem 1.3rem;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--text-muted);
  animation: fadeIn 0.4s ease;
}

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

/* ============ CONTACT ============ */
#contact p {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 0;
}

#contact p:last-of-type {
  border-bottom: none;
}

#contact h3 {
  margin-top: 1.6rem;
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--gradient-1);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ============ FOOTER ============ */
footer {
  margin-top: 3rem;
  padding: 3rem 1.5rem 2rem;
  background: var(--gradient-hero);
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(231, 76, 60, 0.15) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

footer > section {
  max-width: 1240px;
  margin: 0 auto 1.8rem;
  position: relative;
  z-index: 1;
}

footer h2 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.7rem;
  padding-bottom: 0.6rem;
}

footer h2::after {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 40px;
  height: 3px;
}

footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.85;
  margin-bottom: 0.5rem;
}

footer > p:last-of-type,
footer > p:nth-last-of-type(2) {
  text-align: center;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

footer > p:nth-last-of-type(2) {
  margin-top: 2rem;
  border-top: none;
  padding-top: 0;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--primary));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

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

/* ============ FOCUS ============ */
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
  main > section {
    padding: 1.8rem;
    border-radius: var(--radius);
  }

  #hero {
    padding: 2.8rem 1.8rem;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 130px;
  }

  body {
    font-size: 15px;
  }

  header > div {
    padding: 0.7rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  header > div > a {
    font-size: 1.05rem;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  nav ul {
    flex-wrap: nowrap;
    gap: 0.2rem;
    padding-bottom: 0.2rem;
  }

  nav ul li a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  main {
    padding: 0 1rem;
  }

  main > section {
    margin: 1.5rem 0;
    padding: 1.4rem;
    border-radius: var(--radius);
  }

  #hero {
    padding: 2.2rem 1.4rem;
  }

  #hero p {
    font-size: 0.95rem;
  }

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

  #articles {
    padding: 0;
  }

  #articles > article {
    padding: 1.3rem 1.2rem;
  }

  #articles > article h3 {
    font-size: 1.1rem;
  }

  #faq summary {
    padding: 0.95rem 1.1rem;
    font-size: 0.95rem;
  }

  #faq details p {
    padding: 0 1.1rem 1.1rem;
    font-size: 0.92rem;
  }

  footer {
    padding: 2.2rem 1rem 1.6rem;
  }

  footer > p:last-of-type,
  footer > p:nth-last-of-type(2) {
    font-size: 0.8rem;
  }
}

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

  header > div {
    padding: 0.6rem 0.8rem;
  }

  main {
    padding: 0 0.8rem;
  }

  main > section {
    padding: 1.2rem;
    margin: 1.2rem 0;
  }

  #hero {
    padding: 1.8rem 1.2rem;
  }

  #hero h1 {
    font-size: 1.5rem;
  }

  #sitemap ul,
  #links ul {
    gap: 0.5rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }

  #articles > article {
    padding: 1.1rem 1rem;
  }
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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

/* ============ PRINT ============ */
@media print {
  header,
  footer,
  nav,
  #sitemap,
  #links {
    display: none;
  }

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

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    opacity: 1;
    transform: none;
  }
}
</style>