:root {
  --bg: #f3f5f2;
  --bg-soft: #f8faf7;
  --card: #ffffff;
  --text: #1c2622;
  --muted: #61716a;
  --green: #1d4a43;
  --green-2: #2d6259;
  --gold: #8f7a46;
  --line: #dbe4dd;
  --line-strong: rgba(219, 228, 221, .82);
  --header-bg: rgba(243, 245, 242, .88);
  --footer-bg: rgba(255, 255, 255, .42);
  --icon-btn-color: #1d4a43;
  --shadow: 0 20px 60px rgba(29, 74, 67, .08);
  --radius: 24px;

  --hero-bg:
    radial-gradient(circle at top right, rgba(255, 255, 255, .10), transparent 28%),
    radial-gradient(circle at 18% 12%, rgba(143, 122, 70, .20), transparent 32%),
    linear-gradient(135deg, #1d4a43 0%, #27594f 52%, #163b35 100%);
  --hero-text: #ffffff;
  --hero-muted: rgba(255, 255, 255, .82);
  --hero-chip-bg: rgba(255, 255, 255, .10);
  --hero-chip-border: rgba(255, 255, 255, .18);
  --hero-btn-secondary-bg: rgba(255, 255, 255, .08);
  --hero-btn-secondary-border: rgba(255, 255, 255, .22);
  --hero-card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .90)),
    linear-gradient(135deg, rgba(143, 122, 70, .06), rgba(29, 74, 67, .08));
}

html[data-resolved-theme="light"] {
  color-scheme: light;
}

html[data-resolved-theme="dark"] {
  color-scheme: dark;

  --bg: #0f1513;
  --bg-soft: #151d1a;
  --card: #17211e;
  --text: #edf4f0;
  --muted: #aabbb4;
  --line: rgba(214, 228, 221, .12);
  --line-strong: rgba(214, 228, 221, .14);
  --header-bg: rgba(15, 21, 19, .88);
  --footer-bg: rgba(8, 12, 11, .52);
  --icon-btn-color: #f5f9f7;
  --shadow: 0 20px 60px rgba(0, 0, 0, .34);

  --hero-bg:
    radial-gradient(circle at top right, rgba(255, 255, 255, .08), transparent 28%),
    radial-gradient(circle at 18% 12%, rgba(143, 122, 70, .16), transparent 32%),
    linear-gradient(135deg, #113a34 0%, #174941 52%, #0d2e29 100%);
  --hero-text: #f8fcfa;
  --hero-muted: rgba(248, 252, 250, .78);
  --hero-chip-bg: rgba(255, 255, 255, .06);
  --hero-chip-border: rgba(255, 255, 255, .12);
  --hero-btn-secondary-bg: rgba(255, 255, 255, .05);
  --hero-btn-secondary-border: rgba(255, 255, 255, .14);
  --hero-card-bg:
    linear-gradient(180deg, rgba(21, 30, 27, .98), rgba(21, 30, 27, .94)),
    linear-gradient(135deg, rgba(143, 122, 70, .12), rgba(29, 74, 67, .16));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

.wrap {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-strong);
  transition: transform .28s ease, box-shadow .2s ease, background .2s ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

.header-inner {
  min-height: 76px;
  padding: 12px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--green);
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex: 0 0 44px;
  object-fit: cover;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.brand-mark {
  font-size: 1.1rem;
  white-space: nowrap;
}

.brand-sub {
  font-size: .78rem;
  color: var(--gold);
  white-space: nowrap;
}

.header-tools,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--icon-btn-color);
  cursor: pointer;
  box-shadow: none;
  transition: transform .15s ease, opacity .2s ease, color .2s ease;
  flex: 0 0 40px;
}

.icon-btn:hover {
  transform: translateY(-1px);
  opacity: .82;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 24px;
}

/* Theme button */
.theme-cycle-btn {
  position: relative;
}

.theme-cycle-btn .theme-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
  display: none !important;
}

html[data-theme-preference="system"] .theme-cycle-btn .theme-icon-system {
  display: block !important;
}

html[data-theme-preference="light"] .theme-cycle-btn .theme-icon-light {
  display: block !important;
}

html[data-theme-preference="dark"] .theme-cycle-btn .theme-icon-dark {
  display: block !important;
}

.theme-icon-system .system-ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.theme-icon-system .system-half {
  fill: currentColor;
  stroke: none;
}

/* Menu button */
.menu-toggle {
  display: none;
  position: relative;
}

.menu-toggle .icon-menu,
.menu-toggle .icon-close {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 24px;
  height: 24px;
}

.menu-toggle .icon-close {
  display: none;
}

.site-header.is-menu-open .menu-toggle .icon-menu {
  display: none;
}

.site-header.is-menu-open .menu-toggle .icon-close {
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nav a {
  color: var(--muted);
  font-size: .96rem;
  transition: color .2s ease;
}

.nav a:hover {
  color: var(--green);
}

.site-switch {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 20px rgba(31, 61, 44, .06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease, background .2s ease;
  white-space: nowrap;
}

html[data-resolved-theme="dark"] .site-switch {
  background: rgba(255, 255, 255, .03);
}

.site-switch:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(31, 61, 44, .10);
  border-color: var(--gold);
}

.site-switch-label {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--green);
  line-height: 1.1;
}

.site-switch-meta {
  font-size: .74rem;
  color: var(--muted);
  line-height: 1.1;
}

