:root {
  --brand: #ff6b35;
  --brand-dark: #e8551f;
  --brand-light: #ff8c5a;
  --accent: #ffb347;
  --bg: #faf8f5;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #1f2430;
  --text-secondary: #5a6270;
  --text-muted: #8b93a1;
  --border: rgba(31, 36, 48, 0.08);
  --shadow-sm: 0 2px 8px rgba(31, 36, 48, 0.06);
  --shadow: 0 8px 28px rgba(31, 36, 48, 0.10);
  --shadow-lg: 0 18px 48px rgba(31, 36, 48, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --gradient-brand: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 45%, #ffb347 100%);
  --gradient-banner-1: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 60%, #ffb347 100%);
  --gradient-banner-2: linear-gradient(135deg, #2b2d42 0%, #3d4160 55%, #565a80 100%);
  --gradient-banner-3: linear-gradient(135deg, #8d99ae 0%, #a8b2c4 55%, #c5cdd9 100%);
  --gradient-hero: linear-gradient(160deg, #fff5ef 0%, #faf8f5 45%, #f4f0ea 100%);
  --transition: 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}

html[data-theme="dark"] {
  --brand: #ff7d4d;
  --brand-dark: #ff6b35;
  --brand-light: #ffa07a;
  --accent: #ffc266;
  --bg: #12141a;
  --bg-alt: #1a1d26;
  --bg-card: rgba(30, 34, 44, 0.72);
  --bg-glass: rgba(30, 34, 44, 0.55);
  --text: #eef0f4;
  --text-secondary: #b6bcc8;
  --text-muted: #7e8695;
  --border: rgba(238, 240, 244, 0.10);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --gradient-hero: linear-gradient(160deg, #1c1f29 0%, #12141a 45%, #0e1015 100%);
}

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

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

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

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

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

a:hover,
a:focus-visible {
  color: var(--brand-dark);
}

ul,
ol {
  list-style: none;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

.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(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
  border-radius: 10px;
  border: 2px solid var(--bg-alt);
}

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

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

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

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-inner > a:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-inner svg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  filter: drop-shadow(0 4px 10px rgba(255, 107, 53, 0.4));
  transition: transform var(--transition);
}

.header-inner > a:first-child:hover svg {
  transform: rotate(-8deg) scale(1.08);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

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

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

#main-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--brand);
  background: rgba(255, 107, 53, 0.08);
}

#main-nav a:hover::after {
  transform: scaleX(1);
}

#menu-toggle,
#dark-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), background var(--transition),
    box-shadow var(--transition);
}

#dark-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#menu-toggle:hover,
#dark-toggle:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: var(--shadow);
  background: rgba(255, 107, 53, 0.12);
}

#site-search {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex: 0 1 300px;
  min-width: 200px;
}

#search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
}

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

#search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
}

#site-search button {
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
  transition: transform var(--transition), box-shadow var(--transition),
    filter var(--transition);
}

#site-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 107, 53, 0.5);
  filter: brightness(1.05);
}

/* ============ BREADCRUMB ============ */
#breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px 0;
}

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

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

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

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

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

/* ============ MAIN LAYOUT ============ */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

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

main > section > h2 {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 28px;
  padding-left: 20px;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--gradient-brand);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

main h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--brand-light);
}

main h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 20px 0 8px;
}

main p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  max-width: 78ch;
}

main address {
  font-style: normal;
  color: var(--text-secondary);
  line-height: 2;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ============ HERO ============ */
#hero {
  position: relative;
  margin-top: 32px !important;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px);
  border-radius: var(--radius-xl);
  background: var(--gradient-hero);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 107, 53, 0.35) 0%,
    rgba(255, 179, 71, 0.18) 45%,
    transparent 70%
  );
  z-index: -1;
  animation: floatBlob 14s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -160px;
  left: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 140, 90, 0.28) 0%,
    transparent 70%
  );
  z-index: -1;
  animation: floatBlob 18s ease-in-out infinite reverse;
}

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

#hero h1 {
  font-size: clamp(1.7rem, 4.6vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  max-width: 20ch;
}

#hero > p {
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: var(--text-secondary);
  max-width: 70ch;
  margin-bottom: 16px;
}

/* ============ CAROUSEL ============ */
#banner-carousel {
  display: flex;
  gap: 20px;
  margin: 36px 0;
  padding: 6px 4px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

#banner-carousel > svg {
  flex: 0 0 clamp(280px, 62%, 620px);
  width: clamp(280px, 62%, 620px);
  height: auto;
  border-radius: var(--radius-lg);
  scroll-snap-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

#banner-carousel > svg:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-lg);
}

/* ============ STATS ============ */
#stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 36px 0;
}

#stats > div {
  position: relative;
  padding: 22px 16px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

#stats > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#stats > div:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

#stats > div:hover::before {
  transform: scaleX(1);
}

#stats .num {
  display: block;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

#stats span {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ============ CTA ============ */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 38px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--gradient-brand);
  background-size: 200% 200%;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(255, 107, 53, 0.42);
  transition: transform var(--transition), box-shadow var(--transition),
    background-position var(--transition);
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 40px rgba(255, 107, 53, 0.58);
  color: #fff !important;
}

