:root {
  --bg: #f4f5f9;
  --bg-elevated: #ffffff;
  --bg-soft: #eef0f6;
  --text: #1a1a2e;
  --text-soft: #4a4d63;
  --text-muted: #767a92;
  --primary: #e94560;
  --primary-soft: rgba(233, 69, 96, 0.12);
  --accent: #f5a623;
  --accent-soft: rgba(245, 166, 35, 0.14);
  --deep: #1a1a2e;
  --deep-2: #16213e;
  --deep-3: #0f3460;
  --border: rgba(26, 26, 46, 0.1);
  --border-strong: rgba(26, 26, 46, 0.18);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 10px 30px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 24px 60px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #f5a623 100%);
  --gradient-soft: linear-gradient(135deg, rgba(233,69,96,0.1), rgba(245,166,35,0.1));
  --header-h: 76px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0d0f1a;
  --bg-elevated: #161a2b;
  --bg-soft: #1c2136;
  --text: #eef0f8;
  --text-soft: #c3c8dd;
  --text-muted: #8b91ab;
  --primary: #ff5c77;
  --primary-soft: rgba(255, 92, 119, 0.16);
  --accent: #ffb84d;
  --accent-soft: rgba(255, 184, 77, 0.16);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --glass: rgba(22, 26, 43, 0.62);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --gradient-hero: linear-gradient(135deg, #0d0f1a 0%, #16213e 50%, #0f3460 100%);
}

*,
*::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.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, var(--accent-soft), transparent 42%),
    radial-gradient(circle at 88% 4%, var(--primary-soft), transparent 40%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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,
a:focus-visible {
  color: var(--accent);
}

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

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

h1 { font-size: clamp(1.6rem, 4.2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }

p { margin: 0 0 1em; }

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

li { margin-bottom: 0.4em; }

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

blockquote {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

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

.brand:hover { color: var(--primary); }

.brand svg {
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease);
}

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

.brand-name {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

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

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li { margin: 0; }

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

.main-nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-2px);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-tools form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-tools input[type="search"] {
  width: 180px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

.header-tools input[type="search"]::placeholder { color: var(--text-muted); }

.header-tools input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
  width: 220px;
}

.header-tools button {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.header-tools button:hover {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.header-tools form button[type="submit"] {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
}

#menu-toggle { display: none; }

/* ============ Main layout ============ */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

main > section {
  margin-top: 56px;
  animation: fadeUp 0.7s var(--ease) both;
}

main > section:nth-of-type(odd) { animation-delay: 0.05s; }

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

main > section > h2 {
  position: relative;
  padding-left: 18px;
  margin-bottom: 24px;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--gradient-accent);
}

main > section > article {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

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

main > section > article h3 {
  color: var(--primary);
  margin-top: 1.4em;
  padding-bottom: 0.3em;
  border-bottom: 1px dashed var(--border);
}

main > section > article h3:first-child { margin-top: 0; }

/* ============ Breadcrumb ============ */
.breadcrumb {
  margin-top: 20px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 10px 18px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: fit-content;
  max-width: 100%;
}

.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 6px; }

.breadcrumb li + li::before {
  content: "›";
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-soft); font-weight: 600; }
.breadcrumb a:hover { color: var(--primary); }

/* ============ Hero ============ */
#hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  color: #eef0f8;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(245, 166, 35, 0.35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(233, 69, 96, 0.4), transparent 50%);
  pointer-events: none;
}

#hero > * { position: relative; z-index: 1; }

.hero-text h1 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-lead {
  color: rgba(238, 240, 248, 0.88);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.85;
}

.hero-lead strong { color: #ffd27a; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 0;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

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

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

/* ============ Carousel ============ */
.hero-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s var(--ease);
}

.slide {
  flex: 0 0 100%;
  margin: 0;
  position: relative;
}

.slide svg {
  width: 100%;
  height: auto;
  display: block;
}

.slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 18px 16px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #fff;
  background: linear-gradient(to top, rgba(13, 15, 26, 0.9), transparent);
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(13, 15, 26, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 2;
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}

.carousel-dots button[aria-selected="true"] {
  width: 26px;
  border-radius: 999px;
  background: var(--accent);
}

/* ============ Stats ============ */
#stats ul.stat-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat-list li {
  margin: 0;
  padding: 28px 18px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.stat-list li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.stat-num {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.1;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============ News ============ */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.news-list li {
  margin: 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.news-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

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

.news-list li:hover::before { transform: scaleY(1); }

.news-list time {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.news-list h3 {
  font-size: 1.08rem;
  margin: 0 0 6px;
}

.news-list p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* ============ Article cards ============ */
#articles > p {
  color: var(--text-soft);
  margin-bottom: 24px;
}

.article-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.article-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.article-card:hover::after { opacity: 1; }

.article-card > * { position: relative; z-index: 1; }

.article-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--primary); }

.article-card .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.article-card .summary {
  color: var(--text-soft);
  font-size: 0.94rem;
  margin-bottom: 12px;
}

.article-card > p:last-child {
  margin: 0;
}

.article-card > p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.article-card > p:last-child a::after { content: "→"; transition: transform 0.25s var(--ease); }

.article-card > p:last-child a:hover {
  background: var(--gradient-accent);
  color: #fff;
  transform: translateX(3px);
}

.article-card > p:last-child a:hover::after { transform: translateX(4px); }

/* ============ HowTo / lists inside articles ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#howto ol li:hover {
  transform: translateX(5px);
  background: var(--accent-soft);
}

/* ============ FAQ ============ */
#faq details {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 0 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

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

#faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  position: relative;
  transition: color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease), background-color 0.25s var(--ease);
}

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

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

