:root {
  --primary: #c0392b;
  --primary-dark: #962d22;
  --primary-light: #e74c3c;
  --accent: #e67e22;
  --accent-2: #8e44ad;
  --accent-3: #16a085;
  --bg: #fdf8f7;
  --bg-alt: #ffffff;
  --bg-soft: #f7efed;
  --text: #2c2523;
  --text-soft: #6b5f5c;
  --text-mute: #9a8d89;
  --border: rgba(192, 57, 43, 0.14);
  --shadow-sm: 0 2px 8px rgba(44, 37, 35, 0.06);
  --shadow-md: 0 8px 28px rgba(44, 37, 35, 0.10);
  --shadow-lg: 0 18px 48px rgba(44, 37, 35, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161113;
    --bg-alt: #1e1719;
    --bg-soft: #241b1e;
    --text: #f3e9e7;
    --text-soft: #c4b3af;
    --text-mute: #8f7f7b;
    --border: rgba(231, 76, 60, 0.22);
    --glass-bg: rgba(36, 27, 30, 0.62);
    --glass-border: rgba(255, 255, 255, 0.10);
    --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);
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #ff6b5b;
    --accent: #f39c12;
  }
}

*,
*::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.8;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, rgba(192, 57, 43, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(230, 126, 34, 0.10), transparent 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(142, 68, 173, 0.08), transparent 60%);
  background-attachment: fixed;
  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 0.25s var(--ease), opacity 0.25s var(--ease);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(192, 57, 43, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

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

h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

h3 {
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
}

h4 {
  font-size: 1.05rem;
  color: var(--primary-dark);
}

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

ul, ol {
  color: var(--text-soft);
}

::selection {
  background: rgba(192, 57, 43, 0.22);
  color: var(--text);
}

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

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

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 60%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

.logo:hover {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.08);
}

#site-header nav {
  flex: 1 1 auto;
}

#site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#site-header nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#site-header nav a:hover {
  background: rgba(192, 57, 43, 0.10);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

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

#site-header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#site-header input[type="search"] {
  width: 200px;
  max-width: 40vw;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

#site-header input[type="search"]::placeholder {
  color: var(--text-mute);
}

#site-header input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.14);
  width: 240px;
}

#site-header button[type="submit"] {
  padding: 9px 18px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#site-header button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(192, 57, 43, 0.38);
  filter: brightness(1.05);
}

#site-header button[type="submit"]:active {
  transform: translateY(0);
}

/* ============ Main layout ============ */
main {
  display: block;
}

main > section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 22px;
  opacity: 0;
  transform: translateY(36px);
  animation: fadeUp 0.9s var(--ease) forwards;
}

main > section:nth-child(1) { animation-delay: 0.05s; }
main > section:nth-child(2) { animation-delay: 0.10s; }
main > section:nth-child(3) { animation-delay: 0.15s; }
main > section:nth-child(4) { animation-delay: 0.20s; }
main > section:nth-child(5) { animation-delay: 0.25s; }
main > section:nth-child(6) { animation-delay: 0.30s; }
main > section:nth-child(7) { animation-delay: 0.35s; }
main > section:nth-child(8) { animation-delay: 0.40s; }
main > section:nth-child(9) { animation-delay: 0.45s; }
main > section:nth-child(10) { animation-delay: 0.50s; }
main > section:nth-child(11) { animation-delay: 0.55s; }
main > section:nth-child(12) { animation-delay: 0.60s; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main > section { animation: none; opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  max-width: none;
  margin: 0;
  padding: 72px 22px 56px;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(192, 57, 43, 0.22), transparent 60%),
    radial-gradient(800px 400px at 88% 10%, rgba(230, 126, 34, 0.20), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(142, 68, 173, 0.18), transparent 65%),
    linear-gradient(160deg, #fdf2f0 0%, #fbe9e4 45%, #f6e3ef 100%);
  overflow: hidden;
  isolation: isolate;
}

@media (prefers-color-scheme: dark) {
  #hero {
    background:
      radial-gradient(900px 420px at 12% 0%, rgba(231, 76, 60, 0.28), transparent 60%),
      radial-gradient(800px 400px at 88% 10%, rgba(243, 156, 18, 0.20), transparent 60%),
      radial-gradient(700px 500px at 50% 110%, rgba(142, 68, 173, 0.30), transparent 65%),
      linear-gradient(160deg, #1c1315 0%, #241a1d 45%, #1d1520 100%);
  }
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 120%;
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(closest-side, rgba(255, 255, 255, 0.35), transparent);
  background-position: 20% 30%, 80% 60%;
  background-size: 60% 60%, 50% 50%;
  background-repeat: no-repeat;
  filter: blur(30px);
  opacity: 0.7;
  z-index: -1;
  animation: floaty 14s ease-in-out infinite alternate;
}

@keyframes floaty {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -18px, 0) scale(1.04); }
}

