/* ===========================================================
   eDNA 环境DNA 技术导览 — stylesheet
   =========================================================== */

:root {
  --accent: #35d6c0;
  --accent-2: #4aa8ff;
  --warn: #ffb547;
  --radius: 16px;
  --wrap: 1140px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;
}

html[data-theme="dark"] {
  --bg: #05171c;
  --bg-2: #071f26;
  --ink-1: #eaf6f5;
  --ink-2: #9db4b8;
  --ink-3: #14313a;
  --line: rgba(255, 255, 255, .09);
  --card: rgba(255, 255, 255, .035);
  --card-hi: rgba(255, 255, 255, .06);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

html[data-theme="light"] {
  --bg: #f6fbfa;
  --bg-2: #ffffff;
  --ink-1: #0b2027;
  --ink-2: #4f6b70;
  --ink-3: #d8ecea;
  --line: rgba(6, 40, 45, .12);
  --card: #ffffff;
  --card-hi: #ffffff;
  --shadow: 0 14px 40px rgba(10, 55, 60, .10);
  --accent: #0f9e8a;
  --accent-2: #2a72c9;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code { font-family: var(--mono); font-size: .9em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap.narrow { width: min(100% - 40px, 820px); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #05171c; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner { display: flex; align-items: center; gap: 18px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink-1); text-decoration: none; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; color: var(--accent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; letter-spacing: .06em; }
.brand-text i { font-style: normal; font-size: 11px; color: var(--ink-2); letter-spacing: .18em; }

.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-2); font-size: 14px; padding: 7px 11px; border-radius: 9px;
  text-decoration: none; transition: .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink-1); background: var(--card-hi); text-decoration: none; }

.theme-toggle, .menu-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-1);
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 15px; transition: .2s;
}
.theme-toggle:hover, .menu-btn:hover { border-color: var(--accent); color: var(--accent); }
html[data-theme="dark"] .ico-sun { display: block; }
html[data-theme="dark"] .ico-moon { display: none; }
html[data-theme="light"] .ico-sun { display: none; }
html[data-theme="light"] .ico-moon { display: block; }

.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span { display: block; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; transition: .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 108px 0 92px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.b1 { width: 520px; height: 520px; background: var(--accent); top: -180px; right: -120px; opacity: .22; animation: drift 22s ease-in-out infinite; }
.b2 { width: 420px; height: 420px; background: var(--accent-2); bottom: -200px; left: -100px; opacity: .18; animation: drift 28s ease-in-out infinite reverse; }
.b3 { width: 300px; height: 300px; background: #7b5cff; top: 40%; left: 45%; opacity: .12; animation: drift 34s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
}
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: .6;
}
.hero-inner { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 5px 14px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7.4vw, 82px);
  line-height: 1.06; letter-spacing: -.02em; font-weight: 800;
  background: linear-gradient(120deg, var(--ink-1) 20%, var(--accent) 70%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lead { max-width: 66ch; font-size: clamp(16px, 1.9vw, 19px); color: var(--ink-2); margin: 0 0 32px; }
.lead b { color: var(--ink-1); }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 56px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-size: 15px; font-weight: 600;
  text-decoration: none; transition: .22s; border: 1px solid transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #04181c; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--ink-1); background: var(--card); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; }
.stats > div { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stats dt { font-size: clamp(18px, 2.2vw, 24px); font-weight: 750; color: var(--accent); line-height: 1.25; }
.stats dd { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-1); line-height: 1.5; }
.stats dd span { color: var(--ink-2); font-size: 12.5px; }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 1; }
.scroll-hint span {
  display: block; width: 22px; height: 36px; border: 1.6px solid var(--line); border-radius: 12px; position: relative;
}
.scroll-hint span::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%); animation: wheel 1.8s infinite;
}
@keyframes wheel { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 100% { opacity: 0; top: 20px; } }

