:root {
  --jf-primary: #0f2a44;
  --jf-primary-light: #1b3f63;
  --jf-accent: #c9a227;
  --jf-accent-light: #e0b93a;
  --jf-accent-soft: rgba(201, 162, 39, 0.15);
  --jf-bg: #f4f6f9;
  --jf-bg-alt: #eaeef4;
  --jf-surface: #ffffff;
  --jf-surface-glass: rgba(255, 255, 255, 0.72);
  --jf-border: rgba(15, 42, 68, 0.1);
  --jf-text: #1a2430;
  --jf-text-soft: #4a5768;
  --jf-text-muted: #7a8698;
  --jf-shadow-sm: 0 2px 8px rgba(15, 42, 68, 0.06);
  --jf-shadow-md: 0 8px 24px rgba(15, 42, 68, 0.1);
  --jf-shadow-lg: 0 16px 48px rgba(15, 42, 68, 0.16);
  --jf-radius-sm: 10px;
  --jf-radius-md: 16px;
  --jf-radius-lg: 24px;
  --jf-radius-xl: 32px;
  --jf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --jf-maxw: 1200px;
  --jf-gap: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --jf-bg: #0a1420;
    --jf-bg-alt: #0e1b2b;
    --jf-surface: #13263b;
    --jf-surface-glass: rgba(19, 38, 59, 0.66);
    --jf-border: rgba(224, 185, 58, 0.16);
    --jf-text: #e8eef6;
    --jf-text-soft: #b3c2d4;
    --jf-text-muted: #7f92a8;
    --jf-primary: #0a1420;
    --jf-primary-light: #16304a;
    --jf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --jf-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --jf-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --jf-accent-soft: rgba(224, 185, 58, 0.12);
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--jf-text);
  background-color: var(--jf-bg);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(201, 162, 39, 0.08), transparent 42%),
    radial-gradient(circle at 92% 12%, rgba(27, 63, 99, 0.1), transparent 46%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover,
a:focus-visible {
  color: var(--jf-accent);
}

a:focus-visible {
  outline: 2px solid var(--jf-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

li {
  margin-bottom: 0.5rem;
}

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

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

h1 {
  font-size: clamp(1.65rem, 3.4vw, 2.6rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  position: relative;
  padding-left: 1rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--jf-accent-light), var(--jf-accent));
}

h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  color: var(--jf-primary-light);
}

@media (prefers-color-scheme: dark) {
  h3 {
    color: var(--jf-accent-light);
  }
}

blockquote {
  margin: 1rem 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--jf-accent);
  background: var(--jf-accent-soft);
  border-radius: 0 var(--jf-radius-sm) var(--jf-radius-sm) 0;
  color: var(--jf-text-soft);
  font-style: italic;
}

blockquote p {
  margin: 0;
}

time {
  color: var(--jf-text-muted);
  font-size: 0.875rem;
}

/* ============ Header ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--jf-surface-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--jf-border);
  box-shadow: var(--jf-shadow-sm);
}

.topbar {
  max-width: var(--jf-maxw);
  margin: 0 auto;
  padding: 0.55rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--jf-text-muted);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--jf-border);
}

.topbar span:first-child {
  color: var(--jf-text-soft);
  font-weight: 600;
}

.topbar span:first-child::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--jf-accent);
  box-shadow: 0 0 0 3px var(--jf-accent-soft);
  vertical-align: middle;
}

nav[aria-label="主导航"] {
  max-width: var(--jf-maxw);
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  align-items: center;
}

nav[aria-label="主导航"] a {
  position: relative;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--jf-text-soft);
  white-space: nowrap;
  transition: color 0.28s var(--jf-ease), background 0.28s var(--jf-ease),
    transform 0.28s var(--jf-ease);
}

nav[aria-label="主导航"] a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.18rem;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--jf-accent);
  transform: translateX(-50%);
  transition: width 0.32s var(--jf-ease);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: var(--jf-primary);
  background: var(--jf-accent-soft);
  transform: translateY(-1px);
}

nav[aria-label="主导航"] a:hover::after,
nav[aria-label="主导航"] a:focus-visible::after {
  width: 40%;
}

@media (prefers-color-scheme: dark) {
  nav[aria-label="主导航"] a:hover,
  nav[aria-label="主导航"] a:focus-visible {
    color: var(--jf-accent-light);
  }
}

/* ============ Main layout ============ */
main {
  display: block;
  max-width: var(--jf-maxw);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

section {
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--jf-surface);
  border: 1px solid var(--jf-border);
  border-radius: var(--jf-radius-lg);
  box-shadow: var(--jf-shadow-sm);
  transition: box-shadow 0.4s var(--jf-ease), transform 0.4s var(--jf-ease);
  scroll-margin-top: 130px;
  animation: jfFadeUp 0.7s var(--jf-ease) both;
}

section:hover {
  box-shadow: var(--jf-shadow-md);
}

section > h2:first-child {
  margin-top: 0;
}

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