#hero > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

#hero h1 {
  text-align: center;
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 24px rgba(192, 57, 43, 0.10);
}

#hero > p {
  max-width: 860px;
  text-align: center;
  font-size: 1.02rem;
  color: var(--text-soft);
  margin-bottom: 36px;
}

.hero-svg {
  max-width: 720px;
  margin: 0 auto 36px;
  padding: 18px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-svg:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: var(--shadow-lg);
}

.hero-svg svg {
  border-radius: calc(var(--radius-xl) - 14px);
  display: block;
}

#hero nav[aria-label="面包屑导航"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--text-mute);
}

#hero nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-mute);
}

#hero nav[aria-label="面包屑导航"] a {
  color: var(--text-soft);
}

#hero nav[aria-label="面包屑导航"] a:hover {
  color: var(--primary);
}

#hero nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--primary-dark);
  font-weight: 600;
}

/* ============ Section headings ============ */
main > section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 28px;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 16px rgba(192, 57, 43, 0.35);
}

main > section > h3 {
  margin-top: 1.6em;
  color: var(--text);
}

/* ============ Cards (generic content sections) ============ */
#about,
#products,
#solutions,
#cases,
#news,
#faq,
#howto,
#contact,
#sitemap,
#links {
  position: relative;
}

#about > h3,
#about > p,
#products > h3,
#products > p,
#products > h4,
#solutions > h3,
#solutions > p,
#cases > h3,
#cases > p,
#news > h3,
#news > p,
#howto > h3,
#howto > p,
#howto > h4,
#contact > h3,
#contact > p {
  max-width: 900px;
}

/* 卡片化：about / products / solutions / cases / news / howto / contact */
#about,
#products,
#solutions,
#cases,
#news,
#howto,
#contact {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: 28px;
  margin-bottom: 28px;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

@media (min-width: 900px) {
  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #howto,
  #contact {
    padding: 56px 56px;
  }
}

#about:hover,
#products:hover,
#solutions:hover,
#cases:hover,
#news:hover,
#howto:hover,
#contact:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(192, 57, 43, 0.28);
}

/* 产品优势 / 解决方案等子标题卡片感 */
#products h4,
#solutions h3,
#cases h3,
#news h3,
#howto h4 {
  position: relative;
  padding: 14px 18px 14px 20px;
  margin: 26px 0 10px;
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.07), rgba(230, 126, 34, 0.06));
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#products h4:hover,
#solutions h3:hover,
#cases h3:hover,
#news h3:hover,
#howto h4:hover {
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.12), rgba(230, 126, 34, 0.10));
  border-left-color: var(--accent);
}

#news h3 + p {
  font-size: 0.84rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

/* ============ Articles ============ */
#articles {
  background: transparent;
}

#articles > h2 {
  margin-bottom: 32px;
}

#articles article {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0.7;
  transition: width 0.35s var(--ease), opacity 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(192, 57, 43, 0.26);
}

#articles article:hover::before {
  width: 6px;
  opacity: 1;
}

#articles article h3 {
  margin-top: 0;
  color: var(--text);
}

#articles article > p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

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

#articles article > p a {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.24);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#articles article > p a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.34);
  filter: brightness(1.06);
}

#articles article > div[id] {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#articles article:hover > div[id] {
  border-color: rgba(192, 57, 43, 0.30);
}

/* ============ FAQ ============ */
#faq {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-alt));
}

@media (prefers-color-scheme: dark) {
  #faq {
    background: linear-gradient(180deg, #1f1719, #1a1416);
  }
}

#faq details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(192, 57, 43, 0.30);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: rgba(192, 57, 43, 0.38);
  box-shadow: var(--shadow-md);
}

#faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  color: var(--text);
  position: relative;
  padding-right: 36px;
  transition: color 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(192, 57, 43, 0.10);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

#faq summary:hover {
  color: var(--primary);
}

#faq details p {
  margin: 0 0 16px;
  padding-top: 2px;
  font-size: 0.95rem;
  color: var(--text-soft);
  animation: faqOpen 0.35s var(--ease);
}

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

/* ============ HowTo ============ */
#howto h4 {
  background: linear-gradient(135deg, rgba(22, 160, 133, 0.10), rgba(192, 57, 43, 0.06));
  border-left-color: var(--accent-3);
}

