:root {
  --primary: #E63946;
  --primary-dark: #c62b38;
  --primary-light: #ff6b7a;
  --secondary: #1D3557;
  --secondary-light: #457B9D;
  --accent: #FFD166;
  --accent-dark: #e6b84d;
  --bg: #f8f9fc;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.45);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --border: #e8ecf2;
  --shadow-sm: 0 2px 8px rgba(29, 53, 87, 0.06);
  --shadow-md: 0 8px 24px rgba(29, 53, 87, 0.1);
  --shadow-lg: 0 16px 48px rgba(29, 53, 87, 0.14);
  --shadow-primary: 0 8px 24px rgba(230, 57, 70, 0.28);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-height: 68px;
}

[data-theme="dark"] {
  --primary: #ff4d5e;
  --primary-dark: #e63946;
  --primary-light: #ff7a88;
  --secondary: #a8dadc;
  --secondary-light: #6ba3c7;
  --accent: #ffd166;
  --accent-dark: #e6b84d;
  --bg: #0f0f1a;
  --bg-alt: #161625;
  --bg-card: #1c1c30;
  --bg-glass: rgba(28, 28, 48, 0.78);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --text: #eaeaf2;
  --text-secondary: #b0b0c8;
  --text-muted: #7878a0;
  --border: #2a2a45;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 8px 24px rgba(255, 77, 94, 0.3);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input {
  font-family: inherit;
  font-size: inherit;
}

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

#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid var(--bg-glass-border);
  transition: background var(--transition), box-shadow var(--transition);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.brand-logo:hover {
  color: var(--primary);
}

.brand-logo svg {
  border-radius: 10px;
  transition: transform var(--transition);
}

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

#main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

#main-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

#main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

#main-nav a:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.08);
}

#menu-toggle,
#theme-toggle {
  display: none;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

#theme-toggle {
  display: block;
}

#menu-toggle:hover,
#theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

#site-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
  flex-shrink: 0;
}

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}

#search-input {
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  width: 180px;
  font-size: 0.85rem;
}

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

#site-search button {
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--transition);
}

#site-search button:hover {
  background: var(--primary-dark);
}

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

#hero {
  position: relative;
  margin: 24px 0 40px;
  padding: 56px 40px 48px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #1D3557 0%, #457B9D 45%, #E63946 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

#hero > p {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
  max-width: 820px;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  margin: 28px 0 36px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  color: var(--primary-dark);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
  transform: translateY(-3px);
  color: #fff;
}

#banner-carousel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

#banner-carousel .slide {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
}

#banner-carousel .slide:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

#banner-carousel .slide svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

#stats {
  margin: 40px 0;
}

#stats h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  letter-spacing: -0.01em;
}

#stats ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

#stats li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

#stats li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

#stats li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(230, 57, 70, 0.2);
}

#stats li:hover::before {
  opacity: 1;
}

#stats strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

#stats span {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

#breadcrumb {
  margin: 0 0 32px;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

#breadcrumb a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

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

section {
  margin-bottom: 48px;
}

section > h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 12px;
  position: relative;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

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

section > article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

section > article:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(230, 57, 70, 0.15);
  transform: translateY(-2px);
}

section > article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

section > article h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 18px 0 8px;
  padding-left: 14px;
  position: relative;
}

section > article h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

section > article p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 12px;
}

section > article p:last-child {
  margin-bottom: 0;
}

section > article ul,
section > article ol {
  margin: 12px 0 16px;
  padding-left: 0;
}

section > article ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

section > article ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

section > article ol {
  counter-reset: item;
}

section > article ol li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  counter-increment: item;
}

section > article ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

#products > article ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

#products > article ul li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 38px;
  margin-bottom: 0;
  transition: all var(--transition);
}

#products > article ul li::before {
  left: 16px;
  top: 18px;
}

#products > article ul li:hover {
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.04);
  transform: translateX(4px);
}

#solutions > article ul li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 38px;
  margin-bottom: 8px;
  transition: all var(--transition);
}

#solutions > article ul li::before {
  left: 16px;
  top: 18px;
}

#solutions > article ul li:hover {
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.04);
  transform: translateX(4px);
}

#cases blockquote {
  position: relative;
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 14px 0;
  transition: all var(--transition);
}

#cases blockquote:hover {
  border-left-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

#cases blockquote p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  margin: 0;
}

#articles > p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

#articles article {
  position: relative;
  padding: 24px 28px;
}

#articles article h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

#articles article h3 a {
  color: var(--text);
  transition: color var(--transition);
}

