/* ==========================================================================
   auv · Agent User Vantage — 亮色清新主题
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #f7fafd;
  --surface: #ffffff;
  --border: #e6ebf2;
  --border-strong: #d6deea;
  --text: #0f172a;
  --text-2: #3b4a5f;
  --text-3: #5d6b80;
  --brand: #0e7490;
  --brand-soft: #e0f2fe;
  --grad-accent: linear-gradient(120deg, #06b6d4 0%, #4f46e5 100%);
  --grad-btn: linear-gradient(135deg, #0e7490 0%, #4f46e5 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px -14px rgba(15, 23, 42, 0.14);
  --radius: 20px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo,
    Consolas, "Liberation Mono", monospace;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; }

p { margin: 0; }

a { color: var(--brand); text-decoration: none; }

::selection { background: #c9f2fb; color: #083344; }

/* ---------- 中文排版（CJK 禁则与断行） ---------- */
/* strict：行首不落 ，。」）等收尾标点 */
.hero-sub, .sec-desc, .tool-pitch, .tool-feats li, .about-card p,
.tool-kind, .footer-slogan, .hero-meta {
  line-break: strict;
}
/* 词组不拆行（手动分词，避免双字词被断到两行） */
.w { white-space: nowrap; }
/* 居中段落行宽均衡；标题换行更整齐（渐进增强，不支持的浏览器按默认排） */
.hero h1, .sec-head h2 { text-wrap: balance; }
.hero-sub, .hero-badge, .hero-meta { text-wrap: balance; }
/* 左对齐段落避免孤字尾行 */
.sec-desc, .tool-pitch, .about-card p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

.skip {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  transition: top 0.2s ease;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: 1px solid transparent;
  transition: box-shadow 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, filter 0.2s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary {
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 8px 20px -8px rgba(30, 100, 160, 0.55);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 12px 26px -8px rgba(30, 100, 160, 0.6); }

.btn-ghost {
  color: var(--text-2);
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: #b9c5d6; background: #fbfcfe; color: var(--text); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 28px));
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 9px 10px 9px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(226, 234, 243, 0.9);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.nav.scrolled .nav-inner {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand-mark { width: 34px; height: 34px; flex: none; display: block; }
.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: background-color 0.18s ease, color 0.18s ease;
}
.nav-links a:hover { background: #eef3f9; color: var(--text); }

.nav-gh { padding: 9px 16px; font-size: 14px; border-radius: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 172px 0 96px;
  text-align: center;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; }

.hero-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 12%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 62% at 50% 12%, #000 25%, transparent 78%);
}

.blob { position: absolute; border-radius: 50%; filter: blur(72px); opacity: 0.5; }
.blob-a { width: 480px; height: 480px; top: -160px; left: -110px; background: radial-gradient(circle, rgba(103, 232, 249, 0.55), transparent 70%); }
.blob-b { width: 460px; height: 460px; top: -120px; right: -120px; background: radial-gradient(circle, rgba(196, 181, 253, 0.5), transparent 70%); }
.blob-c { width: 400px; height: 400px; bottom: -220px; left: 38%; background: radial-gradient(circle, rgba(167, 243, 208, 0.45), transparent 70%); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, 0.16);
}

.hero h1 {
  margin: 26px auto 0;
  max-width: 21em;
  font-size: clamp(34px, 5.6vw, 58px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.grad-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 22px auto 0;
  max-width: 620px;
  font-size: clamp(15.5px, 1.8vw, 17.5px);
  color: var(--text-2);
}
.hero-sub strong { color: var(--text); font-weight: 650; }

.hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(18px, 4vw, 44px);
  margin-top: 46px;
  font-size: 14px;
  color: var(--text-3);
}
.hero-meta b { color: var(--text-2); font-weight: 650; }
.hero-meta span { display: inline-flex; align-items: center; }

/* ---------- sections ---------- */
.section { padding: 76px 0 84px; }
.section-about {
  padding-bottom: 110px;
  background:
    radial-gradient(ellipse 60% 40% at 85% 0%, rgba(196, 181, 253, 0.14), transparent),
    radial-gradient(ellipse 55% 45% at 8% 10%, rgba(165, 243, 252, 0.2), transparent);
}

.sec-head { max-width: 640px; margin-bottom: 44px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--grad-accent);
}
.sec-head h2 {
  margin-top: 14px;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
}
.sec-desc { margin-top: 14px; color: var(--text-2); font-size: 15.5px; }
.sec-desc strong { color: var(--text); font-weight: 650; }

