:root {
  --brand: #1a73e8;
  --brand-2: #7b3fe4;
  --brand-3: #00c2ff;
  --accent: #ff7a45;
  --bg: #f4f6fb;
  --bg-soft: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --text: #1c2333;
  --text-soft: #55607a;
  --text-muted: #7b869e;
  --border: rgba(28, 35, 51, 0.1);
  --border-strong: rgba(28, 35, 51, 0.16);
  --shadow-sm: 0 2px 8px rgba(20, 30, 60, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 30, 60, 0.1);
  --shadow-lg: 0 24px 60px rgba(20, 30, 60, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --header-h: 68px;
  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
  --grad-hero: linear-gradient(135deg, #1a73e8 0%, #6a4be0 50%, #7b3fe4 100%);
  --grad-soft: linear-gradient(135deg, rgba(26, 115, 232, 0.12), rgba(123, 63, 228, 0.12));
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c1018;
  --bg-soft: #131a26;
  --bg-elevated: rgba(23, 31, 46, 0.72);
  --text: #e8edf7;
  --text-soft: #a9b4ca;
  --text-muted: #7f8ba3;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --grad-hero: linear-gradient(135deg, #0f3f8f 0%, #3a2a86 50%, #4a1f8f 100%);
  --grad-soft: linear-gradient(135deg, rgba(26, 115, 232, 0.2), rgba(123, 63, 228, 0.2));
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0c1018;
    --bg-soft: #131a26;
    --bg-elevated: rgba(23, 31, 46, 0.72);
    --text: #e8edf7;
    --text-soft: #a9b4ca;
    --text-muted: #7f8ba3;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --grad-hero: linear-gradient(135deg, #0f3f8f 0%, #3a2a86 50%, #4a1f8f 100%);
    --grad-soft: linear-gradient(135deg, rgba(26, 115, 232, 0.2), rgba(123, 63, 228, 0.2));
    color-scheme: dark;
  }
}

*,
*::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: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(26, 115, 232, 0.14), transparent 60%),
    radial-gradient(900px 500px at 5% 10%, rgba(123, 63, 228, 0.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

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

h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
h3 { font-size: clamp(1.08rem, 1.8vw, 1.28rem); }

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

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

strong { color: var(--text); font-weight: 700; }

blockquote {
  margin: 0 0 1em;
  padding: 18px 22px;
  border-left: 4px solid var(--brand);
  background: var(--grad-soft);
  border-radius: var(--radius-sm);
}

blockquote p { margin-bottom: 0.6em; }
blockquote p:last-child { margin-bottom: 0; }

code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

::selection {
  background: rgba(26, 115, 232, 0.25);
  color: var(--text);
}

:focus-visible {
  outline: 3px solid rgba(26, 115, 232, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

.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;
  height: var(--header-h);
  background: var(--bg-elevated);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

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

.header-inner {
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

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

.brand svg {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.35);
  transition: transform 0.4s var(--ease);
}

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

.brand-name {
  font-size: 1.18rem;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar { display: none; }
.nav-list li { margin: 0; flex: 0 0 auto; }

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

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--brand);
  background: rgba(26, 115, 232, 0.1);
  transform: translateY(-1px);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 300px;
  min-width: 180px;
  padding: 5px 6px 5px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.14);
}

.site-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  padding: 6px 0;
}

.site-search input::placeholder { color: var(--text-muted); }
.site-search input:focus { outline: none; }

.site-search button {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(26, 115, 232, 0.45);
  filter: brightness(1.06);
}

.site-search button:active { transform: translateY(0); }

#theme-toggle,
#menu-toggle {
  flex: 0 0 auto;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

#menu-toggle { display: none; }

/* ============ Layout ============ */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

main > section,
main > nav {
  margin: 48px 0;
}

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

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

main > section > h2 {
  position: relative;
  padding-bottom: 12px;
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

main > section h3 {
  margin-top: 1.4em;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
  border-radius: 2px;
}

main > section h3:first-of-type { margin-top: 0.8em; }

.meta-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1em;
}

/* ============ Hero ============ */

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px !important;
  border: 1px solid transparent !important;
  border-radius: var(--radius-xl) !important;
  padding: clamp(24px, 5vw, 56px) !important;
  background: var(--grad-hero) !important;
  color: #fff;
  box-shadow: 0 30px 70px rgba(26, 115, 232, 0.3) !important;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 62%);
  border-radius: 50%;
  z-index: -1;
  animation: floaty 14s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -50% -15%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.3), transparent 65%);
  border-radius: 50%;
  z-index: -1;
  animation: floaty 18s ease-in-out infinite reverse;
}

@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-24px, 26px, 0) scale(1.08); }
}

.hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
  max-width: 22ch;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  max-width: 78ch;
}

