:root {
  --primary: #1E6FD9;
  --primary-dark: #0F4C9A;
  --primary-light: #4A90E2;
  --accent: #7FB3F5;
  --gradient-hero: linear-gradient(135deg, #1E6FD9 0%, #2563B0 45%, #0F4C9A 100%);
  --gradient-btn: linear-gradient(135deg, #2E7BE0 0%, #1E6FD9 100%);
  --gradient-card: linear-gradient(145deg, rgba(30, 111, 217, 0.08), rgba(127, 179, 245, 0.04));
  --bg: #F5F9FF;
  --bg-elevated: #FFFFFF;
  --bg-soft: #EAF2FD;
  --text: #14243A;
  --text-soft: #4A5B72;
  --text-muted: #7A8AA0;
  --border: rgba(30, 111, 217, 0.14);
  --shadow-sm: 0 2px 8px rgba(20, 36, 58, 0.06);
  --shadow-md: 0 8px 28px rgba(20, 36, 58, 0.10);
  --shadow-lg: 0 18px 48px rgba(20, 36, 58, 0.14);
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 72px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --primary: #4A90E2;
  --primary-dark: #1E6FD9;
  --primary-light: #7FB3F5;
  --accent: #A9CCF7;
  --gradient-hero: linear-gradient(135deg, #0B1B33 0%, #102A4C 50%, #0A1526 100%);
  --gradient-btn: linear-gradient(135deg, #3579D6 0%, #1E6FD9 100%);
  --gradient-card: linear-gradient(145deg, rgba(74, 144, 226, 0.14), rgba(127, 179, 245, 0.05));
  --bg: #0A1421;
  --bg-elevated: #111F33;
  --bg-soft: #16283F;
  --text: #EAF1FB;
  --text-soft: #B6C7DD;
  --text-muted: #8195AD;
  --border: rgba(127, 179, 245, 0.16);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --glass-bg: rgba(17, 31, 51, 0.62);
  --glass-border: rgba(127, 179, 245, 0.18);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(127, 179, 245, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(30, 111, 217, 0.10), transparent 55%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--primary-dark);
}

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

h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 750; }
h3 { font-size: clamp(1.1rem, 1.7vw, 1.35rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }

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

ul, ol { margin: 0 0 1em; padding-left: 1.3em; color: var(--text-soft); }
li { margin-bottom: 0.45em; }

strong { color: var(--text); font-weight: 700; }

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.4em;
  background: var(--gradient-card);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

blockquote p { margin: 0; }

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

.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;
}

:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(30, 111, 217, 0.06), var(--shadow-sm);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

.header-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  font-weight: 800;
}

.brand svg {
  transition: transform 0.4s var(--ease), filter 0.4s var(--ease);
  filter: drop-shadow(0 4px 10px rgba(30, 111, 217, 0.35));
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.brand-name {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
}

#main-nav {
  flex: 1;
  min-width: 0;
}

#main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

#main-nav ul::-webkit-scrollbar { display: none; }

#main-nav li { margin: 0; }

#main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-btn);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav a:hover {
  color: var(--primary);
  background: rgba(30, 111, 217, 0.08);
  transform: translateY(-1px);
}

#main-nav a:hover::after { width: 40%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#site-search {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 3px 3px 14px;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 111, 217, 0.14);
}

#search-input {
  width: 150px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  padding: 6px 0;
  outline: none;
  transition: width 0.35s var(--ease);
}

#search-input::placeholder { color: var(--text-muted); }

#search-input:focus { width: 200px; }

#site-search button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-btn);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 111, 217, 0.35);
  filter: brightness(1.06);
}

#theme-toggle,
#menu-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  transform: rotate(12deg) scale(1.08);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

#menu-toggle { display: none; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 60px;
}

section {
  margin: 0 0 40px;
  padding: 34px 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

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

section > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-btn);
  box-shadow: 0 2px 8px rgba(30, 111, 217, 0.4);
}

#hero {
  position: relative;
  margin: 28px 0 32px;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.18), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(127, 179, 245, 0.28), transparent 50%);
  pointer-events: none;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  pointer-events: none;
}

.hero-slider .slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  animation: heroKenBurns 8s ease-in-out infinite alternate;
}

.hero-slider .slide svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 36px 40px 44px;
  background: linear-gradient(180deg, rgba(10, 25, 48, 0.10), rgba(10, 25, 48, 0.55));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#hero-title {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
  max-width: 900px;
}

.hero-lead,
.hero-sub {
  color: rgba(255, 255, 255, 0.92);
  max-width: 820px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  color: #fff;
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  color: var(--primary-dark);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

#breadcrumb {
  margin: 0 0 32px;
  padding: 12px 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
}

#breadcrumb li {
  margin: 0;
  color: var(--text-muted);
}

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

#breadcrumb a { font-weight: 600; }

#breadcrumb [aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
}

#stats {
  background: var(--gradient-card);
  border: 1px solid var(--border);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats-list li {
  margin: 0;
  padding: 22px 16px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.stats-list li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.stat-num {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary);
  line-height: 1.2;
}