/* ---------- SECTIONS ---------- */
.sec { padding: 92px 0; position: relative; }
.sec.alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.kicker {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.sec h2 {
  margin: 0 0 20px; font-size: clamp(27px, 4vw, 42px); line-height: 1.2;
  letter-spacing: -.015em; font-weight: 750;
}
.sec h3.sub { margin: 52px 0 18px; font-size: 20px; font-weight: 700; }
.sec-lead { max-width: 78ch; color: var(--ink-2); font-size: 16.5px; margin: 0 0 40px; }
.sec-lead b { color: var(--ink-1); }
.fine { font-size: 13.5px; color: var(--ink-2); margin-top: 14px; }

/* ---------- CARDS ---------- */
.cards { display: grid; gap: 18px; }
.cards.c2 { grid-template-columns: repeat(2, 1fr); }
.cards.c3 { grid-template-columns: repeat(3, 1fr); }
.card {
  padding: 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); transition: .25s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 42%, transparent); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: 17.5px; font-weight: 700; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.8px; }
.card-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}

.note {
  margin-top: 28px; padding: 20px 24px; border-radius: var(--radius);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-size: 14.8px; color: var(--ink-2);
}
.note b { color: var(--ink-1); }
.note code {
  background: var(--card-hi); padding: 1px 6px; border-radius: 5px; color: var(--accent);
  border: 1px solid var(--line);
}

.callout {
  margin-top: 34px; padding: 26px 30px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
}
.callout h4 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.callout ol { margin: 0; padding-left: 22px; color: var(--ink-2); font-size: 15px; }
.callout li { margin-bottom: 9px; }
.callout b { color: var(--ink-1); }
.callout em { font-style: normal; color: var(--accent); }

/* ---------- LIFECYCLE ---------- */
.lifecycle { display: grid; gap: 26px; }
.lc-svg {
  width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card);
}
.lc-t { font-size: 13px; fill: var(--ink-1); font-family: var(--font); font-weight: 600; }
.lc-dim { fill: var(--ink-2); font-weight: 400; }
.lc-shed circle, .lc-frag circle { fill: var(--accent); opacity: .7; }
.lc-shed circle { animation: float 4s ease-in-out infinite; }
.lc-shed circle:nth-child(2) { animation-delay: .6s; }
.lc-shed circle:nth-child(3) { animation-delay: 1.2s; }
.lc-shed circle:nth-child(4) { animation-delay: 1.8s; }
.lc-shed circle:nth-child(5) { animation-delay: 2.4s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.lc-fish { animation: swim 9s ease-in-out infinite; }
@keyframes swim { 0%,100% { transform: translateX(0); } 50% { transform: translateX(26px); } }

.lc-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lc-legend > div { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.lc-legend b { display: block; margin-bottom: 6px; font-size: 14.5px; color: var(--accent); }
.lc-legend span { font-size: 13.6px; color: var(--ink-2); }

/* ---------- FLOW ---------- */
.flow { list-style: none; padding: 0; margin: 0 0 46px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flow li {
  position: relative; padding: 24px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card);
}
.flow li::after {
  content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 16px; z-index: 2;
}
.flow li:last-child::after { display: none; }
.flow-n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: #04181c; font-weight: 750; font-size: 14px; margin-bottom: 13px;
}
.flow h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; }
.flow p { margin: 0 0 8px; font-size: 14.2px; color: var(--ink-2); }
.flow-tag { font-size: 12.6px !important; color: var(--accent) !important; border-top: 1px dashed var(--line); padding-top: 8px; margin: 10px 0 0 !important; }

/* ---------- SPLIT PANELS ---------- */
.split { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.panel header { margin-bottom: 12px; }
.panel h3 { margin: 10px 0 0; font-size: 20px; font-weight: 700; }
.panel > p { color: var(--ink-2); font-size: 14.8px; margin: 0 0 16px; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; }
.pill-a { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); }
.pill-b { background: color-mix(in srgb, var(--accent-2) 18%, transparent); color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent-2) 34%, transparent); }

ul.tick, ul.cross, ul.dash { list-style: none; padding: 0; margin: 0 0 14px; }
ul.tick li, ul.cross li, ul.dash li {
  position: relative; padding-left: 24px; margin-bottom: 8px; font-size: 14.5px; color: var(--ink-2);
}
ul.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
ul.cross li::before { content: "×"; position: absolute; left: 0; color: var(--warn); font-weight: 700; }
ul.dash li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
ul.tight li { margin-bottom: 6px; font-size: 14px; }
ul.tick b, ul.cross b, ul.dash b { color: var(--ink-1); }
.use { font-size: 13.6px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 13px; margin: 4px 0 0; }

