:root {
  --brand-deep: #1a3a5c;
  --brand-deep-2: #0f2438;
  --brand-gold: #f5c542;
  --brand-gold-2: #e0a92e;
  --brand-accent: #4a7fb5;
  --brand-accent-2: #6ea8e0;
  --bg: #f4f7fb;
  --bg-soft: #eaf0f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-strong: rgba(255, 255, 255, 0.86);
  --text: #14212f;
  --text-soft: #4a5b6d;
  --text-mute: #7b8b9c;
  --border: rgba(26, 58, 92, 0.12);
  --border-soft: rgba(26, 58, 92, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 36, 56, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 36, 56, 0.1);
  --shadow-lg: 0 24px 60px rgba(15, 36, 56, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --grad-hero: linear-gradient(135deg, #1a3a5c 0%, #2a5a86 45%, #4a7fb5 100%);
  --grad-gold: linear-gradient(135deg, #f5c542 0%, #e0a92e 100%);
  --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
  --header-h: 72px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1622;
    --bg-soft: #0f1e2e;
    --surface: #14273a;
    --surface-glass: rgba(20, 39, 58, 0.68);
    --surface-glass-strong: rgba(20, 39, 58, 0.86);
    --text: #e8eef5;
    --text-soft: #b3c3d4;
    --text-mute: #8399ae;
    --border: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --grad-hero: linear-gradient(135deg, #0d1f31 0%, #16324d 45%, #23506f 100%);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 12% -8%, rgba(74, 127, 181, 0.14), transparent 60%),
    radial-gradient(900px 500px at 92% 4%, rgba(245, 197, 66, 0.12), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

@media (prefers-color-scheme: dark) {
  a:hover,
  a:focus-visible {
    color: var(--brand-gold);
  }
}

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

h1 {
  font-size: clamp(1.75rem, 4.4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.005em;
}

h2 {
  font-size: clamp(1.4rem, 2.9vw, 2.1rem);
  position: relative;
  padding-bottom: 0.5em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--grad-gold);
}

h3 {
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  margin-top: 1.6em;
}

p {
  margin: 0 0 1.1em;
  color: var(--text-soft);
  text-wrap: pretty;
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

blockquote {
  margin: 0 0 1.4em;
}

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

::selection {
  background: var(--brand-gold);
  color: var(--brand-deep);
}

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

/* ===== Skip / header ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
  padding: 6px 0;
}

.logo svg {
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(26, 58, 92, 0.28);
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s var(--ease);
}

.logo:hover svg,
.logo:focus-visible svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(245, 197, 66, 0.45);
}

.logo span {
  background: linear-gradient(120deg, var(--brand-deep), var(--brand-accent) 60%, var(--brand-gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@media (prefers-color-scheme: dark) {
  .logo span {
    background: linear-gradient(120deg, #ffffff, var(--brand-accent-2) 55%, var(--brand-gold));
    -webkit-background-clip: text;
    background-clip: text;
  }
}

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

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

#site-header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--grad-gold);
  transform: translateX(-50%);
  transition: width 0.32s var(--ease-out);
}

#site-header nav a:hover,
#site-header nav a:focus-visible {
  color: var(--brand-deep);
  background: rgba(74, 127, 181, 0.1);
  transform: translateY(-1px);
}

#site-header nav a:hover::after,
#site-header nav a:focus-visible::after {
  width: calc(100% - 28px);
}

@media (prefers-color-scheme: dark) {
  #site-header nav a:hover,
  #site-header nav a:focus-visible {
    color: var(--brand-gold);
    background: rgba(245, 197, 66, 0.12);
  }
}

/* ===== Layout ===== */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: block;
}

main > section,
main > nav {
  margin: 0 0 28px;
  padding: 34px 32px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease-out), border-color 0.4s var(--ease);
}

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand-accent) 45%, var(--brand-gold) 100%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

main > section:hover::before {
  opacity: 1;
}

/* ===== Hero ===== */
#hero {
  margin-top: 28px;
  padding: 64px 40px 60px;
  color: #ffffff;
  background: var(--grad-hero);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  display: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(720px 340px at 88% 12%, rgba(245, 197, 66, 0.28), transparent 62%),
    radial-gradient(560px 300px at 6% 96%, rgba(110, 168, 224, 0.32), transparent 66%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}

#hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
  max-width: 20ch;
}

#hero p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 74ch;
  font-size: 1.02rem;
}

#hero a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  margin: 8px 14px 0 0;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease-out), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}

#hero a:first-of-type {
  background: var(--grad-gold);
  color: var(--brand-deep-2);
  box-shadow: 0 10px 26px rgba(245, 197, 66, 0.35);
}

#hero a:first-of-type:hover,
#hero a:first-of-type:focus-visible {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 34px rgba(245, 197, 66, 0.5);
  color: var(--brand-deep-2);
}