#howto h4:hover {
  border-left-color: var(--primary);
}

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

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

#contact h3 {
  margin-top: 1.8em;
}

/* ============ Sitemap & Links ============ */
#sitemap,
#links {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-top: 28px;
  margin-bottom: 28px;
}

#sitemap ul,
#links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.10), rgba(230, 126, 34, 0.08));
  color: var(--primary-dark);
  border-color: rgba(192, 57, 43, 0.26);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ============ Footer ============ */
footer {
  margin-top: 48px;
  padding: 44px 22px 36px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(192, 57, 43, 0.06));
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 0.88rem;
}

@media (prefers-color-scheme: dark) {
  footer {
    background: linear-gradient(180deg, transparent, rgba(231, 76, 60, 0.08));
  }
}

footer p {
  margin: 0 0 10px;
  color: var(--text-mute);
}

footer p:nth-child(2) {
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.03em;
}

footer a {
  color: var(--text-soft);
  padding: 2px 4px;
  border-radius: 6px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

footer a:hover {
  color: var(--primary);
  background: rgba(192, 57, 43, 0.08);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .header-inner {
    gap: 12px;
  }
  #site-header nav a {
    padding: 7px 10px;
    font-size: 0.86rem;
  }
  #site-header input[type="search"] {
    width: 160px;
  }
  #site-header input[type="search"]:focus {
    width: 190px;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: auto;
  }
  .header-inner {
    padding: 12px 18px;
    align-items: center;
  }
  .logo {
    font-size: 1.25rem;
  }
  #site-header nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  #site-header nav::-webkit-scrollbar {
    display: none;
  }
  #site-header nav ul {
    flex-wrap: nowrap;
    gap: 2px;
  }
  #site-header nav a {
    white-space: nowrap;
  }
  #site-header form[role="search"] {
    margin-left: auto;
  }
  #site-header input[type="search"] {
    width: 130px;
  }
  #site-header input[type="search"]:focus {
    width: 150px;
  }
  #site-header button[type="submit"] {
    padding: 9px 14px;
  }
  main > section {
    padding: 44px 18px;
  }
  #hero {
    padding: 48px 18px 40px;
  }
  #hero > p {
    font-size: 0.96rem;
  }
  #articles article {
    padding: 22px 20px;
  }
  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }
  .header-inner {
    padding: 10px 14px;
    gap: 10px;
  }
  #site-header form[role="search"] {
    flex: 1 1 auto;
  }
  #site-header input[type="search"] {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
  }
  #site-header input[type="search"]:focus {
    width: 100%;
  }
  #site-header button[type="submit"] {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 0.84rem;
  }
  main > section {
    padding: 36px 14px;
  }
  #about,
  #products,
  #solutions,
  #cases,
  #news,
  #howto,
  #contact,
  #sitemap,
  #links {
    padding: 26px 18px;
    border-radius: var(--radius-md);
    margin-top: 18px;
    margin-bottom: 18px;
  }
  #hero {
    padding: 40px 14px 34px;
  }
  main > section > h2 {
    padding-left: 14px;
    margin-bottom: 20px;
  }
  main > section > h2::before {
    width: 5px;
  }
  #products h4,
  #solutions h3,
  #cases h3,
  #news h3,
  #howto h4 {
    padding: 12px 14px 12px 16px;
    font-size: 1rem;
  }
  #articles article {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
  #articles article > div[id] {
    padding: 14px 14px;
    font-size: 0.9rem;
  }
  #faq details {
    padding: 2px 14px;
  }
  #faq summary {
    padding: 14px 0;
    padding-right: 34px;
    font-size: 0.94rem;
  }
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #sitemap ul li a,
  #links ul li a {
    padding: 10px 12px;
    font-size: 0.86rem;
  }
  .hero-svg {
    padding: 10px;
    border-radius: var(--radius-lg);
    margin-bottom: 26px;
  }
  .hero-svg svg {
    border-radius: calc(var(--radius-lg) - 8px);
  }
  footer {
    padding: 32px 14px 28px;
    font-size: 0.82rem;
  }
}

@media (max-width: 380px) {
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
  #site-header button[type="submit"] {
    padding: 9px 10px;
  }
}

/* ============ Accessibility helpers ============ */
@media (hover: none) {
  #articles article:hover,
  .hero-svg:hover,
  #sitemap ul li a:hover,
  #links ul li a:hover {
    transform: none;
  }
}

:target {
  scroll-margin-top: calc(var(--header-h) + 20px);
}