:root {
  --bg: #f5f6fa;
  --bg-alt: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --text: #1a1a2e;
  --text-soft: #4a4a5e;
  --text-muted: #7a7a8c;
  --brand: #e94560;
  --brand-2: #6a5acd;
  --brand-3: #ff8c42;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 45%, #e94560 100%);
  --gradient-btn: linear-gradient(135deg, #e94560 0%, #ff8c42 100%);
  --gradient-card: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  --border: rgba(26, 26, 46, 0.08);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 28px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --glass-blur: blur(18px);
  --header-h: 72px;
  --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0e0e1a;
  --bg-alt: #16162a;
  --bg-elevated: rgba(30, 30, 52, 0.72);
  --text: #f0f0f8;
  --text-soft: #c4c4d8;
  --text-muted: #8a8aa6;
  --brand: #ff5c7a;
  --brand-2: #8a7bff;
  --brand-3: #ff9d5c;
  --gradient-hero: linear-gradient(135deg, #0e0e1a 0%, #221d4a 45%, #b32b48 100%);
  --gradient-card: linear-gradient(160deg, rgba(40, 40, 68, 0.9), rgba(24, 24, 44, 0.6));
  --border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--brand-3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.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: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px clamp(16px, 4vw, 48px);
  font-size: 12.5px;
  color: var(--text-muted);
  background: linear-gradient(90deg, rgba(233, 69, 96, 0.12), rgba(106, 90, 205, 0.12));
  flex-wrap: wrap;
}

#site-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(16px, 4vw, 48px);
  flex-wrap: wrap;
}

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

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

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

.brand span {
  background: var(--gradient-btn);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.main-nav li a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  white-space: nowrap;
}

.main-nav li a:hover {
  color: var(--brand);
  background: rgba(233, 69, 96, 0.1);
  transform: translateY(-2px);
}

#site-header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#site-search {
  width: 200px;
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}

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

#site-search:focus {
  width: 240px;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.14);
  outline: none;
}

#site-header form button[type="submit"] {
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-btn);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}

#site-header form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.35);
}

#theme-toggle,
#menu-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

#theme-toggle:hover,
#menu-toggle:hover {
  transform: rotate(12deg) scale(1.08);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

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

main > section,
main > nav.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

main > section {
  margin-top: 64px;
  margin-bottom: 64px;
}

main > section > h2 {
  position: relative;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 20px;
  padding-left: 18px;
  letter-spacing: 0.2px;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1.1em;
  border-radius: 3px;
  background: var(--gradient-btn);
}

main h3 {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text);
}

main p {
  color: var(--text-soft);
  margin-bottom: 14px;
}

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

/* ---------- Hero ---------- */
#hero {
  position: relative;
  max-width: none;
  margin: 0 !important;
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px) clamp(56px, 9vw, 104px) !important;
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

#hero::before,
#hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

#hero::before {
  width: 420px;
  height: 420px;
  background: rgba(233, 69, 96, 0.55);
  top: -140px;
  right: -80px;
  animation: floatSlow 14s ease-in-out infinite;
}

#hero::after {
  width: 360px;
  height: 360px;
  background: rgba(106, 90, 205, 0.55);
  bottom: -160px;
  left: -60px;
  animation: floatSlow 18s ease-in-out infinite reverse;
}

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 24px) scale(1.08); }
}

#hero > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

#hero-title {
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.8s var(--transition) both;
}

#hero .lead {
  font-size: clamp(15px, 1.8vw, 17.5px);
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.88);
  max-width: 920px;
  margin-bottom: 30px;
  animation: fadeUp 0.8s 0.12s var(--transition) both;
}

#hero .lead strong {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  padding: 1px 6px;
  border-radius: 6px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 42px;
  animation: fadeUp 0.8s 0.24s var(--transition) both;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: var(--gradient-btn);
  box-shadow: 0 10px 28px rgba(233, 69, 96, 0.42);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 38px rgba(233, 69, 96, 0.55);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  animation: fadeUp 0.8s 0.36s var(--transition) both;
}

.hero-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all var(--transition);
}

.hero-stats .stat:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.hero-stats .num {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(90deg, #fff, #ffd6de);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stats .stat > span:last-child {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
}

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

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin-top: 28px !important;
  margin-bottom: 8px !important;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-muted);
}

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

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

/* ---------- Cards / Content blocks ---------- */
#intro,
#products,
#solutions,
#cases,
#news,
#articles,
#knowledge,
#faq,
#howto,
#contact,
#sitemap,
#links {
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: box-shadow var(--transition), transform var(--transition);
}

#intro:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#knowledge:hover,
#faq:hover,
#howto:hover,
#contact:hover,
#sitemap:hover,
#links:hover {
  box-shadow: var(--shadow-md);
}

/* Lists */
main ul,
main ol {
  padding-left: 22px;
  color: var(--text-soft);
  margin-bottom: 16px;
}

main ul li,
main ol li {
  margin-bottom: 8px;
  line-height: 1.8;
}

main ul li::marker {
  color: var(--brand);
}

main ol li::marker {
  color: var(--brand);
  font-weight: 700;
}

/* Timeline */
.timeline {
  list-style: none;
  padding-left: 0 !important;
  position: relative;
  margin-top: 14px;
}

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

.timeline li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  transition: transform var(--transition);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.12);
  transition: all var(--transition);
}

.timeline li:hover {
  transform: translateX(6px);
}