/* ---------- tool cards ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.tool {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.tool:hover {
  border-color: var(--accent-border, var(--border-strong));
  box-shadow: 0 16px 40px -16px rgba(15, 23, 42, 0.16),
    0 0 0 4px var(--accent-soft, transparent);
  transform: translateY(-3px);
}

.tool-head { display: flex; align-items: center; gap: 14px; }
.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.tool-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.tool-head h3 { font-size: 19px; font-weight: 750; letter-spacing: -0.01em; }
.tool-kind { margin-top: 3px; font-size: 13px; color: var(--text-3); }

.tool-pitch { font-size: 14.5px; color: var(--text-2); }

.tool-feats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.tool-feats li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}
.tool-feats li > svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 5px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-feats code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--text);
}

.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-tags span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  background: #f4f7fb;
  border: 1px solid #e8eef5;
  border-radius: 999px;
  padding: 3.5px 11px;
}

.tool-foot {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: auto;
  padding-top: 6px;
}
.install {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.install code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.install .prefix { color: #94a3b8; margin-right: 2px; }

.copy-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.copy-btn:hover { background: #e9eff6; color: var(--text); }
.copy-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-gh {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.tool-gh:hover { border-color: #b9c5d6; background: #fbfcfe; }
.tool-gh svg { width: 16px; height: 16px; }

.tool-links { display: flex; gap: 10px; align-items: stretch; flex: none; }

.tool-demo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.tool-demo:hover { border-color: var(--accent); box-shadow: 0 4px 14px -6px rgba(15, 23, 42, 0.2); }
.tool-demo svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.about-card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.about-card:hover {
  border-color: #c7d6f0;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.about-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e0f2fe, #e0e7ff);
  color: #4f46e5;
}
.about-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.about-card h3 { margin-top: 16px; font-size: 17px; font-weight: 700; }
.about-card p { margin-top: 8px; font-size: 14px; color: var(--text-2); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 0 30px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { width: 38px; height: 38px; }
.footer-name { font-size: 15px; font-weight: 700; color: var(--text); }
.footer-slogan { margin-top: 2px; font-size: 13px; color: var(--text-3); }

.footer-gh {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.footer-gh:hover { border-color: #b9c5d6; background: #fbfcfe; color: var(--text); }
.footer-gh svg { width: 16px; height: 16px; }

.footer-meta { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.footer-meta p { font-size: 13px; color: var(--text-3); }
.footer-icp { margin-top: 6px; }
.footer-icp a { color: var(--text-3); transition: color 0.18s ease; }
.footer-icp a:hover { color: var(--brand); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 16px);
  z-index: 60;
  padding: 11px 20px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .tools-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { top: 10px; width: calc(100% - 20px); }
  .nav-links { display: none; }
  .nav-gh { margin-left: auto; }
  .hero { padding-top: 136px; padding-bottom: 64px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .tool { padding: 24px 20px; }
  .tool-foot { flex-direction: column; }
  .tool-links { width: 100%; }
  .tool-links .tool-demo, .tool-links .tool-gh { flex: 1; justify-content: center; padding: 11px 14px; }
  .install code { font-size: 12.5px; }
  .section { padding: 56px 0 64px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .toast { transition: opacity 0.1s ease; }
  .tool, .about-card, .btn, .nav-inner { transition: none; }
}