.hero-visual {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-visual:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.hero-visual svg { width: 100%; height: auto; }

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-stats li {
  margin: 0;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.hero-stats li:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-stats strong {
  display: block;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.hero-stats span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ============ Breadcrumb ============ */

.breadcrumb {
  margin: 24px 0 !important;
  padding: 0 4px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

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

.breadcrumb a {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all 0.25s var(--ease);
}

.breadcrumb a:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

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

/* ============ Timeline ============ */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2), transparent);
  border-radius: 2px;
}

.timeline li {
  position: relative;
  margin: 0 0 14px;
  padding: 12px 16px 12px 34px;
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.14);
}

.timeline li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ============ Articles / News ============ */

article {
  margin: 0 0 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  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);
}

main > section article {
  background: var(--grad-soft);
}

article::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

article:hover::after { opacity: 1; }

article h3 { margin-top: 0; border-left: 0; padding-left: 0; }

article p:last-child { margin-bottom: 0; }

article a[href="#articles"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

article a[href="#articles"]::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

article a[href="#articles"]:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 10px 24px rgba(26, 115, 232, 0.4);
}

article a[href="#articles"]:hover::after { transform: translateX(4px); }

/* ============ FAQ ============ */

#faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

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

#faq details[open] {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  background: var(--grad-soft);
}

#faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  transform: translateY(-50%) rotate(180deg);
}

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

#faq details > p {
  margin: 0;
  padding: 0 20px 18px;
  animation: faqFade 0.4s var(--ease);
}

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

/* ============ Contact / Address ============ */

address {
  font-style: normal;
  margin: 0 0 1em;
}

#contact address ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#contact address li {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact address li:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

#contact address li:first-child { font-weight: 600; color: var(--text); }

/* ============ Sitemap & Links ============ */

#sitemap,
#links {
  background: var(--bg-elevated) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

#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 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: all 0.28s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 115, 232, 0.32);
}

/* ============ Footer ============ */

#site-footer {
  margin-top: 56px;
  padding: clamp(28px, 5vw, 52px) 20px 32px;
  background:
    radial-gradient(800px 300px at 100% 0%, rgba(123, 63, 228, 0.16), transparent 60%),
    radial-gradient(700px 300px at 0% 100%, rgba(26, 115, 232, 0.14), transparent 60%),
    var(--bg-soft);
  border-top: 1px solid var(--border);
}

#site-footer > section {
  max-width: var(--maxw);
  margin: 0 auto 22px;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#site-footer > section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#site-footer h2 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text);
}

#site-footer p {
  font-size: 0.88rem;
  margin: 0;
  color: var(--text-muted);
}

.footer-meta {
  max-width: var(--maxw);
  margin: 28px auto 0 !important;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
}

/* ============ Back to top ============ */

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(26, 115, 232, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.94);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

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

#back-to-top:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 40px rgba(26, 115, 232, 0.5);
}

/* ============ Scroll reveal ============ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

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

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============ Responsive ============ */

@media (max-width: 1024px) {
  .header-inner { gap: 12px; }
  .nav-list a { padding: 8px 10px; font-size: 0.86rem; }
  .site-search { flex-basis: 220px; min-width: 150px; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }

  .header-inner {
    flex-wrap: wrap;
    padding: 0 14px;
    gap: 10px;
  }

  #site-header { height: auto; }

  #site-header nav {
    order: 5;
    flex: 1 1 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }

  #site-header.nav-open nav {
    max-height: 420px;
    overflow-y: auto;
  }

  .nav-list {
    flex-wrap: wrap;
    padding: 8px 0 12px;
    gap: 6px;
  }

  .nav-list a {
    background: var(--bg-soft);
    border: 1px solid var(--border);
  }

  .site-search {
    order: 4;
    flex: 1 1 100%;
    max-width: none;
    margin-bottom: 10px;
    display: none;
  }

  #site-header.nav-open .site-search { display: flex; }

  #menu-toggle { display: inline-block; margin-left: auto; }

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

  main { padding: 0 14px 28px; }

  main > section,
  main > nav { margin: 32px 0; }

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

  .hero { border-radius: var(--radius-lg) !important; }

  .hero h1 { max-width: none; }

  .hero-visual svg { height: auto; }

  article { padding: 16px 16px; }

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

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

  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .hero-stats li { padding: 14px 10px; }

  .hero-stats span { font-size: 0.74rem; }

  #theme-toggle { padding: 8px 12px; font-size: 0.8rem; }

  #menu-toggle { padding: 8px 12px; font-size: 0.8rem; }

  .site-search button { padding: 7px 12px; }

  main > section { padding: 18px 16px; }

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

  #faq details > p { padding: 0 16px 16px; }

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

  .timeline li { padding: 10px 12px 10px 30px; }

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

@media (hover: none) {
  .hero-visual:hover,
  article:hover,
  .hero-stats li:hover,
  #contact address li:hover,
  #sitemap a:hover,
  #links a:hover,
  .timeline li:hover {
    transform: none;
  }
}

/* ============ Print ============ */

@media print {
  #site-header,
  #back-to-top,
  .site-search,
  #theme-toggle,
  #menu-toggle,
  .hero-visual,
  .hero-stats { display: none !important; }

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

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

  a { color: #000; text-decoration: underline; }
}