/* EdgeSidekick site — single-page calm product layout */
:root {
  --bg: #f2f5fa;
  --bg2: #e9eff8;
  --card: #ffffff;
  --ink: #101a2b;
  --muted: #66768a;
  --line: #dbe3ee;
  --line-strong: #c5d0e0;
  --blue: #2f6fed;
  --blue-soft: rgba(47,111,237,.1);
  --grad: linear-gradient(135deg, #5b97ff, #2f6fed 55%, #1d4fc4);
  --shadow: 0 1px 2px rgba(16,26,43,.04), 0 4px 12px rgba(16,26,43,.05), 0 16px 32px -8px rgba(16,26,43,.06);
  --shadow-sm: 0 1px 2px rgba(16,26,43,.05), 0 1px 1px rgba(16,26,43,.03);
  --radius: 12px;
  --radius-lg: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --nav-h: 60px;
  --ease: .18s ease;
  --section-y: 52px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0f16;
  --bg2: #151d28;
  --card: #151d28;
  --ink: #f3f6fb;
  --muted: #a9b8c9;
  --line: #263140;
  --line-strong: #3a4a5c;
  --blue: #7eafff;
  --blue-soft: rgba(126,175,255,.14);
  --grad: linear-gradient(135deg, #9cc2ff, #7eafff 55%, #5b97ff);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--ease), color var(--ease);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
code, .mono { font-family: var(--mono); }

/* ---- Minimal nav (logo + lang/theme only) ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--grad); transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center; pointer-events: none;
}
.nav-in {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 780; font-size: 16px; letter-spacing: -.015em;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  box-shadow: 0 3px 10px rgba(47,111,237,.22);
  background: var(--card);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.logo-text { white-space: nowrap; }
.nav-actions {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0; margin-left: auto;
}
.nav-switches {
  display: flex; align-items: center; gap: 10px;
}
.switch-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 34px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted);
  font-size: 12px; font-weight: 700;
  transition: color var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}
.switch-btn:hover { color: var(--blue); border-color: var(--line-strong); background: var(--blue-soft); box-shadow: var(--shadow-sm); }
.switch-btn .ico { width: 16px; height: 16px; display: block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; }
.section { padding: 64px 0; }
.section.alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow {
  display: block; width: fit-content;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.6px; color: var(--blue);
  text-transform: uppercase; font-weight: 650;
}
.sec-title {
  position: relative; display: block; width: fit-content; padding-bottom: 11px;
  font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; letter-spacing: -.025em;
  margin: 8px 0 0; line-height: 1.22;
}
.sec-title::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 42px; height: 3px;
  border-radius: 99px; background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .55s cubic-bezier(.22,1,.36,1);
}
.reveal.in .sec-title::after { transform: scaleX(1); transition-delay: .18s; }
.sec-sub { color: var(--muted); font-size: 15px; max-width: 620px; line-height: 1.55; }

/* ---- Scroll reveal (only when JS marks html.js; otherwise stay visible) ---- */
html.js .reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0) scale(.985);
  filter: blur(3px);
  transition: opacity .68s cubic-bezier(.22,1,.36,1), transform .68s cubic-bezier(.22,1,.36,1), filter .68s ease;
}
html.js .reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ---- Hero ---- */
.hero { padding: 60px 0 54px; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 12.5px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.hero-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.hero h1 {
  font-size: clamp(34px, 4.3vw, 48px); font-weight: 820; letter-spacing: -.03em;
  line-height: 1.14; margin-bottom: 12px;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { color: var(--muted); font-size: 16px; max-width: 430px; margin-bottom: 24px; line-height: 1.65; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 650;
  transition: background var(--ease), border-color var(--ease), filter var(--ease), box-shadow var(--ease);
}
.btn-p { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(47,111,237,.22); }
.btn-p:hover { filter: brightness(1.05); }
.btn-g { background: var(--card); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-g:hover { border-color: var(--line-strong); background: var(--blue-soft); }

.shot-frame {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
html.js .shot-frame.reveal { transform: translate3d(58px, 0, 0) perspective(1000px) rotateY(-4deg) scale(.96); transform-origin: right center; }
html.js .shot-frame.reveal.in { transform: translate3d(0, 0, 0) perspective(1000px) rotateY(0) scale(1); }
.shot-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  border-bottom: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 11.5px;
}
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.shot-frame img { width: 100%; }

/* ---- Architecture (inline SVG, never download link) ---- */
.arch {
  margin-top: 24px; padding: 12px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.arch-frame {
  width: 100%;
  min-width: 900px;
  border-radius: 12px;
  background: #f2f5fa;
  overflow: hidden;
  pointer-events: none; /* block SVG-as-link / drag-save UX */
  user-select: none;
}
.arch-frame svg,
.arch-inline {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}
.arch-inline .arch-node {
  opacity: 0; transform: translateY(18px) scale(.975);
  transform-box: fill-box; transform-origin: center;
}
.arch.in .arch-inline .arch-node { animation: arch-node-in .62s cubic-bezier(.22,1,.36,1) both; }
.arch.in .node-plan { animation-delay: .08s !important; }
.arch.in .node-loop-title { animation-delay: .12s !important; }
.arch.in .node-context { animation-delay: .24s !important; }
.arch.in .node-thought { animation-delay: .43s !important; }
.arch.in .node-approval { animation-delay: .78s !important; }
.arch.in .node-action { animation-delay: 1.08s !important; }
.arch.in .node-observe { animation-delay: 1.38s !important; }
.arch.in .node-cycle-label { animation-delay: .72s !important; }
.arch.in .node-capabilities-title { animation-delay: .18s !important; }
.arch.in .node-tools { animation-delay: .5s !important; }
.arch.in .node-extensions { animation-delay: .78s !important; }
.arch.in .node-agents { animation-delay: 1.04s !important; }
.arch.in .node-feedback { animation-delay: 1.45s !important; }
.arch-inline .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.arch.in .draw { animation: arch-line-draw .68s ease-out both; }
.arch.in .draw-1 { animation-delay: .24s; }
.arch.in .draw-2 { animation-delay: .42s; }
.arch.in .draw-3 { animation-delay: .73s; }
.arch.in .draw-4 { animation-delay: 1.02s; }
.arch.in .draw-5 { animation-delay: 1.3s; }
.arch.in .draw-6 { animation-delay: 1.58s; }
.arch.in .draw-7 { animation-delay: .92s; }
.arch.in .draw-8 { animation-delay: 1.08s; }
.arch.in .draw-9 { animation-delay: 1.18s; }
.arch.in .draw-10 { animation-delay: 1.28s; }
.arch.in .draw-11 { animation-delay: 1.62s; }
.arch.in .draw-12 { animation-delay: 1.02s; }
.arch.in .draw-12 { animation-delay: 1.85s; }
@keyframes arch-node-in {
  from { opacity: 0; transform: translateY(18px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes arch-line-draw { to { stroke-dashoffset: 0; } }
/* ---- Compact feature cards ---- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
  margin-top: 24px;
}
.feature-card {
  position: relative; overflow: hidden; perspective: 900px;
  min-height: 164px; padding: 20px 22px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform .55s cubic-bezier(.22,1,.36,1);
}
.feature-card.in::before { transform: scaleX(1); transition-delay: .22s; }
html.js .feature-card.reveal { transform: translate3d(0, 46px, 0) rotateX(7deg) scale(.94); transform-origin: center bottom; }
html.js .feature-card.reveal.in { transform: translate3d(0, 0, 0) rotateX(0) scale(1); }
html.js .feature-card:nth-child(3n + 2).reveal { transform: translate3d(20px, 38px, 0) rotateY(-5deg) scale(.95); }
html.js .feature-card:nth-child(3n + 2).reveal.in { transform: translate3d(0, 0, 0) rotateY(0) scale(1); }
html.js .feature-card:nth-child(3n + 3).reveal { transform: translate3d(-20px, 38px, 0) rotateY(5deg) scale(.95); }
html.js .feature-card:nth-child(3n + 3).reveal.in { transform: translate3d(0, 0, 0) rotateY(0) scale(1); }
html.js .feature-card.reveal { transition: opacity .68s cubic-bezier(.22,1,.36,1), transform .68s cubic-bezier(.22,1,.36,1), filter .68s ease, border-color .2s ease, box-shadow .2s ease; }
.feature-card.reveal-d1 { transition-delay: .06s; }
.feature-card.reveal-d2 { transition-delay: .16s; }
.feature-card.reveal-d3 { transition-delay: .26s; }
.feature-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
html.js .feature-card.reveal.in:hover { transform: translate3d(0, -3px, 0) scale(1); }
.feature-icon {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px;
  border-radius: 10px; background: var(--blue-soft); color: var(--blue);
  font-family: var(--mono); font-size: 11px; font-weight: 750;
  transition: opacity .4s ease, transform .4s cubic-bezier(.22,1,.36,1);
}
.feature-card:not(.in) .feature-icon { opacity: .45; transform: scale(.78); }
.feature-card.in .feature-icon { opacity: 1; transform: scale(1); animation: feature-icon-in .48s cubic-bezier(.22,1,.36,1) both; }
.feature-card.reveal-d1.in .feature-icon { animation-delay: .06s; }
.feature-card.reveal-d2.in .feature-icon { animation-delay: .16s; }
.feature-card.reveal-d3.in .feature-icon { animation-delay: .26s; }
@keyframes feature-icon-in {
  0% { transform: scale(.72) rotate(-8deg); }
  72% { transform: scale(1.12) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}
.feature-card h3 { margin-bottom: 6px; font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.feature-card p { max-width: 300px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.card .os {
  font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 1px;
  margin-bottom: 8px; display: block;
}
.card h3 { font-size: 17px; font-weight: 750; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .fmt {
  display: inline-block; margin-top: 12px; font-family: var(--mono); font-size: 12px;
  color: var(--blue); background: var(--blue-soft); padding: 4px 8px; border-radius: 6px;
}

.dl-hero { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.start-box {
  margin-top: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.start-box h3 { font-size: 17px; margin-bottom: 6px; }
.start-box > p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.start-cmd {
  background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 13px; line-height: 1.7; overflow-x: auto;
}
.start-cmd .p { color: #60a5fa; }
.start-cmd .cm { color: #94a3b8; }
.start-url { margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--blue); }

footer {
  border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 13px;
  margin-top: auto;
}
.foot {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
}
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { width: 24px; height: 24px; border-radius: 6px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--blue); }

@media (max-width: 900px) {
  .arch-frame { min-width: 780px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .nav-in { gap: 10px; padding: 0 16px; }
  .logo-text { font-size: 15px; }
  .switch-btn { min-width: 40px; padding: 0 10px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 40px 0 36px; }
  .hero-grid, .grid-2, .feature-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 26px; }
  .section { padding: 48px 0; }
  .arch { padding: 8px; }
  .feature-card { min-height: 0; }
}


/* ---- Demo video ---- */
.video-frame {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  background: #0f172a;
  vertical-align: top;
}