@supports (animation-timeline: view()) {
  section {
    animation: jfFadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}

/* ============ Hero / home ============ */
#home {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
  padding: 3rem 2.5rem;
  border: none;
  border-radius: var(--jf-radius-xl);
  background:
    linear-gradient(135deg, rgba(15, 42, 68, 0.94) 0%, rgba(27, 63, 99, 0.9) 48%, rgba(15, 42, 68, 0.96) 100%),
    radial-gradient(circle at 78% 18%, rgba(224, 185, 58, 0.4), transparent 52%);
  box-shadow: var(--jf-shadow-lg);
  color: #ffffff;
}

#home::before,
#home::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

#home::before {
  width: 380px;
  height: 380px;
  top: -160px;
  right: -100px;
  background: radial-gradient(circle, rgba(224, 185, 58, 0.35), transparent 68%);
  animation: jfFloat 14s ease-in-out infinite;
}

#home::after {
  width: 300px;
  height: 300px;
  bottom: -140px;
  left: -80px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.28), transparent 70%);
  animation: jfFloat 18s ease-in-out infinite reverse;
}

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

#home h1 {
  position: relative;
  z-index: 1;
  color: #ffffff;
  max-width: 22em;
  background: linear-gradient(90deg, #ffffff 0%, #f2e2a8 60%, #e0b93a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

#home > p {
  position: relative;
  z-index: 1;
  max-width: 62em;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.02rem;
}

#home figure {
  position: relative;
  z-index: 1;
  margin: 2rem 0 0;
  border-radius: var(--jf-radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: transform 0.6s var(--jf-ease), box-shadow 0.6s var(--jf-ease);
}

#home figure:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45);
}

#home figure svg {
  width: 100%;
  height: auto;
  display: block;
}

#home figcaption {
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============ Cards grid for products / solutions / cases ============ */
#products,
#solutions,
#cases,
#articles,
#knowledge,
#news,
#faq,
#howto,
#contact,
#sitemap,
#links {
  background: var(--jf-surface);
}

#products h3,
#solutions h3,
#cases h3,
#knowledge h3,
#howto h3 {
  padding: 1.1rem 1.3rem 0.5rem;
  margin: 1.2rem 0 0.4rem;
  background: var(--jf-bg-alt);
  border-radius: var(--jf-radius-md) var(--jf-radius-md) 0 0;
  border-left: 3px solid var(--jf-accent);
}

#products h3 + p,
#solutions h3 + p,
#cases h3 + p,
#knowledge h3 + p,
#howto h3 + p {
  margin: 0 0 1.2rem;
  padding: 0 1.3rem 1.1rem;
  background: var(--jf-bg-alt);
  border-radius: 0 0 var(--jf-radius-md) var(--jf-radius-md);
  border-left: 3px solid var(--jf-accent);
  transition: background 0.35s var(--jf-ease), transform 0.35s var(--jf-ease);
}

#products h3 + p:hover,
#solutions h3 + p:hover,
#cases h3 + p:hover,
#knowledge h3 + p:hover,
#howto h3 + p:hover {
  background: var(--jf-accent-soft);
  transform: translateX(3px);
}

/* ============ News ============ */
#news ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

#news li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 2.2rem;
  margin-bottom: 0.6rem;
  background: var(--jf-bg-alt);
  border-radius: var(--jf-radius-sm);
  border: 1px solid transparent;
  color: var(--jf-text-soft);
  transition: background 0.3s var(--jf-ease), border-color 0.3s var(--jf-ease),
    transform 0.3s var(--jf-ease), box-shadow 0.3s var(--jf-ease);
}

#news li::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jf-accent);
  box-shadow: 0 0 0 3px var(--jf-accent-soft);
}

#news li:hover {
  background: var(--jf-surface);
  border-color: var(--jf-border);
  transform: translateX(4px);
  box-shadow: var(--jf-shadow-sm);
}

#news time {
  display: inline-block;
  margin-right: 0.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--jf-accent);
}

/* ============ Articles ============ */
#articles > p {
  margin-bottom: 1.5rem;
}

article {
  position: relative;
  margin: 1.2rem 0;
  padding: 1.4rem 1.5rem;
  background: var(--jf-bg-alt);
  border: 1px solid var(--jf-border);
  border-radius: var(--jf-radius-md);
  transition: transform 0.4s var(--jf-ease), box-shadow 0.4s var(--jf-ease),
    background 0.4s var(--jf-ease), border-color 0.4s var(--jf-ease);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--jf-accent-light), var(--jf-accent));
  opacity: 0;
  transition: opacity 0.4s var(--jf-ease);
}

article:hover {
  transform: translateY(-3px);
  background: var(--jf-surface);
  border-color: var(--jf-accent);
  box-shadow: var(--jf-shadow-md);
}

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

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

article time {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
  border-radius: 999px;
  background: var(--jf-accent-soft);
  color: var(--jf-accent);
  font-weight: 600;
}

article p {
  margin-bottom: 0.75rem;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--jf-accent);
}