#articles article h3 a:hover {
  color: var(--primary);
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#articles article p:first-of-type::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 3px;
  flex-shrink: 0;
}

#articles article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 10px;
  transition: all var(--transition);
}

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

#articles article > a:hover {
  color: var(--primary-dark);
}

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

#howto > article ul li,
#howto > article ol li {
  font-size: 0.95rem;
}

#faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

#faq details:hover {
  border-color: rgba(230, 57, 70, 0.25);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: rgba(230, 57, 70, 0.35);
  box-shadow: var(--shadow-md);
}

#faq summary {
  padding: 18px 24px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.08);
}

#faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  background: rgba(230, 57, 70, 0.15);
}

#faq summary:hover {
  color: var(--primary);
  background: rgba(230, 57, 70, 0.03);
}

#faq details p {
  padding: 0 24px 20px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.85;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin: 0 24px 20px;
  padding-left: 0;
  padding-right: 0;
}

#contact address {
  font-style: normal;
}

#contact address ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

#contact address ul li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
}

#contact address ul li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  flex-shrink: 0;
}

#contact address ul li:hover {
  border-color: rgba(230, 57, 70, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#contact address ul li a {
  font-weight: 600;
}

#contact > p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 12px;
}

#sitemap ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

#sitemap ul li a {
  display: block;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

#sitemap ul li a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary);
}

#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#links ul li a {
  display: inline-block;
  padding: 10px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

#links ul li a:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#privacy > p,
#disclaimer > p,
#copyright > p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

footer {
  background: linear-gradient(135deg, #1D3557 0%, #16213e 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 20px 36px;
  margin-top: 40px;
  position: relative;
  overflow: hidden;
}

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

footer > p {
  max-width: var(--max-width);
  margin: 0 auto 10px;
  font-size: 0.9rem;
  line-height: 1.8;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

footer > p:first-child {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 14px;
}

footer nav {
  max-width: var(--max-width);
  margin: 24px auto 0;
}

footer nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

footer nav a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
  position: relative;
}

footer nav a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

footer nav a:hover {
  color: #fff;
}

footer nav a:hover::after {
  width: 100%;
}

#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
}

#back-to-top::before {
  content: "↑";
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 32px rgba(230, 57, 70, 0.45);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-in {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@media (max-width: 1024px) {
  #main-nav ul {
    gap: 0;
  }

  #main-nav a {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  #search-input {
    width: 140px;
  }

  #banner-carousel {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  #stats ul {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  #stats strong {
    font-size: 1.6rem;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 60px;
  }

  #main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border-bottom: 1px solid var(--bg-glass-border);
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  #main-nav.open {
    display: block;
    animation: fadeIn 0.25s ease both;
  }

  #main-nav ul {
    flex-direction: column;
    gap: 2px;
  }

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

  #menu-toggle {
    display: block;
  }

  #site-search {
    order: 10;
    width: 100%;
    margin-top: 8px;
  }

  #search-input {
    width: 100%;
    flex: 1;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px;
    position: relative;
  }

  #menu-toggle,
  #theme-toggle {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  #banner-carousel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #stats ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  #stats li {
    padding: 22px 16px;
  }

  #stats strong {
    font-size: 1.5rem;
  }

  #hero {
    padding: 40px 24px 36px;
    border-radius: var(--radius-lg);
  }

  .hero-actions {
    gap: 10px;
  }

  .btn-primary,
  .btn-secondary {
    padding: 11px 24px;
    font-size: 0.88rem;
  }

  section > article {
    padding: 22px 20px;
  }

  #products > article ul {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  main {
    padding: 0 14px 40px;
  }

  #hero {
    padding: 32px 18px 28px;
    margin: 16px 0 28px;
    border-radius: var(--radius-md);
  }

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

  #hero > p {
    font-size: 0.9rem;
  }

  #stats ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  #stats li {
    padding: 18px 12px;
  }

  #stats strong {
    font-size: 1.35rem;
  }

  #stats span {
    font-size: 0.78rem;
  }

  section > h2 {
    font-size: 1.2rem;
  }

  section > article {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }

  section > article h3 {
    font-size: 1.05rem;
  }

  #faq summary {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  #faq details p {
    padding: 12px 16px 16px;
    margin: 0 16px 16px;
    font-size: 0.88rem;
  }

  #sitemap ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #sitemap ul li a {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  footer {
    padding: 36px 16px 28px;
  }

  footer nav ul {
    gap: 6px 16px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  #site-header,
  #back-to-top,
  footer nav,
  #banner-carousel {
    display: none;
  }

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

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

  section > article {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}