#hero a:last-of-type {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

#hero a:last-of-type:hover,
#hero a:last-of-type:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px) scale(1.02);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

/* ===== Breadcrumb ===== */
main > nav[aria-label="面包屑导航"] {
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: none;
}

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

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  color: var(--text-mute);
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--text-mute);
  opacity: 0.6;
}

main > nav[aria-label="面包屑导航"] a {
  color: var(--text-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

main > nav[aria-label="面包屑导航"] a:hover {
  background: rgba(74, 127, 181, 0.12);
}

/* ===== Section inner blocks ===== */
#about h3,
#products h3,
#advantages h3,
#solutions h3,
#applications h3,
#cases h3,
#knowledge h3,
#howto h3,
#faq h3,
#contact h3 {
  padding-left: 16px;
  position: relative;
}

#about h3::before,
#products h3::before,
#advantages h3::before,
#solutions h3::before,
#applications h3::before,
#cases h3::before,
#knowledge h3::before,
#howto h3::before,
#faq h3::before,
#contact h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--brand-accent), var(--brand-gold));
  transition: transform 0.35s var(--ease-out);
}

#about h3:hover::before,
#products h3:hover::before,
#advantages h3:hover::before,
#solutions h3:hover::before,
#applications h3:hover::before,
#cases h3:hover::before,
#knowledge h3:hover::before,
#howto h3:hover::before,
#faq h3:hover::before,
#contact h3:hover::before {
  transform: scaleY(1.18);
}

/* ===== Advantage / solution cards via grid on subsections ===== */
#products,
#advantages,
#solutions,
#applications,
#cases {
  background-image: linear-gradient(180deg, rgba(74, 127, 181, 0.05), transparent 220px);
}

@media (prefers-color-scheme: dark) {
  #products,
  #advantages,
  #solutions,
  #applications,
  #cases {
    background-image: linear-gradient(180deg, rgba(110, 168, 224, 0.08), transparent 220px);
  }
}

/* ===== Testimonials ===== */
#testimonials blockquote {
  position: relative;
  padding: 26px 28px 22px 30px;
  border-radius: var(--radius);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-left: 5px solid transparent;
  background-clip: padding-box;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  top: 4px;
  right: 20px;
  font-size: 4.2rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--brand-gold);
  opacity: 0.35;
  pointer-events: none;
}

#testimonials blockquote:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--brand-gold);
}

#testimonials blockquote p {
  color: var(--text);
  font-size: 1.02rem;
  font-style: italic;
}

#testimonials blockquote footer {
  font-size: 0.9rem;
  color: var(--text-mute);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ===== News & articles ===== */
#news article,
#articles article {
  position: relative;
  padding: 24px 26px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

#news article::after,
#articles article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease-out);
}

#news article:hover,
#articles article:hover,
#news article:focus-within,
#articles article:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

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

#news article h3,
#articles article h3 {
  margin-top: 0;
  padding-left: 0;
}

#news article h3::before,
#articles article h3::before {
  display: none;
}

#news article h3 a,
#articles article h3 a {
  color: var(--text);
  transition: color 0.3s var(--ease);
}

#news article h3 a:hover,
#articles article h3 a:hover {
  color: var(--brand-accent);
}

#news article > a,
#articles article > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-accent);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(74, 127, 181, 0.1);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease-out), color 0.3s var(--ease);
}

#news article > a::after,
#articles article > a::after {
  content: "\2192";
  transition: transform 0.3s var(--ease-out);
}

#news article > a:hover,
#articles article > a:hover {
  background: var(--grad-gold);
  color: var(--brand-deep-2);
  transform: translateX(4px);
}

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