article a::after {
  content: "→";
  transition: transform 0.3s var(--jf-ease);
}

article a:hover::after {
  transform: translateX(4px);
}

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  margin: 1.6rem 0 0.5rem;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  background: var(--jf-bg-alt);
  border-radius: var(--jf-radius-sm);
  font-size: 1.02rem;
  cursor: pointer;
  transition: background 0.3s var(--jf-ease), color 0.3s var(--jf-ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--jf-primary-light), var(--jf-primary));
  border-radius: 50%;
}

#faq h3:hover {
  background: var(--jf-accent-soft);
  color: var(--jf-primary);
}

@media (prefers-color-scheme: dark) {
  #faq h3:hover {
    color: var(--jf-accent-light);
  }
}

#faq h3 + p {
  margin: 0 0 0.4rem;
  padding: 0.4rem 1rem 0.9rem 2.6rem;
  border-left: 2px dashed var(--jf-border);
  margin-left: 1.55rem;
  color: var(--jf-text-soft);
  font-size: 0.96rem;
}

/* ============ HowTo ============ */
#howto ol {
  counter-reset: jfstep;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

#howto ol li {
  counter-increment: jfstep;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  margin-bottom: 0.65rem;
  background: var(--jf-bg-alt);
  border-radius: var(--jf-radius-sm);
  color: var(--jf-text-soft);
  transition: transform 0.3s var(--jf-ease), background 0.3s var(--jf-ease);
}

#howto ol li::before {
  content: counter(jfstep);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--jf-primary);
  background: linear-gradient(135deg, var(--jf-accent-light), var(--jf-accent));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
}

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

/* ============ Contact ============ */
#contact p {
  line-height: 2;
}

#contact h3 {
  margin-top: 1.4rem;
}

#contact a {
  font-weight: 600;
}

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

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

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

#sitemap a:hover,
#links a:hover,
#sitemap a:focus-visible,
#links a:focus-visible {
  color: var(--jf-primary);
  background: var(--jf-accent-soft);
  border-color: var(--jf-accent);
  transform: translateY(-2px);
  box-shadow: var(--jf-shadow-sm);
}

@media (prefers-color-scheme: dark) {
  #sitemap a:hover,
  #links a:hover,
  #sitemap a:focus-visible,
  #links a:focus-visible {
    color: var(--jf-accent-light);
  }
}

/* ============ Footer ============ */
footer {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem 2rem;
  background: linear-gradient(180deg, var(--jf-primary) 0%, #081a2b 100%);
  color: rgba(255, 255, 255, 0.78);
  border-top: 3px solid var(--jf-accent);
}

footer section {
  max-width: var(--jf-maxw);
  margin: 0 auto;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  animation: none;
}

footer h2 {
  color: #ffffff;
  font-size: 1.1rem;
  margin: 1.6rem 0 0.6rem;
  padding-left: 0.9rem;
}

footer h2:first-child {
  margin-top: 0;
}

footer h2::before {
  background: linear-gradient(180deg, var(--jf-accent-light), var(--jf-accent));
}

footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

footer > section > p:last-child {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  main {
    padding: 0 1rem 2rem;
  }

  section {
    padding: 1.5rem 1.15rem;
    border-radius: var(--jf-radius-md);
    margin: 1.75rem 0;
  }

  #home {
    padding: 2.2rem 1.4rem;
    border-radius: var(--jf-radius-lg);
  }

  .topbar {
    padding: 0.5rem 1rem;
    font-size: 0.76rem;
  }

  nav[aria-label="主导航"] {
    padding: 0.55rem 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  nav[aria-label="主导航"] a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }

  #products h3,
  #solutions h3,
  #cases h3,
  #knowledge h3,
  #howto h3 {
    padding: 0.9rem 1rem 0.4rem;
  }

  #products h3 + p,
  #solutions h3 + p,
  #cases h3 + p,
  #knowledge h3 + p,
  #howto h3 + p {
    padding: 0 1rem 0.9rem;
  }

  article {
    padding: 1.1rem 1.1rem;
  }

  #faq h3 {
    padding: 0.8rem 0.9rem 0.8rem 2.4rem;
  }

  #faq h3 + p {
    padding-left: 1rem;
    margin-left: 1.4rem;
  }

  #howto ol li {
    padding: 0.75rem 0.9rem 0.75rem 2.9rem;
  }
}

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  section {
    padding: 1.25rem 0.95rem;
  }

  #home {
    padding: 1.8rem 1.1rem;
  }

  #home > p {
    font-size: 0.94rem;
  }

  h2 {
    padding-left: 0.85rem;
  }

  #sitemap ul,
  #links ul {
    gap: 0.45rem;
  }

  #sitemap a,
  #links a {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
  }

  footer {
    padding: 2rem 1rem 1.5rem;
  }
}

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

/* ============ Print ============ */
@media print {
  header,
  footer,
  nav,
  #home figure {
    display: none;
  }

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

  section {
    box-shadow: none;
    border: 1px solid #cccccc;
    page-break-inside: avoid;
  }
}