/* Hero */
.hero {
  padding: 92px 0 72px;
  background: var(--hero-bg);
  color: var(--hero-text);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 36px;
  align-items: center;
}

.hero-logo-block {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 16px;
  border: 1px solid var(--hero-chip-border);
  border-radius: 999px;
  background: var(--hero-chip-bg);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .10);
}

.hero-logo-mark {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--hero-text);
  line-height: 1;
}

.hero-logo-sub {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .14em;
  color: #dcc58a;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: #dcc58a;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  color: var(--hero-text);
}

.lead {
  max-width: 700px;
  font-size: 1.08rem;
  color: var(--hero-muted);
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-note {
  font-size: .95rem;
  margin: 0 0 18px;
  color: var(--hero-muted);
}

.hero-note a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 74, 67, .18);
}

.btn-primary:hover {
  background: var(--green-2);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .78);
  color: var(--green);
}

.hero .btn-primary {
  background: #ffffff;
  color: var(--green);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .16);
}

.hero .btn-primary:hover {
  background: #eef5f2;
}

.hero .btn-secondary {
  border: 1px solid var(--hero-btn-secondary-border);
  background: var(--hero-btn-secondary-bg);
  color: #ffffff;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-points li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--hero-chip-bg);
  border: 1px solid var(--hero-chip-border);
  color: var(--hero-text);
  font-size: .94rem;
}

.hero-card {
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto 24px -18px 24px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .14);
  filter: blur(18px);
}

.hero-card-inner {
  position: relative;
  background: var(--hero-card-bg);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 32px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.card-label {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 0 0 14px;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--green);
}

.hero-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.stats {
  display: grid;
  gap: 14px;
}

.stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(248, 250, 247, .94);
}

html[data-resolved-theme="dark"] .stat {
  background: rgba(255, 255, 255, .03);
}

.stat strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
}

.stat span {
  color: var(--muted);
  font-size: .96rem;
}

/* Sections */
.section {
  padding: 84px 0;
}

.section.alt {
  background: var(--bg-soft);
  border-top: 1px solid rgba(219, 228, 221, .65);
  border-bottom: 1px solid rgba(219, 228, 221, .65);
}

.section-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.section-grid.reverse {
  grid-template-columns: 320px 1fr;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.15;
  color: var(--green);
}

.section-body>p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.03rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(29, 74, 67, .04);
}

.feature-item h3 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 1.06rem;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.quote-box {
  padding: 26px 28px;
  border-left: 4px solid var(--gold);
  background: rgba(255, 255, 255, .78);
  border-radius: 0 20px 20px 0;
}

html[data-resolved-theme="dark"] .quote-box {
  background: rgba(255, 255, 255, .04);
}

.quote-box p {
  margin: 0;
  color: var(--green);
  font-size: 1.04rem;
}

.cards {
  display: grid;
  gap: 18px;
}

.cards.three {
  grid-template-columns: repeat(3, 1fr);
}

.cards.two {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(29, 74, 67, .04);
}

.card h3 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.trace-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trace-step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(29, 74, 67, .04);
}

.trace-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(143, 122, 70, .12);
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 14px;
}

.trace-step h3 {
  margin: 0 0 10px;
  color: var(--green);
}

.trace-step p {
  margin: 0;
  color: var(--muted);
}

.section-cta {
  padding-top: 32px;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(248, 250, 247, .98));
  box-shadow: var(--shadow);
}

html[data-resolved-theme="dark"] .cta-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .02));
}

.cta-box h2 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
}

.cta-box p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

/* Footer */
.site-footer {
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  color: var(--green);
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--green);
}

/* CN footer additions */
.footer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  flex: 1 1 auto;
  min-width: 0;
}

.footer-matrix {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.footer-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .68);
  transition: transform .15s ease, box-shadow .15s ease, border-color .2s ease, background .2s ease;
}

.footer-chip:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 12px 24px rgba(29, 74, 67, .08);
}

.footer-chip-label {
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--green);
  line-height: 1.1;
}

.footer-chip-meta {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.2;
}

html[data-resolved-theme="dark"] .footer-chip {
  background: rgba(255, 255, 255, .03);
}

/* Responsive */
@media (max-width: 980px) {
  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    padding: 10px 0 12px;
  }

  .header-right {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-top: 4px;
  }

  .site-header.is-menu-open .header-right {
    display: flex;
  }

  .nav {
    width: 100%;
    flex-direction: column;
    gap: 0;
  }

  .nav a {
    display: block;
    width: 100%;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: .96rem;
  }

  .site-switch {
    width: 100%;
    white-space: normal;
  }

  .hero-grid,
  .section-grid,
  .section-grid.reverse,
  .feature-list,
  .cards.three,
  .trace-steps,
  .footer-meta {
    grid-template-columns: 1fr;
  }

  .cards.two {
    grid-template-columns: 1fr;
  }

  .cta-box,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .brand-mark {
    font-size: 1rem;
  }

  .brand-sub {
    font-size: .72rem;
  }

  .hero {
    padding: 72px 0 54px;
  }

  .section {
    padding: 64px 0;
  }

  .hero-card-inner,
  .card,
  .feature-item,
  .trace-step,
  .cta-box,
  .footer-chip {
    padding: 20px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }

  .lead {
    font-size: 1rem;
  }
}