/* ---------- TABLE ---------- */
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; min-width: 700px; font-size: 14.3px; }
.tbl th, .tbl td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 650; }
.tbl td { color: var(--ink-2); }
.tbl td b { color: var(--ink-1); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--card-hi); }

/* ---------- PIPELINE ---------- */
.pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin-bottom: 38px; }
.pipe-step {
  padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--card);
  border-top: 2px solid var(--accent); transition: .25s;
}
.pipe-step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pipe-step span { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.pipe-step h4 { margin: 6px 0 8px; font-size: 15.5px; font-weight: 700; }
.pipe-step p { margin: 0; font-size: 13.6px; color: var(--ink-2); }
.pipe-step b { color: var(--ink-1); }

.code-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
html[data-theme="light"] .code-card { background: #0d2430; }
.code-head {
  display: flex; align-items: center; gap: 7px; padding: 11px 16px;
  border-bottom: 1px solid var(--line); background: var(--card);
}
html[data-theme="light"] .code-head { background: #0a1d27; border-color: rgba(255,255,255,.1); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
.d1 { background: #ff5f57; } .d2 { background: #febc2e; } .d3 { background: #28c840; }
.code-head em { margin-left: 8px; font-style: normal; font-size: 12.5px; color: var(--ink-2); font-family: var(--mono); }
html[data-theme="light"] .code-head em { color: #8fa8b2; }
.code-card pre { margin: 0; padding: 20px; overflow-x: auto; font-size: 13px; line-height: 1.75; }
.code-card code { color: #d7ecec; font-family: var(--mono); white-space: pre; }
.code-card .c { color: #5f8b93; }

/* ---------- VS ---------- */
.vs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.vs-col { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.vs-col h3 { margin: 0 0 16px; font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.vs-col h3 span {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 14px;
}
.vs-pro { border-top: 2px solid var(--accent); }
.vs-pro h3 span { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.vs-con { border-top: 2px solid var(--warn); }
.vs-con h3 span { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.vs-col ul { list-style: none; padding: 0; margin: 0; }
.vs-col li { padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14.6px; color: var(--ink-2); }
.vs-col li:last-child { border-bottom: none; }
.vs-col b { color: var(--ink-1); }

/* ---------- TIMELINE ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 92px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--accent), transparent);
}
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 30px; padding-bottom: 26px; position: relative; }
.tl-y { font-family: var(--mono); font-size: 14px; color: var(--accent); text-align: right; padding-top: 2px; font-weight: 600; }
.timeline li::before {
  content: ""; position: absolute; left: 88px; top: 9px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.sec.alt .timeline li::before { background: var(--bg-2); }
.timeline h4 { margin: 0 0 5px; font-size: 16.5px; font-weight: 700; }
.timeline p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line); border-radius: 13px; background: var(--card);
  margin-bottom: 11px; overflow: hidden; transition: .2s;
}
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.faq summary {
  padding: 18px 52px 18px 22px; cursor: pointer; font-weight: 650; font-size: 15.6px;
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 20px; font-weight: 400; transition: .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq p { margin: 0; padding: 0 22px 20px; font-size: 14.8px; color: var(--ink-2); }
.faq b { color: var(--ink-1); }

/* ---------- FOOTER ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0; background: var(--bg); }
.foot-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 26px; flex-wrap: wrap; }
.foot-brand { margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.foot .fine { max-width: 62ch; margin: 0; }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .cards.c3 { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li:nth-child(2)::after { display: none; }
  .lc-legend { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .menu-btn { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 20px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 8px; font-size: 15px; border-radius: 8px; }
  .hero { padding: 68px 0 76px; }
  .cards.c3, .cards.c2, .split, .vs, .flow, .lc-legend { grid-template-columns: 1fr; }
  .flow li::after { content: "↓"; right: auto; left: 34px; top: auto; bottom: -15px; transform: none; }
  .sec { padding: 66px 0; }
  .timeline::before { left: 62px; }
  .timeline li { grid-template-columns: 62px 1fr; gap: 20px; }
  .timeline li::before { left: 58px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .scroll-hint { display: none; }
}

@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 28px, var(--wrap)); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .scroll-hint, .hero-bg, .theme-toggle, .menu-btn { display: none !important; }
  body { background: #fff; color: #000; }
}