#faq details p {
  margin: 0;
  padding: 0 0 20px;
  color: var(--text-soft);
  font-size: 0.94rem;
  animation: fadeIn 0.4s var(--ease);
}

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

/* ============ Testimonials ============ */
#testimonials blockquote {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 26px 24px 30px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

#testimonials blockquote p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
  line-height: 1.8;
}

/* ============ Contact ============ */
#contact address {
  font-style: normal;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

#contact address p {
  margin: 0;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#contact address p:hover {
  background: var(--accent-soft);
  transform: translateY(-3px);
}

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

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

#sitemap a,
#links a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
}

/* ============ Footer ============ */
footer {
  margin-top: 60px;
  padding: clamp(36px, 6vw, 64px) 24px 32px;
  background: var(--gradient-hero);
  color: rgba(238, 240, 248, 0.82);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(233, 69, 96, 0.3), transparent 45%),
    radial-gradient(circle at 90% 100%, rgba(245, 166, 35, 0.25), transparent 45%);
  pointer-events: none;
}

footer > * {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

footer h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

footer h3 {
  color: var(--accent);
  font-size: 0.98rem;
  margin: 18px 0 6px;
}

footer p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 0.8em;
}

footer a { color: var(--accent); }
footer a:hover { color: #fff; }

footer section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

footer section:last-of-type { border-bottom: none; }

footer .copyright {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(238, 240, 248, 0.55);
  margin: 0;
  padding-top: 12px;
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--gradient-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease);
}

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

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

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .header-tools input[type="search"] { width: 140px; }
  .header-tools input[type="search"]:focus { width: 160px; }
  .main-nav a { padding: 7px 10px; font-size: 0.86rem; }
}

@media (max-width: 920px) {
  #hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  #site-header nav {
    order: 4;
    flex-basis: 100%;
    display: none;
  }

  #site-header nav.is-open {
    display: block;
    animation: fadeIn 0.3s var(--ease);
  }

  .main-nav {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
  }

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

  #menu-toggle { display: inline-block; }

  .header-tools { margin-left: auto; }

  .header-tools form { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }

  body { font-size: 15px; }

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

  main { padding: 0 16px 32px; }

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

  #hero {
    padding: 24px 20px;
    border-radius: var(--radius);
  }

  .hero-cta { gap: 10px; }

  .btn-primary,
  .btn-secondary {
    padding: 11px 22px;
    font-size: 0.9rem;
  }

  #stats ul.stat-list {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-list li { padding: 20px 12px; }

  .article-card { padding: 20px 18px; }

  #faq details { padding: 0 16px; }

  #faq summary { padding: 15px 36px 15px 0; font-size: 0.94rem; }

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

  .carousel-prev,
  .carousel-next { width: 34px; height: 34px; font-size: 1.1rem; }

  .slide figcaption { font-size: 0.74rem; padding: 30px 12px 12px; }

  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  footer { padding: 32px 16px 24px; }
}

@media (max-width: 400px) {
  #stats ul.stat-list { grid-template-columns: 1fr; }
  .brand-name { display: none; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ Print ============ */
@media print {
  #site-header,
  #back-to-top,
  .hero-carousel,
  .carousel-prev,
  .carousel-next,
  .carousel-dots {
    display: none !important;
  }

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

  main > section > article,
  .article-card,
  #faq details {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}