.timeline li:hover::before {
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(233, 69, 96, 0.2);
}

.timeline strong {
  color: var(--brand);
  margin-right: 6px;
}

/* News */
.news-list {
  list-style: none;
  padding-left: 0 !important;
}

.news-list li {
  position: relative;
  padding: 14px 18px 14px 44px;
  margin-bottom: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.news-list li::before {
  content: "📰";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

.news-list li:hover {
  transform: translateX(6px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.news-list time {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  margin-right: 8px;
  padding: 1px 8px;
  background: rgba(233, 69, 96, 0.1);
  border-radius: var(--radius-pill);
}

/* Articles */
#articles > article {
  margin-top: 22px;
  padding: clamp(18px, 3vw, 28px);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

#articles > article:hover {
  transform: translateY(-4px);
  border-left-color: var(--brand-3);
  box-shadow: var(--shadow-md);
}

#articles > article h3 {
  margin-top: 0;
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.5;
}

#articles > article .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

#articles > article > a {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(233, 69, 96, 0.1);
  transition: all var(--transition);
}

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

#articles article div[id^="article-"] {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

#articles article div[id^="article-"] p {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.9;
}

/* Blockquotes */
blockquote {
  position: relative;
  margin: 18px 0;
  padding: 18px 22px 18px 54px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(106, 90, 205, 0.08));
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-style: normal;
  transition: all var(--transition);
}

blockquote::before {
  content: "“";
  position: absolute;
  left: 16px;
  top: 4px;
  font-size: 46px;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--brand);
  opacity: 0.5;
}

blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* FAQ */
#faq details {
  margin-bottom: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

#faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

#faq summary {
  position: relative;
  padding: 16px 48px 16px 20px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background var(--transition), color var(--transition);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--brand);
  transition: transform var(--transition);
}

#faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

#faq summary:hover {
  background: rgba(233, 69, 96, 0.06);
  color: var(--brand);
}

#faq details p {
  padding: 0 20px 18px;
  margin-bottom: 0;
  font-size: 15px;
  animation: fadeUp 0.35s var(--transition) both;
}

/* Contact */
.contact-info {
  list-style: none;
  padding-left: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.contact-info li {
  position: relative;
  padding: 14px 18px 14px 44px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  transition: all var(--transition);
}

.contact-info li::before {
  content: "◆";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  font-size: 12px;
}

.contact-info li:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

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

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #fff;
  background: var(--gradient-btn);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.32);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 80px;
  padding: clamp(36px, 5vw, 60px) clamp(16px, 4vw, 48px) 40px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 14px;
}

.footer-info,
footer nav,
footer .legal {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.footer-info p {
  margin-bottom: 8px;
  line-height: 1.8;
}

.footer-info strong {
  color: var(--brand);
  font-size: 15.5px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

footer nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  transition: color var(--transition);
}

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

footer nav a:hover {
  color: var(--brand);
}

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

footer .legal {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

footer .legal h3 {
  font-size: 15px;
  margin: 16px 0 6px;
  color: var(--text);
}

footer .legal h3:first-child {
  margin-top: 0;
}

footer .legal p {
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.8;
}

footer .legal p:last-child {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Back to top ---------- */
#back-to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 90;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-btn);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: all var(--transition);
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 34px rgba(233, 69, 96, 0.55);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  #site-header nav {
    gap: 12px;
  }

  #site-search {
    width: 160px;
  }

  #site-search:focus {
    width: 190px;
  }

  .main-nav {
    gap: 2px;
  }

  .main-nav li a {
    padding: 6px 9px;
    font-size: 13.5px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 60px;
  }

  .topbar {
    justify-content: center;
    text-align: center;
    font-size: 11.5px;
    padding: 6px 16px;
  }

  .topbar span:last-child {
    display: none;
  }

  #site-header nav {
    padding: 10px 16px;
    gap: 10px;
  }

  #menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    order: 10;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  }

  #site-header.nav-open .main-nav {
    max-height: 640px;
    opacity: 1;
    margin-top: 8px;
  }

  .main-nav li a {
    display: block;
    padding: 10px 14px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }

  #site-header form[role="search"] {
    order: 11;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  }

  #site-header.nav-open form[role="search"] {
    max-height: 80px;
    opacity: 1;
    margin-top: 8px;
  }

  #site-search,
  #site-search:focus {
    width: 100%;
    flex: 1 1 auto;
  }

  main > section {
    margin-top: 44px;
    margin-bottom: 44px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats .stat {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding: 16px 18px;
  }

  #articles > article {
    padding: 18px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }
}

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

  #hero {
    padding-top: 40px !important;
    padding-bottom: 48px !important;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 13px 20px;
  }

  #intro,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #knowledge,
  #faq,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }

  main > section > h2 {
    padding-left: 14px;
  }

  #faq summary {
    padding: 14px 42px 14px 16px;
    font-size: 14.5px;
  }

  #back-to-top {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }

  .footer-info p {
    font-size: 13px;
  }
}

/* ---------- Motion & print ---------- */
@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 print {
  #site-header,
  #back-to-top,
  .hero-actions,
  #theme-toggle,
  #menu-toggle {
    display: none !important;
  }

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

  #hero {
    background: none;
    color: #000;
    padding: 0 0 20px !important;
  }

  #hero .lead,
  .hero-stats .stat > span:last-child {
    color: #333;
  }

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

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