.stat-num::after {
  content: "+";
  font-size: 0.6em;
  margin-left: 2px;
  -webkit-text-fill-color: var(--primary-light);
}

.stats-list li:last-child .stat-num::after { content: "%"; }

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

.timeline {
  position: relative;
  list-style: none;
  padding-left: 26px;
  margin: 18px 0 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.timeline li {
  position: relative;
  margin-bottom: 14px;
  padding: 12px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 111, 217, 0.14);
}

.timeline li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

#products ul,
#solutions ul,
#scenes ul,
#howto ul,
#howto ol,
#sitemap ul,
#links ul {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

#products ul li,
#solutions ul li,
#scenes ul li,
#howto ul li,
#sitemap ul li,
#links ul li {
  position: relative;
  margin: 0;
  padding: 12px 16px 12px 44px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#products ul li::before,
#solutions ul li::before,
#scenes ul li::before,
#howto ul li::before,
#sitemap ul li::before,
#links ul li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-btn);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(30, 111, 217, 0.12);
}

#products ul li:hover,
#solutions ul li:hover,
#scenes ul li:hover,
#howto ul li:hover,
#sitemap ul li:hover,
#links ul li:hover {
  transform: translateX(6px);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

#howto ol {
  counter-reset: step;
}

#howto ol li {
  counter-increment: step;
  padding-left: 56px;
}

#howto ol li::before {
  content: counter(step);
  left: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(30, 111, 217, 0.35);
}

#cases article,
#news article,
#articles article {
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

#cases article h3,
#news article h3,
#articles article h3 {
  margin-bottom: 8px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(30, 111, 217, 0.10);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}

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

#articles article a:hover {
  background: var(--gradient-btn);
  color: #fff;
  transform: translateY(-2px);
}

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

#articles > div {
  margin-top: 16px;
  padding: 22px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

#articles > div h4 {
  color: var(--primary);
  margin-bottom: 10px;
}

#faq details {
  margin-bottom: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(30, 111, 217, 0.12);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

#faq details[open] summary {
  background: var(--gradient-card);
  color: var(--primary);
}

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

#faq details p {
  margin: 0;
  padding: 0 22px 18px;
  animation: faqFade 0.4s var(--ease);
}

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

#team,
#contact,
#links {
  background: var(--gradient-card);
}

#contact address {
  font-style: normal;
  padding: 20px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

#contact address p { margin: 0 0 0.5em; }
#contact address p:last-child { margin-bottom: 0; }

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

#site-footer {
  margin-top: 20px;
  padding: 48px 24px 28px;
  background: var(--gradient-hero);
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.12), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(127, 179, 245, 0.22), transparent 48%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5em;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.1rem;
}

.footer-legal h2 {
  font-size: 0.98rem;
  color: #fff;
  margin: 0 0 6px;
  padding: 0;
}

.footer-legal h2::after { display: none; }

.footer-legal h2:not(:first-child) {
  margin-top: 18px;
}

.footer-legal p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 0.6em;
}

.footer-legal p:last-child {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.84rem;
}

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-btn);
  box-shadow: 0 10px 26px rgba(30, 111, 217, 0.42);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 16px 34px rgba(30, 111, 217, 0.55);
}

.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);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1080px) {
  #main-nav a { padding: 8px 9px; font-size: 0.85rem; }
  #search-input { width: 120px; }
  #search-input:focus { width: 150px; }
}

@media (max-width: 920px) {
  :root { --header-h: 64px; }

  .header-inner { gap: 12px; padding: 0 16px; }
  .brand-name { display: none; }

  #main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    transition: max-height 0.45s var(--ease);
  }

  #main-nav.is-open { max-height: 70vh; overflow-y: auto; }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 20px;
    overflow: visible;
  }

  #main-nav a {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  #main-nav a::after { display: none; }

  #site-search { display: none; }

  #menu-toggle { display: grid; }

  main { padding: 0 16px 44px; }

  section { padding: 26px 20px; margin-bottom: 28px; }

  #hero { margin: 16px 0 24px; }
  .hero-slider { height: 240px; }
  .hero-content { padding: 26px 22px 32px; }

  .stats-list { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }

  #sitemap ul,
  #links ul { grid-template-columns: repeat(2, 1fr); }
}

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

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

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

  .hero-slider { height: 180px; }
  .hero-content { padding: 22px 18px 28px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary,
  .btn-secondary { width: 100%; }

  .stats-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats-list li { padding: 16px 10px; }

  #breadcrumb { padding: 10px 16px; }

  .timeline { padding-left: 22px; }
  .timeline li::before { left: -22px; }

  #sitemap ul,
  #links ul { grid-template-columns: 1fr; }

  #back-to-top { right: 16px; bottom: 18px; width: 44px; height: 44px; }

  #site-footer { padding: 36px 16px 22px; }
}

@media (min-width: 1400px) {
  :root { --maxw: 1280px; }
}

@media print {
  #site-header,
  #back-to-top,
  #site-search,
  #theme-toggle,
  #menu-toggle,
  .hero-slider { display: none !important; }

  body { background: #fff; color: #000; }
  section { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
}