:root {
  --primary: #F5A623;
  --primary-dark: #E0901A;
  --primary-light: #FFC85C;
  --accent: #FF6B35;
  --accent-2: #7B5EA7;
  --bg: #FFF9F0;
  --bg-alt: #FFF3E2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #FFFFFF;
  --surface-border: rgba(245, 166, 35, 0.18);
  --text: #2B2118;
  --text-soft: #6B5D4F;
  --text-muted: #9A8B7A;
  --shadow-sm: 0 2px 8px rgba(180, 120, 40, 0.08);
  --shadow-md: 0 8px 28px rgba(180, 120, 40, 0.12);
  --shadow-lg: 0 18px 48px rgba(180, 120, 40, 0.18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1120px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #F7B44A;
    --primary-dark: #E0901A;
    --primary-light: #FFD07A;
    --accent: #FF7A4D;
    --accent-2: #9B7ED0;
    --bg: #14100C;
    --bg-alt: #1C1610;
    --surface: rgba(38, 30, 22, 0.66);
    --surface-solid: #241C14;
    --surface-border: rgba(247, 180, 74, 0.16);
    --text: #F5EDE2;
    --text-soft: #C9BBA8;
    --text-muted: #94836F;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  }
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(245, 166, 35, 0.16), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(255, 107, 53, 0.12), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(123, 94, 167, 0.1), transparent 46%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--primary);
  color: #2B2118;
}

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

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

header nav a {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s var(--ease), background 0.25s var(--ease),
    transform 0.25s var(--ease);
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

header nav a:hover,
header nav a:focus-visible {
  color: var(--primary-dark);
  background: rgba(245, 166, 35, 0.12);
  outline: none;
}

header nav a:hover::after,
header nav a:focus-visible::after {
  width: 60%;
}

/* ---------- Main layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ---------- H1 Banner ---------- */
main > h1 {
  position: relative;
  margin: 32px 0 24px;
  padding: 48px 36px;
  border-radius: var(--radius-lg);
  font-size: clamp(1.35rem, 3.4vw, 2.15rem);
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFFFFF;
  text-shadow: 0 2px 12px rgba(120, 60, 0, 0.35);
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(120deg, #F5A623 0%, #FF8C42 45%, #FF6B35 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: bannerIn 0.9s var(--ease) both;
}

main > h1::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(6px);
  animation: floatBlob 9s ease-in-out infinite;
}

main > h1::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -6%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(10px);
  animation: floatBlob 11s ease-in-out infinite reverse;
}

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

@keyframes floatBlob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-18px, 22px) scale(1.12);
  }
}

/* ---------- Intro paragraph ---------- */
main > p {
  margin: 0 0 32px;
  padding: 22px 26px;
  font-size: 1.02rem;
  color: var(--text-soft);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--surface-border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Sections as cards ---------- */
section {
  position: relative;
  margin: 0 0 28px;
  padding: 32px 30px;
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: sectionRise 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 40%;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

section:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 166, 35, 0.32);
}

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

@supports not (animation-timeline: view()) {
  section {
    animation: none;
  }
}

/* ---------- Headings ---------- */
h2 {
  position: relative;
  margin: 0 0 20px;
  padding-left: 18px;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: 0.3px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 1.15em;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 0 14px rgba(245, 166, 35, 0.5);
}

h3 {
  margin: 26px 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.2px;
}

h4 {
  margin: 20px 0 8px;
  padding: 6px 14px;
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: linear-gradient(120deg, rgba(245, 166, 35, 0.16), rgba(255, 107, 53, 0.1));
  border-radius: 999px;
  border: 1px solid rgba(245, 166, 35, 0.25);
}

/* ---------- Paragraphs & lists ---------- */
section p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.98rem;
}

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

section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

section ul li {
  position: relative;
}