/* ============ CARDS (sections) ============ */
#about,
#products,
#solutions,
#cases,
#news,
#articles,
#howto,
#faq,
#contact,
#sitemap,
#links,
#legal,
#eeat {
  padding: clamp(24px, 4vw, 44px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  transition: box-shadow var(--transition), transform var(--transition);
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#articles:hover,
#howto:hover,
#faq:hover,
#contact:hover,
#sitemap:hover,
#links:hover,
#legal:hover,
#eeat:hover {
  box-shadow: var(--shadow);
}

/* ============ NEWS & ARTICLES ============ */
#news article,
#articles article {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#news article::after,
#articles article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-brand);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity var(--transition), transform var(--transition);
}

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

#news article:hover::after,
#articles article:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

#news article h3,
#articles article h3 {
  margin: 0 0 8px;
  padding-left: 0;
  border-left: none;
  font-size: 1.1rem;
  color: var(--text);
}

#news article time,
#articles article time {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: rgba(255, 107, 53, 0.12);
  padding: 3px 12px;
  border-radius: 999px;
}

#news article p,
#articles article p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

#news article a,
#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand);
}

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

#news article a:hover::after,
#articles article a:hover::after {
  transform: translateX(5px);
}

/* ============ BLOCKQUOTE ============ */
blockquote {
  position: relative;
  margin: 18px 0;
  padding: 22px 26px 22px 58px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 53, 0.09),
    rgba(255, 179, 71, 0.05)
  );
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 18px;
  top: 6px;
  font-size: 3.4rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--brand);
  opacity: 0.45;
}

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

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

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: howto;
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

#howto ol li {
  position: relative;
  counter-increment: howto;
  padding: 14px 20px 14px 62px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(255, 107, 53, 0.35);
  box-shadow: var(--shadow-sm);
}

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

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

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

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

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

#faq summary:hover {
  color: var(--brand);
  background: rgba(255, 107, 53, 0.06);
}

#faq details p {
  padding: 0 22px 18px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  animation: fadeSlide 0.4s ease both;
}

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

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

#sitemap li a,
#links li a {
  display: block;
  padding: 10px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform var(--transition), color var(--transition),
    background var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

#sitemap li a:hover,
#links li a:hover {
  color: #fff;
  background: var(--gradient-brand);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.35);
}

/* ============ FOOTER ============ */
#site-footer {
  position: relative;
  padding: 48px 24px 36px;
  text-align: center;
  color: #e8eaee;
  background: linear-gradient(160deg, #1f2430 0%, #2b2d42 60%, #3d4160 100%);
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-brand);
}

#site-footer p {
  margin: 6px 0;
  font-size: 0.9rem;
  color: rgba(232, 234, 238, 0.8);
}

#site-footer a {
  color: var(--accent);
  font-weight: 500;
}

#site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 900;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(255, 107, 53, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.85);
  transition: opacity var(--transition), transform var(--transition),
    visibility var(--transition), box-shadow var(--transition);
}

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

#back-to-top:hover {
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 16px 36px rgba(255, 107, 53, 0.6);
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

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

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .header-inner {
    gap: 14px;
  }

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

  #main-nav a {
    padding: 8px 9px;
    font-size: 0.86rem;
  }

  #site-search {
    flex: 1 1 100%;
    order: 10;
  }
}

@media (max-width: 860px) {
  #menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  #dark-toggle {
    margin-left: 0;
  }

  #main-nav {
    flex: 1 1 100%;
    order: 5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 0.35s ease;
    opacity: 0;
  }

  #main-nav.open {
    max-height: 520px;
    opacity: 1;
  }

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

  #main-nav a {
    display: block;
    padding: 12px 16px;
    font-size: 0.98rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

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

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

  #banner-carousel > svg {
    flex: 0 0 82%;
    width: 82%;
  }

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

  #hero {
    border-radius: var(--radius-lg);
  }
}

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

  .header-inner {
    padding: 10px 16px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  main {
    padding: 0 16px 60px;
  }

  #breadcrumb {
    padding: 14px 16px 0;
  }

  #hero {
    padding: 26px 18px;
  }

  #hero h1 {
    max-width: none;
  }

  #stats {
    gap: 12px;
  }

  #stats > div {
    padding: 18px 10px;
  }

  .cta-button {
    width: 100%;
    padding: 14px 22px;
    font-size: 0.98rem;
  }

  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #articles,
  #howto,
  #faq,
  #contact,
  #sitemap,
  #links,
  #legal,
  #eeat {
    padding: 20px 16px;
    border-radius: var(--radius);
  }

  main > section > h2 {
    font-size: 1.32rem;
    padding-left: 16px;
    margin-bottom: 20px;
  }

  main h3 {
    font-size: 1.05rem;
  }

  #news article,
  #articles article {
    padding: 18px 16px;
  }

  #howto ol li {
    padding: 12px 14px 12px 54px;
  }

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

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

  #sitemap li a,
  #links li a {
    padding: 9px 10px;
    font-size: 0.84rem;
    text-align: center;
  }

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

  blockquote {
    padding: 18px 18px 18px 48px;
  }

  blockquote::before {
    font-size: 2.6rem;
    left: 14px;
  }
}

/* ============ MOTION PREFERENCES ============ */
@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;
  }
}

/* ============ PRINT ============ */
@media print {
  #site-header,
  #back-to-top,
  #banner-carousel,
  #site-search,
  #menu-toggle,
  #dark-toggle {
    display: none !important;
  }

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

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