:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #4834D4;
  --accent: #00B894;
  --accent-2: #E17055;
  --accent-3: #FDCB6E;
  --bg: #F7F7FB;
  --bg-elev: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-strong: rgba(255, 255, 255, 0.85);
  --text: #2D3436;
  --text-soft: #5A6270;
  --text-mute: #8A93A5;
  --border: rgba(108, 92, 231, 0.14);
  --border-soft: rgba(45, 52, 54, 0.08);
  --shadow-sm: 0 2px 10px rgba(72, 52, 212, 0.06);
  --shadow-md: 0 8px 30px rgba(72, 52, 212, 0.10);
  --shadow-lg: 0 20px 60px rgba(72, 52, 212, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101018;
    --bg-elev: #1A1A26;
    --bg-glass: rgba(26, 26, 38, 0.6);
    --bg-glass-strong: rgba(26, 26, 38, 0.85);
    --text: #ECECF4;
    --text-soft: #B4B8C8;
    --text-mute: #7E8498;
    --border: rgba(162, 155, 254, 0.18);
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(108, 92, 231, 0.10), transparent 60%),
    radial-gradient(1000px 500px at 95% 0%, rgba(0, 184, 148, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  background: linear-gradient(120deg, var(--primary-dark), var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  position: relative;
  padding-bottom: 0.5em;
}

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

h3 {
  font-size: clamp(1.1rem, 1.9vw, 1.32rem);
  color: var(--text);
}

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

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

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

ul, ol {
  padding-left: 1.3em;
  margin: 0 0 1em;
}

li {
  margin-bottom: 0.4em;
  color: var(--text-soft);
}

strong {
  color: var(--text);
}

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

address {
  font-style: normal;
}

:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(108, 92, 231, 0.25);
  color: var(--text);
}

/* ============ HEADER / NAV ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

header nav[aria-label="主导航"] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

header nav[aria-label="主导航"] > a[aria-label="青漫漫画首页"] {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

header nav[aria-label="主导航"] > a[aria-label="青漫漫画首页"]:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-md);
  color: #fff;
}

header nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
}

header nav[aria-label="主导航"] ul li {
  margin: 0;
}

header nav[aria-label="主导航"] ul a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

header nav[aria-label="主导航"] ul a:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.10);
  transform: translateY(-1px);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 300px;
  margin-left: auto;
}

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

header form[role="search"] input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

header form[role="search"] input::placeholder {
  color: var(--text-mute);
}

header form[role="search"] input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

header form[role="search"] button {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, filter 0.25s ease;
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.06);
}

header form[role="search"] button:active {
  transform: translateY(0);
}

header nav[aria-label="面包屑导航"] {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

header nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-mute);
}

header nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-mute);
}

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

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

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

/* ============ MAIN LAYOUT ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) 4rem;
}

main > section {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
  transition: box-shadow 0.35s ease, transform 0.35s var(--ease), border-color 0.35s ease;
}

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

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

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

/* ============ HERO ============ */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 3rem);
  background:
    linear-gradient(135deg, rgba(108, 92, 231, 0.92), rgba(72, 52, 212, 0.88) 45%, rgba(0, 184, 148, 0.85)),
    var(--primary);
  border: none;
  color: #fff;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob 14s ease-in-out infinite alternate;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(253, 203, 110, 0.30), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: floatBlob 18s ease-in-out infinite alternate-reverse;
}

@keyframes floatBlob {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-30px, 40px) scale(1.12); }
}

#hero h1 {
  position: relative;
  z-index: 1;
  -webkit-text-fill-color: #fff;
  color: #fff;
  background: none;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}

#hero > p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  max-width: 74ch;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

#hero > div {
  position: relative;
  z-index: 1;
  margin-top: 1.6rem;
}

#hero > div > h2 {
  color: #fff;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

#hero > div > h2::after {
  background: linear-gradient(90deg, #FDCB6E, #fff);
}

#hero > div > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
}

#hero > div > ul > li {
  margin: 0;
}

#hero figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.45s var(--ease), box-shadow 0.45s ease;
}

#hero figure:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

#hero figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

#hero figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

#hero > div > p {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.95rem;
  margin: 0;
}

#hero > div > p strong {
  color: #FDCB6E;
  font-size: 1.08em;
}

/* ============ BRAND ============ */
#brand ul {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

#brand ul li {
  position: relative;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}