section ul li a {
  display: block;
  padding: 12px 16px 12px 38px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  background: var(--surface-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  transition: all 0.28s var(--ease);
}

section ul li a::before {
  content: "›";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  transition: transform 0.28s var(--ease);
}

section ul li a:hover,
section ul li a:focus-visible {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: linear-gradient(120deg, rgba(245, 166, 35, 0.1), rgba(255, 107, 53, 0.06));
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  outline: none;
}

section ul li a:hover::before {
  transform: translateY(-50%) translateX(4px);
}

/* ---------- Articles ---------- */
article {
  position: relative;
  margin: 0 0 16px;
  padding: 22px 24px;
  background: var(--surface-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease),
    border-color 0.32s var(--ease);
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}

article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245, 166, 35, 0.4);
}

article:hover::before {
  transform: scaleY(1);
}

article h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
  transition: color 0.28s var(--ease);
}

article:hover h3 {
  color: var(--primary-dark);
}

article p {
  margin: 0 0 8px;
  font-size: 0.94rem;
}

article p:first-of-type {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: rgba(245, 166, 35, 0.14);
  border-radius: 999px;
  letter-spacing: 0.3px;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.35);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    filter 0.28s var(--ease);
}

article a::after {
  content: "→";
  font-size: 0.95rem;
  transition: transform 0.28s var(--ease);
}

article a:hover,
article a:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 22px rgba(245, 166, 35, 0.5);
  outline: none;
}

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

/* ---------- FAQ ---------- */
#faq h3 {
  margin: 0 0 10px;
  padding: 14px 18px 14px 44px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all 0.28s var(--ease);
}

#faq h3::before {
  content: "Q";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
}

#faq h3:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

#faq p {
  margin: 0 0 18px;
  padding: 0 8px 0 44px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

/* ---------- Contact ---------- */
#contact p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  margin: 0 0 10px;
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  transition: all 0.28s var(--ease);
}

#contact p:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 40px;
  padding: 36px 24px 44px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(245, 166, 35, 0.08));
  border-top: 1px solid var(--surface-border);
}

footer p {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-soft);
}

/* ---------- Focus visible ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  main > h1 {
    padding: 40px 26px;
    margin-top: 24px;
  }

  section {
    padding: 26px 22px;
  }
}

@media (max-width: 640px) {
  :root {
    --radius-lg: 20px;
    --radius: 14px;
  }

  body {
    font-size: 15px;
    line-height: 1.72;
  }

  header nav {
    padding: 0 12px;
    gap: 2px;
    min-height: 56px;
  }

  header nav a {
    padding: 7px 11px;
    font-size: 13.5px;
  }

  main {
    padding: 0 14px 48px;
  }

  main > h1 {
    margin: 18px 0 18px;
    padding: 32px 20px;
    border-radius: var(--radius-lg);
    font-size: 1.3rem;
  }

  main > p {
    padding: 18px 18px;
    font-size: 0.95rem;
    border-left-width: 3px;
  }

  section {
    padding: 22px 16px;
    margin-bottom: 18px;
  }

  h2 {
    padding-left: 14px;
    margin-bottom: 16px;
  }

  h2::before {
    width: 5px;
  }

  h3 {
    margin-top: 20px;
    font-size: 1.02rem;
  }

  section ul {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  section ul li a {
    padding: 10px 12px 10px 32px;
    font-size: 0.88rem;
  }

  section ul li a::before {
    left: 12px;
  }

  article {
    padding: 18px 16px;
  }

  #faq h3 {
    padding: 12px 14px 12px 40px;
    font-size: 0.93rem;
  }

  #faq p {
    padding: 0 4px 0 40px;
    font-size: 0.9rem;
  }

  #contact p {
    padding: 9px 12px;
    font-size: 0.92rem;
  }

  footer {
    padding: 28px 16px 36px;
  }
}

@media (max-width: 380px) {
  section ul {
    grid-template-columns: 1fr;
  }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  body {
    background: #FFFFFF;
    color: #000000;
  }

  header,
  footer {
    display: none;
  }

  section,
  article {
    box-shadow: none;
    border: 1px solid #CCCCCC;
    break-inside: avoid;
  }
}