/* ===== HowTo ordered list ===== */
#howto ol {
  list-style: none;
  padding: 0;
  counter-reset: howto;
  display: grid;
  gap: 14px;
}

#howto ol li {
  counter-increment: howto;
  position: relative;
  padding: 16px 20px 16px 62px;
  margin: 0;
  border-radius: var(--radius);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#howto ol li::before {
  content: counter(howto);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--brand-deep-2);
  background: var(--grad-gold);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(245, 197, 66, 0.35);
}

#howto ol li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

/* ===== FAQ ===== */
#faq h3 {
  margin-top: 1.8em;
  padding: 14px 18px 14px 20px;
  border-radius: var(--radius);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  cursor: default;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease);
}

#faq h3::before {
  top: 14px;
  bottom: 14px;
}

#faq h3:hover {
  transform: translateY(-3px);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

#faq h3 + p {
  padding: 0 6px;
}

/* ===== Contact ===== */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#contact ul li {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand-gold);
  color: var(--text);
}

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

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover,
#sitemap a:focus-visible,
#links a:focus-visible {
  transform: translateY(-3px);
  background: var(--grad-gold);
  color: var(--brand-deep-2);
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(245, 197, 66, 0.32);
}

/* ===== Footer ===== */
#site-footer {
  margin-top: 40px;
  padding: 48px 20px 32px;
  background: linear-gradient(180deg, var(--brand-deep-2), #081522);
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand-accent) 45%, var(--brand-gold) 100%);
}

#site-footer > section {
  max-width: var(--maxw);
  margin: 0 auto 26px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease-out), border-color 0.4s var(--ease);
}

#site-footer > section:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 197, 66, 0.35);
  transform: translateY(-3px);
}

#site-footer h2 {
  font-size: 1.02rem;
  color: #ffffff;
  padding-bottom: 0.4em;
  margin-bottom: 0.7em;
}

#site-footer h2::after {
  width: 40px;
  height: 3px;
}

#site-footer p,
#site-footer li {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

#site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

#site-footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

/* ===== Scroll animation ===== */
@media (prefers-reduced-motion: no-preference) {
  main > section,
  main > nav {
    animation: fadeUp 0.75s var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% cover 26%;
  }

  #hero {
    animation: heroIn 0.9s var(--ease-out) both;
  }

  #news article,
  #articles article {
    animation: fadeUp 0.7s var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }

  #testimonials blockquote,
  #contact ul li,
  #howto ol li {
    animation: fadeUp 0.65s var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% cover 20%;
  }
}

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

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Fallback for browsers without scroll timeline */
@supports not (animation-timeline: view()) {
  main > section,
  main > nav,
  #news article,
  #articles article,
  #testimonials blockquote,
  #contact ul li,
  #howto ol li {
    animation: fadeUp 0.7s var(--ease-out) both;
  }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }

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

  #site-header nav ul {
    gap: 2px;
  }

  #site-header nav a {
    padding: 7px 11px;
    font-size: 0.88rem;
  }

  main {
    padding: 0 16px 32px;
  }

  main > section,
  main > nav {
    padding: 26px 22px;
    border-radius: var(--radius);
    margin-bottom: 22px;
  }

  #hero {
    padding: 46px 24px 44px;
    margin-top: 22px;
  }

  #hero h1 {
    max-width: none;
  }

  #hero a {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15.5px;
    line-height: 1.72;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  #site-header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  #site-header nav::-webkit-scrollbar {
    display: none;
  }

  #site-header nav ul {
    flex-wrap: nowrap;
    width: max-content;
  }

  #site-header nav a {
    white-space: nowrap;
  }

  main > section,
  main > nav {
    padding: 22px 16px;
  }

  #hero {
    padding: 38px 18px 36px;
  }

  #hero a {
    padding: 12px 20px;
  }

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

  #howto ol li {
    padding: 14px 16px 14px 56px;
  }

  #howto ol li::before {
    left: 14px;
    width: 28px;
    height: 28px;
    font-size: 0.84rem;
  }

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

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

  #site-footer > section {
    padding: 18px 16px;
  }
}

/* ===== Print ===== */
@media print {
  #site-header,
  #hero a,
  #site-footer::before {
    display: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  main > section,
  main > nav,
  #news article,
  #articles article {
    box-shadow: none;
    border: 1px solid #cccccc;
    animation: none;
  }
}