#brand ul li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12);
}

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

#brand ul li strong {
  color: var(--primary);
}

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

#products ul li {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

#products ul li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

#products ul li strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--primary);
  font-size: 1.02em;
}

/* ============ SOLUTIONS ============ */
#solutions h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#solutions h3::before {
  content: "";
  width: 6px;
  height: 1.1em;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

#solutions p {
  padding-left: 1.1rem;
  border-left: 2px dashed var(--border);
}

/* ============ CASES ============ */
#cases blockquote {
  margin: 0 0 1rem;
  padding: 1.2rem 1.4rem 1.2rem 1.6rem;
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease;
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.2rem;
  right: 1rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--primary-light);
  opacity: 0.4;
  font-family: Georgia, serif;
}

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

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

/* ============ NEWS / ARTICLES ============ */
#news article,
#articles article {
  position: relative;
  padding: 1.2rem 1.3rem;
  margin-bottom: 0.9rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
  transition: color 0.25s ease;
}

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

#news article time,
#articles article time {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-mute);
  background: rgba(108, 92, 231, 0.08);
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

#news article p,
#articles article p {
  margin-bottom: 0.6rem;
}

#news article a,
#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(108, 92, 231, 0.10);
  transition: background 0.25s ease, transform 0.25s var(--ease), color 0.25s ease;
}

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

#news article a:hover,
#articles article a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateX(2px);
}

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

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 0.7rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#faq details[open] {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.2rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color 0.25s ease, background 0.25s ease;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(108, 92, 231, 0.10);
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.3s ease, color 0.3s ease;
}

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

#faq summary:hover {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.05);
}

#faq details p {
  margin: 0;
  padding: 0 1.2rem 1.1rem;
  animation: fadeUp 0.4s var(--ease) both;
}

/* ============ HOWTO ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

#howto ol li {
  position: relative;
  counter-increment: step;
  margin-bottom: 0.6rem;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

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

#howto ul {
  list-style: none;
  padding: 0;
}

#howto ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
}

#howto ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
}

/* ============ KNOWLEDGE ============ */
#knowledge p {
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  background: var(--bg-elev);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  transition: border-color 0.3s ease, transform 0.3s var(--ease);
}

#knowledge p:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

/* ============ CONTACT ============ */
#contact address {
  display: grid;
  gap: 0.5rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(0, 184, 148, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

#contact address p {
  margin: 0;
  color: var(--text-soft);
}

#contact address p:first-child {
  font-weight: 800;
  color: var(--primary);
}

/* ============ SITEMAP / LINKS ============ */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

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

#sitemap ul a,
#links ul a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  transition: transform 0.3s var(--ease), background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

/* ============ FOOTER ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: clamp(2rem, 5vw, 3.2rem) clamp(1rem, 4vw, 2.5rem) 2rem;
  background:
    linear-gradient(180deg, rgba(108, 92, 231, 0.06), transparent 40%),
    var(--bg-elev);
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem 2rem;
  max-width: 100%;
}

footer > section {
  max-width: var(--maxw);
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

footer h2::after {
  width: 36px;
  height: 3px;
}

footer p {
  font-size: 0.9rem;
  color: var(--text-mute);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
}

footer ul li {
  margin-bottom: 0.35rem;
}

footer ul a {
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: color 0.25s ease, padding-left 0.25s var(--ease);
}

footer ul a:hover {
  color: var(--primary);
  padding-left: 4px;
}

footer > p {
  grid-column: 1 / -1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-mute);
  text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  header form[role="search"] {
    flex: 1 1 100%;
    margin-left: 0;
  }

  header nav[aria-label="主导航"] ul {
    order: 3;
    flex: 1 1 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  header nav[aria-label="主导航"] ul a {
    white-space: nowrap;
  }
}

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

  main > section {
    border-radius: var(--radius);
  }

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

  #hero > div > ul {
    grid-template-columns: 1fr;
  }

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

  #news article,
  #articles article {
    padding: 1rem;
  }

  footer {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  #articles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1rem;
    align-items: start;
  }

  #articles > h2 {
    grid-column: 1 / -1;
  }
}

/* ============ SCROLL ANIMATION (progressive enhancement) ============ */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > section {
      animation: fadeUp 0.7s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}

/* ============ PRINT ============ */
@media print {
  header, footer, #hero::before, #hero::after {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    animation: none;
    background: #fff;
  }
}
